//
// sub_CA5D8 from 0xca5d8 to 0xca5fc (36 bytes)
//
// 4 xrefs:
// > sub_CAD50 @ 0xcae00
// > sub_CAD50 @ 0xcae44
// > sub_CCD84 @ 0xccee0
// > sub_CCF60 @ 0xcd008
//
// 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_CA5D8(int a1)
{
int v2; // r0
if ( *(int *)(a1 + 8) < 1 )
return -1;
v2 = sub_CA5FC(a1);
if ( v2 < 0 )
return -1;
else
return *(_DWORD *)(*(_DWORD *)(a1 + 24) + 4 * v2);
}