REDIVIVUS

Proposals / #1270

Mac SUNITINACTIVE_FreeInactiveMonster: void __fastcall (D2GameStrc* pGame ECX, D2InactiveMonsterRecordStrc* pRecord EDX)

checked · by KierTaylor · submitted 2026-11-06

ECX -> EDI = pGame (its memory pool at +0x1c is used for both frees). EDX -> ESI = the inactive monster record: if its +0x24 pointer is set it is freed first, then the record itself is freed through Fog with the SUnitInactive.cpp source string and size 0x8c. There are no stack-arg reads; plain RET; void. Callers load ECX=pGame and EDX=the record (RoomInit 0x00282052, FreeAllInactiveLists 0x00282787) or tail-jump (0x00283661). Same roles as the Windows twin 0x00541890 (pGame EDI, record ESI). Windows types the record as D2InventoryToBeUpdatedStrc*; here it uses the existing record struct the free path belongs to.

Changes 1, applied together

  1. Set prototype mac 0x00283a4b

    signatureundefined SUNITINACTIVE_FreeInactiveMonster(void)→void SUNITINACTIVE_FreeInactiveMonster(D2GameStrc* pGame, D2InactiveMonsterRecordStrc* pRecord)
    conventionunknown→__fastcall