Mac MOUSE_CaptureMousePosition: __cdecl void (D2UIMouseMsgStrc * pMsg)
Ghidra vmac 111 · 3c6740e
Mac body reads [EBP+8] once and loads its +0xc dword (the packed lParam), splitting it into X (low word) and Y (high word), which are clamped to the screen size and stored in the mouse-position globals; no ECX/EDX input, plain RET. Windows twin MOUSE_CaptureMousePosition 0x004fa6b0 does the same with its single stack argument, reading *(arg) as the window handle and the words at +0xc/+0xe as X/Y, so the argument is the window message record (typed HWND * there). On Mac it is typed as the UI message struct whose +0xc is the packed mouse position.
Changes 1, applied together
Set prototype
mac 0x0004b5efsignatureundefined MOUSE_CaptureMousePosition(void)→void MOUSE_CaptureMousePosition(D2UIMouseMsgStrc * pMsg)conventionunknown→__cdecl