//
// _strnicoll_l from 0x180134564 to 0x180134664 (256 bytes)
//
// 2 xrefs:
// > _strnicoll @ 0x18013455c
// > ??> @ 0x180203254
//
// 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 strnicoll_l(const char *String1, const char *String2, size_t MaxCount, _locale_t Locale)
{
int v7; // ebx
wchar_t *v8; // rdx
int v9; // eax
__int64 v11; // [rsp+40h] [rbp-28h] BYREF
__crt_locale_pointers Localea; // [rsp+48h] [rbp-20h] BYREF
char v13; // [rsp+58h] [rbp-10h]
_LocaleUpdate::_LocaleUpdate((_LocaleUpdate *)&v11, Locale);
if ( MaxCount )
{
if ( String1 && String2 )
{
v7 = 0x7FFFFFFF;
if ( MaxCount <= 0x7FFFFFFF )
{
v8 = *((wchar_t **)Localea.locinfo + 38);
if ( v8 )
{
v9 = _acrt_CompareStringA(
&Localea,
v8,
0x1001u,
(char *)String1,
MaxCount,
(char *)String2,
MaxCount,
*((_DWORD *)Localea.locinfo + 5));
if ( v9 )
v7 = v9 - 2;
else
*errno() = 22;
}
else
{
v7 = strnicmp_l(String1, String2, MaxCount, &Localea);
}
}
else
{
*errno() = 22;
invalid_parameter_noinfo();
}
}
else
{
*errno() = 22;
invalid_parameter_noinfo();
v7 = 0x7FFFFFFF;
}
}
else
{
v7 = 0;
}
if ( v13 )
*(_DWORD *)(v11 + 936) &= ~2u;
return v7;
}