473,387 Members | 1,789 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Need to View the contents of an EXE file

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

Nov 14 '05 #1
6 7827
Currently there are no tools that does this. For java there are
decoders but definitely for an c++ executable.

Nov 14 '05 #2
Currently there are no tools that does this. For java there are
decoders but definitely not for an c++ executable.

Nov 14 '05 #3
On 12 May 2005 01:01:29 -0700, in comp.lang.c , ad******@gmail.com
wrote:
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.
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Nov 14 '05 #4
ad******@gmail.com wrote:

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.

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson

Nov 14 '05 #5
On 12 May 2005 01:01:29 -0700, ad******@gmail.com
<ad******@gmail.com> wrote:
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
Nov 14 '05 #6
Seems like everyone agrees, writing the code from scratch would be the
best thing to do.

Thanks for the input.

Nov 14 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jon Pope | last post by:
Is it possible to view the contents of a CHM file within IE? I've attempted to do this by right-clicking on a CHM file then selecting "Open With..." and finally selecting "IE", but nothing...
3
by: Joe | last post by:
Hi, I have written a webpage that allows a user to delete files in asp.net with I am having a small problem. To access this page a user has to login via login.aspx page. After successful...
1
by: asad | last post by:
hello, how ru all, I have contents(website links) file which i want to inlcude in all of my application. Contents are coming from database through an aspx page but when i'm include this file in...
7
by: The Cool Giraffe | last post by:
Please note that i do intend to use a header file. However, i'm not sure if it's really needed or just a convention. Suppose we have the following two files. // Something.h class Something {...
0
by: ramyass | last post by:
Hi all, I have SQL Server 2000 installed on my PC. A database has been created and i need to view the contents of LDF file. It would be great if any one of you let me know how to view the contents...
0
by: meettapan | last post by:
Anyone please help me that How can i retrieve the contents of PDF file which are stored in a database as BLOB datatype, and open that pdf file to view using ASP.NET 2.0 web application With...
0
by: itsmesrini85 | last post by:
Hi' i need a jar file "TagSys.jar". If any of you have that file, pls reply.. Thanx
2
by: DDD | last post by:
I have a web site project using C#. If I release the web site in the VS2005, all works well except that DLL file name has some strange, name APP_Code_erwer234.dll. And erwer234 is a random string....
2
by: beary | last post by:
Hello everyone, I posted this in unix/linux but it received no replies, so I assume it was the wrong forum. I'm trying here. I'm in way over my head with file permissions. The directory and...
2
by: freddukes | last post by:
Okay... I'm a PHP noob but I have a good background in C++ and Python... Now all I want to do is iterate through the following file, and appending all products to an array, with information stored...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.