//
// sub_F7D0C8 from 0xf7d0c8 to 0xf7d130 (104 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_F7D0C8(unsigned __int8 *a1, unsigned __int8 a2, unsigned __int64 a3)
{
unsigned __int64 v3; // x8
unsigned __int8 *v4; // x19
unsigned __int64 v5; // x8
bool v6; // cc
size_t v7; // x8
_BYTE *v8; // x0
v3 = *a1;
if ( (v3 & 1) != 0 )
{
v5 = *((_QWORD *)a1 + 1);
v4 = *((unsigned __int8 **)a1 + 2);
}
else
{
v4 = a1 + 1;
v5 = v3 >> 1;
}
v6 = v5 > a3;
v7 = v5 - a3;
if ( !v6 )
return -1;
if ( v7 )
v8 = memchr(&v4[a3], a2, v7);
else
v8 = nullptr;
if ( v8 )
return v8 - v4;
else
return -1;
}