//
// sub_774B00 from 0x774b00 to 0x774b42 (66 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_774B00(_DWORD *a1, void *a2, unsigned int a3, size_t a4)
{
int v4; // r4
bool v5; // zf
unsigned int v7; // r4
unsigned __int8 *v10; // r5
int v11; // t1
v4 = *(_DWORD *)(*a1 - 12);
v5 = a4 == 0;
if ( a4 )
v5 = v4 == 0;
if ( v5 )
return -1;
v7 = v4 - 1;
if ( v7 >= a3 )
v7 = a3;
v10 = (unsigned __int8 *)(*a1 + v7);
while ( 1 )
{
v11 = *v10--;
if ( memchr(a2, v11, a4) )
break;
if ( !v7 )
return -1;
--v7;
}
return v7;
}