This repository is a bit-exact decompilation of Touhou Koumakyou ~ the Embodiment of Scarlet Devil (TH06) for Windows, aiming to reconstruct the original executable from scratch using reverse engineering. It is primarily an applicationβa full game reimplementation with subsystems for graphics (Direct3D8), audio (DirectSound, MIDI), input (DirectInput), enemy scripting (ECL), sprite animations (ANM), replay recording, menu UI, and more. The build system uses MSVC 7.0 and DirectX 8.0 SDK, orchestrated by Python scripts and Ghidra for analysis and comparison. While the core purpose is binary-matching reconstruction, the project also functions as a research repository for understanding the game's internals, with extensive mapping data (CSV files) and Ghidra export scripts. The codebase is large, tightly coupled via global singletons, but contains several self-contained reusable components such as the Chain callback system, PBG3 archive parser, DirectSound wrapper, MIDI player, and a standalone PE file parser (pefile.py). Active development and CI indicate ongoing work to complete the decompilation.
vivisect is a comprehensive reverse engineering framework providing static analysis, dynamic debugging, emulation, and symbolic execution capabilities. It consists of several core packages: `envi` (multi-architecture disassemblers, emulators, memory abstraction), `vivisect` (workspace-based static analysis with analysis passes, import emulation, symbolic execution engine), `vtrace` (cross-platform debugging with ptrace/GDB stub support), `vdb` (debugger CLI and Qt GUI), `vstruct` (declarative binary structure parsing for formats like PE, ELF, Mach-O, minidump), `visgraph` (graph layout for control flow and call graphs), and `cobra` (custom RPC framework for remote collaboration). The system can parse and analyze PE, ELF, Mach-O, and other formats; perform function detection, control-flow recovery, switch-case identification, pointer analysis, and symbolic path exploration. It includes a full-featured debugger with breakpoints, watchpoints, and process control, and offers a Qt GUI for interactive reverse engineering. The architecture is modular but tightly integrated; many components are reusable in isolation. The codebase shows signs of long-term evolution with some Python 2/3 drift, deprecated API usage, and incomplete migration to PyQt6, but remains actively maintained with recent commits and a substantial test suite.