Using ChatGPT to clean up bad decompiler output seems to work quite well! Left: original Ghidra decompilation; right: cleaned up version, with an explanation for why it's better.
Dec 16, 2022 · 8:24 PM UTC
Strong showing on renaming variables too -- I wonder how well this compares to work like usenix.org/system/files/sec2…
Ironically, the hardest part might be getting it not to fix security bugs it finds along the way. Here it noticed a potential UAF (intentionally placed!) and added a strdup to fix it.