{"type": "func", "start": 6443335072, "end": 6443335334, "name": "sub_1800D7DA0", "pseudocode": "// \n// sub_1800D7DA0 from 0x1800d7da0 to 0x1800d7ea6 (262 bytes)\n// \n// 5 xrefs:\n// > sub_1800D8740 @ 0x1800d88c0\n// > sub_1800D8740 @ 0x1800d904c\n// > sub_1800D8740 @ 0x1800d9306\n// > <???> @ 0x1801baa34\n// > <???> @ 0x1801baa40\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\nint __fastcall sub_1800D7DA0(__int64 a1)\n{\n  HWND *v2; // rdi\n  __int64 v3; // rcx\n  HCURSOR CursorW; // rax\n  int result; // eax\n  HWND v6; // rax\n  RAWINPUTDEVICE pRawInputDevices; // [rsp+20h] [rbp-18h] BYREF\n  struct tagPOINT Point; // [rsp+40h] [rbp+8h] BYREF\n\n  qword_1801ABFE8 = a1;\n  v2 = (HWND *)(a1 + 880);\n  if ( GetCursorPos(&Point) )\n  {\n    ScreenToClient(*v2, &Point);\n    *(double *)&qword_1801ABFD8 = (double)Point.x;\n    *(double *)&qword_1801ABFE0 = (double)Point.y;\n  }\n  if ( *(_DWORD *)(a1 + 124) == 212993 )\n  {\n    v3 = *(_QWORD *)(a1 + 80);\n    if ( v3 )\n    {\n      SetCursor(*(HCURSOR *)(v3 + 8));\n    }\n    else\n    {\n      CursorW = LoadCursorW(nullptr, (LPCWSTR)0x7F00);\n      SetCursor(CursorW);\n    }\n    v2 = (HWND *)(a1 + 880);\n  }\n  else\n  {\n    SetCursor(nullptr);\n  }\n  sub_1800D5230(a1);\n  result = sub_1800D77E0(a1);\n  if ( *(_DWORD *)(a1 + 504) )\n  {\n    v6 = *v2;\n    *(_QWORD *)&pRawInputDevices.usUsagePage = 131073;\n    pRawInputDevices.hwndTarget = v6;\n    result = RegisterRawInputDevices(&pRawInputDevices, 1u, 0x10u);\n    if ( !result )\n      return sub_1800D9BA0(65544, \"Win32: Failed to register raw input device\");\n  }\n  return result;\n}", "assembly": "; \n; sub_1800D7DA0 from 0x1800d7da0 to 0x1800d7ea6 (262 bytes)\n; \n; 5 xrefs:\n; > sub_1800D8740 @ 0x1800d88c0\n; > sub_1800D8740 @ 0x1800d904c\n; > sub_1800D8740 @ 0x1800d9306\n; > <???> @ 0x1801baa34\n; > <???> @ 0x1801baa40\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\nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1800d7da0\npush    rdi                                                            ; +0x5, 0x1800d7da5\nsub     rsp, 30h                                                       ; +0x6, 0x1800d7da6\nmov     rbx, rcx                                                       ; +0xa, 0x1800d7daa\nmov     cs:qword_1801ABFE8, rcx                                        ; +0xd, 0x1800d7dad\nlea     rdi, [rcx+370h]                                                ; +0x14, 0x1800d7db4\nlea     rcx, [rsp+38h+Point]; lpPoint                                  ; +0x1b, 0x1800d7dbb\ncall    cs:GetCursorPos                                                ; +0x20, 0x1800d7dc0\ntest    eax, eax                                                       ; +0x26, 0x1800d7dc6\njz      short loc_1800D7DFC                                            ; +0x28, 0x1800d7dc8\nmov     rcx, [rdi]; hWnd                                               ; +0x2a, 0x1800d7dca\nlea     rdx, [rsp+38h+Point]; lpPoint                                  ; +0x2d, 0x1800d7dcd\ncall    cs:ScreenToClient                                              ; +0x32, 0x1800d7dd2\nmovd    xmm0, [rsp+38h+Point.x]                                        ; +0x38, 0x1800d7dd8\nmovd    xmm1, [rsp+38h+Point.y]                                        ; +0x3e, 0x1800d7dde\ncvtdq2pd xmm0, xmm0                                                    ; +0x44, 0x1800d7de4\ncvtdq2pd xmm1, xmm1                                                    ; +0x48, 0x1800d7de8\nmovsd   cs:qword_1801ABFD8, xmm0                                       ; +0x4c, 0x1800d7dec\nmovsd   cs:qword_1801ABFE0, xmm1                                       ; +0x54, 0x1800d7df4\ncmp     dword ptr [rbx+7Ch], 34001h                                    ; +0x5c, 0x1800d7dfc\njnz     short loc_1800D7E40                                            ; +0x63, 0x1800d7e03\nmov     rcx, [rbx+50h]                                                 ; +0x65, 0x1800d7e05\ntest    rcx, rcx                                                       ; +0x69, 0x1800d7e09\njz      short loc_1800D7E21                                            ; +0x6c, 0x1800d7e0c\nmov     rcx, [rcx+8]; hCursor                                          ; +0x6e, 0x1800d7e0e\ncall    cs:SetCursor                                                   ; +0x72, 0x1800d7e12\nlea     rdi, [rbx+370h]                                                ; +0x78, 0x1800d7e18\njmp     short loc_1800D7E48                                            ; +0x7f, 0x1800d7e1f\nmov     edx, 7F00h; lpCursorName                                       ; +0x81, 0x1800d7e21\nxor     ecx, ecx; hInstance                                            ; +0x86, 0x1800d7e26\ncall    cs:LoadCursorW                                                 ; +0x88, 0x1800d7e28\nmov     rcx, rax; hCursor                                              ; +0x8e, 0x1800d7e2e\ncall    cs:SetCursor                                                   ; +0x91, 0x1800d7e31\nlea     rdi, [rbx+370h]                                                ; +0x97, 0x1800d7e37\njmp     short loc_1800D7E48                                            ; +0x9e, 0x1800d7e3e\nxor     ecx, ecx; hCursor                                              ; +0xa0, 0x1800d7e40\ncall    cs:SetCursor                                                   ; +0xa2, 0x1800d7e42\nmov     rcx, rbx                                                       ; +0xa8, 0x1800d7e48\ncall    sub_1800D5230                                                  ; +0xab, 0x1800d7e4b\nmov     rcx, rbx                                                       ; +0xb0, 0x1800d7e50\ncall    sub_1800D77E0                                                  ; +0xb3, 0x1800d7e53\ncmp     dword ptr [rbx+1F8h], 0                                        ; +0xb8, 0x1800d7e58\njz      short loc_1800D7E9B                                            ; +0xbf, 0x1800d7e5f\nmov     rax, [rdi]                                                     ; +0xc1, 0x1800d7e61\nlea     rcx, [rsp+38h+pRawInputDevices]; pRawInputDevices              ; +0xc4, 0x1800d7e64\nmov     edx, 1; uiNumDevices                                           ; +0xc9, 0x1800d7e69\nmov     qword ptr [rsp+38h+pRawInputDevices.usUsagePage], 20001h       ; +0xce, 0x1800d7e6e\nmov     [rsp+38h+pRawInputDevices.hwndTarget], rax                     ; +0xd7, 0x1800d7e77\nlea     r8d, [rdx+0Fh]; cbSize                                         ; +0xdc, 0x1800d7e7c\ncall    cs:RegisterRawInputDevices                                     ; +0xe0, 0x1800d7e80\ntest    eax, eax                                                       ; +0xe6, 0x1800d7e86\njnz     short loc_1800D7E9B                                            ; +0xe8, 0x1800d7e88\nlea     rdx, aWin32FailedToR; \"Win32: Failed to register raw input dev\"... ; +0xea, 0x1800d7e8a\nmov     ecx, 10008h                                                    ; +0xf1, 0x1800d7e91\ncall    sub_1800D9BA0                                                  ; +0xf6, 0x1800d7e96\nmov     rbx, [rsp+38h+arg_8]                                           ; +0xfb, 0x1800d7e9b\nadd     rsp, 30h                                                       ; +0x100, 0x1800d7ea0\npop     rdi                                                            ; +0x104, 0x1800d7ea4\nretn                                                                   ; +0x105, 0x1800d7ea5", "xrefs": ["sub_1800D8740 @ 0x1800d88c0", "sub_1800D8740 @ 0x1800d904c", "sub_1800D8740 @ 0x1800d9306", "<???> @ 0x1801baa34", "<???> @ 0x1801baa40"], "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"}