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

void __regparm3 close_file(Filedata *filedata)

{
  if (filedata != (Filedata *)0x0) {
    if ((FILE *)filedata->handle != (FILE *)0x0) {
      fclose((FILE *)filedata->handle);
    }
    free(filedata);
  }
  return;
}



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

void __regparm3 FUN_0001e670(void *param_1)

{
  if (param_1 != (void *)0x0) {
    if (*(FILE **)((int)param_1 + 4) != (FILE *)0x0) {
      fclose(*(FILE **)((int)param_1 + 4));
    }
    free(param_1);
  }
  return;
}


PUSH ESI
PUSH EBX
CALL 0x00013f70
ADD EBX,0x95989
SUB ESP,0x4
TEST EAX,EAX
JZ 0x0001e6a5
MOV ESI,EAX
MOV EAX,dword ptr [EAX + 0x4]
TEST EAX,EAX
JZ 0x0001e699
SUB ESP,0xc
PUSH EAX
CALL 0x000130e0
ADD ESP,0x10
SUB ESP,0xc
PUSH ESI
CALL 0x000130a0
ADD ESP,0x10
ADD ESP,0x4
POP EBX
POP ESI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 FUN_0001e670(void *param_1)\n\n{\n  if (param_1 != (void *)0x0) {\n    if (*(FILE **)((int)param_1 + 4) != (FILE *)0x0) {\n      fclose(*(FILE **)((int)param_1 + 4));\n    }\n    free(param_1);\n  }\n  return;\n}\n\n" comment (function_definition "void __regparm3 FUN_0001e670(void *param_1)\n\n{\n  if (param_1 != (void *)0x0) {\n    if (*(FILE **)((int)param_1 + 4) != (FILE *)0x0) {\n      fclose(*(FILE **)((int)param_1 + 4));\n    }\n    free(param_1);\n  }\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0001e670(void *param_1)" identifier (parameter_list "(void *param_1)" ( (parameter_declaration "void *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  if (param_1 != (void *)0x0) {\n    if (*(FILE **)((int)param_1 + 4) != (FILE *)0x0) {\n      fclose(*(FILE **)((int)param_1 + 4));\n    }\n    free(param_1);\n  }\n  return;\n}" { (if_statement "if (param_1 != (void *)0x0) {\n    if (*(FILE **)((int)param_1 + 4) != (FILE *)0x0) {\n      fclose(*(FILE **)((int)param_1 + 4));\n    }\n    free(param_1);\n  }" if (parenthesized_expression "(param_1 != (void *)0x0)" ( (binary_expression "param_1 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (*(FILE **)((int)param_1 + 4) != (FILE *)0x0) {\n      fclose(*(FILE **)((int)param_1 + 4));\n    }\n    free(param_1);\n  }" { (if_statement "if (*(FILE **)((int)param_1 + 4) != (FILE *)0x0) {\n      fclose(*(FILE **)((int)param_1 + 4));\n    }" if (parenthesized_expression "(*(FILE **)((int)param_1 + 4) != (FILE *)0x0)" ( (binary_expression "*(FILE **)((int)param_1 + 4) != (FILE *)0x0" (pointer_expression "*(FILE **)((int)param_1 + 4)" * (cast_expression "(FILE **)((int)param_1 + 4)" ( (type_descriptor "FILE **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)param_1 + 4)" ( (binary_expression "(int)param_1 + 4" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) != (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      fclose(*(FILE **)((int)param_1 + 4));\n    }" { (expression_statement "fclose(*(FILE **)((int)param_1 + 4));" (call_expression "fclose(*(FILE **)((int)param_1 + 4))" identifier (argument_list "(*(FILE **)((int)param_1 + 4))" ( (pointer_expression "*(FILE **)((int)param_1 + 4)" * (cast_expression "(FILE **)((int)param_1 + 4)" ( (type_descriptor "FILE **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)param_1 + 4)" ( (binary_expression "(int)param_1 + 4" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ))) ;) })) (expression_statement "free(param_1);" (call_expression "free(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 close_file(Filedata *filedata)\n\n{\n  if (filedata != (Filedata *)0x0) {\n    if ((FILE *)filedata->handle != (FILE *)0x0) {\n      fclose((FILE *)filedata->handle);\n    }\n    free(filedata);\n  }\n  return;\n}\n\n" comment (function_definition "void __regparm3 close_file(Filedata *filedata)\n\n{\n  if (filedata != (Filedata *)0x0) {\n    if ((FILE *)filedata->handle != (FILE *)0x0) {\n      fclose((FILE *)filedata->handle);\n    }\n    free(filedata);\n  }\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "close_file(Filedata *filedata)" identifier (parameter_list "(Filedata *filedata)" ( (parameter_declaration "Filedata *filedata" type_identifier (pointer_declarator "*filedata" * identifier)) ))) (compound_statement "{\n  if (filedata != (Filedata *)0x0) {\n    if ((FILE *)filedata->handle != (FILE *)0x0) {\n      fclose((FILE *)filedata->handle);\n    }\n    free(filedata);\n  }\n  return;\n}" { (if_statement "if (filedata != (Filedata *)0x0) {\n    if ((FILE *)filedata->handle != (FILE *)0x0) {\n      fclose((FILE *)filedata->handle);\n    }\n    free(filedata);\n  }" if (parenthesized_expression "(filedata != (Filedata *)0x0)" ( (binary_expression "filedata != (Filedata *)0x0" identifier != (cast_expression "(Filedata *)0x0" ( (type_descriptor "Filedata *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if ((FILE *)filedata->handle != (FILE *)0x0) {\n      fclose((FILE *)filedata->handle);\n    }\n    free(filedata);\n  }" { (if_statement "if ((FILE *)filedata->handle != (FILE *)0x0) {\n      fclose((FILE *)filedata->handle);\n    }" if (parenthesized_expression "((FILE *)filedata->handle != (FILE *)0x0)" ( (binary_expression "(FILE *)filedata->handle != (FILE *)0x0" (cast_expression "(FILE *)filedata->handle" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "filedata->handle" identifier -> field_identifier)) != (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      fclose((FILE *)filedata->handle);\n    }" { (expression_statement "fclose((FILE *)filedata->handle);" (call_expression "fclose((FILE *)filedata->handle)" identifier (argument_list "((FILE *)filedata->handle)" ( (cast_expression "(FILE *)filedata->handle" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "filedata->handle" identifier -> field_identifier)) ))) ;) })) (expression_statement "free(filedata);" (call_expression "free(filedata)" identifier (argument_list "(filedata)" ( identifier ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void __regparm3 FUN_0001e670(void *param_1)\n\n{\n  if (param_1 != (void *)0x0) {\n    if (*(FILE **)((int)param_1 + 4) != (FILE *)0x0) {\n      fclose(*(FILE **)((int)param_1 + 4));\n    }\n    free(param_1);\n  }\n  return;\n}\n\n" (function_definition "void __regparm3 FUN_0001e670(void *param_1)\n\n{\n  if (param_1 != (void *)0x0) {\n    if (*(FILE **)((int)param_1 + 4) != (FILE *)0x0) {\n      fclose(*(FILE **)((int)param_1 + 4));\n    }\n    free(param_1);\n  }\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0001e670(void *param_1)" identifier (parameter_list "(void *param_1)" ( (parameter_declaration "void *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  if (param_1 != (void *)0x0) {\n    if (*(FILE **)((int)param_1 + 4) != (FILE *)0x0) {\n      fclose(*(FILE **)((int)param_1 + 4));\n    }\n    free(param_1);\n  }\n  return;\n}" { (if_statement "if (param_1 != (void *)0x0) {\n    if (*(FILE **)((int)param_1 + 4) != (FILE *)0x0) {\n      fclose(*(FILE **)((int)param_1 + 4));\n    }\n    free(param_1);\n  }" if (parenthesized_expression "(param_1 != (void *)0x0)" ( (binary_expression "param_1 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (*(FILE **)((int)param_1 + 4) != (FILE *)0x0) {\n      fclose(*(FILE **)((int)param_1 + 4));\n    }\n    free(param_1);\n  }" { (if_statement "if (*(FILE **)((int)param_1 + 4) != (FILE *)0x0) {\n      fclose(*(FILE **)((int)param_1 + 4));\n    }" if (parenthesized_expression "(*(FILE **)((int)param_1 + 4) != (FILE *)0x0)" ( (binary_expression "*(FILE **)((int)param_1 + 4) != (FILE *)0x0" (pointer_expression "*(FILE **)((int)param_1 + 4)" * (cast_expression "(FILE **)((int)param_1 + 4)" ( (type_descriptor "FILE **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)param_1 + 4)" ( (binary_expression "(int)param_1 + 4" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) != (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      fclose(*(FILE **)((int)param_1 + 4));\n    }" { (expression_statement "fclose(*(FILE **)((int)param_1 + 4));" (call_expression "fclose(*(FILE **)((int)param_1 + 4))" identifier (argument_list "(*(FILE **)((int)param_1 + 4))" ( (pointer_expression "*(FILE **)((int)param_1 + 4)" * (cast_expression "(FILE **)((int)param_1 + 4)" ( (type_descriptor "FILE **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)param_1 + 4)" ( (binary_expression "(int)param_1 + 4" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ))) ;) })) (expression_statement "free(param_1);" (call_expression "free(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (return_statement return ;) })))
(function_definition "void __regparm3 FUN_0001e670(void *param_1)\n\n{\n  if (param_1 != (void *)0x0) {\n    if (*(FILE **)((int)param_1 + 4) != (FILE *)0x0) {\n      fclose(*(FILE **)((int)param_1 + 4));\n    }\n    free(param_1);\n  }\n  return;\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_0001e670(void *param_1)" (identifier "FUN_0001e670") (parameter_list "(void *param_1)" (( "(") (parameter_declaration "void *param_1" (primitive_type "void") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  if (param_1 != (void *)0x0) {\n    if (*(FILE **)((int)param_1 + 4) != (FILE *)0x0) {\n      fclose(*(FILE **)((int)param_1 + 4));\n    }\n    free(param_1);\n  }\n  return;\n}" ({ "{") (if_statement "if (param_1 != (void *)0x0) {\n    if (*(FILE **)((int)param_1 + 4) != (FILE *)0x0) {\n      fclose(*(FILE **)((int)param_1 + 4));\n    }\n    free(param_1);\n  }" (if "if") (parenthesized_expression "(param_1 != (void *)0x0)" (( "(") (binary_expression "param_1 != (void *)0x0" (identifier "param_1") (!= "!=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    if (*(FILE **)((int)param_1 + 4) != (FILE *)0x0) {\n      fclose(*(FILE **)((int)param_1 + 4));\n    }\n    free(param_1);\n  }" ({ "{") (if_statement "if (*(FILE **)((int)param_1 + 4) != (FILE *)0x0) {\n      fclose(*(FILE **)((int)param_1 + 4));\n    }" (if "if") (parenthesized_expression "(*(FILE **)((int)param_1 + 4) != (FILE *)0x0)" (( "(") (binary_expression "*(FILE **)((int)param_1 + 4) != (FILE *)0x0" (pointer_expression "*(FILE **)((int)param_1 + 4)" (* "*") (cast_expression "(FILE **)((int)param_1 + 4)" (( "(") (type_descriptor "FILE **" (type_identifier "FILE") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "((int)param_1 + 4)" (( "(") (binary_expression "(int)param_1 + 4" (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1")) (+ "+") (number_literal "4")) () ")")))) (!= "!=") (cast_expression "(FILE *)0x0" (( "(") (type_descriptor "FILE *" (type_identifier "FILE") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      fclose(*(FILE **)((int)param_1 + 4));\n    }" ({ "{") (expression_statement "fclose(*(FILE **)((int)param_1 + 4));" (call_expression "fclose(*(FILE **)((int)param_1 + 4))" (identifier "fclose") (argument_list "(*(FILE **)((int)param_1 + 4))" (( "(") (pointer_expression "*(FILE **)((int)param_1 + 4)" (* "*") (cast_expression "(FILE **)((int)param_1 + 4)" (( "(") (type_descriptor "FILE **" (type_identifier "FILE") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "((int)param_1 + 4)" (( "(") (binary_expression "(int)param_1 + 4" (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1")) (+ "+") (number_literal "4")) () ")")))) () ")"))) (; ";")) (} "}"))) (expression_statement "free(param_1);" (call_expression "free(param_1)" (identifier "free") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void __regparm3 function_1(type_1 *var_1)

{
  if (var_1 != (type_1 *)0x0) {
    if ((type_2 *)var_1->handle != (type_2 *)0x0) {
      var_2((type_2 *)var_1->handle);
    }
    var_3(var_1);
  }
  return;
}


(translation_unit (function_definition type: (primitive_type) (ERROR (identifier)) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (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: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))))) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal)))))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))))) (return_statement))))

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

void __regparm3 MASKED(void *param_1)

{
  if (param_1 != (void *)0x0) {
    if (*(FILE **)((int)param_1 + 4) != (FILE *)0x0) {
      fclose(*(FILE **)((int)param_1 + 4));
    }
    free(param_1);
  }
  return;
}

