Case study

Touhou 6: reconstructing Embodiment of Scarlet Devil 1.02h source

Reconstructs C++ source for the Windows executable of Touhou 6: Embodiment of Scarlet Devil version 1.02h, aiming at an exact rebuild with the original Visual Studio .NET 2002 and DirectX 8 toolchain. reccmp and objdiff compare the rebuilt binary with the user’s original executable function by function. The committed progress badge reports every function implemented but 98.03% byte accuracy, so whole-binary identity is not claimed.

Requirements and limitations

  • README states the aim of perfectly reconstructing the 1.02h source; the committed, mutable progress badge reports 100.0% implemented and 98.03% byte accuracy for TH06.EXE. README points to a separate portable branch for Linux and modern Windows, which is not covered here. The team’s Ghidra work is exported as XML to the companion happyhavoc/th06-re repository.
  • Supply your own original 東方紅魔郷.exe version 1.02h matching the SHA-256 in README, copied to resources/th06.exe; reccmp checks the same hash, and the build extracts the game icon from that file. The repository contains no game executable or data; the comparison workflow fetches the original binary from a secret-configured URL.
  • Builds need Python 3.4+, plus msiextract and Wine outside Windows (CrossOver is suggested on macOS); aria2c is optional. scripts/create_devenv.py downloads Visual Studio .NET 2002 and the DirectX 8.0 SDK from web archives, along with ninja, objdiff, Ghidra and helper tools, and scripts/build.py generates and runs a ninja build.
  • Contributors diff with reccmp, which reports per-function accuracy of the rebuilt executable against the original as an HTML report. CI builds on Windows and compares an objdiff build with objects delinked from the original through Ghidra; a small munit suite reads the user’s game archive. Badge figures are project-generated, and this collection did not build or compare anything.
  • The repository is dedicated under CC0 1.0; the original game, the downloaded Microsoft toolchain and third-party tools keep their own terms. The reviewed sources establish no AI or REA attribution, and no runtime reproduction is claimed.

About this entry

Type
Case study
Category
Independent reconstruction cases
Relationship
Independent reconstruction project
Targets
Game

Sources reviewed

The description was reviewed against primary sources. This does not establish runtime testing, security auditing or verified compatibility.

Primary sources

  1. README.md GitHub · GensokyoClub/th06 · Revision e840ab4
  2. reccmp-project.yml GitHub · GensokyoClub/th06 · Revision e840ab4
  3. resources/progress.svg GitHub · GensokyoClub/th06 · Revision e840ab4
  4. scripts/create_devenv.py GitHub · GensokyoClub/th06 · Revision e840ab4
  5. scripts/build.py GitHub · GensokyoClub/th06 · Revision e840ab4
  6. scripts/extract_icon.py GitHub · GensokyoClub/th06 · Revision e840ab4
  7. .github/workflows/ci.yml GitHub · GensokyoClub/th06 · Revision e840ab4
  8. .github/workflows/compare.yml GitHub · GensokyoClub/th06 · Revision e840ab4
  9. tests/test_Pbg3Archive.cpp GitHub · GensokyoClub/th06 · Revision e840ab4
  10. LICENSE GitHub · GensokyoClub/th06 · Revision e840ab4