//
// sub_1800B45C0 from 0x1800b45c0 to 0x1800b467d (189 bytes)
//
// 4 xrefs:
// > ??> @ 0x18016b210
// > ??> @ 0x180189534
// > ??> @ 0x180189544
// > ??> @ 0x1801fcf30
//
// 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_1800B45C0(__int64 a1, _QWORD *a2)
{
char v5; // cl
__int64 v6; // rdi
__int64 v7; // r11
_QWORD *v8; // r9
if ( !a2 )
return 31;
if ( (_QWORD *)*a2 != a2 || (_QWORD *)a2[1] != a2 )
return 28;
v5 = 0;
v6 = *(_QWORD *)(a1 + 408);
if ( v6 )
{
sub_1801021C0(*(_QWORD *)(a1 + 408), 11);
v5 = 1;
}
v7 = *(_QWORD *)(a1 + 528);
if ( v7 != a1 + 528 || *(_QWORD *)(a1 + 536) != a1 + 528 )
{
v8 = (_QWORD *)a2[1];
**(_QWORD **)(a1 + 536) = *v8;
*(_QWORD *)(v7 + 8) = v8;
*v8 = v7;
*(_QWORD *)(a1 + 528) = a1 + 528;
*(_QWORD *)(a1 + 536) = a1 + 528;
}
if ( v5 )
{
if ( v6 )
sub_180102300(v6, 11);
}
return 0;
}