//
// sub_18013C0DC from 0x18013c0dc to 0x18013c197 (187 bytes)
//
// 3 xrefs:
// > _wcsicmp_l @ 0x180134e1d
// > _wcsicmp_l @ 0x180134e58
// > ??> @ 0x1802039b0
//
// 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:02 +0000
//
__int64 __fastcall sub_18013C0DC(unsigned __int16 a1, struct __crt_locale_pointers *a2)
{
__int64 result; // rax
unsigned __int16 v3; // dx
__int64 v4; // rcx
int v5; // eax
__int64 v6; // [rsp+30h] [rbp-28h] BYREF
__int64 v7; // [rsp+38h] [rbp-20h]
char v8; // [rsp+48h] [rbp-10h]
unsigned __int16 v9; // [rsp+60h] [rbp+8h] BYREF
unsigned __int16 v10; // [rsp+70h] [rbp+18h] BYREF
v9 = a1;
result = 0xFFFF;
if ( a1 != 0xFFFF )
{
_LocaleUpdate::_LocaleUpdate((_LocaleUpdate *)&v6, a2);
v3 = v9;
if ( v9 >= 0x100u )
{
v4 = *(_QWORD *)(v7 + 312);
if ( v4 )
{
v5 = _crtLCMapStringW(v4, 256, &v9, 1, &v10, 1);
v3 = v9;
if ( v5 )
v3 = v10;
}
}
else if ( (wctype[(unsigned __int8)v9 + 1] & 1) != 0 )
{
v3 = *(unsigned __int8 *)(*(_QWORD *)(v7 + 272) + (unsigned __int8)v9);
}
else
{
v3 = (unsigned __int8)v9;
}
if ( v8 )
*(_DWORD *)(v6 + 936) &= ~2u;
return v3;
}
return result;
}