logoalt Hacker News

jackpriceburnstoday at 4:24 AM1 replyview on HN

Most games will have been written in a higher level language first (like C or C++) and then compiled into assembly. With matching decomp, we write C, compile it to assembly, and see how much it matches the retail assembly. Using this we can write C that we theorise is almost identical to how it would have been written originally. There are things lost during the compilation process (like comments, function names, etc) these we have to name manually and it's a long process to do! But yes, the goal is to have C at the end and once you have C you can recompile using a different compiler and target any architecture you like


Replies

teaearlgraycoldtoday at 4:29 AM

I suspect LLMs would do a good first pass with function naming.

show 1 reply