//
// sub_F7CCA0 from 0xf7cca0 to 0xf7cd74 (212 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:13:48 +0000
//
__int64 __fastcall sub_F7CCA0(unsigned __int8 *a1, unsigned __int8 *a2, unsigned __int64 a3)
{
unsigned __int64 v3; // x9
unsigned __int8 *v4; // x8
unsigned __int64 v5; // x10
unsigned __int64 v6; // x9
unsigned __int8 *v7; // x11
bool v8; // zf
unsigned __int64 v9; // x9
unsigned __int64 v10; // x12
unsigned __int64 v11; // x13
__int64 v12; // x12
unsigned __int8 *v13; // x10
unsigned __int8 *v14; // x11
unsigned __int8 *v15; // x14
int v16; // t1
__int64 v17; // x16
int v18; // w17
int v19; // w18
unsigned __int8 *v20; // x11
signed __int64 v21; // x8
v3 = *a1;
if ( (v3 & 1) != 0 )
{
v5 = *((_QWORD *)a1 + 1);
v4 = *((unsigned __int8 **)a1 + 2);
}
else
{
v4 = a1 + 1;
v5 = v3 >> 1;
}
v6 = *a2;
v7 = *((unsigned __int8 **)a2 + 2);
v8 = (v6 & 1) == 0;
v9 = v6 >> 1;
if ( v8 )
v7 = a2 + 1;
if ( !v8 )
v9 = *((_QWORD *)a2 + 1);
if ( v5 >= a3 )
v10 = a3;
else
v10 = v5;
v11 = v5 - v10;
v12 = v9 + v10;
if ( v11 <= v9 )
v12 = v5;
v13 = &v4[v12];
if ( v9 && v12 >= (__int64)v9 )
{
v14 = &v7[v9];
v15 = &v4[v12];
LABEL_21:
while ( &v4[v9 - 1] != v15 )
{
v16 = *--v15;
if ( v16 == *(v14 - 1) )
{
v17 = 0;
while ( 1 - v9 != v17 )
{
v18 = v15[v17 - 1];
v19 = v14[v17-- - 2];
if ( v18 != v19 )
goto LABEL_21;
}
v20 = &v15[v17];
goto LABEL_23;
}
}
}
v20 = &v4[v12];
LABEL_23:
v21 = v20 - v4;
if ( v20 != v13 || v9 == 0 )
return v21;
else
return -1;
}