Decompile C executable, Reverse Engineer

Posted on 2011-10-29
Last Modified: 2012-05-12
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.

Question by:BobCSD
    LVL 31

    Accepted Solution

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

    Here are some disassemblers
    LVL 31

    Expert Comment

    LVL 39

    Assisted Solution

    There are quite a few decompilers for C if you search for them. For example, this one looks nice.

    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).
    LVL 7

    Assisted Solution

    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.
    LVL 1

    Author Closing Comment


    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    This tutorial is posted by Aaron Wojnowski, administrator at  To view more iPhone tutorials, visit This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
    Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode ( They will have you believe that Unicode requires you to use…
    The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.
    The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now