0

I would like to decompile a 32bit linux executable to C, modify some parts of it, and then compile it back. I do not care if the C code is not pretty and really hard to maintain. The only thing I care is to be able to compile it back to a 32bit executable.

The program was written in C++ around 2006, but the source code was lost since then. It is not a small program, and it uses some dynamically linked libraries as well.

I tried Boomerang and Avast RetDec. None of them is able to provide a compilable result, but the one RetDec provides, is sometimes surprisingly readable. Unfortunately I can not use this output to rewrite the project, because the code is really long. That is why I am looking for a way to produce compilable C code in the first place.

  • 2
    How complex are the changes you need to make? It might be more practical to identify the parts you need to change and patch the existing binary rather than try and recompile everything. – Rup Mar 11 at 11:02
  • I wonder if such a decompiler is even possible – julian Mar 15 at 3:52
3

Unfortunately no, there is no such decompiler publicly available. All decompilers have to guess the missing information and just one wrong answer is enough to spoil the result. Second, re-compilability is often not the goal.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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