# 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.

- Type: Case study
- Targets: Game
- Category: Independent reconstruction cases
- Relationship: Independent reconstruction project
- Sources reviewed: 2026-10-18
- Added to the catalog: 2026-10-19
- Original resource: <https://github.com/GensokyoClub/th06>
- Primary source: <https://github.com/GensokyoClub/th06/blob/e840ab447f38579c2ea877e16a5d91a49adf016e/README.md>
- Catalog page: <https://awesomerea.org/resources/th06-decomp-case/>
- Record JSON: <https://awesomerea.org/resources/th06-decomp-case/record.json>
- Chinese version: [简体中文](https://awesomerea.org/zh/resources/th06-decomp-case/index.md)

## Requirements & limits

- **Prerequisites:** 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.
- **Prerequisites:** 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.
- **Scope:** 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.
- **Testing evidence:** 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.
- **License:** The repository is dedicated under CC0 1.0; the original game, the downloaded Microsoft toolchain and third-party tools keep their own terms.

## Primary sources

1. <https://github.com/GensokyoClub/th06/blob/e840ab447f38579c2ea877e16a5d91a49adf016e/README.md>
2. <https://github.com/GensokyoClub/th06/blob/e840ab447f38579c2ea877e16a5d91a49adf016e/reccmp-project.yml>
3. <https://github.com/GensokyoClub/th06/blob/e840ab447f38579c2ea877e16a5d91a49adf016e/resources/progress.svg>
4. <https://github.com/GensokyoClub/th06/blob/e840ab447f38579c2ea877e16a5d91a49adf016e/scripts/create_devenv.py>
5. <https://github.com/GensokyoClub/th06/blob/e840ab447f38579c2ea877e16a5d91a49adf016e/scripts/build.py>
6. <https://github.com/GensokyoClub/th06/blob/e840ab447f38579c2ea877e16a5d91a49adf016e/scripts/extract_icon.py>
7. <https://github.com/GensokyoClub/th06/blob/e840ab447f38579c2ea877e16a5d91a49adf016e/.github/workflows/ci.yml>
8. <https://github.com/GensokyoClub/th06/blob/e840ab447f38579c2ea877e16a5d91a49adf016e/.github/workflows/compare.yml>
9. <https://github.com/GensokyoClub/th06/blob/e840ab447f38579c2ea877e16a5d91a49adf016e/tests/test_Pbg3Archive.cpp>
10. <https://github.com/GensokyoClub/th06/blob/e840ab447f38579c2ea877e16a5d91a49adf016e/LICENSE>

## More in Games

- [Touhou 7: reconstructing Perfect Cherry Blossom 1.00b source](https://awesomerea.org/resources/th07-decomp-case/index.md) · Case study
- [Twilight Princess: a decompilation with fully matching GameCube code](https://awesomerea.org/resources/twilight-princess-decomp-case/index.md) · Case study
- [Underworld Exhumed: reconstructing Ultima Underworld I and II](https://awesomerea.org/resources/underworld-exhumed-case/index.md) · Case study
- [wii-ipl: a decompilation of the Wii Menu (System Menu 4.3)](https://awesomerea.org/resources/wii-menu-ipl-decomp-case/index.md) · Case study
- [c1: a C port of PlayStation Crash Bandicoot](https://awesomerea.org/resources/crash-bandicoot-c1-port-case/index.md) · Case study
- [Firefighter: a decompiled DOS game ported to Rust](https://awesomerea.org/resources/firefighter-rust-port-case/index.md) · Case study

## About this entry

The description was reviewed against primary sources.
Original editorial content: MIT. Linked projects, papers and assets retain their own rights and licenses.
