//
// sub_97B430 from 0x97b430 to 0x97b49e (110 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_97B430(unsigned __int8 *a1, unsigned __int8 *a2, unsigned int a3)
{
unsigned int v3; // r3
unsigned int v4; // r3
unsigned __int8 *v5; // r8
unsigned __int8 *v6; // r0
unsigned int v7; // r4
unsigned __int8 *v8; // r9
unsigned int v9; // r1
int v10; // r1
int v11; // r5
int v12; // r0
v3 = *a1;
if ( (v3 & 1) != 0 )
{
v5 = *((unsigned __int8 **)a1 + 2);
v4 = *((_DWORD *)a1 + 1);
}
else
{
v4 = v3 >> 1;
v5 = a1 + 4;
}
v6 = a2 + 4;
v7 = *((_DWORD *)a2 + 1);
v8 = *((unsigned __int8 **)a2 + 2);
v9 = *a2;
if ( (v9 & 1) == 0 )
{
v7 = v9 >> 1;
v8 = v6;
}
if ( v4 > a3 )
v4 = a3 + 1;
v10 = 4 * v4;
while ( 1 )
{
v11 = v10;
if ( !v10 )
break;
if ( v7 )
{
v12 = sub_998B64(v8, *(_DWORD *)&v5[v10 - 4], v7);
v10 = v11 - 4;
if ( v12 )
continue;
}
return (v11 - 4) >> 2;
}
return -1;
}