//
// sub_1800D7FA0 from 0x1800d7fa0 to 0x1800d8054 (180 bytes)
//
// 3 xrefs:
// > sub_1800DC220 @ 0x1800dc50b
// > sub_1800DC680 @ 0x1800dc709
// > ??> @ 0x1801c4998
//
// 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:33 +0000
//
int __fastcall sub_1800D7FA0(__int64 a1)
{
__int64 (__fastcall *v2)(__int64); // rax
HWND v3; // rcx
HICON v4; // rcx
HICON v5; // rcx
if ( *(_QWORD *)(a1 + 72) )
sub_1800D9F00();
v2 = *(__int64 (__fastcall **)(__int64))(a1 + 624);
if ( v2 )
LODWORD(v2) = v2(a1);
if ( qword_1801B6068 == a1 )
LODWORD(v2) = sub_1800D9890(a1);
if ( qword_1801B6070 == a1 )
{
LODWORD(v2) = ClipCursor(nullptr);
qword_1801B6070 = 0;
}
v3 = *(HWND *)(a1 + 880);
if ( v3 )
{
RemovePropW(v3, L"GLFW");
LODWORD(v2) = DestroyWindow(*(HWND *)(a1 + 880));
*(_QWORD *)(a1 + 880) = 0;
}
v4 = *(HICON *)(a1 + 888);
if ( v4 )
LODWORD(v2) = DestroyIcon(v4);
v5 = *(HICON *)(a1 + 896);
if ( v5 )
LODWORD(v2) = DestroyIcon(v5);
return (int)v2;
}