{"type": "func", "start": 6442542128, "end": 6442542404, "name": "sub_180016430", "pseudocode": "// \n// sub_180016430 from 0x180016430 to 0x180016544 (276 bytes)\n// \n// 3 xrefs:\n// > sub_18001B8F0 @ 0x18001b900\n// > sub_18001C0E0 @ 0x18001c1a8\n// > <???> @ 0x1801b85fc\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:21:24 +0000\n// \n\n// write access to const memory has been detected, the output may be wrong!\n// Hidden C++ exception states: #wind=2\n__int64 __fastcall sub_180016430(__int64 a1)\n{\n  __int64 v2; // rcx\n  __int64 v3; // rdi\n  __int64 v4; // rbx\n  struct std::locale::_Locimp *v5; // rax\n  __int64 v6; // rbx\n  __int64 v8; // [rsp+40h] [rbp+8h] BYREF\n  char v9; // [rsp+48h] [rbp+10h] BYREF\n  __int64 v10; // [rsp+50h] [rbp+18h] BYREF\n\n  std::_Lockit::_Lockit((std::_Lockit *)&v9, 0);\n  v10 = qword_1801B2380;\n  if ( !std::codecvt<char,char,_Mbstatet>::id )\n  {\n    std::_Lockit::_Lockit((std::_Lockit *)&v8, 0);\n    std::codecvt<char,char,_Mbstatet>::id = ++std::locale::id::_Id_cnt;\n    std::_Lockit::~_Lockit((std::_Lockit *)&v8);\n  }\n  v2 = *(_QWORD *)(a1 + 8);\n  v3 = 8LL * std::codecvt<char,char,_Mbstatet>::id;\n  if ( std::codecvt<char,char,_Mbstatet>::id >= *(_QWORD *)(v2 + 24) )\n  {\n    v4 = 0;\n  }\n  else\n  {\n    v4 = *(_QWORD *)(v3 + *(_QWORD *)(v2 + 16));\n    if ( v4 )\n      goto LABEL_14;\n  }\n  if ( !*(_BYTE *)(v2 + 36) )\n    goto LABEL_10;\n  v5 = std::locale::_Getgloballocale();\n  if ( std::codecvt<char,char,_Mbstatet>::id < *((_QWORD *)v5 + 3) )\n  {\n    v4 = *(_QWORD *)(v3 + *((_QWORD *)v5 + 2));\nLABEL_10:\n    if ( v4 )\n      goto LABEL_14;\n  }\n  v4 = v10;\n  if ( !v10 )\n  {\n    if ( std::codecvt<char,char,_Mbstatet>::_Getcat(&v10, a1) == -1 )\n      Concurrency::cancel_current_task();\n    v6 = v10;\n    v8 = v10;\n    sub_1800E4948(v10);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)v6 + 8LL))(v6);\n    v4 = v10;\n    qword_1801B2380 = v10;\n  }\nLABEL_14:\n  std::_Lockit::~_Lockit((std::_Lockit *)&v9);\n  return v4;\n}", "assembly": "; \n; sub_180016430 from 0x180016430 to 0x180016544 (276 bytes)\n; \n; 3 xrefs:\n; > sub_18001B8F0 @ 0x18001b900\n; > sub_18001C0E0 @ 0x18001c1a8\n; > <???> @ 0x1801b85fc\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:21:24 +0000\n; \nmov     [rsp+arg_18], rbx                                              ; +0x0, 0x180016430\npush    rbp                                                            ; +0x5, 0x180016435\npush    rsi                                                            ; +0x6, 0x180016436\npush    rdi                                                            ; +0x7, 0x180016437\nsub     rsp, 20h                                                       ; +0x8, 0x180016438\nmov     rbp, rcx                                                       ; +0xc, 0x18001643c\nxor     edx, edx                                                       ; +0xf, 0x18001643f\nlea     rcx, [rsp+38h+arg_8]                                           ; +0x11, 0x180016441\ncall    cs:??0_Lockit@std@@QEAA@H@Z; std::_Lockit::_Lockit(int)        ; +0x16, 0x180016446\nnop                                                                    ; +0x1c, 0x18001644c\nmov     rax, cs:qword_1801B2380                                        ; +0x1d, 0x18001644d\nmov     [rsp+38h+arg_10], rax                                          ; +0x24, 0x180016454\nmov     rbx, cs:?id@?$codecvt@DDU_Mbstatet@@@std@@2V0locale@2@A; std::locale::id std::codecvt<char,char,_Mbstatet>::id ; +0x29, 0x180016459\ncmp     qword ptr [rbx], 0                                             ; +0x30, 0x180016460\njnz     short loc_18001649A                                            ; +0x34, 0x180016464\nxor     edx, edx                                                       ; +0x36, 0x180016466\nlea     rcx, [rsp+38h+arg_0]                                           ; +0x38, 0x180016468\ncall    cs:??0_Lockit@std@@QEAA@H@Z; std::_Lockit::_Lockit(int)        ; +0x3d, 0x18001646d\ncmp     qword ptr [rbx], 0                                             ; +0x43, 0x180016473\njnz     short loc_18001648F                                            ; +0x47, 0x180016477\nmov     rax, cs:?_Id_cnt@id@locale@std@@0HA; int std::locale::id::_Id_cnt ; +0x49, 0x180016479\ninc     dword ptr [rax]                                                ; +0x50, 0x180016480\nmov     rax, cs:?_Id_cnt@id@locale@std@@0HA; int std::locale::id::_Id_cnt ; +0x52, 0x180016482\nmovsxd  rcx, dword ptr [rax]                                           ; +0x59, 0x180016489\nmov     [rbx], rcx                                                     ; +0x5c, 0x18001648c\nlea     rcx, [rsp+38h+arg_0]                                           ; +0x5f, 0x18001648f\ncall    cs:__imp_??1_Lockit@std@@QEAA@XZ; std::_Lockit::~_Lockit(void) ; +0x64, 0x180016494\nmov     rsi, [rbx]                                                     ; +0x6a, 0x18001649a\nmov     rcx, [rbp+8]                                                   ; +0x6d, 0x18001649d\nlea     rdi, ds:0[rsi*8]                                               ; +0x71, 0x1800164a1\ncmp     rsi, [rcx+18h]                                                 ; +0x79, 0x1800164a9\njnb     short loc_1800164BE                                            ; +0x7d, 0x1800164ad\nmov     rax, [rcx+10h]                                                 ; +0x7f, 0x1800164af\nmov     rbx, [rdi+rax]                                                 ; +0x83, 0x1800164b3\ntest    rbx, rbx                                                       ; +0x87, 0x1800164b7\njnz     short loc_180016523                                            ; +0x8a, 0x1800164ba\njmp     short loc_1800164C0                                            ; +0x8c, 0x1800164bc\nxor     ebx, ebx                                                       ; +0x8e, 0x1800164be\ncmp     byte ptr [rcx+24h], 0                                          ; +0x90, 0x1800164c0\njz      short loc_1800164D9                                            ; +0x94, 0x1800164c4\ncall    ?_Getgloballocale@locale@std@@CAPEAV_Locimp@12@XZ; std::locale::_Getgloballocale(void) ; +0x96, 0x1800164c6\ncmp     rsi, [rax+18h]                                                 ; +0x9b, 0x1800164cb\njnb     short loc_1800164DE                                            ; +0x9f, 0x1800164cf\nmov     rax, [rax+10h]                                                 ; +0xa1, 0x1800164d1\nmov     rbx, [rdi+rax]                                                 ; +0xa5, 0x1800164d5\ntest    rbx, rbx                                                       ; +0xa9, 0x1800164d9\njnz     short loc_180016523                                            ; +0xac, 0x1800164dc\nmov     rbx, [rsp+38h+arg_10]                                          ; +0xae, 0x1800164de\ntest    rbx, rbx                                                       ; +0xb3, 0x1800164e3\njnz     short loc_180016523                                            ; +0xb6, 0x1800164e6\nmov     rdx, rbp                                                       ; +0xb8, 0x1800164e8\nlea     rcx, [rsp+38h+arg_10]                                          ; +0xbb, 0x1800164eb\ncall    cs:?_Getcat@?$codecvt@DDU_Mbstatet@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z; std::codecvt<char,char,_Mbstatet>::_Getcat(std::locale::facet const * *,std::locale const *) ; +0xc0, 0x1800164f0\ncmp     rax, 0FFFFFFFFFFFFFFFFh                                        ; +0xc6, 0x1800164f6\njz      short loc_18001653E                                            ; +0xca, 0x1800164fa\nmov     rbx, [rsp+38h+arg_10]                                          ; +0xcc, 0x1800164fc\nmov     [rsp+38h+arg_0], rbx                                           ; +0xd1, 0x180016501\nmov     rcx, rbx                                                       ; +0xd6, 0x180016506\ncall    sub_1800E4948                                                  ; +0xd9, 0x180016509\nmov     rax, [rbx]                                                     ; +0xde, 0x18001650e\nmov     rcx, rbx                                                       ; +0xe1, 0x180016511\ncall    qword ptr [rax+8]                                              ; +0xe4, 0x180016514\nmov     rbx, [rsp+38h+arg_10]                                          ; +0xe7, 0x180016517\nmov     cs:qword_1801B2380, rbx                                        ; +0xec, 0x18001651c\nlea     rcx, [rsp+38h+arg_8]                                           ; +0xf3, 0x180016523\ncall    cs:__imp_??1_Lockit@std@@QEAA@XZ; std::_Lockit::~_Lockit(void) ; +0xf8, 0x180016528\nmov     rax, rbx                                                       ; +0xfe, 0x18001652e\nmov     rbx, [rsp+38h+arg_18]                                          ; +0x101, 0x180016531\nadd     rsp, 20h                                                       ; +0x106, 0x180016536\npop     rdi                                                            ; +0x10a, 0x18001653a\npop     rsi                                                            ; +0x10b, 0x18001653b\npop     rbp                                                            ; +0x10c, 0x18001653c\nretn                                                                   ; +0x10d, 0x18001653d\ncall    ?cancel_current_task@Concurrency@@YAXXZ_0; Concurrency::cancel_current_task(void) ; +0x10e, 0x18001653e\nalign 4                                                                ; +0x113, 0x180016543", "xrefs": ["sub_18001B8F0 @ 0x18001b900", "sub_18001C0E0 @ 0x18001c1a8", "<???> @ 0x1801b85fc"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}