
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

arrayind_t array_expand_index(SHELL_VAR *var,char *s,int len,int flags)

{
  char *pcVar1;
  char *__dest;
  char *expr;
  int in_GS_OFFSET;
  intmax_t iVar2;
  undefined4 local_34;
  undefined4 local_30;
  int expok;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x84409;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  __dest = (char *)xmalloc(len);
  strncpy(__dest,s,len - 1);
  __dest[len + -1] = '\0';
  expr = expand_arith_string(__dest,0x301);
  pcVar1 = this_command_name;
  this_command_name = (char *)0x0;
  iVar2 = evalexp(expr,0,&expok);
  this_command_name = pcVar1;
  if (__dest != expr) {
    free(expr);
  }
  free(__dest);
  local_34 = (undefined4)iVar2;
  local_30 = (undefined4)((ulonglong)iVar2 >> 0x20);
  if (expok == 0) {
    last_command_exit_value = 1;
    if (no_longjmp_on_fatal_error == 0) {
      top_level_cleanup();
                    /* WARNING: Subroutine does not return */
      jump_to_top_level(2);
    }
    local_34 = 0;
    local_30 = 0;
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return CONCAT44(local_30,local_34);
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

undefined8 array_expand_index(undefined4 param_1,char *param_2,int param_3)

{
  undefined4 uVar1;
  char *__dest;
  char *__ptr;
  int in_GS_OFFSET;
  undefined8 uVar2;
  int local_24;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x84409;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  __dest = (char *)xmalloc(param_3);
  strncpy(__dest,param_2,param_3 - 1);
  __dest[param_3 + -1] = '\0';
  __ptr = (char *)expand_arith_string(__dest,0x301);
  uVar1 = this_command_name;
  this_command_name = 0;
  uVar2 = evalexp(__ptr,0,&local_24);
  this_command_name = uVar1;
  if (__dest != __ptr) {
    free(__ptr);
  }
  free(__dest);
  if (local_24 == 0) {
    last_command_exit_value = 1;
    if (no_longjmp_on_fatal_error == 0) {
      top_level_cleanup();
                    /* WARNING: Subroutine does not return */
      jump_to_top_level(2);
    }
    uVar2 = 0;
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return uVar2;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000ecc40();
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00031ed0
ADD EBX,0xc5bf7
SUB ESP,0x38
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x28],EAX
XOR EAX,EAX
MOV EDI,dword ptr [ESP + 0x54]
MOV EBP,dword ptr [ESP + 0x50]
PUSH EDI
CALL 0x00099200
ADD ESP,0xc
MOV ESI,EAX
LEA EAX,[EDI + -0x1]
PUSH EAX
PUSH EBP
PUSH ESI
CALL 0x0002f8e0
MOV byte ptr [ESI + EDI*0x1 + -0x1],0x0
POP ECX
POP EDI
PUSH 0x301
PUSH ESI
CALL 0x00076550
LEA EDI,[EBX + 0x8dec]
MOV EBP,EAX
MOV ECX,dword ptr [EDI]
MOV dword ptr [EDI],0x0
MOV dword ptr [ESP + 0x18],ECX
ADD ESP,0xc
LEA EAX,[ESP + 0x1c]
PUSH EAX
PUSH 0x0
PUSH EBP
CALL 0x0005c270
MOV ECX,dword ptr [ESP + 0x18]
ADD ESP,0x10
MOV dword ptr [EDI],ECX
CMP ESI,EBP
JZ 0x0008449b
MOV dword ptr [ESP + 0x8],EAX
SUB ESP,0xc
MOV dword ptr [ESP + 0x18],EDX
PUSH EBP
CALL 0x0002f200
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0x8]
MOV EDX,dword ptr [ESP + 0xc]
MOV dword ptr [ESP + 0x8],EAX
SUB ESP,0xc
MOV dword ptr [ESP + 0x18],EDX
PUSH ESI
CALL 0x0002f200
ADD ESP,0x10
MOV EDX,dword ptr [ESP + 0x18]
MOV EAX,dword ptr [ESP + 0x8]
TEST EDX,EDX
MOV EDX,dword ptr [ESP + 0xc]
JNZ 0x000844db
LEA EAX,[EBX + 0x8df0]
MOV dword ptr [EAX],0x1
LEA EAX,[EBX + 0x704c]
MOV EAX,dword ptr [EAX]
TEST EAX,EAX
JZ 0x000844f0
XOR EAX,EAX
XOR EDX,EDX
MOV ECX,dword ptr [ESP + 0x1c]
XOR ECX,dword ptr GS:[0x14]
JNZ 0x000844ff
ADD ESP,0x2c
POP EBX
POP ESI
POP EDI
POP EBP
RET
CALL 0x0007eef0
SUB ESP,0xc
PUSH 0x2
CALL 0x0007efa0
CALL 0x000ecc40
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined8 array_expand_index(undefined4 param_1,char *param_2,int param_3)\n\n{\n  undefined4 uVar1;\n  char *__dest;\n  char *__ptr;\n  int in_GS_OFFSET;\n  undefined8 uVar2;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x84409;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __dest = (char *)xmalloc(param_3);\n  strncpy(__dest,param_2,param_3 - 1);\n  __dest[param_3 + -1] = '\0';\n  __ptr = (char *)expand_arith_string(__dest,0x301);\n  uVar1 = this_command_name;\n  this_command_name = 0;\n  uVar2 = evalexp(__ptr,0,&local_24);\n  this_command_name = uVar1;\n  if (__dest != __ptr) {\n    free(__ptr);\n  }\n  free(__dest);\n  if (local_24 == 0) {\n    last_command_exit_value = 1;\n    if (no_longjmp_on_fatal_error == 0) {\n      top_level_cleanup();\n                    /* WARNING: Subroutine does not return */\n      jump_to_top_level(2);\n    }\n    uVar2 = 0;\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000ecc40();\n}\n\n" comment (function_definition "undefined8 array_expand_index(undefined4 param_1,char *param_2,int param_3)\n\n{\n  undefined4 uVar1;\n  char *__dest;\n  char *__ptr;\n  int in_GS_OFFSET;\n  undefined8 uVar2;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x84409;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __dest = (char *)xmalloc(param_3);\n  strncpy(__dest,param_2,param_3 - 1);\n  __dest[param_3 + -1] = '\0';\n  __ptr = (char *)expand_arith_string(__dest,0x301);\n  uVar1 = this_command_name;\n  this_command_name = 0;\n  uVar2 = evalexp(__ptr,0,&local_24);\n  this_command_name = uVar1;\n  if (__dest != __ptr) {\n    free(__ptr);\n  }\n  free(__dest);\n  if (local_24 == 0) {\n    last_command_exit_value = 1;\n    if (no_longjmp_on_fatal_error == 0) {\n      top_level_cleanup();\n                    /* WARNING: Subroutine does not return */\n      jump_to_top_level(2);\n    }\n    uVar2 = 0;\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000ecc40();\n}" type_identifier (function_declarator "array_expand_index(undefined4 param_1,char *param_2,int param_3)" identifier (parameter_list "(undefined4 param_1,char *param_2,int param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  char *__dest;\n  char *__ptr;\n  int in_GS_OFFSET;\n  undefined8 uVar2;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x84409;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __dest = (char *)xmalloc(param_3);\n  strncpy(__dest,param_2,param_3 - 1);\n  __dest[param_3 + -1] = '\0';\n  __ptr = (char *)expand_arith_string(__dest,0x301);\n  uVar1 = this_command_name;\n  this_command_name = 0;\n  uVar2 = evalexp(__ptr,0,&local_24);\n  this_command_name = uVar1;\n  if (__dest != __ptr) {\n    free(__ptr);\n  }\n  free(__dest);\n  if (local_24 == 0) {\n    last_command_exit_value = 1;\n    if (no_longjmp_on_fatal_error == 0) {\n      top_level_cleanup();\n                    /* WARNING: Subroutine does not return */\n      jump_to_top_level(2);\n    }\n    uVar2 = 0;\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000ecc40();\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "char *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "char *__ptr;" primitive_type (pointer_declarator "*__ptr" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined8 uVar2;" type_identifier identifier ;) (declaration "int local_24;" primitive_type identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x84409;" (assignment_expression "uStack_14 = 0x84409" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "__dest = (char *)xmalloc(param_3);" (assignment_expression "__dest = (char *)xmalloc(param_3)" identifier = (cast_expression "(char *)xmalloc(param_3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(param_3)" identifier (argument_list "(param_3)" ( identifier ))))) ;) (expression_statement "strncpy(__dest,param_2,param_3 - 1);" (call_expression "strncpy(__dest,param_2,param_3 - 1)" identifier (argument_list "(__dest,param_2,param_3 - 1)" ( identifier , identifier , (binary_expression "param_3 - 1" identifier - number_literal) ))) ;) (expression_statement "__dest[param_3 + -1] = '\0';" (assignment_expression "__dest[param_3 + -1] = '\0'" (subscript_expression "__dest[param_3 + -1]" identifier [ (binary_expression "param_3 + -1" identifier + number_literal) ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "__ptr = (char *)expand_arith_string(__dest,0x301);" (assignment_expression "__ptr = (char *)expand_arith_string(__dest,0x301)" identifier = (cast_expression "(char *)expand_arith_string(__dest,0x301)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "expand_arith_string(__dest,0x301)" identifier (argument_list "(__dest,0x301)" ( identifier , number_literal ))))) ;) (expression_statement "uVar1 = this_command_name;" (assignment_expression "uVar1 = this_command_name" identifier = identifier) ;) (expression_statement "this_command_name = 0;" (assignment_expression "this_command_name = 0" identifier = number_literal) ;) (expression_statement "uVar2 = evalexp(__ptr,0,&local_24);" (assignment_expression "uVar2 = evalexp(__ptr,0,&local_24)" identifier = (call_expression "evalexp(__ptr,0,&local_24)" identifier (argument_list "(__ptr,0,&local_24)" ( identifier , number_literal , (pointer_expression "&local_24" & identifier) )))) ;) (expression_statement "this_command_name = uVar1;" (assignment_expression "this_command_name = uVar1" identifier = identifier) ;) (if_statement "if (__dest != __ptr) {\n    free(__ptr);\n  }" if (parenthesized_expression "(__dest != __ptr)" ( (binary_expression "__dest != __ptr" identifier != identifier) )) (compound_statement "{\n    free(__ptr);\n  }" { (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) })) (expression_statement "free(__dest);" (call_expression "free(__dest)" identifier (argument_list "(__dest)" ( identifier ))) ;) (if_statement "if (local_24 == 0) {\n    last_command_exit_value = 1;\n    if (no_longjmp_on_fatal_error == 0) {\n      top_level_cleanup();\n                    /* WARNING: Subroutine does not return */\n      jump_to_top_level(2);\n    }\n    uVar2 = 0;\n  }" if (parenthesized_expression "(local_24 == 0)" ( (binary_expression "local_24 == 0" identifier == number_literal) )) (compound_statement "{\n    last_command_exit_value = 1;\n    if (no_longjmp_on_fatal_error == 0) {\n      top_level_cleanup();\n                    /* WARNING: Subroutine does not return */\n      jump_to_top_level(2);\n    }\n    uVar2 = 0;\n  }" { (expression_statement "last_command_exit_value = 1;" (assignment_expression "last_command_exit_value = 1" identifier = number_literal) ;) (if_statement "if (no_longjmp_on_fatal_error == 0) {\n      top_level_cleanup();\n                    /* WARNING: Subroutine does not return */\n      jump_to_top_level(2);\n    }" if (parenthesized_expression "(no_longjmp_on_fatal_error == 0)" ( (binary_expression "no_longjmp_on_fatal_error == 0" identifier == number_literal) )) (compound_statement "{\n      top_level_cleanup();\n                    /* WARNING: Subroutine does not return */\n      jump_to_top_level(2);\n    }" { (expression_statement "top_level_cleanup();" (call_expression "top_level_cleanup()" identifier (argument_list "()" ( ))) ;) comment (expression_statement "jump_to_top_level(2);" (call_expression "jump_to_top_level(2)" identifier (argument_list "(2)" ( number_literal ))) ;) })) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) })) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return uVar2;\n  }" { (return_statement "return uVar2;" return identifier ;) })) comment (expression_statement "FUN_000ecc40();" (call_expression "FUN_000ecc40()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\narrayind_t array_expand_index(SHELL_VAR *var,char *s,int len,int flags)\n\n{\n  char *pcVar1;\n  char *__dest;\n  char *expr;\n  int in_GS_OFFSET;\n  intmax_t iVar2;\n  undefined4 local_34;\n  undefined4 local_30;\n  int expok;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x84409;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __dest = (char *)xmalloc(len);\n  strncpy(__dest,s,len - 1);\n  __dest[len + -1] = '\0';\n  expr = expand_arith_string(__dest,0x301);\n  pcVar1 = this_command_name;\n  this_command_name = (char *)0x0;\n  iVar2 = evalexp(expr,0,&expok);\n  this_command_name = pcVar1;\n  if (__dest != expr) {\n    free(expr);\n  }\n  free(__dest);\n  local_34 = (undefined4)iVar2;\n  local_30 = (undefined4)((ulonglong)iVar2 >> 0x20);\n  if (expok == 0) {\n    last_command_exit_value = 1;\n    if (no_longjmp_on_fatal_error == 0) {\n      top_level_cleanup();\n                    /* WARNING: Subroutine does not return */\n      jump_to_top_level(2);\n    }\n    local_34 = 0;\n    local_30 = 0;\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return CONCAT44(local_30,local_34);\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment comment (function_definition "arrayind_t array_expand_index(SHELL_VAR *var,char *s,int len,int flags)\n\n{\n  char *pcVar1;\n  char *__dest;\n  char *expr;\n  int in_GS_OFFSET;\n  intmax_t iVar2;\n  undefined4 local_34;\n  undefined4 local_30;\n  int expok;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x84409;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __dest = (char *)xmalloc(len);\n  strncpy(__dest,s,len - 1);\n  __dest[len + -1] = '\0';\n  expr = expand_arith_string(__dest,0x301);\n  pcVar1 = this_command_name;\n  this_command_name = (char *)0x0;\n  iVar2 = evalexp(expr,0,&expok);\n  this_command_name = pcVar1;\n  if (__dest != expr) {\n    free(expr);\n  }\n  free(__dest);\n  local_34 = (undefined4)iVar2;\n  local_30 = (undefined4)((ulonglong)iVar2 >> 0x20);\n  if (expok == 0) {\n    last_command_exit_value = 1;\n    if (no_longjmp_on_fatal_error == 0) {\n      top_level_cleanup();\n                    /* WARNING: Subroutine does not return */\n      jump_to_top_level(2);\n    }\n    local_34 = 0;\n    local_30 = 0;\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return CONCAT44(local_30,local_34);\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" type_identifier (function_declarator "array_expand_index(SHELL_VAR *var,char *s,int len,int flags)" identifier (parameter_list "(SHELL_VAR *var,char *s,int len,int flags)" ( (parameter_declaration "SHELL_VAR *var" type_identifier (pointer_declarator "*var" * identifier)) , (parameter_declaration "char *s" primitive_type (pointer_declarator "*s" * identifier)) , (parameter_declaration "int len" primitive_type identifier) , (parameter_declaration "int flags" primitive_type identifier) ))) (compound_statement "{\n  char *pcVar1;\n  char *__dest;\n  char *expr;\n  int in_GS_OFFSET;\n  intmax_t iVar2;\n  undefined4 local_34;\n  undefined4 local_30;\n  int expok;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x84409;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __dest = (char *)xmalloc(len);\n  strncpy(__dest,s,len - 1);\n  __dest[len + -1] = '\0';\n  expr = expand_arith_string(__dest,0x301);\n  pcVar1 = this_command_name;\n  this_command_name = (char *)0x0;\n  iVar2 = evalexp(expr,0,&expok);\n  this_command_name = pcVar1;\n  if (__dest != expr) {\n    free(expr);\n  }\n  free(__dest);\n  local_34 = (undefined4)iVar2;\n  local_30 = (undefined4)((ulonglong)iVar2 >> 0x20);\n  if (expok == 0) {\n    last_command_exit_value = 1;\n    if (no_longjmp_on_fatal_error == 0) {\n      top_level_cleanup();\n                    /* WARNING: Subroutine does not return */\n      jump_to_top_level(2);\n    }\n    local_34 = 0;\n    local_30 = 0;\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return CONCAT44(local_30,local_34);\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "char *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "char *expr;" primitive_type (pointer_declarator "*expr" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "intmax_t iVar2;" type_identifier identifier ;) (declaration "undefined4 local_34;" type_identifier identifier ;) (declaration "undefined4 local_30;" type_identifier identifier ;) (declaration "int expok;" primitive_type identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x84409;" (assignment_expression "uStack_14 = 0x84409" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "__dest = (char *)xmalloc(len);" (assignment_expression "__dest = (char *)xmalloc(len)" identifier = (cast_expression "(char *)xmalloc(len)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(len)" identifier (argument_list "(len)" ( identifier ))))) ;) (expression_statement "strncpy(__dest,s,len - 1);" (call_expression "strncpy(__dest,s,len - 1)" identifier (argument_list "(__dest,s,len - 1)" ( identifier , identifier , (binary_expression "len - 1" identifier - number_literal) ))) ;) (expression_statement "__dest[len + -1] = '\0';" (assignment_expression "__dest[len + -1] = '\0'" (subscript_expression "__dest[len + -1]" identifier [ (binary_expression "len + -1" identifier + number_literal) ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "expr = expand_arith_string(__dest,0x301);" (assignment_expression "expr = expand_arith_string(__dest,0x301)" identifier = (call_expression "expand_arith_string(__dest,0x301)" identifier (argument_list "(__dest,0x301)" ( identifier , number_literal )))) ;) (expression_statement "pcVar1 = this_command_name;" (assignment_expression "pcVar1 = this_command_name" identifier = identifier) ;) (expression_statement "this_command_name = (char *)0x0;" (assignment_expression "this_command_name = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "iVar2 = evalexp(expr,0,&expok);" (assignment_expression "iVar2 = evalexp(expr,0,&expok)" identifier = (call_expression "evalexp(expr,0,&expok)" identifier (argument_list "(expr,0,&expok)" ( identifier , number_literal , (pointer_expression "&expok" & identifier) )))) ;) (expression_statement "this_command_name = pcVar1;" (assignment_expression "this_command_name = pcVar1" identifier = identifier) ;) (if_statement "if (__dest != expr) {\n    free(expr);\n  }" if (parenthesized_expression "(__dest != expr)" ( (binary_expression "__dest != expr" identifier != identifier) )) (compound_statement "{\n    free(expr);\n  }" { (expression_statement "free(expr);" (call_expression "free(expr)" identifier (argument_list "(expr)" ( identifier ))) ;) })) (expression_statement "free(__dest);" (call_expression "free(__dest)" identifier (argument_list "(__dest)" ( identifier ))) ;) (expression_statement "local_34 = (undefined4)iVar2;" (assignment_expression "local_34 = (undefined4)iVar2" identifier = (cast_expression "(undefined4)iVar2" ( (type_descriptor "undefined4" type_identifier) ) identifier)) ;) (expression_statement "local_30 = (undefined4)((ulonglong)iVar2 >> 0x20);" (assignment_expression "local_30 = (undefined4)((ulonglong)iVar2 >> 0x20)" identifier = (call_expression "(undefined4)((ulonglong)iVar2 >> 0x20)" (parenthesized_expression "(undefined4)" ( identifier )) (argument_list "((ulonglong)iVar2 >> 0x20)" ( (binary_expression "(ulonglong)iVar2 >> 0x20" (cast_expression "(ulonglong)iVar2" ( (type_descriptor "ulonglong" type_identifier) ) identifier) >> number_literal) )))) ;) (if_statement "if (expok == 0) {\n    last_command_exit_value = 1;\n    if (no_longjmp_on_fatal_error == 0) {\n      top_level_cleanup();\n                    /* WARNING: Subroutine does not return */\n      jump_to_top_level(2);\n    }\n    local_34 = 0;\n    local_30 = 0;\n  }" if (parenthesized_expression "(expok == 0)" ( (binary_expression "expok == 0" identifier == number_literal) )) (compound_statement "{\n    last_command_exit_value = 1;\n    if (no_longjmp_on_fatal_error == 0) {\n      top_level_cleanup();\n                    /* WARNING: Subroutine does not return */\n      jump_to_top_level(2);\n    }\n    local_34 = 0;\n    local_30 = 0;\n  }" { (expression_statement "last_command_exit_value = 1;" (assignment_expression "last_command_exit_value = 1" identifier = number_literal) ;) (if_statement "if (no_longjmp_on_fatal_error == 0) {\n      top_level_cleanup();\n                    /* WARNING: Subroutine does not return */\n      jump_to_top_level(2);\n    }" if (parenthesized_expression "(no_longjmp_on_fatal_error == 0)" ( (binary_expression "no_longjmp_on_fatal_error == 0" identifier == number_literal) )) (compound_statement "{\n      top_level_cleanup();\n                    /* WARNING: Subroutine does not return */\n      jump_to_top_level(2);\n    }" { (expression_statement "top_level_cleanup();" (call_expression "top_level_cleanup()" identifier (argument_list "()" ( ))) ;) comment (expression_statement "jump_to_top_level(2);" (call_expression "jump_to_top_level(2)" identifier (argument_list "(2)" ( number_literal ))) ;) })) (expression_statement "local_34 = 0;" (assignment_expression "local_34 = 0" identifier = number_literal) ;) (expression_statement "local_30 = 0;" (assignment_expression "local_30 = 0" identifier = number_literal) ;) })) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return CONCAT44(local_30,local_34);\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return CONCAT44(local_30,local_34);\n  }" { (return_statement "return CONCAT44(local_30,local_34);" return (call_expression "CONCAT44(local_30,local_34)" identifier (argument_list "(local_30,local_34)" ( identifier , identifier ))) ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "undefined8 array_expand_index(undefined4 param_1,char *param_2,int param_3)\n\n{\n  undefined4 uVar1;\n  char *__dest;\n  char *__ptr;\n  int in_GS_OFFSET;\n  undefined8 uVar2;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x84409;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __dest = (char *)xmalloc(param_3);\n  strncpy(__dest,param_2,param_3 - 1);\n  __dest[param_3 + -1] = '\0';\n  __ptr = (char *)expand_arith_string(__dest,0x301);\n  uVar1 = this_command_name;\n  this_command_name = 0;\n  uVar2 = evalexp(__ptr,0,&local_24);\n  this_command_name = uVar1;\n  if (__dest != __ptr) {\n    free(__ptr);\n  }\n  free(__dest);\n  if (local_24 == 0) {\n    last_command_exit_value = 1;\n    if (no_longjmp_on_fatal_error == 0) {\n      top_level_cleanup();\n                    \n      jump_to_top_level(2);\n    }\n    uVar2 = 0;\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }\n                    \n  FUN_000ecc40();\n}\n\n" (function_definition "undefined8 array_expand_index(undefined4 param_1,char *param_2,int param_3)\n\n{\n  undefined4 uVar1;\n  char *__dest;\n  char *__ptr;\n  int in_GS_OFFSET;\n  undefined8 uVar2;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x84409;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __dest = (char *)xmalloc(param_3);\n  strncpy(__dest,param_2,param_3 - 1);\n  __dest[param_3 + -1] = '\0';\n  __ptr = (char *)expand_arith_string(__dest,0x301);\n  uVar1 = this_command_name;\n  this_command_name = 0;\n  uVar2 = evalexp(__ptr,0,&local_24);\n  this_command_name = uVar1;\n  if (__dest != __ptr) {\n    free(__ptr);\n  }\n  free(__dest);\n  if (local_24 == 0) {\n    last_command_exit_value = 1;\n    if (no_longjmp_on_fatal_error == 0) {\n      top_level_cleanup();\n                    \n      jump_to_top_level(2);\n    }\n    uVar2 = 0;\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }\n                    \n  FUN_000ecc40();\n}" type_identifier (function_declarator "array_expand_index(undefined4 param_1,char *param_2,int param_3)" identifier (parameter_list "(undefined4 param_1,char *param_2,int param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  char *__dest;\n  char *__ptr;\n  int in_GS_OFFSET;\n  undefined8 uVar2;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x84409;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __dest = (char *)xmalloc(param_3);\n  strncpy(__dest,param_2,param_3 - 1);\n  __dest[param_3 + -1] = '\0';\n  __ptr = (char *)expand_arith_string(__dest,0x301);\n  uVar1 = this_command_name;\n  this_command_name = 0;\n  uVar2 = evalexp(__ptr,0,&local_24);\n  this_command_name = uVar1;\n  if (__dest != __ptr) {\n    free(__ptr);\n  }\n  free(__dest);\n  if (local_24 == 0) {\n    last_command_exit_value = 1;\n    if (no_longjmp_on_fatal_error == 0) {\n      top_level_cleanup();\n                    \n      jump_to_top_level(2);\n    }\n    uVar2 = 0;\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }\n                    \n  FUN_000ecc40();\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "char *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "char *__ptr;" primitive_type (pointer_declarator "*__ptr" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined8 uVar2;" type_identifier identifier ;) (declaration "int local_24;" primitive_type identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x84409;" (assignment_expression "uStack_14 = 0x84409" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "__dest = (char *)xmalloc(param_3);" (assignment_expression "__dest = (char *)xmalloc(param_3)" identifier = (cast_expression "(char *)xmalloc(param_3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(param_3)" identifier (argument_list "(param_3)" ( identifier ))))) ;) (expression_statement "strncpy(__dest,param_2,param_3 - 1);" (call_expression "strncpy(__dest,param_2,param_3 - 1)" identifier (argument_list "(__dest,param_2,param_3 - 1)" ( identifier , identifier , (binary_expression "param_3 - 1" identifier - number_literal) ))) ;) (expression_statement "__dest[param_3 + -1] = '\0';" (assignment_expression "__dest[param_3 + -1] = '\0'" (subscript_expression "__dest[param_3 + -1]" identifier [ (binary_expression "param_3 + -1" identifier + number_literal) ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "__ptr = (char *)expand_arith_string(__dest,0x301);" (assignment_expression "__ptr = (char *)expand_arith_string(__dest,0x301)" identifier = (cast_expression "(char *)expand_arith_string(__dest,0x301)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "expand_arith_string(__dest,0x301)" identifier (argument_list "(__dest,0x301)" ( identifier , number_literal ))))) ;) (expression_statement "uVar1 = this_command_name;" (assignment_expression "uVar1 = this_command_name" identifier = identifier) ;) (expression_statement "this_command_name = 0;" (assignment_expression "this_command_name = 0" identifier = number_literal) ;) (expression_statement "uVar2 = evalexp(__ptr,0,&local_24);" (assignment_expression "uVar2 = evalexp(__ptr,0,&local_24)" identifier = (call_expression "evalexp(__ptr,0,&local_24)" identifier (argument_list "(__ptr,0,&local_24)" ( identifier , number_literal , (pointer_expression "&local_24" & identifier) )))) ;) (expression_statement "this_command_name = uVar1;" (assignment_expression "this_command_name = uVar1" identifier = identifier) ;) (if_statement "if (__dest != __ptr) {\n    free(__ptr);\n  }" if (parenthesized_expression "(__dest != __ptr)" ( (binary_expression "__dest != __ptr" identifier != identifier) )) (compound_statement "{\n    free(__ptr);\n  }" { (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) })) (expression_statement "free(__dest);" (call_expression "free(__dest)" identifier (argument_list "(__dest)" ( identifier ))) ;) (if_statement "if (local_24 == 0) {\n    last_command_exit_value = 1;\n    if (no_longjmp_on_fatal_error == 0) {\n      top_level_cleanup();\n                    \n      jump_to_top_level(2);\n    }\n    uVar2 = 0;\n  }" if (parenthesized_expression "(local_24 == 0)" ( (binary_expression "local_24 == 0" identifier == number_literal) )) (compound_statement "{\n    last_command_exit_value = 1;\n    if (no_longjmp_on_fatal_error == 0) {\n      top_level_cleanup();\n                    \n      jump_to_top_level(2);\n    }\n    uVar2 = 0;\n  }" { (expression_statement "last_command_exit_value = 1;" (assignment_expression "last_command_exit_value = 1" identifier = number_literal) ;) (if_statement "if (no_longjmp_on_fatal_error == 0) {\n      top_level_cleanup();\n                    \n      jump_to_top_level(2);\n    }" if (parenthesized_expression "(no_longjmp_on_fatal_error == 0)" ( (binary_expression "no_longjmp_on_fatal_error == 0" identifier == number_literal) )) (compound_statement "{\n      top_level_cleanup();\n                    \n      jump_to_top_level(2);\n    }" { (expression_statement "top_level_cleanup();" (call_expression "top_level_cleanup()" identifier (argument_list "()" ( ))) ;) (expression_statement "jump_to_top_level(2);" (call_expression "jump_to_top_level(2)" identifier (argument_list "(2)" ( number_literal ))) ;) })) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) })) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return uVar2;\n  }" { (return_statement "return uVar2;" return identifier ;) })) (expression_statement "FUN_000ecc40();" (call_expression "FUN_000ecc40()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT ))))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , (binary_expression IDENT - LIT) ))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ (binary_expression IDENT + LIT) ]) = (char_literal ' escape_sequence ')) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , LIT ))))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT , (pointer_expression & IDENT) )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( LIT ))) ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "undefined8 array_expand_index(undefined4 param_1,char *param_2,int param_3)\n\n{\n  undefined4 uVar1;\n  char *__dest;\n  char *__ptr;\n  int in_GS_OFFSET;\n  undefined8 uVar2;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x84409;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __dest = (char *)xmalloc(param_3);\n  strncpy(__dest,param_2,param_3 - 1);\n  __dest[param_3 + -1] = '\0';\n  __ptr = (char *)expand_arith_string(__dest,0x301);\n  uVar1 = this_command_name;\n  this_command_name = 0;\n  uVar2 = evalexp(__ptr,0,&local_24);\n  this_command_name = uVar1;\n  if (__dest != __ptr) {\n    free(__ptr);\n  }\n  free(__dest);\n  if (local_24 == 0) {\n    last_command_exit_value = 1;\n    if (no_longjmp_on_fatal_error == 0) {\n      top_level_cleanup();\n                    \n      jump_to_top_level(2);\n    }\n    uVar2 = 0;\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }\n                    \n  FUN_000ecc40();\n}" (type_identifier "undefined8") (function_declarator "array_expand_index(undefined4 param_1,char *param_2,int param_3)" (identifier "array_expand_index") (parameter_list "(undefined4 param_1,char *param_2,int param_3)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "char *param_2" (primitive_type "char") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")"))) (compound_statement "{\n  undefined4 uVar1;\n  char *__dest;\n  char *__ptr;\n  int in_GS_OFFSET;\n  undefined8 uVar2;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x84409;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __dest = (char *)xmalloc(param_3);\n  strncpy(__dest,param_2,param_3 - 1);\n  __dest[param_3 + -1] = '\0';\n  __ptr = (char *)expand_arith_string(__dest,0x301);\n  uVar1 = this_command_name;\n  this_command_name = 0;\n  uVar2 = evalexp(__ptr,0,&local_24);\n  this_command_name = uVar1;\n  if (__dest != __ptr) {\n    free(__ptr);\n  }\n  free(__dest);\n  if (local_24 == 0) {\n    last_command_exit_value = 1;\n    if (no_longjmp_on_fatal_error == 0) {\n      top_level_cleanup();\n                    \n      jump_to_top_level(2);\n    }\n    uVar2 = 0;\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }\n                    \n  FUN_000ecc40();\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (declaration "char *__dest;" (primitive_type "char") (pointer_declarator "*__dest" (* "*") (identifier "__dest")) (; ";")) (declaration "char *__ptr;" (primitive_type "char") (pointer_declarator "*__ptr" (* "*") (identifier "__ptr")) (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "undefined8 uVar2;" (type_identifier "undefined8") (identifier "uVar2") (; ";")) (declaration "int local_24;" (primitive_type "int") (identifier "local_24") (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x84409;" (assignment_expression "uStack_14 = 0x84409" (identifier "uStack_14") (= "=") (number_literal "0x84409")) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "__dest = (char *)xmalloc(param_3);" (assignment_expression "__dest = (char *)xmalloc(param_3)" (identifier "__dest") (= "=") (cast_expression "(char *)xmalloc(param_3)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(param_3)" (identifier "xmalloc") (argument_list "(param_3)" (( "(") (identifier "param_3") () ")"))))) (; ";")) (expression_statement "strncpy(__dest,param_2,param_3 - 1);" (call_expression "strncpy(__dest,param_2,param_3 - 1)" (identifier "strncpy") (argument_list "(__dest,param_2,param_3 - 1)" (( "(") (identifier "__dest") (, ",") (identifier "param_2") (, ",") (binary_expression "param_3 - 1" (identifier "param_3") (- "-") (number_literal "1")) () ")"))) (; ";")) (expression_statement "__dest[param_3 + -1] = '\0';" (assignment_expression "__dest[param_3 + -1] = '\0'" (subscript_expression "__dest[param_3 + -1]" (identifier "__dest") ([ "[") (binary_expression "param_3 + -1" (identifier "param_3") (+ "+") (number_literal "-1")) (] "]")) (= "=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) (; ";")) (expression_statement "__ptr = (char *)expand_arith_string(__dest,0x301);" (assignment_expression "__ptr = (char *)expand_arith_string(__dest,0x301)" (identifier "__ptr") (= "=") (cast_expression "(char *)expand_arith_string(__dest,0x301)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "expand_arith_string(__dest,0x301)" (identifier "expand_arith_string") (argument_list "(__dest,0x301)" (( "(") (identifier "__dest") (, ",") (number_literal "0x301") () ")"))))) (; ";")) (expression_statement "uVar1 = this_command_name;" (assignment_expression "uVar1 = this_command_name" (identifier "uVar1") (= "=") (identifier "this_command_name")) (; ";")) (expression_statement "this_command_name = 0;" (assignment_expression "this_command_name = 0" (identifier "this_command_name") (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar2 = evalexp(__ptr,0,&local_24);" (assignment_expression "uVar2 = evalexp(__ptr,0,&local_24)" (identifier "uVar2") (= "=") (call_expression "evalexp(__ptr,0,&local_24)" (identifier "evalexp") (argument_list "(__ptr,0,&local_24)" (( "(") (identifier "__ptr") (, ",") (number_literal "0") (, ",") (pointer_expression "&local_24" (& "&") (identifier "local_24")) () ")")))) (; ";")) (expression_statement "this_command_name = uVar1;" (assignment_expression "this_command_name = uVar1" (identifier "this_command_name") (= "=") (identifier "uVar1")) (; ";")) (if_statement "if (__dest != __ptr) {\n    free(__ptr);\n  }" (if "if") (parenthesized_expression "(__dest != __ptr)" (( "(") (binary_expression "__dest != __ptr" (identifier "__dest") (!= "!=") (identifier "__ptr")) () ")")) (compound_statement "{\n    free(__ptr);\n  }" ({ "{") (expression_statement "free(__ptr);" (call_expression "free(__ptr)" (identifier "free") (argument_list "(__ptr)" (( "(") (identifier "__ptr") () ")"))) (; ";")) (} "}"))) (expression_statement "free(__dest);" (call_expression "free(__dest)" (identifier "free") (argument_list "(__dest)" (( "(") (identifier "__dest") () ")"))) (; ";")) (if_statement "if (local_24 == 0) {\n    last_command_exit_value = 1;\n    if (no_longjmp_on_fatal_error == 0) {\n      top_level_cleanup();\n                    \n      jump_to_top_level(2);\n    }\n    uVar2 = 0;\n  }" (if "if") (parenthesized_expression "(local_24 == 0)" (( "(") (binary_expression "local_24 == 0" (identifier "local_24") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    last_command_exit_value = 1;\n    if (no_longjmp_on_fatal_error == 0) {\n      top_level_cleanup();\n                    \n      jump_to_top_level(2);\n    }\n    uVar2 = 0;\n  }" ({ "{") (expression_statement "last_command_exit_value = 1;" (assignment_expression "last_command_exit_value = 1" (identifier "last_command_exit_value") (= "=") (number_literal "1")) (; ";")) (if_statement "if (no_longjmp_on_fatal_error == 0) {\n      top_level_cleanup();\n                    \n      jump_to_top_level(2);\n    }" (if "if") (parenthesized_expression "(no_longjmp_on_fatal_error == 0)" (( "(") (binary_expression "no_longjmp_on_fatal_error == 0" (identifier "no_longjmp_on_fatal_error") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      top_level_cleanup();\n                    \n      jump_to_top_level(2);\n    }" ({ "{") (expression_statement "top_level_cleanup();" (call_expression "top_level_cleanup()" (identifier "top_level_cleanup") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "jump_to_top_level(2);" (call_expression "jump_to_top_level(2)" (identifier "jump_to_top_level") (argument_list "(2)" (( "(") (number_literal "2") () ")"))) (; ";")) (} "}"))) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" (identifier "uVar2") (= "=") (number_literal "0")) (; ";")) (} "}"))) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }" (if "if") (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return uVar2;\n  }" ({ "{") (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}"))) (expression_statement "FUN_000ecc40();" (call_expression "FUN_000ecc40()" (identifier "FUN_000ecc40") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

type_1 function_1(type_2 *var,char *s,int var_4,int flags)

{
  char *pcVar1;
  char *var_7;
  char *var_8;
  int var_1;
  type_3 iVar2;
  type_4 local_34;
  type_4 local_30;
  int var_10;
  int var_14;
  type_4 uStack_14;
  
  uStack_14 = 0x84409;
  var_14 = *(int *)(var_1 + 0x14);
  var_7 = (char *)var_2(var_4);
  var_3(var_7,s,var_4 - 1);
  var_7[var_4 + -1] = '\0';
  var_8 = var_5(var_7,0x301);
  pcVar1 = this_command_name;
  this_command_name = (char *)0x0;
  iVar2 = var_6(var_8,0,&var_10);
  this_command_name = pcVar1;
  if (var_7 != var_8) {
    var_9(var_8);
  }
  var_9(var_7);
  local_34 = (type_4)iVar2;
  local_30 = (type_4)((type_5)iVar2 >> 0x20);
  if (var_10 == 0) {
    last_command_exit_value = 1;
    if (var_11 == 0) {
      var_12();
                    /* WARNING: Subroutine does not return */
      var_13(2);
    }
    local_34 = 0;
    local_30 = 0;
  }
  if (var_14 == *(int *)(var_1 + 0x14)) {
    return var_15(local_30,local_34);
  }
                    /* WARNING: Subroutine does not return */
  var_16();
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (identifier)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (binary_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (binary_expression left: (identifier) right: (number_literal))) right: (char_literal (escape_sequence)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (pointer_expression argument: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) consequence: (compound_statement (return_statement (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))))))

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

undefined8 MASKED(undefined4 param_1,char *param_2,int param_3)

{
  undefined4 uVar1;
  char *__dest;
  char *__ptr;
  int in_GS_OFFSET;
  undefined8 uVar2;
  int local_24;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x84409;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  __dest = (char *)xmalloc(param_3);
  strncpy(__dest,param_2,param_3 - 1);
  __dest[param_3 + -1] = '\0';
  __ptr = (char *)expand_arith_string(__dest,0x301);
  uVar1 = this_command_name;
  this_command_name = 0;
  uVar2 = evalexp(__ptr,0,&local_24);
  this_command_name = uVar1;
  if (__dest != __ptr) {
    free(__ptr);
  }
  free(__dest);
  if (local_24 == 0) {
    last_command_exit_value = 1;
    if (no_longjmp_on_fatal_error == 0) {
      top_level_cleanup();
                    /* WARNING: Subroutine does not return */
      jump_to_top_level(2);
    }
    uVar2 = 0;
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return uVar2;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000ecc40();
}

