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

void log_free(void *handle)

{
                    /* WARNING: Load size is inaccurate */
  if (*handle != (FILE *)0x0) {
    fclose(*handle);
    *(undefined4 *)handle = 0;
  }
  *(undefined4 *)((int)handle + 4) = 0;
  bufchain_clear((bufchain *)((int)handle + 8));
  if (*(Filename **)((int)handle + 0x14) != (Filename *)0x0) {
    filename_free(*(Filename **)((int)handle + 0x14));
  }
  conf_free(*(Conf **)((int)handle + 0x1c));
  safefree(handle);
  return;
}



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

void FUN_0002a760(undefined4 *param_1)

{
  if ((FILE *)*param_1 != (FILE *)0x0) {
    fclose((FILE *)*param_1);
    *param_1 = 0;
  }
  param_1[1] = 0;
  FUN_0002d000(param_1 + 2);
  if (param_1[5] != 0) {
    FUN_0005ee80(param_1[5]);
  }
  FUN_0001e8e0(param_1[7]);
  FUN_0002da80(param_1);
  return;
}


PUSH ESI
PUSH EBX
CALL 0x0001b410
ADD EBX,0x8603d
SUB ESP,0x4
MOV ESI,dword ptr [ESP + 0x10]
MOV EAX,dword ptr [ESI]
TEST EAX,EAX
JZ 0x0002a78c
SUB ESP,0xc
PUSH EAX
CALL 0x0001acd0
MOV dword ptr [ESI],0x0
ADD ESP,0x10
SUB ESP,0xc
LEA EAX,[ESI + 0x8]
MOV dword ptr [ESI + 0x4],0x0
PUSH EAX
CALL 0x0002d000
MOV EAX,dword ptr [ESI + 0x14]
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0002a7b5
SUB ESP,0xc
PUSH EAX
CALL 0x0005ee80
ADD ESP,0x10
SUB ESP,0xc
PUSH dword ptr [ESI + 0x1c]
CALL 0x0001e8e0
MOV dword ptr [ESP],ESI
CALL 0x0002da80
ADD ESP,0x14
POP EBX
POP ESI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_0002a760(undefined4 *param_1)\n\n{\n  if ((FILE *)*param_1 != (FILE *)0x0) {\n    fclose((FILE *)*param_1);\n    *param_1 = 0;\n  }\n  param_1[1] = 0;\n  FUN_0002d000(param_1 + 2);\n  if (param_1[5] != 0) {\n    FUN_0005ee80(param_1[5]);\n  }\n  FUN_0001e8e0(param_1[7]);\n  FUN_0002da80(param_1);\n  return;\n}\n\n" comment (function_definition "void FUN_0002a760(undefined4 *param_1)\n\n{\n  if ((FILE *)*param_1 != (FILE *)0x0) {\n    fclose((FILE *)*param_1);\n    *param_1 = 0;\n  }\n  param_1[1] = 0;\n  FUN_0002d000(param_1 + 2);\n  if (param_1[5] != 0) {\n    FUN_0005ee80(param_1[5]);\n  }\n  FUN_0001e8e0(param_1[7]);\n  FUN_0002da80(param_1);\n  return;\n}" primitive_type (function_declarator "FUN_0002a760(undefined4 *param_1)" identifier (parameter_list "(undefined4 *param_1)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  if ((FILE *)*param_1 != (FILE *)0x0) {\n    fclose((FILE *)*param_1);\n    *param_1 = 0;\n  }\n  param_1[1] = 0;\n  FUN_0002d000(param_1 + 2);\n  if (param_1[5] != 0) {\n    FUN_0005ee80(param_1[5]);\n  }\n  FUN_0001e8e0(param_1[7]);\n  FUN_0002da80(param_1);\n  return;\n}" { (if_statement "if ((FILE *)*param_1 != (FILE *)0x0) {\n    fclose((FILE *)*param_1);\n    *param_1 = 0;\n  }" if (parenthesized_expression "((FILE *)*param_1 != (FILE *)0x0)" ( (binary_expression "(FILE *)*param_1 != (FILE *)0x0" (cast_expression "(FILE *)*param_1" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier)) != (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    fclose((FILE *)*param_1);\n    *param_1 = 0;\n  }" { (expression_statement "fclose((FILE *)*param_1);" (call_expression "fclose((FILE *)*param_1)" identifier (argument_list "((FILE *)*param_1)" ( (cast_expression "(FILE *)*param_1" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier)) ))) ;) (expression_statement "*param_1 = 0;" (assignment_expression "*param_1 = 0" (pointer_expression "*param_1" * identifier) = number_literal) ;) })) (expression_statement "param_1[1] = 0;" (assignment_expression "param_1[1] = 0" (subscript_expression "param_1[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "FUN_0002d000(param_1 + 2);" (call_expression "FUN_0002d000(param_1 + 2)" identifier (argument_list "(param_1 + 2)" ( (binary_expression "param_1 + 2" identifier + number_literal) ))) ;) (if_statement "if (param_1[5] != 0) {\n    FUN_0005ee80(param_1[5]);\n  }" if (parenthesized_expression "(param_1[5] != 0)" ( (binary_expression "param_1[5] != 0" (subscript_expression "param_1[5]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n    FUN_0005ee80(param_1[5]);\n  }" { (expression_statement "FUN_0005ee80(param_1[5]);" (call_expression "FUN_0005ee80(param_1[5])" identifier (argument_list "(param_1[5])" ( (subscript_expression "param_1[5]" identifier [ number_literal ]) ))) ;) })) (expression_statement "FUN_0001e8e0(param_1[7]);" (call_expression "FUN_0001e8e0(param_1[7])" identifier (argument_list "(param_1[7])" ( (subscript_expression "param_1[7]" identifier [ number_literal ]) ))) ;) (expression_statement "FUN_0002da80(param_1);" (call_expression "FUN_0002da80(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/* WARNING: Unknown calling convention */\n\nvoid log_free(void *handle)\n\n{\n                    /* WARNING: Load size is inaccurate */\n  if (*handle != (FILE *)0x0) {\n    fclose(*handle);\n    *(undefined4 *)handle = 0;\n  }\n  *(undefined4 *)((int)handle + 4) = 0;\n  bufchain_clear((bufchain *)((int)handle + 8));\n  if (*(Filename **)((int)handle + 0x14) != (Filename *)0x0) {\n    filename_free(*(Filename **)((int)handle + 0x14));\n  }\n  conf_free(*(Conf **)((int)handle + 0x1c));\n  safefree(handle);\n  return;\n}\n\n" comment comment (function_definition "void log_free(void *handle)\n\n{\n                    /* WARNING: Load size is inaccurate */\n  if (*handle != (FILE *)0x0) {\n    fclose(*handle);\n    *(undefined4 *)handle = 0;\n  }\n  *(undefined4 *)((int)handle + 4) = 0;\n  bufchain_clear((bufchain *)((int)handle + 8));\n  if (*(Filename **)((int)handle + 0x14) != (Filename *)0x0) {\n    filename_free(*(Filename **)((int)handle + 0x14));\n  }\n  conf_free(*(Conf **)((int)handle + 0x1c));\n  safefree(handle);\n  return;\n}" primitive_type (function_declarator "log_free(void *handle)" identifier (parameter_list "(void *handle)" ( (parameter_declaration "void *handle" primitive_type (pointer_declarator "*handle" * identifier)) ))) (compound_statement "{\n                    /* WARNING: Load size is inaccurate */\n  if (*handle != (FILE *)0x0) {\n    fclose(*handle);\n    *(undefined4 *)handle = 0;\n  }\n  *(undefined4 *)((int)handle + 4) = 0;\n  bufchain_clear((bufchain *)((int)handle + 8));\n  if (*(Filename **)((int)handle + 0x14) != (Filename *)0x0) {\n    filename_free(*(Filename **)((int)handle + 0x14));\n  }\n  conf_free(*(Conf **)((int)handle + 0x1c));\n  safefree(handle);\n  return;\n}" { comment (if_statement "if (*handle != (FILE *)0x0) {\n    fclose(*handle);\n    *(undefined4 *)handle = 0;\n  }" if (parenthesized_expression "(*handle != (FILE *)0x0)" ( (binary_expression "*handle != (FILE *)0x0" (pointer_expression "*handle" * identifier) != (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    fclose(*handle);\n    *(undefined4 *)handle = 0;\n  }" { (expression_statement "fclose(*handle);" (call_expression "fclose(*handle)" identifier (argument_list "(*handle)" ( (pointer_expression "*handle" * identifier) ))) ;) (expression_statement "*(undefined4 *)handle = 0;" (assignment_expression "*(undefined4 *)handle = 0" (pointer_expression "*(undefined4 *)handle" * (cast_expression "(undefined4 *)handle" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = number_literal) ;) })) (expression_statement "*(undefined4 *)((int)handle + 4) = 0;" (assignment_expression "*(undefined4 *)((int)handle + 4) = 0" (pointer_expression "*(undefined4 *)((int)handle + 4)" * (cast_expression "(undefined4 *)((int)handle + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)handle + 4)" ( (binary_expression "(int)handle + 4" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;) (expression_statement "bufchain_clear((bufchain *)((int)handle + 8));" (call_expression "bufchain_clear((bufchain *)((int)handle + 8))" identifier (argument_list "((bufchain *)((int)handle + 8))" ( (cast_expression "(bufchain *)((int)handle + 8)" ( (type_descriptor "bufchain *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)handle + 8)" ( (binary_expression "(int)handle + 8" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))) ))) ;) (if_statement "if (*(Filename **)((int)handle + 0x14) != (Filename *)0x0) {\n    filename_free(*(Filename **)((int)handle + 0x14));\n  }" if (parenthesized_expression "(*(Filename **)((int)handle + 0x14) != (Filename *)0x0)" ( (binary_expression "*(Filename **)((int)handle + 0x14) != (Filename *)0x0" (pointer_expression "*(Filename **)((int)handle + 0x14)" * (cast_expression "(Filename **)((int)handle + 0x14)" ( (type_descriptor "Filename **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)handle + 0x14)" ( (binary_expression "(int)handle + 0x14" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) != (cast_expression "(Filename *)0x0" ( (type_descriptor "Filename *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    filename_free(*(Filename **)((int)handle + 0x14));\n  }" { (expression_statement "filename_free(*(Filename **)((int)handle + 0x14));" (call_expression "filename_free(*(Filename **)((int)handle + 0x14))" identifier (argument_list "(*(Filename **)((int)handle + 0x14))" ( (pointer_expression "*(Filename **)((int)handle + 0x14)" * (cast_expression "(Filename **)((int)handle + 0x14)" ( (type_descriptor "Filename **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)handle + 0x14)" ( (binary_expression "(int)handle + 0x14" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ))) ;) })) (expression_statement "conf_free(*(Conf **)((int)handle + 0x1c));" (call_expression "conf_free(*(Conf **)((int)handle + 0x1c))" identifier (argument_list "(*(Conf **)((int)handle + 0x1c))" ( (pointer_expression "*(Conf **)((int)handle + 0x1c)" * (cast_expression "(Conf **)((int)handle + 0x1c)" ( (type_descriptor "Conf **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)handle + 0x1c)" ( (binary_expression "(int)handle + 0x1c" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ))) ;) (expression_statement "safefree(handle);" (call_expression "safefree(handle)" identifier (argument_list "(handle)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_0002a760(undefined4 *param_1)\n\n{\n  if ((FILE *)*param_1 != (FILE *)0x0) {\n    fclose((FILE *)*param_1);\n    *param_1 = 0;\n  }\n  param_1[1] = 0;\n  FUN_0002d000(param_1 + 2);\n  if (param_1[5] != 0) {\n    FUN_0005ee80(param_1[5]);\n  }\n  FUN_0001e8e0(param_1[7]);\n  FUN_0002da80(param_1);\n  return;\n}\n\n" (function_definition "void FUN_0002a760(undefined4 *param_1)\n\n{\n  if ((FILE *)*param_1 != (FILE *)0x0) {\n    fclose((FILE *)*param_1);\n    *param_1 = 0;\n  }\n  param_1[1] = 0;\n  FUN_0002d000(param_1 + 2);\n  if (param_1[5] != 0) {\n    FUN_0005ee80(param_1[5]);\n  }\n  FUN_0001e8e0(param_1[7]);\n  FUN_0002da80(param_1);\n  return;\n}" primitive_type (function_declarator "FUN_0002a760(undefined4 *param_1)" identifier (parameter_list "(undefined4 *param_1)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  if ((FILE *)*param_1 != (FILE *)0x0) {\n    fclose((FILE *)*param_1);\n    *param_1 = 0;\n  }\n  param_1[1] = 0;\n  FUN_0002d000(param_1 + 2);\n  if (param_1[5] != 0) {\n    FUN_0005ee80(param_1[5]);\n  }\n  FUN_0001e8e0(param_1[7]);\n  FUN_0002da80(param_1);\n  return;\n}" { (if_statement "if ((FILE *)*param_1 != (FILE *)0x0) {\n    fclose((FILE *)*param_1);\n    *param_1 = 0;\n  }" if (parenthesized_expression "((FILE *)*param_1 != (FILE *)0x0)" ( (binary_expression "(FILE *)*param_1 != (FILE *)0x0" (cast_expression "(FILE *)*param_1" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier)) != (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    fclose((FILE *)*param_1);\n    *param_1 = 0;\n  }" { (expression_statement "fclose((FILE *)*param_1);" (call_expression "fclose((FILE *)*param_1)" identifier (argument_list "((FILE *)*param_1)" ( (cast_expression "(FILE *)*param_1" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier)) ))) ;) (expression_statement "*param_1 = 0;" (assignment_expression "*param_1 = 0" (pointer_expression "*param_1" * identifier) = number_literal) ;) })) (expression_statement "param_1[1] = 0;" (assignment_expression "param_1[1] = 0" (subscript_expression "param_1[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "FUN_0002d000(param_1 + 2);" (call_expression "FUN_0002d000(param_1 + 2)" identifier (argument_list "(param_1 + 2)" ( (binary_expression "param_1 + 2" identifier + number_literal) ))) ;) (if_statement "if (param_1[5] != 0) {\n    FUN_0005ee80(param_1[5]);\n  }" if (parenthesized_expression "(param_1[5] != 0)" ( (binary_expression "param_1[5] != 0" (subscript_expression "param_1[5]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n    FUN_0005ee80(param_1[5]);\n  }" { (expression_statement "FUN_0005ee80(param_1[5]);" (call_expression "FUN_0005ee80(param_1[5])" identifier (argument_list "(param_1[5])" ( (subscript_expression "param_1[5]" identifier [ number_literal ]) ))) ;) })) (expression_statement "FUN_0001e8e0(param_1[7]);" (call_expression "FUN_0001e8e0(param_1[7])" identifier (argument_list "(param_1[7])" ( (subscript_expression "param_1[7]" identifier [ number_literal ]) ))) ;) (expression_statement "FUN_0002da80(param_1);" (call_expression "FUN_0002da80(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT)) != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT)) ))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (subscript_expression IDENT [ LIT ]) ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( (subscript_expression IDENT [ LIT ]) ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return ;) })))
(function_definition "void FUN_0002a760(undefined4 *param_1)\n\n{\n  if ((FILE *)*param_1 != (FILE *)0x0) {\n    fclose((FILE *)*param_1);\n    *param_1 = 0;\n  }\n  param_1[1] = 0;\n  FUN_0002d000(param_1 + 2);\n  if (param_1[5] != 0) {\n    FUN_0005ee80(param_1[5]);\n  }\n  FUN_0001e8e0(param_1[7]);\n  FUN_0002da80(param_1);\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0002a760(undefined4 *param_1)" (identifier "FUN_0002a760") (parameter_list "(undefined4 *param_1)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  if ((FILE *)*param_1 != (FILE *)0x0) {\n    fclose((FILE *)*param_1);\n    *param_1 = 0;\n  }\n  param_1[1] = 0;\n  FUN_0002d000(param_1 + 2);\n  if (param_1[5] != 0) {\n    FUN_0005ee80(param_1[5]);\n  }\n  FUN_0001e8e0(param_1[7]);\n  FUN_0002da80(param_1);\n  return;\n}" ({ "{") (if_statement "if ((FILE *)*param_1 != (FILE *)0x0) {\n    fclose((FILE *)*param_1);\n    *param_1 = 0;\n  }" (if "if") (parenthesized_expression "((FILE *)*param_1 != (FILE *)0x0)" (( "(") (binary_expression "(FILE *)*param_1 != (FILE *)0x0" (cast_expression "(FILE *)*param_1" (( "(") (type_descriptor "FILE *" (type_identifier "FILE") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (!= "!=") (cast_expression "(FILE *)0x0" (( "(") (type_descriptor "FILE *" (type_identifier "FILE") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    fclose((FILE *)*param_1);\n    *param_1 = 0;\n  }" ({ "{") (expression_statement "fclose((FILE *)*param_1);" (call_expression "fclose((FILE *)*param_1)" (identifier "fclose") (argument_list "((FILE *)*param_1)" (( "(") (cast_expression "(FILE *)*param_1" (( "(") (type_descriptor "FILE *" (type_identifier "FILE") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) () ")"))) (; ";")) (expression_statement "*param_1 = 0;" (assignment_expression "*param_1 = 0" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (number_literal "0")) (; ";")) (} "}"))) (expression_statement "param_1[1] = 0;" (assignment_expression "param_1[1] = 0" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "FUN_0002d000(param_1 + 2);" (call_expression "FUN_0002d000(param_1 + 2)" (identifier "FUN_0002d000") (argument_list "(param_1 + 2)" (( "(") (binary_expression "param_1 + 2" (identifier "param_1") (+ "+") (number_literal "2")) () ")"))) (; ";")) (if_statement "if (param_1[5] != 0) {\n    FUN_0005ee80(param_1[5]);\n  }" (if "if") (parenthesized_expression "(param_1[5] != 0)" (( "(") (binary_expression "param_1[5] != 0" (subscript_expression "param_1[5]" (identifier "param_1") ([ "[") (number_literal "5") (] "]")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    FUN_0005ee80(param_1[5]);\n  }" ({ "{") (expression_statement "FUN_0005ee80(param_1[5]);" (call_expression "FUN_0005ee80(param_1[5])" (identifier "FUN_0005ee80") (argument_list "(param_1[5])" (( "(") (subscript_expression "param_1[5]" (identifier "param_1") ([ "[") (number_literal "5") (] "]")) () ")"))) (; ";")) (} "}"))) (expression_statement "FUN_0001e8e0(param_1[7]);" (call_expression "FUN_0001e8e0(param_1[7])" (identifier "FUN_0001e8e0") (argument_list "(param_1[7])" (( "(") (subscript_expression "param_1[7]" (identifier "param_1") ([ "[") (number_literal "7") (] "]")) () ")"))) (; ";")) (expression_statement "FUN_0002da80(param_1);" (call_expression "FUN_0002da80(param_1)" (identifier "FUN_0002da80") (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 */
/* WARNING: Unknown calling convention */

void function_1(void *handle)

{
                    /* WARNING: Load size is inaccurate */
  if (*handle != (type_1 *)0x0) {
    var_1(*handle);
    *(type_2 *)handle = 0;
  }
  *(type_2 *)((int)handle + 4) = 0;
  var_2((type_3 *)((int)handle + 8));
  if (*(type_4 **)((int)handle + 0x14) != (type_4 *)0x0) {
    var_3(*(type_4 **)((int)handle + 0x14));
  }
  var_4(*(type_5 **)((int)handle + 0x1c));
  var_5(handle);
  return;
}


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

{
  if ((FILE *)*param_1 != (FILE *)0x0) {
    fclose((FILE *)*param_1);
    *param_1 = 0;
  }
  param_1[1] = 0;
  FUN_0002d000(param_1 + 2);
  if (param_1[5] != 0) {
    FUN_0005ee80(param_1[5]);
  }
  FUN_0001e8e0(param_1[7]);
  FUN_0002da80(param_1);
  return;
}

