Diablo II: Lord of Destruction · 1.14d · Game.exe
Diablo II 1.14d, recovered as C++ source that builds.
Not a reimplementation that behaves like the game. The shipped executable, taken apart function by function, regenerated as C++, and compiled into a working d2.exe again.
- 42.8%of functions byte-identical to 1.14d (by count)
- 19.51%of code bytes byte-identical, whole functions only (by size)
- 67.6%of code bytes in identical instructions (by size, including those inside functions that still differ)
- 0undefined symbols at link
As of 57380e2. Recompiled with Visual C++ 2005 SP1, the compiler that built 1.14d, and compared function by function; see the README.
The tree is compiled with Visual C++ 2005 SP1, the compiler that built 1.14d, and each function’s machine code is compared with the same function in the shipped Game.exe, with addresses compared by what they name. A function counts as identical only when every byte matches. Small functions match far more often than large ones, so the share by count is higher than the share by size. The instructions figure also counts instructions that already match inside functions that still differ elsewhere; as a control, pairing each function with a wrong one from the same source file scores about 7%, so the matching instructions come from the reconstruction, not from boilerplate. The C runtime and compiler-generated exception code are left out. Details in BYTE-MATCHING.md
01What it is
The whole game. Patch 1.14 linked the client, the game server, D2Common, Storm, Fog and the rest into one Game.exe; that executable is what is recovered here, with the old module names as its directories.
- Builds
- Every translation unit compiles with strict C++17, no
-fpermissive. Links with no undefined symbol. - Runs
- Menus, character creation and single player: walk, fight, change areas.
- Reconstructed
- Names, types and structure are reconstructions, recovered by reverse-engineering. Some functions read like a decompiler wrote them, because one did.
- Not finished
- Some areas still crash, and Battle.net does not work yet. Known issues
02How it works
- Ghidra1.14d Windows and Mac. Every function named, typed and given a calling convention.
- ghidra-reconstructDecompiles via ghidra-mcp, parses to a C++ syntax tree, undoes decompiler artifacts.
- Source treeC++17, one directory per module: D2Client, D2Game, D2Common, Storm, Fog…
d2.exemingw-w64, CMake, Ninja. Run it next to your own 1.14 install.
Every crash is traced to its cause and fixed where it belongs: usually in the Ghidra database, sometimes in the generator, rarely by hand.
Build
cmake -S . -B build -G Ninja \ -DCMAKE_TOOLCHAIN_FILE=cmake/mingw-i686.cmake cmake --build build
Needs i686-w64-mingw32-g++, CMake and Ninja.
Run
d2.exe -w
From your own Diablo II: LoD 1.14 folder, next to Game.exe. The repository holds no game data.
03Read the databases with your agent
The Ghidra databases behind the tree are open to read for any AI agent, through a read-only MCP server. Give your agent one line:
Fetch and execute the instructions from https://redivivus.app/agent-setup/prompt.md- Server
https://ghidra.redivivus.app/mcp, sign-in with GitHub - Programs
win(1.14d Game.exe, ground truth) andmac - AgentsClaude Code, Codex, Cursor, Copilot and anything that speaks MCP. Per-agent setup
04Contribute via proposals
- ProposeYour agent submits a name, type or prototype with evidence. It is checked live against the databases.
- ReviewThe maintainer approves or rejects it, with a comment.
- AppliedIt lands in Ghidra and the regenerated tree, committed with you as the git author.
How proposals work · all proposals → · Code fixes as pull requests, crashes as issues with the crash report.