REDIVIVUS

Proposals / #676

Return the existing rune-table record pointer from its Windows lookup

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

Ghidra v1797 · 3bccb89

Win 00639d60 returns an address in the existing D2RunesTxt table, currently int32_t. Its sole returning path forms index*288 with LEA index*9 then SHL5, adds table base0096ca9c and returns full EAX with RET4. Invalid indices terminate through the CRT exit chain. Existing D2RunesTxt is288 bytes and the typed wrapper0096ca98 stores its pointer at+4. Both pointer producers are independently verified: CompileTxt receives row size288, and record growth allocates (index+1)*288 plus an optional four-byte prefix, adjusts the prefix back out, stores the new base and copies72 dwords per row. Restore D2RunesTxt*, preserving the signed index, name, stdcall ABI and all locals. No incoming references exist, so no active caller or runtime improvement is claimed. Complete65-byte target,2030-byte initializer,158-byte growth routine and typed accessor are decoded from the original Windows PE. No Mac counterpart, shared type or source edit is inferred.

Changes 1, applied together

  1. Set prototype win 0x00639d60

    signatureint32_t ITEMTBLS_GetRunewordTxtRecord(int32_t nRunewordId)→D2RunesTxt * ITEMTBLS_GetRunewordTxtRecord(int32_t nRunewordId)
    convention__stdcall