//
// sub_CEEF0 from 0xceef0 to 0xcef22 (50 bytes)
//
// 2 xrefs:
// > sub_815B0 @ 0x815c0
// > sub_81648 @ 0x816f4
//
// 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
//
int __fastcall sub_CEEF0(_DWORD *a1, int a2)
{
int result; // r0
if ( !a1[1] )
return a1[19];
if ( a2 <= -1 )
{
result = a1[19];
if ( (int)a1[22] >= 3 )
result += 16 * a1[24];
}
else if ( a1[13] > a2 )
{
return a1[19] + 16 * a2;
}
else
{
return 0;
}
return result;
}