{"type": "func", "start": 6443337712, "end": 6443337855, "name": "sub_1800D87F0", "pseudocode": "// \n// sub_1800D87F0 from 0x1800d87f0 to 0x1800d887f (143 bytes)\n// \n// 2 xrefs:\n// > sub_1800DD5A0 @ 0x1800dd78c\n// > <???> @ 0x1801c4a58\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\nvoid __fastcall sub_1800D87F0(__int64 a1, int a2)\n{\n  RAWINPUTDEVICE pRawInputDevices; // [rsp+20h] [rbp-18h] BYREF\n\n  if ( qword_1801B6068 == a1 )\n  {\n    if ( a2 )\n    {\n      pRawInputDevices.hwndTarget = *(HWND *)(a1 + 880);\n      *(_QWORD *)&pRawInputDevices.usUsagePage = 131073;\n      if ( !RegisterRawInputDevices(&pRawInputDevices, 1u, 0x10u) )\n        sub_1800E1AF0(65544, \"Win32: Failed to register raw input device\");\n    }\n    else\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  }\n}", "assembly": "; \n; sub_1800D87F0 from 0x1800d87f0 to 0x1800d887f (143 bytes)\n; \n; 2 xrefs:\n; > sub_1800DD5A0 @ 0x1800dd78c\n; > <???> @ 0x1801c4a58\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; \nsub     rsp, 38h                                                       ; +0x0, 0x1800d87f0\ncmp     cs:qword_1801B6068, rcx                                        ; +0x4, 0x1800d87f4\njnz     short loc_1800D887A                                            ; +0xb, 0x1800d87fb\nmov     r8d, 10h; cbSize                                               ; +0xd, 0x1800d87fd\ntest    edx, edx                                                       ; +0x13, 0x1800d8803\nlea     edx, [r8-0Fh]; uiNumDevices                                    ; +0x15, 0x1800d8805\njz      short loc_1800D8845                                            ; +0x19, 0x1800d8809\nmov     rax, [rcx+370h]                                                ; +0x1b, 0x1800d880b\nlea     rcx, [rsp+38h+pRawInputDevices]; pRawInputDevices              ; +0x22, 0x1800d8812\nmov     [rsp+38h+pRawInputDevices.hwndTarget], rax                     ; +0x27, 0x1800d8817\nmov     qword ptr [rsp+38h+pRawInputDevices.usUsagePage], 20001h       ; +0x2c, 0x1800d881c\ncall    cs:RegisterRawInputDevices                                     ; +0x35, 0x1800d8825\ntest    eax, eax                                                       ; +0x3b, 0x1800d882b\njnz     short loc_1800D887A                                            ; +0x3d, 0x1800d882d\nlea     rdx, aWin32FailedToR; \"Win32: Failed to register raw input dev\"... ; +0x3f, 0x1800d882f\nmov     ecx, 10008h                                                    ; +0x46, 0x1800d8836\ncall    sub_1800E1AF0                                                  ; +0x4b, 0x1800d883b\nadd     rsp, 38h                                                       ; +0x50, 0x1800d8840\nretn                                                                   ; +0x54, 0x1800d8844\nlea     rcx, [rsp+38h+pRawInputDevices]; pRawInputDevices              ; +0x55, 0x1800d8845\nmov     dword ptr [rsp+38h+pRawInputDevices.usUsagePage], 20001h       ; +0x5a, 0x1800d884a\nmov     [rsp+38h+pRawInputDevices.dwFlags], edx                        ; +0x62, 0x1800d8852\nmov     [rsp+38h+pRawInputDevices.hwndTarget], 0                       ; +0x66, 0x1800d8856\ncall    cs:RegisterRawInputDevices                                     ; +0x6f, 0x1800d885f\ntest    eax, eax                                                       ; +0x75, 0x1800d8865\njnz     short loc_1800D887A                                            ; +0x77, 0x1800d8867\nlea     rdx, aWin32FailedToR_0; \"Win32: Failed to remove raw input devic\"... ; +0x79, 0x1800d8869\nmov     ecx, 10008h                                                    ; +0x80, 0x1800d8870\ncall    sub_1800E1AF0                                                  ; +0x85, 0x1800d8875\nadd     rsp, 38h                                                       ; +0x8a, 0x1800d887a\nretn                                                                   ; +0x8e, 0x1800d887e", "xrefs": ["sub_1800DD5A0 @ 0x1800dd78c", "<???> @ 0x1801c4a58"], "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"}