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

int fclose_if_not_stdin(FILE *f)

{
}



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

undefined8 __regparm3 FUN_000a7a5d(FILE *param_1,undefined4 param_2,undefined4 param_3)

{
  uint uVar1;
  uint uVar2;
  
  uVar2 = param_1->_flags & 0x20;
  if (uVar2 != 0) {
    *DAT_000d16fc = 5;
  }
  uVar2 = (uint)(uVar2 != 0);
  if (*(FILE **)PTR_stdin_000d0fac != param_1) {
    uVar1 = fclose(param_1);
    uVar2 = uVar2 | uVar1;
  }
  return CONCAT44(param_3,uVar2);
}


PUSH ESI
PUSH EBX
PUSH ECX
CALL 0x00017640
ADD EBX,0x28fbb
MOV EDX,dword ptr [EAX]
AND EDX,0x20
JZ 0x000a7a7e
MOV ECX,dword ptr [EBX + 0xcdc]
MOV dword ptr [ECX],0x5
XOR ECX,ECX
TEST EDX,EDX
SETNZ CL
MOV ESI,ECX
MOV EDX,dword ptr [EBX + 0x58c]
CMP dword ptr [EDX],EAX
JZ 0x000a7a9f
SUB ESP,0xc
PUSH EAX
CALL 0x00016320
OR ESI,EAX
ADD ESP,0x10
MOV EAX,ESI
POP EDX
POP EBX
POP ESI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined8 __regparm3 FUN_000a7a5d(FILE *param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  uint uVar1;\n  uint uVar2;\n  \n  uVar2 = param_1->_flags & 0x20;\n  if (uVar2 != 0) {\n    *DAT_000d16fc = 5;\n  }\n  uVar2 = (uint)(uVar2 != 0);\n  if (*(FILE **)PTR_stdin_000d0fac != param_1) {\n    uVar1 = fclose(param_1);\n    uVar2 = uVar2 | uVar1;\n  }\n  return CONCAT44(param_3,uVar2);\n}\n\n" comment (function_definition "undefined8 __regparm3 FUN_000a7a5d(FILE *param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  uint uVar1;\n  uint uVar2;\n  \n  uVar2 = param_1->_flags & 0x20;\n  if (uVar2 != 0) {\n    *DAT_000d16fc = 5;\n  }\n  uVar2 = (uint)(uVar2 != 0);\n  if (*(FILE **)PTR_stdin_000d0fac != param_1) {\n    uVar1 = fclose(param_1);\n    uVar2 = uVar2 | uVar1;\n  }\n  return CONCAT44(param_3,uVar2);\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_000a7a5d(FILE *param_1,undefined4 param_2,undefined4 param_3)" identifier (parameter_list "(FILE *param_1,undefined4 param_2,undefined4 param_3)" ( (parameter_declaration "FILE *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  uint uVar2;\n  \n  uVar2 = param_1->_flags & 0x20;\n  if (uVar2 != 0) {\n    *DAT_000d16fc = 5;\n  }\n  uVar2 = (uint)(uVar2 != 0);\n  if (*(FILE **)PTR_stdin_000d0fac != param_1) {\n    uVar1 = fclose(param_1);\n    uVar2 = uVar2 | uVar1;\n  }\n  return CONCAT44(param_3,uVar2);\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (expression_statement "uVar2 = param_1->_flags & 0x20;" (assignment_expression "uVar2 = param_1->_flags & 0x20" identifier = (binary_expression "param_1->_flags & 0x20" (field_expression "param_1->_flags" identifier -> field_identifier) & number_literal)) ;) (if_statement "if (uVar2 != 0) {\n    *DAT_000d16fc = 5;\n  }" if (parenthesized_expression "(uVar2 != 0)" ( (binary_expression "uVar2 != 0" identifier != number_literal) )) (compound_statement "{\n    *DAT_000d16fc = 5;\n  }" { (expression_statement "*DAT_000d16fc = 5;" (assignment_expression "*DAT_000d16fc = 5" (pointer_expression "*DAT_000d16fc" * identifier) = number_literal) ;) })) (expression_statement "uVar2 = (uint)(uVar2 != 0);" (assignment_expression "uVar2 = (uint)(uVar2 != 0)" identifier = (call_expression "(uint)(uVar2 != 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(uVar2 != 0)" ( (binary_expression "uVar2 != 0" identifier != number_literal) )))) ;) (if_statement "if (*(FILE **)PTR_stdin_000d0fac != param_1) {\n    uVar1 = fclose(param_1);\n    uVar2 = uVar2 | uVar1;\n  }" if (parenthesized_expression "(*(FILE **)PTR_stdin_000d0fac != param_1)" ( (binary_expression "*(FILE **)PTR_stdin_000d0fac != param_1" (pointer_expression "*(FILE **)PTR_stdin_000d0fac" * (cast_expression "(FILE **)PTR_stdin_000d0fac" ( (type_descriptor "FILE **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) != identifier) )) (compound_statement "{\n    uVar1 = fclose(param_1);\n    uVar2 = uVar2 | uVar1;\n  }" { (expression_statement "uVar1 = fclose(param_1);" (assignment_expression "uVar1 = fclose(param_1)" identifier = (call_expression "fclose(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "uVar2 = uVar2 | uVar1;" (assignment_expression "uVar2 = uVar2 | uVar1" identifier = (binary_expression "uVar2 | uVar1" identifier | identifier)) ;) })) (return_statement "return CONCAT44(param_3,uVar2);" return (call_expression "CONCAT44(param_3,uVar2)" identifier (argument_list "(param_3,uVar2)" ( identifier , identifier ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint fclose_if_not_stdin(FILE *f)\n\n{\n}\n\n" comment (function_definition "int fclose_if_not_stdin(FILE *f)\n\n{\n}" primitive_type (function_declarator "fclose_if_not_stdin(FILE *f)" identifier (parameter_list "(FILE *f)" ( (parameter_declaration "FILE *f" type_identifier (pointer_declarator "*f" * identifier)) ))) (compound_statement "{\n}" { })))
(translation_unit "undefined8 __regparm3 FUN_000a7a5d(FILE *param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  uint uVar1;\n  uint uVar2;\n  \n  uVar2 = param_1->_flags & 0x20;\n  if (uVar2 != 0) {\n    *DAT_000d16fc = 5;\n  }\n  uVar2 = (uint)(uVar2 != 0);\n  if (*(FILE **)PTR_stdin_000d0fac != param_1) {\n    uVar1 = fclose(param_1);\n    uVar2 = uVar2 | uVar1;\n  }\n  return CONCAT44(param_3,uVar2);\n}\n\n" (function_definition "undefined8 __regparm3 FUN_000a7a5d(FILE *param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  uint uVar1;\n  uint uVar2;\n  \n  uVar2 = param_1->_flags & 0x20;\n  if (uVar2 != 0) {\n    *DAT_000d16fc = 5;\n  }\n  uVar2 = (uint)(uVar2 != 0);\n  if (*(FILE **)PTR_stdin_000d0fac != param_1) {\n    uVar1 = fclose(param_1);\n    uVar2 = uVar2 | uVar1;\n  }\n  return CONCAT44(param_3,uVar2);\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_000a7a5d(FILE *param_1,undefined4 param_2,undefined4 param_3)" identifier (parameter_list "(FILE *param_1,undefined4 param_2,undefined4 param_3)" ( (parameter_declaration "FILE *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  uint uVar2;\n  \n  uVar2 = param_1->_flags & 0x20;\n  if (uVar2 != 0) {\n    *DAT_000d16fc = 5;\n  }\n  uVar2 = (uint)(uVar2 != 0);\n  if (*(FILE **)PTR_stdin_000d0fac != param_1) {\n    uVar1 = fclose(param_1);\n    uVar2 = uVar2 | uVar1;\n  }\n  return CONCAT44(param_3,uVar2);\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (expression_statement "uVar2 = param_1->_flags & 0x20;" (assignment_expression "uVar2 = param_1->_flags & 0x20" identifier = (binary_expression "param_1->_flags & 0x20" (field_expression "param_1->_flags" identifier -> field_identifier) & number_literal)) ;) (if_statement "if (uVar2 != 0) {\n    *DAT_000d16fc = 5;\n  }" if (parenthesized_expression "(uVar2 != 0)" ( (binary_expression "uVar2 != 0" identifier != number_literal) )) (compound_statement "{\n    *DAT_000d16fc = 5;\n  }" { (expression_statement "*DAT_000d16fc = 5;" (assignment_expression "*DAT_000d16fc = 5" (pointer_expression "*DAT_000d16fc" * identifier) = number_literal) ;) })) (expression_statement "uVar2 = (uint)(uVar2 != 0);" (assignment_expression "uVar2 = (uint)(uVar2 != 0)" identifier = (call_expression "(uint)(uVar2 != 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(uVar2 != 0)" ( (binary_expression "uVar2 != 0" identifier != number_literal) )))) ;) (if_statement "if (*(FILE **)PTR_stdin_000d0fac != param_1) {\n    uVar1 = fclose(param_1);\n    uVar2 = uVar2 | uVar1;\n  }" if (parenthesized_expression "(*(FILE **)PTR_stdin_000d0fac != param_1)" ( (binary_expression "*(FILE **)PTR_stdin_000d0fac != param_1" (pointer_expression "*(FILE **)PTR_stdin_000d0fac" * (cast_expression "(FILE **)PTR_stdin_000d0fac" ( (type_descriptor "FILE **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) != identifier) )) (compound_statement "{\n    uVar1 = fclose(param_1);\n    uVar2 = uVar2 | uVar1;\n  }" { (expression_statement "uVar1 = fclose(param_1);" (assignment_expression "uVar1 = fclose(param_1)" identifier = (call_expression "fclose(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "uVar2 = uVar2 | uVar1;" (assignment_expression "uVar2 = uVar2 | uVar1" identifier = (binary_expression "uVar2 | uVar1" identifier | identifier)) ;) })) (return_statement "return CONCAT44(param_3,uVar2);" return (call_expression "CONCAT44(param_3,uVar2)" identifier (argument_list "(param_3,uVar2)" ( identifier , identifier ))) ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (binary_expression (field_expression IDENT -> field_identifier) & LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) })) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT != LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) IDENT)) != IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT | IDENT)) ;) })) (return_statement return (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) })))
(function_definition "undefined8 __regparm3 FUN_000a7a5d(FILE *param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  uint uVar1;\n  uint uVar2;\n  \n  uVar2 = param_1->_flags & 0x20;\n  if (uVar2 != 0) {\n    *DAT_000d16fc = 5;\n  }\n  uVar2 = (uint)(uVar2 != 0);\n  if (*(FILE **)PTR_stdin_000d0fac != param_1) {\n    uVar1 = fclose(param_1);\n    uVar2 = uVar2 | uVar1;\n  }\n  return CONCAT44(param_3,uVar2);\n}" (type_identifier "undefined8") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_000a7a5d(FILE *param_1,undefined4 param_2,undefined4 param_3)" (identifier "FUN_000a7a5d") (parameter_list "(FILE *param_1,undefined4 param_2,undefined4 param_3)" (( "(") (parameter_declaration "FILE *param_1" (type_identifier "FILE") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) () ")"))) (compound_statement "{\n  uint uVar1;\n  uint uVar2;\n  \n  uVar2 = param_1->_flags & 0x20;\n  if (uVar2 != 0) {\n    *DAT_000d16fc = 5;\n  }\n  uVar2 = (uint)(uVar2 != 0);\n  if (*(FILE **)PTR_stdin_000d0fac != param_1) {\n    uVar1 = fclose(param_1);\n    uVar2 = uVar2 | uVar1;\n  }\n  return CONCAT44(param_3,uVar2);\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (expression_statement "uVar2 = param_1->_flags & 0x20;" (assignment_expression "uVar2 = param_1->_flags & 0x20" (identifier "uVar2") (= "=") (binary_expression "param_1->_flags & 0x20" (field_expression "param_1->_flags" (identifier "param_1") (-> "->") (field_identifier "_flags")) (& "&") (number_literal "0x20"))) (; ";")) (if_statement "if (uVar2 != 0) {\n    *DAT_000d16fc = 5;\n  }" (if "if") (parenthesized_expression "(uVar2 != 0)" (( "(") (binary_expression "uVar2 != 0" (identifier "uVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    *DAT_000d16fc = 5;\n  }" ({ "{") (expression_statement "*DAT_000d16fc = 5;" (assignment_expression "*DAT_000d16fc = 5" (pointer_expression "*DAT_000d16fc" (* "*") (identifier "DAT_000d16fc")) (= "=") (number_literal "5")) (; ";")) (} "}"))) (expression_statement "uVar2 = (uint)(uVar2 != 0);" (assignment_expression "uVar2 = (uint)(uVar2 != 0)" (identifier "uVar2") (= "=") (call_expression "(uint)(uVar2 != 0)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(uVar2 != 0)" (( "(") (binary_expression "uVar2 != 0" (identifier "uVar2") (!= "!=") (number_literal "0")) () ")")))) (; ";")) (if_statement "if (*(FILE **)PTR_stdin_000d0fac != param_1) {\n    uVar1 = fclose(param_1);\n    uVar2 = uVar2 | uVar1;\n  }" (if "if") (parenthesized_expression "(*(FILE **)PTR_stdin_000d0fac != param_1)" (( "(") (binary_expression "*(FILE **)PTR_stdin_000d0fac != param_1" (pointer_expression "*(FILE **)PTR_stdin_000d0fac" (* "*") (cast_expression "(FILE **)PTR_stdin_000d0fac" (( "(") (type_descriptor "FILE **" (type_identifier "FILE") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (identifier "PTR_stdin_000d0fac"))) (!= "!=") (identifier "param_1")) () ")")) (compound_statement "{\n    uVar1 = fclose(param_1);\n    uVar2 = uVar2 | uVar1;\n  }" ({ "{") (expression_statement "uVar1 = fclose(param_1);" (assignment_expression "uVar1 = fclose(param_1)" (identifier "uVar1") (= "=") (call_expression "fclose(param_1)" (identifier "fclose") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (expression_statement "uVar2 = uVar2 | uVar1;" (assignment_expression "uVar2 = uVar2 | uVar1" (identifier "uVar2") (= "=") (binary_expression "uVar2 | uVar1" (identifier "uVar2") (| "|") (identifier "uVar1"))) (; ";")) (} "}"))) (return_statement "return CONCAT44(param_3,uVar2);" (return "return") (call_expression "CONCAT44(param_3,uVar2)" (identifier "CONCAT44") (argument_list "(param_3,uVar2)" (( "(") (identifier "param_3") (, ",") (identifier "uVar2") () ")"))) (; ";")) (} "}")))

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

int function_1(type_1 *f)

{
}


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

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

undefined8 __regparm3 MASKED(FILE *param_1,undefined4 param_2,undefined4 param_3)

{
  uint uVar1;
  uint uVar2;
  
  uVar2 = param_1->_flags & 0x20;
  if (uVar2 != 0) {
    *DAT_000d16fc = 5;
  }
  uVar2 = (uint)(uVar2 != 0);
  if (*(FILE **)PTR_stdin_000d0fac != param_1) {
    uVar1 = fclose(param_1);
    uVar2 = uVar2 | uVar1;
  }
  return CONCAT44(param_3,uVar2);
}

