Hacker News new | ask | show | jobs
by teaearlgraycold 54 days ago
It's easy to train LLMs to decompile code. All you need to do is take the source code from existing training data and compile it. Then you swap the order and show it the compiled code, then the original, and judge it by how well it predicts the original.
1 comments

I imagine this would go far, but also note that the variety of compilers used over the last 30 years of game dev would make this not so obviously generalizable.
Actually, you'd be surprised! For something relatively modern, it's MSVC or GCC, you only need to pin the version. Which you can do by bruteforcing a few functions with different compiler versions / flags until they match.

For very modern stuff it might even be clang. Also easy to detect. For really old stuff (90s and older) there's a lot of diversity yes but the programs are so small it isn't a real challenge. By the time programs got so big as to make manual reversing infeasible, the compiler landscape has consolidated;)