//
// sub_1800C9DD0 from 0x1800c9dd0 to 0x1800c9e6e (158 bytes)
//
// 2 xrefs:
// > ??> @ 0x18016c638
// > ??> @ 0x1801fe40c
//
// 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_1800C9DD0(__int64 a1, unsigned int a2, unsigned int a3)
{
__int64 result; // rax
if ( !*(_QWORD *)(a1 + 192) )
return 30;
if ( (unsigned int)sub_1800C7B30(a1, a2, a3) )
return 0;
if ( (*(unsigned int (__fastcall **)(_QWORD, _QWORD, __int64, _QWORD, int))(**(_QWORD **)(a1 + 40) + 312LL))(
*(_QWORD *)(a1 + 40),
a2,
2,
a2 + a3 - 1,
2) )
{
return 0;
}
if ( (*(_DWORD *)(*(_QWORD *)(a1 + 40) + 88LL) & 0x80u) == 0 )
return 0;
result = (*(__int64 (__fastcall **)(_QWORD, _QWORD, _QWORD))(**(_QWORD **)(a1 + 192) + 136LL))(
*(_QWORD *)(a1 + 192),
a2,
a3);
if ( !(_DWORD)result )
return 0;
return result;
}