//
// sub_D1A73C from 0xd1a73c to 0xd1a7c4 (136 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
//
size_t __fastcall sub_D1A73C(_QWORD *a1, wchar_t *s2, size_t a3, size_t n)
{
size_t v4; // x19
size_t v6; // x19
__int64 v9; // x20
const wchar_t *v10; // x0
v4 = *(_QWORD *)(*a1 - 24LL);
if ( n > v4 )
return -1;
v6 = v4 - n;
if ( v6 > a3 )
v6 = a3;
v9 = *a1 + 4 * v6;
while ( 1 )
{
v10 = (const wchar_t *)v9;
v9 -= 4;
if ( !wmemcmp(v10, s2, n) )
break;
if ( !v6 )
return -1;
--v6;
}
return v6;
}