
/* virtual thunk to std::ifstream::~ifstream() */

void __thiscall std::ifstream::~ifstream(ifstream *this)

{
  ifstream *piVar1;
  
  piVar1 = this + *(long *)(*(long *)this + -0x18);
  *(undefined ***)(piVar1 + 0x100) = &PTR__ifstream_00439698;
  *(undefined ***)piVar1 = &PTR__ifstream_00439670;
  *(undefined ***)(piVar1 + 0x10) = &PTR__filebuf_00439578;
  filebuf::close((filebuf *)(piVar1 + 0x10));
  __basic_file<char>::~__basic_file((__basic_file<char> *)(piVar1 + 0x78));
  *(undefined ***)(piVar1 + 0x10) = &PTR__streambuf_004386a0;
  locale::~locale((locale *)(piVar1 + 0x48));
  *(undefined8 *)(piVar1 + 8) = 0;
  *(undefined **)piVar1 = &DAT_00439600;
  *(undefined ***)(piVar1 + 0x100) = &PTR__ios_00439478;
  ios_base::~ios_base((ios_base *)(piVar1 + 0x100));
  operator_delete(piVar1);
  return;
}



void FUN_00309010(long *param_1)

{
  undefined8 *puVar1;
  
  puVar1 = (undefined8 *)(*(long *)(*param_1 + -0x18) + (long)param_1);
  puVar1[0x20] = &PTR_FUN_00439698;
  *puVar1 = &PTR_FUN_00439670;
  puVar1[2] = &PTR_FUN_00439578;
  FUN_00306c60(puVar1 + 2);
  thunk_FUN_002db2e0(puVar1 + 0xf);
  puVar1[2] = &PTR_FUN_004386a0;
  FUN_002dd1b0(puVar1 + 9);
  puVar1[1] = 0;
  *puVar1 = &DAT_00439600;
  puVar1[0x20] = &PTR_FUN_00439478;
  FUN_00318d20(puVar1 + 0x20);
  FUN_002dac70(puVar1);
  return;
}


PUSH RBX
MOV RAX,qword ptr [RDI]
MOV RBX,qword ptr [RAX + -0x18]
LEA RAX,[0x439658]
ADD RBX,RDI
LEA RDX,[RAX + 0x18]
ADD RAX,0x40
MOV qword ptr [RBX + 0x100],RAX
LEA RAX,[0x439568]
LEA RDI,[RBX + 0x10]
MOV qword ptr [RBX],RDX
ADD RAX,0x10
MOV qword ptr [RBX + 0x10],RAX
CALL 0x00306c60
LEA RDI,[RBX + 0x78]
CALL 0x002db330
LEA RAX,[0x438690]
LEA RDI,[RBX + 0x48]
ADD RAX,0x10
MOV qword ptr [RBX + 0x10],RAX
CALL 0x002dd1b0
LEA RAX,[0x439600]
MOV qword ptr [RBX + 0x8],0x0
LEA RDI,[RBX + 0x100]
MOV qword ptr [RBX],RAX
LEA RAX,[0x439468]
ADD RAX,0x10
MOV qword ptr [RBX + 0x100],RAX
CALL 0x00318d20
MOV RDI,RBX
POP RBX
JMP 0x002dac70
(translation_unit "void FUN_00309010(long *param_1)\n\n{\n  undefined8 *puVar1;\n  \n  puVar1 = (undefined8 *)(*(long *)(*param_1 + -0x18) + (long)param_1);\n  puVar1[0x20] = &PTR_FUN_00439698;\n  *puVar1 = &PTR_FUN_00439670;\n  puVar1[2] = &PTR_FUN_00439578;\n  FUN_00306c60(puVar1 + 2);\n  thunk_FUN_002db2e0(puVar1 + 0xf);\n  puVar1[2] = &PTR_FUN_004386a0;\n  FUN_002dd1b0(puVar1 + 9);\n  puVar1[1] = 0;\n  *puVar1 = &DAT_00439600;\n  puVar1[0x20] = &PTR_FUN_00439478;\n  FUN_00318d20(puVar1 + 0x20);\n  FUN_002dac70(puVar1);\n  return;\n}\n\n" (function_definition "void FUN_00309010(long *param_1)\n\n{\n  undefined8 *puVar1;\n  \n  puVar1 = (undefined8 *)(*(long *)(*param_1 + -0x18) + (long)param_1);\n  puVar1[0x20] = &PTR_FUN_00439698;\n  *puVar1 = &PTR_FUN_00439670;\n  puVar1[2] = &PTR_FUN_00439578;\n  FUN_00306c60(puVar1 + 2);\n  thunk_FUN_002db2e0(puVar1 + 0xf);\n  puVar1[2] = &PTR_FUN_004386a0;\n  FUN_002dd1b0(puVar1 + 9);\n  puVar1[1] = 0;\n  *puVar1 = &DAT_00439600;\n  puVar1[0x20] = &PTR_FUN_00439478;\n  FUN_00318d20(puVar1 + 0x20);\n  FUN_002dac70(puVar1);\n  return;\n}" primitive_type (function_declarator "FUN_00309010(long *param_1)" identifier (parameter_list "(long *param_1)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  undefined8 *puVar1;\n  \n  puVar1 = (undefined8 *)(*(long *)(*param_1 + -0x18) + (long)param_1);\n  puVar1[0x20] = &PTR_FUN_00439698;\n  *puVar1 = &PTR_FUN_00439670;\n  puVar1[2] = &PTR_FUN_00439578;\n  FUN_00306c60(puVar1 + 2);\n  thunk_FUN_002db2e0(puVar1 + 0xf);\n  puVar1[2] = &PTR_FUN_004386a0;\n  FUN_002dd1b0(puVar1 + 9);\n  puVar1[1] = 0;\n  *puVar1 = &DAT_00439600;\n  puVar1[0x20] = &PTR_FUN_00439478;\n  FUN_00318d20(puVar1 + 0x20);\n  FUN_002dac70(puVar1);\n  return;\n}" { (declaration "undefined8 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (expression_statement "puVar1 = (undefined8 *)(*(long *)(*param_1 + -0x18) + (long)param_1);" (assignment_expression "puVar1 = (undefined8 *)(*(long *)(*param_1 + -0x18) + (long)param_1)" identifier = (cast_expression "(undefined8 *)(*(long *)(*param_1 + -0x18) + (long)param_1)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(long *)(*param_1 + -0x18) + (long)param_1)" ( (binary_expression "*(long *)(*param_1 + -0x18) + (long)param_1" (pointer_expression "*(long *)(*param_1 + -0x18)" * (cast_expression "(long *)(*param_1 + -0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + -0x18)" ( (binary_expression "*param_1 + -0x18" (pointer_expression "*param_1" * identifier) + number_literal) )))) + (cast_expression "(long)param_1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) )))) ;) (expression_statement "puVar1[0x20] = &PTR_FUN_00439698;" (assignment_expression "puVar1[0x20] = &PTR_FUN_00439698" (subscript_expression "puVar1[0x20]" identifier [ number_literal ]) = (pointer_expression "&PTR_FUN_00439698" & identifier)) ;) (expression_statement "*puVar1 = &PTR_FUN_00439670;" (assignment_expression "*puVar1 = &PTR_FUN_00439670" (pointer_expression "*puVar1" * identifier) = (pointer_expression "&PTR_FUN_00439670" & identifier)) ;) (expression_statement "puVar1[2] = &PTR_FUN_00439578;" (assignment_expression "puVar1[2] = &PTR_FUN_00439578" (subscript_expression "puVar1[2]" identifier [ number_literal ]) = (pointer_expression "&PTR_FUN_00439578" & identifier)) ;) (expression_statement "FUN_00306c60(puVar1 + 2);" (call_expression "FUN_00306c60(puVar1 + 2)" identifier (argument_list "(puVar1 + 2)" ( (binary_expression "puVar1 + 2" identifier + number_literal) ))) ;) (expression_statement "thunk_FUN_002db2e0(puVar1 + 0xf);" (call_expression "thunk_FUN_002db2e0(puVar1 + 0xf)" identifier (argument_list "(puVar1 + 0xf)" ( (binary_expression "puVar1 + 0xf" identifier + number_literal) ))) ;) (expression_statement "puVar1[2] = &PTR_FUN_004386a0;" (assignment_expression "puVar1[2] = &PTR_FUN_004386a0" (subscript_expression "puVar1[2]" identifier [ number_literal ]) = (pointer_expression "&PTR_FUN_004386a0" & identifier)) ;) (expression_statement "FUN_002dd1b0(puVar1 + 9);" (call_expression "FUN_002dd1b0(puVar1 + 9)" identifier (argument_list "(puVar1 + 9)" ( (binary_expression "puVar1 + 9" identifier + number_literal) ))) ;) (expression_statement "puVar1[1] = 0;" (assignment_expression "puVar1[1] = 0" (subscript_expression "puVar1[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*puVar1 = &DAT_00439600;" (assignment_expression "*puVar1 = &DAT_00439600" (pointer_expression "*puVar1" * identifier) = (pointer_expression "&DAT_00439600" & identifier)) ;) (expression_statement "puVar1[0x20] = &PTR_FUN_00439478;" (assignment_expression "puVar1[0x20] = &PTR_FUN_00439478" (subscript_expression "puVar1[0x20]" identifier [ number_literal ]) = (pointer_expression "&PTR_FUN_00439478" & identifier)) ;) (expression_statement "FUN_00318d20(puVar1 + 0x20);" (call_expression "FUN_00318d20(puVar1 + 0x20)" identifier (argument_list "(puVar1 + 0x20)" ( (binary_expression "puVar1 + 0x20" identifier + number_literal) ))) ;) (expression_statement "FUN_002dac70(puVar1);" (call_expression "FUN_002dac70(puVar1)" identifier (argument_list "(puVar1)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "/* virtual thunk to std::ifstream::~ifstream() */\n\nvoid __thiscall std::ifstream::~ifstream(ifstream *this)\n\n{\n  ifstream *piVar1;\n  \n  piVar1 = this + *(long *)(*(long *)this + -0x18);\n  *(undefined ***)(piVar1 + 0x100) = &PTR__ifstream_00439698;\n  *(undefined ***)piVar1 = &PTR__ifstream_00439670;\n  *(undefined ***)(piVar1 + 0x10) = &PTR__filebuf_00439578;\n  filebuf::close((filebuf *)(piVar1 + 0x10));\n  __basic_file<char>::~__basic_file((__basic_file<char> *)(piVar1 + 0x78));\n  *(undefined ***)(piVar1 + 0x10) = &PTR__streambuf_004386a0;\n  locale::~locale((locale *)(piVar1 + 0x48));\n  *(undefined8 *)(piVar1 + 8) = 0;\n  *(undefined **)piVar1 = &DAT_00439600;\n  *(undefined ***)(piVar1 + 0x100) = &PTR__ios_00439478;\n  ios_base::~ios_base((ios_base *)(piVar1 + 0x100));\n  operator_delete(piVar1);\n  return;\n}\n\n" comment (function_definition "void __thiscall std::ifstream::~ifstream(ifstream *this)\n\n{\n  ifstream *piVar1;\n  \n  piVar1 = this + *(long *)(*(long *)this + -0x18);\n  *(undefined ***)(piVar1 + 0x100) = &PTR__ifstream_00439698;\n  *(undefined ***)piVar1 = &PTR__ifstream_00439670;\n  *(undefined ***)(piVar1 + 0x10) = &PTR__filebuf_00439578;\n  filebuf::close((filebuf *)(piVar1 + 0x10));\n  __basic_file<char>::~__basic_file((__basic_file<char> *)(piVar1 + 0x78));\n  *(undefined ***)(piVar1 + 0x10) = &PTR__streambuf_004386a0;\n  locale::~locale((locale *)(piVar1 + 0x48));\n  *(undefined8 *)(piVar1 + 8) = 0;\n  *(undefined **)piVar1 = &DAT_00439600;\n  *(undefined ***)(piVar1 + 0x100) = &PTR__ios_00439478;\n  ios_base::~ios_base((ios_base *)(piVar1 + 0x100));\n  operator_delete(piVar1);\n  return;\n}" primitive_type (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::ifstream::~" identifier : : identifier : : ~) (function_declarator "ifstream(ifstream *this)" identifier (parameter_list "(ifstream *this)" ( (parameter_declaration "ifstream *this" type_identifier (pointer_declarator "*this" * identifier)) ))) (compound_statement "{\n  ifstream *piVar1;\n  \n  piVar1 = this + *(long *)(*(long *)this + -0x18);\n  *(undefined ***)(piVar1 + 0x100) = &PTR__ifstream_00439698;\n  *(undefined ***)piVar1 = &PTR__ifstream_00439670;\n  *(undefined ***)(piVar1 + 0x10) = &PTR__filebuf_00439578;\n  filebuf::close((filebuf *)(piVar1 + 0x10));\n  __basic_file<char>::~__basic_file((__basic_file<char> *)(piVar1 + 0x78));\n  *(undefined ***)(piVar1 + 0x10) = &PTR__streambuf_004386a0;\n  locale::~locale((locale *)(piVar1 + 0x48));\n  *(undefined8 *)(piVar1 + 8) = 0;\n  *(undefined **)piVar1 = &DAT_00439600;\n  *(undefined ***)(piVar1 + 0x100) = &PTR__ios_00439478;\n  ios_base::~ios_base((ios_base *)(piVar1 + 0x100));\n  operator_delete(piVar1);\n  return;\n}" { (declaration "ifstream *piVar1;" type_identifier (pointer_declarator "*piVar1" * identifier) ;) (expression_statement "piVar1 = this + *(long *)(*(long *)this + -0x18);" (assignment_expression "piVar1 = this + *(long *)(*(long *)this + -0x18)" identifier = (binary_expression "this + *(long *)(*(long *)this + -0x18)" identifier + (pointer_expression "*(long *)(*(long *)this + -0x18)" * (cast_expression "(long *)(*(long *)this + -0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(long *)this + -0x18)" ( (binary_expression "*(long *)this + -0x18" (pointer_expression "*(long *)this" * (cast_expression "(long *)this" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) )))))) ;) (expression_statement "*(undefined ***)(piVar1 + 0x100) = &PTR__ifstream_00439698;" (assignment_expression "*(undefined ***)(piVar1 + 0x100) = &PTR__ifstream_00439698" (pointer_expression "*(undefined ***)(piVar1 + 0x100)" * (cast_expression "(undefined ***)(piVar1 + 0x100)" ( (type_descriptor "undefined ***" type_identifier (abstract_pointer_declarator "***" * (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *)))) ) (parenthesized_expression "(piVar1 + 0x100)" ( (binary_expression "piVar1 + 0x100" identifier + number_literal) )))) = (pointer_expression "&PTR__ifstream_00439698" & identifier)) ;) (expression_statement "*(undefined ***)piVar1 = &PTR__ifstream_00439670;" (assignment_expression "*(undefined ***)piVar1 = &PTR__ifstream_00439670" (pointer_expression "*(undefined ***)piVar1" * (cast_expression "(undefined ***)piVar1" ( (type_descriptor "undefined ***" type_identifier (abstract_pointer_declarator "***" * (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *)))) ) identifier)) = (pointer_expression "&PTR__ifstream_00439670" & identifier)) ;) (expression_statement "*(undefined ***)(piVar1 + 0x10) = &PTR__filebuf_00439578;" (assignment_expression "*(undefined ***)(piVar1 + 0x10) = &PTR__filebuf_00439578" (pointer_expression "*(undefined ***)(piVar1 + 0x10)" * (cast_expression "(undefined ***)(piVar1 + 0x10)" ( (type_descriptor "undefined ***" type_identifier (abstract_pointer_declarator "***" * (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *)))) ) (parenthesized_expression "(piVar1 + 0x10)" ( (binary_expression "piVar1 + 0x10" identifier + number_literal) )))) = (pointer_expression "&PTR__filebuf_00439578" & identifier)) ;) (labeled_statement "filebuf::close((filebuf *)(piVar1 + 0x10));" statement_identifier : (ERROR ":" :) (expression_statement "close((filebuf *)(piVar1 + 0x10));" (call_expression "close((filebuf *)(piVar1 + 0x10))" identifier (argument_list "((filebuf *)(piVar1 + 0x10))" ( (cast_expression "(filebuf *)(piVar1 + 0x10)" ( (type_descriptor "filebuf *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar1 + 0x10)" ( (binary_expression "piVar1 + 0x10" identifier + number_literal) ))) ))) ;)) (expression_statement "__basic_file<char>::~__basic_file((__basic_file<char> *)(piVar1 + 0x78));" (binary_expression "__basic_file<char>::~__basic_file((__basic_file<char> *)(piVar1 + 0x78))" (binary_expression "__basic_file<char" identifier < identifier) > (ERROR "::" : :) (unary_expression "~__basic_file((__basic_file<char> *)(piVar1 + 0x78))" ~ (call_expression "__basic_file((__basic_file<char> *)(piVar1 + 0x78))" identifier (argument_list "((__basic_file<char> *)(piVar1 + 0x78))" ( (call_expression "(__basic_file<char> *)(piVar1 + 0x78)" (parenthesized_expression "(__basic_file<char> *)" ( (binary_expression "__basic_file<char> *" (binary_expression "__basic_file<char" identifier < identifier) > (pointer_expression "*" * identifier)) )) (argument_list "(piVar1 + 0x78)" ( (binary_expression "piVar1 + 0x78" identifier + number_literal) ))) ))))) ;) (expression_statement "*(undefined ***)(piVar1 + 0x10) = &PTR__streambuf_004386a0;" (assignment_expression "*(undefined ***)(piVar1 + 0x10) = &PTR__streambuf_004386a0" (pointer_expression "*(undefined ***)(piVar1 + 0x10)" * (cast_expression "(undefined ***)(piVar1 + 0x10)" ( (type_descriptor "undefined ***" type_identifier (abstract_pointer_declarator "***" * (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *)))) ) (parenthesized_expression "(piVar1 + 0x10)" ( (binary_expression "piVar1 + 0x10" identifier + number_literal) )))) = (pointer_expression "&PTR__streambuf_004386a0" & identifier)) ;) (labeled_statement "locale::~locale((locale *)(piVar1 + 0x48));" statement_identifier : (ERROR ":" :) (expression_statement "~locale((locale *)(piVar1 + 0x48));" (unary_expression "~locale((locale *)(piVar1 + 0x48))" ~ (call_expression "locale((locale *)(piVar1 + 0x48))" identifier (argument_list "((locale *)(piVar1 + 0x48))" ( (cast_expression "(locale *)(piVar1 + 0x48)" ( (type_descriptor "locale *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar1 + 0x48)" ( (binary_expression "piVar1 + 0x48" identifier + number_literal) ))) )))) ;)) (expression_statement "*(undefined8 *)(piVar1 + 8) = 0;" (assignment_expression "*(undefined8 *)(piVar1 + 8) = 0" (pointer_expression "*(undefined8 *)(piVar1 + 8)" * (cast_expression "(undefined8 *)(piVar1 + 8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar1 + 8)" ( (binary_expression "piVar1 + 8" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined **)piVar1 = &DAT_00439600;" (assignment_expression "*(undefined **)piVar1 = &DAT_00439600" (pointer_expression "*(undefined **)piVar1" * (cast_expression "(undefined **)piVar1" ( (type_descriptor "undefined **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) = (pointer_expression "&DAT_00439600" & identifier)) ;) (expression_statement "*(undefined ***)(piVar1 + 0x100) = &PTR__ios_00439478;" (assignment_expression "*(undefined ***)(piVar1 + 0x100) = &PTR__ios_00439478" (pointer_expression "*(undefined ***)(piVar1 + 0x100)" * (cast_expression "(undefined ***)(piVar1 + 0x100)" ( (type_descriptor "undefined ***" type_identifier (abstract_pointer_declarator "***" * (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *)))) ) (parenthesized_expression "(piVar1 + 0x100)" ( (binary_expression "piVar1 + 0x100" identifier + number_literal) )))) = (pointer_expression "&PTR__ios_00439478" & identifier)) ;) (labeled_statement "ios_base::~ios_base((ios_base *)(piVar1 + 0x100));" statement_identifier : (ERROR ":" :) (expression_statement "~ios_base((ios_base *)(piVar1 + 0x100));" (unary_expression "~ios_base((ios_base *)(piVar1 + 0x100))" ~ (call_expression "ios_base((ios_base *)(piVar1 + 0x100))" identifier (argument_list "((ios_base *)(piVar1 + 0x100))" ( (cast_expression "(ios_base *)(piVar1 + 0x100)" ( (type_descriptor "ios_base *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar1 + 0x100)" ( (binary_expression "piVar1 + 0x100" identifier + number_literal) ))) )))) ;)) (expression_statement "operator_delete(piVar1);" (call_expression "operator_delete(piVar1)" identifier (argument_list "(piVar1)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00309010(long *param_1)\n\n{\n  undefined8 *puVar1;\n  \n  puVar1 = (undefined8 *)(*(long *)(*param_1 + -0x18) + (long)param_1);\n  puVar1[0x20] = &PTR_FUN_00439698;\n  *puVar1 = &PTR_FUN_00439670;\n  puVar1[2] = &PTR_FUN_00439578;\n  FUN_00306c60(puVar1 + 2);\n  thunk_FUN_002db2e0(puVar1 + 0xf);\n  puVar1[2] = &PTR_FUN_004386a0;\n  FUN_002dd1b0(puVar1 + 9);\n  puVar1[1] = 0;\n  *puVar1 = &DAT_00439600;\n  puVar1[0x20] = &PTR_FUN_00439478;\n  FUN_00318d20(puVar1 + 0x20);\n  FUN_002dac70(puVar1);\n  return;\n}\n\n" (function_definition "void FUN_00309010(long *param_1)\n\n{\n  undefined8 *puVar1;\n  \n  puVar1 = (undefined8 *)(*(long *)(*param_1 + -0x18) + (long)param_1);\n  puVar1[0x20] = &PTR_FUN_00439698;\n  *puVar1 = &PTR_FUN_00439670;\n  puVar1[2] = &PTR_FUN_00439578;\n  FUN_00306c60(puVar1 + 2);\n  thunk_FUN_002db2e0(puVar1 + 0xf);\n  puVar1[2] = &PTR_FUN_004386a0;\n  FUN_002dd1b0(puVar1 + 9);\n  puVar1[1] = 0;\n  *puVar1 = &DAT_00439600;\n  puVar1[0x20] = &PTR_FUN_00439478;\n  FUN_00318d20(puVar1 + 0x20);\n  FUN_002dac70(puVar1);\n  return;\n}" primitive_type (function_declarator "FUN_00309010(long *param_1)" identifier (parameter_list "(long *param_1)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  undefined8 *puVar1;\n  \n  puVar1 = (undefined8 *)(*(long *)(*param_1 + -0x18) + (long)param_1);\n  puVar1[0x20] = &PTR_FUN_00439698;\n  *puVar1 = &PTR_FUN_00439670;\n  puVar1[2] = &PTR_FUN_00439578;\n  FUN_00306c60(puVar1 + 2);\n  thunk_FUN_002db2e0(puVar1 + 0xf);\n  puVar1[2] = &PTR_FUN_004386a0;\n  FUN_002dd1b0(puVar1 + 9);\n  puVar1[1] = 0;\n  *puVar1 = &DAT_00439600;\n  puVar1[0x20] = &PTR_FUN_00439478;\n  FUN_00318d20(puVar1 + 0x20);\n  FUN_002dac70(puVar1);\n  return;\n}" { (declaration "undefined8 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (expression_statement "puVar1 = (undefined8 *)(*(long *)(*param_1 + -0x18) + (long)param_1);" (assignment_expression "puVar1 = (undefined8 *)(*(long *)(*param_1 + -0x18) + (long)param_1)" identifier = (cast_expression "(undefined8 *)(*(long *)(*param_1 + -0x18) + (long)param_1)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(long *)(*param_1 + -0x18) + (long)param_1)" ( (binary_expression "*(long *)(*param_1 + -0x18) + (long)param_1" (pointer_expression "*(long *)(*param_1 + -0x18)" * (cast_expression "(long *)(*param_1 + -0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + -0x18)" ( (binary_expression "*param_1 + -0x18" (pointer_expression "*param_1" * identifier) + number_literal) )))) + (cast_expression "(long)param_1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) )))) ;) (expression_statement "puVar1[0x20] = &PTR_FUN_00439698;" (assignment_expression "puVar1[0x20] = &PTR_FUN_00439698" (subscript_expression "puVar1[0x20]" identifier [ number_literal ]) = (pointer_expression "&PTR_FUN_00439698" & identifier)) ;) (expression_statement "*puVar1 = &PTR_FUN_00439670;" (assignment_expression "*puVar1 = &PTR_FUN_00439670" (pointer_expression "*puVar1" * identifier) = (pointer_expression "&PTR_FUN_00439670" & identifier)) ;) (expression_statement "puVar1[2] = &PTR_FUN_00439578;" (assignment_expression "puVar1[2] = &PTR_FUN_00439578" (subscript_expression "puVar1[2]" identifier [ number_literal ]) = (pointer_expression "&PTR_FUN_00439578" & identifier)) ;) (expression_statement "FUN_00306c60(puVar1 + 2);" (call_expression "FUN_00306c60(puVar1 + 2)" identifier (argument_list "(puVar1 + 2)" ( (binary_expression "puVar1 + 2" identifier + number_literal) ))) ;) (expression_statement "thunk_FUN_002db2e0(puVar1 + 0xf);" (call_expression "thunk_FUN_002db2e0(puVar1 + 0xf)" identifier (argument_list "(puVar1 + 0xf)" ( (binary_expression "puVar1 + 0xf" identifier + number_literal) ))) ;) (expression_statement "puVar1[2] = &PTR_FUN_004386a0;" (assignment_expression "puVar1[2] = &PTR_FUN_004386a0" (subscript_expression "puVar1[2]" identifier [ number_literal ]) = (pointer_expression "&PTR_FUN_004386a0" & identifier)) ;) (expression_statement "FUN_002dd1b0(puVar1 + 9);" (call_expression "FUN_002dd1b0(puVar1 + 9)" identifier (argument_list "(puVar1 + 9)" ( (binary_expression "puVar1 + 9" identifier + number_literal) ))) ;) (expression_statement "puVar1[1] = 0;" (assignment_expression "puVar1[1] = 0" (subscript_expression "puVar1[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*puVar1 = &DAT_00439600;" (assignment_expression "*puVar1 = &DAT_00439600" (pointer_expression "*puVar1" * identifier) = (pointer_expression "&DAT_00439600" & identifier)) ;) (expression_statement "puVar1[0x20] = &PTR_FUN_00439478;" (assignment_expression "puVar1[0x20] = &PTR_FUN_00439478" (subscript_expression "puVar1[0x20]" identifier [ number_literal ]) = (pointer_expression "&PTR_FUN_00439478" & identifier)) ;) (expression_statement "FUN_00318d20(puVar1 + 0x20);" (call_expression "FUN_00318d20(puVar1 + 0x20)" identifier (argument_list "(puVar1 + 0x20)" ( (binary_expression "puVar1 + 0x20" identifier + number_literal) ))) ;) (expression_statement "FUN_002dac70(puVar1);" (call_expression "FUN_002dac70(puVar1)" identifier (argument_list "(puVar1)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) + (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT)) )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (pointer_expression & IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression & IDENT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (pointer_expression & IDENT)) ;) (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) ))) ;) (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) ))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (pointer_expression & IDENT)) ;) (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) ))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression & IDENT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (pointer_expression & IDENT)) ;) (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return ;) })))
(function_definition "void FUN_00309010(long *param_1)\n\n{\n  undefined8 *puVar1;\n  \n  puVar1 = (undefined8 *)(*(long *)(*param_1 + -0x18) + (long)param_1);\n  puVar1[0x20] = &PTR_FUN_00439698;\n  *puVar1 = &PTR_FUN_00439670;\n  puVar1[2] = &PTR_FUN_00439578;\n  FUN_00306c60(puVar1 + 2);\n  thunk_FUN_002db2e0(puVar1 + 0xf);\n  puVar1[2] = &PTR_FUN_004386a0;\n  FUN_002dd1b0(puVar1 + 9);\n  puVar1[1] = 0;\n  *puVar1 = &DAT_00439600;\n  puVar1[0x20] = &PTR_FUN_00439478;\n  FUN_00318d20(puVar1 + 0x20);\n  FUN_002dac70(puVar1);\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00309010(long *param_1)" (identifier "FUN_00309010") (parameter_list "(long *param_1)" (( "(") (parameter_declaration "long *param_1" (sized_type_specifier "long" (long "long")) (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  undefined8 *puVar1;\n  \n  puVar1 = (undefined8 *)(*(long *)(*param_1 + -0x18) + (long)param_1);\n  puVar1[0x20] = &PTR_FUN_00439698;\n  *puVar1 = &PTR_FUN_00439670;\n  puVar1[2] = &PTR_FUN_00439578;\n  FUN_00306c60(puVar1 + 2);\n  thunk_FUN_002db2e0(puVar1 + 0xf);\n  puVar1[2] = &PTR_FUN_004386a0;\n  FUN_002dd1b0(puVar1 + 9);\n  puVar1[1] = 0;\n  *puVar1 = &DAT_00439600;\n  puVar1[0x20] = &PTR_FUN_00439478;\n  FUN_00318d20(puVar1 + 0x20);\n  FUN_002dac70(puVar1);\n  return;\n}" ({ "{") (declaration "undefined8 *puVar1;" (type_identifier "undefined8") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (expression_statement "puVar1 = (undefined8 *)(*(long *)(*param_1 + -0x18) + (long)param_1);" (assignment_expression "puVar1 = (undefined8 *)(*(long *)(*param_1 + -0x18) + (long)param_1)" (identifier "puVar1") (= "=") (cast_expression "(undefined8 *)(*(long *)(*param_1 + -0x18) + (long)param_1)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(long *)(*param_1 + -0x18) + (long)param_1)" (( "(") (binary_expression "*(long *)(*param_1 + -0x18) + (long)param_1" (pointer_expression "*(long *)(*param_1 + -0x18)" (* "*") (cast_expression "(long *)(*param_1 + -0x18)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + -0x18)" (( "(") (binary_expression "*param_1 + -0x18" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "-0x18")) () ")")))) (+ "+") (cast_expression "(long)param_1" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_1"))) () ")")))) (; ";")) (expression_statement "puVar1[0x20] = &PTR_FUN_00439698;" (assignment_expression "puVar1[0x20] = &PTR_FUN_00439698" (subscript_expression "puVar1[0x20]" (identifier "puVar1") ([ "[") (number_literal "0x20") (] "]")) (= "=") (pointer_expression "&PTR_FUN_00439698" (& "&") (identifier "PTR_FUN_00439698"))) (; ";")) (expression_statement "*puVar1 = &PTR_FUN_00439670;" (assignment_expression "*puVar1 = &PTR_FUN_00439670" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (= "=") (pointer_expression "&PTR_FUN_00439670" (& "&") (identifier "PTR_FUN_00439670"))) (; ";")) (expression_statement "puVar1[2] = &PTR_FUN_00439578;" (assignment_expression "puVar1[2] = &PTR_FUN_00439578" (subscript_expression "puVar1[2]" (identifier "puVar1") ([ "[") (number_literal "2") (] "]")) (= "=") (pointer_expression "&PTR_FUN_00439578" (& "&") (identifier "PTR_FUN_00439578"))) (; ";")) (expression_statement "FUN_00306c60(puVar1 + 2);" (call_expression "FUN_00306c60(puVar1 + 2)" (identifier "FUN_00306c60") (argument_list "(puVar1 + 2)" (( "(") (binary_expression "puVar1 + 2" (identifier "puVar1") (+ "+") (number_literal "2")) () ")"))) (; ";")) (expression_statement "thunk_FUN_002db2e0(puVar1 + 0xf);" (call_expression "thunk_FUN_002db2e0(puVar1 + 0xf)" (identifier "thunk_FUN_002db2e0") (argument_list "(puVar1 + 0xf)" (( "(") (binary_expression "puVar1 + 0xf" (identifier "puVar1") (+ "+") (number_literal "0xf")) () ")"))) (; ";")) (expression_statement "puVar1[2] = &PTR_FUN_004386a0;" (assignment_expression "puVar1[2] = &PTR_FUN_004386a0" (subscript_expression "puVar1[2]" (identifier "puVar1") ([ "[") (number_literal "2") (] "]")) (= "=") (pointer_expression "&PTR_FUN_004386a0" (& "&") (identifier "PTR_FUN_004386a0"))) (; ";")) (expression_statement "FUN_002dd1b0(puVar1 + 9);" (call_expression "FUN_002dd1b0(puVar1 + 9)" (identifier "FUN_002dd1b0") (argument_list "(puVar1 + 9)" (( "(") (binary_expression "puVar1 + 9" (identifier "puVar1") (+ "+") (number_literal "9")) () ")"))) (; ";")) (expression_statement "puVar1[1] = 0;" (assignment_expression "puVar1[1] = 0" (subscript_expression "puVar1[1]" (identifier "puVar1") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "*puVar1 = &DAT_00439600;" (assignment_expression "*puVar1 = &DAT_00439600" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (= "=") (pointer_expression "&DAT_00439600" (& "&") (identifier "DAT_00439600"))) (; ";")) (expression_statement "puVar1[0x20] = &PTR_FUN_00439478;" (assignment_expression "puVar1[0x20] = &PTR_FUN_00439478" (subscript_expression "puVar1[0x20]" (identifier "puVar1") ([ "[") (number_literal "0x20") (] "]")) (= "=") (pointer_expression "&PTR_FUN_00439478" (& "&") (identifier "PTR_FUN_00439478"))) (; ";")) (expression_statement "FUN_00318d20(puVar1 + 0x20);" (call_expression "FUN_00318d20(puVar1 + 0x20)" (identifier "FUN_00318d20") (argument_list "(puVar1 + 0x20)" (( "(") (binary_expression "puVar1 + 0x20" (identifier "puVar1") (+ "+") (number_literal "0x20")) () ")"))) (; ";")) (expression_statement "FUN_002dac70(puVar1);" (call_expression "FUN_002dac70(puVar1)" (identifier "FUN_002dac70") (argument_list "(puVar1)" (( "(") (identifier "puVar1") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* virtual thunk to std::ifstream::~ifstream() */

void __thiscall std::function_1::~function_1(function_1 *var_1)

{
  function_1 *var_2;
  
  var_2 = var_1 + *(long *)(*(long *)var_1 + -0x18);
  *(type_1 ***)(var_2 + 0x100) = &PTR__ifstream_00439698;
  *(type_1 ***)var_2 = &PTR__ifstream_00439670;
  *(type_1 ***)(var_2 + 0x10) = &PTR__filebuf_00439578;
  filebuf::var_3((type_2 *)(var_2 + 0x10));
  var_4<var_5>::~var_4((var_4<var_5> *)(var_2 + 0x78));
  *(type_1 ***)(var_2 + 0x10) = &PTR__streambuf_004386a0;
  locale::~var_6((var_6 *)(var_2 + 0x48));
  *(type_3 *)(var_2 + 8) = 0;
  *(type_1 **)var_2 = &DAT_00439600;
  *(type_1 ***)(var_2 + 0x100) = &PTR__ios_00439478;
  ios_base::~var_7((var_7 *)(var_2 + 0x100));
  var_8(var_2);
  return;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (sized_type_specifier) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))) right: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (identifier))))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (pointer_expression argument: (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (pointer_expression argument: (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (pointer_expression argument: (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (return_statement))))

void MASKED(long *param_1)

{
  undefined8 *puVar1;
  
  puVar1 = (undefined8 *)(*(long *)(*param_1 + -0x18) + (long)param_1);
  puVar1[0x20] = &PTR_FUN_00439698;
  *puVar1 = &PTR_FUN_00439670;
  puVar1[2] = &PTR_FUN_00439578;
  FUN_00306c60(puVar1 + 2);
  thunk_FUN_002db2e0(puVar1 + 0xf);
  puVar1[2] = &PTR_FUN_004386a0;
  FUN_002dd1b0(puVar1 + 9);
  puVar1[1] = 0;
  *puVar1 = &DAT_00439600;
  puVar1[0x20] = &PTR_FUN_00439478;
  FUN_00318d20(puVar1 + 0x20);
  FUN_002dac70(puVar1);
  return;
}

