//
// _wcsicmp_l from 0x180134d78 to 0x180134e9f (295 bytes)
//
// 2 xrefs:
// > _wcsicmp @ 0x180134d71
// > ??> @ 0x1802032e4
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 10:55:00 +0000
//
int __cdecl wcsicmp_l(const wchar_t *String1, const wchar_t *String2, _locale_t Locale)
{
wchar_t *v3; // rsi
wchar_t *v4; // rbx
__int64 v6; // rdx
int v7; // edi
__int64 v8; // rcx
unsigned __int16 v9; // ax
int v10; // ebp
int v11; // edi
__int64 v12; // rcx
unsigned __int16 v13; // ax
__int64 v14; // [rsp+20h] [rbp-38h] BYREF
_QWORD v15[2]; // [rsp+28h] [rbp-30h] BYREF
char v16; // [rsp+38h] [rbp-20h]
v3 = (wchar_t *)String2;
v4 = (wchar_t *)String1;
if ( String1 && String2 )
{
_LocaleUpdate::_LocaleUpdate((_LocaleUpdate *)&v14, Locale);
v6 = v15[0];
if ( *(_QWORD *)(v15[0] + 312LL) )
{
do
{
if ( *v4 >= 0x100u )
{
v9 = sub_18013C0DC(*v4, v15);
v6 = v15[0];
}
else
{
v8 = *(unsigned __int8 *)v4;
if ( (wctype[v8 + 1] & 1) != 0 )
LOBYTE(v8) = *(_BYTE *)(v8 + *(_QWORD *)(v6 + 272));
v9 = (unsigned __int8)v8;
}
++v4;
v10 = v9;
v11 = v9;
if ( *v3 >= 0x100u )
{
v13 = sub_18013C0DC(*v3, v15);
v6 = v15[0];
}
else
{
v12 = *(unsigned __int8 *)v3;
if ( (wctype[v12 + 1] & 1) != 0 )
LOBYTE(v12) = *(_BYTE *)(v12 + *(_QWORD *)(v6 + 272));
v13 = (unsigned __int8)v12;
}
++v3;
v7 = v11 - v13;
}
while ( !v7 && v10 );
}
else
{
v7 = _ascii_wcsicmp(v4, v3);
}
if ( v16 )
*(_DWORD *)(v14 + 936) &= ~2u;
return v7;
}
else
{
*errno() = 22;
invalid_parameter_noinfo();
return 0x7FFFFFFF;
}
}