Using AI To decompile

Anyone tried using AI to decompile older software/video games? Stuff like Wii and Gamecube games have a large community already and there are tons of possibilities with AI helping out. I was just wondering if anyones looked into it
GitHub
GameCube / Wii Decompilation
GameCube / Wii Decompilation has 17 repositories available. Follow their code on GitHub.
19 Replies
wearifulpoet
wearifulpoet4w ago
ghidra-mcp saves me maybe 10% of the time? So sure
NoOneElseWill
NoOneElseWillOP4w ago
What tasks do you work with?
wearifulpoet
wearifulpoet4w ago
I did some gameboy stuff It’s not going to help you do it if you don’t know how but it will speed you up a little bit
NoOneElseWill
NoOneElseWillOP4w ago
Yep fs. Ai ain’t there yet but I still think it could be promising.
msvc
msvc4w ago
not software/videogames but i compete in ctf and i use gemini 2.5pro to help clean up and signature analyze binaries. super helpful if the microarch isn't really supported (e.g. AVR microcontrollers) the thing with decompiling older software/games is that it's generally just easier to write a emulator (that works for all games) than try to port them. AI simply lacks knowledge in this domain, generally because most of this knowledge is siloed away into more private areas of the internet (or not on it at all)
NoOneElseWill
NoOneElseWillOP4w ago
Unfortunately. Altho I think there's quite a few tools already out there that AI may be able to leverage to help it Some things include Decomp Permuter, Objdiff, and others might be able to help AI get to the right area if it understood how to use these tools. Its like if someone could teach claude code or a different toolset to decompile, try to match to 100%, and then figure out where to put said code, I think the system could ve very Exensive but might work? still too many if's but Im sure the future yields good results!
msvc
msvc4w ago
I don't get decomp permuter. A general decompiler will be more accurate to the asm/binary than the actual source code. what is it trying to achieve?
NoOneElseWill
NoOneElseWillOP4w ago
This is the link btw, accidentally sent the "issues" link. It basically tests a ton of different ways a function inputted can be formatted to find the highest matching version of a function. Might not be as useful for an LLM decompiler, but it defo could support in case it gets stuck
msvc
msvc4w ago
yes but from what i can see it requires a source .c file anyway? is using a decompiler not easier?
NoOneElseWill
NoOneElseWillOP4w ago
Something like ghidra yeah probably
cram
cram4w ago
I do contribute to an open source project that decompiles a PSX game, AI helps with the overall logic if it’s too blurry for me, since it’s a binary-match project (and not a « same-functionality » one) we need to actually be perfect on the result, and so work on it by hand, otherwise it did help me when I gave it the target assembly code and current assembly code to see where the mismatch were Most of the time I’ve used AI was for naming the function/variables tho, that’s it It tries random possible things that a human didn’t think about, usually if that’s the case you’ll get an answer within 30s, otherwise you gotta work on a bigger issue than just randomly permuting lines of code and dereferencing pointers
NoOneElseWill
NoOneElseWillOP4w ago
How good is it at renaming functions? Because when I try and use ChatGPT to rename certain things it gets it very wrong. But I imagine you’re using GitHub copilot
cram
cram4w ago
Well it depends on the game and naming conventions I haven’t used it for functions really, mostly variables But then again it requires a deep understanding of the game you’re decompiling The function could be about primitives (PSX ones), a game entity, a wrapper around entities that are only walls, enemies, etc … That’s why you have naming conventions, and ask for name ideas with everyone contributing Decompiling as a small team is already a huge task so I can’t imagine as a solo project PSX is already hard in itself so I can’t imagine GC/Wii Which are the generation after PSX
NoOneElseWill
NoOneElseWillOP4w ago
Not to mention the time investment on top of finding a group of people with great understanding the game. I just think this is generally a task that needs to have more documentation/automation available I’m gonna still look into finding ways to decompile with AI. I still feel like we’re closer then we think, it’s just a matter of connecting the right tools together
cram
cram4w ago
I mean nothing could block you from finding the differences between the target and current asm of your function, then based on that, have the AI compare the right lines (if they’re available) and based on a ton of (your asm architecture) references you could use that to try and solve it Contributors will join if the project is well thought about for open source, have a wiki, explain what’s going on and help new contributors with easy first issues In the end it’s all about fun projects that take time because it’s all reverse engineering of your favorite games, it should never be a chore
NoOneElseWill
NoOneElseWillOP4w ago
Stuff like that is good when you’re not starting a brand new game 😭. Definitely a long shot from where I’m at but since other projects exist and have been completed, I don’t think it’s impossible
cram
cram4w ago
You have multiple resources available online, the Decompals server is probably a good start but mind that my opinion about AI only engages me and no one else in the decomp community 😉
NoOneElseWill
NoOneElseWillOP4w ago
link?
cram
cram3w ago
Right now I don't have a link since it's invite only, I wanna do a quick feedback about Claude code in my case when I tried to use it to decompile a very simple function of a game compiled with optimization flags, and it reached the usage limit in a little under an hour, so it's currently not built for it at all 😂 (without getting the right target code)

Did you find this page helpful?