Mac MSG_PostKeyMessage: void __cdecl (int32_t bKeyDown, uint8_t byKeyCode, uint8_t byCharCode)
There are three cdecl stack args. [EBP+8] picks the message (non-zero gives WM_KEYDOWN 0x100, zero gives WM_KEYUP 0x101, via SETZ|0x100). byte [EBP+0xc] = the Mac key code, posted as wParam|0x80000000. byte [EBP+0x10] = the char code, posted as lParam. It goes to MSG_EnqueueMessage 0x000297df. MAC_PostKeyDown 0x0019ba6e stores [ESP]=1, [ESP+4]=AH (key code) and [ESP+8]=AL (char code) from the event message, then sets AL=1 itself without reading this call's EAX.
Changes 1, applied together
Set prototype
mac 0x000298b2signatureundefined MSG_PostKeyMessage(void)→void MSG_PostKeyMessage(int32_t bKeyDown, uint8_t byKeyCode, uint8_t byCharCode)conventionunknown→__cdecl