{"type": "func", "start": 6443330000, "end": 6443330605, "name": "sub_1800D69D0", "pseudocode": "// \n// sub_1800D69D0 from 0x1800d69d0 to 0x1800d6c2d (605 bytes)\n// \n// 4 xrefs:\n// > cocos2d::CCEGLView::pollEvents @ 0x1800d4a85\n// > <???> @ 0x180142ed0\n// > <???> @ 0x180142ee0\n// > <???> @ 0x1801ba950\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid sub_1800D69D0()\n{\n  _QWORD *v0; // rbx\n  HWND ActiveWindow; // rax\n  _BYTE *PropW; // rbx\n  unsigned int v3; // edi\n  unsigned int v4; // edi\n  __int64 v5; // rcx\n  unsigned int v6; // edi\n  __int64 v7; // rcx\n  unsigned int v8; // edi\n  __int64 v9; // rcx\n  __int64 v10; // rbx\n  LONG bottom; // r8d\n  HWND v12; // rcx\n  struct tagMSG Msg; // [rsp+30h] [rbp-58h] BYREF\n  struct tagRECT Rect; // [rsp+60h] [rbp-28h] BYREF\n\n  while ( PeekMessageW(&Msg, nullptr, 0, 0, 1u) )\n  {\n    if ( Msg.message == 18 )\n    {\n      v0 = (_QWORD *)qword_1801A9F60;\n      if ( qword_1801A9F60 )\n      {\n        do\n        {\n          sub_1800D42E0((__int64)v0);\n          v0 = (_QWORD *)*v0;\n        }\n        while ( v0 );\n      }\n    }\n    else\n    {\n      TranslateMessage(&Msg);\n      DispatchMessageW(&Msg);\n    }\n  }\n  ActiveWindow = GetActiveWindow();\n  if ( ActiveWindow )\n  {\n    PropW = GetPropW(ActiveWindow, L\"GLFW\");\n    if ( PropW )\n    {\n      v3 = word_1801AB8F0;\n      if ( GetKeyState(160) >= 0 && PropW[476] == 1 )\n      {\n        ((void (*)(void))sub_1800D80F0)();\n        sub_1800D54B0((__int64)PropW, 340, v3, 0);\n      }\n      v4 = word_1801AB8F8;\n      if ( GetKeyState(161) >= 0 && PropW[480] == 1 )\n      {\n        sub_1800D80F0(v5);\n        sub_1800D54B0((__int64)PropW, 344, v4, 0);\n      }\n      v6 = word_1801AB8F6;\n      if ( GetKeyState(91) >= 0 && PropW[479] == 1 )\n      {\n        sub_1800D80F0(v7);\n        sub_1800D54B0((__int64)PropW, 343, v6, 0);\n      }\n      v8 = word_1801AB8FE;\n      if ( GetKeyState(92) >= 0 && PropW[483] == 1 )\n      {\n        sub_1800D80F0(v9);\n        sub_1800D54B0((__int64)PropW, 347, v8, 0);\n      }\n    }\n  }\n  v10 = qword_1801ABFE8;\n  if ( qword_1801ABFE8 )\n  {\n    GetClientRect(*(HWND *)(qword_1801ABFE8 + 880), &Rect);\n    bottom = Rect.bottom;\n    if ( *(_DWORD *)(v10 + 936) != Rect.right / 2 || *(_DWORD *)(v10 + 940) != Rect.bottom / 2 )\n    {\n      v12 = *(HWND *)(v10 + 880);\n      Rect.left = Rect.right / 2;\n      *(_DWORD *)(v10 + 936) = Rect.right / 2;\n      Rect.top = bottom / 2;\n      *(_DWORD *)(v10 + 940) = bottom / 2;\n      ClientToScreen(v12, (LPPOINT)&Rect);\n      SetCursorPos(Rect.left, Rect.top);\n    }\n  }\n}", "assembly": "; \n; sub_1800D69D0 from 0x1800d69d0 to 0x1800d6c2d (605 bytes)\n; \n; 4 xrefs:\n; > cocos2d::CCEGLView::pollEvents @ 0x1800d4a85\n; > <???> @ 0x180142ed0\n; > <???> @ 0x180142ee0\n; > <???> @ 0x1801ba950\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\npush    rbx                                                            ; +0x0, 0x1800d69d0\nsub     rsp, 80h                                                       ; +0x2, 0x1800d69d2\nmov     rax, cs:__security_cookie                                      ; +0x9, 0x1800d69d9\nxor     rax, rsp                                                       ; +0x10, 0x1800d69e0\nmov     [rsp+88h+var_18], rax                                          ; +0x13, 0x1800d69e3\nxor     r9d, r9d; wMsgFilterMax                                        ; +0x18, 0x1800d69e8\nmov     [rsp+88h+wRemoveMsg], 1; wRemoveMsg                            ; +0x1b, 0x1800d69eb\nxor     r8d, r8d; wMsgFilterMin                                        ; +0x23, 0x1800d69f3\nlea     rcx, [rsp+88h+Msg]; lpMsg                                      ; +0x26, 0x1800d69f6\nxor     edx, edx; hWnd                                                 ; +0x2b, 0x1800d69fb\ncall    cs:PeekMessageW                                                ; +0x2d, 0x1800d69fd\ntest    eax, eax                                                       ; +0x33, 0x1800d6a03\njz      short loc_1800D6A67                                            ; +0x35, 0x1800d6a05\ncmp     [rsp+88h+Msg.message], 12h                                     ; +0x37, 0x1800d6a07\njnz     short loc_1800D6A32                                            ; +0x3c, 0x1800d6a0c\nmov     rbx, cs:qword_1801A9F60                                        ; +0x3e, 0x1800d6a0e\ntest    rbx, rbx                                                       ; +0x45, 0x1800d6a15\njz      short loc_1800D6A48                                            ; +0x48, 0x1800d6a18\nnop     word ptr [rax+rax+00h]                                         ; +0x4a, 0x1800d6a1a\nmov     rcx, rbx                                                       ; +0x50, 0x1800d6a20\ncall    sub_1800D42E0                                                  ; +0x53, 0x1800d6a23\nmov     rbx, [rbx]                                                     ; +0x58, 0x1800d6a28\ntest    rbx, rbx                                                       ; +0x5b, 0x1800d6a2b\njnz     short loc_1800D6A20                                            ; +0x5e, 0x1800d6a2e\njmp     short loc_1800D6A48                                            ; +0x60, 0x1800d6a30\nlea     rcx, [rsp+88h+Msg]; lpMsg                                      ; +0x62, 0x1800d6a32\ncall    cs:TranslateMessage                                            ; +0x67, 0x1800d6a37\nlea     rcx, [rsp+88h+Msg]; lpMsg                                      ; +0x6d, 0x1800d6a3d\ncall    cs:DispatchMessageW                                            ; +0x72, 0x1800d6a42\nxor     r9d, r9d; wMsgFilterMax                                        ; +0x78, 0x1800d6a48\nmov     [rsp+88h+wRemoveMsg], 1; wRemoveMsg                            ; +0x7b, 0x1800d6a4b\nxor     r8d, r8d; wMsgFilterMin                                        ; +0x83, 0x1800d6a53\nlea     rcx, [rsp+88h+Msg]; lpMsg                                      ; +0x86, 0x1800d6a56\nxor     edx, edx; hWnd                                                 ; +0x8b, 0x1800d6a5b\ncall    cs:PeekMessageW                                                ; +0x8d, 0x1800d6a5d\ntest    eax, eax                                                       ; +0x93, 0x1800d6a63\njnz     short loc_1800D6A07                                            ; +0x95, 0x1800d6a65\ncall    cs:GetActiveWindow                                             ; +0x97, 0x1800d6a67\ntest    rax, rax                                                       ; +0x9d, 0x1800d6a6d\njz      loc_1800D6B92                                                  ; +0xa0, 0x1800d6a70\nlea     rdx, String; \"GLFW\"                                            ; +0xa6, 0x1800d6a76\nmov     rcx, rax; hWnd                                                 ; +0xad, 0x1800d6a7d\ncall    cs:GetPropW                                                    ; +0xb0, 0x1800d6a80\nmov     rbx, rax                                                       ; +0xb6, 0x1800d6a86\ntest    rax, rax                                                       ; +0xb9, 0x1800d6a89\njz      loc_1800D6B92                                                  ; +0xbc, 0x1800d6a8c\nmov     [rsp+88h+arg_0], rdi                                           ; +0xc2, 0x1800d6a92\nmov     ecx, 0A0h; nVirtKey                                            ; +0xca, 0x1800d6a9a\nmovsx   edi, cs:word_1801AB8F0                                         ; +0xcf, 0x1800d6a9f\ncall    cs:GetKeyState                                                 ; +0xd6, 0x1800d6aa6\ntest    ax, ax                                                         ; +0xdc, 0x1800d6aac\njs      short loc_1800D6AD6                                            ; +0xdf, 0x1800d6aaf\ncmp     byte ptr [rbx+1DCh], 1                                         ; +0xe1, 0x1800d6ab1\njnz     short loc_1800D6AD6                                            ; +0xe8, 0x1800d6ab8\ncall    sub_1800D80F0                                                  ; +0xea, 0x1800d6aba\nxor     r9d, r9d                                                       ; +0xef, 0x1800d6abf\nmov     [rsp+88h+wRemoveMsg], eax                                      ; +0xf2, 0x1800d6ac2\nmov     r8d, edi                                                       ; +0xf6, 0x1800d6ac6\nmov     edx, 154h                                                      ; +0xf9, 0x1800d6ac9\nmov     rcx, rbx                                                       ; +0xfe, 0x1800d6ace\ncall    sub_1800D54B0                                                  ; +0x101, 0x1800d6ad1\nmovsx   edi, cs:word_1801AB8F8                                         ; +0x106, 0x1800d6ad6\nmov     ecx, 0A1h; nVirtKey                                            ; +0x10d, 0x1800d6add\ncall    cs:GetKeyState                                                 ; +0x112, 0x1800d6ae2\ntest    ax, ax                                                         ; +0x118, 0x1800d6ae8\njs      short loc_1800D6B12                                            ; +0x11b, 0x1800d6aeb\ncmp     byte ptr [rbx+1E0h], 1                                         ; +0x11d, 0x1800d6aed\njnz     short loc_1800D6B12                                            ; +0x124, 0x1800d6af4\ncall    sub_1800D80F0                                                  ; +0x126, 0x1800d6af6\nxor     r9d, r9d                                                       ; +0x12b, 0x1800d6afb\nmov     [rsp+88h+wRemoveMsg], eax                                      ; +0x12e, 0x1800d6afe\nmov     r8d, edi                                                       ; +0x132, 0x1800d6b02\nmov     edx, 158h                                                      ; +0x135, 0x1800d6b05\nmov     rcx, rbx                                                       ; +0x13a, 0x1800d6b0a\ncall    sub_1800D54B0                                                  ; +0x13d, 0x1800d6b0d\nmovsx   edi, cs:word_1801AB8F6                                         ; +0x142, 0x1800d6b12\nmov     ecx, 5Bh ; '['; nVirtKey                                       ; +0x149, 0x1800d6b19\ncall    cs:GetKeyState                                                 ; +0x14e, 0x1800d6b1e\ntest    ax, ax                                                         ; +0x154, 0x1800d6b24\njs      short loc_1800D6B4E                                            ; +0x157, 0x1800d6b27\ncmp     byte ptr [rbx+1DFh], 1                                         ; +0x159, 0x1800d6b29\njnz     short loc_1800D6B4E                                            ; +0x160, 0x1800d6b30\ncall    sub_1800D80F0                                                  ; +0x162, 0x1800d6b32\nxor     r9d, r9d                                                       ; +0x167, 0x1800d6b37\nmov     [rsp+88h+wRemoveMsg], eax                                      ; +0x16a, 0x1800d6b3a\nmov     r8d, edi                                                       ; +0x16e, 0x1800d6b3e\nmov     edx, 157h                                                      ; +0x171, 0x1800d6b41\nmov     rcx, rbx                                                       ; +0x176, 0x1800d6b46\ncall    sub_1800D54B0                                                  ; +0x179, 0x1800d6b49\nmovsx   edi, cs:word_1801AB8FE                                         ; +0x17e, 0x1800d6b4e\nmov     ecx, 5Ch ; '\\'; nVirtKey                                       ; +0x185, 0x1800d6b55\ncall    cs:GetKeyState                                                 ; +0x18a, 0x1800d6b5a\ntest    ax, ax                                                         ; +0x190, 0x1800d6b60\njs      short loc_1800D6B8A                                            ; +0x193, 0x1800d6b63\ncmp     byte ptr [rbx+1E3h], 1                                         ; +0x195, 0x1800d6b65\njnz     short loc_1800D6B8A                                            ; +0x19c, 0x1800d6b6c\ncall    sub_1800D80F0                                                  ; +0x19e, 0x1800d6b6e\nxor     r9d, r9d                                                       ; +0x1a3, 0x1800d6b73\nmov     [rsp+88h+wRemoveMsg], eax                                      ; +0x1a6, 0x1800d6b76\nmov     r8d, edi                                                       ; +0x1aa, 0x1800d6b7a\nmov     edx, 15Bh                                                      ; +0x1ad, 0x1800d6b7d\nmov     rcx, rbx                                                       ; +0x1b2, 0x1800d6b82\ncall    sub_1800D54B0                                                  ; +0x1b5, 0x1800d6b85\nmov     rdi, [rsp+88h+arg_0]                                           ; +0x1ba, 0x1800d6b8a\nmov     rbx, cs:qword_1801ABFE8                                        ; +0x1c2, 0x1800d6b92\ntest    rbx, rbx                                                       ; +0x1c9, 0x1800d6b99\njz      short loc_1800D6C17                                            ; +0x1cc, 0x1800d6b9c\nmov     rcx, [rbx+370h]; hWnd                                          ; +0x1ce, 0x1800d6b9e\nlea     rdx, [rsp+88h+Rect]; lpRect                                    ; +0x1d5, 0x1800d6ba5\ncall    cs:GetClientRect                                               ; +0x1da, 0x1800d6baa\nmov     eax, [rsp+88h+Rect.right]                                      ; +0x1e0, 0x1800d6bb0\nmov     r8d, [rsp+88h+Rect.bottom]                                     ; +0x1e4, 0x1800d6bb4\ncdq                                                                    ; +0x1e9, 0x1800d6bb9\nsub     eax, edx                                                       ; +0x1ea, 0x1800d6bba\nsar     eax, 1                                                         ; +0x1ec, 0x1800d6bbc\nmov     r9d, eax                                                       ; +0x1ee, 0x1800d6bbe\ncmp     [rbx+3A8h], eax                                                ; +0x1f1, 0x1800d6bc1\njnz     short loc_1800D6BD9                                            ; +0x1f7, 0x1800d6bc7\nmov     eax, r8d                                                       ; +0x1f9, 0x1800d6bc9\ncdq                                                                    ; +0x1fc, 0x1800d6bcc\nsub     eax, edx                                                       ; +0x1fd, 0x1800d6bcd\nsar     eax, 1                                                         ; +0x1ff, 0x1800d6bcf\ncmp     [rbx+3ACh], eax                                                ; +0x201, 0x1800d6bd1\njz      short loc_1800D6C17                                            ; +0x207, 0x1800d6bd7\nmov     rcx, [rbx+370h]; hWnd                                          ; +0x209, 0x1800d6bd9\nmov     eax, r8d                                                       ; +0x210, 0x1800d6be0\ncdq                                                                    ; +0x213, 0x1800d6be3\nmov     [rsp+88h+Rect.left], r9d                                       ; +0x214, 0x1800d6be4\nsub     eax, edx                                                       ; +0x219, 0x1800d6be9\nmov     [rbx+3A8h], r9d                                                ; +0x21b, 0x1800d6beb\nsar     eax, 1                                                         ; +0x222, 0x1800d6bf2\nlea     rdx, [rsp+88h+Rect]; lpPoint                                   ; +0x224, 0x1800d6bf4\nmov     [rsp+88h+Rect.top], eax                                        ; +0x229, 0x1800d6bf9\nmov     [rbx+3ACh], eax                                                ; +0x22d, 0x1800d6bfd\ncall    cs:ClientToScreen                                              ; +0x233, 0x1800d6c03\nmov     edx, [rsp+88h+Rect.top]; Y                                     ; +0x239, 0x1800d6c09\nmov     ecx, [rsp+88h+Rect.left]; X                                    ; +0x23d, 0x1800d6c0d\ncall    cs:SetCursorPos                                                ; +0x241, 0x1800d6c11\nmov     rcx, [rsp+88h+var_18]                                          ; +0x247, 0x1800d6c17\nxor     rcx, rsp; StackCookie                                          ; +0x24c, 0x1800d6c1c\ncall    __security_check_cookie                                        ; +0x24f, 0x1800d6c1f\nadd     rsp, 80h                                                       ; +0x254, 0x1800d6c24\npop     rbx                                                            ; +0x25b, 0x1800d6c2b\nretn                                                                   ; +0x25c, 0x1800d6c2c", "xrefs": ["cocos2d::CCEGLView::pollEvents @ 0x1800d4a85", "<???> @ 0x180142ed0", "<???> @ 0x180142ee0", "<???> @ 0x1801ba950"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}