{"type": "func", "start": 6443738040, "end": 6443738521, "name": "setSBUpLow", "pseudocode": "// \n// setSBUpLow from 0x18013a3b8 to 0x18013a599 (481 bytes)\n// \n// 3 xrefs:\n// > _setmbcp_nolock @ 0x18013a936\n// > <???> @ 0x180203848\n// > <???> @ 0x180203854\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\nvoid __fastcall setSBUpLow(struct __crt_multibyte_data *a1)\n{\n  UINT v2; // ecx\n  unsigned int v3; // eax\n  char *v4; // rcx\n  __int64 v5; // rsi\n  BYTE v6; // al\n  BYTE *LeadByte; // rdx\n  unsigned int v8; // r8d\n  __int64 i; // rcx\n  __int64 v10; // rax\n  WORD *v11; // rdx\n  char v12; // cl\n  unsigned int v13; // edx\n  __int64 v14; // rcx\n  char v15; // al\n  struct _cpinfo CPInfo; // [rsp+50h] [rbp-B0h] BYREF\n  char v17[256]; // [rsp+70h] [rbp-90h] BYREF\n  char v18[256]; // [rsp+170h] [rbp+70h] BYREF\n  char v19[256]; // [rsp+270h] [rbp+170h] BYREF\n  WORD CharType[512]; // [rsp+370h] [rbp+270h] BYREF\n\n  v2 = *((_DWORD *)a1 + 1);\n  if ( v2 == 65001 || !GetCPInfo(v2, &CPInfo) )\n  {\n    v13 = 0;\n    v14 = 1;\n    do\n    {\n      if ( v13 - 97 + 32 > 0x19 )\n      {\n        if ( v13 - 97 > 0x19 )\n        {\n          v15 = 0;\n        }\n        else\n        {\n          *((_BYTE *)a1 + v14 + 24) |= 0x20u;\n          v15 = v13 - 32;\n        }\n      }\n      else\n      {\n        *((_BYTE *)a1 + v14 + 24) |= 0x10u;\n        v15 = v13 + 32;\n      }\n      *((_BYTE *)a1 + v14 + 280) = v15;\n      ++v13;\n      ++v14;\n    }\n    while ( v13 < 0x100 );\n  }\n  else\n  {\n    v3 = 0;\n    v4 = v17;\n    v5 = 256;\n    do\n      *v4++ = v3++;\n    while ( v3 < 0x100 );\n    v6 = CPInfo.LeadByte[0];\n    LeadByte = CPInfo.LeadByte;\n    v17[0] = 32;\n    while ( v6 )\n    {\n      v8 = LeadByte[1];\n      for ( i = v6; (unsigned int)i <= v8 && (unsigned int)i < 0x100; i = (unsigned int)(i + 1) )\n        v17[i] = 32;\n      LeadByte += 2;\n      v6 = *LeadByte;\n    }\n    _acrt_GetStringTypeA(nullptr, 1u, CharType, *((_DWORD *)a1 + 1), 0);\n    _acrt_LCMapStringA(nullptr, *((wchar_t **)a1 + 68), 0x100u, v17, 256, v18, 256, *((_DWORD *)a1 + 1), 0);\n    _acrt_LCMapStringA(nullptr, *((wchar_t **)a1 + 68), 0x200u, v17, 256, v19, 256, *((_DWORD *)a1 + 1), 0);\n    v10 = 1;\n    v11 = CharType;\n    do\n    {\n      if ( (*(_BYTE *)v11 & 1) != 0 )\n      {\n        *((_BYTE *)a1 + v10 + 24) |= 0x10u;\n        v12 = v17[v10 + 255];\n      }\n      else if ( (*(_BYTE *)v11 & 2) != 0 )\n      {\n        *((_BYTE *)a1 + v10 + 24) |= 0x20u;\n        v12 = v18[v10 + 255];\n      }\n      else\n      {\n        v12 = 0;\n      }\n      *((_BYTE *)a1 + v10 + 280) = v12;\n      ++v11;\n      ++v10;\n      --v5;\n    }\n    while ( v5 );\n  }\n}", "assembly": "; \n; setSBUpLow from 0x18013a3b8 to 0x18013a599 (481 bytes)\n; \n; 3 xrefs:\n; > _setmbcp_nolock @ 0x18013a936\n; > <???> @ 0x180203848\n; > <???> @ 0x180203854\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\nmov     [rsp-8+arg_8], rbx                                             ; +0x0, 0x18013a3b8\nmov     [rsp-8+arg_10], rsi                                            ; +0x5, 0x18013a3bd\npush    rbp                                                            ; +0xa, 0x18013a3c2\nlea     rbp, [rsp-680h]                                                ; +0xb, 0x18013a3c3\nsub     rsp, 780h                                                      ; +0x13, 0x18013a3cb\nmov     rax, cs:__security_cookie                                      ; +0x1a, 0x18013a3d2\nxor     rax, rsp                                                       ; +0x21, 0x18013a3d9\nmov     [rbp+680h+var_10], rax                                         ; +0x24, 0x18013a3dc\nmov     rbx, rcx                                                       ; +0x2b, 0x18013a3e3\nmov     ecx, [rcx+4]; CodePage                                         ; +0x2e, 0x18013a3e6\ncmp     ecx, 0FDE9h                                                    ; +0x31, 0x18013a3e9\njz      loc_18013A532                                                  ; +0x37, 0x18013a3ef\nlea     rdx, [rsp+780h+CPInfo]; lpCPInfo                               ; +0x3d, 0x18013a3f5\ncall    cs:GetCPInfo                                                   ; +0x42, 0x18013a3fa\ntest    eax, eax                                                       ; +0x48, 0x18013a400\njz      loc_18013A532                                                  ; +0x4a, 0x18013a402\nxor     eax, eax                                                       ; +0x50, 0x18013a408\nlea     rcx, [rsp+780h+var_710]                                        ; +0x52, 0x18013a40a\nmov     esi, 100h                                                      ; +0x57, 0x18013a40f\nmov     [rcx], al                                                      ; +0x5c, 0x18013a414\ninc     eax                                                            ; +0x5e, 0x18013a416\ninc     rcx                                                            ; +0x60, 0x18013a418\ncmp     eax, esi                                                       ; +0x63, 0x18013a41b\njb      short loc_18013A414                                            ; +0x65, 0x18013a41d\nmov     al, [rsp+780h+CPInfo.LeadByte]                                 ; +0x67, 0x18013a41f\nlea     rdx, [rsp+780h+CPInfo.LeadByte]                                ; +0x6b, 0x18013a423\nmov     [rsp+780h+var_710], 20h ; ' '                                  ; +0x70, 0x18013a428\njmp     short loc_18013A44F                                            ; +0x75, 0x18013a42d\nmovzx   r8d, byte ptr [rdx+1]                                          ; +0x77, 0x18013a42f\nmovzx   ecx, al                                                        ; +0x7c, 0x18013a434\njmp     short loc_18013A444                                            ; +0x7f, 0x18013a437\ncmp     ecx, esi                                                       ; +0x81, 0x18013a439\njnb     short loc_18013A449                                            ; +0x83, 0x18013a43b\nmov     [rsp+rcx+780h+var_710], 20h ; ' '                              ; +0x85, 0x18013a43d\ninc     ecx                                                            ; +0x8a, 0x18013a442\ncmp     ecx, r8d                                                       ; +0x8c, 0x18013a444\njbe     short loc_18013A439                                            ; +0x8f, 0x18013a447\nadd     rdx, 2                                                         ; +0x91, 0x18013a449\nmov     al, [rdx]                                                      ; +0x95, 0x18013a44d\ntest    al, al                                                         ; +0x97, 0x18013a44f\njnz     short loc_18013A42F                                            ; +0x99, 0x18013a451\nmov     eax, [rbx+4]                                                   ; +0x9b, 0x18013a453\nlea     r8, [rsp+780h+var_710]                                         ; +0x9e, 0x18013a456\nand     [rsp+780h+var_750], 0                                          ; +0xa3, 0x18013a45b\nmov     r9d, esi                                                       ; +0xa8, 0x18013a460\nmov     dword ptr [rsp+780h+var_758], eax; int                         ; +0xab, 0x18013a463\nmov     edx, 1; dwInfoType                                             ; +0xaf, 0x18013a467\nlea     rax, [rbp+680h+CharType]                                       ; +0xb4, 0x18013a46c\nxor     ecx, ecx; struct __crt_locale_pointers *                       ; +0xbb, 0x18013a473\nmov     [rsp+780h+lpCharType], rax; lpCharType                         ; +0xbd, 0x18013a475\ncall    __acrt_GetStringTypeA                                          ; +0xc2, 0x18013a47a\nand     [rsp+780h+var_740], 0                                          ; +0xc7, 0x18013a47f\nlea     r9, [rsp+780h+var_710]; char *                                 ; +0xcc, 0x18013a484\nmov     eax, [rbx+4]                                                   ; +0xd1, 0x18013a489\nmov     r8d, esi; unsigned int                                         ; +0xd4, 0x18013a48c\nmov     rdx, [rbx+220h]; wchar_t *                                     ; +0xd7, 0x18013a48f\nxor     ecx, ecx; struct __crt_locale_pointers *                       ; +0xde, 0x18013a496\nmov     [rsp+780h+var_748], eax; int                                   ; +0xe0, 0x18013a498\nlea     rax, [rbp+680h+var_610]                                        ; +0xe4, 0x18013a49c\nmov     [rsp+780h+var_750], esi; int                                   ; +0xe8, 0x18013a4a0\nmov     [rsp+780h+var_758], rax; char *                                ; +0xec, 0x18013a4a4\nmov     dword ptr [rsp+780h+lpCharType], esi; int                      ; +0xf1, 0x18013a4a9\ncall    __acrt_LCMapStringA                                            ; +0xf5, 0x18013a4ad\nand     [rsp+780h+var_740], 0                                          ; +0xfa, 0x18013a4b2\nlea     r9, [rsp+780h+var_710]; char *                                 ; +0xff, 0x18013a4b7\nmov     eax, [rbx+4]                                                   ; +0x104, 0x18013a4bc\nmov     r8d, 200h; unsigned int                                        ; +0x107, 0x18013a4bf\nmov     rdx, [rbx+220h]; wchar_t *                                     ; +0x10d, 0x18013a4c5\nxor     ecx, ecx; struct __crt_locale_pointers *                       ; +0x114, 0x18013a4cc\nmov     [rsp+780h+var_748], eax; int                                   ; +0x116, 0x18013a4ce\nlea     rax, [rbp+680h+var_510]                                        ; +0x11a, 0x18013a4d2\nmov     [rsp+780h+var_750], esi; int                                   ; +0x121, 0x18013a4d9\nmov     [rsp+780h+var_758], rax; char *                                ; +0x125, 0x18013a4dd\nmov     dword ptr [rsp+780h+lpCharType], esi; int                      ; +0x12a, 0x18013a4e2\ncall    __acrt_LCMapStringA                                            ; +0x12e, 0x18013a4e6\nmov     eax, 1                                                         ; +0x133, 0x18013a4eb\nlea     rdx, [rbp+680h+CharType]                                       ; +0x138, 0x18013a4f0\ntest    byte ptr [rdx], 1                                              ; +0x13f, 0x18013a4f7\njz      short loc_18013A507                                            ; +0x142, 0x18013a4fa\nor      byte ptr [rax+rbx+18h], 10h                                    ; +0x144, 0x18013a4fc\nmov     cl, [rbp+rax+680h+var_611]                                     ; +0x149, 0x18013a501\njmp     short loc_18013A51C                                            ; +0x14d, 0x18013a505\ntest    byte ptr [rdx], 2                                              ; +0x14f, 0x18013a507\njz      short loc_18013A51A                                            ; +0x152, 0x18013a50a\nor      byte ptr [rax+rbx+18h], 20h                                    ; +0x154, 0x18013a50c\nmov     cl, [rbp+rax+680h+var_511]                                     ; +0x159, 0x18013a511\njmp     short loc_18013A51C                                            ; +0x160, 0x18013a518\nxor     cl, cl                                                         ; +0x162, 0x18013a51a\nmov     [rax+rbx+118h], cl                                             ; +0x164, 0x18013a51c\nadd     rdx, 2                                                         ; +0x16b, 0x18013a523\ninc     rax                                                            ; +0x16f, 0x18013a527\nsub     rsi, 1                                                         ; +0x172, 0x18013a52a\njnz     short loc_18013A4F7                                            ; +0x176, 0x18013a52e\njmp     short loc_18013A575                                            ; +0x178, 0x18013a530\nxor     edx, edx                                                       ; +0x17a, 0x18013a532\nmov     esi, 100h                                                      ; +0x17c, 0x18013a534\nlea     ecx, [rdx+1]                                                   ; +0x181, 0x18013a539\nlea     r8d, [rdx-61h]                                                 ; +0x184, 0x18013a53c\nlea     eax, [r8+20h]                                                  ; +0x188, 0x18013a540\ncmp     eax, 19h                                                       ; +0x18c, 0x18013a544\nja      short loc_18013A553                                            ; +0x18f, 0x18013a547\nor      byte ptr [rbx+rcx+18h], 10h                                    ; +0x191, 0x18013a549\nlea     eax, [rdx+20h]                                                 ; +0x196, 0x18013a54e\njmp     short loc_18013A565                                            ; +0x199, 0x18013a551\ncmp     r8d, 19h                                                       ; +0x19b, 0x18013a553\nja      short loc_18013A563                                            ; +0x19f, 0x18013a557\nor      byte ptr [rbx+rcx+18h], 20h                                    ; +0x1a1, 0x18013a559\nlea     eax, [rdx-20h]                                                 ; +0x1a6, 0x18013a55e\njmp     short loc_18013A565                                            ; +0x1a9, 0x18013a561\nxor     al, al                                                         ; +0x1ab, 0x18013a563\nmov     [rbx+rcx+118h], al                                             ; +0x1ad, 0x18013a565\ninc     edx                                                            ; +0x1b4, 0x18013a56c\ninc     rcx                                                            ; +0x1b6, 0x18013a56e\ncmp     edx, esi                                                       ; +0x1b9, 0x18013a571\njb      short loc_18013A53C                                            ; +0x1bb, 0x18013a573\nmov     rcx, [rbp+680h+var_10]                                         ; +0x1bd, 0x18013a575\nxor     rcx, rsp; StackCookie                                          ; +0x1c4, 0x18013a57c\ncall    __security_check_cookie                                        ; +0x1c7, 0x18013a57f\nlea     r11, [rsp+780h+var_s0]                                         ; +0x1cc, 0x18013a584\nmov     rbx, [r11+18h]                                                 ; +0x1d4, 0x18013a58c\nmov     rsi, [r11+20h]                                                 ; +0x1d8, 0x18013a590\nmov     rsp, r11                                                       ; +0x1dc, 0x18013a594\npop     rbp                                                            ; +0x1df, 0x18013a597\nretn                                                                   ; +0x1e0, 0x18013a598", "xrefs": ["_setmbcp_nolock @ 0x18013a936", "<???> @ 0x180203848", "<???> @ 0x180203854"], "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"}