{"type": "func", "start": 6443337280, "end": 6443337619, "name": "sub_1800D8640", "pseudocode": "// \n// sub_1800D8640 from 0x1800d8640 to 0x1800d8793 (339 bytes)\n// \n// 2 xrefs:\n// > sub_1800DD5A0 @ 0x1800dd61d\n// > <???> @ 0x1801c4a40\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:33 +0000\n// \n\nHCURSOR __fastcall sub_1800D8640(__int64 a1, int a2)\n{\n  HCURSOR result; // rax\n  __int64 v5; // rcx\n  HCURSOR CursorW; // rax\n  struct tagPOINT Point; // [rsp+30h] [rbp+8h] BYREF\n\n  if ( *(HWND *)(a1 + 880) == GetActiveWindow() )\n  {\n    if ( a2 == 212995 )\n    {\n      if ( GetCursorPos(&Point) )\n      {\n        ScreenToClient(*(HWND *)(a1 + 880), &Point);\n        *(double *)&qword_1801B6058 = (double)Point.x;\n        *(double *)&qword_1801B6060 = (double)Point.y;\n      }\n      sub_1800DCF60(a1);\n      if ( *(_DWORD *)(a1 + 504) )\n        sub_1800D9990(a1);\n      sub_1800D9170(a1);\n      qword_1801B6068 = a1;\n    }\n    else\n    {\n      if ( qword_1801B6068 == a1 && *(_DWORD *)(a1 + 504) )\n        sub_1800D9840(a1);\n      ClipCursor(nullptr);\n      qword_1801B6070 = 0;\n      if ( qword_1801B6068 == a1 )\n      {\n        qword_1801B6068 = 0;\n        sub_1800D87A0(a1);\n      }\n    }\n  }\n  result = (HCURSOR)sub_1800D9690(a1);\n  if ( (_DWORD)result )\n  {\n    if ( *(_DWORD *)(a1 + 124) == 212993 )\n    {\n      v5 = *(_QWORD *)(a1 + 80);\n      if ( v5 )\n      {\n        return SetCursor(*(HCURSOR *)(v5 + 8));\n      }\n      else\n      {\n        CursorW = LoadCursorW(nullptr, (LPCWSTR)0x7F00);\n        return SetCursor(CursorW);\n      }\n    }\n    else\n    {\n      return SetCursor(nullptr);\n    }\n  }\n  return result;\n}", "assembly": "; \n; sub_1800D8640 from 0x1800d8640 to 0x1800d8793 (339 bytes)\n; \n; 2 xrefs:\n; > sub_1800DD5A0 @ 0x1800dd61d\n; > <???> @ 0x1801c4a40\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:33 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1800d8640\npush    rdi                                                            ; +0x5, 0x1800d8645\nsub     rsp, 20h                                                       ; +0x6, 0x1800d8646\nmov     edi, edx                                                       ; +0xa, 0x1800d864a\nmov     rbx, rcx                                                       ; +0xc, 0x1800d864c\ncall    cs:GetActiveWindow                                             ; +0xf, 0x1800d864f\ncmp     [rbx+370h], rax                                                ; +0x15, 0x1800d8655\njnz     loc_1800D872C                                                  ; +0x1c, 0x1800d865c\ncmp     edi, 34003h                                                    ; +0x22, 0x1800d8662\njnz     short loc_1800D86D9                                            ; +0x28, 0x1800d8668\nlea     rcx, [rsp+28h+Point]; lpPoint                                  ; +0x2a, 0x1800d866a\ncall    cs:GetCursorPos                                                ; +0x2f, 0x1800d866f\ntest    eax, eax                                                       ; +0x35, 0x1800d8675\njz      short loc_1800D86AF                                            ; +0x37, 0x1800d8677\nmov     rcx, [rbx+370h]; hWnd                                          ; +0x39, 0x1800d8679\nlea     rdx, [rsp+28h+Point]; lpPoint                                  ; +0x40, 0x1800d8680\ncall    cs:ScreenToClient                                              ; +0x45, 0x1800d8685\nmovd    xmm0, [rsp+28h+Point.x]                                        ; +0x4b, 0x1800d868b\nmovd    xmm1, [rsp+28h+Point.y]                                        ; +0x51, 0x1800d8691\ncvtdq2pd xmm0, xmm0                                                    ; +0x57, 0x1800d8697\ncvtdq2pd xmm1, xmm1                                                    ; +0x5b, 0x1800d869b\nmovsd   cs:qword_1801B6058, xmm0                                       ; +0x5f, 0x1800d869f\nmovsd   cs:qword_1801B6060, xmm1                                       ; +0x67, 0x1800d86a7\nmov     rcx, rbx                                                       ; +0x6f, 0x1800d86af\ncall    sub_1800DCF60                                                  ; +0x72, 0x1800d86b2\ncmp     dword ptr [rbx+1F8h], 0                                        ; +0x77, 0x1800d86b7\njz      short loc_1800D86C8                                            ; +0x7e, 0x1800d86be\nmov     rcx, rbx                                                       ; +0x80, 0x1800d86c0\ncall    sub_1800D9990                                                  ; +0x83, 0x1800d86c3\nmov     rcx, rbx                                                       ; +0x88, 0x1800d86c8\ncall    sub_1800D9170                                                  ; +0x8b, 0x1800d86cb\nmov     cs:qword_1801B6068, rbx                                        ; +0x90, 0x1800d86d0\njmp     short loc_1800D872C                                            ; +0x97, 0x1800d86d7\ncmp     cs:qword_1801B6068, rbx                                        ; +0x99, 0x1800d86d9\njnz     short loc_1800D86F3                                            ; +0xa0, 0x1800d86e0\ncmp     dword ptr [rbx+1F8h], 0                                        ; +0xa2, 0x1800d86e2\njz      short loc_1800D86F3                                            ; +0xa9, 0x1800d86e9\nmov     rcx, rbx                                                       ; +0xab, 0x1800d86eb\ncall    sub_1800D9840                                                  ; +0xae, 0x1800d86ee\nxor     ecx, ecx; lpRect                                               ; +0xb3, 0x1800d86f3\ncall    cs:ClipCursor                                                  ; +0xb5, 0x1800d86f5\nxor     eax, eax                                                       ; +0xbb, 0x1800d86fb\ncmp     cs:qword_1801B6068, rbx                                        ; +0xbd, 0x1800d86fd\nmov     cs:qword_1801B6070, rax                                        ; +0xc4, 0x1800d8704\njnz     short loc_1800D872C                                            ; +0xcb, 0x1800d870b\nmovsd   xmm2, cs:qword_1801B6060                                       ; +0xcd, 0x1800d870d\nmov     rcx, rbx                                                       ; +0xd5, 0x1800d8715\nmovsd   xmm1, cs:qword_1801B6058                                       ; +0xd8, 0x1800d8718\nmov     cs:qword_1801B6068, rax                                        ; +0xe0, 0x1800d8720\ncall    sub_1800D87A0                                                  ; +0xe7, 0x1800d8727\nmov     rcx, rbx                                                       ; +0xec, 0x1800d872c\ncall    sub_1800D9690                                                  ; +0xef, 0x1800d872f\ntest    eax, eax                                                       ; +0xf4, 0x1800d8734\njz      short loc_1800D8788                                            ; +0xf6, 0x1800d8736\ncmp     dword ptr [rbx+7Ch], 34001h                                    ; +0xf8, 0x1800d8738\njnz     short loc_1800D8780                                            ; +0xff, 0x1800d873f\nmov     rcx, [rbx+50h]                                                 ; +0x101, 0x1800d8741\ntest    rcx, rcx                                                       ; +0x105, 0x1800d8745\njz      short loc_1800D875F                                            ; +0x108, 0x1800d8748\nmov     rcx, [rcx+8]                                                   ; +0x10a, 0x1800d874a\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x10e, 0x1800d874e\nadd     rsp, 20h                                                       ; +0x113, 0x1800d8753\npop     rdi                                                            ; +0x117, 0x1800d8757\njmp     cs:SetCursor                                                   ; +0x118, 0x1800d8758\nmov     edx, 7F00h; lpCursorName                                       ; +0x11f, 0x1800d875f\nxor     ecx, ecx; hInstance                                            ; +0x124, 0x1800d8764\ncall    cs:LoadCursorW                                                 ; +0x126, 0x1800d8766\nmov     rcx, rax                                                       ; +0x12c, 0x1800d876c\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x12f, 0x1800d876f\nadd     rsp, 20h                                                       ; +0x134, 0x1800d8774\npop     rdi                                                            ; +0x138, 0x1800d8778\njmp     cs:SetCursor                                                   ; +0x139, 0x1800d8779\nxor     ecx, ecx; hCursor                                              ; +0x140, 0x1800d8780\ncall    cs:SetCursor                                                   ; +0x142, 0x1800d8782\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x148, 0x1800d8788\nadd     rsp, 20h                                                       ; +0x14d, 0x1800d878d\npop     rdi                                                            ; +0x151, 0x1800d8791\nretn                                                                   ; +0x152, 0x1800d8792", "xrefs": ["sub_1800DD5A0 @ 0x1800dd61d", "<???> @ 0x1801c4a40"], "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"}