1

Is it possible to reverse the compiled code using a compiler?
I have a compiler in the form of exe and using it I can compile the file. But there is no possible instruction I got to decompile a file.
I want to know what are the possibility of getting a decompiled source code from the compiled version?
Are there any methodology or tools that would help in making it possible?
Please share your insights.

  • 1
    if you can add details about the specific compiler you have, a concrete example may be easier to answer than something abstract. – Igor Skochinsky Nov 13 at 13:00
  • @IgorSkochinsky If I add the specification of the compiler, I bet no one will even care to answer in abstract ways what they are trying to answer. – Jaffer Wilson Nov 14 at 5:58
3

No. In most cases, you cannot obtain the actual source code just because you have the compiler available.

However, it depends on the language. If the source code was written in .NET, for example, a decompiler such as dnSpy or ILSpy can produce relatively accurate source code. However, if it was written in C/C++, for instance, then it will be harder to decompile and the decompiled result will not be as close to the original source code. Some decompilers that work for C/C++ are retdec and Ghidra.

  • Is there nothing we can do in sequence that would give a clue of what is happening and what must be done? – Jaffer Wilson Nov 12 at 3:38
  • @JafferWilson check this for some options – Igor Skochinsky Nov 12 at 21:43
  • @IgorSkochinsky Thank you for sharing. I guess this is one of the wonderful ideas. I will upvote for that... :) – Jaffer Wilson Nov 13 at 3:43
0

Usually, it's not possible.

You should use external tools like ghidra or IDAs decompiler - hex-rays.

Not the answer you're looking for? Browse other questions tagged or ask your own question.