Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 08-01-2002, 11:14 PM   #1
Member (6 bit)
 
prez's Avatar
 
Join Date: Apr 2002
Location: Malaysia
Posts: 60
Send a message via ICQ to prez Send a message via Yahoo to prez
viewing C source

how do i view a particular .exe file's source codes. what program do i need?
im using turbo c++ and djgpp. can both of these programs extract the C source??
prez is offline   Reply With Quote
Old 08-01-2002, 11:24 PM   #2
Member (13 bit)
 
DrZaius's Avatar
 
Join Date: Jul 2000
Location: Fullerton, CA
Posts: 7,030
Hi prez,

In order to view the source of EXE files you would need to de-compile it, which is a very complicated procedure, and the program may not have even been written in C. Once it has been compiled, it's impossible to get the original source files back.
DrZaius is offline   Reply With Quote
Old 08-02-2002, 01:17 AM   #3
Member (6 bit)
 
prez's Avatar
 
Join Date: Apr 2002
Location: Malaysia
Posts: 60
Send a message via ICQ to prez Send a message via Yahoo to prez
i know that the exe file is written in C. So whats the precedure to de compile it??
prez is offline   Reply With Quote
Old 08-02-2002, 07:19 AM   #4
Member (10 bit)
 
Join Date: Apr 2001
Location: Michigan
Posts: 850
Send a message via ICQ to HackinCowboy
There's been rumors that there are a few C/C++ decompilers out there, but I've never actually seen any or known someone who has. Also, if you think about the structure of a compiled C program it seems almost impossible to decompile it.
HackinCowboy is offline   Reply With Quote
Old 08-02-2002, 08:05 AM   #5
Professional gadfly
 
doctorgonzo's Avatar
 
Join Date: Jan 2002
Location: Minneapolis, MN
Posts: 6,364
Send a message via MSN to doctorgonzo
Decompiling a program is next to impossible. There are infinite ways to write a program to do any one particular thing; even something as simple as a "Hello, world!" program. Trying to figure out which one of those infinite varieties you have with the executable is extremely difficult.
doctorgonzo is offline   Reply With Quote
Old 08-03-2002, 04:19 PM   #6
Member (12 bit)
 
Paul Victorey's Avatar
 
Join Date: Mar 1999
Location: MN or WI
Posts: 3,017
I've used some "C++ decompilers", but they give horrid results.

Most of the things we take for granted, like meaningful variable names and comments are gone. Classes and objects sometimes almost look OK, but then you get things like:

class c032468765 {
private:
int i098754309;
float f664590954;
public:
void F4287983932(int i35436, int i654927);
};

Personally, I find it easier to disassemble and work with it in assembly.
Paul Victorey is offline   Reply With Quote
Old 08-03-2002, 04:36 PM   #7
Banned
 
Join Date: Jul 2002
Posts: 257
Paul you got any tips for me im trying ro learn assembly?
Justin26k is offline   Reply With Quote
Old 08-04-2002, 10:45 PM   #8
Member (12 bit)
 
Paul Victorey's Avatar
 
Join Date: Mar 1999
Location: MN or WI
Posts: 3,017
Best tip is start out not by reading others' stuff, but by working with examples and writing them yourself. A good book can be worth a thousand hours without.

Assembly languages tend to be easier to write than to read (unlike many higher-level languages). It's often easier to figure out how to do something than it is to figure out what someone was trying to do, because almost every task takes a lot of commands to complete, as the commands are pretty basic.

So, get a good assembler, a good book, and try out the examples. Comment your source files very well, because if you don't, it's hard to figure out what you were doing, at times.
Paul Victorey is offline   Reply With Quote
Old 08-04-2002, 11:25 PM   #9
Banned
 
Join Date: Jul 2002
Posts: 257
I am using MASM as I assembler could you recommend a book?
Justin26k is offline   Reply With Quote
Old 08-04-2002, 11:35 PM   #10
Member (12 bit)
 
Paul Victorey's Avatar
 
Join Date: Mar 1999
Location: MN or WI
Posts: 3,017
MASM's a good assembler... man, it's been so long (probably about 10 years) since I purchased books on assembly, though, I can't even make a recommendation.

You can check out Amazon.com, they have a section for assembly language, you can ty to use their reviews to help you.
Paul Victorey is offline   Reply With Quote
Old 08-06-2002, 01:56 AM   #11
Banned
 
Join Date: Jul 2002
Posts: 257
Ok Thanks Paul I would ask for a website but it's been ten years so you probably dont know any them either?

Thanks Again
Justin26k is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 12:21 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2