What tools produce C code that does not produce errors when you try to recompile it again? Can Hex-Rays decompiler convert everything to project files in a single folder and just compile it?
-
1Regarding the limitations of machine-code decompilation, see this answer: reverseengineering.stackexchange.com/questions/311/…– Rolf RollesAug 9, 2013 at 22:02
-
1There have been a long story already on this topic as SO. Better to look through: stackoverflow.com/questions/273145/…– T.ToduaJan 17, 2017 at 11:28
1 Answer
The primary purpose of decompilation is not to produce code that is compiled back with no errors, but rather recover logical flow of a binary. Hex-Ras Decompiler comes with its own set of limitation noted in Hex-Rays Decompiler Manual, to mention few:
Below are the most important limitations of our decompilers (all processors):
* exception handling is not supported
* type recovery is not performed
* global program analysis is not performed
-
My question was: Is there any decompiler that produces code that can be recompiled easily?– user8005Aug 9, 2013 at 15:16
-
@user8005: Your question is and I quote: "...does not produce errors when your try to compile it"... There is no tools like that.– PSSAug 9, 2013 at 15:18
-
-
3
-
In fact, it would be trivial to produce cleanly compiling C code that simply inlines any questionable assembly code that it can't understand. As PSS points out, recompilation is not the point of decompilation. Aug 13, 2013 at 10:56