//
// __acrt_DownlevelLocaleNameToLCID from 0x18013c5a4 to 0x18013c653 (175 bytes)
//
// 2 xrefs:
// > __acrt_LocaleNameToLCID @ 0x180135c3c
// > ??> @ 0x1802039f8
//
// 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 _acrt_DownlevelLocaleNameToLCID(unsigned __int16 *a1)
{
int v2; // ebx
int v3; // edi
int v4; // ebp
int v5; // eax
unsigned int v6; // eax
if ( !a1 )
return 0;
v2 = 0;
v3 = 227;
while ( 1 )
{
v4 = (v3 + v2) / 2;
v5 = _ascii_wcsnicmp(a1, (unsigned __int16 *)*(&off_180178D60 + 2 * v4), 85);
if ( !v5 )
break;
if ( v5 >= 0 )
v2 = v4 + 1;
else
v3 = v4 - 1;
if ( v2 > v3 )
{
v6 = -1;
goto LABEL_10;
}
}
v6 = dword_180178D68[4 * v4];
LABEL_10:
if ( v6 < 0xE4 )
return (unsigned int)dword_180177300[4 * v6];
else
return 0;
}