• C

Decompile C executable, Reverse Engineer

I wrote some games years ago using C programming language (1986). My original source code is lost, but I have the executables.

How can I decompile the .exe back to C (or any other language if that's possible? doesn' it have to go back to the original language?) Is this also called reverse engineering?

I was thinking these simple games would make great games for wireless phones with some updated tweaking.

Thanks.
LVL 2
Starr DuskkASP.NET VB.NET DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

farzanjCommented:
IMHO, you can go as close to getting disassembly.  You cannot generate your original C code from the executable

Here are some disassemblers
http://en.wikibooks.org/wiki/X86_Disassembly/Disassemblers_and_Decompilers
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
farzanjCommented:
0
evilrixSenior Software Engineer (Avast)Commented:
There are quite a few decompilers for C if you search for them. For example, this one looks nice.
http://download.cnet.com/C-Decompiler/3000-2218_4-10969943.html

Unlike C++, it is possible to decompiler C code to something sensible; however, all the original variable names will be gone and the code is unlikely to resemble the original code due to compiler optimisations (amongst other things).
0
HellmarkLinux Systems AdministratorCommented:
Also, it is impossible to obtain any comments you had in the original code.

Most decompilers work by converting the machine op code to assembly, and some then can convert that to another language. C++ & other more complex high level languages do not cleanly decompile. C however, has some things that aren't quite so difficult to work with, and so you'll have higher chance of getting decent code out of it. Also, given the age of the executables, you're less likely to have optimization, which will make it easier to get good code out, and I'm assuming this is DOS based so the lack of GUI components will reduce difficulty.

I'd check out REC, Boomerang, or DCC. Here is a page of other resources you may want to look at. DCC is older (methods may not make as nice of output as the others), but designed to work with DOS. The others should work, but I've not used them with DOS binaries, so your milage may vary.
0
Starr DuskkASP.NET VB.NET DeveloperAuthor Commented:
thanks!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.