{"type": "func", "start": 6443341616, "end": 6443341878, "name": "sub_1800D9730", "pseudocode": "// \n// sub_1800D9730 from 0x1800d9730 to 0x1800d9836 (262 bytes)\n// \n// 5 xrefs:\n// > sub_1800DA0D0 @ 0x1800da250\n// > sub_1800DA0D0 @ 0x1800da9dc\n// > sub_1800DA0D0 @ 0x1800dac96\n// > <???> @ 0x1801c4af4\n// > <???> @ 0x1801c4b00\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:22:34 +0000\n// \n\nint __fastcall sub_1800D9730(__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_1801B6068 = a1;\n  v2 = (HWND *)(a1 + 880);\n  if ( GetCursorPos(&Point) )\n  {\n    ScreenToClient(*v2, &Point);\n    *(double *)&qword_1801B6058 = (double)Point.x;\n    *(double *)&qword_1801B6060 = (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_1800DCF60(a1);\n  result = sub_1800D9170(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_1800E1AF0(65544, \"Win32: Failed to register raw input device\");\n  }\n  return result;\n}", "assembly": "; \n; sub_1800D9730 from 0x1800d9730 to 0x1800d9836 (262 bytes)\n; \n; 5 xrefs:\n; > sub_1800DA0D0 @ 0x1800da250\n; > sub_1800DA0D0 @ 0x1800da9dc\n; > sub_1800DA0D0 @ 0x1800dac96\n; > <???> @ 0x1801c4af4\n; > <???> @ 0x1801c4b00\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:22:34 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1800d9730\npush    rdi                                                            ; +0x5, 0x1800d9735\nsub     rsp, 30h                                                       ; +0x6, 0x1800d9736\nmov     rbx, rcx                                                       ; +0xa, 0x1800d973a\nmov     cs:qword_1801B6068, rcx                                        ; +0xd, 0x1800d973d\nlea     rdi, [rcx+370h]                                                ; +0x14, 0x1800d9744\nlea     rcx, [rsp+38h+Point]; lpPoint                                  ; +0x1b, 0x1800d974b\ncall    cs:GetCursorPos                                                ; +0x20, 0x1800d9750\ntest    eax, eax                                                       ; +0x26, 0x1800d9756\njz      short loc_1800D978C                                            ; +0x28, 0x1800d9758\nmov     rcx, [rdi]; hWnd                                               ; +0x2a, 0x1800d975a\nlea     rdx, [rsp+38h+Point]; lpPoint                                  ; +0x2d, 0x1800d975d\ncall    cs:ScreenToClient                                              ; +0x32, 0x1800d9762\nmovd    xmm0, [rsp+38h+Point.x]                                        ; +0x38, 0x1800d9768\nmovd    xmm1, [rsp+38h+Point.y]                                        ; +0x3e, 0x1800d976e\ncvtdq2pd xmm0, xmm0                                                    ; +0x44, 0x1800d9774\ncvtdq2pd xmm1, xmm1                                                    ; +0x48, 0x1800d9778\nmovsd   cs:qword_1801B6058, xmm0                                       ; +0x4c, 0x1800d977c\nmovsd   cs:qword_1801B6060, xmm1                                       ; +0x54, 0x1800d9784\ncmp     dword ptr [rbx+7Ch], 34001h                                    ; +0x5c, 0x1800d978c\njnz     short loc_1800D97D0                                            ; +0x63, 0x1800d9793\nmov     rcx, [rbx+50h]                                                 ; +0x65, 0x1800d9795\ntest    rcx, rcx                                                       ; +0x69, 0x1800d9799\njz      short loc_1800D97B1                                            ; +0x6c, 0x1800d979c\nmov     rcx, [rcx+8]; hCursor                                          ; +0x6e, 0x1800d979e\ncall    cs:SetCursor                                                   ; +0x72, 0x1800d97a2\nlea     rdi, [rbx+370h]                                                ; +0x78, 0x1800d97a8\njmp     short loc_1800D97D8                                            ; +0x7f, 0x1800d97af\nmov     edx, 7F00h; lpCursorName                                       ; +0x81, 0x1800d97b1\nxor     ecx, ecx; hInstance                                            ; +0x86, 0x1800d97b6\ncall    cs:LoadCursorW                                                 ; +0x88, 0x1800d97b8\nmov     rcx, rax; hCursor                                              ; +0x8e, 0x1800d97be\ncall    cs:SetCursor                                                   ; +0x91, 0x1800d97c1\nlea     rdi, [rbx+370h]                                                ; +0x97, 0x1800d97c7\njmp     short loc_1800D97D8                                            ; +0x9e, 0x1800d97ce\nxor     ecx, ecx; hCursor                                              ; +0xa0, 0x1800d97d0\ncall    cs:SetCursor                                                   ; +0xa2, 0x1800d97d2\nmov     rcx, rbx                                                       ; +0xa8, 0x1800d97d8\ncall    sub_1800DCF60                                                  ; +0xab, 0x1800d97db\nmov     rcx, rbx                                                       ; +0xb0, 0x1800d97e0\ncall    sub_1800D9170                                                  ; +0xb3, 0x1800d97e3\ncmp     dword ptr [rbx+1F8h], 0                                        ; +0xb8, 0x1800d97e8\njz      short loc_1800D982B                                            ; +0xbf, 0x1800d97ef\nmov     rax, [rdi]                                                     ; +0xc1, 0x1800d97f1\nlea     rcx, [rsp+38h+pRawInputDevices]; pRawInputDevices              ; +0xc4, 0x1800d97f4\nmov     edx, 1; uiNumDevices                                           ; +0xc9, 0x1800d97f9\nmov     qword ptr [rsp+38h+pRawInputDevices.usUsagePage], 20001h       ; +0xce, 0x1800d97fe\nmov     [rsp+38h+pRawInputDevices.hwndTarget], rax                     ; +0xd7, 0x1800d9807\nlea     r8d, [rdx+0Fh]; cbSize                                         ; +0xdc, 0x1800d980c\ncall    cs:RegisterRawInputDevices                                     ; +0xe0, 0x1800d9810\ntest    eax, eax                                                       ; +0xe6, 0x1800d9816\njnz     short loc_1800D982B                                            ; +0xe8, 0x1800d9818\nlea     rdx, aWin32FailedToR; \"Win32: Failed to register raw input dev\"... ; +0xea, 0x1800d981a\nmov     ecx, 10008h                                                    ; +0xf1, 0x1800d9821\ncall    sub_1800E1AF0                                                  ; +0xf6, 0x1800d9826\nmov     rbx, [rsp+38h+arg_8]                                           ; +0xfb, 0x1800d982b\nadd     rsp, 30h                                                       ; +0x100, 0x1800d9830\npop     rdi                                                            ; +0x104, 0x1800d9834\nretn                                                                   ; +0x105, 0x1800d9835", "xrefs": ["sub_1800DA0D0 @ 0x1800da250", "sub_1800DA0D0 @ 0x1800da9dc", "sub_1800DA0D0 @ 0x1800dac96", "<???> @ 0x1801c4af4", "<???> @ 0x1801c4b00"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}