//
// sub_77729C from 0x77729c to 0x7772f2 (86 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_77729C(int *a1, wchar_t *s, unsigned int a3)
{
size_t v6; // r0
int v7; // r2
int v8; // r3
bool v9; // zf
size_t v10; // r6
unsigned int v12; // r3
int v13; // r5
wchar_t v15; // r1
v6 = wcslen(s);
v7 = *a1;
v8 = *(_DWORD *)(*a1 - 12);
v9 = v6 == 0;
if ( v6 )
v9 = v8 == 0;
v10 = v6;
if ( v9 )
return -1;
v12 = v8 - 1;
if ( a3 >= v12 )
a3 = v12;
v13 = 4 * a3;
while ( 1 )
{
v15 = *(_DWORD *)(v7 + v13);
v13 -= 4;
if ( wmemchr(s, v15, v10) )
break;
if ( a3-- == 0 )
return -1;
v7 = *a1;
}
return a3;
}