//
// sub_CEE3F8 from 0xcee3f8 to 0xcee5b8 (448 bytes)
//
// 3 xrefs:
// > sub_CEE768 @ 0xcee79c
// > sub_CEE768 @ 0xcee7d0
// > sub_CEE7E4 @ 0xcee7e8
//
// 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
//
_QWORD *__fastcall sub_CEE3F8(_QWORD *a1, unsigned __int8 a2)
{
unsigned int v3; // w20
_QWORD *v4; // x0
_BYTE *v5; // x1
char *v6; // x20
__int64 v7; // x0
_BYTE v9[8]; // [xsp+40h] [xbp+40h] BYREF
_QWORD *v10; // [xsp+48h] [xbp+48h]
v3 = a2;
sub_CEE150((__int64)v9, a1);
if ( v9[0] )
{
v4 = *(_QWORD **)((char *)a1 + *(_QWORD *)(*a1 - 24LL) + 232);
v5 = (_BYTE *)v4[5];
if ( (unsigned __int64)v5 >= v4[6] )
{
if ( (*(unsigned int (__fastcall **)(_QWORD *, _QWORD))(*v4 + 104LL))(v4, v3) == -1 )
sub_CCE830((__int64)a1 + *(_QWORD *)(*a1 - 24LL), *(_DWORD *)((char *)a1 + *(_QWORD *)(*a1 - 24LL) + 32) | 1);
}
else
{
*v5 = v3;
++v4[5];
}
}
v6 = (char *)v10 + *(_QWORD *)(*v10 - 24LL);
if ( (*((_DWORD *)v6 + 6) & 0x2000) == 0 )
return a1;
if ( std::uncaught_exception() )
return a1;
v7 = *((_QWORD *)v6 + 29);
if ( !v7 || (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)v7 + 48LL))(v7) != -1 )
return a1;
sub_CCE830((__int64)v10 + *(_QWORD *)(*v10 - 24LL), *(_DWORD *)((char *)v10 + *(_QWORD *)(*v10 - 24LL) + 32) | 1);
return a1;
}