//
// sub_1800B61E0 from 0x1800b61e0 to 0x1800b62b9 (217 bytes)
//
// 2 xrefs:
// > ??> @ 0x18016e7c8
// > ??> @ 0x1801fd05c
//
// 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_1800B61E0(__int64 a1, __int64 a2, __int64 a3)
{
__int64 (__fastcall *v3)(__int64, __int64, __int64, _QWORD); // rax
unsigned int v5; // eax
__int64 (__fastcall *v6)(__int64, __int64, __int64, _QWORD); // r10
unsigned int v7; // ecx
bool v8; // zf
__int64 result; // rax
v3 = *(__int64 (__fastcall **)(__int64, __int64, __int64, _QWORD))(a1 + 504);
if ( v3 )
{
v5 = v3(a2, a3, a1 + 552, *(_QWORD *)(a1 + 560));
goto LABEL_5;
}
v6 = *(__int64 (__fastcall **)(__int64, __int64, __int64, _QWORD))(*(_QWORD *)(a1 + 408) + 70112LL);
if ( v6 )
{
v5 = v6(a2, a3, a1 + 552, *(_QWORD *)(a1 + 560));
LABEL_5:
v7 = v5;
if ( v5 )
goto LABEL_8;
}
v7 = (*(__int64 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 56LL))(a1, 0);
if ( v7 == 14 )
{
*(_DWORD *)(a1 + 404) &= ~1u;
v7 = 0;
}
LABEL_8:
v8 = *(_QWORD *)(a1 + 536) == 0;
*(_QWORD *)(a1 + 496) = 0;
if ( v8 && (*(_QWORD *)(a1 + 520) || !*(_QWORD *)(*(_QWORD *)(a1 + 408) + 70144LL)) )
return v7;
result = sub_1800C1490(a1 + 496);
v7 = result;
if ( !(_DWORD)result )
return v7;
return result;
}