{"type": "func", "start": 6443684352, "end": 6443684755, "name": "sub_18012D200", "pseudocode": "// \n// sub_18012D200 from 0x18012d200 to 0x18012d393 (403 bytes)\n// \n// 2 xrefs:\n// > __crt_stdio_output::output_processor<wchar_t,__crt_stdio_output::string_output_adapter<wchar_t>,__crt_stdio_output::standard_base<wchar_t,__crt_stdio_output::string_output_adapter<wchar_t>>>::process @ 0x18012cc77\n// > <???> @ 0x180202c54\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 10:54:57 +0000\n// \n\nchar __fastcall sub_18012D200(__int64 a1)\n{\n  __int16 v1; // ax\n  _WORD *v3; // rax\n  int v4; // eax\n  _WORD *v5; // rax\n  unsigned __int16 *v6; // rdx\n  unsigned __int64 v7; // rax\n  __int64 v8; // rdx\n\n  v1 = *(_WORD *)(a1 + 66);\n  if ( v1 == 70 )\n  {\n    if ( (*(_BYTE *)a1 & 8) == 0 )\n    {\n      *(_DWORD *)(a1 + 44) = 7;\n      return _multtenpow12(a1);\n    }\n    return 1;\n  }\n  if ( v1 == 78 )\n  {\n    if ( (*(_BYTE *)a1 & 8) == 0 )\n    {\n      *(_DWORD *)(a1 + 44) = 8;\nLABEL_7:\n      *errno() = 22;\n      invalid_parameter_noinfo();\n      return 0;\n    }\n  }\n  else\n  {\n    if ( *(_DWORD *)(a1 + 60) )\n      goto LABEL_7;\n    switch ( v1 )\n    {\n      case 'I':\n        v6 = *(unsigned __int16 **)(a1 + 24);\n        v7 = *v6;\n        if ( *(_DWORD *)v6 == 3276851 )\n        {\n          *(_DWORD *)(a1 + 60) = 10;\n          *(_QWORD *)(a1 + 24) = v6 + 2;\n        }\n        else if ( (_WORD)v7 == 54 && v6[1] == 52 )\n        {\n          *(_DWORD *)(a1 + 60) = 11;\n          *(_QWORD *)(a1 + 24) = v6 + 2;\n        }\n        else\n        {\n          LOWORD(v7) = v7 - 88;\n          if ( (unsigned __int16)v7 <= 0x20u )\n          {\n            v8 = 0x120821001LL;\n            if ( _bittest64(&v8, v7) )\n              *(_DWORD *)(a1 + 60) = 9;\n          }\n        }\n        return 1;\n      case 'L':\n        *(_DWORD *)(a1 + 60) = 8;\n        return 1;\n      case 'T':\n        *(_DWORD *)(a1 + 60) = 13;\n        return 1;\n      case 'h':\n        v5 = *(_WORD **)(a1 + 24);\n        if ( *v5 == 104 )\n        {\n          *(_QWORD *)(a1 + 24) = v5 + 1;\n          v4 = 1;\n        }\n        else\n        {\n          v4 = 2;\n        }\n        break;\n      case 'j':\n        *(_DWORD *)(a1 + 60) = 5;\n        return 1;\n      case 'l':\n        v3 = *(_WORD **)(a1 + 24);\n        if ( *v3 == 108 )\n        {\n          *(_QWORD *)(a1 + 24) = v3 + 1;\n          v4 = 4;\n        }\n        else\n        {\n          v4 = 3;\n        }\n        break;\n      default:\n        switch ( v1 )\n        {\n          case 't':\n            *(_DWORD *)(a1 + 60) = 7;\n            break;\n          case 'w':\n            *(_DWORD *)(a1 + 60) = 12;\n            break;\n          case 'z':\n            *(_DWORD *)(a1 + 60) = 6;\n            break;\n        }\n        return 1;\n    }\n    *(_DWORD *)(a1 + 60) = v4;\n  }\n  return 1;\n}", "assembly": "; \n; sub_18012D200 from 0x18012d200 to 0x18012d393 (403 bytes)\n; \n; 2 xrefs:\n; > __crt_stdio_output::output_processor<wchar_t,__crt_stdio_output::string_output_adapter<wchar_t>,__crt_stdio_output::standard_base<wchar_t,__crt_stdio_output::string_output_adapter<wchar_t>>>::process @ 0x18012cc77\n; > <???> @ 0x180202c54\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 10:54:57 +0000\n; \nsub     rsp, 28h                                                       ; +0x0, 0x18012d200\nmovzx   eax, word ptr [rcx+42h]                                        ; +0x4, 0x18012d204\ncmp     ax, 46h ; 'F'                                                  ; +0x8, 0x18012d208\njnz     short loc_18012D227                                            ; +0xc, 0x18012d20c\ntest    byte ptr [rcx], 8                                              ; +0xe, 0x18012d20e\njnz     loc_18012D38C                                                  ; +0x11, 0x18012d211\nmov     dword ptr [rcx+2Ch], 7                                         ; +0x17, 0x18012d217\nadd     rsp, 28h                                                       ; +0x1e, 0x18012d21e\njmp     __multtenpow12                                                 ; +0x22, 0x18012d222\ncmp     ax, 4Eh ; 'N'                                                  ; +0x27, 0x18012d227\njnz     short loc_18012D254                                            ; +0x2b, 0x18012d22b\ntest    byte ptr [rcx], 8                                              ; +0x2d, 0x18012d22d\njnz     loc_18012D38C                                                  ; +0x30, 0x18012d230\nmov     dword ptr [rcx+2Ch], 8                                         ; +0x36, 0x18012d236\ncall    _errno                                                         ; +0x3d, 0x18012d23d\nmov     dword ptr [rax], 16h                                           ; +0x42, 0x18012d242\ncall    _invalid_parameter_noinfo                                      ; +0x48, 0x18012d248\nxor     al, al                                                         ; +0x4d, 0x18012d24d\njmp     loc_18012D38E                                                  ; +0x4f, 0x18012d24f\ncmp     dword ptr [rcx+3Ch], 0                                         ; +0x54, 0x18012d254\njnz     short loc_18012D23D                                            ; +0x58, 0x18012d258\ncmp     ax, 49h ; 'I'                                                  ; +0x5a, 0x18012d25a\njz      loc_18012D328                                                  ; +0x5e, 0x18012d25e\ncmp     ax, 4Ch ; 'L'                                                  ; +0x64, 0x18012d264\njz      loc_18012D31F                                                  ; +0x68, 0x18012d268\ncmp     ax, 54h ; 'T'                                                  ; +0x6e, 0x18012d26e\njz      loc_18012D316                                                  ; +0x72, 0x18012d272\ncmp     ax, 68h ; 'h'                                                  ; +0x78, 0x18012d278\njz      short loc_18012D2F6                                            ; +0x7c, 0x18012d27c\ncmp     ax, 6Ah ; 'j'                                                  ; +0x7e, 0x18012d27e\njz      short loc_18012D2EA                                            ; +0x82, 0x18012d282\ncmp     ax, 6Ch ; 'l'                                                  ; +0x84, 0x18012d284\njz      short loc_18012D2C4                                            ; +0x88, 0x18012d288\ncmp     ax, 74h ; 't'                                                  ; +0x8a, 0x18012d28a\njz      short loc_18012D2B8                                            ; +0x8e, 0x18012d28e\ncmp     ax, 77h ; 'w'                                                  ; +0x90, 0x18012d290\njz      short loc_18012D2AC                                            ; +0x94, 0x18012d294\ncmp     ax, 7Ah ; 'z'                                                  ; +0x96, 0x18012d296\njnz     loc_18012D38C                                                  ; +0x9a, 0x18012d29a\nmov     dword ptr [rcx+3Ch], 6                                         ; +0xa0, 0x18012d2a0\njmp     loc_18012D38C                                                  ; +0xa7, 0x18012d2a7\nmov     dword ptr [rcx+3Ch], 0Ch                                       ; +0xac, 0x18012d2ac\njmp     loc_18012D38C                                                  ; +0xb3, 0x18012d2b3\nmov     dword ptr [rcx+3Ch], 7                                         ; +0xb8, 0x18012d2b8\njmp     loc_18012D38C                                                  ; +0xbf, 0x18012d2bf\nmov     rax, [rcx+18h]                                                 ; +0xc4, 0x18012d2c4\ncmp     word ptr [rax], 6Ch ; 'l'                                      ; +0xc8, 0x18012d2c8\njnz     short loc_18012D2DD                                            ; +0xcc, 0x18012d2cc\nadd     rax, 2                                                         ; +0xce, 0x18012d2ce\nmov     [rcx+18h], rax                                                 ; +0xd2, 0x18012d2d2\nmov     eax, 4                                                         ; +0xd6, 0x18012d2d6\njmp     short loc_18012D2E2                                            ; +0xdb, 0x18012d2db\nmov     eax, 3                                                         ; +0xdd, 0x18012d2dd\nmov     [rcx+3Ch], eax                                                 ; +0xe2, 0x18012d2e2\njmp     loc_18012D38C                                                  ; +0xe5, 0x18012d2e5\nmov     dword ptr [rcx+3Ch], 5                                         ; +0xea, 0x18012d2ea\njmp     loc_18012D38C                                                  ; +0xf1, 0x18012d2f1\nmov     rax, [rcx+18h]                                                 ; +0xf6, 0x18012d2f6\ncmp     word ptr [rax], 68h ; 'h'                                      ; +0xfa, 0x18012d2fa\njnz     short loc_18012D30F                                            ; +0xfe, 0x18012d2fe\nadd     rax, 2                                                         ; +0x100, 0x18012d300\nmov     [rcx+18h], rax                                                 ; +0x104, 0x18012d304\nmov     eax, 1                                                         ; +0x108, 0x18012d308\njmp     short loc_18012D2E2                                            ; +0x10d, 0x18012d30d\nmov     eax, 2                                                         ; +0x10f, 0x18012d30f\njmp     short loc_18012D2E2                                            ; +0x114, 0x18012d314\nmov     dword ptr [rcx+3Ch], 0Dh                                       ; +0x116, 0x18012d316\njmp     short loc_18012D38C                                            ; +0x11d, 0x18012d31d\nmov     dword ptr [rcx+3Ch], 8                                         ; +0x11f, 0x18012d31f\njmp     short loc_18012D38C                                            ; +0x126, 0x18012d326\nmov     rdx, [rcx+18h]                                                 ; +0x128, 0x18012d328\nmovzx   eax, word ptr [rdx]                                            ; +0x12c, 0x18012d32c\ncmp     ax, 33h ; '3'                                                  ; +0x12f, 0x18012d32f\njnz     short loc_18012D34D                                            ; +0x133, 0x18012d333\ncmp     word ptr [rdx+2], 32h ; '2'                                    ; +0x135, 0x18012d335\njnz     short loc_18012D34D                                            ; +0x13a, 0x18012d33a\nlea     rax, [rdx+4]                                                   ; +0x13c, 0x18012d33c\nmov     dword ptr [rcx+3Ch], 0Ah                                       ; +0x140, 0x18012d340\nmov     [rcx+18h], rax                                                 ; +0x147, 0x18012d347\njmp     short loc_18012D38C                                            ; +0x14b, 0x18012d34b\ncmp     ax, 36h ; '6'                                                  ; +0x14d, 0x18012d34d\njnz     short loc_18012D36B                                            ; +0x151, 0x18012d351\ncmp     word ptr [rdx+2], 34h ; '4'                                    ; +0x153, 0x18012d353\njnz     short loc_18012D36B                                            ; +0x158, 0x18012d358\nlea     rax, [rdx+4]                                                   ; +0x15a, 0x18012d35a\nmov     dword ptr [rcx+3Ch], 0Bh                                       ; +0x15e, 0x18012d35e\nmov     [rcx+18h], rax                                                 ; +0x165, 0x18012d365\njmp     short loc_18012D38C                                            ; +0x169, 0x18012d369\nsub     ax, 58h ; 'X'                                                  ; +0x16b, 0x18012d36b\ncmp     ax, 20h ; ' '                                                  ; +0x16f, 0x18012d36f\nja      short loc_18012D38C                                            ; +0x173, 0x18012d373\nmov     rdx, 120821001h                                                ; +0x175, 0x18012d375\nbt      rdx, rax                                                       ; +0x17f, 0x18012d37f\njnb     short loc_18012D38C                                            ; +0x183, 0x18012d383\nmov     dword ptr [rcx+3Ch], 9                                         ; +0x185, 0x18012d385\nmov     al, 1                                                          ; +0x18c, 0x18012d38c\nadd     rsp, 28h                                                       ; +0x18e, 0x18012d38e\nretn                                                                   ; +0x192, 0x18012d392", "xrefs": ["__crt_stdio_output::output_processor<wchar_t,__crt_stdio_output::string_output_adapter<wchar_t>,__crt_stdio_output::standard_base<wchar_t,__crt_stdio_output::string_output_adapter<wchar_t>>>::process @ 0x18012cc77", "<???> @ 0x180202c54"], "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"}