//
// sub_1800FD380 from 0x1800fd380 to 0x1800fd442 (194 bytes)
//
// 3 xrefs:
// > sub_1800FD180 @ 0x1800fd1e1
// > sub_1800FD180 @ 0x1800fd265
// > ??> @ 0x180200fd4
//
// 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_1800FD380(_QWORD *a1, unsigned int a2)
{
__int64 v2; // rax
_QWORD *v3; // rbp
_QWORD *v6; // rbx
__int64 result; // rax
__int64 v8; // rax
_QWORD *v9; // rax
_QWORD *v10; // rbx
v2 = a1[109];
v3 = a1 + 62;
v6 = (_QWORD *)(v2 - 376);
if ( !v2 )
v6 = nullptr;
if ( v6 == v3 )
{
LABEL_8:
v9 = (_QWORD *)(a1[8731] + 400LL);
v10 = (_QWORD *)*v9;
if ( (_QWORD *)*v9 == v9 )
{
return 0;
}
else
{
while ( 1 )
{
result = sub_1800CCA20((_QWORD *)v10[2], a2);
if ( (_DWORD)result )
break;
v10 = (_QWORD *)*v10;
if ( v10 == (_QWORD *)(a1[8731] + 400LL) )
return 0;
}
}
}
else
{
while ( 1 )
{
result = (*(__int64 (__fastcall **)(_QWORD *, _QWORD))(*v6 + 120LL))(v6, a2);
if ( (_DWORD)result )
break;
v8 = v6[47];
v6 = (_QWORD *)(v8 - 376);
if ( !v8 )
v6 = nullptr;
if ( v6 == v3 )
goto LABEL_8;
}
}
return result;
}