We help IT Professionals succeed at work.

A tool for generation of source

s_lavanya_77 asked
Is there any tool for generating the source from the exe or dll under windows platform?
Watch Question

Hi s_lavanya_77,
    There is no tool available, that gets c++ source from dll, or exe.
    I think it is impossible


You already have the source.  Of course, it's machine code  ;-)

The process of compiling removes any possibility of regenerating the original source.  All comments are stripped, the preprocessor does its bit (by which time you've already lost a fair bit of the use of having the source code), and that's before the compiler gets it.  Then you have the conversion of each routine to machine code, which if it was literally "replace } with jmp XXX" then you _might_ stand a chance of getting back to the preprocessor's output.  

Oops!  What about virtual functions, templates, objects even?  Artifices of the language, and will not be visible in the compiled code.

And then there's optimisation...

Basically, there is no chance that you could do this.  The best way of checking is seeing if anyone has done it.  If you could get the source code for any program you wanted, people would do it.  They do not.

hi lavanya

There is a tool convert exe to source code. it is in www.hackers.com . this site is for educational purpose only.
but u can get disassemble instructions in a c format .

u cannot get true c code from exe file but u can try with the tool.

Dear s_lavanya_77

I think you forgot this question. I will ask Community Support to close it unless you finalize it within 7 days. You can always request to keep this question open. But remember, experts can only help you if you provide feedback to their questions.
Unless there is objection or further activity,  I will suggest to accept


comment(s) as an answer.

If you think your question was not answered at all, you can post a request in Community support (please include this link) to refund your points. The link to the Community Support area is: http://www.experts-exchange.com/commspt/

Per recommendation, force-accepted by
CS Moderator

Explore More ContentExplore courses, solutions, and other research materials related to this topic.