//
// sub_7774DC from 0x7774dc to 0x777528 (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_7774DC(int *a1, wchar_t *s, unsigned int a3)
{
size_t v6; // r0
int v7; // r2
int v8; // r3
unsigned int v10; // r3
size_t v11; // r8
int v12; // r5
wchar_t v14; // r1
v6 = wcslen(s);
v7 = *a1;
v8 = *(_DWORD *)(*a1 - 12);
if ( !v8 )
return -1;
v10 = v8 - 1;
v11 = v6;
if ( a3 >= v10 )
a3 = v10;
v12 = 4 * a3;
while ( 1 )
{
v14 = *(_DWORD *)(v7 + v12);
v12 -= 4;
if ( !wmemchr(s, v14, v11) )
break;
if ( a3-- == 0 )
return -1;
v7 = *a1;
}
return a3;
}