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

int edit_stdin(void)

{
  int iVar1;
  void *ifile;
  
  iVar1 = isatty(fd0);
  if (iVar1 != 0) {
    error("Missing filename (\"less --help\" for help)",(PARG *)0x0);
                    /* WARNING: Subroutine does not return */
    quit(0);
  }
  ifile = get_ifile("-",curr_ifile);
  if (ifile != curr_ifile) {
    iVar1 = edit_ifile(ifile);
    return iVar1;
  }
  return 0;
}



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

undefined4 FUN_0001f350(void)

{
  int iVar1;
  undefined4 uVar2;
  
  iVar1 = isatty(DAT_00045b78);
  if (iVar1 != 0) {
    error("Missing filename (\"less --help\" for help)",0);
                    /* WARNING: Subroutine does not return */
    FUN_00012bf0(0);
  }
  iVar1 = FUN_00021920(&DAT_00032042,DAT_00044bf8);
  if (iVar1 != DAT_00044bf8) {
    uVar2 = FUN_0001eb60();
    return uVar2;
  }
  return 0;
}


PUSH ESI
PUSH EBX
CALL 0x000129d0
ADD EBX,0x23b35
SUB ESP,0x10
PUSH dword ptr [EBX + 0x2cec]
CALL 0x00012450
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x0001f3a0
LEA ESI,[EBX + 0x1d6c]
SUB ESP,0x8
LEA EAX,[EBX + 0xfffef1b6]
PUSH dword ptr [ESI]
PUSH EAX
CALL 0x00021920
ADD ESP,0x10
CMP EAX,dword ptr [ESI]
JZ 0x0001f3c8
ADD ESP,0x4
POP EBX
POP ESI
JMP 0x0001eb60
SUB ESP,0x8
LEA EAX,[EBX + 0xffff0310]
PUSH 0x0
PUSH EAX
CALL 0x0002a810
MOV dword ptr [ESP],0x0
CALL 0x00012bf0
ADD ESP,0x4
XOR EAX,EAX
POP EBX
POP ESI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 FUN_0001f350(void)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = isatty(DAT_00045b78);\n  if (iVar1 != 0) {\n    error("Missing filename (\"less --help\" for help)",0);\n                    /* WARNING: Subroutine does not return */\n    FUN_00012bf0(0);\n  }\n  iVar1 = FUN_00021920(&DAT_00032042,DAT_00044bf8);\n  if (iVar1 != DAT_00044bf8) {\n    uVar2 = FUN_0001eb60();\n    return uVar2;\n  }\n  return 0;\n}\n\n" comment (function_definition "undefined4 FUN_0001f350(void)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = isatty(DAT_00045b78);\n  if (iVar1 != 0) {\n    error("Missing filename (\"less --help\" for help)",0);\n                    /* WARNING: Subroutine does not return */\n    FUN_00012bf0(0);\n  }\n  iVar1 = FUN_00021920(&DAT_00032042,DAT_00044bf8);\n  if (iVar1 != DAT_00044bf8) {\n    uVar2 = FUN_0001eb60();\n    return uVar2;\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_0001f350(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = isatty(DAT_00045b78);\n  if (iVar1 != 0) {\n    error("Missing filename (\"less --help\" for help)",0);\n                    /* WARNING: Subroutine does not return */\n    FUN_00012bf0(0);\n  }\n  iVar1 = FUN_00021920(&DAT_00032042,DAT_00044bf8);\n  if (iVar1 != DAT_00044bf8) {\n    uVar2 = FUN_0001eb60();\n    return uVar2;\n  }\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (expression_statement "iVar1 = isatty(DAT_00045b78);" (assignment_expression "iVar1 = isatty(DAT_00045b78)" identifier = (call_expression "isatty(DAT_00045b78)" identifier (argument_list "(DAT_00045b78)" ( identifier )))) ;) (if_statement "if (iVar1 != 0) {\n    error("Missing filename (\"less --help\" for help)",0);\n                    /* WARNING: Subroutine does not return */\n    FUN_00012bf0(0);\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    error("Missing filename (\"less --help\" for help)",0);\n                    /* WARNING: Subroutine does not return */\n    FUN_00012bf0(0);\n  }" { (expression_statement "error("Missing filename (\"less --help\" for help)",0);" (call_expression "error("Missing filename (\"less --help\" for help)",0)" identifier (argument_list "("Missing filename (\"less --help\" for help)",0)" ( (string_literal ""Missing filename (\"less --help\" for help)"" " string_content escape_sequence string_content escape_sequence string_content ") , number_literal ))) ;) comment (expression_statement "FUN_00012bf0(0);" (call_expression "FUN_00012bf0(0)" identifier (argument_list "(0)" ( number_literal ))) ;) })) (expression_statement "iVar1 = FUN_00021920(&DAT_00032042,DAT_00044bf8);" (assignment_expression "iVar1 = FUN_00021920(&DAT_00032042,DAT_00044bf8)" identifier = (call_expression "FUN_00021920(&DAT_00032042,DAT_00044bf8)" identifier (argument_list "(&DAT_00032042,DAT_00044bf8)" ( (pointer_expression "&DAT_00032042" & identifier) , identifier )))) ;) (if_statement "if (iVar1 != DAT_00044bf8) {\n    uVar2 = FUN_0001eb60();\n    return uVar2;\n  }" if (parenthesized_expression "(iVar1 != DAT_00044bf8)" ( (binary_expression "iVar1 != DAT_00044bf8" identifier != identifier) )) (compound_statement "{\n    uVar2 = FUN_0001eb60();\n    return uVar2;\n  }" { (expression_statement "uVar2 = FUN_0001eb60();" (assignment_expression "uVar2 = FUN_0001eb60()" identifier = (call_expression "FUN_0001eb60()" identifier (argument_list "()" ( )))) ;) (return_statement "return uVar2;" return identifier ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nint edit_stdin(void)\n\n{\n  int iVar1;\n  void *ifile;\n  \n  iVar1 = isatty(fd0);\n  if (iVar1 != 0) {\n    error("Missing filename (\"less --help\" for help)",(PARG *)0x0);\n                    /* WARNING: Subroutine does not return */\n    quit(0);\n  }\n  ifile = get_ifile("-",curr_ifile);\n  if (ifile != curr_ifile) {\n    iVar1 = edit_ifile(ifile);\n    return iVar1;\n  }\n  return 0;\n}\n\n" comment comment (function_definition "int edit_stdin(void)\n\n{\n  int iVar1;\n  void *ifile;\n  \n  iVar1 = isatty(fd0);\n  if (iVar1 != 0) {\n    error("Missing filename (\"less --help\" for help)",(PARG *)0x0);\n                    /* WARNING: Subroutine does not return */\n    quit(0);\n  }\n  ifile = get_ifile("-",curr_ifile);\n  if (ifile != curr_ifile) {\n    iVar1 = edit_ifile(ifile);\n    return iVar1;\n  }\n  return 0;\n}" primitive_type (function_declarator "edit_stdin(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int iVar1;\n  void *ifile;\n  \n  iVar1 = isatty(fd0);\n  if (iVar1 != 0) {\n    error("Missing filename (\"less --help\" for help)",(PARG *)0x0);\n                    /* WARNING: Subroutine does not return */\n    quit(0);\n  }\n  ifile = get_ifile("-",curr_ifile);\n  if (ifile != curr_ifile) {\n    iVar1 = edit_ifile(ifile);\n    return iVar1;\n  }\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "void *ifile;" primitive_type (pointer_declarator "*ifile" * identifier) ;) (expression_statement "iVar1 = isatty(fd0);" (assignment_expression "iVar1 = isatty(fd0)" identifier = (call_expression "isatty(fd0)" identifier (argument_list "(fd0)" ( identifier )))) ;) (if_statement "if (iVar1 != 0) {\n    error("Missing filename (\"less --help\" for help)",(PARG *)0x0);\n                    /* WARNING: Subroutine does not return */\n    quit(0);\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    error("Missing filename (\"less --help\" for help)",(PARG *)0x0);\n                    /* WARNING: Subroutine does not return */\n    quit(0);\n  }" { (expression_statement "error("Missing filename (\"less --help\" for help)",(PARG *)0x0);" (call_expression "error("Missing filename (\"less --help\" for help)",(PARG *)0x0)" identifier (argument_list "("Missing filename (\"less --help\" for help)",(PARG *)0x0)" ( (string_literal ""Missing filename (\"less --help\" for help)"" " string_content escape_sequence string_content escape_sequence string_content ") , (cast_expression "(PARG *)0x0" ( (type_descriptor "PARG *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ))) ;) comment (expression_statement "quit(0);" (call_expression "quit(0)" identifier (argument_list "(0)" ( number_literal ))) ;) })) (expression_statement "ifile = get_ifile("-",curr_ifile);" (assignment_expression "ifile = get_ifile("-",curr_ifile)" identifier = (call_expression "get_ifile("-",curr_ifile)" identifier (argument_list "("-",curr_ifile)" ( (string_literal ""-"" " string_content ") , identifier )))) ;) (if_statement "if (ifile != curr_ifile) {\n    iVar1 = edit_ifile(ifile);\n    return iVar1;\n  }" if (parenthesized_expression "(ifile != curr_ifile)" ( (binary_expression "ifile != curr_ifile" identifier != identifier) )) (compound_statement "{\n    iVar1 = edit_ifile(ifile);\n    return iVar1;\n  }" { (expression_statement "iVar1 = edit_ifile(ifile);" (assignment_expression "iVar1 = edit_ifile(ifile)" identifier = (call_expression "edit_ifile(ifile)" identifier (argument_list "(ifile)" ( identifier )))) ;) (return_statement "return iVar1;" return identifier ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "undefined4 FUN_0001f350(void)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = isatty(DAT_00045b78);\n  if (iVar1 != 0) {\n    error("Missing filename (\"less --help\" for help)",0);\n                    \n    FUN_00012bf0(0);\n  }\n  iVar1 = FUN_00021920(&DAT_00032042,DAT_00044bf8);\n  if (iVar1 != DAT_00044bf8) {\n    uVar2 = FUN_0001eb60();\n    return uVar2;\n  }\n  return 0;\n}\n\n" (function_definition "undefined4 FUN_0001f350(void)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = isatty(DAT_00045b78);\n  if (iVar1 != 0) {\n    error("Missing filename (\"less --help\" for help)",0);\n                    \n    FUN_00012bf0(0);\n  }\n  iVar1 = FUN_00021920(&DAT_00032042,DAT_00044bf8);\n  if (iVar1 != DAT_00044bf8) {\n    uVar2 = FUN_0001eb60();\n    return uVar2;\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_0001f350(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = isatty(DAT_00045b78);\n  if (iVar1 != 0) {\n    error("Missing filename (\"less --help\" for help)",0);\n                    \n    FUN_00012bf0(0);\n  }\n  iVar1 = FUN_00021920(&DAT_00032042,DAT_00044bf8);\n  if (iVar1 != DAT_00044bf8) {\n    uVar2 = FUN_0001eb60();\n    return uVar2;\n  }\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (expression_statement "iVar1 = isatty(DAT_00045b78);" (assignment_expression "iVar1 = isatty(DAT_00045b78)" identifier = (call_expression "isatty(DAT_00045b78)" identifier (argument_list "(DAT_00045b78)" ( identifier )))) ;) (if_statement "if (iVar1 != 0) {\n    error("Missing filename (\"less --help\" for help)",0);\n                    \n    FUN_00012bf0(0);\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    error("Missing filename (\"less --help\" for help)",0);\n                    \n    FUN_00012bf0(0);\n  }" { (expression_statement "error("Missing filename (\"less --help\" for help)",0);" (call_expression "error("Missing filename (\"less --help\" for help)",0)" identifier (argument_list "("Missing filename (\"less --help\" for help)",0)" ( (string_literal ""Missing filename (\"less --help\" for help)"" " string_content escape_sequence string_content escape_sequence string_content ") , number_literal ))) ;) (expression_statement "FUN_00012bf0(0);" (call_expression "FUN_00012bf0(0)" identifier (argument_list "(0)" ( number_literal ))) ;) })) (expression_statement "iVar1 = FUN_00021920(&DAT_00032042,DAT_00044bf8);" (assignment_expression "iVar1 = FUN_00021920(&DAT_00032042,DAT_00044bf8)" identifier = (call_expression "FUN_00021920(&DAT_00032042,DAT_00044bf8)" identifier (argument_list "(&DAT_00032042,DAT_00044bf8)" ( (pointer_expression "&DAT_00032042" & identifier) , identifier )))) ;) (if_statement "if (iVar1 != DAT_00044bf8) {\n    uVar2 = FUN_0001eb60();\n    return uVar2;\n  }" if (parenthesized_expression "(iVar1 != DAT_00044bf8)" ( (binary_expression "iVar1 != DAT_00044bf8" identifier != identifier) )) (compound_statement "{\n    uVar2 = FUN_0001eb60();\n    return uVar2;\n  }" { (expression_statement "uVar2 = FUN_0001eb60();" (assignment_expression "uVar2 = FUN_0001eb60()" identifier = (call_expression "FUN_0001eb60()" identifier (argument_list "()" ( )))) ;) (return_statement "return uVar2;" return identifier ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence string_content escape_sequence string_content ") , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( LIT ))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression & IDENT) , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (return_statement return IDENT ;) })) (return_statement return LIT ;) })))
(function_definition "undefined4 FUN_0001f350(void)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = isatty(DAT_00045b78);\n  if (iVar1 != 0) {\n    error("Missing filename (\"less --help\" for help)",0);\n                    \n    FUN_00012bf0(0);\n  }\n  iVar1 = FUN_00021920(&DAT_00032042,DAT_00044bf8);\n  if (iVar1 != DAT_00044bf8) {\n    uVar2 = FUN_0001eb60();\n    return uVar2;\n  }\n  return 0;\n}" (type_identifier "undefined4") (function_declarator "FUN_0001f350(void)" (identifier "FUN_0001f350") (parameter_list "(void)" (( "(") (parameter_declaration "void" (primitive_type "void")) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = isatty(DAT_00045b78);\n  if (iVar1 != 0) {\n    error("Missing filename (\"less --help\" for help)",0);\n                    \n    FUN_00012bf0(0);\n  }\n  iVar1 = FUN_00021920(&DAT_00032042,DAT_00044bf8);\n  if (iVar1 != DAT_00044bf8) {\n    uVar2 = FUN_0001eb60();\n    return uVar2;\n  }\n  return 0;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (expression_statement "iVar1 = isatty(DAT_00045b78);" (assignment_expression "iVar1 = isatty(DAT_00045b78)" (identifier "iVar1") (= "=") (call_expression "isatty(DAT_00045b78)" (identifier "isatty") (argument_list "(DAT_00045b78)" (( "(") (identifier "DAT_00045b78") () ")")))) (; ";")) (if_statement "if (iVar1 != 0) {\n    error("Missing filename (\"less --help\" for help)",0);\n                    \n    FUN_00012bf0(0);\n  }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    error("Missing filename (\"less --help\" for help)",0);\n                    \n    FUN_00012bf0(0);\n  }" ({ "{") (expression_statement "error("Missing filename (\"less --help\" for help)",0);" (call_expression "error("Missing filename (\"less --help\" for help)",0)" (identifier "error") (argument_list "("Missing filename (\"less --help\" for help)",0)" (( "(") (string_literal ""Missing filename (\"less --help\" for help)"" (" """) (string_content "Missing filename (") (escape_sequence "\"") (string_content "less --help") (escape_sequence "\"") (string_content " for help)") (" """)) (, ",") (number_literal "0") () ")"))) (; ";")) (expression_statement "FUN_00012bf0(0);" (call_expression "FUN_00012bf0(0)" (identifier "FUN_00012bf0") (argument_list "(0)" (( "(") (number_literal "0") () ")"))) (; ";")) (} "}"))) (expression_statement "iVar1 = FUN_00021920(&DAT_00032042,DAT_00044bf8);" (assignment_expression "iVar1 = FUN_00021920(&DAT_00032042,DAT_00044bf8)" (identifier "iVar1") (= "=") (call_expression "FUN_00021920(&DAT_00032042,DAT_00044bf8)" (identifier "FUN_00021920") (argument_list "(&DAT_00032042,DAT_00044bf8)" (( "(") (pointer_expression "&DAT_00032042" (& "&") (identifier "DAT_00032042")) (, ",") (identifier "DAT_00044bf8") () ")")))) (; ";")) (if_statement "if (iVar1 != DAT_00044bf8) {\n    uVar2 = FUN_0001eb60();\n    return uVar2;\n  }" (if "if") (parenthesized_expression "(iVar1 != DAT_00044bf8)" (( "(") (binary_expression "iVar1 != DAT_00044bf8" (identifier "iVar1") (!= "!=") (identifier "DAT_00044bf8")) () ")")) (compound_statement "{\n    uVar2 = FUN_0001eb60();\n    return uVar2;\n  }" ({ "{") (expression_statement "uVar2 = FUN_0001eb60();" (assignment_expression "uVar2 = FUN_0001eb60()" (identifier "uVar2") (= "=") (call_expression "FUN_0001eb60()" (identifier "FUN_0001eb60") (argument_list "()" (( "(") () ")")))) (; ";")) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}"))) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

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

int function_1(void)

{
  int var_2;
  void *var_6;
  
  var_2 = var_1(fd0);
  if (var_2 != 0) {
    var_3("Missing filename (\"less --help\" for help)",(type_1 *)0x0);
                    /* WARNING: Subroutine does not return */
    var_4(0);
  }
  var_6 = var_5("-",var_7);
  if (var_6 != var_7) {
    var_2 = var_8(var_6);
    return var_2;
  }
  return 0;
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (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 (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content)) (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (return_statement (identifier)))) (return_statement (number_literal)))))

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

undefined4 MASKED(void)

{
  int iVar1;
  undefined4 uVar2;
  
  iVar1 = isatty(DAT_00045b78);
  if (iVar1 != 0) {
    error("Missing filename (\"less --help\" for help)",0);
                    /* WARNING: Subroutine does not return */
    FUN_00012bf0(0);
  }
  iVar1 = FUN_00021920(&DAT_00032042,DAT_00044bf8);
  if (iVar1 != DAT_00044bf8) {
    uVar2 = FUN_0001eb60();
    return uVar2;
  }
  return 0;
}

