//
// sub_1800D7DA0 from 0x1800d7da0 to 0x1800d7ea6 (262 bytes)
//
// 5 xrefs:
// > sub_1800D8740 @ 0x1800d88c0
// > sub_1800D8740 @ 0x1800d904c
// > sub_1800D8740 @ 0x1800d9306
// > ??> @ 0x1801baa34
// > ??> @ 0x1801baa40
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
int __fastcall sub_1800D7DA0(__int64 a1)
{
HWND *v2; // rdi
__int64 v3; // rcx
HCURSOR CursorW; // rax
int result; // eax
HWND v6; // rax
RAWINPUTDEVICE pRawInputDevices; // [rsp+20h] [rbp-18h] BYREF
struct tagPOINT Point; // [rsp+40h] [rbp+8h] BYREF
qword_1801ABFE8 = a1;
v2 = (HWND *)(a1 + 880);
if ( GetCursorPos(&Point) )
{
ScreenToClient(*v2, &Point);
*(double *)&qword_1801ABFD8 = (double)Point.x;
*(double *)&qword_1801ABFE0 = (double)Point.y;
}
if ( *(_DWORD *)(a1 + 124) == 212993 )
{
v3 = *(_QWORD *)(a1 + 80);
if ( v3 )
{
SetCursor(*(HCURSOR *)(v3 + 8));
}
else
{
CursorW = LoadCursorW(nullptr, (LPCWSTR)0x7F00);
SetCursor(CursorW);
}
v2 = (HWND *)(a1 + 880);
}
else
{
SetCursor(nullptr);
}
sub_1800D5230(a1);
result = sub_1800D77E0(a1);
if ( *(_DWORD *)(a1 + 504) )
{
v6 = *v2;
*(_QWORD *)&pRawInputDevices.usUsagePage = 131073;
pRawInputDevices.hwndTarget = v6;
result = RegisterRawInputDevices(&pRawInputDevices, 1u, 0x10u);
if ( !result )
return sub_1800D9BA0(65544, "Win32: Failed to register raw input device");
}
return result;
}