# AI Decompiling Games: Tools, Examples & Limits

Canonical page: https://aibrowsergames.org/ai-decompiling-games/

AI decompiling games: How reverse engineering works

By AI Browser Games editorial team. Sources reviewed: 2026-10-10.

Real projects. Measurable results. A clear path from compiled code to playable ports.

AI decompiling games means using models to help interpret compiled programs, reconstruct functions, or operate reverse-engineering tools. A model can suggest useful code; compilers, comparisons, tests and reviewers establish what that code actually does. A readable function is one step toward a faithful game, and a browser port adds another layer of engineering.

Searching for “AI reverse engineering games”? Start with the project’s input, technical route and evidence. This guide follows documented work on Sonic Advance 3, LEGO Star Wars: The Complete Saga and Modern Warfare 2, then explains tools, matching percentages, game mashups and browser integration.

## Can AI really decompile games?

Yes, AI can assist with game decompilation. The useful unit of work is often a function or subsystem: explaining a loop, proposing a structure, translating instructions into C, or revising code after a compiler reports a difference. AI decompiling games becomes more convincing when the project exposes those intermediate results and its validation method.

The input matters. Debug symbols, identifiable library calls, known compiler behavior and previously reconstructed functions can give an assistant valuable context. Stripped or optimized code can be harder to interpret. Rebuilding an existing engine from documented behavior is also different from recovering source that matches its original machine code.

Recent ports and mashups make the results visible: players can see familiar worlds running in a new environment. But AI decompiling games is part of a longer history of community reverse engineering. Read the acknowledgements: earlier format readers, engines and decompilation work may be essential foundations.

### A useful first question

What did the project start with: an executable, published source, an existing community reconstruction, or observed gameplay? That answer changes what “AI rebuilt this game” can reasonably mean.

## AI decompiling games: real examples

These examples illustrate different routes for AI reverse engineering games. The figures below describe a particular contribution or published experiment. We reviewed their sources on October 10, 2026; we have not independently built or played these projects.

### Sonic Advance 3 · Marun

Matching a game module. 33 commits merged.

GitHub PR #4 was merged on January 31, 2025. Its history includes decompiled functions, code-quality fixes, reviewer feedback and a commit thanking DeepSeek. It is a concrete record of iterative AI-assisted work inside a community project.

The result covers one enemy module, not an entire game. The commit count measures the contribution history, not AI accuracy or development speed.

[Inspect the merged PR and reviews](https://github.com/SAT-R/sa3/pull/4)

### opensaga · The Complete Saga

Matching decompilation + web experiment. Android x86 target.

The saga repository targets the Android x86 release of LEGO Star Wars: The Complete Saga. Its project FAQ documents substantial AI-agent use and an experimental browser build that needs the player’s own assets. AI decompiling games here has a specific binary and an explicit matching goal.

The reconstruction is ongoing. An experimental web build is not evidence of complete gameplay or universal browser compatibility; the portable successor is a separate project.

[Read the saga repository and project documentation](https://github.com/opensagadev/saga)

### IW4L · Modern Warfare 2

New engine implementation. Gameplay incomplete.

IW4L implements an experimental Rust runtime using Bevy and wgpu. The README states that an LLM wrote the project, credits earlier community tools, and reports Ghidra use to inspect original binaries. It loads maps, models and other data from an owned MW2 installation.

The authors list missing behavior, bugs and desyncs. This is a new implementation with incomplete gameplay, not a claim to recover the original source project. Its documented desktop build is not a verified browser port.

[Check IW4L’s scope and acknowledgements](https://github.com/vladtrc/iw4L)

### Give the earlier work credit

For AI decompiling games, a source trail is more informative than a viral clip: identify the original game, the reconstruction project, the upstream tools and the people who reviewed the contribution.

### AI decompiling games, step by step

[Will AI Reverse Engineer my Game? | GPT-5 + GhidraMCP + 5ire](https://www.youtube.com/watch?v=WBTyE1eac_s) — jeFF0Falltrades.

Follow a game-specific experiment using GPT-5, GhidraMCP and 5ire. The creator starts with a small game he wrote, analyzes individual functions and the main loop, then revisits The Sims. Use these chapters to follow the analysis process.

Game analysis experiment: the video description and chapter list document a toy game and a Sims test, not complete recovery of a commercial game’s source project.

- [30:53: Load the game into Ghidra](https://www.youtube.com/watch?v=WBTyE1eac_s&t=1853s)

- [33:44: Analyze createExplosion()](https://www.youtube.com/watch?v=WBTyE1eac_s&t=2024s)

- [56:09: Analyze the main game loop](https://www.youtube.com/watch?v=WBTyE1eac_s&t=3369s)

- [1:09:17: Revisit The Sims](https://www.youtube.com/watch?v=WBTyE1eac_s&t=4157s)

## Decompilation, reverse engineering and recompilation

Reverse engineering is the broader task of understanding a system from its existing program, data or behavior. Decompilation is one technique within it. When discussing AI decompiling games, identify the route before deciding what a demonstration proves. None of these routes inherently requires AI.

Different routes to understanding or running a game

| Route | Starting point and result | What to check |

| --- | --- | --- |

| Decompilation | Compiled instructions → a higher-level representation or reconstructed source. | Whether the output is reference pseudocode or a buildable implementation. |

| Matching decompilation | Reconstructed source → the target machine code under specified build conditions. | Target version, compiler, flags and scope of the match. |

| Static recompilation | Original instructions → code that can be compiled for a new environment. | Platform integration and compatibility. Read [N64Recomp’s implementation](https://github.com/N64Recomp/N64Recomp). |

| Emulation | An implementation of the relevant original hardware or environment runs the game program. | Supported system behavior and the game’s original data requirements. |

| Source port | Available source → an implementation adapted to another platform. | Where the source came from. [DOOM’s published source](https://github.com/id-Software/DOOM) is one independent starting point. |

| Engine reimplementation | Formats and observed behavior → a new runtime, often loading existing assets. | Which systems are reproduced, changed or still missing. |

| Remake or fan recreation | A game’s design or experience → newly implemented content. | Content scope and differences from the original game. |

### Matching does not recover the author’s exact text

Different source expressions can produce the same machine code. A successful match does not recreate original comments, variable names or project organization.

## How decompiling games with AI works

A practical workflow for AI decompiling games creates a feedback loop. The assistant proposes a change; analysis tools, compilation and targeted checks supply evidence. Keep the binary version and build setup fixed so that a difference has a useful interpretation.

1. **Establish the target**: Record the game release, architecture and reconstruction goal. Check existing source, symbols, format documentation and community work before asking a model to infer missing details.

2. **Inspect one bounded piece**: Use disassembly, pseudocode, strings and cross-references to identify a function and its callers. Supply relevant structures and neighboring implementations; keep uncertain types explicit.

3. **Generate a candidate**: Ask the assistant to explain the instructions and suggest an implementation. Require it to distinguish observed facts from inferred names, types and responsibilities.

4. **Compile, compare and revise**: For a matching project, compare the candidate’s generated instructions with the target. For a rewrite, test specified behaviors. Feed concrete differences back into the next revision.

5. **Review and integrate**: Check readability, side effects, data layouts and project conventions. Then run the broader build and relevant regression checks. A local function match is not an integrated port.

### Two different feedback loops

Matching route: instructions → candidate source → compiler → machine-code comparison. Rewrite route: observed behavior and formats → new implementation → behavioral tests. AI decompiling games can assist either route, but the checks are different.

## Tools for AI reverse engineering games

For AI decompiling games, separate the model from the tools it operates. A fluent explanation is a proposal; the binary analyzer, compiler and test environment provide independent feedback. Choose tools around your target and validation goal rather than a universal “best model” list.

Tool roles in an AI-assisted workflow

| Tool or layer | Useful role | Important limit |

| --- | --- | --- |

| [Ghidra](https://github.com/NationalSecurityAgency/ghidra) | Disassembly, decompilation, cross-references, graphing and scripting. | Reference pseudocode is not automatically a complete buildable game project. |

| Claude or another code assistant | Explain output, propose names and types, write candidates and revise after feedback. | An inferred explanation needs checks against instructions and behavior. |

| [GhidraMCP](https://github.com/LaurieWired/GhidraMCP) | Connect an MCP client to Ghidra analysis, decompilation and renaming tools. | A tool bridge enables access; it does not certify the resulting reconstruction. |

| [Kappa](https://github.com/macabeus/kappa) | A VS Code companion for iterative matching-decompilation work. | Support and useful context depend on the project and compiler setup. |

| Compiler + comparison + tests | Produce an independent artifact and compare it with a defined target. | Each check covers a particular scope, not every possible runtime behavior. |

| [LLM4Decompile](https://github.com/albertan017/LLM4Decompile) | Specialized model research for reconstruction from low-level inputs and refinement of decompiler output. | Function benchmark results do not measure end-to-end commercial-game recovery. |

### A published benchmark, with its scope

The LLM4Decompile repository reports 0.6494 (64.94%) re-executability for its 9B-v2 model on the Decompile benchmark in a September 23, 2024 release entry. That historical result is useful context for AI decompiling games; it is not a 64.94% success rate for whole games.

### Watch the tool bridge in action

[ghidraMCP: Now AI Can Reverse Malware](https://www.youtube.com/watch?v=u2vQapLAW88) — LaurieWired.

GhidraMCP’s creator demonstrates an LLM operating Ghidra, explains the backend and shows how MCP clients connect. It is useful background for understanding how an assistant gains access to analysis tools in an AI decompiling games workflow.

General reverse-engineering demo using malware, not a game decompilation tutorial. The chapter links follow the author’s published video directory.

- [02:22: Claude + Ghidra demo](https://www.youtube.com/watch?v=u2vQapLAW88&t=142s)

- [06:44: Backend implementation](https://www.youtube.com/watch?v=u2vQapLAW88&t=404s)

- [09:23: Connect MCP clients](https://www.youtube.com/watch?v=u2vQapLAW88&t=563s)

## AI decompiling games: compiling is not enough

A September 2026 research preprint reports that buildability and behavioral agreement can move in different directions. Its evaluation covers 300 GitHub library functions and 287 CVE-grounded functions. For its strongest refinement model, the reported build rate rose from 75% to 90%, while the Matched rate fell from 74% to 62%.

These are the paper’s reported metrics, not our measurements and not a game benchmark. They explain why AI decompiling games needs more than a successful compiler run: making unknown code look complete can introduce incorrect types, calls or conditions. The paper’s Matched metric is not a game project’s byte-matching progress percentage.

Reported Ghidra baseline vs. strongest LLM refinement; percentages from the cited preprint.

Build rate: Ghidra baseline 75%; strongest LLM refinement 90%.

Matched rate: Ghidra baseline 74%; strongest LLM refinement 62%.

[Read the study and its definitions on arXiv](https://arxiv.org/abs/2609.05370)

## Limits of AI decompiling games

AI decompiling games may recover useful logic without restoring the original author’s source text. Comments and names can be absent; compiler optimization can change the visible structure. Retained symbols help, but a model-generated name is still an inference unless the input supports it.

Program code and game assets are separate inputs. A candidate engine does not automatically supply textures, music, maps, editor projects or missing server implementations. Client-side analysis cannot reveal a server component that is not present in the supplied material.

Evidence levels for AI decompiling games

| Observed result | Supported conclusion | Remaining question |

| --- | --- | --- |

| Readable pseudocode | A candidate explanation exists. | Does it correctly represent the program? |

| Successful compilation | The candidate meets this build’s requirements. | Does its behavior agree with the original? |

| Selected tests pass | The tested behaviors meet the chosen assertions. | Which states and interactions remain untested? |

| One function matches | The checked instructions match under the stated conditions. | What about other functions and the complete build? |

| “100% decompiled” | The project reports completion under its own metric. | Which version, denominator and exclusions does it use? |

| A playable demonstration | Some content runs in the demonstrated environment. | How complete and stable are gameplay, saves and other devices? |

### Ask for the denominator

For AI decompiling games, “100%” might count functions, code bytes or some other tracked scope. Check the project’s definition and whole-build verification before treating it as complete gameplay, performance or portability.

## Can AI combine games into a mashup?

A game mashup can combine new implementations, shared data formats, mods or coordinated runtimes. AI reverse engineering games may help developers understand those systems, but a convincing combined scene does not reveal which route produced it.

The [2010 Rust Rewrite Mashup repository](https://github.com/chasmlol/2010-rust-rewrite-mashup) describes MW2, a Skate 3 mode and a Minecraft world in one Rust game built on IW4L. The concrete takeaway is an integration project on an existing rewrite. Its description is not proof that three original games were fully matching-decompiled.

To evaluate a mashup, ask which game supplies the runtime, which supplies assets, which mechanics are implemented, and which upstream work is credited. This gives “AI combining games” a useful technical explanation without conflating it with AI decompiling games.

## How AI decompiling games connects to browser ports

A browser is a platform, not a production method. AI decompiling games can help supply a reconstructed implementation; developers still need to make that implementation work in a browser environment. Public source, an existing rewrite or an emulator can also be starting points.

A common C/C++ route uses WebAssembly and Emscripten, then adapts graphics, input, timing and storage. [Emscripten’s API limitations](https://emscripten.org/docs/porting/guidelines/api_limitations.html) explain the browser event loop, asynchronous networking and virtual file system. A native endless loop or direct filesystem assumption can require changes.

A browser emulator runs the original program through an emulated environment. Streaming sends the output of a remote game to a web client. Both are different from a locally running engine port. AI reverse engineering games does not automatically select one of these deployment routes.

1. **Get a running implementation**: Start from available source, a reconstruction, a new engine or an emulator. Confirm the required assets and the target version.

2. **Adapt the browser runtime**: Integrate the rendering path, event loop, keyboard or touch input, networking and file loading. Choose a realistic device and browser target.

3. **Verify the player experience**: Check startup, playable content, frame pacing, audio, saves and failure states. Record the device, browser and build used for the test.

### Find the project, then check its version

Explore our [browser game directory](/games/) and [Radiant Optimizer collection](/radiant-optimizer-browser-games/). Our [Skate 3 entry](/games/skate-3/) describes a destination labelled as a fan game; our [GTA 5 entry](/games/gta-5/) is an archive reference. Neither label establishes AI decompiling games or a complete original-game port.

## Original files and game decompilation permissions

Projects can publish an implementation while requiring the player’s original assets. IW4L, for example, reads an owned MW2 installation and says it distributes no game assets. AI decompiling games does not grant permission to distribute those assets or an entire reconstructed game.

Legality depends on jurisdiction, access rights, purpose, licence and distribution. The US [17 USC §1201(f) interoperability provision](https://www.law.cornell.edu/uscode/text/17/1201#f) is conditional, not general permission to circumvent protection or distribute copyrighted material. Owning a copy is not blanket authorization. Check the particular project’s instructions and applicable permissions.

## AI decompiling games FAQ

### Can AI decompile an entire game?

AI can assist with functions and coordinate larger reconstruction workflows. Whether an entire game is complete depends on the target version, coverage, integration and validation. For AI decompiling games, a repository’s measured scope is more useful than a universal yes-or-no claim.

### Can Claude reverse engineer a game?

Claude can help explain analysis output and generate or revise candidate code. A workflow may give it access to Ghidra and other tools. Verify its proposed types and logic with concrete evidence; assistant output alone does not establish a complete reconstruction.

### Does decompilation recover original source code?

It reconstructs a higher-level representation or implementation. Even matching machine code does not recover the author’s exact source expressions, comments and file layout. AI decompiling games can be useful without restoring the original development project.

### Does 100% decompiled mean the port is finished?

No. A project’s completion metric needs a defined version and scope. Porting, platform integration and player testing can remain separate work after the tracked reconstruction is complete.

### Are browser games all made through AI reverse engineering?

No. Browser games can be original projects, source ports, emulated programs, recreations or streamed games. Confirm each project’s documented production method. Our directory keeps browser availability and AI evidence as separate questions.

### How long does AI decompiling games take?

There is no reliable universal duration or cost. Existing source, symbols, compiler behavior, code size, integration and review all affect the work. The 33 commits in the Marun PR describe that contribution, not a transferable schedule for another game.

### Do I still need the original game files?

Often yes: projects may require assets from a version you own. A new engine or reconstructed code does not necessarily include game data. Read the project’s file requirements and our [before-you-play guide](/guides/before-you-play/) before opening a game.
