//
// sub_D1AD18 from 0xd1ad18 to 0xd1adb8 (160 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 __int64 __fastcall sub_D1AD18(__int64 *a1, wchar_t *s, unsigned __int64 a3)
{
unsigned __int64 v5; // x19
__int64 v6; // x20
size_t v7; // x23
__int64 v8; // x0
wchar_t v9; // w1
v5 = a3;
v6 = 4 * a3;
v7 = wcslen(s);
v8 = *a1;
if ( v5 >= *(_QWORD *)(*a1 - 24) )
return -1;
while ( 1 )
{
v9 = *(_DWORD *)(v8 + v6);
v6 += 4;
if ( !wmemchr(s, v9, v7) )
break;
v8 = *a1;
if ( ++v5 >= *(_QWORD *)(*a1 - 24) )
return -1;
}
return v5;
}