
/* std::wfilebuf::_M_destroy_internal_buffer() */

void __thiscall std::wfilebuf::_M_destroy_internal_buffer(wfilebuf *this)

{
  if (this[0xa8] != (wfilebuf)0x0) {
    if (*(void **)(this + 0x98) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x98));
    }
    *(undefined8 *)(this + 0x98) = 0;
    this[0xa8] = (wfilebuf)0x0;
  }
  if (*(void **)(this + 0xd0) != (void *)0x0) {
    operator_delete__(*(void **)(this + 0xd0));
  }
  *(undefined8 *)(this + 0xd0) = 0;
  *(undefined8 *)(this + 0xd8) = 0;
  *(undefined8 *)(this + 0xe0) = 0;
  *(undefined8 *)(this + 0xe8) = 0;
  return;
}



void FUN_0031c7d0(long param_1)

{
  if (*(char *)(param_1 + 0xa8) != '\0') {
    if (*(long *)(param_1 + 0x98) != 0) {
      thunk_FUN_002f1e60();
    }
    *(undefined8 *)(param_1 + 0x98) = 0;
    *(undefined1 *)(param_1 + 0xa8) = 0;
  }
  if (*(long *)(param_1 + 0xd0) != 0) {
    thunk_FUN_002f1e60();
  }
  *(undefined8 *)(param_1 + 0xd0) = 0;
  *(undefined8 *)(param_1 + 0xd8) = 0;
  *(undefined8 *)(param_1 + 0xe0) = 0;
  *(undefined8 *)(param_1 + 0xe8) = 0;
  return;
}


PUSH RBX
CMP byte ptr [RDI + 0xa8],0x0
MOV RBX,RDI
JZ 0x0031c800
MOV RDI,qword ptr [RDI + 0x98]
TEST RDI,RDI
JZ 0x0031c7ee
CALL 0x002f1e30
MOV qword ptr [RBX + 0x98],0x0
MOV byte ptr [RBX + 0xa8],0x0
MOV RDI,qword ptr [RBX + 0xd0]
TEST RDI,RDI
JZ 0x0031c811
CALL 0x002f1e30
MOV qword ptr [RBX + 0xd0],0x0
MOV qword ptr [RBX + 0xd8],0x0
MOV qword ptr [RBX + 0xe0],0x0
MOV qword ptr [RBX + 0xe8],0x0
POP RBX
RET
(translation_unit "void FUN_0031c7d0(long param_1)\n\n{\n  if (*(char *)(param_1 + 0xa8) != '\0') {\n    if (*(long *)(param_1 + 0x98) != 0) {\n      thunk_FUN_002f1e60();\n    }\n    *(undefined8 *)(param_1 + 0x98) = 0;\n    *(undefined1 *)(param_1 + 0xa8) = 0;\n  }\n  if (*(long *)(param_1 + 0xd0) != 0) {\n    thunk_FUN_002f1e60();\n  }\n  *(undefined8 *)(param_1 + 0xd0) = 0;\n  *(undefined8 *)(param_1 + 0xd8) = 0;\n  *(undefined8 *)(param_1 + 0xe0) = 0;\n  *(undefined8 *)(param_1 + 0xe8) = 0;\n  return;\n}\n\n" (function_definition "void FUN_0031c7d0(long param_1)\n\n{\n  if (*(char *)(param_1 + 0xa8) != '\0') {\n    if (*(long *)(param_1 + 0x98) != 0) {\n      thunk_FUN_002f1e60();\n    }\n    *(undefined8 *)(param_1 + 0x98) = 0;\n    *(undefined1 *)(param_1 + 0xa8) = 0;\n  }\n  if (*(long *)(param_1 + 0xd0) != 0) {\n    thunk_FUN_002f1e60();\n  }\n  *(undefined8 *)(param_1 + 0xd0) = 0;\n  *(undefined8 *)(param_1 + 0xd8) = 0;\n  *(undefined8 *)(param_1 + 0xe0) = 0;\n  *(undefined8 *)(param_1 + 0xe8) = 0;\n  return;\n}" primitive_type (function_declarator "FUN_0031c7d0(long param_1)" identifier (parameter_list "(long param_1)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  if (*(char *)(param_1 + 0xa8) != '\0') {\n    if (*(long *)(param_1 + 0x98) != 0) {\n      thunk_FUN_002f1e60();\n    }\n    *(undefined8 *)(param_1 + 0x98) = 0;\n    *(undefined1 *)(param_1 + 0xa8) = 0;\n  }\n  if (*(long *)(param_1 + 0xd0) != 0) {\n    thunk_FUN_002f1e60();\n  }\n  *(undefined8 *)(param_1 + 0xd0) = 0;\n  *(undefined8 *)(param_1 + 0xd8) = 0;\n  *(undefined8 *)(param_1 + 0xe0) = 0;\n  *(undefined8 *)(param_1 + 0xe8) = 0;\n  return;\n}" { (if_statement "if (*(char *)(param_1 + 0xa8) != '\0') {\n    if (*(long *)(param_1 + 0x98) != 0) {\n      thunk_FUN_002f1e60();\n    }\n    *(undefined8 *)(param_1 + 0x98) = 0;\n    *(undefined1 *)(param_1 + 0xa8) = 0;\n  }" if (parenthesized_expression "(*(char *)(param_1 + 0xa8) != '\0')" ( (binary_expression "*(char *)(param_1 + 0xa8) != '\0'" (pointer_expression "*(char *)(param_1 + 0xa8)" * (cast_expression "(char *)(param_1 + 0xa8)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xa8)" ( (binary_expression "param_1 + 0xa8" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    if (*(long *)(param_1 + 0x98) != 0) {\n      thunk_FUN_002f1e60();\n    }\n    *(undefined8 *)(param_1 + 0x98) = 0;\n    *(undefined1 *)(param_1 + 0xa8) = 0;\n  }" { (if_statement "if (*(long *)(param_1 + 0x98) != 0) {\n      thunk_FUN_002f1e60();\n    }" if (parenthesized_expression "(*(long *)(param_1 + 0x98) != 0)" ( (binary_expression "*(long *)(param_1 + 0x98) != 0" (pointer_expression "*(long *)(param_1 + 0x98)" * (cast_expression "(long *)(param_1 + 0x98)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x98)" ( (binary_expression "param_1 + 0x98" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n      thunk_FUN_002f1e60();\n    }" { (expression_statement "thunk_FUN_002f1e60();" (call_expression "thunk_FUN_002f1e60()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "*(undefined8 *)(param_1 + 0x98) = 0;" (assignment_expression "*(undefined8 *)(param_1 + 0x98) = 0" (pointer_expression "*(undefined8 *)(param_1 + 0x98)" * (cast_expression "(undefined8 *)(param_1 + 0x98)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x98)" ( (binary_expression "param_1 + 0x98" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined1 *)(param_1 + 0xa8) = 0;" (assignment_expression "*(undefined1 *)(param_1 + 0xa8) = 0" (pointer_expression "*(undefined1 *)(param_1 + 0xa8)" * (cast_expression "(undefined1 *)(param_1 + 0xa8)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xa8)" ( (binary_expression "param_1 + 0xa8" identifier + number_literal) )))) = number_literal) ;) })) (if_statement "if (*(long *)(param_1 + 0xd0) != 0) {\n    thunk_FUN_002f1e60();\n  }" if (parenthesized_expression "(*(long *)(param_1 + 0xd0) != 0)" ( (binary_expression "*(long *)(param_1 + 0xd0) != 0" (pointer_expression "*(long *)(param_1 + 0xd0)" * (cast_expression "(long *)(param_1 + 0xd0)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xd0)" ( (binary_expression "param_1 + 0xd0" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n    thunk_FUN_002f1e60();\n  }" { (expression_statement "thunk_FUN_002f1e60();" (call_expression "thunk_FUN_002f1e60()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "*(undefined8 *)(param_1 + 0xd0) = 0;" (assignment_expression "*(undefined8 *)(param_1 + 0xd0) = 0" (pointer_expression "*(undefined8 *)(param_1 + 0xd0)" * (cast_expression "(undefined8 *)(param_1 + 0xd0)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xd0)" ( (binary_expression "param_1 + 0xd0" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined8 *)(param_1 + 0xd8) = 0;" (assignment_expression "*(undefined8 *)(param_1 + 0xd8) = 0" (pointer_expression "*(undefined8 *)(param_1 + 0xd8)" * (cast_expression "(undefined8 *)(param_1 + 0xd8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xd8)" ( (binary_expression "param_1 + 0xd8" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined8 *)(param_1 + 0xe0) = 0;" (assignment_expression "*(undefined8 *)(param_1 + 0xe0) = 0" (pointer_expression "*(undefined8 *)(param_1 + 0xe0)" * (cast_expression "(undefined8 *)(param_1 + 0xe0)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xe0)" ( (binary_expression "param_1 + 0xe0" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined8 *)(param_1 + 0xe8) = 0;" (assignment_expression "*(undefined8 *)(param_1 + 0xe8) = 0" (pointer_expression "*(undefined8 *)(param_1 + 0xe8)" * (cast_expression "(undefined8 *)(param_1 + 0xe8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xe8)" ( (binary_expression "param_1 + 0xe8" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit "/* std::wfilebuf::_M_destroy_internal_buffer() */\n\nvoid __thiscall std::wfilebuf::_M_destroy_internal_buffer(wfilebuf *this)\n\n{\n  if (this[0xa8] != (wfilebuf)0x0) {\n    if (*(void **)(this + 0x98) != (void *)0x0) {\n      operator_delete__(*(void **)(this + 0x98));\n    }\n    *(undefined8 *)(this + 0x98) = 0;\n    this[0xa8] = (wfilebuf)0x0;\n  }\n  if (*(void **)(this + 0xd0) != (void *)0x0) {\n    operator_delete__(*(void **)(this + 0xd0));\n  }\n  *(undefined8 *)(this + 0xd0) = 0;\n  *(undefined8 *)(this + 0xd8) = 0;\n  *(undefined8 *)(this + 0xe0) = 0;\n  *(undefined8 *)(this + 0xe8) = 0;\n  return;\n}\n\n" comment (function_definition "void __thiscall std::wfilebuf::_M_destroy_internal_buffer(wfilebuf *this)\n\n{\n  if (this[0xa8] != (wfilebuf)0x0) {\n    if (*(void **)(this + 0x98) != (void *)0x0) {\n      operator_delete__(*(void **)(this + 0x98));\n    }\n    *(undefined8 *)(this + 0x98) = 0;\n    this[0xa8] = (wfilebuf)0x0;\n  }\n  if (*(void **)(this + 0xd0) != (void *)0x0) {\n    operator_delete__(*(void **)(this + 0xd0));\n  }\n  *(undefined8 *)(this + 0xd0) = 0;\n  *(undefined8 *)(this + 0xd8) = 0;\n  *(undefined8 *)(this + 0xe0) = 0;\n  *(undefined8 *)(this + 0xe8) = 0;\n  return;\n}" primitive_type (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::wfilebuf::" identifier : : identifier : :) (function_declarator "_M_destroy_internal_buffer(wfilebuf *this)" identifier (parameter_list "(wfilebuf *this)" ( (parameter_declaration "wfilebuf *this" type_identifier (pointer_declarator "*this" * identifier)) ))) (compound_statement "{\n  if (this[0xa8] != (wfilebuf)0x0) {\n    if (*(void **)(this + 0x98) != (void *)0x0) {\n      operator_delete__(*(void **)(this + 0x98));\n    }\n    *(undefined8 *)(this + 0x98) = 0;\n    this[0xa8] = (wfilebuf)0x0;\n  }\n  if (*(void **)(this + 0xd0) != (void *)0x0) {\n    operator_delete__(*(void **)(this + 0xd0));\n  }\n  *(undefined8 *)(this + 0xd0) = 0;\n  *(undefined8 *)(this + 0xd8) = 0;\n  *(undefined8 *)(this + 0xe0) = 0;\n  *(undefined8 *)(this + 0xe8) = 0;\n  return;\n}" { (if_statement "if (this[0xa8] != (wfilebuf)0x0) {\n    if (*(void **)(this + 0x98) != (void *)0x0) {\n      operator_delete__(*(void **)(this + 0x98));\n    }\n    *(undefined8 *)(this + 0x98) = 0;\n    this[0xa8] = (wfilebuf)0x0;\n  }" if (parenthesized_expression "(this[0xa8] != (wfilebuf)0x0)" ( (binary_expression "this[0xa8] != (wfilebuf)0x0" (subscript_expression "this[0xa8]" identifier [ number_literal ]) != (cast_expression "(wfilebuf)0x0" ( (type_descriptor "wfilebuf" type_identifier) ) number_literal)) )) (compound_statement "{\n    if (*(void **)(this + 0x98) != (void *)0x0) {\n      operator_delete__(*(void **)(this + 0x98));\n    }\n    *(undefined8 *)(this + 0x98) = 0;\n    this[0xa8] = (wfilebuf)0x0;\n  }" { (if_statement "if (*(void **)(this + 0x98) != (void *)0x0) {\n      operator_delete__(*(void **)(this + 0x98));\n    }" if (parenthesized_expression "(*(void **)(this + 0x98) != (void *)0x0)" ( (binary_expression "*(void **)(this + 0x98) != (void *)0x0" (pointer_expression "*(void **)(this + 0x98)" * (cast_expression "(void **)(this + 0x98)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(this + 0x98)" ( (binary_expression "this + 0x98" identifier + number_literal) )))) != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      operator_delete__(*(void **)(this + 0x98));\n    }" { (expression_statement "operator_delete__(*(void **)(this + 0x98));" (call_expression "operator_delete__(*(void **)(this + 0x98))" identifier (argument_list "(*(void **)(this + 0x98))" ( (pointer_expression "*(void **)(this + 0x98)" * (cast_expression "(void **)(this + 0x98)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(this + 0x98)" ( (binary_expression "this + 0x98" identifier + number_literal) )))) ))) ;) })) (expression_statement "*(undefined8 *)(this + 0x98) = 0;" (assignment_expression "*(undefined8 *)(this + 0x98) = 0" (pointer_expression "*(undefined8 *)(this + 0x98)" * (cast_expression "(undefined8 *)(this + 0x98)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x98)" ( (binary_expression "this + 0x98" identifier + number_literal) )))) = number_literal) ;) (expression_statement "this[0xa8] = (wfilebuf)0x0;" (assignment_expression "this[0xa8] = (wfilebuf)0x0" (subscript_expression "this[0xa8]" identifier [ number_literal ]) = (cast_expression "(wfilebuf)0x0" ( (type_descriptor "wfilebuf" type_identifier) ) number_literal)) ;) })) (if_statement "if (*(void **)(this + 0xd0) != (void *)0x0) {\n    operator_delete__(*(void **)(this + 0xd0));\n  }" if (parenthesized_expression "(*(void **)(this + 0xd0) != (void *)0x0)" ( (binary_expression "*(void **)(this + 0xd0) != (void *)0x0" (pointer_expression "*(void **)(this + 0xd0)" * (cast_expression "(void **)(this + 0xd0)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(this + 0xd0)" ( (binary_expression "this + 0xd0" identifier + number_literal) )))) != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    operator_delete__(*(void **)(this + 0xd0));\n  }" { (expression_statement "operator_delete__(*(void **)(this + 0xd0));" (call_expression "operator_delete__(*(void **)(this + 0xd0))" identifier (argument_list "(*(void **)(this + 0xd0))" ( (pointer_expression "*(void **)(this + 0xd0)" * (cast_expression "(void **)(this + 0xd0)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(this + 0xd0)" ( (binary_expression "this + 0xd0" identifier + number_literal) )))) ))) ;) })) (expression_statement "*(undefined8 *)(this + 0xd0) = 0;" (assignment_expression "*(undefined8 *)(this + 0xd0) = 0" (pointer_expression "*(undefined8 *)(this + 0xd0)" * (cast_expression "(undefined8 *)(this + 0xd0)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0xd0)" ( (binary_expression "this + 0xd0" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined8 *)(this + 0xd8) = 0;" (assignment_expression "*(undefined8 *)(this + 0xd8) = 0" (pointer_expression "*(undefined8 *)(this + 0xd8)" * (cast_expression "(undefined8 *)(this + 0xd8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0xd8)" ( (binary_expression "this + 0xd8" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined8 *)(this + 0xe0) = 0;" (assignment_expression "*(undefined8 *)(this + 0xe0) = 0" (pointer_expression "*(undefined8 *)(this + 0xe0)" * (cast_expression "(undefined8 *)(this + 0xe0)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0xe0)" ( (binary_expression "this + 0xe0" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined8 *)(this + 0xe8) = 0;" (assignment_expression "*(undefined8 *)(this + 0xe8) = 0" (pointer_expression "*(undefined8 *)(this + 0xe8)" * (cast_expression "(undefined8 *)(this + 0xe8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0xe8)" ( (binary_expression "this + 0xe8" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_0031c7d0(long param_1)\n\n{\n  if (*(char *)(param_1 + 0xa8) != '\0') {\n    if (*(long *)(param_1 + 0x98) != 0) {\n      thunk_FUN_002f1e60();\n    }\n    *(undefined8 *)(param_1 + 0x98) = 0;\n    *(undefined1 *)(param_1 + 0xa8) = 0;\n  }\n  if (*(long *)(param_1 + 0xd0) != 0) {\n    thunk_FUN_002f1e60();\n  }\n  *(undefined8 *)(param_1 + 0xd0) = 0;\n  *(undefined8 *)(param_1 + 0xd8) = 0;\n  *(undefined8 *)(param_1 + 0xe0) = 0;\n  *(undefined8 *)(param_1 + 0xe8) = 0;\n  return;\n}\n\n" (function_definition "void FUN_0031c7d0(long param_1)\n\n{\n  if (*(char *)(param_1 + 0xa8) != '\0') {\n    if (*(long *)(param_1 + 0x98) != 0) {\n      thunk_FUN_002f1e60();\n    }\n    *(undefined8 *)(param_1 + 0x98) = 0;\n    *(undefined1 *)(param_1 + 0xa8) = 0;\n  }\n  if (*(long *)(param_1 + 0xd0) != 0) {\n    thunk_FUN_002f1e60();\n  }\n  *(undefined8 *)(param_1 + 0xd0) = 0;\n  *(undefined8 *)(param_1 + 0xd8) = 0;\n  *(undefined8 *)(param_1 + 0xe0) = 0;\n  *(undefined8 *)(param_1 + 0xe8) = 0;\n  return;\n}" primitive_type (function_declarator "FUN_0031c7d0(long param_1)" identifier (parameter_list "(long param_1)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  if (*(char *)(param_1 + 0xa8) != '\0') {\n    if (*(long *)(param_1 + 0x98) != 0) {\n      thunk_FUN_002f1e60();\n    }\n    *(undefined8 *)(param_1 + 0x98) = 0;\n    *(undefined1 *)(param_1 + 0xa8) = 0;\n  }\n  if (*(long *)(param_1 + 0xd0) != 0) {\n    thunk_FUN_002f1e60();\n  }\n  *(undefined8 *)(param_1 + 0xd0) = 0;\n  *(undefined8 *)(param_1 + 0xd8) = 0;\n  *(undefined8 *)(param_1 + 0xe0) = 0;\n  *(undefined8 *)(param_1 + 0xe8) = 0;\n  return;\n}" { (if_statement "if (*(char *)(param_1 + 0xa8) != '\0') {\n    if (*(long *)(param_1 + 0x98) != 0) {\n      thunk_FUN_002f1e60();\n    }\n    *(undefined8 *)(param_1 + 0x98) = 0;\n    *(undefined1 *)(param_1 + 0xa8) = 0;\n  }" if (parenthesized_expression "(*(char *)(param_1 + 0xa8) != '\0')" ( (binary_expression "*(char *)(param_1 + 0xa8) != '\0'" (pointer_expression "*(char *)(param_1 + 0xa8)" * (cast_expression "(char *)(param_1 + 0xa8)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xa8)" ( (binary_expression "param_1 + 0xa8" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    if (*(long *)(param_1 + 0x98) != 0) {\n      thunk_FUN_002f1e60();\n    }\n    *(undefined8 *)(param_1 + 0x98) = 0;\n    *(undefined1 *)(param_1 + 0xa8) = 0;\n  }" { (if_statement "if (*(long *)(param_1 + 0x98) != 0) {\n      thunk_FUN_002f1e60();\n    }" if (parenthesized_expression "(*(long *)(param_1 + 0x98) != 0)" ( (binary_expression "*(long *)(param_1 + 0x98) != 0" (pointer_expression "*(long *)(param_1 + 0x98)" * (cast_expression "(long *)(param_1 + 0x98)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x98)" ( (binary_expression "param_1 + 0x98" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n      thunk_FUN_002f1e60();\n    }" { (expression_statement "thunk_FUN_002f1e60();" (call_expression "thunk_FUN_002f1e60()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "*(undefined8 *)(param_1 + 0x98) = 0;" (assignment_expression "*(undefined8 *)(param_1 + 0x98) = 0" (pointer_expression "*(undefined8 *)(param_1 + 0x98)" * (cast_expression "(undefined8 *)(param_1 + 0x98)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x98)" ( (binary_expression "param_1 + 0x98" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined1 *)(param_1 + 0xa8) = 0;" (assignment_expression "*(undefined1 *)(param_1 + 0xa8) = 0" (pointer_expression "*(undefined1 *)(param_1 + 0xa8)" * (cast_expression "(undefined1 *)(param_1 + 0xa8)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xa8)" ( (binary_expression "param_1 + 0xa8" identifier + number_literal) )))) = number_literal) ;) })) (if_statement "if (*(long *)(param_1 + 0xd0) != 0) {\n    thunk_FUN_002f1e60();\n  }" if (parenthesized_expression "(*(long *)(param_1 + 0xd0) != 0)" ( (binary_expression "*(long *)(param_1 + 0xd0) != 0" (pointer_expression "*(long *)(param_1 + 0xd0)" * (cast_expression "(long *)(param_1 + 0xd0)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xd0)" ( (binary_expression "param_1 + 0xd0" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n    thunk_FUN_002f1e60();\n  }" { (expression_statement "thunk_FUN_002f1e60();" (call_expression "thunk_FUN_002f1e60()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "*(undefined8 *)(param_1 + 0xd0) = 0;" (assignment_expression "*(undefined8 *)(param_1 + 0xd0) = 0" (pointer_expression "*(undefined8 *)(param_1 + 0xd0)" * (cast_expression "(undefined8 *)(param_1 + 0xd0)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xd0)" ( (binary_expression "param_1 + 0xd0" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined8 *)(param_1 + 0xd8) = 0;" (assignment_expression "*(undefined8 *)(param_1 + 0xd8) = 0" (pointer_expression "*(undefined8 *)(param_1 + 0xd8)" * (cast_expression "(undefined8 *)(param_1 + 0xd8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xd8)" ( (binary_expression "param_1 + 0xd8" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined8 *)(param_1 + 0xe0) = 0;" (assignment_expression "*(undefined8 *)(param_1 + 0xe0) = 0" (pointer_expression "*(undefined8 *)(param_1 + 0xe0)" * (cast_expression "(undefined8 *)(param_1 + 0xe0)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xe0)" ( (binary_expression "param_1 + 0xe0" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined8 *)(param_1 + 0xe8) = 0;" (assignment_expression "*(undefined8 *)(param_1 + 0xe8) = 0" (pointer_expression "*(undefined8 *)(param_1 + 0xe8)" * (cast_expression "(undefined8 *)(param_1 + 0xe8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xe8)" ( (binary_expression "param_1 + 0xe8" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) ))) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != (char_literal ' escape_sequence ')) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (return_statement return ;) })))
(function_definition "void FUN_0031c7d0(long param_1)\n\n{\n  if (*(char *)(param_1 + 0xa8) != '\0') {\n    if (*(long *)(param_1 + 0x98) != 0) {\n      thunk_FUN_002f1e60();\n    }\n    *(undefined8 *)(param_1 + 0x98) = 0;\n    *(undefined1 *)(param_1 + 0xa8) = 0;\n  }\n  if (*(long *)(param_1 + 0xd0) != 0) {\n    thunk_FUN_002f1e60();\n  }\n  *(undefined8 *)(param_1 + 0xd0) = 0;\n  *(undefined8 *)(param_1 + 0xd8) = 0;\n  *(undefined8 *)(param_1 + 0xe0) = 0;\n  *(undefined8 *)(param_1 + 0xe8) = 0;\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0031c7d0(long param_1)" (identifier "FUN_0031c7d0") (parameter_list "(long param_1)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) () ")"))) (compound_statement "{\n  if (*(char *)(param_1 + 0xa8) != '\0') {\n    if (*(long *)(param_1 + 0x98) != 0) {\n      thunk_FUN_002f1e60();\n    }\n    *(undefined8 *)(param_1 + 0x98) = 0;\n    *(undefined1 *)(param_1 + 0xa8) = 0;\n  }\n  if (*(long *)(param_1 + 0xd0) != 0) {\n    thunk_FUN_002f1e60();\n  }\n  *(undefined8 *)(param_1 + 0xd0) = 0;\n  *(undefined8 *)(param_1 + 0xd8) = 0;\n  *(undefined8 *)(param_1 + 0xe0) = 0;\n  *(undefined8 *)(param_1 + 0xe8) = 0;\n  return;\n}" ({ "{") (if_statement "if (*(char *)(param_1 + 0xa8) != '\0') {\n    if (*(long *)(param_1 + 0x98) != 0) {\n      thunk_FUN_002f1e60();\n    }\n    *(undefined8 *)(param_1 + 0x98) = 0;\n    *(undefined1 *)(param_1 + 0xa8) = 0;\n  }" (if "if") (parenthesized_expression "(*(char *)(param_1 + 0xa8) != '\0')" (( "(") (binary_expression "*(char *)(param_1 + 0xa8) != '\0'" (pointer_expression "*(char *)(param_1 + 0xa8)" (* "*") (cast_expression "(char *)(param_1 + 0xa8)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xa8)" (( "(") (binary_expression "param_1 + 0xa8" (identifier "param_1") (+ "+") (number_literal "0xa8")) () ")")))) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    if (*(long *)(param_1 + 0x98) != 0) {\n      thunk_FUN_002f1e60();\n    }\n    *(undefined8 *)(param_1 + 0x98) = 0;\n    *(undefined1 *)(param_1 + 0xa8) = 0;\n  }" ({ "{") (if_statement "if (*(long *)(param_1 + 0x98) != 0) {\n      thunk_FUN_002f1e60();\n    }" (if "if") (parenthesized_expression "(*(long *)(param_1 + 0x98) != 0)" (( "(") (binary_expression "*(long *)(param_1 + 0x98) != 0" (pointer_expression "*(long *)(param_1 + 0x98)" (* "*") (cast_expression "(long *)(param_1 + 0x98)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x98)" (( "(") (binary_expression "param_1 + 0x98" (identifier "param_1") (+ "+") (number_literal "0x98")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      thunk_FUN_002f1e60();\n    }" ({ "{") (expression_statement "thunk_FUN_002f1e60();" (call_expression "thunk_FUN_002f1e60()" (identifier "thunk_FUN_002f1e60") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "*(undefined8 *)(param_1 + 0x98) = 0;" (assignment_expression "*(undefined8 *)(param_1 + 0x98) = 0" (pointer_expression "*(undefined8 *)(param_1 + 0x98)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0x98)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x98)" (( "(") (binary_expression "param_1 + 0x98" (identifier "param_1") (+ "+") (number_literal "0x98")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined1 *)(param_1 + 0xa8) = 0;" (assignment_expression "*(undefined1 *)(param_1 + 0xa8) = 0" (pointer_expression "*(undefined1 *)(param_1 + 0xa8)" (* "*") (cast_expression "(undefined1 *)(param_1 + 0xa8)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xa8)" (( "(") (binary_expression "param_1 + 0xa8" (identifier "param_1") (+ "+") (number_literal "0xa8")) () ")")))) (= "=") (number_literal "0")) (; ";")) (} "}"))) (if_statement "if (*(long *)(param_1 + 0xd0) != 0) {\n    thunk_FUN_002f1e60();\n  }" (if "if") (parenthesized_expression "(*(long *)(param_1 + 0xd0) != 0)" (( "(") (binary_expression "*(long *)(param_1 + 0xd0) != 0" (pointer_expression "*(long *)(param_1 + 0xd0)" (* "*") (cast_expression "(long *)(param_1 + 0xd0)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xd0)" (( "(") (binary_expression "param_1 + 0xd0" (identifier "param_1") (+ "+") (number_literal "0xd0")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    thunk_FUN_002f1e60();\n  }" ({ "{") (expression_statement "thunk_FUN_002f1e60();" (call_expression "thunk_FUN_002f1e60()" (identifier "thunk_FUN_002f1e60") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "*(undefined8 *)(param_1 + 0xd0) = 0;" (assignment_expression "*(undefined8 *)(param_1 + 0xd0) = 0" (pointer_expression "*(undefined8 *)(param_1 + 0xd0)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0xd0)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xd0)" (( "(") (binary_expression "param_1 + 0xd0" (identifier "param_1") (+ "+") (number_literal "0xd0")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined8 *)(param_1 + 0xd8) = 0;" (assignment_expression "*(undefined8 *)(param_1 + 0xd8) = 0" (pointer_expression "*(undefined8 *)(param_1 + 0xd8)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0xd8)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xd8)" (( "(") (binary_expression "param_1 + 0xd8" (identifier "param_1") (+ "+") (number_literal "0xd8")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined8 *)(param_1 + 0xe0) = 0;" (assignment_expression "*(undefined8 *)(param_1 + 0xe0) = 0" (pointer_expression "*(undefined8 *)(param_1 + 0xe0)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0xe0)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xe0)" (( "(") (binary_expression "param_1 + 0xe0" (identifier "param_1") (+ "+") (number_literal "0xe0")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined8 *)(param_1 + 0xe8) = 0;" (assignment_expression "*(undefined8 *)(param_1 + 0xe8) = 0" (pointer_expression "*(undefined8 *)(param_1 + 0xe8)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0xe8)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xe8)" (( "(") (binary_expression "param_1 + 0xe8" (identifier "param_1") (+ "+") (number_literal "0xe8")) () ")")))) (= "=") (number_literal "0")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* std::wfilebuf::_M_destroy_internal_buffer() */

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

{
  if (var_1[0xa8] != (type_1)0x0) {
    if (*(void **)(var_1 + 0x98) != (void *)0x0) {
      var_2(*(void **)(var_1 + 0x98));
    }
    *(type_2 *)(var_1 + 0x98) = 0;
    var_1[0xa8] = (type_1)0x0;
  }
  if (*(void **)(var_1 + 0xd0) != (void *)0x0) {
    var_2(*(void **)(var_1 + 0xd0));
  }
  *(type_2 *)(var_1 + 0xd0) = 0;
  *(type_2 *)(var_1 + 0xd8) = 0;
  *(type_2 *)(var_1 + 0xe0) = 0;
  *(type_2 *)(var_1 + 0xe8) = 0;
  return;
}


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

void MASKED(long param_1)

{
  if (*(char *)(param_1 + 0xa8) != '\0') {
    if (*(long *)(param_1 + 0x98) != 0) {
      thunk_FUN_002f1e60();
    }
    *(undefined8 *)(param_1 + 0x98) = 0;
    *(undefined1 *)(param_1 + 0xa8) = 0;
  }
  if (*(long *)(param_1 + 0xd0) != 0) {
    thunk_FUN_002f1e60();
  }
  *(undefined8 *)(param_1 + 0xd0) = 0;
  *(undefined8 *)(param_1 + 0xd8) = 0;
  *(undefined8 *)(param_1 + 0xe0) = 0;
  *(undefined8 *)(param_1 + 0xe8) = 0;
  return;
}

