Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 298
  • Last Modified:

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.
0
Starr Duskk
Asked:
Starr Duskk
3 Solutions
 
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
 
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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now