Quake Live Reverse Engineering Handbook

March 30, 2026 · View on GitHub

This handbook aggregates the major reverse-engineering stages completed so far and surfaces the artefacts each stage produced. Use it as the single entry point when onboarding contributors, preparing reviews, or scheduling refresh work.

Stage output index

Stage focusPrimary notesKey artefacts
Ghidra reference corpusQuake Live Ghidra Reference Workflow
Quake Live Ghidra Module Mapping
GhidrAssistMCP Integration
references/reverse-engineering/ghidra/, scripts/ghidra/, retail binaries under assets/quakelive/
Symbol export baselineReverse Engineering Baselinereferences/symbol-maps/, references/analysis/quakelive_symbol_aliases.json, ghidra_scripts/ExportSymbolMap.py
Build recaptureQuake Live Build Recapturetools/scripts/dump_toolchain_info.py, references/analysis/quakelive_toolchain_metadata.json, tools/containers/msvc-2010.Dockerfile, tools/containers/mingw-ld220.Dockerfile
Asset coverageAsset map gapsdocs/reverse-engineering/asset-map.csv, HLIL excerpts under artifacts/
Deterministic gameplay loopGameplay Loop Validation Notessrc-re/prototypes/, logs/re/native-shim.log (via shim), tests harness inputs
Native shim prototypingNative Prototype Shim Notessrc-re/prototypes/common/native_shim.c, src-re/prototypes/, logs/re/native-shim.log, logs/syscall_contract.log, tools/tests/validate_syscall_contract.py
Clean-room workspace layout`src-re/` Workspace Primersrc-re/include/, src-re/prototypes/, src-re/annotated/, src-re/clean/
Network handshake reconstructionNetwork Handshake ReconstructionAnnotated sources under src-re/annotated/net/, canonical sources in src/code/
Behaviour parity diffingBehaviour Diff Ledgertools/analysis/behaviour_diff.py, artifacts/tests/analysis/qvm_vs_dll/
Deterministic trace harnessTrace harness for deterministic regression testingtools/trace/, sample captures under artifacts/tests/
Platform services abstractionSteam Platform Abstraction Plan
Online Authentication Lifecycle
src/common/platform/, src/common/auth_credentials.c, src/common/auth_credentials.h, tests/test_platform_services.py, tools/integration/auth_flow_trace.py, docs/qa/credential-matrix.md, docs/platform/credentials.md
Reconstruction sign-offReconstruction Trackersrc-re/clean/, shared headers in src-re/clean/include/

Artefact directory

Working glossary

Baseline export – The symbol extraction pass orchestrated by ghidra_scripts/ExportSymbolMap.py to seed references/symbol-maps/ with normalised manifests used across reverse-engineering tasks.

Ghidra reference corpus – The OpenAlice-style committed export set under references/reverse-engineering/ghidra/ that records metadata, imports, exports, analyst-promoted symbols, function size rankings, and top-function decompilations for the retail Quake Live binaries.

GhidrAssistMCP – Optional live MCP bridge configured through scripts/ghidra/setup_ghidrassist_mcp.ps1. Use it for exploration only, then revalidate findings against the committed Ghidra corpus and HLIL dumps.

Build recapture containers – Docker images defined in tools/containers/msvc-2010.Dockerfile and tools/containers/mingw-ld220.Dockerfile that reproduce the MSVC10 and MinGW 2.20 environments inferred from toolchain metadata.

Deterministic trace harness – Python utilities under tools/trace/ that ingest instrumented Quake Live runs, generate JSONL channel streams (SYS, RNG, ENT, META), and replay them to detect divergence.

Frame context shim – Native prototypes in src-re/prototypes/ that wrap CL_Frame/G_RunFrame logic with bindable contexts and structured logging to compare VM and native execution.

Handshake sequence – The client/server timeline documented in Network Handshake Reconstruction covering getchallengeconnectResponse and subsequent netchan setup using headers defined in src/code/qcommon/net_chan.c.

HLIL transcript – Decompiled text exports (for example the _hlil_part*.txt files referenced in Asset map gaps) catalogued under artifacts/ and used to trace asset references.

Behaviour diff ledger – The comparison log in Behaviour Diff Ledger plus underlying harness tools/analysis/behaviour_diff.py that verifies parity between QVM and DLL builds.

Reconstruction tracker – Status board maintained in Reconstruction Tracker to record clean-room source drops, shared header adoption, and pending reviewer sign-offs per subsystem.

Credential abstraction – Typed credential helpers in src/common/auth_credentials.h and src/common/auth_credentials.c that parse, normalise, and dispatch Steam, standalone, and legacy CD-key payloads documented in Online Authentication Lifecycle.

Platform service table – Capability descriptor exposed by src/common/platform/platform_services.c that reports active authentication, matchmaking, workshop, overlay, and statistics providers derived from platform_config.h.

Open Steam Adapter – The fallback authentication backend implemented in src/common/platform/backends/platform_backend_open_steam.c and described in Steam Platform Abstraction Plan to mirror Steamworks flows with open transports.

Auth flow trace – Scripted lifecycle capture driven by tools/integration/auth_flow_trace.py and catalogued in Credential Validation Matrix to document Steam-only, open-only, and hybrid dispatch outcomes.

Hybrid fallback – Steam-first authentication path in src/code/client/ql_auth.c that automatically retries pending Steam tickets against the open adapter, emitting the “Hybrid fallback accepted credential” log noted in Credential Validation Matrix.

Review cadence and ownership

SubsystemOwnerArtefacts to reviewCadenceNext session
Gameplay reconstructionGameplay systems reviewersrc-re/clean/gameplay/frame.c, Gameplay Loop Validation Notes, native shim logsMonthlyFirst Tuesday each month
Client runtimeClient runtime reviewersrc-re/clean/client/frame.c, Native Prototype Shim Notes, trace capturesMonthlySecond Tuesday each month
Networking protocolNetworking protocol reviewersrc-re/clean/net/handshake.c, Network Handshake Reconstruction, Behaviour Diff LedgerBi-weeklyNext Thursday following release drop
Toolchain recaptureBuild infrastructure reviewertools/containers/msvc-2010.Dockerfile, tools/containers/mingw-ld220.Dockerfile, Quake Live Build RecaptureQuarterlyFirst week of each quarter
Platform servicesPlatform integration reviewersrc/common/platform/, Steam Platform Abstraction Plan, Credential Validation Matrix, tests/test_platform_services.py, tools/integration/auth_flow_trace.pyBi-weeklyFriday following QA matrix refresh

Schedule review invites on the stated cadence and capture outcomes in the corresponding stage documents. If scope or artefacts shift, update this handbook alongside the source document to keep the index authoritative.