I've spent about a month trying out Ghidra, IDA and BinaryNinja and I'm somewhat frustrated
I need to transform decompiler's output without changing resulting code's behaviour (i.e. to make it more readable, more aesthetically pleasing, less cluttered)
But it seems that these tools are primarily for interacting with assembly, despite waving the name "decompiler" around.
None of the three provide any UI facilities to transform pseudocode. For example consider some trivialities:
- None of them can help with transforming while-loop into for-loop
- None of them can help transform nested-ifs into early returns
- None of them are even able to switch if-else blocks around by inverting the condition
It feels like a lot of UX is spent making editing programs easy - e.g. right clicking if-condition in BinaryNinja allows one to invert it /in the program/.
But any sort of "advanced decompiling" is severely lacking
I feel like straight up giving up - pressing "decompile all", getting moderately awful result and continuing with normal text editor/IDE
Are there any tutorials/plugins/straight up different programs that can maybe help?