//
// sub_670BA8 from 0x670ba8 to 0x670bfc (84 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_670BA8(_DWORD *a1)
{
_DWORD *v2; // r4
int result; // r0
int v4; // r3
v2 = (_DWORD *)a1[98];
result = (*(int (**)(void))(a1[106] + 8))();
v4 = v2[5];
if ( v4 == 1 )
{
v2[5] = 2;
++v2[6];
}
else
{
if ( v4 )
{
if ( v4 == 2 )
{
if ( a1[54] )
v2[5] = 1;
++v2[8];
}
}
else
{
v2[5] = 2;
if ( !a1[54] )
++v2[8];
}
++v2[6];
}
return result;
}