{"type": "func", "start": 6443683948, "end": 6443684351, "name": "sub_18012D06C", "pseudocode": "// \n// sub_18012D06C from 0x18012d06c to 0x18012d1ff (403 bytes)\n// \n// 2 xrefs:\n// > __crt_stdio_output::output_processor<wchar_t,__crt_stdio_output::stream_output_adapter<wchar_t>,__crt_stdio_output::standard_base<wchar_t,__crt_stdio_output::stream_output_adapter<wchar_t>>>::process @ 0x18012ca01\n// > <???> @ 0x180202c48\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\nchar __fastcall sub_18012D06C(__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 sub_18012D5FC(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_18012D06C from 0x18012d06c to 0x18012d1ff (403 bytes)\n; \n; 2 xrefs:\n; > __crt_stdio_output::output_processor<wchar_t,__crt_stdio_output::stream_output_adapter<wchar_t>,__crt_stdio_output::standard_base<wchar_t,__crt_stdio_output::stream_output_adapter<wchar_t>>>::process @ 0x18012ca01\n; > <???> @ 0x180202c48\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\nsub     rsp, 28h                                                       ; +0x0, 0x18012d06c\nmovzx   eax, word ptr [rcx+42h]                                        ; +0x4, 0x18012d070\ncmp     ax, 46h ; 'F'                                                  ; +0x8, 0x18012d074\njnz     short loc_18012D093                                            ; +0xc, 0x18012d078\ntest    byte ptr [rcx], 8                                              ; +0xe, 0x18012d07a\njnz     loc_18012D1F8                                                  ; +0x11, 0x18012d07d\nmov     dword ptr [rcx+2Ch], 7                                         ; +0x17, 0x18012d083\nadd     rsp, 28h                                                       ; +0x1e, 0x18012d08a\njmp     sub_18012D5FC                                                  ; +0x22, 0x18012d08e\ncmp     ax, 4Eh ; 'N'                                                  ; +0x27, 0x18012d093\njnz     short loc_18012D0C0                                            ; +0x2b, 0x18012d097\ntest    byte ptr [rcx], 8                                              ; +0x2d, 0x18012d099\njnz     loc_18012D1F8                                                  ; +0x30, 0x18012d09c\nmov     dword ptr [rcx+2Ch], 8                                         ; +0x36, 0x18012d0a2\ncall    _errno                                                         ; +0x3d, 0x18012d0a9\nmov     dword ptr [rax], 16h                                           ; +0x42, 0x18012d0ae\ncall    _invalid_parameter_noinfo                                      ; +0x48, 0x18012d0b4\nxor     al, al                                                         ; +0x4d, 0x18012d0b9\njmp     loc_18012D1FA                                                  ; +0x4f, 0x18012d0bb\ncmp     dword ptr [rcx+3Ch], 0                                         ; +0x54, 0x18012d0c0\njnz     short loc_18012D0A9                                            ; +0x58, 0x18012d0c4\ncmp     ax, 49h ; 'I'                                                  ; +0x5a, 0x18012d0c6\njz      loc_18012D194                                                  ; +0x5e, 0x18012d0ca\ncmp     ax, 4Ch ; 'L'                                                  ; +0x64, 0x18012d0d0\njz      loc_18012D18B                                                  ; +0x68, 0x18012d0d4\ncmp     ax, 54h ; 'T'                                                  ; +0x6e, 0x18012d0da\njz      loc_18012D182                                                  ; +0x72, 0x18012d0de\ncmp     ax, 68h ; 'h'                                                  ; +0x78, 0x18012d0e4\njz      short loc_18012D162                                            ; +0x7c, 0x18012d0e8\ncmp     ax, 6Ah ; 'j'                                                  ; +0x7e, 0x18012d0ea\njz      short loc_18012D156                                            ; +0x82, 0x18012d0ee\ncmp     ax, 6Ch ; 'l'                                                  ; +0x84, 0x18012d0f0\njz      short loc_18012D130                                            ; +0x88, 0x18012d0f4\ncmp     ax, 74h ; 't'                                                  ; +0x8a, 0x18012d0f6\njz      short loc_18012D124                                            ; +0x8e, 0x18012d0fa\ncmp     ax, 77h ; 'w'                                                  ; +0x90, 0x18012d0fc\njz      short loc_18012D118                                            ; +0x94, 0x18012d100\ncmp     ax, 7Ah ; 'z'                                                  ; +0x96, 0x18012d102\njnz     loc_18012D1F8                                                  ; +0x9a, 0x18012d106\nmov     dword ptr [rcx+3Ch], 6                                         ; +0xa0, 0x18012d10c\njmp     loc_18012D1F8                                                  ; +0xa7, 0x18012d113\nmov     dword ptr [rcx+3Ch], 0Ch                                       ; +0xac, 0x18012d118\njmp     loc_18012D1F8                                                  ; +0xb3, 0x18012d11f\nmov     dword ptr [rcx+3Ch], 7                                         ; +0xb8, 0x18012d124\njmp     loc_18012D1F8                                                  ; +0xbf, 0x18012d12b\nmov     rax, [rcx+18h]                                                 ; +0xc4, 0x18012d130\ncmp     word ptr [rax], 6Ch ; 'l'                                      ; +0xc8, 0x18012d134\njnz     short loc_18012D149                                            ; +0xcc, 0x18012d138\nadd     rax, 2                                                         ; +0xce, 0x18012d13a\nmov     [rcx+18h], rax                                                 ; +0xd2, 0x18012d13e\nmov     eax, 4                                                         ; +0xd6, 0x18012d142\njmp     short loc_18012D14E                                            ; +0xdb, 0x18012d147\nmov     eax, 3                                                         ; +0xdd, 0x18012d149\nmov     [rcx+3Ch], eax                                                 ; +0xe2, 0x18012d14e\njmp     loc_18012D1F8                                                  ; +0xe5, 0x18012d151\nmov     dword ptr [rcx+3Ch], 5                                         ; +0xea, 0x18012d156\njmp     loc_18012D1F8                                                  ; +0xf1, 0x18012d15d\nmov     rax, [rcx+18h]                                                 ; +0xf6, 0x18012d162\ncmp     word ptr [rax], 68h ; 'h'                                      ; +0xfa, 0x18012d166\njnz     short loc_18012D17B                                            ; +0xfe, 0x18012d16a\nadd     rax, 2                                                         ; +0x100, 0x18012d16c\nmov     [rcx+18h], rax                                                 ; +0x104, 0x18012d170\nmov     eax, 1                                                         ; +0x108, 0x18012d174\njmp     short loc_18012D14E                                            ; +0x10d, 0x18012d179\nmov     eax, 2                                                         ; +0x10f, 0x18012d17b\njmp     short loc_18012D14E                                            ; +0x114, 0x18012d180\nmov     dword ptr [rcx+3Ch], 0Dh                                       ; +0x116, 0x18012d182\njmp     short loc_18012D1F8                                            ; +0x11d, 0x18012d189\nmov     dword ptr [rcx+3Ch], 8                                         ; +0x11f, 0x18012d18b\njmp     short loc_18012D1F8                                            ; +0x126, 0x18012d192\nmov     rdx, [rcx+18h]                                                 ; +0x128, 0x18012d194\nmovzx   eax, word ptr [rdx]                                            ; +0x12c, 0x18012d198\ncmp     ax, 33h ; '3'                                                  ; +0x12f, 0x18012d19b\njnz     short loc_18012D1B9                                            ; +0x133, 0x18012d19f\ncmp     word ptr [rdx+2], 32h ; '2'                                    ; +0x135, 0x18012d1a1\njnz     short loc_18012D1B9                                            ; +0x13a, 0x18012d1a6\nlea     rax, [rdx+4]                                                   ; +0x13c, 0x18012d1a8\nmov     dword ptr [rcx+3Ch], 0Ah                                       ; +0x140, 0x18012d1ac\nmov     [rcx+18h], rax                                                 ; +0x147, 0x18012d1b3\njmp     short loc_18012D1F8                                            ; +0x14b, 0x18012d1b7\ncmp     ax, 36h ; '6'                                                  ; +0x14d, 0x18012d1b9\njnz     short loc_18012D1D7                                            ; +0x151, 0x18012d1bd\ncmp     word ptr [rdx+2], 34h ; '4'                                    ; +0x153, 0x18012d1bf\njnz     short loc_18012D1D7                                            ; +0x158, 0x18012d1c4\nlea     rax, [rdx+4]                                                   ; +0x15a, 0x18012d1c6\nmov     dword ptr [rcx+3Ch], 0Bh                                       ; +0x15e, 0x18012d1ca\nmov     [rcx+18h], rax                                                 ; +0x165, 0x18012d1d1\njmp     short loc_18012D1F8                                            ; +0x169, 0x18012d1d5\nsub     ax, 58h ; 'X'                                                  ; +0x16b, 0x18012d1d7\ncmp     ax, 20h ; ' '                                                  ; +0x16f, 0x18012d1db\nja      short loc_18012D1F8                                            ; +0x173, 0x18012d1df\nmov     rdx, 120821001h                                                ; +0x175, 0x18012d1e1\nbt      rdx, rax                                                       ; +0x17f, 0x18012d1eb\njnb     short loc_18012D1F8                                            ; +0x183, 0x18012d1ef\nmov     dword ptr [rcx+3Ch], 9                                         ; +0x185, 0x18012d1f1\nmov     al, 1                                                          ; +0x18c, 0x18012d1f8\nadd     rsp, 28h                                                       ; +0x18e, 0x18012d1fa\nretn                                                                   ; +0x192, 0x18012d1fe", "xrefs": ["__crt_stdio_output::output_processor<wchar_t,__crt_stdio_output::stream_output_adapter<wchar_t>,__crt_stdio_output::standard_base<wchar_t,__crt_stdio_output::stream_output_adapter<wchar_t>>>::process @ 0x18012ca01", "<???> @ 0x180202c48"], "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"}