//
// sub_1800D8570 from 0x1800d8570 to 0x1800d85e2 (114 bytes)
//
// 4 xrefs:
// > sub_1800D6610 @ 0x1800d6620
// > sub_1800D6EF0 @ 0x1800d7067
// > sub_1800D8740 @ 0x1800d8a2b
// > ??> @ 0x1801baac4
//
// 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
//
__int64 __fastcall sub_1800D8570(__int64 a1)
{
__int64 result; // rax
result = *(_QWORD *)(a1 + 72);
if ( *(_QWORD *)(result + 144) == a1 )
{
if ( !--dword_1801AB23C )
{
SetThreadExecutionState(0x80000000);
if ( (unsigned int)sub_1800D9D60(5) )
SystemParametersInfoW(0x5Du, uiParam, nullptr, 0);
}
sub_1800D40D0(*(_QWORD *)(a1 + 72), 0);
return sub_1800DB500(*(_QWORD *)(a1 + 72));
}
return result;
}