We help IT Professionals succeed at work.

How to convert MFC EXE to source code

pvschandu
pvschandu asked
on
Hi all,

We have executable but unfortunately we lost source code(workspace folder).

Could any one help us in converting executable to original source code. is there any tool for this. This is MFC exe.

I know tools for converting jave exe(application) to source. I could not able to find in google for this.

ur help is appreciated.

Thx
chandu
Comment
Watch Question

Commented:
I don't think that there is any way to convert C++ EXE file to source code.
there is no way to convert a C++ EXE to source code.
You can convert it to ASM, but that won't do you much good (too much to handle).
Commented:
"No way" is a strong term.  And it is also false.  The correct answer is that there is a way but it's hard and a lot of work.  Getting from an EXE to an ASM file is fairly straightforward with products like IDA Pro.  But getting from ASM to C or C++ source code is much more challenging.  There are some tools out there, mostly university research projects, but the results are less then spectacular.

It's a lot simpler in Java since the Java language compiles to "P-code" or pseudo-code and there is virtually a 1:1 correspondence between Java source code constructs and Java "P-code" constructs.  So working backward is almost trivial.

C++ is much more complex than Java and starting from an EXE is also an added level of complexity.

Commented:
Hi!
I agree with jhance. IDA pro can automate lots of MFC features - such as message maps RUNTIME class info so you can get app sceleton for MFC app. (Debug information can be very efficient for such job). What size of your exe file?
I wouldn't try - the time to do this will take far too much time and you could rewrite the app quicker
This question appears to have been abandoned. Your options are:
 
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you. You must tell the participants why you wish to do this, and allow for Expert response.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question. Again, you must tell the other participants why you wish to do this.

For special handling needs, please post a zero point question in the link below, include the question QID/link.
http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click this Help Desk link for Member Guidelines, Member Agreement and the Question/Answer process:  Click you Member Profile to view your question history and keep them all current with updates as the collaboration effort continues.
http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

To view your open questions, please click the following link(s) and keep them all current with updates.
http://www.experts-exchange.com/questions/Q.20187452.html
http://www.experts-exchange.com/questions/Q.20191819.html
http://www.experts-exchange.com/questions/Q.20239487.html


PLEASE DO NOT AWARD THE POINTS TO ME.  
 
------------>  EXPERTS:
 
Please leave any comments regarding this question here on closing recommendations if this item remains inactive another three days.
 
Thank you everyone.
 
Moondancer
Moderator @ Experts Exchange


P.S.  For year 2000 questions, special attention is needed to ensure the first correct response is awarded, since they are not in the comment date order, but rather in Member ID order.
CERTIFIED EXPERT

Commented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Answered by jhance
Please leave any comments here within the next four days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

khkremer
EE Cleanup Volunteer
HOw can i convert exe written in Basic to source???