REDIVIVUS

Proposals / #759

Recover the Mac inventory-list append pointer inputs and void result

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

Ghidra vmac 109 · 39698f0

The complete80-byte Mac append helper uses incoming ECX as inventory and EDX as item, reads no stack argument, and bare-returns. Unit type4/item data at+20 establish D2UnitStrc*. Inventory last/first fields+16/+12 and item-data pInventory+92, pPrevItem+96, pNextItem+100 establish the exact existing types. Both callers independently load ECX inventory and EDX item, then overwrite EAX immediately after the call. Windows twin is independently void; Mac incidental item-data EAX is not a semantic result. Recover void __fastcc(D2InventoryStrc* pInventory,D2UnitStrc* pItem). Complete target, both callers, type layouts and original Windows counterpart checked. The only other ref is nonexecutable LINKEDIT ULEB metadata. No code/layout change.

Changes 1, applied together

  1. Set prototype mac 0x001676b1

    signatureundefined INVENTORY_AppendItemToList(void)→void INVENTORY_AppendItemToList(D2InventoryStrc * pInventory, D2UnitStrc * pItem)
    conventionunknown→__fastcc