Scarface decomp

Join in

Each function of the game is rewritten in C++ until the game's own 2003 compiler turns it back into exactly the same bytes. The compiler is the judge, so anyone's work counts the moment it matches. Pick the way that suits you.

What everyone needs

The full setup, step by step, is under Start helping on the main page. No leaked source is used anywhere in this project, and none may be brought in.

1No AI, no experience

About ten minutes, and it costs nothing.

  1. Start the portal (START_PORTAL.bat, or sh start_portal.sh) and sign in with a name.
  2. Press Match the easy ones. With no AI, the portal writes C++ straight from each small function's machine code, compiles it, and records every one that already matches, under your name.
  3. Press Submit your work and post the file it makes in #help on Discord, or attach it to a GitHub issue.

The portal's own drafts match about half of the smallest open functions. Whatever is left is what needs a person or an AI.

2Your own AI key, in the portal

For anyone with an API key from an AI provider. You pay your provider for what you use.

  1. In the portal's workbench, paste your key. It goes from your browser through the portal to the provider and is never stored or logged by the project.
  2. Claim a function and let the AI draft it, or run it over a batch. A draft is kept only if it compiles to the exact bytes, so a wrong answer costs credits but can never get into the project.
  3. Leave Name things after a match ticked, so the AI also proposes real names for the function and its members. A named version is kept only if it still matches.

Run step 1 first: it clears the functions that need no AI, so your credits go to the ones that do.

3An AI coding agent

For Claude Code, Codex, Cursor and similar tools that can run commands in a folder.

Open the project folder in your agent and tell it:

Read AGENTS.md in this repository and follow it.

That file gives the agent its rules and this loop, which it runs by itself:

python portal/doctor.py            # what is missing: game files, compiler
python portal/agent.py next --bin xb --max-size 40     # pick one, smallest first
python portal/agent.py packet xb 0x00248810            # disassembly and a starter file
python portal/agent.py check work/xb_00248810.cpp      # compile, compare, repeat
python portal/agent.py keep work/xb_00248810.cpp       # ready to record

When it has a batch, you record them yourself with python portal/scripts/submit_matches.py. That step asks for your name and PIN, which the agent never sees.

Not only matching

The rules, for people and for AI

More in CONTRIBUTING.md and PROVENANCE.md.