{"type": "func", "start": 6443331168, "end": 6443331311, "name": "sub_1800D6E60", "pseudocode": "// \n// sub_1800D6E60 from 0x1800d6e60 to 0x1800d6eef (143 bytes)\n// \n// 2 xrefs:\n// > sub_1800D5870 @ 0x1800d5a5c\n// > <???> @ 0x1801ba998\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\nvoid __fastcall sub_1800D6E60(__int64 a1, int a2)\n{\n  RAWINPUTDEVICE pRawInputDevices; // [rsp+20h] [rbp-18h] BYREF\n\n  if ( qword_1801ABFE8 == 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_1800D9BA0(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_1800D9BA0(65544, \"Win32: Failed to remove raw input device\");\n    }\n  }\n}", "assembly": "; \n; sub_1800D6E60 from 0x1800d6e60 to 0x1800d6eef (143 bytes)\n; \n; 2 xrefs:\n; > sub_1800D5870 @ 0x1800d5a5c\n; > <???> @ 0x1801ba998\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\nsub     rsp, 38h                                                       ; +0x0, 0x1800d6e60\ncmp     cs:qword_1801ABFE8, rcx                                        ; +0x4, 0x1800d6e64\njnz     short loc_1800D6EEA                                            ; +0xb, 0x1800d6e6b\nmov     r8d, 10h; cbSize                                               ; +0xd, 0x1800d6e6d\ntest    edx, edx                                                       ; +0x13, 0x1800d6e73\nlea     edx, [r8-0Fh]; uiNumDevices                                    ; +0x15, 0x1800d6e75\njz      short loc_1800D6EB5                                            ; +0x19, 0x1800d6e79\nmov     rax, [rcx+370h]                                                ; +0x1b, 0x1800d6e7b\nlea     rcx, [rsp+38h+pRawInputDevices]; pRawInputDevices              ; +0x22, 0x1800d6e82\nmov     [rsp+38h+pRawInputDevices.hwndTarget], rax                     ; +0x27, 0x1800d6e87\nmov     qword ptr [rsp+38h+pRawInputDevices.usUsagePage], 20001h       ; +0x2c, 0x1800d6e8c\ncall    cs:RegisterRawInputDevices                                     ; +0x35, 0x1800d6e95\ntest    eax, eax                                                       ; +0x3b, 0x1800d6e9b\njnz     short loc_1800D6EEA                                            ; +0x3d, 0x1800d6e9d\nlea     rdx, aWin32FailedToR; \"Win32: Failed to register raw input dev\"... ; +0x3f, 0x1800d6e9f\nmov     ecx, 10008h                                                    ; +0x46, 0x1800d6ea6\ncall    sub_1800D9BA0                                                  ; +0x4b, 0x1800d6eab\nadd     rsp, 38h                                                       ; +0x50, 0x1800d6eb0\nretn                                                                   ; +0x54, 0x1800d6eb4\nlea     rcx, [rsp+38h+pRawInputDevices]; pRawInputDevices              ; +0x55, 0x1800d6eb5\nmov     dword ptr [rsp+38h+pRawInputDevices.usUsagePage], 20001h       ; +0x5a, 0x1800d6eba\nmov     [rsp+38h+pRawInputDevices.dwFlags], edx                        ; +0x62, 0x1800d6ec2\nmov     [rsp+38h+pRawInputDevices.hwndTarget], 0                       ; +0x66, 0x1800d6ec6\ncall    cs:RegisterRawInputDevices                                     ; +0x6f, 0x1800d6ecf\ntest    eax, eax                                                       ; +0x75, 0x1800d6ed5\njnz     short loc_1800D6EEA                                            ; +0x77, 0x1800d6ed7\nlea     rdx, aWin32FailedToR_0; \"Win32: Failed to remove raw input devic\"... ; +0x79, 0x1800d6ed9\nmov     ecx, 10008h                                                    ; +0x80, 0x1800d6ee0\ncall    sub_1800D9BA0                                                  ; +0x85, 0x1800d6ee5\nadd     rsp, 38h                                                       ; +0x8a, 0x1800d6eea\nretn                                                                   ; +0x8e, 0x1800d6eee", "xrefs": ["sub_1800D5870 @ 0x1800d5a5c", "<???> @ 0x1801ba998"], "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"}