I found this amusing, from a Java perspective. The 3-character command-line options are also very "not Java-ish". However, since this one is also written in Java, a good test is if it can decompile itself perfectly and the result recompiled to a matching binary; much like how bootstrapping a compiler involves compiling itself and checking for the existence of the fixed-point.
One day I was using ghidra to decompile something to find out how it works, and the LLM helped a lot. It was a game changer in refactoring of the decompiled assembly-that-looked-like-c language.
As far as I can tell (although I"m a novice at RE), in the native world all non-trivial decompilers are "analytical", doing things like control-flow recovery and such. I guess the only reason why the first java decompiler was "non-analytical" is that the bytecode (at least in early days) was simple enough that you could basically pattern-match it back to instructions.
So if I'd have to give a definition I pulled out of my ass:
* non-analytical compiler: "local", works only at the instruction or basic-block level, probably done by just pattern matching templates
* analytical: anything that does non-local transformations, working across basic-blocks to recover logic and control flow
20 comments
[ 2.6 ms ] story [ 40.6 ms ] threadI found this amusing, from a Java perspective. The 3-character command-line options are also very "not Java-ish". However, since this one is also written in Java, a good test is if it can decompile itself perfectly and the result recompiled to a matching binary; much like how bootstrapping a compiler involves compiling itself and checking for the existence of the fixed-point.
[0]: https://thejunkland.com/blog/using-llms-to-reverse-javascrip...
[1]: https://github.com/jehna/humanify/blob/main/README.md#exampl...
That really deserves a link. What is an “analytical” decompiler?
So if I'd have to give a definition I pulled out of my ass:
* non-analytical compiler: "local", works only at the instruction or basic-block level, probably done by just pattern matching templates
* analytical: anything that does non-local transformations, working across basic-blocks to recover logic and control flow
Over in .NET land, dnSpy (https://github.com/dnSpyEx/dnSpy) works very well, even on many obfuscated binaries.