# AI Agents Decompile a First-Person Shooter with 500 Billion Tokens

Original title: 500B Tokens Later: Letting AI Agents Decompile a First-Person Shooter

> Hacker News story 50039092 · language: en · submitted 2026-10-11
> Web version: https://zeli.app/story/50039092
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 208 · by [davikr](<https://news.ycombinator.com/user?id=davikr>) · 💬 149
[original](<https://momo5502.com/posts/2026-10-09-game-decompilation/>) · [HN discussion](<https://news.ycombinator.com/item?id=50039092>)

## Summary

Over three months, I orchestrated AI agents to decompile a popular first-person shooter into readable C++. We used Claude and Codex models, managed progress via GitHub issues, and enabled agent communication through Discord. After initial success, we discovered semantic errors and architectural drift. Switching to byte-matching verification with the original compiler ensured correctness, allowing cheaper models to scale. The result: 99% of functions reconstructed, 83% byte-exact, and a fully playable game.

## Key quote

> The workers’ comments effectively acted as unintentional prompt injection: the reviewer accepted their justifications instead of independently checking the deviations against the original.

## HN discussion (149 comments)

### [sailingparrot](<https://news.ycombinator.com/item?id=50049444>)

> 500B Luna tokens, just for a little fun experiment, which they'll never be able to share widely for very obvious trademark reasons. Even if they could share, not sure exactly what the point would be.
>
> Side projects can be cool and fun even if they have no points to them. Sometimes it's even better when there is no point.
>
> But 500B Luna tokens, that's about 15 SF -> London round trips, or the average CO2 equivalent emissions of an american for about 15 months, based on napkin maths assuming average US energy mix to power the DCs.
>
> Was it really worth it? Should we all start buring 18 tons of CO2 just because we came up with a fun little experiment idea? Should a side project really pollute as much as your neighbor's entire life for more than a year?
>
> I know worrying about climate change is not trendy anymore but there as to be a limit to the amount of not-caring one can have, surely?
>
> Congrats, i guess.

### [brandonpelfrey](<https://news.ycombinator.com/item?id=50039262>)

> Unless you explicitly need byte-matching decompilation, there are significantly faster ways to produce a decompilation/C which is functionally equivalent. I need to post about this. What's been working for me is that for every function, Agent A is tasked with writing some code which is semantically equivalent to the original assembly, but not necessarily exactly the same. Agent A also writes tests. Agent A submits the implementation of the function and tests to the harness for it to judge. The harness runs both the original function and the submitted function in a virtual machine/simulator/emulator (the tests define function inputs and starting state). The harness will only accept the implementation if 1) the read/write sequence to RAM is identical to the original function's, and 2) there must be complete line and branch coverage of the original function being decompiled.
>
> I've found this to be robust for decompiling games, while giving the agents enough freedom to write code that is readable and not waste a ton of time making sure e.g. instruction ordering, register assignments, etc. are all exactly the same. For me, having byte-matching decompilation is only one way to produce a decompilation I know is faithful to the original. This "high-level decompilation" process I just described is something agents can do much more quickly.

### [aetherspawn](<https://news.ycombinator.com/item?id=50039491>)

> The reason this cost so much is because the AI has the ridiculous goal of getting identical assembly output.
>
> The agents would have had to mess around with compiler versions, optimisation options, and the phase of the moon as well.
>
> If you just went for functional equivalence, it would probably cost 10x or 100x less tokens.
>
> Another false economy was using Sonnet instead of a more intelligent model like Sol 6.1 (1), which would have cost more per token, but is 100x or so better at reverse engineering and coding and therefore can chew through the source code much quicker and make fewer mistakes, meaning less work needing to be scrapped.
>
> In my testing doing a similar task, I ran multiple sonnet for weeks and burnt through ~$1000 in tokens to get 20% completion and output that was pretty bad. After switching to Sol 6.1, it finished the whole task in around 2 days, cost around $50, and it did it with zero supervision and a single /goal.
>
> (1): struggle to use Opus for reverse engineering, too many safeguards. OAI has virtually none, and uses way less tokens so is more economical.

### [nvme0n1p1](<https://news.ycombinator.com/item?id=50039604>)

> \> The avid reader of my blog might have noticed that I had previously written two posts that have since been removed. Everyone else might now be wondering which game I am talking about. To both of you I can only say that corporate America was here to ruin our fun.
>
> Call of Duty: Modern Warfare 2 (2009)
>
> https://web.archive.org/web/20260925153118/https://momo5502....
>
> https://web.archive.org/web/20260925153131/https://momo5502....
>
> Come at me, corporate America.

### [ChoosesBarbecue](<https://news.ycombinator.com/item?id=50049020>)

> It’s probably worth noting that the author is decompiling a game that he’s had ~10 years of experience modding. And has been involved in finding vulnerabilities in [0].
>
> [0]: https://github.com/momo5502/cod-exploits

### [jakubmazanec](<https://news.ycombinator.com/item?id=50049075>)

> \> Architectural decisions were not questioned, as long as they aligned with the goal.
>
> Yes, that's the main problem I'm having with agentic workflows. Sometimes you don't care about architecture of something if it just works, but more complex stuff can't work well without good architecture. And currently it seems that there is still no substitute for good human taste.

### [stevefan1999](<https://news.ycombinator.com/item?id=50042973>)

> Reverse engineering dynamic dispatches like vtable and fat pointers/slices and traits would be hell. Different padding and compiler settings also contribute a lot.
>
> One of the few problem is that the decompiler is not always reliable. That forces you to go read the assembly, and it is not apparent to decipher the right kind of feng shui, not even from human before the LLM era. I used to play CTFs and my conclusion is exactly that.
>
> This is extremely apparent when there are self-modifying code (e.g. JIT) is involved. You need a stepping debugger to read the right control flow, because the code will diverge based on the instruction pointer and regions you jumped into. At this point static analysis like IDA and Ghidra stopped working.

### [edg5000](<https://news.ycombinator.com/item?id=50039623>)

> I sense the approach overcomplicates things. I wonder how long this would have taken in a single session. Maybe this is actually a textbook example of something where subagents make sense, but when I first started LLMs I was often overcomplicating the workflow with all kinds of orchestration. Now I just use one agent, it better allows controlling the output even if the agent works slightly longer. Most time is spent by me writing prompts and reviewing work anyway (for me at least).

---

## Cite

- Page: https://zeli.app/story/50039092
- Date: 2026-10-11
- Source: momo5502.com (https://momo5502.com/posts/2026-10-09-game-decompilation/)
- Hacker News: https://news.ycombinator.com/item?id=50039092

## Other languages

- zh: https://zeli.app/zh/story/50039092 · markdown: https://zeli.app/zh/story/50039092.md
- ja: https://zeli.app/ja/story/50039092 · markdown: https://zeli.app/ja/story/50039092.md
- ko: https://zeli.app/ko/story/50039092 · markdown: https://zeli.app/ko/story/50039092.md
- de: https://zeli.app/de/story/50039092 · markdown: https://zeli.app/de/story/50039092.md
- es: https://zeli.app/es/story/50039092 · markdown: https://zeli.app/es/story/50039092.md
- ru: https://zeli.app/ru/story/50039092 · markdown: https://zeli.app/ru/story/50039092.md
