Recover the Mac inventory-cell copy Boolean and register inputs
Ghidra vmac 109 · 39698f0
Complete220-byte Mac CopyInventory0016a2f2 takes ECX destination inventory and EDX source unit, with no stack input reads. Inventory magic validates ECX; source+96 is existing D2UnitStrc.pInventory. Both source/destination grids come from the existing typed grid provider, checked for matching nonzero byte width/height, then exactly width*height*4 cell-pointer bytes are copied. A local initialized0 and set1 after copy is loaded into fullEAX at the sole return. Its only two calls, both in complete trade-copy caller0016a22d, pass independently allocated64-byte inventories and typed units and test fullEAX. Recover BOOL __fastcc(D2InventoryStrc* pInventory,D2UnitStrc* pUnit). Full native bodies, actual64-byte factory/magic/layout, caller setup and original Windows185-byte counterpart checked. No selected names, shared layout, Windows ABI or caller edit.
Changes 1, applied together
Set prototype
mac 0x0016a2f2signatureundefined CopyInventory(void)→BOOL CopyInventory(D2InventoryStrc * pInventory, D2UnitStrc * pUnit)conventionunknown→__fastcc