REDIVIVUS

Proposals / #788

Recover the Mac inventory-list clearing procedure input

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

Ghidra vmac 110 · 9528519

Mac0016924f currently has no parameters and unknown convention. Complete43-byte body reads one cdecl Stack4 inventory, checks its existing magic and repeatedly passes inventory.pFirstItem+12 to the item remover until empty. Its sole complete135-byte caller supplies unit.pInventory+96, ignores incidental EAX, then calls a verified five-byte no-op. The independent original Windows49-byte counterpart is the same void list-clearing procedure with existing D2InventoryStrc* input. Recover void INVENTORY_RemoveAllItems(D2InventoryStrc* pInventory), cdecl; no return is inferred from incidental EAX or a bare RET alone. Native argument source, list fields, complete target/caller/Win bytes and extra LINKEDIT ref all checked. No selected parameter names currently exist. Shared layouts and caller definitions remain untouched.

Changes 1, applied together

  1. Set prototype mac 0x0016924f

    signatureundefined INVENTORY_RemoveAllItems(void)→void INVENTORY_RemoveAllItems(D2InventoryStrc * pInventory)
    conventionunknown→__cdecl