REDIVIVUS

Proposals / #1225

Mac LoopsOverAllItemsAndPutInInventory: uint8_t __fastcc (pGame ECX, pUnit EDX, pUnit2 stack)

checked · by KierTaylor · submitted 2026-11-05

Mac 0x00212e8f is "undefined (void)", convention unknown. Entry: ECX saved to [EBP-0x14] and passed as pGame (arg 1) to ITEM_CloneFromSerializedData (0x001c6400) at 0x00212f0f-0x00212f25; EDX saved to [EBP-0x24]/ESI and asserted with file/line 0x9bb (the unit); [EBP+8] is the only stack argument (second unit, e.g. 0x00212fe6 -> [ESP+0xc]). Result built in AL (MOV AL,1 / MOVZX EAX,AL) and returned; plain RET 0x002131ab. Same three values as Windows twin 0x005670e0 uint8_t (D2UnitStrc* pUnit, D2UnitStrc* pUnit2, pGame), in Mac register order.

Changes 1, applied together

  1. Set prototype mac 0x00212e8f

    signatureundefined LoopsOverAllItemsAndPutInInventory(void)→uint8_t LoopsOverAllItemsAndPutInInventory(D2GameStrc * pGame, D2UnitStrc * pUnit, D2UnitStrc * pUnit2)
    conventionunknown→__fastcc