//
// sub_777250 from 0x777250 to 0x77729c (76 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
//
unsigned int __fastcall sub_777250(int *a1, wchar_t *s, unsigned int a3, size_t n)
{
int v5; // r1
int v6; // r4
bool v7; // zf
unsigned int v9; // r4
int v12; // r5
wchar_t v13; // r1
v5 = *a1;
v6 = *(_DWORD *)(*a1 - 12);
v7 = n == 0;
if ( n )
v7 = v6 == 0;
if ( v7 )
return -1;
v9 = v6 - 1;
if ( v9 >= a3 )
v9 = a3;
v12 = 4 * v9;
while ( 1 )
{
v13 = *(_DWORD *)(v5 + v12);
v12 -= 4;
if ( wmemchr(s, v13, n) )
break;
if ( !v9 )
return -1;
v5 = *a1;
--v9;
}
return v9;
}