//
// sub_97B134 from 0x97b134 to 0x97b1a6 (114 bytes)
//
// 0 xrefs:
//
// 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 12:06:03 +0000
//
int __fastcall sub_97B134(unsigned __int8 *a1, int *a2, unsigned int a3)
{
unsigned int v4; // r1
unsigned __int64 v6; // kr00_8
int v7; // r0
int v8; // r1
_DWORD *v9; // r2
_DWORD *v10; // r3
int v11; // r6
int v12; // r0
int *v13; // r4
int v14; // t1
v4 = *a1;
if ( (v4 & 1) != 0 )
v6 = *(_QWORD *)(a1 + 4);
else
v6 = __PAIR64__((unsigned int)(a1 + 4), v4 >> 1);
v7 = sub_99883C(a2);
v8 = -1;
if ( (unsigned int)v6 > a3 && v7 )
{
v9 = (_DWORD *)(HIDWORD(v6) + 4 * v6);
v10 = (_DWORD *)(HIDWORD(v6) + 4 * a3);
if ( (_DWORD)v6 != a3 )
{
v11 = 4 * v7;
LABEL_8:
v12 = v11;
v13 = a2;
while ( 1 )
{
v14 = *v13++;
if ( *v10 == v14 )
break;
v12 -= 4;
if ( !v12 )
{
if ( ++v10 != v9 )
goto LABEL_8;
v10 = (_DWORD *)(HIDWORD(v6) + 4 * v6);
break;
}
}
}
v8 = ((int)v10 - HIDWORD(v6)) >> 2;
if ( v10 == v9 )
return -1;
}
return v8;
}