Mac CheckIfInrangeAndReassign: int32_t __fastcc (pGame, pUnit, pPacket, nSize, pOutX, pOutY)
Mac 0x00205d15 is "undefined (void)", convention unknown. Entry: ESI=EDX (unit, passed to 0x00191451), ECX saved to [EBP-0x10] (game). Stack: [EBP+8] packet, [EBP+0xc] packet size (CMP 5), [EBP+0x10] and [EBP+0x14] word out pointers zeroed at entry (MOV word ptr [EAX],0 at 0x00205d2f/0x00205d37). Caller SCMD_0x01_WalkToLocation loads ECX=[EBP+8] (pGame), EDX=[EBP+0xc] (pUnit), stores [ESP]=[EBP+0x10] (pPacket), [ESP+4]=[EBP+0x14] (nSize) and two out pointers, then TEST EAX and reads its locals as words (MOVZX [EBP-0xa]/[EBP-0xc]) as the target X/Y (0x0020030b-0x00200333). Windows twin 0x005496f0 returns int32_t and has the same values (pGame, pPacket, ushort* outNx, ushort* outNy, pUnit, ...).
Changes 1, applied together
Set prototype
mac 0x00205d15signatureundefined CheckIfInrangeAndReassign(void)→int32_t CheckIfInrangeAndReassign(D2GameStrc * pGame, D2UnitStrc * pUnit, uint8_t * pPacket, size_t nSize, uint16_t * pOutX, uint16_t * pOutY)conventionunknown→__fastcc