WP-001: Ghidra session — Scooby.exe imports + TGIFILE.ART decode trace

Status: 📝 Drafted Phase: 1 — Format Research Depends on: WP-003 (palette hunt — run first; may eliminate palette-hunt scope from this session), WP-007 (strings dump — recommended; primes Steps 3–4) Companion EC: EC-001 Estimated effort: 1 day (Ghidra auto-analysis included)


Goal

Load Scooby.exe into Ghidra, identify the function chain that opens and decodes a TGIFILE.ART entry, and record enough understanding to reimplement that decode in C++ for the ScummVM engine.

Background

WP-002 (TGIFILE.ART decoder) is the bottleneck for Phase 1 exit. Two paths exist to crack it: blind decode-guessing (probe_art.py trying RLE / palette / LZ variants), or tracing the decode function inside the binary that already does it correctly. The binary path is higher-confidence — the decode algorithm is guaranteed to be in there.

Scooby.exe is small (476 KB), which supports the hypothesis that it’s largely an interpreter over object.ini + a thin set of resource loaders. That makes finding the relevant function tractable rather than a multi-week archaeology project.

WP-003 baseline (2026-06-02) — concrete Ghidra targets unlocked. WP-003 landed the pre-payload region characterization in tgifile-art.md §Pre-payload region and also corrected the header offsets (asset_count is at 0x0118, not 0x011C; whole header shifted +4 in the prior spec). For this Ghidra session that means four specific function targets to hunt for, on top of the generic file-I/O surface:

WP-003 also produced a negative palette finding — no 256-entry RGB or RGBA palette exists in the pre-payload region. Palette discovery moved to WP-002 (per-asset leading bytes or per-record metadata). For this Ghidra session, that means palette-load code is not expected to read from the pre-payload region; it’s expected to read from inside an asset payload at or after 0x10017E, or from the 20-byte metadata field on OBJ records.

WP-008 baseline (2026-06-03) — four additional Ghidra-session targets. The Showdown object.ini analysis (scooby-exe.md §object.ini interpreter behavior) confirmed the engine is name-driven (every reference is a string in the WP-003 convention) and produced four concrete loose ends that only the exe can resolve:

All four are name-string xref targets — they should be straightforward to find once Ghidra has analyzed the binary and the scooby-exe.md §Showdown string anchors table is in front of you.

Scope

In scope:

Out of scope:

Dependencies

Exit criteria

  1. docs/formats/scooby-exe.md Findings → “Toolchain” populated with confirmed compiler + linker.
  2. docs/formats/scooby-exe.md Findings → “Imports / runtime surface” populated with the DirectX surfaces in use, Bink integration, and file I/O API set.
  3. docs/formats/scooby-exe.md Findings → “Resource loading map” populated with at least the TGIFILE.ART open + dispatch path labeled in Ghidra.
  4. The TGIFILE.ART decode function is identified (Ghidra function name + entry address recorded) and its pseudo-C decompilation is captured as a code block in docs/formats/tgifile-art.md Findings → “Per-entry payload” → new subsection “Decode algorithm (from Scooby.exe)”.
  5. Ghidra project saved at C:\www\scooby\ghidra\scooby.gpr with the labels above intact.

Deliverables

Notes