{
  "added_at": "2026-10-19",
  "additional_evidence_urls": [
    "https://github.com/GensokyoClub/th06/blob/e840ab447f38579c2ea877e16a5d91a49adf016e/reccmp-project.yml",
    "https://github.com/GensokyoClub/th06/blob/e840ab447f38579c2ea877e16a5d91a49adf016e/resources/progress.svg",
    "https://github.com/GensokyoClub/th06/blob/e840ab447f38579c2ea877e16a5d91a49adf016e/scripts/create_devenv.py",
    "https://github.com/GensokyoClub/th06/blob/e840ab447f38579c2ea877e16a5d91a49adf016e/scripts/build.py",
    "https://github.com/GensokyoClub/th06/blob/e840ab447f38579c2ea877e16a5d91a49adf016e/scripts/extract_icon.py",
    "https://github.com/GensokyoClub/th06/blob/e840ab447f38579c2ea877e16a5d91a49adf016e/.github/workflows/ci.yml",
    "https://github.com/GensokyoClub/th06/blob/e840ab447f38579c2ea877e16a5d91a49adf016e/.github/workflows/compare.yml",
    "https://github.com/GensokyoClub/th06/blob/e840ab447f38579c2ea877e16a5d91a49adf016e/tests/test_Pbg3Archive.cpp",
    "https://github.com/GensokyoClub/th06/blob/e840ab447f38579c2ea877e16a5d91a49adf016e/LICENSE"
  ],
  "category": "reconstruction-cases",
  "description_en": "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.",
  "description_zh": "为 Touhou 6：东方红魔乡 1.02h 版的 Windows 可执行文件重建 C++ 源码，目标是用原版 Visual Studio .NET 2002 与 DirectX 8 工具链精确重新构建。reccmp 和 objdiff 将重建的二进制与使用者自备的原可执行文件逐函数比较。仓库内的进度徽章报告函数已全部实现、字节准确率为 98.03%，因此不主张整个二进制完全一致。",
  "entry_url": "https://awesomerea.org/resources/th06-decomp-case/",
  "entry_url_zh": "https://awesomerea.org/zh/resources/th06-decomp-case/",
  "evidence_url": "https://github.com/GensokyoClub/th06/blob/e840ab447f38579c2ea877e16a5d91a49adf016e/README.md",
  "group": "cases",
  "id": "th06-decomp-case",
  "json_url": "https://awesomerea.org/resources/th06-decomp-case/record.json",
  "kind": "case-study",
  "markdown_url": "https://awesomerea.org/resources/th06-decomp-case/index.md",
  "markdown_url_zh": "https://awesomerea.org/zh/resources/th06-decomp-case/index.md",
  "name": "Touhou 6: reconstructing Embodiment of Scarlet Devil 1.02h source",
  "name_zh": "Touhou 6：重建东方红魔乡 1.02h 版源码",
  "reconstruction_method": "matching-decompilation",
  "record_type": "resource",
  "relationship": "independent-reconstruction",
  "requirement_facets": [
    "scope",
    "prerequisites",
    "prerequisites",
    "testing",
    "license"
  ],
  "requirements": [
    "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. 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.",
    "The repository is dedicated under CC0 1.0; the original game, the downloaded Microsoft toolchain and third-party tools keep their own terms."
  ],
  "requirements_zh": [
    "README 表明目标是完美重建 1.02h 版源码；仓库内可变的进度徽章报告 TH06.EXE 已 100.0% 实现、字节准确率 98.03%。README 另指向用于 Linux 和新版 Windows 的独立 portable 分支。团队的 Ghidra 成果以 XML 形式导出到配套仓库 happyhavoc/th06-re。",
    "需自备与 README 中 SHA-256 一致的原版 1.02h 东方紅魔郷.exe，并复制为 resources/th06.exe；reccmp 校验同一哈希，构建也会从该文件提取游戏图标。仓库不含游戏可执行文件或数据；比较工作流通过机密配置的 URL 获取原始二进制。",
    "构建需要 Python 3.4 及以上；非 Windows 平台还需 msiextract 和 Wine（macOS 建议使用 CrossOver）；aria2c 为可选。scripts/create_devenv.py 从网络存档下载 Visual Studio .NET 2002 和 DirectX 8.0 SDK，并获取 ninja、objdiff、Ghidra 等辅助工具；scripts/build.py 生成并运行 ninja 构建。",
    "贡献者使用 reccmp 比较差异，它以 HTML 报告给出重建可执行文件相对原文件的逐函数准确率。CI 在 Windows 上构建，并将 objdiff 构建与通过 Ghidra 从原文件拆出的目标文件比较；一套小型 munit 测试会读取使用者的游戏资源包。徽章数字由项目生成。",
    "仓库以 CC0 1.0 释出；原游戏、下载的 Microsoft 工具链及第三方工具各有条款。"
  ],
  "targets": [
    "game"
  ],
  "url": "https://github.com/GensokyoClub/th06",
  "verification": "source-reviewed",
  "verified_at": "2026-10-18"
}
