//
// sub_F80AB4 from 0xf80ab4 to 0xf80b20 (108 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_F80AB4(unsigned __int8 *a1, wchar_t a2, unsigned __int64 a3)
{
unsigned __int64 v3; // x8
unsigned __int8 *v4; // x19
unsigned __int64 v5; // x8
bool v6; // cc
size_t v7; // x8
wchar_t *v8; // x0
v3 = *a1;
if ( (v3 & 1) != 0 )
{
v5 = *((_QWORD *)a1 + 1);
v4 = *((unsigned __int8 **)a1 + 2);
}
else
{
v4 = a1 + 4;
v5 = v3 >> 1;
}
v6 = v5 > a3;
v7 = v5 - a3;
if ( !v6 )
return -1;
if ( v7 )
v8 = wmemchr((const wchar_t *)&v4[4 * a3], a2, v7);
else
v8 = nullptr;
if ( v8 )
return ((char *)v8 - (char *)v4) >> 2;
else
return -1;
}