Need to View the contents of an EXE file

A

adirajuv

I wrote a program in C long time ago and I lost my code and all the
intermediate files. All I have is the "exe" file that was generated
when I executed it. Can the code be retrieved from this exe file?

If not, is there a way I can atleast view the contents of the exe file?

Thanks in Advance
 
M

marri

Currently there are no tools that does this. For java there are
decoders but definitely for an c++ executable.
 
M

marri

Currently there are no tools that does this. For java there are
decoders but definitely not for an c++ executable.
 
M

Mark McIntyre

I wrote a program in C long time ago and I lost my code and all the
intermediate files. All I have is the "exe" file that was generated
when I executed it. Can the code be retrieved from this exe file?

look up 'decompiler' on the web, and consider that its typically a
'hamburger back to cow' transformation.
If not, is there a way I can atleast view the contents of the exe file?

Sure, you can view the binary with any hex viewer. You can probably
load it into a debugger like DEBUG and step through the machine code /
assembly instructions. This would all be platform-specific though,
and you'd need to ask in a more appropriate newsgroup.
 
C

CBFalconer

I wrote a program in C long time ago and I lost my code and all the
intermediate files. All I have is the "exe" file that was generated
when I executed it. Can the code be retrieved from this exe file?

If not, is there a way I can atleast view the contents of the exe
file?

You can disassemble it to machine (assembly) code. You can never
recover the original source code. If the exe file includes
debugging info you can regain some of the identifiers used.
 
C

Chris Croughton

I wrote a program in C long time ago and I lost my code and all the
intermediate files. All I have is the "exe" file that was generated
when I executed it. Can the code be retrieved from this exe file?

No, the source code is totally gone long before it gets to be an
executable file. Unless you have a 'debug' version which keeps the
source in the EXE (some compilers did that).
If not, is there a way I can atleast view the contents of the exe file?

Well, you could use a hex editor, but that's probably not what you mean.
You can extract text strings from a file (Unix-like systems often have a
program called 'strings' which does it) but that would likely only give
you the string literals (and a load of garbage). If you search the web
you may be able to find a "dis-assembler" which understands the EXE
format (on some systems 'objdump' can do it; as I recall both MS and
Borland had something to do it for DOS a long time ago) but the
assembler code you get back will likely be not very recognisable.

Sorry, I think you're better off rewriting it from scratch...

(For DOS/Windows executables mentioned above, you could try asking on a
MS or Windows specific newsgroup, or on Borland's ones for their
utilities; for Unix and Unix-like utilities try a newsgroup with unix in
the name or search for Cygwin for Unix-like utilities under Windows...)

Chris C
 
A

adirajuv

Seems like everyone agrees, writing the code from scratch would be the
best thing to do.

Thanks for the input.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top