//
// sub_1800D9890 from 0x1800d9890 to 0x1800d998e (254 bytes)
//
// 4 xrefs:
// > sub_1800D7FA0 @ 0x1800d7fd2
// > sub_1800DA0D0 @ 0x1800da266
// > sub_1800DA0D0 @ 0x1800dac5d
// > ??> @ 0x1801c4b18
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:22:34 +0000
//
HCURSOR __fastcall sub_1800D9890(__int64 a1)
{
LONG v2; // eax
HWND v3; // rcx
__int64 v4; // rcx
HCURSOR CursorW; // rax
RAWINPUTDEVICE pRawInputDevices; // [rsp+20h] [rbp-18h] BYREF
struct tagPOINT Point; // [rsp+40h] [rbp+8h] BYREF
if ( *(_DWORD *)(a1 + 504) )
{
*(_DWORD *)&pRawInputDevices.usUsagePage = 131073;
pRawInputDevices.dwFlags = 1;
pRawInputDevices.hwndTarget = nullptr;
if ( !RegisterRawInputDevices(&pRawInputDevices, 1u, 0x10u) )
sub_1800E1AF0(65544, "Win32: Failed to remove raw input device");
}
qword_1801B6068 = 0;
ClipCursor(nullptr);
qword_1801B6070 = 0;
v2 = (int)*(double *)&qword_1801B6060;
Point.x = (int)*(double *)&qword_1801B6058;
*(_DWORD *)(a1 + 936) = (int)*(double *)&qword_1801B6058;
v3 = *(HWND *)(a1 + 880);
Point.y = v2;
*(_DWORD *)(a1 + 940) = v2;
ClientToScreen(v3, &Point);
SetCursorPos(Point.x, Point.y);
if ( *(_DWORD *)(a1 + 124) != 212993 )
return SetCursor(nullptr);
v4 = *(_QWORD *)(a1 + 80);
if ( v4 )
return SetCursor(*(HCURSOR *)(v4 + 8));
CursorW = LoadCursorW(nullptr, (LPCWSTR)0x7F00);
return SetCursor(CursorW);
}