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

SHELL_VAR * assign_subshell(SHELL_VAR *var,char *value,arrayind_t unused,char *key)

{
  int iVar1;
  int in_GS_OFFSET;
  int local_1c [3];
  int local_10;
  undefined4 uStack_c;
  
  uStack_c = 0x50ac7;
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  if (((value == (char *)0x0) || (*value == '\0')) ||
     (iVar1 = legal_number(value,(intmax_t *)local_1c), iVar1 == 0)) {
    local_1c[0] = 0;
  }
  subshell_level = local_1c[0];
  if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail_local();
  }
  return var;
}



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

undefined4 FUN_00050ac0(undefined4 param_1,char *param_2)

{
  int iVar1;
  int in_GS_OFFSET;
  undefined4 local_1c [3];
  int local_10;
  undefined4 uStack_c;
  
  uStack_c = 0x50ac7;
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  if (((param_2 == (char *)0x0) || (*param_2 == '\0')) ||
     (iVar1 = legal_number(param_2,local_1c), iVar1 == 0)) {
    local_1c[0] = 0;
  }
  subshell_level = local_1c[0];
  if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_000ecc40();
  }
  return param_1;
}


PUSH ESI
PUSH EBX
CALL 0x00031ed0
ADD EBX,0xf9539
SUB ESP,0x14
MOV ECX,dword ptr GS:[0x14]
MOV dword ptr [ESP + 0xc],ECX
XOR ECX,ECX
MOV EAX,dword ptr [ESP + 0x24]
MOV ESI,dword ptr [ESP + 0x20]
TEST EAX,EAX
JZ 0x00050aee
CMP byte ptr [EAX],0x0
JNZ 0x00050b10
XOR EDX,EDX
LEA EAX,[EBX + 0x5cb4]
MOV dword ptr [EAX],EDX
MOV EAX,ESI
MOV ECX,dword ptr [ESP + 0xc]
XOR ECX,dword ptr GS:[0x14]
JNZ 0x00050b2a
ADD ESP,0x14
POP EBX
POP ESI
RET
SUB ESP,0x8
LEA EDX,[ESP + 0x8]
PUSH EDX
PUSH EAX
CALL 0x00041140
ADD ESP,0x10
MOV EDX,dword ptr [ESP]
TEST EAX,EAX
JNZ 0x00050af0
JMP 0x00050aee
CALL 0x000ecc40
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 FUN_00050ac0(undefined4 param_1,char *param_2)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined4 local_1c [3];\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x50ac7;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (((param_2 == (char *)0x0) || (*param_2 == '\0')) ||\n     (iVar1 = legal_number(param_2,local_1c), iVar1 == 0)) {\n    local_1c[0] = 0;\n  }\n  subshell_level = local_1c[0];\n  if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_000ecc40();\n  }\n  return param_1;\n}\n\n" comment (function_definition "undefined4 FUN_00050ac0(undefined4 param_1,char *param_2)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined4 local_1c [3];\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x50ac7;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (((param_2 == (char *)0x0) || (*param_2 == '\0')) ||\n     (iVar1 = legal_number(param_2,local_1c), iVar1 == 0)) {\n    local_1c[0] = 0;\n  }\n  subshell_level = local_1c[0];\n  if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_000ecc40();\n  }\n  return param_1;\n}" type_identifier (function_declarator "FUN_00050ac0(undefined4 param_1,char *param_2)" identifier (parameter_list "(undefined4 param_1,char *param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined4 local_1c [3];\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x50ac7;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (((param_2 == (char *)0x0) || (*param_2 == '\0')) ||\n     (iVar1 = legal_number(param_2,local_1c), iVar1 == 0)) {\n    local_1c[0] = 0;\n  }\n  subshell_level = local_1c[0];\n  if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_000ecc40();\n  }\n  return param_1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined4 local_1c [3];" type_identifier (array_declarator "local_1c [3]" identifier [ number_literal ]) ;) (declaration "int local_10;" primitive_type identifier ;) (declaration "undefined4 uStack_c;" type_identifier identifier ;) (expression_statement "uStack_c = 0x50ac7;" (assignment_expression "uStack_c = 0x50ac7" identifier = number_literal) ;) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(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) ))))) ;) (if_statement "if (((param_2 == (char *)0x0) || (*param_2 == '\0')) ||\n     (iVar1 = legal_number(param_2,local_1c), iVar1 == 0)) {\n    local_1c[0] = 0;\n  }" if (parenthesized_expression "(((param_2 == (char *)0x0) || (*param_2 == '\0')) ||\n     (iVar1 = legal_number(param_2,local_1c), iVar1 == 0))" ( (binary_expression "((param_2 == (char *)0x0) || (*param_2 == '\0')) ||\n     (iVar1 = legal_number(param_2,local_1c), iVar1 == 0)" (parenthesized_expression "((param_2 == (char *)0x0) || (*param_2 == '\0'))" ( (binary_expression "(param_2 == (char *)0x0) || (*param_2 == '\0')" (parenthesized_expression "(param_2 == (char *)0x0)" ( (binary_expression "param_2 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(*param_2 == '\0')" ( (binary_expression "*param_2 == '\0'" (pointer_expression "*param_2" * identifier) == (char_literal "'\0'" ' escape_sequence ')) ))) )) || (parenthesized_expression "(iVar1 = legal_number(param_2,local_1c), iVar1 == 0)" ( (comma_expression "iVar1 = legal_number(param_2,local_1c), iVar1 == 0" (assignment_expression "iVar1 = legal_number(param_2,local_1c)" identifier = (call_expression "legal_number(param_2,local_1c)" identifier (argument_list "(param_2,local_1c)" ( identifier , identifier )))) , (binary_expression "iVar1 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n    local_1c[0] = 0;\n  }" { (expression_statement "local_1c[0] = 0;" (assignment_expression "local_1c[0] = 0" (subscript_expression "local_1c[0]" identifier [ number_literal ]) = number_literal) ;) })) (expression_statement "subshell_level = local_1c[0];" (assignment_expression "subshell_level = local_1c[0]" identifier = (subscript_expression "local_1c[0]" identifier [ number_literal ])) ;) (if_statement "if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_000ecc40();\n  }" if (parenthesized_expression "(local_10 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_10 != *(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                    /* WARNING: Subroutine does not return */\n    FUN_000ecc40();\n  }" { comment (expression_statement "FUN_000ecc40();" (call_expression "FUN_000ecc40()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return param_1;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nSHELL_VAR * assign_subshell(SHELL_VAR *var,char *value,arrayind_t unused,char *key)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  int local_1c [3];\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x50ac7;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (((value == (char *)0x0) || (*value == '\0')) ||\n     (iVar1 = legal_number(value,(intmax_t *)local_1c), iVar1 == 0)) {\n    local_1c[0] = 0;\n  }\n  subshell_level = local_1c[0];\n  if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return var;\n}\n\n" comment comment (function_definition "SHELL_VAR * assign_subshell(SHELL_VAR *var,char *value,arrayind_t unused,char *key)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  int local_1c [3];\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x50ac7;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (((value == (char *)0x0) || (*value == '\0')) ||\n     (iVar1 = legal_number(value,(intmax_t *)local_1c), iVar1 == 0)) {\n    local_1c[0] = 0;\n  }\n  subshell_level = local_1c[0];\n  if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return var;\n}" type_identifier (pointer_declarator "* assign_subshell(SHELL_VAR *var,char *value,arrayind_t unused,char *key)" * (function_declarator "assign_subshell(SHELL_VAR *var,char *value,arrayind_t unused,char *key)" identifier (parameter_list "(SHELL_VAR *var,char *value,arrayind_t unused,char *key)" ( (parameter_declaration "SHELL_VAR *var" type_identifier (pointer_declarator "*var" * identifier)) , (parameter_declaration "char *value" primitive_type (pointer_declarator "*value" * identifier)) , (parameter_declaration "arrayind_t unused" type_identifier identifier) , (parameter_declaration "char *key" primitive_type (pointer_declarator "*key" * identifier)) )))) (compound_statement "{\n  int iVar1;\n  int in_GS_OFFSET;\n  int local_1c [3];\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x50ac7;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (((value == (char *)0x0) || (*value == '\0')) ||\n     (iVar1 = legal_number(value,(intmax_t *)local_1c), iVar1 == 0)) {\n    local_1c[0] = 0;\n  }\n  subshell_level = local_1c[0];\n  if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return var;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "int local_1c [3];" primitive_type (array_declarator "local_1c [3]" identifier [ number_literal ]) ;) (declaration "int local_10;" primitive_type identifier ;) (declaration "undefined4 uStack_c;" type_identifier identifier ;) (expression_statement "uStack_c = 0x50ac7;" (assignment_expression "uStack_c = 0x50ac7" identifier = number_literal) ;) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(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) ))))) ;) (if_statement "if (((value == (char *)0x0) || (*value == '\0')) ||\n     (iVar1 = legal_number(value,(intmax_t *)local_1c), iVar1 == 0)) {\n    local_1c[0] = 0;\n  }" if (parenthesized_expression "(((value == (char *)0x0) || (*value == '\0')) ||\n     (iVar1 = legal_number(value,(intmax_t *)local_1c), iVar1 == 0))" ( (binary_expression "((value == (char *)0x0) || (*value == '\0')) ||\n     (iVar1 = legal_number(value,(intmax_t *)local_1c), iVar1 == 0)" (parenthesized_expression "((value == (char *)0x0) || (*value == '\0'))" ( (binary_expression "(value == (char *)0x0) || (*value == '\0')" (parenthesized_expression "(value == (char *)0x0)" ( (binary_expression "value == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(*value == '\0')" ( (binary_expression "*value == '\0'" (pointer_expression "*value" * identifier) == (char_literal "'\0'" ' escape_sequence ')) ))) )) || (parenthesized_expression "(iVar1 = legal_number(value,(intmax_t *)local_1c), iVar1 == 0)" ( (comma_expression "iVar1 = legal_number(value,(intmax_t *)local_1c), iVar1 == 0" (assignment_expression "iVar1 = legal_number(value,(intmax_t *)local_1c)" identifier = (call_expression "legal_number(value,(intmax_t *)local_1c)" identifier (argument_list "(value,(intmax_t *)local_1c)" ( identifier , (cast_expression "(intmax_t *)local_1c" ( (type_descriptor "intmax_t *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) )))) , (binary_expression "iVar1 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n    local_1c[0] = 0;\n  }" { (expression_statement "local_1c[0] = 0;" (assignment_expression "local_1c[0] = 0" (subscript_expression "local_1c[0]" identifier [ number_literal ]) = number_literal) ;) })) (expression_statement "subshell_level = local_1c[0];" (assignment_expression "subshell_level = local_1c[0]" identifier = (subscript_expression "local_1c[0]" identifier [ number_literal ])) ;) (if_statement "if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" if (parenthesized_expression "(local_10 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_10 != *(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                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" { comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return var;" return identifier ;) })))
(translation_unit "undefined4 FUN_00050ac0(undefined4 param_1,char *param_2)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined4 local_1c [3];\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x50ac7;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (((param_2 == (char *)0x0) || (*param_2 == '\0')) ||\n     (iVar1 = legal_number(param_2,local_1c), iVar1 == 0)) {\n    local_1c[0] = 0;\n  }\n  subshell_level = local_1c[0];\n  if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000ecc40();\n  }\n  return param_1;\n}\n\n" (function_definition "undefined4 FUN_00050ac0(undefined4 param_1,char *param_2)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined4 local_1c [3];\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x50ac7;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (((param_2 == (char *)0x0) || (*param_2 == '\0')) ||\n     (iVar1 = legal_number(param_2,local_1c), iVar1 == 0)) {\n    local_1c[0] = 0;\n  }\n  subshell_level = local_1c[0];\n  if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000ecc40();\n  }\n  return param_1;\n}" type_identifier (function_declarator "FUN_00050ac0(undefined4 param_1,char *param_2)" identifier (parameter_list "(undefined4 param_1,char *param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined4 local_1c [3];\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x50ac7;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (((param_2 == (char *)0x0) || (*param_2 == '\0')) ||\n     (iVar1 = legal_number(param_2,local_1c), iVar1 == 0)) {\n    local_1c[0] = 0;\n  }\n  subshell_level = local_1c[0];\n  if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000ecc40();\n  }\n  return param_1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined4 local_1c [3];" type_identifier (array_declarator "local_1c [3]" identifier [ number_literal ]) ;) (declaration "int local_10;" primitive_type identifier ;) (declaration "undefined4 uStack_c;" type_identifier identifier ;) (expression_statement "uStack_c = 0x50ac7;" (assignment_expression "uStack_c = 0x50ac7" identifier = number_literal) ;) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(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) ))))) ;) (if_statement "if (((param_2 == (char *)0x0) || (*param_2 == '\0')) ||\n     (iVar1 = legal_number(param_2,local_1c), iVar1 == 0)) {\n    local_1c[0] = 0;\n  }" if (parenthesized_expression "(((param_2 == (char *)0x0) || (*param_2 == '\0')) ||\n     (iVar1 = legal_number(param_2,local_1c), iVar1 == 0))" ( (binary_expression "((param_2 == (char *)0x0) || (*param_2 == '\0')) ||\n     (iVar1 = legal_number(param_2,local_1c), iVar1 == 0)" (parenthesized_expression "((param_2 == (char *)0x0) || (*param_2 == '\0'))" ( (binary_expression "(param_2 == (char *)0x0) || (*param_2 == '\0')" (parenthesized_expression "(param_2 == (char *)0x0)" ( (binary_expression "param_2 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(*param_2 == '\0')" ( (binary_expression "*param_2 == '\0'" (pointer_expression "*param_2" * identifier) == (char_literal "'\0'" ' escape_sequence ')) ))) )) || (parenthesized_expression "(iVar1 = legal_number(param_2,local_1c), iVar1 == 0)" ( (comma_expression "iVar1 = legal_number(param_2,local_1c), iVar1 == 0" (assignment_expression "iVar1 = legal_number(param_2,local_1c)" identifier = (call_expression "legal_number(param_2,local_1c)" identifier (argument_list "(param_2,local_1c)" ( identifier , identifier )))) , (binary_expression "iVar1 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n    local_1c[0] = 0;\n  }" { (expression_statement "local_1c[0] = 0;" (assignment_expression "local_1c[0] = 0" (subscript_expression "local_1c[0]" identifier [ number_literal ]) = number_literal) ;) })) (expression_statement "subshell_level = local_1c[0];" (assignment_expression "subshell_level = local_1c[0]" identifier = (subscript_expression "local_1c[0]" identifier [ number_literal ])) ;) (if_statement "if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000ecc40();\n  }" if (parenthesized_expression "(local_10 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_10 != *(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                    \n    FUN_000ecc40();\n  }" { (expression_statement "FUN_000ecc40();" (call_expression "FUN_000ecc40()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return param_1;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (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) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) || (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == (char_literal ' escape_sequence ')) ))) )) || (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) , (binary_expression IDENT == LIT)) ))) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) })) (expression_statement (assignment_expression IDENT = (subscript_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 { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (return_statement return IDENT ;) })))
(function_definition "undefined4 FUN_00050ac0(undefined4 param_1,char *param_2)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined4 local_1c [3];\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x50ac7;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (((param_2 == (char *)0x0) || (*param_2 == '\0')) ||\n     (iVar1 = legal_number(param_2,local_1c), iVar1 == 0)) {\n    local_1c[0] = 0;\n  }\n  subshell_level = local_1c[0];\n  if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000ecc40();\n  }\n  return param_1;\n}" (type_identifier "undefined4") (function_declarator "FUN_00050ac0(undefined4 param_1,char *param_2)" (identifier "FUN_00050ac0") (parameter_list "(undefined4 param_1,char *param_2)" (( "(") (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"))) () ")"))) (compound_statement "{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined4 local_1c [3];\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x50ac7;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (((param_2 == (char *)0x0) || (*param_2 == '\0')) ||\n     (iVar1 = legal_number(param_2,local_1c), iVar1 == 0)) {\n    local_1c[0] = 0;\n  }\n  subshell_level = local_1c[0];\n  if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000ecc40();\n  }\n  return param_1;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "undefined4 local_1c [3];" (type_identifier "undefined4") (array_declarator "local_1c [3]" (identifier "local_1c") ([ "[") (number_literal "3") (] "]")) (; ";")) (declaration "int local_10;" (primitive_type "int") (identifier "local_10") (; ";")) (declaration "undefined4 uStack_c;" (type_identifier "undefined4") (identifier "uStack_c") (; ";")) (expression_statement "uStack_c = 0x50ac7;" (assignment_expression "uStack_c = 0x50ac7" (identifier "uStack_c") (= "=") (number_literal "0x50ac7")) (; ";")) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_10") (= "=") (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")) () ")"))))) (; ";")) (if_statement "if (((param_2 == (char *)0x0) || (*param_2 == '\0')) ||\n     (iVar1 = legal_number(param_2,local_1c), iVar1 == 0)) {\n    local_1c[0] = 0;\n  }" (if "if") (parenthesized_expression "(((param_2 == (char *)0x0) || (*param_2 == '\0')) ||\n     (iVar1 = legal_number(param_2,local_1c), iVar1 == 0))" (( "(") (binary_expression "((param_2 == (char *)0x0) || (*param_2 == '\0')) ||\n     (iVar1 = legal_number(param_2,local_1c), iVar1 == 0)" (parenthesized_expression "((param_2 == (char *)0x0) || (*param_2 == '\0'))" (( "(") (binary_expression "(param_2 == (char *)0x0) || (*param_2 == '\0')" (parenthesized_expression "(param_2 == (char *)0x0)" (( "(") (binary_expression "param_2 == (char *)0x0" (identifier "param_2") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (|| "||") (parenthesized_expression "(*param_2 == '\0')" (( "(") (binary_expression "*param_2 == '\0'" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")"))) () ")")) (|| "||") (parenthesized_expression "(iVar1 = legal_number(param_2,local_1c), iVar1 == 0)" (( "(") (comma_expression "iVar1 = legal_number(param_2,local_1c), iVar1 == 0" (assignment_expression "iVar1 = legal_number(param_2,local_1c)" (identifier "iVar1") (= "=") (call_expression "legal_number(param_2,local_1c)" (identifier "legal_number") (argument_list "(param_2,local_1c)" (( "(") (identifier "param_2") (, ",") (identifier "local_1c") () ")")))) (, ",") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0"))) () ")"))) () ")")) (compound_statement "{\n    local_1c[0] = 0;\n  }" ({ "{") (expression_statement "local_1c[0] = 0;" (assignment_expression "local_1c[0] = 0" (subscript_expression "local_1c[0]" (identifier "local_1c") ([ "[") (number_literal "0") (] "]")) (= "=") (number_literal "0")) (; ";")) (} "}"))) (expression_statement "subshell_level = local_1c[0];" (assignment_expression "subshell_level = local_1c[0]" (identifier "subshell_level") (= "=") (subscript_expression "local_1c[0]" (identifier "local_1c") ([ "[") (number_literal "0") (] "]"))) (; ";")) (if_statement "if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000ecc40();\n  }" (if "if") (parenthesized_expression "(local_10 != *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_10 != *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_10") (!= "!=") (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                    \n    FUN_000ecc40();\n  }" ({ "{") (expression_statement "FUN_000ecc40();" (call_expression "FUN_000ecc40()" (identifier "FUN_000ecc40") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}")))

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

type_1 * function_1(type_1 *var,char *var_2,type_2 unused,char *key)

{
  int var_4;
  int var_1;
  int local_1c [3];
  int var_5;
  type_3 uStack_c;
  
  uStack_c = 0x50ac7;
  var_5 = *(int *)(var_1 + 0x14);
  if (((var_2 == (char *)0x0) || (*var_2 == '\0')) ||
     (var_4 = var_3(var_2,(type_4 *)local_1c), var_4 == 0)) {
    local_1c[0] = 0;
  }
  subshell_level = local_1c[0];
  if (var_5 != *(int *)(var_1 + 0x14)) {
                    /* WARNING: Subroutine does not return */
    var_6();
  }
  return var;
}


(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))))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (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))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) right: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (char_literal (escape_sequence)))))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier)))) right: (binary_expression left: (identifier) right: (number_literal)))))) consequence: (compound_statement (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (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 (expression_statement (call_expression function: (identifier) arguments: (argument_list))))) (return_statement (identifier)))))

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

undefined4 MASKED(undefined4 param_1,char *param_2)

{
  int iVar1;
  int in_GS_OFFSET;
  undefined4 local_1c [3];
  int local_10;
  undefined4 uStack_c;
  
  uStack_c = 0x50ac7;
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  if (((param_2 == (char *)0x0) || (*param_2 == '\0')) ||
     (iVar1 = legal_number(param_2,local_1c), iVar1 == 0)) {
    local_1c[0] = 0;
  }
  subshell_level = local_1c[0];
  if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_000ecc40();
  }
  return param_1;
}

