//
// sub_1800F2B20 from 0x1800f2b20 to 0x1800f2bfc (220 bytes)
//
// 4 xrefs:
// > sub_1800E2620 @ 0x1800e2c3b
// > ??> @ 0x18018e72c
// > ??> @ 0x18018e73c
// > ??> @ 0x18020068c
//
// 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_1800F2B20(__int64 a1)
{
__int64 *i; // rax
int v3; // r9d
__int64 v4; // r10
_QWORD **v5; // r8
__int64 *v6; // rdx
__int64 v7; // rcx
int v8; // ecx
for ( i = *(__int64 **)(a1 + 8); i; i = *(__int64 **)(a1 + 8) )
{
v3 = 0;
if ( *((int *)i + 8) > 0 )
{
v4 = 0;
do
{
++v3;
v5 = (_QWORD **)(v4 + i[5]);
v4 += 24;
*v5[1] = *v5;
(*v5)[1] = v5[1];
v5[1] = v5;
*v5 = v5;
}
while ( v3 < *((_DWORD *)i + 8) );
}
v6 = *(__int64 **)(a1 + 8);
if ( i == v6 )
{
v7 = *i;
if ( (__int64 *)*i == v6 )
v7 = 0;
*(_QWORD *)(a1 + 8) = v7;
}
*(_QWORD *)i[1] = *i;
*(_QWORD *)(*i + 8) = i[1];
v8 = *((_DWORD *)i + 8);
i[1] = (__int64)i;
*i = (__int64)i;
*(_DWORD *)(a1 + 16) -= v8;
sub_1800B6AA0(*((_QWORD *)off_1801AED20 + 52), (_DWORD *)i[3]);
}
return 0;
}