//
// _wcsnicoll_l from 0x18013445c to 0x18013454c (240 bytes)
//
// 2 xrefs:
// > _wcsnicoll @ 0x180134456
// > ??> @ 0x180203248
//
// 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
//
int __cdecl wcsnicoll_l(const wchar_t *String1, const wchar_t *String2, size_t MaxCount, _locale_t Locale)
{
int v8; // ebx
__int64 v9; // rcx
int v10; // eax
_QWORD v11[3]; // [rsp+30h] [rbp-28h] BYREF
char v12; // [rsp+48h] [rbp-10h]
if ( !MaxCount )
return 0;
if ( String1 && String2 )
{
v8 = 0x7FFFFFFF;
if ( MaxCount <= 0x7FFFFFFF )
{
_LocaleUpdate::_LocaleUpdate((_LocaleUpdate *)v11, Locale);
v9 = *(_QWORD *)(v11[1] + 304LL);
if ( v9 )
{
v10 = _crtCompareStringW(v9, 4097, String1, (unsigned int)MaxCount, String2, MaxCount);
if ( v10 )
v8 = v10 - 2;
else
*errno() = 22;
}
else
{
v8 = _ascii_wcsnicmp(String1, String2, MaxCount);
}
if ( v12 )
*(_DWORD *)(v11[0] + 936LL) &= ~2u;
}
else
{
*errno() = 22;
invalid_parameter_noinfo();
}
return v8;
}
else
{
*errno() = 22;
invalid_parameter_noinfo();
return 0x7FFFFFFF;
}
}