//
// sub_6B2EC from 0x6b2ec to 0x6b36c (128 bytes)
//
// 1 xrefs:
// > sub_522EC @ 0x52534
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:40:58 +0000
//
int __fastcall sub_6B2EC(int a1, int *a2, _DWORD *a3)
{
int v3; // r6
int result; // r0
int v8; // r3
int v9; // r0
int v10; // r1
int v11; // r2
int v12; // r2
int v13; // r4
int v14; // r0
int v15; // r2
int v16; // r1
v3 = a1 + 1188;
result = sub_6ADD0((__int64 *)(a1 + 1188), 0, a3);
if ( result )
{
if ( result != 45 )
return result;
goto LABEL_5;
}
if ( *(_BYTE *)(a1 + 624) )
{
LABEL_5:
result = 0;
*a2 = 0;
return result;
}
v9 = a3[1];
v10 = -1;
do
v11 = v9 + v10++;
while ( (v11 + 1) << 30 );
v12 = a3[3];
do
{
v13 = v10;
v10 += 4;
if ( v10 > v12 )
break;
v8 = *(_DWORD *)(v9 + v13) + 1;
}
while ( *(_DWORD *)(v9 + v13) == -1 );
result = sub_6AF3E(v3, v13, v12, v8);
if ( !result )
{
v14 = a3[3];
if ( v14 <= v13 )
{
v16 = a3[2];
v15 = a3[4];
}
else
{
v15 = v14 - v13;
v16 = a3[1] + v13;
}
result = 0;
if ( v15 <= 0 )
v16 = 0;
*a2 = v16;
}
return result;
}