//
// sub_F80A00 from 0xf80a00 to 0xf80ab4 (180 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:50 +0000
//
__int64 __fastcall sub_F80A00(unsigned __int8 *a1, wchar_t *s, unsigned __int64 a3)
{
unsigned __int64 v3; // x8
unsigned __int8 *v6; // x21
unsigned __int64 v7; // x22
size_t v8; // x0
__int64 v9; // x8
unsigned __int8 *v10; // x8
unsigned __int8 *v11; // x9
__int64 v12; // x12
wchar_t *v13; // x13
int v14; // t1
v3 = *a1;
if ( (v3 & 1) != 0 )
{
v7 = *((_QWORD *)a1 + 1);
v6 = *((unsigned __int8 **)a1 + 2);
}
else
{
v6 = a1 + 4;
v7 = v3 >> 1;
}
v8 = wcslen(s);
v9 = -1;
if ( v7 > a3 && v8 )
{
v10 = &v6[4 * a3];
v11 = &v6[4 * v7];
if ( v7 != a3 )
{
LABEL_7:
v12 = 4 * v8;
v13 = s;
while ( 1 )
{
v14 = *v13++;
if ( *(_DWORD *)v10 == v14 )
break;
v12 -= 4;
if ( !v12 )
{
v10 += 4;
if ( v10 != v11 )
goto LABEL_7;
v10 = &v6[4 * v7];
break;
}
}
}
if ( v10 == v11 )
return -1;
else
return (v10 - v6) >> 2;
}
return v9;
}