//
// sub_1800D5D10 from 0x1800d5d10 to 0x1800d5d46 (54 bytes)
//
// 3 xrefs:
// > sub_1800D19B0 @ 0x1800d1b22
// > sub_1800D1DB0 @ 0x1800d1fbe
// > sub_1800D2D70 @ 0x1800d309d
//
// 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 10:54:11 +0000
//
__int64 __fastcall sub_1800D5D10(__int64 a1, __int64 a2)
{
__int64 result; // rax
result = *(unsigned int *)(a2 + 24);
if ( (result & 0x400) == 0 )
{
*(_DWORD *)(a2 + 24) = result | 0x400;
*(_QWORD *)(a2 + 72) = *(_QWORD *)(a1 + 24);
*(_QWORD *)(a1 + 24) = a2;
result = *(_QWORD *)(a2 + 72);
if ( result )
*(_QWORD *)(result + 48) = a2;
*(_DWORD *)(a2 + 24) |= 0x20u;
*(_QWORD *)(a2 + 48) = 0;
}
return result;
}