{"type": "func", "start": 6442543232, "end": 6442543456, "name": "sub_180016880", "pseudocode": "// \n// sub_180016880 from 0x180016880 to 0x180016960 (224 bytes)\n// \n// 3 xrefs:\n// > sub_18001B9D0 @ 0x18001b9e0\n// > sub_18001C230 @ 0x18001c2f8\n// > <???> @ 0x1801ae59c\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// Hidden C++ exception states: #wind=2\nstruct std::_Facet_base *__fastcall sub_180016880(__int64 a1)\n{\n  unsigned __int64 v2; // rsi\n  __int64 v3; // rdx\n  __int64 v4; // rdi\n  struct std::_Facet_base *v5; // rbx\n  struct std::locale::_Locimp *v6; // rax\n  struct std::_Facet_base *v7; // rbx\n  char v9; // [rsp+40h] [rbp+8h] BYREF\n  struct std::_Facet_base *v10; // [rsp+48h] [rbp+10h] BYREF\n  struct std::_Facet_base *v11; // [rsp+50h] [rbp+18h]\n\n  std::_Lockit::_Lockit((std::_Lockit *)&v9, 0);\n  v10 = (struct std::_Facet_base *)qword_1801A8368;\n  v2 = std::locale::id::operator unsigned __int64(std::codecvt<char,char,_Mbstatet>::id);\n  v3 = *(_QWORD *)(a1 + 8);\n  v4 = 8 * v2;\n  if ( v2 >= *(_QWORD *)(v3 + 24) )\n  {\n    v5 = nullptr;\n  }\n  else\n  {\n    v5 = *(struct std::_Facet_base **)(v4 + *(_QWORD *)(v3 + 16));\n    if ( v5 )\n      goto LABEL_12;\n  }\n  if ( !*(_BYTE *)(v3 + 36) )\n    goto LABEL_8;\n  v6 = std::locale::_Getgloballocale();\n  if ( v2 < *((_QWORD *)v6 + 3) )\n  {\n    v5 = *(struct std::_Facet_base **)(v4 + *((_QWORD *)v6 + 2));\nLABEL_8:\n    if ( v5 )\n      goto LABEL_12;\n  }\n  v5 = v10;\n  if ( !v10 )\n  {\n    if ( std::codecvt<char,char,_Mbstatet>::_Getcat(&v10, a1) == -1 )\n      Concurrency::cancel_current_task();\n    v7 = v10;\n    v11 = v10;\n    std::_Facet_Register(v10);\n    (*(void (__fastcall **)(struct std::_Facet_base *))(*(_QWORD *)v7 + 8LL))(v7);\n    v5 = v10;\n    qword_1801A8368 = (__int64)v10;\n  }\nLABEL_12:\n  std::_Lockit::~_Lockit((std::_Lockit *)&v9);\n  return v5;\n}", "assembly": "; \n; sub_180016880 from 0x180016880 to 0x180016960 (224 bytes)\n; \n; 3 xrefs:\n; > sub_18001B9D0 @ 0x18001b9e0\n; > sub_18001C230 @ 0x18001c2f8\n; > <???> @ 0x1801ae59c\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+arg_18], rbx                                              ; +0x0, 0x180016880\npush    rbp                                                            ; +0x5, 0x180016885\npush    rsi                                                            ; +0x6, 0x180016886\npush    rdi                                                            ; +0x7, 0x180016887\nsub     rsp, 20h                                                       ; +0x8, 0x180016888\nmov     rbp, rcx                                                       ; +0xc, 0x18001688c\nxor     edx, edx                                                       ; +0xf, 0x18001688f\nlea     rcx, [rsp+38h+arg_0]                                           ; +0x11, 0x180016891\ncall    cs:??0_Lockit@std@@QEAA@H@Z; std::_Lockit::_Lockit(int)        ; +0x16, 0x180016896\nnop                                                                    ; +0x1c, 0x18001689c\nmov     rax, cs:qword_1801A8368                                        ; +0x1d, 0x18001689d\nmov     [rsp+38h+arg_8], rax                                           ; +0x24, 0x1800168a4\nmov     rcx, cs:?id@?$codecvt@DDU_Mbstatet@@@std@@2V0locale@2@A; std::locale::id std::codecvt<char,char,_Mbstatet>::id ; +0x29, 0x1800168a9\ncall    cs:??Bid@locale@std@@QEAA_KXZ; std::locale::id::operator unsigned __int64(void) ; +0x30, 0x1800168b0\nmov     rsi, rax                                                       ; +0x36, 0x1800168b6\nmov     rdx, [rbp+8]                                                   ; +0x39, 0x1800168b9\nlea     rdi, ds:0[rax*8]                                               ; +0x3d, 0x1800168bd\ncmp     rax, [rdx+18h]                                                 ; +0x45, 0x1800168c5\njnb     short loc_1800168DA                                            ; +0x49, 0x1800168c9\nmov     rcx, [rdx+10h]                                                 ; +0x4b, 0x1800168cb\nmov     rbx, [rdi+rcx]                                                 ; +0x4f, 0x1800168cf\ntest    rbx, rbx                                                       ; +0x53, 0x1800168d3\njnz     short loc_18001693F                                            ; +0x56, 0x1800168d6\njmp     short loc_1800168DC                                            ; +0x58, 0x1800168d8\nxor     ebx, ebx                                                       ; +0x5a, 0x1800168da\ncmp     byte ptr [rdx+24h], 0                                          ; +0x5c, 0x1800168dc\njz      short loc_1800168F5                                            ; +0x60, 0x1800168e0\ncall    ?_Getgloballocale@locale@std@@CAPEAV_Locimp@12@XZ; std::locale::_Getgloballocale(void) ; +0x62, 0x1800168e2\ncmp     rsi, [rax+18h]                                                 ; +0x67, 0x1800168e7\njnb     short loc_1800168FA                                            ; +0x6b, 0x1800168eb\nmov     rax, [rax+10h]                                                 ; +0x6d, 0x1800168ed\nmov     rbx, [rdi+rax]                                                 ; +0x71, 0x1800168f1\ntest    rbx, rbx                                                       ; +0x75, 0x1800168f5\njnz     short loc_18001693F                                            ; +0x78, 0x1800168f8\nmov     rbx, [rsp+38h+arg_8]                                           ; +0x7a, 0x1800168fa\ntest    rbx, rbx                                                       ; +0x7f, 0x1800168ff\njnz     short loc_18001693F                                            ; +0x82, 0x180016902\nmov     rdx, rbp                                                       ; +0x84, 0x180016904\nlea     rcx, [rsp+38h+arg_8]                                           ; +0x87, 0x180016907\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 *) ; +0x8c, 0x18001690c\ncmp     rax, 0FFFFFFFFFFFFFFFFh                                        ; +0x92, 0x180016912\njz      short loc_18001695A                                            ; +0x96, 0x180016916\nmov     rbx, [rsp+38h+arg_8]                                           ; +0x98, 0x180016918\nmov     [rsp+38h+arg_10], rbx                                          ; +0x9d, 0x18001691d\nmov     rcx, rbx; struct std::_Facet_base *                            ; +0xa2, 0x180016922\ncall    ?_Facet_Register@std@@YAXPEAV_Facet_base@1@@Z; std::_Facet_Register(std::_Facet_base *) ; +0xa5, 0x180016925\nmov     rax, [rbx]                                                     ; +0xaa, 0x18001692a\nmov     rcx, rbx                                                       ; +0xad, 0x18001692d\ncall    qword ptr [rax+8]                                              ; +0xb0, 0x180016930\nmov     rbx, [rsp+38h+arg_8]                                           ; +0xb3, 0x180016933\nmov     cs:qword_1801A8368, rbx                                        ; +0xb8, 0x180016938\nlea     rcx, [rsp+38h+arg_0]                                           ; +0xbf, 0x18001693f\ncall    cs:__imp_??1_Lockit@std@@QEAA@XZ; std::_Lockit::~_Lockit(void) ; +0xc4, 0x180016944\nmov     rax, rbx                                                       ; +0xca, 0x18001694a\nmov     rbx, [rsp+38h+arg_18]                                          ; +0xcd, 0x18001694d\nadd     rsp, 20h                                                       ; +0xd2, 0x180016952\npop     rdi                                                            ; +0xd6, 0x180016956\npop     rsi                                                            ; +0xd7, 0x180016957\npop     rbp                                                            ; +0xd8, 0x180016958\nretn                                                                   ; +0xd9, 0x180016959\ncall    ?cancel_current_task@Concurrency@@YAXXZ_0; Concurrency::cancel_current_task(void) ; +0xda, 0x18001695a\nalign 20h                                                              ; +0xdf, 0x18001695f", "xrefs": ["sub_18001B9D0 @ 0x18001b9e0", "sub_18001C230 @ 0x18001c2f8", "<???> @ 0x1801ae59c"], "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"}