//
// sub_1800CF5D0 from 0x1800cf5d0 to 0x1800cf6dd (269 bytes)
//
// 3 xrefs:
// > ??> @ 0x18016c9d0
// > ??> @ 0x1801fe940
// > ??> @ 0x1801fe94c
//
// 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_1800CF5D0(__int64 a1, __int64 a2, unsigned int a3, unsigned int a4, int a5, char a6)
{
__int64 result; // rax
__int64 v11; // rax
int v12; // ecx
__int64 v13; // rdi
int v14; // eax
__int64 v15[5]; // [rsp+40h] [rbp-28h] BYREF
result = sub_180010470(a1, a2, a3, a4, a5, a6);
if ( !(_DWORD)result )
{
v11 = *(_QWORD *)(a1 + 472);
if ( v11 && *(_QWORD *)(a1 + 32) )
{
if ( a6 && (*(_BYTE *)(v11 + 56) & 0x10) != 0 )
{
return 0;
}
else
{
result = (*(__int64 (__fastcall **)(__int64, __int64, __int64 *))(*(_QWORD *)a1 + 288LL))(a1, 4294967294LL, v15);
if ( !(_DWORD)result )
{
v12 = *(_DWORD *)(a1 + 72);
v13 = v15[0];
if ( (v12 & 0x10000) != 0 )
{
sub_180069A30(v15[0]);
v12 = *(_DWORD *)(a1 + 72);
}
v14 = 0;
if ( (v12 & 0xC0000) == 0 )
v14 = 64;
return sub_180069A10(v13, a2, a3, a4, a5, v14, (*(_BYTE *)(*(_QWORD *)(a1 + 472) + 62LL) & 1) == 0);
}
}
}
else
{
return 30;
}
}
return result;
}