473,508 Members | 2,342 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 7830
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
2076
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
1902
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
1013
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
2235
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
3247
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
1000
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
943
by: itsmesrini85 | last post by:
Hi' i need a jar file "TagSys.jar". If any of you have that file, pls reply.. Thanx
2
1804
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
2026
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
1440
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
7229
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
7129
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
7333
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,...
1
7061
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7502
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5057
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4716
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3194
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
428
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.