REDIVIVUS

Proposals / #781

Recover the complete Mac mercenary-transfer feasibility contract

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

Ghidra vmac 109 · 39698f0

Complete537-byte Mac0016a3ce has ECX source unit, EDX destination unit and one full stack dword scratch inventory. ECX+96 is the existing unit inventory; EDX is saved and passed to typed GetInventoryPage; Stack4 is validated with inventory magic and passed to the existing grid provider. Both incoming calls in complete197-byte trade-copy caller pass typed units and independently allocated64-byte scratch inventories in exactly that order, then test fullEAX. Sole return loads a local whose only reaching definitions are literal0 and1, including all loop and early-empty paths. Recover BOOL __fastcc(D2UnitStrc* pSourceUnit,D2UnitStrc* pDestUnit,D2InventoryStrc* pInventory). Exact Mac layouts, full callers/providers and original Windows135-byte counterpart checked; Windows custom argument order is not imported. No selected parameter names currently exist. Static code/database correction only.

Changes 1, applied together

  1. Set prototype mac 0x0016a3ce

    signatureundefined INVENTORY_CanTransferMercItems(void)→BOOL INVENTORY_CanTransferMercItems(D2UnitStrc * pSourceUnit, D2UnitStrc * pDestUnit, D2InventoryStrc * pInventory)
    conventionunknown→__fastcc