Reverse engineered with AI.
Goal: source code that rebuilds BFME 1's executable byte-for-byte.
- If you take a part of the BFME binary, recreate the exact source code that would make that part of the binary, then compile the source code and inject it into the binary, you get the same binary
- Doing this piece by piece will eventually give you a full, open source recreation of BFME, and enable some (insane) mods
- The goal of this project is not to mod the game. The point of the project is to get source code that can be compiled into a 1:1, bit by bit replica of BFME 1's binary. This ensures 100% accuracy and will enable future (insane) modifications
We currently have C++ functions in Code/ and a patcher which can patch same-size custom functions into lotrbfme.exe. This is useful for modding.
About 8% of the game's functions — and ~15% of its code bytes — have been reverse-engineered and byte-for-byte verified against retail lotrbfme.exe (~6,300 of the exe's 78,506 functions). Every function in reverse/functions.csv compiles to bytes identical to the original.
- BFME 1 Source Code (~8% done)
- Network delay fix
- Memory fix
- Better crash logs
- 60/120 FPS
- Multi CPU
- AC fix
- World builder Source Code
- 16 player maps
ping redbracket on Discord if there's something else you want to change this roadmap
Just tell your favorite AI agent to make a PR in this repo, where each commit in the PR is an individual contribution. Your agent will know what to do from there (just make sure it keeps looping and making more commits), and I will be able to merge your PR.
!! All such AI-generated PRs are appreciated !!
Baseline executables and the MSVC 7.1 toolchain are committed directly in the repo (plain git, no LFS) — a normal git clone gets everything. After cloning, run:
./tools/setup_hooks.shGit does not auto-enable versioned hooks from a clone. setup_hooks.sh points this checkout at the
tracked pre-commit hook, which rejects new source functions unless they are listed in
reverse/functions.csv and pass the byte comparison.
./build.sh
# (or on Windows)
# .\build.ps1The build verifies the baseline, byte-compares tracked source against the original executable, and checks that a no-op patched copy hashes identically. While iterating on one function, verify just its source in a few seconds by passing in the path:
./build.sh Code/Libraries/Source/WWVegas/WWMath/color.cpp # or a function name