//
// sub_777200 from 0x777200 to 0x777250 (80 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
int __fastcall sub_777200(int *a1, const wchar_t **a2, unsigned int a3)
{
const wchar_t *v3; // r7
int v4; // r1
size_t v5; // r8
int v6; // r3
bool v7; // zf
unsigned int v9; // r3
unsigned int v11; // r4
int v12; // r5
wchar_t v14; // r1
v3 = *a2;
v4 = *a1;
v5 = *(v3 - 3);
v6 = *(_DWORD *)(*a1 - 12);
v7 = v5 == 0;
if ( v5 )
v7 = v6 == 0;
if ( v7 )
return -1;
v9 = v6 - 1;
if ( a3 >= v9 )
a3 = v9;
v11 = a3;
v12 = 4 * a3;
while ( 1 )
{
v14 = *(_DWORD *)(v4 + v12);
v12 -= 4;
if ( wmemchr(v3, v14, v5) )
break;
if ( v11-- == 0 )
return -1;
v4 = *a1;
}
return v11;
}