{"type": "func", "start": 6443737768, "end": 6443737893, "name": "getSystemCP", "pseudocode": "// \n// getSystemCP from 0x18013a2a8 to 0x18013a325 (125 bytes)\n// \n// 3 xrefs:\n// > setmbcp_internal @ 0x18013a5c7\n// > _setmbcp_nolock @ 0x18013a8b6\n// > <???> @ 0x18020383c\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\n__int64 __fastcall getSystemCP(UINT a1)\n{\n  UINT OEMCP; // eax\n  _QWORD v4[3]; // [rsp+20h] [rbp-28h] BYREF\n  char v5; // [rsp+38h] [rbp-10h]\n\n  _LocaleUpdate::_LocaleUpdate((_LocaleUpdate *)v4, nullptr);\n  dword_1801F55D8 = 0;\n  switch ( a1 )\n  {\n    case 0xFFFFFFFE:\n      dword_1801F55D8 = 1;\n      OEMCP = GetOEMCP();\nLABEL_5:\n      a1 = OEMCP;\n      break;\n    case 0xFFFFFFFD:\n      dword_1801F55D8 = 1;\n      OEMCP = GetACP();\n      goto LABEL_5;\n    case 0xFFFFFFFC:\n      dword_1801F55D8 = 1;\n      a1 = *(_DWORD *)(v4[1] + 12LL);\n      break;\n  }\n  if ( v5 )\n    *(_DWORD *)(v4[0] + 936LL) &= ~2u;\n  return a1;\n}", "assembly": "; \n; getSystemCP from 0x18013a2a8 to 0x18013a325 (125 bytes)\n; \n; 3 xrefs:\n; > setmbcp_internal @ 0x18013a5c7\n; > _setmbcp_nolock @ 0x18013a8b6\n; > <???> @ 0x18020383c\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\npush    rbx                                                            ; +0x0, 0x18013a2a8\nsub     rsp, 40h                                                       ; +0x2, 0x18013a2aa\nmov     ebx, ecx                                                       ; +0x6, 0x18013a2ae\nxor     edx, edx; struct __crt_locale_pointers *                       ; +0x8, 0x18013a2b0\nlea     rcx, [rsp+48h+var_28]; this                                    ; +0xa, 0x18013a2b2\ncall    ??0_LocaleUpdate@@QEAA@QEAU__crt_locale_pointers@@@Z           ; +0xf, 0x18013a2b7\nand     cs:dword_1801F55D8, 0                                          ; +0x14, 0x18013a2bc\ncmp     ebx, 0FFFFFFFEh                                                ; +0x1b, 0x18013a2c3\njnz     short loc_18013A2DA                                            ; +0x1e, 0x18013a2c6\nmov     cs:dword_1801F55D8, 1                                          ; +0x20, 0x18013a2c8\ncall    cs:GetOEMCP                                                    ; +0x2a, 0x18013a2d2\njmp     short loc_18013A2EF                                            ; +0x30, 0x18013a2d8\ncmp     ebx, 0FFFFFFFDh                                                ; +0x32, 0x18013a2da\njnz     short loc_18013A2F3                                            ; +0x35, 0x18013a2dd\nmov     cs:dword_1801F55D8, 1                                          ; +0x37, 0x18013a2df\ncall    cs:GetACP                                                      ; +0x41, 0x18013a2e9\nmov     ebx, eax                                                       ; +0x47, 0x18013a2ef\njmp     short loc_18013A30A                                            ; +0x49, 0x18013a2f1\ncmp     ebx, 0FFFFFFFCh                                                ; +0x4b, 0x18013a2f3\njnz     short loc_18013A30A                                            ; +0x4e, 0x18013a2f6\nmov     rax, [rsp+48h+var_20]                                          ; +0x50, 0x18013a2f8\nmov     cs:dword_1801F55D8, 1                                          ; +0x55, 0x18013a2fd\nmov     ebx, [rax+0Ch]                                                 ; +0x5f, 0x18013a307\ncmp     [rsp+48h+var_10], 0                                            ; +0x62, 0x18013a30a\njz      short loc_18013A31D                                            ; +0x67, 0x18013a30f\nmov     rcx, [rsp+48h+var_28]                                          ; +0x69, 0x18013a311\nand     dword ptr [rcx+3A8h], 0FFFFFFFDh                               ; +0x6e, 0x18013a316\nmov     eax, ebx                                                       ; +0x75, 0x18013a31d\nadd     rsp, 40h                                                       ; +0x77, 0x18013a31f\npop     rbx                                                            ; +0x7b, 0x18013a323\nretn                                                                   ; +0x7c, 0x18013a324", "xrefs": ["setmbcp_internal @ 0x18013a5c7", "_setmbcp_nolock @ 0x18013a8b6", "<???> @ 0x18020383c"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}