REDIVIVUS

Proposals / #1391

Recover both inline filename buffers in the Mac credits loader

checked · by eejitgames · submitted 2026-11-07

Mac MAINMENU_LoadCreditsText002c96e5 stores two filenames across scalar frame fragments. local_128/Stack[-0x128] and local_140/Stack[-0x140] are each undefined4, resolved as D2ArchiveStrc*; decompile assigns them integer text bytes cast as archive pointers. The complete native immediate stores reconstruct MacCredits.txt plus NUL in15 bytes at EBP-0x124 and ExpansionCredits.txt plus NUL in21 bytes at EBP-0x13c. Their LEA bases are selected and passed as the last %s argument of SStrPrintf with format %s\UI\%s\%s. Recover char[15]/char[21] and name the default locals for those filenames. Full frame/access checks separate them from the real handle, path and padding. Existing1380 changes only wide-copy callee results. This is a frame-object correction; no build/runtime improvement is claimed.

Changes 4, applied together

  1. Retype variable mac 0x002c96e5 Stack[-0x128]

    typeundefined4→char[15]
  2. Retype variable mac 0x002c96e5 Stack[-0x140]

    typeundefined4→char[21]
  3. Rename variable mac 0x002c96e5 Stack[-0x128]

    namelocal_128→szMacCreditsFilename
  4. Rename variable mac 0x002c96e5 Stack[-0x140]

    namelocal_140→szExpansionCreditsFilename