//
// 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!
//
// 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_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;
}