//
// sub_D1B1D8 from 0xd1b1d8 to 0xd1b258 (128 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
//
__int64 __fastcall sub_D1B1D8(const wchar_t **a1, wchar_t *s)
{
size_t v3; // x19
size_t v4; // x20
size_t v5; // x2
__int64 result; // x0
__int64 v7; // x19
v3 = *((_QWORD *)*a1 - 3);
v4 = wcslen(s);
if ( v4 > v3 )
v5 = v3;
else
v5 = v4;
result = wmemcmp(*a1, s, v5);
if ( !(_DWORD)result )
{
result = 0x7FFFFFFF;
v7 = v3 - v4;
if ( v7 <= 0x7FFFFFFF )
{
if ( v7 >= (__int64)0xFFFFFFFF80000000LL )
return (unsigned int)v7;
else
return 0x80000000LL;
}
}
return result;
}