//
// sub_ABF6C from 0xabf6c to 0xabf9a (46 bytes)
//
// 0 xrefs:
//
// 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_ABF6C(int *a1, int a2, unsigned int a3)
{
int v3; // r3
unsigned int v4; // r0
bool v5; // cf
unsigned int v6; // r1
int result; // r0
v3 = *a1;
if ( a2 )
{
v4 = *(_DWORD *)(v3 + 292);
if ( v4 )
{
v5 = v4 >= a3;
v6 = v4 - a3;
result = 0;
if ( !v5 )
v6 = 0;
*(_DWORD *)(v3 + 292) = v6;
}
else
{
return 11;
}
}
else
{
*(_DWORD *)(v3 + 292) = *(_DWORD *)(*(_DWORD *)(v3 + 128) + 1192);
return 0;
}
return result;
}