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

int key_type(Filename *filename)

{
  FILE *__stream;
  int iVar1;
  
  iVar1 = 0;
  __stream = (FILE *)f_open(filename,"r",0);
  if (__stream != (FILE *)0x0) {
    iVar1 = key_type_fp((FILE *)__stream);
    fclose(__stream);
  }
  return iVar1;
}



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

undefined4 FUN_000423e0(undefined4 param_1)

{
  FILE *__stream;
  undefined4 uVar1;
  
  uVar1 = 0;
  __stream = (FILE *)FUN_00051f30(param_1,"r",0);
  if (__stream != (FILE *)0x0) {
    uVar1 = FUN_0003f4f0();
    fclose(__stream);
  }
  return uVar1;
}


PUSH EDI
XOR EDI,EDI
PUSH ESI
PUSH EBX
CALL 0x00015340
ADD EBX,0x428fe
SUB ESP,0x4
PUSH 0x0
LEA EAX,[EBX + 0xfffda9dd]
PUSH EAX
PUSH dword ptr [ESP + 0x1c]
CALL 0x00051f30
ADD ESP,0x10
TEST EAX,EAX
JZ 0x00042421
MOV ESI,EAX
CALL 0x0003f4f0
SUB ESP,0xc
PUSH ESI
MOV EDI,EAX
CALL 0x00014a50
ADD ESP,0x10
MOV EAX,EDI
POP EBX
POP ESI
POP EDI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 FUN_000423e0(undefined4 param_1)\n\n{\n  FILE *__stream;\n  undefined4 uVar1;\n  \n  uVar1 = 0;\n  __stream = (FILE *)FUN_00051f30(param_1,"r",0);\n  if (__stream != (FILE *)0x0) {\n    uVar1 = FUN_0003f4f0();\n    fclose(__stream);\n  }\n  return uVar1;\n}\n\n" comment (function_definition "undefined4 FUN_000423e0(undefined4 param_1)\n\n{\n  FILE *__stream;\n  undefined4 uVar1;\n  \n  uVar1 = 0;\n  __stream = (FILE *)FUN_00051f30(param_1,"r",0);\n  if (__stream != (FILE *)0x0) {\n    uVar1 = FUN_0003f4f0();\n    fclose(__stream);\n  }\n  return uVar1;\n}" type_identifier (function_declarator "FUN_000423e0(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  FILE *__stream;\n  undefined4 uVar1;\n  \n  uVar1 = 0;\n  __stream = (FILE *)FUN_00051f30(param_1,"r",0);\n  if (__stream != (FILE *)0x0) {\n    uVar1 = FUN_0003f4f0();\n    fclose(__stream);\n  }\n  return uVar1;\n}" { (declaration "FILE *__stream;" type_identifier (pointer_declarator "*__stream" * identifier) ;) (declaration "undefined4 uVar1;" type_identifier identifier ;) (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" identifier = number_literal) ;) (expression_statement "__stream = (FILE *)FUN_00051f30(param_1,"r",0);" (assignment_expression "__stream = (FILE *)FUN_00051f30(param_1,"r",0)" identifier = (cast_expression "(FILE *)FUN_00051f30(param_1,"r",0)" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00051f30(param_1,"r",0)" identifier (argument_list "(param_1,"r",0)" ( identifier , (string_literal ""r"" " string_content ") , number_literal ))))) ;) (if_statement "if (__stream != (FILE *)0x0) {\n    uVar1 = FUN_0003f4f0();\n    fclose(__stream);\n  }" if (parenthesized_expression "(__stream != (FILE *)0x0)" ( (binary_expression "__stream != (FILE *)0x0" identifier != (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    uVar1 = FUN_0003f4f0();\n    fclose(__stream);\n  }" { (expression_statement "uVar1 = FUN_0003f4f0();" (assignment_expression "uVar1 = FUN_0003f4f0()" identifier = (call_expression "FUN_0003f4f0()" identifier (argument_list "()" ( )))) ;) (expression_statement "fclose(__stream);" (call_expression "fclose(__stream)" identifier (argument_list "(__stream)" ( identifier ))) ;) })) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nint key_type(Filename *filename)\n\n{\n  FILE *__stream;\n  int iVar1;\n  \n  iVar1 = 0;\n  __stream = (FILE *)f_open(filename,"r",0);\n  if (__stream != (FILE *)0x0) {\n    iVar1 = key_type_fp((FILE *)__stream);\n    fclose(__stream);\n  }\n  return iVar1;\n}\n\n" comment comment (function_definition "int key_type(Filename *filename)\n\n{\n  FILE *__stream;\n  int iVar1;\n  \n  iVar1 = 0;\n  __stream = (FILE *)f_open(filename,"r",0);\n  if (__stream != (FILE *)0x0) {\n    iVar1 = key_type_fp((FILE *)__stream);\n    fclose(__stream);\n  }\n  return iVar1;\n}" primitive_type (function_declarator "key_type(Filename *filename)" identifier (parameter_list "(Filename *filename)" ( (parameter_declaration "Filename *filename" type_identifier (pointer_declarator "*filename" * identifier)) ))) (compound_statement "{\n  FILE *__stream;\n  int iVar1;\n  \n  iVar1 = 0;\n  __stream = (FILE *)f_open(filename,"r",0);\n  if (__stream != (FILE *)0x0) {\n    iVar1 = key_type_fp((FILE *)__stream);\n    fclose(__stream);\n  }\n  return iVar1;\n}" { (declaration "FILE *__stream;" type_identifier (pointer_declarator "*__stream" * identifier) ;) (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) (expression_statement "__stream = (FILE *)f_open(filename,"r",0);" (assignment_expression "__stream = (FILE *)f_open(filename,"r",0)" identifier = (cast_expression "(FILE *)f_open(filename,"r",0)" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "f_open(filename,"r",0)" identifier (argument_list "(filename,"r",0)" ( identifier , (string_literal ""r"" " string_content ") , number_literal ))))) ;) (if_statement "if (__stream != (FILE *)0x0) {\n    iVar1 = key_type_fp((FILE *)__stream);\n    fclose(__stream);\n  }" if (parenthesized_expression "(__stream != (FILE *)0x0)" ( (binary_expression "__stream != (FILE *)0x0" identifier != (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar1 = key_type_fp((FILE *)__stream);\n    fclose(__stream);\n  }" { (expression_statement "iVar1 = key_type_fp((FILE *)__stream);" (assignment_expression "iVar1 = key_type_fp((FILE *)__stream)" identifier = (call_expression "key_type_fp((FILE *)__stream)" identifier (argument_list "((FILE *)__stream)" ( (cast_expression "(FILE *)__stream" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (expression_statement "fclose(__stream);" (call_expression "fclose(__stream)" identifier (argument_list "(__stream)" ( identifier ))) ;) })) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "undefined4 FUN_000423e0(undefined4 param_1)\n\n{\n  FILE *__stream;\n  undefined4 uVar1;\n  \n  uVar1 = 0;\n  __stream = (FILE *)FUN_00051f30(param_1,"r",0);\n  if (__stream != (FILE *)0x0) {\n    uVar1 = FUN_0003f4f0();\n    fclose(__stream);\n  }\n  return uVar1;\n}\n\n" (function_definition "undefined4 FUN_000423e0(undefined4 param_1)\n\n{\n  FILE *__stream;\n  undefined4 uVar1;\n  \n  uVar1 = 0;\n  __stream = (FILE *)FUN_00051f30(param_1,"r",0);\n  if (__stream != (FILE *)0x0) {\n    uVar1 = FUN_0003f4f0();\n    fclose(__stream);\n  }\n  return uVar1;\n}" type_identifier (function_declarator "FUN_000423e0(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  FILE *__stream;\n  undefined4 uVar1;\n  \n  uVar1 = 0;\n  __stream = (FILE *)FUN_00051f30(param_1,"r",0);\n  if (__stream != (FILE *)0x0) {\n    uVar1 = FUN_0003f4f0();\n    fclose(__stream);\n  }\n  return uVar1;\n}" { (declaration "FILE *__stream;" type_identifier (pointer_declarator "*__stream" * identifier) ;) (declaration "undefined4 uVar1;" type_identifier identifier ;) (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" identifier = number_literal) ;) (expression_statement "__stream = (FILE *)FUN_00051f30(param_1,"r",0);" (assignment_expression "__stream = (FILE *)FUN_00051f30(param_1,"r",0)" identifier = (cast_expression "(FILE *)FUN_00051f30(param_1,"r",0)" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00051f30(param_1,"r",0)" identifier (argument_list "(param_1,"r",0)" ( identifier , (string_literal ""r"" " string_content ") , number_literal ))))) ;) (if_statement "if (__stream != (FILE *)0x0) {\n    uVar1 = FUN_0003f4f0();\n    fclose(__stream);\n  }" if (parenthesized_expression "(__stream != (FILE *)0x0)" ( (binary_expression "__stream != (FILE *)0x0" identifier != (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    uVar1 = FUN_0003f4f0();\n    fclose(__stream);\n  }" { (expression_statement "uVar1 = FUN_0003f4f0();" (assignment_expression "uVar1 = FUN_0003f4f0()" identifier = (call_expression "FUN_0003f4f0()" identifier (argument_list "()" ( )))) ;) (expression_statement "fclose(__stream);" (call_expression "fclose(__stream)" identifier (argument_list "(__stream)" ( identifier ))) ;) })) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") , LIT ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (return_statement return IDENT ;) })))
(function_definition "undefined4 FUN_000423e0(undefined4 param_1)\n\n{\n  FILE *__stream;\n  undefined4 uVar1;\n  \n  uVar1 = 0;\n  __stream = (FILE *)FUN_00051f30(param_1,"r",0);\n  if (__stream != (FILE *)0x0) {\n    uVar1 = FUN_0003f4f0();\n    fclose(__stream);\n  }\n  return uVar1;\n}" (type_identifier "undefined4") (function_declarator "FUN_000423e0(undefined4 param_1)" (identifier "FUN_000423e0") (parameter_list "(undefined4 param_1)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) () ")"))) (compound_statement "{\n  FILE *__stream;\n  undefined4 uVar1;\n  \n  uVar1 = 0;\n  __stream = (FILE *)FUN_00051f30(param_1,"r",0);\n  if (__stream != (FILE *)0x0) {\n    uVar1 = FUN_0003f4f0();\n    fclose(__stream);\n  }\n  return uVar1;\n}" ({ "{") (declaration "FILE *__stream;" (type_identifier "FILE") (pointer_declarator "*__stream" (* "*") (identifier "__stream")) (; ";")) (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" (identifier "uVar1") (= "=") (number_literal "0")) (; ";")) (expression_statement "__stream = (FILE *)FUN_00051f30(param_1,"r",0);" (assignment_expression "__stream = (FILE *)FUN_00051f30(param_1,"r",0)" (identifier "__stream") (= "=") (cast_expression "(FILE *)FUN_00051f30(param_1,"r",0)" (( "(") (type_descriptor "FILE *" (type_identifier "FILE") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00051f30(param_1,"r",0)" (identifier "FUN_00051f30") (argument_list "(param_1,"r",0)" (( "(") (identifier "param_1") (, ",") (string_literal ""r"" (" """) (string_content "r") (" """)) (, ",") (number_literal "0") () ")"))))) (; ";")) (if_statement "if (__stream != (FILE *)0x0) {\n    uVar1 = FUN_0003f4f0();\n    fclose(__stream);\n  }" (if "if") (parenthesized_expression "(__stream != (FILE *)0x0)" (( "(") (binary_expression "__stream != (FILE *)0x0" (identifier "__stream") (!= "!=") (cast_expression "(FILE *)0x0" (( "(") (type_descriptor "FILE *" (type_identifier "FILE") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    uVar1 = FUN_0003f4f0();\n    fclose(__stream);\n  }" ({ "{") (expression_statement "uVar1 = FUN_0003f4f0();" (assignment_expression "uVar1 = FUN_0003f4f0()" (identifier "uVar1") (= "=") (call_expression "FUN_0003f4f0()" (identifier "FUN_0003f4f0") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "fclose(__stream);" (call_expression "fclose(__stream)" (identifier "fclose") (argument_list "(__stream)" (( "(") (identifier "__stream") () ")"))) (; ";")) (} "}"))) (return_statement "return uVar1;" (return "return") (identifier "uVar1") (; ";")) (} "}")))

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

int function_1(type_1 *filename)

{
  type_2 *var_2;
  int iVar1;
  
  iVar1 = 0;
  var_2 = (type_2 *)var_1(filename,"r",0);
  if (var_2 != (type_2 *)0x0) {
    iVar1 = var_3((type_2 *)var_2);
    var_4(var_2);
  }
  return iVar1;
}


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

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

undefined4 MASKED(undefined4 param_1)

{
  FILE *__stream;
  undefined4 uVar1;
  
  uVar1 = 0;
  __stream = (FILE *)FUN_00051f30(param_1,"r",0);
  if (__stream != (FILE *)0x0) {
    uVar1 = FUN_0003f4f0();
    fclose(__stream);
  }
  return uVar1;
}

