u/HummingbirdWatch149

▲ 156 r/decomps

My experience with a manual decompilation: this shit is harder than I expected

So... after all the controversy around AI-assisted or vibe-coded decompilations, I decided to do a little experiment: learn how to decompile a game on my own, with AI not doing the actual decompiling process but just teaching me how to do it by myself.

A little context, I'm a software developer, but my knowledge doesn't come anywhere close to that of the programming and reverse engineering geniuses who populated these communities until a couple of years ago, before the AI boom.

I picked a Nintendo DS game and asked an AI to teach me the basic concepts I was going to need for the task. Even though it was at a relatively superficial level, I learned about the Nintendo DS architecture, the different file types it uses, and their basic structure. Hell, I didn't even know the most basic stuff, that console had two processors, an ARM9 and an ARM7.

Anyway, once we performed the initial extraction and disassembled the binaries to obtain assembly code, the real task began: converting that assembly into C code that, once recompiled, would reproduce the original binary.

Well, I spent the next six hours reading assembly code (for the first time in my career I put to use that dormant skill I learned in computer architecture classes at college lol). After deducing the first functions, which barely had between 3 and 8 lines, Claude told me that those were precisely the ones that could be inferred more or less automatically. What we had done was little more than a playful exercise. I don't even want to mention what it took to find the specific compiler used in that game and the specific configuration (after a while, I gave in and let Claude lend me a hand with that), but oh well.

The actual hard work would come when we had to face functions with 700 instructions or more. Completely ridiculous.

The worst part of all? This only corresponded to the disassembly and decompilation process. If my goal was to use that source code for something useful, like a mod or a port, there was still reverse engineering work left: control flow analysis, symbol naming, data structure reconstruction, documentation of the game's behavior, etc.

Really, this exercise of a little under ten hours puts into perspective how incredible the people who did decompilations were when none of the current conveniences existed. But it also makes me think about how absurd it would be to force people to go through the entire process by hand, without the assistance of AI tools. And even more absurd would be to pretend to do it without mastering concepts as basic as the ones I myself didn't know before starting this experiment.

Needless to say, I won’t continue with the decomp attempt. Doing it properly would take more time than I’m willing to invest, and I don’t want an AI doing everything while I have no idea what it’s doing.

reddit.com
u/HummingbirdWatch149 — 4 days ago