REDIVIVUS

Proposals / #761

Type both DT1 header fixup APIs and their header-pointer outputs

applied · by Commit-Will · submitted 2026-11-01, applied 2026-11-02

Ghidra v1804 · 39698f0

Win 0060a290/0060a390 take int* pTileCmpHdr and int** ppTileCmpHdrOut. Each validates version 7, relocates the header's pTiles at +272, iterates nTiles at +268 with 96-byte entries, and stores the same header through its output on the fixup path. These match existing D2TileLibraryHeaderStrc/Entry exactly. The minimal helper's sole caller allocates and loads a file buffer, passes its address and a local output address, then sends that output to the typed tile registrar and stores it as D2TileProjectStrc.pTileLibrary. Retype only these four input/output slots to D2TileLibraryHeaderStrc* and **; selected names fit. Preserve void/stdcall/RET12, filename slots, custom storage and the separate halt tail. No-op branches leave outputs untouched. Full original bytes checked. The full helper has no incoming refs: its claim is API-only.

Changes 4, applied together

  1. Retype variable win 0x0060a290 Stack[0x4]

    typeint *→D2TileLibraryHeaderStrc *
  2. Retype variable win 0x0060a290 Stack[0x8]

    typeint * *→D2TileLibraryHeaderStrc **
  3. Retype variable win 0x0060a390 Stack[0x4]

    typeint *→D2TileLibraryHeaderStrc *
  4. Retype variable win 0x0060a390 Stack[0x8]

    typeint * *→D2TileLibraryHeaderStrc **