Correct the Mac trade-copy Boolean result and four-byte Boolean output
Ghidra vmac 109 · 39698f0
Mac0016a22d currently returns undefined4 and takes bool* pbMercIsBuyer. Its complete197-byte body stores DWORD1/0 through the fourth cdecl argument, proving existing four-byte BOOL*, not one-byte bool*. The sole caller initializes a four-byte local at[EBP-0xe0], passes its address in outgoingStack12 and tests fullEAX. Every normal return loads EAX from EBX whose reaching values are literal0/1; both final cleanup calls preserve EBX in their complete385-byte native body. Set the return to BOOL and output to BOOL*, preserving all four existing names/slots, first three precise pointer types and cdecl. Output writes are conditional and nullable. Native Mac proof establishes width independently; Windows corroborates Boolean return only. The bounded411-byte caller setup/use window is checked, not the entire6870-byte handler. No other function, shared layout, convention or chosen-name change.
Changes 1, applied together
Set prototype
mac 0x0016a22dsignatureundefined4 CreateCopyOfInventoryForTrading(D2PoolManagerStrc * pMemory, D2UnitStrc * pUnit, D2UnitStrc * pUnit2, bool * pbMercIsBuyer)→BOOL CreateCopyOfInventoryForTrading(D2PoolManagerStrc * pMemory, D2UnitStrc * pUnit, D2UnitStrc * pUnit2, BOOL * pbMercIsBuyer)convention__cdecl