{"type": "func", "start": 6443341968, "end": 6443342222, "name": "sub_1800D9890", "pseudocode": "// \n// sub_1800D9890 from 0x1800d9890 to 0x1800d998e (254 bytes)\n// \n// 4 xrefs:\n// > sub_1800D7FA0 @ 0x1800d7fd2\n// > sub_1800DA0D0 @ 0x1800da266\n// > sub_1800DA0D0 @ 0x1800dac5d\n// > <???> @ 0x1801c4b18\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\nHCURSOR __fastcall sub_1800D9890(__int64 a1)\n{\n  LONG v2; // eax\n  HWND v3; // rcx\n  __int64 v4; // rcx\n  HCURSOR CursorW; // rax\n  RAWINPUTDEVICE pRawInputDevices; // [rsp+20h] [rbp-18h] BYREF\n  struct tagPOINT Point; // [rsp+40h] [rbp+8h] BYREF\n\n  if ( *(_DWORD *)(a1 + 504) )\n  {\n    *(_DWORD *)&pRawInputDevices.usUsagePage = 131073;\n    pRawInputDevices.dwFlags = 1;\n    pRawInputDevices.hwndTarget = nullptr;\n    if ( !RegisterRawInputDevices(&pRawInputDevices, 1u, 0x10u) )\n      sub_1800E1AF0(65544, \"Win32: Failed to remove raw input device\");\n  }\n  qword_1801B6068 = 0;\n  ClipCursor(nullptr);\n  qword_1801B6070 = 0;\n  v2 = (int)*(double *)&qword_1801B6060;\n  Point.x = (int)*(double *)&qword_1801B6058;\n  *(_DWORD *)(a1 + 936) = (int)*(double *)&qword_1801B6058;\n  v3 = *(HWND *)(a1 + 880);\n  Point.y = v2;\n  *(_DWORD *)(a1 + 940) = v2;\n  ClientToScreen(v3, &Point);\n  SetCursorPos(Point.x, Point.y);\n  if ( *(_DWORD *)(a1 + 124) != 212993 )\n    return SetCursor(nullptr);\n  v4 = *(_QWORD *)(a1 + 80);\n  if ( v4 )\n    return SetCursor(*(HCURSOR *)(v4 + 8));\n  CursorW = LoadCursorW(nullptr, (LPCWSTR)0x7F00);\n  return SetCursor(CursorW);\n}", "assembly": "; \n; sub_1800D9890 from 0x1800d9890 to 0x1800d998e (254 bytes)\n; \n; 4 xrefs:\n; > sub_1800D7FA0 @ 0x1800d7fd2\n; > sub_1800DA0D0 @ 0x1800da266\n; > sub_1800DA0D0 @ 0x1800dac5d\n; > <???> @ 0x1801c4b18\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; \npush    rbx                                                            ; +0x0, 0x1800d9890\nsub     rsp, 30h                                                       ; +0x2, 0x1800d9892\ncmp     dword ptr [rcx+1F8h], 0                                        ; +0x6, 0x1800d9896\nmov     rbx, rcx                                                       ; +0xd, 0x1800d989d\njz      short loc_1800D98E0                                            ; +0x10, 0x1800d98a0\nmov     edx, 1; uiNumDevices                                           ; +0x12, 0x1800d98a2\nmov     dword ptr [rsp+38h+pRawInputDevices.usUsagePage], 20001h       ; +0x17, 0x1800d98a7\nlea     rcx, [rsp+38h+pRawInputDevices]; pRawInputDevices              ; +0x1f, 0x1800d98af\nmov     [rsp+38h+pRawInputDevices.dwFlags], edx                        ; +0x24, 0x1800d98b4\nmov     [rsp+38h+pRawInputDevices.hwndTarget], 0                       ; +0x28, 0x1800d98b8\nlea     r8d, [rdx+0Fh]; cbSize                                         ; +0x31, 0x1800d98c1\ncall    cs:RegisterRawInputDevices                                     ; +0x35, 0x1800d98c5\ntest    eax, eax                                                       ; +0x3b, 0x1800d98cb\njnz     short loc_1800D98E0                                            ; +0x3d, 0x1800d98cd\nlea     rdx, aWin32FailedToR_0; \"Win32: Failed to remove raw input devic\"... ; +0x3f, 0x1800d98cf\nmov     ecx, 10008h                                                    ; +0x46, 0x1800d98d6\ncall    sub_1800E1AF0                                                  ; +0x4b, 0x1800d98db\nxor     ecx, ecx; lpRect                                               ; +0x50, 0x1800d98e0\nmov     cs:qword_1801B6068, 0                                          ; +0x52, 0x1800d98e2\ncall    cs:ClipCursor                                                  ; +0x5d, 0x1800d98ed\ncvttsd2si ecx, cs:qword_1801B6058                                      ; +0x63, 0x1800d98f3\nmov     cs:qword_1801B6070, 0                                          ; +0x6b, 0x1800d98fb\nlea     rdx, [rsp+38h+Point]; lpPoint                                  ; +0x76, 0x1800d9906\ncvttsd2si eax, cs:qword_1801B6060                                      ; +0x7b, 0x1800d990b\nmov     [rsp+38h+Point.x], ecx                                         ; +0x83, 0x1800d9913\nmov     [rbx+3A8h], ecx                                                ; +0x87, 0x1800d9917\nmov     rcx, [rbx+370h]; hWnd                                          ; +0x8d, 0x1800d991d\nmov     [rsp+38h+Point.y], eax                                         ; +0x94, 0x1800d9924\nmov     [rbx+3ACh], eax                                                ; +0x98, 0x1800d9928\ncall    cs:ClientToScreen                                              ; +0x9e, 0x1800d992e\nmov     edx, [rsp+38h+Point.y]; Y                                      ; +0xa4, 0x1800d9934\nmov     ecx, [rsp+38h+Point.x]; X                                      ; +0xa8, 0x1800d9938\ncall    cs:SetCursorPos                                                ; +0xac, 0x1800d993c\ncmp     dword ptr [rbx+7Ch], 34001h                                    ; +0xb2, 0x1800d9942\njnz     short loc_1800D9980                                            ; +0xb9, 0x1800d9949\nmov     rcx, [rbx+50h]                                                 ; +0xbb, 0x1800d994b\ntest    rcx, rcx                                                       ; +0xbf, 0x1800d994f\njz      short loc_1800D9964                                            ; +0xc2, 0x1800d9952\nmov     rcx, [rcx+8]                                                   ; +0xc4, 0x1800d9954\nadd     rsp, 30h                                                       ; +0xc8, 0x1800d9958\npop     rbx                                                            ; +0xcc, 0x1800d995c\njmp     cs:SetCursor                                                   ; +0xcd, 0x1800d995d\nmov     edx, 7F00h; lpCursorName                                       ; +0xd4, 0x1800d9964\nxor     ecx, ecx; hInstance                                            ; +0xd9, 0x1800d9969\ncall    cs:LoadCursorW                                                 ; +0xdb, 0x1800d996b\nmov     rcx, rax                                                       ; +0xe1, 0x1800d9971\nadd     rsp, 30h                                                       ; +0xe4, 0x1800d9974\npop     rbx                                                            ; +0xe8, 0x1800d9978\njmp     cs:SetCursor                                                   ; +0xe9, 0x1800d9979\nxor     ecx, ecx                                                       ; +0xf0, 0x1800d9980\nadd     rsp, 30h                                                       ; +0xf2, 0x1800d9982\npop     rbx                                                            ; +0xf6, 0x1800d9986\njmp     cs:SetCursor                                                   ; +0xf7, 0x1800d9987", "xrefs": ["sub_1800D7FA0 @ 0x1800d7fd2", "sub_1800DA0D0 @ 0x1800da266", "sub_1800DA0D0 @ 0x1800dac5d", "<???> @ 0x1801c4b18"], "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"}