//
// sub_F7C994 from 0xf7c994 to 0xf7ca98 (260 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_F7C994(unsigned __int8 *a1, unsigned __int8 *a2, unsigned __int64 a3)
{
unsigned __int64 v3; // x9
unsigned __int8 *v4; // x8
unsigned __int64 v5; // x14
unsigned __int64 v6; // x9
__int64 result; // x0
bool v8; // zf
unsigned __int64 v9; // x12
unsigned __int8 *v10; // x9
unsigned __int64 v11; // x15
unsigned __int8 *v12; // x11
unsigned __int8 *v13; // x10
unsigned __int8 *v14; // x12
unsigned __int8 *v15; // x9
int v16; // w13
int v17; // t1
unsigned __int64 v18; // x14
unsigned __int64 v19; // x15
unsigned __int8 *v20; // x0
__int64 v21; // x16
int v22; // w17
int v23; // w18
signed __int64 v24; // 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;
result = -1;
v8 = (v6 & 1) == 0;
v9 = v6 >> 1;
if ( (v6 & 1) != 0 )
v10 = *((unsigned __int8 **)a2 + 2);
else
v10 = a2 + 1;
if ( v8 )
v11 = v9;
else
v11 = *((_QWORD *)a2 + 1);
if ( v5 >= a3 && v5 - a3 >= v11 )
{
if ( v11 )
{
v12 = &v4[a3];
v13 = &v4[v5];
v14 = &v4[v5];
if ( (__int64)(v5 - a3) >= (__int64)v11 )
{
v14 = &v4[v5];
if ( &v13[1 - v11] != v12 )
{
v17 = *v10;
v15 = v10 + 1;
v16 = v17;
v18 = v11 - (_QWORD)v4 - v5;
v19 = v11 - 1;
v20 = &v4[a3];
while ( 2 )
{
++v12;
while ( *(v12 - 1) != v16 )
{
v20 = v12++;
if ( &v12[v18] == (_BYTE *)dword_0 + 2 )
goto LABEL_27;
}
v21 = 0;
do
{
if ( v19 == v21 )
{
v14 = v20;
goto LABEL_27;
}
v22 = v12[v21];
v23 = v15[v21++];
}
while ( v22 == v23 );
v20 = v12;
if ( &v12[v18] != (_BYTE *)dword_0 + 1 )
continue;
break;
}
}
}
LABEL_27:
v24 = v14 - v4;
if ( v14 == v13 )
return -1;
else
return v24;
}
else
{
return a3;
}
}
return result;
}