{"type": "func", "start": 6443702924, "end": 6443703371, "name": "parse_command_line<char>", "pseudocode": "// \n// parse_command_line<char> from 0x180131a8c to 0x180131c4b (447 bytes)\n// \n// 3 xrefs:\n// > _configure_narrow_argv @ 0x180131d3e\n// > _configure_narrow_argv @ 0x180131d90\n// > <???> @ 0x180202f3c\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 parse_command_line<char>(char *a1, _QWORD *a2, _BYTE *a3, _QWORD *a4, _QWORD *a5)\n{\n  _BYTE *v6; // rbx\n  _QWORD *v7; // r14\n  bool v9; // bp\n  unsigned int v10; // esi\n  bool v11; // si\n  char result; // al\n  int v13; // edx\n  unsigned int v14; // eax\n  char v15; // al\n\n  v6 = a3;\n  v7 = a2;\n  *a5 = 0;\n  *a4 = 1;\n  if ( a2 )\n  {\n    *a2 = a3;\n    v7 = a2 + 1;\n  }\n  v9 = 0;\n  do\n  {\n    if ( *a1 == 34 )\n    {\n      LOBYTE(v10) = 34;\n      v9 = !v9;\n      ++a1;\n    }\n    else\n    {\n      ++*a5;\n      if ( v6 )\n        *v6++ = *a1;\n      v10 = *a1++;\n      if ( ismbblead(v10) )\n      {\n        ++*a5;\n        if ( v6 )\n          *v6++ = *a1;\n        ++a1;\n      }\n      if ( !(_BYTE)v10 )\n      {\n        --a1;\n        goto LABEL_19;\n      }\n    }\n  }\n  while ( v9 || (_BYTE)v10 != 32 && (_BYTE)v10 != 9 );\n  if ( v6 )\n    *(v6 - 1) = 0;\nLABEL_19:\n  v11 = 0;\n  while ( 1 )\n  {\n    result = *a1;\n    if ( !*a1 )\n      break;\n    while ( result == 32 || result == 9 )\n      result = *++a1;\n    if ( !result )\n      break;\n    if ( v7 )\n      *v7++ = v6;\n    ++*a4;\n    while ( 1 )\n    {\n      v13 = 1;\n      v14 = 0;\n      while ( *a1 == 92 )\n      {\n        ++a1;\n        ++v14;\n      }\n      if ( *a1 == 34 )\n      {\n        if ( (v14 & 1) == 0 )\n        {\n          if ( v11 && a1[1] == 34 )\n          {\n            ++a1;\n          }\n          else\n          {\n            v13 = 0;\n            v11 = !v11;\n          }\n        }\n        v14 >>= 1;\n      }\n      while ( v14 )\n      {\n        --v14;\n        if ( v6 )\n          *v6++ = 92;\n        ++*a5;\n      }\n      v15 = *a1;\n      if ( !*a1 || !v11 && (v15 == 32 || v15 == 9) )\n        break;\n      if ( v13 )\n      {\n        if ( v6 )\n        {\n          *v6++ = v15;\n          v15 = *a1;\n        }\n        if ( ismbblead(v15) )\n        {\n          ++*a5;\n          ++a1;\n          if ( v6 )\n            *v6++ = *a1;\n        }\n        ++*a5;\n      }\n      ++a1;\n    }\n    if ( v6 )\n      *v6++ = 0;\n    ++*a5;\n  }\n  if ( v7 )\n    *v7 = 0;\n  ++*a4;\n  return result;\n}", "assembly": "; \n; parse_command_line<char> from 0x180131a8c to 0x180131c4b (447 bytes)\n; \n; 3 xrefs:\n; > _configure_narrow_argv @ 0x180131d3e\n; > _configure_narrow_argv @ 0x180131d90\n; > <???> @ 0x180202f3c\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     rax, rsp                                                       ; +0x0, 0x180131a8c\nmov     [rax+8], rbx                                                   ; +0x3, 0x180131a8f\nmov     [rax+10h], rbp                                                 ; +0x7, 0x180131a93\nmov     [rax+18h], rsi                                                 ; +0xb, 0x180131a97\nmov     [rax+20h], rdi                                                 ; +0xf, 0x180131a9b\npush    r12                                                            ; +0x13, 0x180131a9f\npush    r14                                                            ; +0x15, 0x180131aa1\npush    r15                                                            ; +0x17, 0x180131aa3\nsub     rsp, 20h                                                       ; +0x19, 0x180131aa5\nmov     r15, [rsp+38h+arg_20]                                          ; +0x1d, 0x180131aa9\nmov     r12, r9                                                        ; +0x22, 0x180131aae\nmov     rbx, r8                                                        ; +0x25, 0x180131ab1\nmov     r14, rdx                                                       ; +0x28, 0x180131ab4\nmov     rdi, rcx                                                       ; +0x2b, 0x180131ab7\nand     qword ptr [r15], 0                                             ; +0x2e, 0x180131aba\nmov     qword ptr [r9], 1                                              ; +0x32, 0x180131abe\ntest    rdx, rdx                                                       ; +0x39, 0x180131ac5\njz      short loc_180131AD1                                            ; +0x3c, 0x180131ac8\nmov     [rdx], rbx                                                     ; +0x3e, 0x180131aca\nadd     r14, 8                                                         ; +0x41, 0x180131acd\nxor     bpl, bpl                                                       ; +0x45, 0x180131ad1\ncmp     byte ptr [rdi], 22h ; '\"'                                      ; +0x48, 0x180131ad4\njnz     short loc_180131AE8                                            ; +0x4b, 0x180131ad7\ntest    bpl, bpl                                                       ; +0x4d, 0x180131ad9\nmov     sil, 22h ; '\"'                                                 ; +0x50, 0x180131adc\nsetz    bpl                                                            ; +0x53, 0x180131adf\ninc     rdi                                                            ; +0x57, 0x180131ae3\njmp     short loc_180131B1F                                            ; +0x5a, 0x180131ae6\ninc     qword ptr [r15]                                                ; +0x5c, 0x180131ae8\ntest    rbx, rbx                                                       ; +0x5f, 0x180131aeb\njz      short loc_180131AF7                                            ; +0x62, 0x180131aee\nmov     al, [rdi]                                                      ; +0x64, 0x180131af0\nmov     [rbx], al                                                      ; +0x66, 0x180131af2\ninc     rbx                                                            ; +0x68, 0x180131af4\nmovsx   esi, byte ptr [rdi]                                            ; +0x6b, 0x180131af7\ninc     rdi                                                            ; +0x6e, 0x180131afa\nmov     ecx, esi; Ch                                                   ; +0x71, 0x180131afd\ncall    _ismbblead                                                     ; +0x73, 0x180131aff\ntest    eax, eax                                                       ; +0x78, 0x180131b04\njz      short loc_180131B1A                                            ; +0x7a, 0x180131b06\ninc     qword ptr [r15]                                                ; +0x7c, 0x180131b08\ntest    rbx, rbx                                                       ; +0x7f, 0x180131b0b\njz      short loc_180131B17                                            ; +0x82, 0x180131b0e\nmov     al, [rdi]                                                      ; +0x84, 0x180131b10\nmov     [rbx], al                                                      ; +0x86, 0x180131b12\ninc     rbx                                                            ; +0x88, 0x180131b14\ninc     rdi                                                            ; +0x8b, 0x180131b17\ntest    sil, sil                                                       ; +0x8e, 0x180131b1a\njz      short loc_180131B3B                                            ; +0x91, 0x180131b1d\ntest    bpl, bpl                                                       ; +0x93, 0x180131b1f\njnz     short loc_180131AD4                                            ; +0x96, 0x180131b22\ncmp     sil, 20h ; ' '                                                 ; +0x98, 0x180131b24\njz      short loc_180131B30                                            ; +0x9c, 0x180131b28\ncmp     sil, 9                                                         ; +0x9e, 0x180131b2a\njnz     short loc_180131AD4                                            ; +0xa2, 0x180131b2e\ntest    rbx, rbx                                                       ; +0xa4, 0x180131b30\njz      short loc_180131B3E                                            ; +0xa7, 0x180131b33\nmov     byte ptr [rbx-1], 0                                            ; +0xa9, 0x180131b35\njmp     short loc_180131B3E                                            ; +0xad, 0x180131b39\ndec     rdi                                                            ; +0xaf, 0x180131b3b\nxor     sil, sil                                                       ; +0xb2, 0x180131b3e\nmov     al, [rdi]                                                      ; +0xb5, 0x180131b41\ntest    al, al                                                         ; +0xb7, 0x180131b43\njz      loc_180131C1F                                                  ; +0xb9, 0x180131b45\ncmp     al, 20h ; ' '                                                  ; +0xbf, 0x180131b4b\njz      short loc_180131B53                                            ; +0xc1, 0x180131b4d\ncmp     al, 9                                                          ; +0xc3, 0x180131b4f\njnz     short loc_180131B5A                                            ; +0xc5, 0x180131b51\ninc     rdi                                                            ; +0xc7, 0x180131b53\nmov     al, [rdi]                                                      ; +0xca, 0x180131b56\njmp     short loc_180131B4B                                            ; +0xcc, 0x180131b58\ntest    al, al                                                         ; +0xce, 0x180131b5a\njz      loc_180131C1F                                                  ; +0xd0, 0x180131b5c\ntest    r14, r14                                                       ; +0xd6, 0x180131b62\njz      short loc_180131B6E                                            ; +0xd9, 0x180131b65\nmov     [r14], rbx                                                     ; +0xdb, 0x180131b67\nadd     r14, 8                                                         ; +0xde, 0x180131b6a\ninc     qword ptr [r12]                                                ; +0xe2, 0x180131b6e\nmov     edx, 1                                                         ; +0xe6, 0x180131b72\nxor     eax, eax                                                       ; +0xeb, 0x180131b77\njmp     short loc_180131B80                                            ; +0xed, 0x180131b79\ninc     rdi                                                            ; +0xef, 0x180131b7b\ninc     eax                                                            ; +0xf2, 0x180131b7e\nmov     cl, [rdi]                                                      ; +0xf4, 0x180131b80\ncmp     cl, 5Ch ; '\\'                                                  ; +0xf6, 0x180131b82\njz      short loc_180131B7B                                            ; +0xf9, 0x180131b85\ncmp     cl, 22h ; '\"'                                                  ; +0xfb, 0x180131b87\njnz     short loc_180131BBC                                            ; +0xfe, 0x180131b8a\ntest    dl, al                                                         ; +0x100, 0x180131b8c\njnz     short loc_180131BA8                                            ; +0x102, 0x180131b8e\ntest    sil, sil                                                       ; +0x104, 0x180131b90\njz      short loc_180131B9F                                            ; +0x107, 0x180131b93\ncmp     [rdi+1], cl                                                    ; +0x109, 0x180131b95\njnz     short loc_180131B9F                                            ; +0x10c, 0x180131b98\ninc     rdi                                                            ; +0x10e, 0x180131b9a\njmp     short loc_180131BA8                                            ; +0x111, 0x180131b9d\nxor     edx, edx                                                       ; +0x113, 0x180131b9f\ntest    sil, sil                                                       ; +0x115, 0x180131ba1\nsetz    sil                                                            ; +0x118, 0x180131ba4\nshr     eax, 1                                                         ; +0x11c, 0x180131ba8\njmp     short loc_180131BBC                                            ; +0x11e, 0x180131baa\ndec     eax                                                            ; +0x120, 0x180131bac\ntest    rbx, rbx                                                       ; +0x122, 0x180131bae\njz      short loc_180131BB9                                            ; +0x125, 0x180131bb1\nmov     byte ptr [rbx], 5Ch ; '\\'                                      ; +0x127, 0x180131bb3\ninc     rbx                                                            ; +0x12a, 0x180131bb6\ninc     qword ptr [r15]                                                ; +0x12d, 0x180131bb9\ntest    eax, eax                                                       ; +0x130, 0x180131bbc\njnz     short loc_180131BAC                                            ; +0x132, 0x180131bbe\nmov     al, [rdi]                                                      ; +0x134, 0x180131bc0\ntest    al, al                                                         ; +0x136, 0x180131bc2\njz      short loc_180131C0C                                            ; +0x138, 0x180131bc4\ntest    sil, sil                                                       ; +0x13a, 0x180131bc6\njnz     short loc_180131BD3                                            ; +0x13d, 0x180131bc9\ncmp     al, 20h ; ' '                                                  ; +0x13f, 0x180131bcb\njz      short loc_180131C0C                                            ; +0x141, 0x180131bcd\ncmp     al, 9                                                          ; +0x143, 0x180131bcf\njz      short loc_180131C0C                                            ; +0x145, 0x180131bd1\ntest    edx, edx                                                       ; +0x147, 0x180131bd3\njz      short loc_180131C04                                            ; +0x149, 0x180131bd5\ntest    rbx, rbx                                                       ; +0x14b, 0x180131bd7\njz      short loc_180131BE3                                            ; +0x14e, 0x180131bda\nmov     [rbx], al                                                      ; +0x150, 0x180131bdc\ninc     rbx                                                            ; +0x152, 0x180131bde\nmov     al, [rdi]                                                      ; +0x155, 0x180131be1\nmovsx   ecx, al; Ch                                                    ; +0x157, 0x180131be3\ncall    _ismbblead                                                     ; +0x15a, 0x180131be6\ntest    eax, eax                                                       ; +0x15f, 0x180131beb\njz      short loc_180131C01                                            ; +0x161, 0x180131bed\ninc     qword ptr [r15]                                                ; +0x163, 0x180131bef\ninc     rdi                                                            ; +0x166, 0x180131bf2\ntest    rbx, rbx                                                       ; +0x169, 0x180131bf5\njz      short loc_180131C01                                            ; +0x16c, 0x180131bf8\nmov     al, [rdi]                                                      ; +0x16e, 0x180131bfa\nmov     [rbx], al                                                      ; +0x170, 0x180131bfc\ninc     rbx                                                            ; +0x172, 0x180131bfe\ninc     qword ptr [r15]                                                ; +0x175, 0x180131c01\ninc     rdi                                                            ; +0x178, 0x180131c04\njmp     loc_180131B72                                                  ; +0x17b, 0x180131c07\ntest    rbx, rbx                                                       ; +0x180, 0x180131c0c\njz      short loc_180131C17                                            ; +0x183, 0x180131c0f\nmov     byte ptr [rbx], 0                                              ; +0x185, 0x180131c11\ninc     rbx                                                            ; +0x188, 0x180131c14\ninc     qword ptr [r15]                                                ; +0x18b, 0x180131c17\njmp     loc_180131B41                                                  ; +0x18e, 0x180131c1a\ntest    r14, r14                                                       ; +0x193, 0x180131c1f\njz      short loc_180131C28                                            ; +0x196, 0x180131c22\nand     qword ptr [r14], 0                                             ; +0x198, 0x180131c24\ninc     qword ptr [r12]                                                ; +0x19c, 0x180131c28\nmov     rbx, [rsp+38h+arg_0]                                           ; +0x1a0, 0x180131c2c\nmov     rbp, [rsp+38h+arg_8]                                           ; +0x1a5, 0x180131c31\nmov     rsi, [rsp+38h+arg_10]                                          ; +0x1aa, 0x180131c36\nmov     rdi, [rsp+38h+arg_18]                                          ; +0x1af, 0x180131c3b\nadd     rsp, 20h                                                       ; +0x1b4, 0x180131c40\npop     r15                                                            ; +0x1b8, 0x180131c44\npop     r14                                                            ; +0x1ba, 0x180131c46\npop     r12                                                            ; +0x1bc, 0x180131c48\nretn                                                                   ; +0x1be, 0x180131c4a", "xrefs": ["_configure_narrow_argv @ 0x180131d3e", "_configure_narrow_argv @ 0x180131d90", "<???> @ 0x180202f3c"], "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"}