//
// getSystemCP from 0x18013a2a8 to 0x18013a325 (125 bytes)
//
// 3 xrefs:
// > setmbcp_internal @ 0x18013a5c7
// > _setmbcp_nolock @ 0x18013a8b6
// > ??> @ 0x18020383c
//
// 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
//
__int64 __fastcall getSystemCP(UINT a1)
{
UINT OEMCP; // eax
_QWORD v4[3]; // [rsp+20h] [rbp-28h] BYREF
char v5; // [rsp+38h] [rbp-10h]
_LocaleUpdate::_LocaleUpdate((_LocaleUpdate *)v4, nullptr);
dword_1801F55D8 = 0;
switch ( a1 )
{
case 0xFFFFFFFE:
dword_1801F55D8 = 1;
OEMCP = GetOEMCP();
LABEL_5:
a1 = OEMCP;
break;
case 0xFFFFFFFD:
dword_1801F55D8 = 1;
OEMCP = GetACP();
goto LABEL_5;
case 0xFFFFFFFC:
dword_1801F55D8 = 1;
a1 = *(_DWORD *)(v4[1] + 12LL);
break;
}
if ( v5 )
*(_DWORD *)(v4[0] + 936LL) &= ~2u;
return a1;
}