954,505 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

c/c++ decompiler

HI, I have exe file writen in c++ or c and wanna decompile it to source code.
Is that possible? If it is, is there any decompilet that can do that?

thanks!

Gigs_
Newbie Poster
12 posts since Jun 2006
Reputation Points: 16
Solved Threads: 2
 

HI, I have exe file writen in c++ or c and wanna decompile it to source code. Is that possible? If it is, is there any decompilet that can do that?

thanks!


Then you must learn assembler. But why do U need it?

andor
Posting Whiz in Training
276 posts since Jun 2005
Reputation Points: 251
Solved Threads: 29
 

hey I lost my source code

Gigs_
Newbie Poster
12 posts since Jun 2006
Reputation Points: 16
Solved Threads: 2
 

HI, I have exe file writen in c++ or c and wanna decompile it to source code. Is that possible? If it is, is there any decompilet that can do that?

thanks!

No, it is not possible to decompile back to C. The best you can do is get the assembly code. Since you lost the source code (and that happened to me a couple times too!) you will just have to rewrite it. That has some advantages because the second write ususlly makes a better program anyway because you already know most of the algorithms needed and you may be able to make them more efficient.

Ancient Dragon
Retired & Loving It
Team Colleague
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 
Is that possible?


It's possible, but very hard and the result won't be good at all. To decompile you need to disassemble into assembly and translate the assembly into C. If you've seen a disassembly, even a good one, you'll know how useless a translation into C would be. There's just too much lost between the original C source and the object code after compilation. You can get better results from reverse engineering the program based on usability. :)

Inanna
Junior Poster in Training
90 posts since Oct 2006
Reputation Points: 53
Solved Threads: 6
 

dude! this is highly illegal!
more over- this action is against the agreement when you've installed ms products. you can be easily get litigate for this. it doesn't matter if this was originally your source code. (nor if the developing-language is an open source one cause the GPL agreement also forbid Reverse Engineering)

eladkarako
Newbie Poster
5 posts since Sep 2006
Reputation Points: 10
Solved Threads: 0
 

Not only did you bump a long-dead thread, everything you said is way off base.
http://en.wikipedia.org/wiki/Reverse_engineering is specifically allowed in some cases, say interoperability. You wouldn't have a vast choice of PCs nowadays if someone hadn't RE'd the original IBM BIOS to produce a clone.

Likewise (for those with short memories), some non-Y2K code had to be RE'd in order to be fixed.

> it doesn't matter if this was originally your source code.
This of course is rubbish. It was your code, so what's the problem?

> nor if the developing-language is an open source one cause the GPL agreement also forbid Reverse Engineering
And this makes no sense whatsoever. If it's GPL, you have the source anyway, therefore there is no need to reverse engineer anything.
But if you want to try just for fun, I doubt anyone would stop you from trying.

Salem
Posting Sage
Team Colleague
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You