
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention -- yet parameter storage is locked */

void open_getchr(void)

{
  tty = open64("/dev/tty",0);
  if (-1 < tty) {
    return;
  }
  tty = 2;
  return;
}



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

void FUN_0002ae60(void)

{
  DAT_000419fc = open64("/dev/tty",0);
  if (-1 < DAT_000419fc) {
    return;
  }
  DAT_000419fc = 2;
  return;
}


PUSH EBX
CALL 0x000129a0
ADD EBX,0x11032
SUB ESP,0x10
PUSH 0x0
LEA EAX,[EBX + 0xffff4526]
PUSH EAX
CALL 0x00012090
ADD ESP,0x10
TEST EAX,EAX
JS 0x0002ae98
LEA EDX,[EBX + 0x5b64]
MOV dword ptr [EDX],EAX
ADD ESP,0x8
POP EBX
RET
LEA EAX,[EBX + 0x5b64]
MOV dword ptr [EAX],0x2
ADD ESP,0x8
POP EBX
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_0002ae60(void)\n\n{\n  DAT_000419fc = open64("/dev/tty",0);\n  if (-1 < DAT_000419fc) {\n    return;\n  }\n  DAT_000419fc = 2;\n  return;\n}\n\n" comment (function_definition "void FUN_0002ae60(void)\n\n{\n  DAT_000419fc = open64("/dev/tty",0);\n  if (-1 < DAT_000419fc) {\n    return;\n  }\n  DAT_000419fc = 2;\n  return;\n}" primitive_type (function_declarator "FUN_0002ae60(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  DAT_000419fc = open64("/dev/tty",0);\n  if (-1 < DAT_000419fc) {\n    return;\n  }\n  DAT_000419fc = 2;\n  return;\n}" { (expression_statement "DAT_000419fc = open64("/dev/tty",0);" (assignment_expression "DAT_000419fc = open64("/dev/tty",0)" identifier = (call_expression "open64("/dev/tty",0)" identifier (argument_list "("/dev/tty",0)" ( (string_literal ""/dev/tty"" " string_content ") , number_literal )))) ;) (if_statement "if (-1 < DAT_000419fc) {\n    return;\n  }" if (parenthesized_expression "(-1 < DAT_000419fc)" ( (binary_expression "-1 < DAT_000419fc" number_literal < identifier) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "DAT_000419fc = 2;" (assignment_expression "DAT_000419fc = 2" identifier = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention -- yet parameter storage is locked */\n\nvoid open_getchr(void)\n\n{\n  tty = open64("/dev/tty",0);\n  if (-1 < tty) {\n    return;\n  }\n  tty = 2;\n  return;\n}\n\n" comment comment (function_definition "void open_getchr(void)\n\n{\n  tty = open64("/dev/tty",0);\n  if (-1 < tty) {\n    return;\n  }\n  tty = 2;\n  return;\n}" primitive_type (function_declarator "open_getchr(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  tty = open64("/dev/tty",0);\n  if (-1 < tty) {\n    return;\n  }\n  tty = 2;\n  return;\n}" { (expression_statement "tty = open64("/dev/tty",0);" (assignment_expression "tty = open64("/dev/tty",0)" identifier = (call_expression "open64("/dev/tty",0)" identifier (argument_list "("/dev/tty",0)" ( (string_literal ""/dev/tty"" " string_content ") , number_literal )))) ;) (if_statement "if (-1 < tty) {\n    return;\n  }" if (parenthesized_expression "(-1 < tty)" ( (binary_expression "-1 < tty" number_literal < identifier) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "tty = 2;" (assignment_expression "tty = 2" identifier = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_0002ae60(void)\n\n{\n  DAT_000419fc = open64("/dev/tty",0);\n  if (-1 < DAT_000419fc) {\n    return;\n  }\n  DAT_000419fc = 2;\n  return;\n}\n\n" (function_definition "void FUN_0002ae60(void)\n\n{\n  DAT_000419fc = open64("/dev/tty",0);\n  if (-1 < DAT_000419fc) {\n    return;\n  }\n  DAT_000419fc = 2;\n  return;\n}" primitive_type (function_declarator "FUN_0002ae60(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  DAT_000419fc = open64("/dev/tty",0);\n  if (-1 < DAT_000419fc) {\n    return;\n  }\n  DAT_000419fc = 2;\n  return;\n}" { (expression_statement "DAT_000419fc = open64("/dev/tty",0);" (assignment_expression "DAT_000419fc = open64("/dev/tty",0)" identifier = (call_expression "open64("/dev/tty",0)" identifier (argument_list "("/dev/tty",0)" ( (string_literal ""/dev/tty"" " string_content ") , number_literal )))) ;) (if_statement "if (-1 < DAT_000419fc) {\n    return;\n  }" if (parenthesized_expression "(-1 < DAT_000419fc)" ( (binary_expression "-1 < DAT_000419fc" number_literal < identifier) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "DAT_000419fc = 2;" (assignment_expression "DAT_000419fc = 2" identifier = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE) ))) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (return_statement return ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (return_statement return ;) })))
(function_definition "void FUN_0002ae60(void)\n\n{\n  DAT_000419fc = open64("/dev/tty",0);\n  if (-1 < DAT_000419fc) {\n    return;\n  }\n  DAT_000419fc = 2;\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0002ae60(void)" (identifier "FUN_0002ae60") (parameter_list "(void)" (( "(") (parameter_declaration "void" (primitive_type "void")) () ")"))) (compound_statement "{\n  DAT_000419fc = open64("/dev/tty",0);\n  if (-1 < DAT_000419fc) {\n    return;\n  }\n  DAT_000419fc = 2;\n  return;\n}" ({ "{") (expression_statement "DAT_000419fc = open64("/dev/tty",0);" (assignment_expression "DAT_000419fc = open64("/dev/tty",0)" (identifier "DAT_000419fc") (= "=") (call_expression "open64("/dev/tty",0)" (identifier "open64") (argument_list "("/dev/tty",0)" (( "(") (string_literal ""/dev/tty"" (" """) (string_content "/dev/tty") (" """)) (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if (-1 < DAT_000419fc) {\n    return;\n  }" (if "if") (parenthesized_expression "(-1 < DAT_000419fc)" (( "(") (binary_expression "-1 < DAT_000419fc" (number_literal "-1") (< "<") (identifier "DAT_000419fc")) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "DAT_000419fc = 2;" (assignment_expression "DAT_000419fc = 2" (identifier "DAT_000419fc") (= "=") (number_literal "2")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention -- yet parameter storage is locked */

void function_1(void)

{
  var_2 = var_1("/dev/tty",0);
  if (-1 < var_2) {
    return;
  }
  var_2 = 2;
  return;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type)))) body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (return_statement))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (return_statement))))

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

void MASKED(void)

{
  DAT_000419fc = open64("/dev/tty",0);
  if (-1 < DAT_000419fc) {
    return;
  }
  DAT_000419fc = 2;
  return;
}

