
/* std::filebuf::close() */

filebuf * __thiscall std::filebuf::close(filebuf *this)

{
  undefined *puVar1;
  int iVar2;
  char cVar4;
  undefined4 uVar3;
  
  iVar2 = (*(code *)PTR_is_open_004c516c)(this + 0x38);
  if (iVar2 != 0) {
                    /* try { // try from 003698d0 to 003698d7 has its CatchHandler @ 00369984 */
    cVar4 = _M_terminate_output(this);
    *(undefined4 *)(this + 0x40) = 0;
    this[0x70] = (filebuf)0x0;
    _M_destroy_internal_buffer(this);
    puVar1 = PTR_close_004c5170;
    uVar3 = *(undefined4 *)(this + 0x5c);
    this[0x65] = (filebuf)0x0;
    this[0x66] = (filebuf)0x0;
    *(undefined4 *)(this + 4) = uVar3;
    *(undefined4 *)(this + 8) = uVar3;
    *(undefined4 *)(this + 0xc) = uVar3;
    *(undefined4 *)(this + 0x14) = 0;
    *(undefined4 *)(this + 0x10) = 0;
    *(undefined4 *)(this + 0x18) = 0;
    *(undefined4 *)(this + 0x4c) = *(undefined4 *)(this + 0x44);
    *(undefined4 *)(this + 0x50) = *(undefined4 *)(this + 0x48);
    *(undefined4 *)(this + 0x54) = *(undefined4 *)(this + 0x44);
    *(undefined4 *)(this + 0x58) = *(undefined4 *)(this + 0x48);
    iVar2 = (*(code *)puVar1)(this + 0x38);
    if ((iVar2 != 0) && (cVar4 == '\x01')) {
      return this;
    }
  }
  return (filebuf *)0x0;
}



/* std::filebuf::close() */

filebuf * __thiscall std::filebuf::close(filebuf *this)

{
  undefined *puVar1;
  int iVar2;
  char cVar4;
  undefined4 uVar3;
  
  iVar2 = (*(code *)PTR_is_open_004c516c)(this + 0x38);
  if (iVar2 != 0) {
                    /* try { // try from 003698d0 to 003698d7 has its CatchHandler @ 00369984 */
    cVar4 = _M_terminate_output(this);
    *(undefined4 *)(this + 0x40) = 0;
    this[0x70] = (filebuf)0x0;
    _M_destroy_internal_buffer(this);
    puVar1 = PTR_close_004c5170;
    uVar3 = *(undefined4 *)(this + 0x5c);
    this[0x65] = (filebuf)0x0;
    this[0x66] = (filebuf)0x0;
    *(undefined4 *)(this + 4) = uVar3;
    *(undefined4 *)(this + 8) = uVar3;
    *(undefined4 *)(this + 0xc) = uVar3;
    *(undefined4 *)(this + 0x14) = 0;
    *(undefined4 *)(this + 0x10) = 0;
    *(undefined4 *)(this + 0x18) = 0;
    *(undefined4 *)(this + 0x4c) = *(undefined4 *)(this + 0x44);
    *(undefined4 *)(this + 0x50) = *(undefined4 *)(this + 0x48);
    *(undefined4 *)(this + 0x54) = *(undefined4 *)(this + 0x44);
    *(undefined4 *)(this + 0x58) = *(undefined4 *)(this + 0x48);
    iVar2 = (*(code *)puVar1)(this + 0x38);
    if ((iVar2 != 0) && (cVar4 == '\x01')) {
      return this;
    }
  }
  return (filebuf *)0x0;
}


lui gp,0x16
addiu gp,gp,-0x648
addu gp,gp,t9
addiu sp,sp,-0x28
lw t9,-0x40d4(gp)
sw s2,0x20(sp)
addiu s2,a0,0x38
sw gp,0x10(sp)
sw s0,0x18(sp)
or s0,a0,zero
sw ra,0x24(sp)
or a0,s2,zero
jalr t9
_sw s1,0x1c(sp)
beq v0,zero,0x00369968
_lw gp,0x10(sp)
lw t9,-0x3ddc(gp)
or a0,s0,zero
bal 0x003696f4
_or s1,v0,zero
lw gp,0x10(sp)
xori v0,v0,0x1
andi s1,v0,0xff
lw t9,-0x3dd8(gp)
or a0,s0,zero
sw zero,0x40(s0)
bal 0x003693e4
_sb zero,0x70(s0)
or a0,s2,zero
lw gp,0x10(sp)
lw v0,0x5c(s0)
lw a1,0x44(s0)
lw v1,0x48(s0)
lw t9,-0x40d0(gp)
sb zero,0x65(s0)
sb zero,0x66(s0)
sw v0,0x4(s0)
sw v0,0x8(s0)
sw v0,0xc(s0)
sw zero,0x14(s0)
sw zero,0x10(s0)
sw zero,0x18(s0)
sw a1,0x4c(s0)
sw v1,0x50(s0)
sw a1,0x54(s0)
jalr t9
_sw v1,0x58(s0)
beq v0,zero,0x0036996c
_lw ra,0x24(sp)
bne s1,zero,0x0036996c
_or v0,s0,zero
lw s2,0x20(sp)
lw s1,0x1c(sp)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x28
lw ra,0x24(sp)
or v0,zero,zero
lw s2,0x20(sp)
lw s1,0x1c(sp)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x28
(translation_unit "/* std::filebuf::close() */\n\nfilebuf * __thiscall std::filebuf::close(filebuf *this)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  char cVar4;\n  undefined4 uVar3;\n  \n  iVar2 = (*(code *)PTR_is_open_004c516c)(this + 0x38);\n  if (iVar2 != 0) {\n                    /* try { // try from 003698d0 to 003698d7 has its CatchHandler @ 00369984 */\n    cVar4 = _M_terminate_output(this);\n    *(undefined4 *)(this + 0x40) = 0;\n    this[0x70] = (filebuf)0x0;\n    _M_destroy_internal_buffer(this);\n    puVar1 = PTR_close_004c5170;\n    uVar3 = *(undefined4 *)(this + 0x5c);\n    this[0x65] = (filebuf)0x0;\n    this[0x66] = (filebuf)0x0;\n    *(undefined4 *)(this + 4) = uVar3;\n    *(undefined4 *)(this + 8) = uVar3;\n    *(undefined4 *)(this + 0xc) = uVar3;\n    *(undefined4 *)(this + 0x14) = 0;\n    *(undefined4 *)(this + 0x10) = 0;\n    *(undefined4 *)(this + 0x18) = 0;\n    *(undefined4 *)(this + 0x4c) = *(undefined4 *)(this + 0x44);\n    *(undefined4 *)(this + 0x50) = *(undefined4 *)(this + 0x48);\n    *(undefined4 *)(this + 0x54) = *(undefined4 *)(this + 0x44);\n    *(undefined4 *)(this + 0x58) = *(undefined4 *)(this + 0x48);\n    iVar2 = (*(code *)puVar1)(this + 0x38);\n    if ((iVar2 != 0) && (cVar4 == '\x01')) {\n      return this;\n    }\n  }\n  return (filebuf *)0x0;\n}\n\n" comment (ERROR "filebuf * __thiscall std::filebuf::close(filebuf *this)" (binary_expression "filebuf * __thiscall std::filebuf::close(filebuf *this" (binary_expression "filebuf * __thiscall" identifier * identifier) (ERROR "std::filebuf::close(filebuf" identifier : : identifier : : identifier ( identifier) * identifier) )) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  char cVar4;\n  undefined4 uVar3;\n  \n  iVar2 = (*(code *)PTR_is_open_004c516c)(this + 0x38);\n  if (iVar2 != 0) {\n                    /* try { // try from 003698d0 to 003698d7 has its CatchHandler @ 00369984 */\n    cVar4 = _M_terminate_output(this);\n    *(undefined4 *)(this + 0x40) = 0;\n    this[0x70] = (filebuf)0x0;\n    _M_destroy_internal_buffer(this);\n    puVar1 = PTR_close_004c5170;\n    uVar3 = *(undefined4 *)(this + 0x5c);\n    this[0x65] = (filebuf)0x0;\n    this[0x66] = (filebuf)0x0;\n    *(undefined4 *)(this + 4) = uVar3;\n    *(undefined4 *)(this + 8) = uVar3;\n    *(undefined4 *)(this + 0xc) = uVar3;\n    *(undefined4 *)(this + 0x14) = 0;\n    *(undefined4 *)(this + 0x10) = 0;\n    *(undefined4 *)(this + 0x18) = 0;\n    *(undefined4 *)(this + 0x4c) = *(undefined4 *)(this + 0x44);\n    *(undefined4 *)(this + 0x50) = *(undefined4 *)(this + 0x48);\n    *(undefined4 *)(this + 0x54) = *(undefined4 *)(this + 0x44);\n    *(undefined4 *)(this + 0x58) = *(undefined4 *)(this + 0x48);\n    iVar2 = (*(code *)puVar1)(this + 0x38);\n    if ((iVar2 != 0) && (cVar4 == '\x01')) {\n      return this;\n    }\n  }\n  return (filebuf *)0x0;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "char cVar4;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (expression_statement "iVar2 = (*(code *)PTR_is_open_004c516c)(this + 0x38);" (assignment_expression "iVar2 = (*(code *)PTR_is_open_004c516c)(this + 0x38)" identifier = (call_expression "(*(code *)PTR_is_open_004c516c)(this + 0x38)" (parenthesized_expression "(*(code *)PTR_is_open_004c516c)" ( (pointer_expression "*(code *)PTR_is_open_004c516c" * (cast_expression "(code *)PTR_is_open_004c516c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(this + 0x38)" ( (binary_expression "this + 0x38" identifier + number_literal) )))) ;) (if_statement "if (iVar2 != 0) {\n                    /* try { // try from 003698d0 to 003698d7 has its CatchHandler @ 00369984 */\n    cVar4 = _M_terminate_output(this);\n    *(undefined4 *)(this + 0x40) = 0;\n    this[0x70] = (filebuf)0x0;\n    _M_destroy_internal_buffer(this);\n    puVar1 = PTR_close_004c5170;\n    uVar3 = *(undefined4 *)(this + 0x5c);\n    this[0x65] = (filebuf)0x0;\n    this[0x66] = (filebuf)0x0;\n    *(undefined4 *)(this + 4) = uVar3;\n    *(undefined4 *)(this + 8) = uVar3;\n    *(undefined4 *)(this + 0xc) = uVar3;\n    *(undefined4 *)(this + 0x14) = 0;\n    *(undefined4 *)(this + 0x10) = 0;\n    *(undefined4 *)(this + 0x18) = 0;\n    *(undefined4 *)(this + 0x4c) = *(undefined4 *)(this + 0x44);\n    *(undefined4 *)(this + 0x50) = *(undefined4 *)(this + 0x48);\n    *(undefined4 *)(this + 0x54) = *(undefined4 *)(this + 0x44);\n    *(undefined4 *)(this + 0x58) = *(undefined4 *)(this + 0x48);\n    iVar2 = (*(code *)puVar1)(this + 0x38);\n    if ((iVar2 != 0) && (cVar4 == '\x01')) {\n      return this;\n    }\n  }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n                    /* try { // try from 003698d0 to 003698d7 has its CatchHandler @ 00369984 */\n    cVar4 = _M_terminate_output(this);\n    *(undefined4 *)(this + 0x40) = 0;\n    this[0x70] = (filebuf)0x0;\n    _M_destroy_internal_buffer(this);\n    puVar1 = PTR_close_004c5170;\n    uVar3 = *(undefined4 *)(this + 0x5c);\n    this[0x65] = (filebuf)0x0;\n    this[0x66] = (filebuf)0x0;\n    *(undefined4 *)(this + 4) = uVar3;\n    *(undefined4 *)(this + 8) = uVar3;\n    *(undefined4 *)(this + 0xc) = uVar3;\n    *(undefined4 *)(this + 0x14) = 0;\n    *(undefined4 *)(this + 0x10) = 0;\n    *(undefined4 *)(this + 0x18) = 0;\n    *(undefined4 *)(this + 0x4c) = *(undefined4 *)(this + 0x44);\n    *(undefined4 *)(this + 0x50) = *(undefined4 *)(this + 0x48);\n    *(undefined4 *)(this + 0x54) = *(undefined4 *)(this + 0x44);\n    *(undefined4 *)(this + 0x58) = *(undefined4 *)(this + 0x48);\n    iVar2 = (*(code *)puVar1)(this + 0x38);\n    if ((iVar2 != 0) && (cVar4 == '\x01')) {\n      return this;\n    }\n  }" { comment (expression_statement "cVar4 = _M_terminate_output(this);" (assignment_expression "cVar4 = _M_terminate_output(this)" identifier = (call_expression "_M_terminate_output(this)" identifier (argument_list "(this)" ( identifier )))) ;) (expression_statement "*(undefined4 *)(this + 0x40) = 0;" (assignment_expression "*(undefined4 *)(this + 0x40) = 0" (pointer_expression "*(undefined4 *)(this + 0x40)" * (cast_expression "(undefined4 *)(this + 0x40)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x40)" ( (binary_expression "this + 0x40" identifier + number_literal) )))) = number_literal) ;) (expression_statement "this[0x70] = (filebuf)0x0;" (assignment_expression "this[0x70] = (filebuf)0x0" (subscript_expression "this[0x70]" identifier [ number_literal ]) = (cast_expression "(filebuf)0x0" ( (type_descriptor "filebuf" type_identifier) ) number_literal)) ;) (expression_statement "_M_destroy_internal_buffer(this);" (call_expression "_M_destroy_internal_buffer(this)" identifier (argument_list "(this)" ( identifier ))) ;) (expression_statement "puVar1 = PTR_close_004c5170;" (assignment_expression "puVar1 = PTR_close_004c5170" identifier = identifier) ;) (expression_statement "uVar3 = *(undefined4 *)(this + 0x5c);" (assignment_expression "uVar3 = *(undefined4 *)(this + 0x5c)" identifier = (pointer_expression "*(undefined4 *)(this + 0x5c)" * (cast_expression "(undefined4 *)(this + 0x5c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x5c)" ( (binary_expression "this + 0x5c" identifier + number_literal) ))))) ;) (expression_statement "this[0x65] = (filebuf)0x0;" (assignment_expression "this[0x65] = (filebuf)0x0" (subscript_expression "this[0x65]" identifier [ number_literal ]) = (cast_expression "(filebuf)0x0" ( (type_descriptor "filebuf" type_identifier) ) number_literal)) ;) (expression_statement "this[0x66] = (filebuf)0x0;" (assignment_expression "this[0x66] = (filebuf)0x0" (subscript_expression "this[0x66]" identifier [ number_literal ]) = (cast_expression "(filebuf)0x0" ( (type_descriptor "filebuf" type_identifier) ) number_literal)) ;) (expression_statement "*(undefined4 *)(this + 4) = uVar3;" (assignment_expression "*(undefined4 *)(this + 4) = uVar3" (pointer_expression "*(undefined4 *)(this + 4)" * (cast_expression "(undefined4 *)(this + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 4)" ( (binary_expression "this + 4" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(this + 8) = uVar3;" (assignment_expression "*(undefined4 *)(this + 8) = uVar3" (pointer_expression "*(undefined4 *)(this + 8)" * (cast_expression "(undefined4 *)(this + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(this + 0xc) = uVar3;" (assignment_expression "*(undefined4 *)(this + 0xc) = uVar3" (pointer_expression "*(undefined4 *)(this + 0xc)" * (cast_expression "(undefined4 *)(this + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0xc)" ( (binary_expression "this + 0xc" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(this + 0x14) = 0;" (assignment_expression "*(undefined4 *)(this + 0x14) = 0" (pointer_expression "*(undefined4 *)(this + 0x14)" * (cast_expression "(undefined4 *)(this + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x14)" ( (binary_expression "this + 0x14" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(this + 0x10) = 0;" (assignment_expression "*(undefined4 *)(this + 0x10) = 0" (pointer_expression "*(undefined4 *)(this + 0x10)" * (cast_expression "(undefined4 *)(this + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x10)" ( (binary_expression "this + 0x10" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(this + 0x18) = 0;" (assignment_expression "*(undefined4 *)(this + 0x18) = 0" (pointer_expression "*(undefined4 *)(this + 0x18)" * (cast_expression "(undefined4 *)(this + 0x18)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x18)" ( (binary_expression "this + 0x18" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(this + 0x4c) = *(undefined4 *)(this + 0x44);" (assignment_expression "*(undefined4 *)(this + 0x4c) = *(undefined4 *)(this + 0x44)" (pointer_expression "*(undefined4 *)(this + 0x4c)" * (cast_expression "(undefined4 *)(this + 0x4c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x4c)" ( (binary_expression "this + 0x4c" identifier + number_literal) )))) = (pointer_expression "*(undefined4 *)(this + 0x44)" * (cast_expression "(undefined4 *)(this + 0x44)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x44)" ( (binary_expression "this + 0x44" identifier + number_literal) ))))) ;) (expression_statement "*(undefined4 *)(this + 0x50) = *(undefined4 *)(this + 0x48);" (assignment_expression "*(undefined4 *)(this + 0x50) = *(undefined4 *)(this + 0x48)" (pointer_expression "*(undefined4 *)(this + 0x50)" * (cast_expression "(undefined4 *)(this + 0x50)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x50)" ( (binary_expression "this + 0x50" identifier + number_literal) )))) = (pointer_expression "*(undefined4 *)(this + 0x48)" * (cast_expression "(undefined4 *)(this + 0x48)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x48)" ( (binary_expression "this + 0x48" identifier + number_literal) ))))) ;) (expression_statement "*(undefined4 *)(this + 0x54) = *(undefined4 *)(this + 0x44);" (assignment_expression "*(undefined4 *)(this + 0x54) = *(undefined4 *)(this + 0x44)" (pointer_expression "*(undefined4 *)(this + 0x54)" * (cast_expression "(undefined4 *)(this + 0x54)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x54)" ( (binary_expression "this + 0x54" identifier + number_literal) )))) = (pointer_expression "*(undefined4 *)(this + 0x44)" * (cast_expression "(undefined4 *)(this + 0x44)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x44)" ( (binary_expression "this + 0x44" identifier + number_literal) ))))) ;) (expression_statement "*(undefined4 *)(this + 0x58) = *(undefined4 *)(this + 0x48);" (assignment_expression "*(undefined4 *)(this + 0x58) = *(undefined4 *)(this + 0x48)" (pointer_expression "*(undefined4 *)(this + 0x58)" * (cast_expression "(undefined4 *)(this + 0x58)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x58)" ( (binary_expression "this + 0x58" identifier + number_literal) )))) = (pointer_expression "*(undefined4 *)(this + 0x48)" * (cast_expression "(undefined4 *)(this + 0x48)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x48)" ( (binary_expression "this + 0x48" identifier + number_literal) ))))) ;) (expression_statement "iVar2 = (*(code *)puVar1)(this + 0x38);" (assignment_expression "iVar2 = (*(code *)puVar1)(this + 0x38)" identifier = (call_expression "(*(code *)puVar1)(this + 0x38)" (parenthesized_expression "(*(code *)puVar1)" ( (pointer_expression "*(code *)puVar1" * (cast_expression "(code *)puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(this + 0x38)" ( (binary_expression "this + 0x38" identifier + number_literal) )))) ;) (if_statement "if ((iVar2 != 0) && (cVar4 == '\x01')) {\n      return this;\n    }" if (parenthesized_expression "((iVar2 != 0) && (cVar4 == '\x01'))" ( (binary_expression "(iVar2 != 0) && (cVar4 == '\x01')" (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) && (parenthesized_expression "(cVar4 == '\x01')" ( (binary_expression "cVar4 == '\x01'" identifier == (char_literal "'\x01'" ' escape_sequence ')) ))) )) (compound_statement "{\n      return this;\n    }" { (return_statement "return this;" return identifier ;) })) })) (return_statement "return (filebuf *)0x0;" return (cast_expression "(filebuf *)0x0" ( (type_descriptor "filebuf *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) }))
(translation_unit "/* std::filebuf::close() */\n\nfilebuf * __thiscall std::filebuf::close(filebuf *this)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  char cVar4;\n  undefined4 uVar3;\n  \n  iVar2 = (*(code *)PTR_is_open_004c516c)(this + 0x38);\n  if (iVar2 != 0) {\n                    /* try { // try from 003698d0 to 003698d7 has its CatchHandler @ 00369984 */\n    cVar4 = _M_terminate_output(this);\n    *(undefined4 *)(this + 0x40) = 0;\n    this[0x70] = (filebuf)0x0;\n    _M_destroy_internal_buffer(this);\n    puVar1 = PTR_close_004c5170;\n    uVar3 = *(undefined4 *)(this + 0x5c);\n    this[0x65] = (filebuf)0x0;\n    this[0x66] = (filebuf)0x0;\n    *(undefined4 *)(this + 4) = uVar3;\n    *(undefined4 *)(this + 8) = uVar3;\n    *(undefined4 *)(this + 0xc) = uVar3;\n    *(undefined4 *)(this + 0x14) = 0;\n    *(undefined4 *)(this + 0x10) = 0;\n    *(undefined4 *)(this + 0x18) = 0;\n    *(undefined4 *)(this + 0x4c) = *(undefined4 *)(this + 0x44);\n    *(undefined4 *)(this + 0x50) = *(undefined4 *)(this + 0x48);\n    *(undefined4 *)(this + 0x54) = *(undefined4 *)(this + 0x44);\n    *(undefined4 *)(this + 0x58) = *(undefined4 *)(this + 0x48);\n    iVar2 = (*(code *)puVar1)(this + 0x38);\n    if ((iVar2 != 0) && (cVar4 == '\x01')) {\n      return this;\n    }\n  }\n  return (filebuf *)0x0;\n}\n\n" comment (ERROR "filebuf * __thiscall std::filebuf::close(filebuf *this)" (binary_expression "filebuf * __thiscall std::filebuf::close(filebuf *this" (binary_expression "filebuf * __thiscall" identifier * identifier) (ERROR "std::filebuf::close(filebuf" identifier : : identifier : : identifier ( identifier) * identifier) )) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  char cVar4;\n  undefined4 uVar3;\n  \n  iVar2 = (*(code *)PTR_is_open_004c516c)(this + 0x38);\n  if (iVar2 != 0) {\n                    /* try { // try from 003698d0 to 003698d7 has its CatchHandler @ 00369984 */\n    cVar4 = _M_terminate_output(this);\n    *(undefined4 *)(this + 0x40) = 0;\n    this[0x70] = (filebuf)0x0;\n    _M_destroy_internal_buffer(this);\n    puVar1 = PTR_close_004c5170;\n    uVar3 = *(undefined4 *)(this + 0x5c);\n    this[0x65] = (filebuf)0x0;\n    this[0x66] = (filebuf)0x0;\n    *(undefined4 *)(this + 4) = uVar3;\n    *(undefined4 *)(this + 8) = uVar3;\n    *(undefined4 *)(this + 0xc) = uVar3;\n    *(undefined4 *)(this + 0x14) = 0;\n    *(undefined4 *)(this + 0x10) = 0;\n    *(undefined4 *)(this + 0x18) = 0;\n    *(undefined4 *)(this + 0x4c) = *(undefined4 *)(this + 0x44);\n    *(undefined4 *)(this + 0x50) = *(undefined4 *)(this + 0x48);\n    *(undefined4 *)(this + 0x54) = *(undefined4 *)(this + 0x44);\n    *(undefined4 *)(this + 0x58) = *(undefined4 *)(this + 0x48);\n    iVar2 = (*(code *)puVar1)(this + 0x38);\n    if ((iVar2 != 0) && (cVar4 == '\x01')) {\n      return this;\n    }\n  }\n  return (filebuf *)0x0;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "char cVar4;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (expression_statement "iVar2 = (*(code *)PTR_is_open_004c516c)(this + 0x38);" (assignment_expression "iVar2 = (*(code *)PTR_is_open_004c516c)(this + 0x38)" identifier = (call_expression "(*(code *)PTR_is_open_004c516c)(this + 0x38)" (parenthesized_expression "(*(code *)PTR_is_open_004c516c)" ( (pointer_expression "*(code *)PTR_is_open_004c516c" * (cast_expression "(code *)PTR_is_open_004c516c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(this + 0x38)" ( (binary_expression "this + 0x38" identifier + number_literal) )))) ;) (if_statement "if (iVar2 != 0) {\n                    /* try { // try from 003698d0 to 003698d7 has its CatchHandler @ 00369984 */\n    cVar4 = _M_terminate_output(this);\n    *(undefined4 *)(this + 0x40) = 0;\n    this[0x70] = (filebuf)0x0;\n    _M_destroy_internal_buffer(this);\n    puVar1 = PTR_close_004c5170;\n    uVar3 = *(undefined4 *)(this + 0x5c);\n    this[0x65] = (filebuf)0x0;\n    this[0x66] = (filebuf)0x0;\n    *(undefined4 *)(this + 4) = uVar3;\n    *(undefined4 *)(this + 8) = uVar3;\n    *(undefined4 *)(this + 0xc) = uVar3;\n    *(undefined4 *)(this + 0x14) = 0;\n    *(undefined4 *)(this + 0x10) = 0;\n    *(undefined4 *)(this + 0x18) = 0;\n    *(undefined4 *)(this + 0x4c) = *(undefined4 *)(this + 0x44);\n    *(undefined4 *)(this + 0x50) = *(undefined4 *)(this + 0x48);\n    *(undefined4 *)(this + 0x54) = *(undefined4 *)(this + 0x44);\n    *(undefined4 *)(this + 0x58) = *(undefined4 *)(this + 0x48);\n    iVar2 = (*(code *)puVar1)(this + 0x38);\n    if ((iVar2 != 0) && (cVar4 == '\x01')) {\n      return this;\n    }\n  }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n                    /* try { // try from 003698d0 to 003698d7 has its CatchHandler @ 00369984 */\n    cVar4 = _M_terminate_output(this);\n    *(undefined4 *)(this + 0x40) = 0;\n    this[0x70] = (filebuf)0x0;\n    _M_destroy_internal_buffer(this);\n    puVar1 = PTR_close_004c5170;\n    uVar3 = *(undefined4 *)(this + 0x5c);\n    this[0x65] = (filebuf)0x0;\n    this[0x66] = (filebuf)0x0;\n    *(undefined4 *)(this + 4) = uVar3;\n    *(undefined4 *)(this + 8) = uVar3;\n    *(undefined4 *)(this + 0xc) = uVar3;\n    *(undefined4 *)(this + 0x14) = 0;\n    *(undefined4 *)(this + 0x10) = 0;\n    *(undefined4 *)(this + 0x18) = 0;\n    *(undefined4 *)(this + 0x4c) = *(undefined4 *)(this + 0x44);\n    *(undefined4 *)(this + 0x50) = *(undefined4 *)(this + 0x48);\n    *(undefined4 *)(this + 0x54) = *(undefined4 *)(this + 0x44);\n    *(undefined4 *)(this + 0x58) = *(undefined4 *)(this + 0x48);\n    iVar2 = (*(code *)puVar1)(this + 0x38);\n    if ((iVar2 != 0) && (cVar4 == '\x01')) {\n      return this;\n    }\n  }" { comment (expression_statement "cVar4 = _M_terminate_output(this);" (assignment_expression "cVar4 = _M_terminate_output(this)" identifier = (call_expression "_M_terminate_output(this)" identifier (argument_list "(this)" ( identifier )))) ;) (expression_statement "*(undefined4 *)(this + 0x40) = 0;" (assignment_expression "*(undefined4 *)(this + 0x40) = 0" (pointer_expression "*(undefined4 *)(this + 0x40)" * (cast_expression "(undefined4 *)(this + 0x40)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x40)" ( (binary_expression "this + 0x40" identifier + number_literal) )))) = number_literal) ;) (expression_statement "this[0x70] = (filebuf)0x0;" (assignment_expression "this[0x70] = (filebuf)0x0" (subscript_expression "this[0x70]" identifier [ number_literal ]) = (cast_expression "(filebuf)0x0" ( (type_descriptor "filebuf" type_identifier) ) number_literal)) ;) (expression_statement "_M_destroy_internal_buffer(this);" (call_expression "_M_destroy_internal_buffer(this)" identifier (argument_list "(this)" ( identifier ))) ;) (expression_statement "puVar1 = PTR_close_004c5170;" (assignment_expression "puVar1 = PTR_close_004c5170" identifier = identifier) ;) (expression_statement "uVar3 = *(undefined4 *)(this + 0x5c);" (assignment_expression "uVar3 = *(undefined4 *)(this + 0x5c)" identifier = (pointer_expression "*(undefined4 *)(this + 0x5c)" * (cast_expression "(undefined4 *)(this + 0x5c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x5c)" ( (binary_expression "this + 0x5c" identifier + number_literal) ))))) ;) (expression_statement "this[0x65] = (filebuf)0x0;" (assignment_expression "this[0x65] = (filebuf)0x0" (subscript_expression "this[0x65]" identifier [ number_literal ]) = (cast_expression "(filebuf)0x0" ( (type_descriptor "filebuf" type_identifier) ) number_literal)) ;) (expression_statement "this[0x66] = (filebuf)0x0;" (assignment_expression "this[0x66] = (filebuf)0x0" (subscript_expression "this[0x66]" identifier [ number_literal ]) = (cast_expression "(filebuf)0x0" ( (type_descriptor "filebuf" type_identifier) ) number_literal)) ;) (expression_statement "*(undefined4 *)(this + 4) = uVar3;" (assignment_expression "*(undefined4 *)(this + 4) = uVar3" (pointer_expression "*(undefined4 *)(this + 4)" * (cast_expression "(undefined4 *)(this + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 4)" ( (binary_expression "this + 4" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(this + 8) = uVar3;" (assignment_expression "*(undefined4 *)(this + 8) = uVar3" (pointer_expression "*(undefined4 *)(this + 8)" * (cast_expression "(undefined4 *)(this + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(this + 0xc) = uVar3;" (assignment_expression "*(undefined4 *)(this + 0xc) = uVar3" (pointer_expression "*(undefined4 *)(this + 0xc)" * (cast_expression "(undefined4 *)(this + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0xc)" ( (binary_expression "this + 0xc" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(this + 0x14) = 0;" (assignment_expression "*(undefined4 *)(this + 0x14) = 0" (pointer_expression "*(undefined4 *)(this + 0x14)" * (cast_expression "(undefined4 *)(this + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x14)" ( (binary_expression "this + 0x14" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(this + 0x10) = 0;" (assignment_expression "*(undefined4 *)(this + 0x10) = 0" (pointer_expression "*(undefined4 *)(this + 0x10)" * (cast_expression "(undefined4 *)(this + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x10)" ( (binary_expression "this + 0x10" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(this + 0x18) = 0;" (assignment_expression "*(undefined4 *)(this + 0x18) = 0" (pointer_expression "*(undefined4 *)(this + 0x18)" * (cast_expression "(undefined4 *)(this + 0x18)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x18)" ( (binary_expression "this + 0x18" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(this + 0x4c) = *(undefined4 *)(this + 0x44);" (assignment_expression "*(undefined4 *)(this + 0x4c) = *(undefined4 *)(this + 0x44)" (pointer_expression "*(undefined4 *)(this + 0x4c)" * (cast_expression "(undefined4 *)(this + 0x4c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x4c)" ( (binary_expression "this + 0x4c" identifier + number_literal) )))) = (pointer_expression "*(undefined4 *)(this + 0x44)" * (cast_expression "(undefined4 *)(this + 0x44)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x44)" ( (binary_expression "this + 0x44" identifier + number_literal) ))))) ;) (expression_statement "*(undefined4 *)(this + 0x50) = *(undefined4 *)(this + 0x48);" (assignment_expression "*(undefined4 *)(this + 0x50) = *(undefined4 *)(this + 0x48)" (pointer_expression "*(undefined4 *)(this + 0x50)" * (cast_expression "(undefined4 *)(this + 0x50)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x50)" ( (binary_expression "this + 0x50" identifier + number_literal) )))) = (pointer_expression "*(undefined4 *)(this + 0x48)" * (cast_expression "(undefined4 *)(this + 0x48)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x48)" ( (binary_expression "this + 0x48" identifier + number_literal) ))))) ;) (expression_statement "*(undefined4 *)(this + 0x54) = *(undefined4 *)(this + 0x44);" (assignment_expression "*(undefined4 *)(this + 0x54) = *(undefined4 *)(this + 0x44)" (pointer_expression "*(undefined4 *)(this + 0x54)" * (cast_expression "(undefined4 *)(this + 0x54)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x54)" ( (binary_expression "this + 0x54" identifier + number_literal) )))) = (pointer_expression "*(undefined4 *)(this + 0x44)" * (cast_expression "(undefined4 *)(this + 0x44)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x44)" ( (binary_expression "this + 0x44" identifier + number_literal) ))))) ;) (expression_statement "*(undefined4 *)(this + 0x58) = *(undefined4 *)(this + 0x48);" (assignment_expression "*(undefined4 *)(this + 0x58) = *(undefined4 *)(this + 0x48)" (pointer_expression "*(undefined4 *)(this + 0x58)" * (cast_expression "(undefined4 *)(this + 0x58)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x58)" ( (binary_expression "this + 0x58" identifier + number_literal) )))) = (pointer_expression "*(undefined4 *)(this + 0x48)" * (cast_expression "(undefined4 *)(this + 0x48)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x48)" ( (binary_expression "this + 0x48" identifier + number_literal) ))))) ;) (expression_statement "iVar2 = (*(code *)puVar1)(this + 0x38);" (assignment_expression "iVar2 = (*(code *)puVar1)(this + 0x38)" identifier = (call_expression "(*(code *)puVar1)(this + 0x38)" (parenthesized_expression "(*(code *)puVar1)" ( (pointer_expression "*(code *)puVar1" * (cast_expression "(code *)puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(this + 0x38)" ( (binary_expression "this + 0x38" identifier + number_literal) )))) ;) (if_statement "if ((iVar2 != 0) && (cVar4 == '\x01')) {\n      return this;\n    }" if (parenthesized_expression "((iVar2 != 0) && (cVar4 == '\x01'))" ( (binary_expression "(iVar2 != 0) && (cVar4 == '\x01')" (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) && (parenthesized_expression "(cVar4 == '\x01')" ( (binary_expression "cVar4 == '\x01'" identifier == (char_literal "'\x01'" ' escape_sequence ')) ))) )) (compound_statement "{\n      return this;\n    }" { (return_statement "return this;" return identifier ;) })) })) (return_statement "return (filebuf *)0x0;" return (cast_expression "(filebuf *)0x0" ( (type_descriptor "filebuf *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) }))
(translation_unit "filebuf * __thiscall std::filebuf::close(filebuf *this)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  char cVar4;\n  undefined4 uVar3;\n  \n  iVar2 = (*(code *)PTR_is_open_004c516c)(this + 0x38);\n  if (iVar2 != 0) {\n                    \n    cVar4 = _M_terminate_output(this);\n    *(undefined4 *)(this + 0x40) = 0;\n    this[0x70] = (filebuf)0x0;\n    _M_destroy_internal_buffer(this);\n    puVar1 = PTR_close_004c5170;\n    uVar3 = *(undefined4 *)(this + 0x5c);\n    this[0x65] = (filebuf)0x0;\n    this[0x66] = (filebuf)0x0;\n    *(undefined4 *)(this + 4) = uVar3;\n    *(undefined4 *)(this + 8) = uVar3;\n    *(undefined4 *)(this + 0xc) = uVar3;\n    *(undefined4 *)(this + 0x14) = 0;\n    *(undefined4 *)(this + 0x10) = 0;\n    *(undefined4 *)(this + 0x18) = 0;\n    *(undefined4 *)(this + 0x4c) = *(undefined4 *)(this + 0x44);\n    *(undefined4 *)(this + 0x50) = *(undefined4 *)(this + 0x48);\n    *(undefined4 *)(this + 0x54) = *(undefined4 *)(this + 0x44);\n    *(undefined4 *)(this + 0x58) = *(undefined4 *)(this + 0x48);\n    iVar2 = (*(code *)puVar1)(this + 0x38);\n    if ((iVar2 != 0) && (cVar4 == '\x01')) {\n      return this;\n    }\n  }\n  return (filebuf *)0x0;\n}\n\n" (ERROR "filebuf * __thiscall std::filebuf::close(filebuf *this)" (binary_expression "filebuf * __thiscall std::filebuf::close(filebuf *this" (binary_expression "filebuf * __thiscall" identifier * identifier) (ERROR "std::filebuf::close(filebuf" identifier : : identifier : : identifier ( identifier) * identifier) )) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  char cVar4;\n  undefined4 uVar3;\n  \n  iVar2 = (*(code *)PTR_is_open_004c516c)(this + 0x38);\n  if (iVar2 != 0) {\n                    \n    cVar4 = _M_terminate_output(this);\n    *(undefined4 *)(this + 0x40) = 0;\n    this[0x70] = (filebuf)0x0;\n    _M_destroy_internal_buffer(this);\n    puVar1 = PTR_close_004c5170;\n    uVar3 = *(undefined4 *)(this + 0x5c);\n    this[0x65] = (filebuf)0x0;\n    this[0x66] = (filebuf)0x0;\n    *(undefined4 *)(this + 4) = uVar3;\n    *(undefined4 *)(this + 8) = uVar3;\n    *(undefined4 *)(this + 0xc) = uVar3;\n    *(undefined4 *)(this + 0x14) = 0;\n    *(undefined4 *)(this + 0x10) = 0;\n    *(undefined4 *)(this + 0x18) = 0;\n    *(undefined4 *)(this + 0x4c) = *(undefined4 *)(this + 0x44);\n    *(undefined4 *)(this + 0x50) = *(undefined4 *)(this + 0x48);\n    *(undefined4 *)(this + 0x54) = *(undefined4 *)(this + 0x44);\n    *(undefined4 *)(this + 0x58) = *(undefined4 *)(this + 0x48);\n    iVar2 = (*(code *)puVar1)(this + 0x38);\n    if ((iVar2 != 0) && (cVar4 == '\x01')) {\n      return this;\n    }\n  }\n  return (filebuf *)0x0;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "char cVar4;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (expression_statement "iVar2 = (*(code *)PTR_is_open_004c516c)(this + 0x38);" (assignment_expression "iVar2 = (*(code *)PTR_is_open_004c516c)(this + 0x38)" identifier = (call_expression "(*(code *)PTR_is_open_004c516c)(this + 0x38)" (parenthesized_expression "(*(code *)PTR_is_open_004c516c)" ( (pointer_expression "*(code *)PTR_is_open_004c516c" * (cast_expression "(code *)PTR_is_open_004c516c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(this + 0x38)" ( (binary_expression "this + 0x38" identifier + number_literal) )))) ;) (if_statement "if (iVar2 != 0) {\n                    \n    cVar4 = _M_terminate_output(this);\n    *(undefined4 *)(this + 0x40) = 0;\n    this[0x70] = (filebuf)0x0;\n    _M_destroy_internal_buffer(this);\n    puVar1 = PTR_close_004c5170;\n    uVar3 = *(undefined4 *)(this + 0x5c);\n    this[0x65] = (filebuf)0x0;\n    this[0x66] = (filebuf)0x0;\n    *(undefined4 *)(this + 4) = uVar3;\n    *(undefined4 *)(this + 8) = uVar3;\n    *(undefined4 *)(this + 0xc) = uVar3;\n    *(undefined4 *)(this + 0x14) = 0;\n    *(undefined4 *)(this + 0x10) = 0;\n    *(undefined4 *)(this + 0x18) = 0;\n    *(undefined4 *)(this + 0x4c) = *(undefined4 *)(this + 0x44);\n    *(undefined4 *)(this + 0x50) = *(undefined4 *)(this + 0x48);\n    *(undefined4 *)(this + 0x54) = *(undefined4 *)(this + 0x44);\n    *(undefined4 *)(this + 0x58) = *(undefined4 *)(this + 0x48);\n    iVar2 = (*(code *)puVar1)(this + 0x38);\n    if ((iVar2 != 0) && (cVar4 == '\x01')) {\n      return this;\n    }\n  }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n                    \n    cVar4 = _M_terminate_output(this);\n    *(undefined4 *)(this + 0x40) = 0;\n    this[0x70] = (filebuf)0x0;\n    _M_destroy_internal_buffer(this);\n    puVar1 = PTR_close_004c5170;\n    uVar3 = *(undefined4 *)(this + 0x5c);\n    this[0x65] = (filebuf)0x0;\n    this[0x66] = (filebuf)0x0;\n    *(undefined4 *)(this + 4) = uVar3;\n    *(undefined4 *)(this + 8) = uVar3;\n    *(undefined4 *)(this + 0xc) = uVar3;\n    *(undefined4 *)(this + 0x14) = 0;\n    *(undefined4 *)(this + 0x10) = 0;\n    *(undefined4 *)(this + 0x18) = 0;\n    *(undefined4 *)(this + 0x4c) = *(undefined4 *)(this + 0x44);\n    *(undefined4 *)(this + 0x50) = *(undefined4 *)(this + 0x48);\n    *(undefined4 *)(this + 0x54) = *(undefined4 *)(this + 0x44);\n    *(undefined4 *)(this + 0x58) = *(undefined4 *)(this + 0x48);\n    iVar2 = (*(code *)puVar1)(this + 0x38);\n    if ((iVar2 != 0) && (cVar4 == '\x01')) {\n      return this;\n    }\n  }" { (expression_statement "cVar4 = _M_terminate_output(this);" (assignment_expression "cVar4 = _M_terminate_output(this)" identifier = (call_expression "_M_terminate_output(this)" identifier (argument_list "(this)" ( identifier )))) ;) (expression_statement "*(undefined4 *)(this + 0x40) = 0;" (assignment_expression "*(undefined4 *)(this + 0x40) = 0" (pointer_expression "*(undefined4 *)(this + 0x40)" * (cast_expression "(undefined4 *)(this + 0x40)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x40)" ( (binary_expression "this + 0x40" identifier + number_literal) )))) = number_literal) ;) (expression_statement "this[0x70] = (filebuf)0x0;" (assignment_expression "this[0x70] = (filebuf)0x0" (subscript_expression "this[0x70]" identifier [ number_literal ]) = (cast_expression "(filebuf)0x0" ( (type_descriptor "filebuf" type_identifier) ) number_literal)) ;) (expression_statement "_M_destroy_internal_buffer(this);" (call_expression "_M_destroy_internal_buffer(this)" identifier (argument_list "(this)" ( identifier ))) ;) (expression_statement "puVar1 = PTR_close_004c5170;" (assignment_expression "puVar1 = PTR_close_004c5170" identifier = identifier) ;) (expression_statement "uVar3 = *(undefined4 *)(this + 0x5c);" (assignment_expression "uVar3 = *(undefined4 *)(this + 0x5c)" identifier = (pointer_expression "*(undefined4 *)(this + 0x5c)" * (cast_expression "(undefined4 *)(this + 0x5c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x5c)" ( (binary_expression "this + 0x5c" identifier + number_literal) ))))) ;) (expression_statement "this[0x65] = (filebuf)0x0;" (assignment_expression "this[0x65] = (filebuf)0x0" (subscript_expression "this[0x65]" identifier [ number_literal ]) = (cast_expression "(filebuf)0x0" ( (type_descriptor "filebuf" type_identifier) ) number_literal)) ;) (expression_statement "this[0x66] = (filebuf)0x0;" (assignment_expression "this[0x66] = (filebuf)0x0" (subscript_expression "this[0x66]" identifier [ number_literal ]) = (cast_expression "(filebuf)0x0" ( (type_descriptor "filebuf" type_identifier) ) number_literal)) ;) (expression_statement "*(undefined4 *)(this + 4) = uVar3;" (assignment_expression "*(undefined4 *)(this + 4) = uVar3" (pointer_expression "*(undefined4 *)(this + 4)" * (cast_expression "(undefined4 *)(this + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 4)" ( (binary_expression "this + 4" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(this + 8) = uVar3;" (assignment_expression "*(undefined4 *)(this + 8) = uVar3" (pointer_expression "*(undefined4 *)(this + 8)" * (cast_expression "(undefined4 *)(this + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(this + 0xc) = uVar3;" (assignment_expression "*(undefined4 *)(this + 0xc) = uVar3" (pointer_expression "*(undefined4 *)(this + 0xc)" * (cast_expression "(undefined4 *)(this + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0xc)" ( (binary_expression "this + 0xc" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(this + 0x14) = 0;" (assignment_expression "*(undefined4 *)(this + 0x14) = 0" (pointer_expression "*(undefined4 *)(this + 0x14)" * (cast_expression "(undefined4 *)(this + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x14)" ( (binary_expression "this + 0x14" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(this + 0x10) = 0;" (assignment_expression "*(undefined4 *)(this + 0x10) = 0" (pointer_expression "*(undefined4 *)(this + 0x10)" * (cast_expression "(undefined4 *)(this + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x10)" ( (binary_expression "this + 0x10" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(this + 0x18) = 0;" (assignment_expression "*(undefined4 *)(this + 0x18) = 0" (pointer_expression "*(undefined4 *)(this + 0x18)" * (cast_expression "(undefined4 *)(this + 0x18)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x18)" ( (binary_expression "this + 0x18" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(this + 0x4c) = *(undefined4 *)(this + 0x44);" (assignment_expression "*(undefined4 *)(this + 0x4c) = *(undefined4 *)(this + 0x44)" (pointer_expression "*(undefined4 *)(this + 0x4c)" * (cast_expression "(undefined4 *)(this + 0x4c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x4c)" ( (binary_expression "this + 0x4c" identifier + number_literal) )))) = (pointer_expression "*(undefined4 *)(this + 0x44)" * (cast_expression "(undefined4 *)(this + 0x44)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x44)" ( (binary_expression "this + 0x44" identifier + number_literal) ))))) ;) (expression_statement "*(undefined4 *)(this + 0x50) = *(undefined4 *)(this + 0x48);" (assignment_expression "*(undefined4 *)(this + 0x50) = *(undefined4 *)(this + 0x48)" (pointer_expression "*(undefined4 *)(this + 0x50)" * (cast_expression "(undefined4 *)(this + 0x50)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x50)" ( (binary_expression "this + 0x50" identifier + number_literal) )))) = (pointer_expression "*(undefined4 *)(this + 0x48)" * (cast_expression "(undefined4 *)(this + 0x48)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x48)" ( (binary_expression "this + 0x48" identifier + number_literal) ))))) ;) (expression_statement "*(undefined4 *)(this + 0x54) = *(undefined4 *)(this + 0x44);" (assignment_expression "*(undefined4 *)(this + 0x54) = *(undefined4 *)(this + 0x44)" (pointer_expression "*(undefined4 *)(this + 0x54)" * (cast_expression "(undefined4 *)(this + 0x54)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x54)" ( (binary_expression "this + 0x54" identifier + number_literal) )))) = (pointer_expression "*(undefined4 *)(this + 0x44)" * (cast_expression "(undefined4 *)(this + 0x44)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x44)" ( (binary_expression "this + 0x44" identifier + number_literal) ))))) ;) (expression_statement "*(undefined4 *)(this + 0x58) = *(undefined4 *)(this + 0x48);" (assignment_expression "*(undefined4 *)(this + 0x58) = *(undefined4 *)(this + 0x48)" (pointer_expression "*(undefined4 *)(this + 0x58)" * (cast_expression "(undefined4 *)(this + 0x58)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x58)" ( (binary_expression "this + 0x58" identifier + number_literal) )))) = (pointer_expression "*(undefined4 *)(this + 0x48)" * (cast_expression "(undefined4 *)(this + 0x48)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x48)" ( (binary_expression "this + 0x48" identifier + number_literal) ))))) ;) (expression_statement "iVar2 = (*(code *)puVar1)(this + 0x38);" (assignment_expression "iVar2 = (*(code *)puVar1)(this + 0x38)" identifier = (call_expression "(*(code *)puVar1)(this + 0x38)" (parenthesized_expression "(*(code *)puVar1)" ( (pointer_expression "*(code *)puVar1" * (cast_expression "(code *)puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(this + 0x38)" ( (binary_expression "this + 0x38" identifier + number_literal) )))) ;) (if_statement "if ((iVar2 != 0) && (cVar4 == '\x01')) {\n      return this;\n    }" if (parenthesized_expression "((iVar2 != 0) && (cVar4 == '\x01'))" ( (binary_expression "(iVar2 != 0) && (cVar4 == '\x01')" (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) && (parenthesized_expression "(cVar4 == '\x01')" ( (binary_expression "cVar4 == '\x01'" identifier == (char_literal "'\x01'" ' escape_sequence ')) ))) )) (compound_statement "{\n      return this;\n    }" { (return_statement "return this;" return identifier ;) })) })) (return_statement "return (filebuf *)0x0;" return (cast_expression "(filebuf *)0x0" ( (type_descriptor "filebuf *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) }))
(translation_unit (ERROR (binary_expression (binary_expression IDENT * IDENT) (ERROR IDENT : : IDENT : : IDENT ( IDENT) * IDENT) )) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (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 (subscript_expression IDENT [ LIT ]) = (cast_expression ( (type_descriptor TYPE) ) LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (cast_expression ( (type_descriptor TYPE) ) LIT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (cast_expression ( (type_descriptor TYPE) ) LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (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) )))) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != LIT) )) && (parenthesized_expression ( (binary_expression IDENT == (char_literal ' escape_sequence ')) ))) )) (compound_statement { (return_statement return IDENT ;) })) })) (return_statement return (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) ;) }))
(ERROR "filebuf * __thiscall std::filebuf::close(filebuf *this)" (binary_expression "filebuf * __thiscall std::filebuf::close(filebuf *this" (binary_expression "filebuf * __thiscall" (identifier "filebuf") (* "*") (identifier "__thiscall")) (ERROR "std::filebuf::close(filebuf" (identifier "std") (: ":") (: ":") (identifier "filebuf") (: ":") (: ":") (identifier "close") (( "(") (identifier "filebuf")) (* "*") (identifier "this")) () ")")) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  char cVar4;\n  undefined4 uVar3;\n  \n  iVar2 = (*(code *)PTR_is_open_004c516c)(this + 0x38);\n  if (iVar2 != 0) {\n                    \n    cVar4 = _M_terminate_output(this);\n    *(undefined4 *)(this + 0x40) = 0;\n    this[0x70] = (filebuf)0x0;\n    _M_destroy_internal_buffer(this);\n    puVar1 = PTR_close_004c5170;\n    uVar3 = *(undefined4 *)(this + 0x5c);\n    this[0x65] = (filebuf)0x0;\n    this[0x66] = (filebuf)0x0;\n    *(undefined4 *)(this + 4) = uVar3;\n    *(undefined4 *)(this + 8) = uVar3;\n    *(undefined4 *)(this + 0xc) = uVar3;\n    *(undefined4 *)(this + 0x14) = 0;\n    *(undefined4 *)(this + 0x10) = 0;\n    *(undefined4 *)(this + 0x18) = 0;\n    *(undefined4 *)(this + 0x4c) = *(undefined4 *)(this + 0x44);\n    *(undefined4 *)(this + 0x50) = *(undefined4 *)(this + 0x48);\n    *(undefined4 *)(this + 0x54) = *(undefined4 *)(this + 0x44);\n    *(undefined4 *)(this + 0x58) = *(undefined4 *)(this + 0x48);\n    iVar2 = (*(code *)puVar1)(this + 0x38);\n    if ((iVar2 != 0) && (cVar4 == '\x01')) {\n      return this;\n    }\n  }\n  return (filebuf *)0x0;\n}" ({ "{") (declaration "undefined *puVar1;" (type_identifier "undefined") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "char cVar4;" (primitive_type "char") (identifier "cVar4") (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (expression_statement "iVar2 = (*(code *)PTR_is_open_004c516c)(this + 0x38);" (assignment_expression "iVar2 = (*(code *)PTR_is_open_004c516c)(this + 0x38)" (identifier "iVar2") (= "=") (call_expression "(*(code *)PTR_is_open_004c516c)(this + 0x38)" (parenthesized_expression "(*(code *)PTR_is_open_004c516c)" (( "(") (pointer_expression "*(code *)PTR_is_open_004c516c" (* "*") (cast_expression "(code *)PTR_is_open_004c516c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_is_open_004c516c"))) () ")")) (argument_list "(this + 0x38)" (( "(") (binary_expression "this + 0x38" (identifier "this") (+ "+") (number_literal "0x38")) () ")")))) (; ";")) (if_statement "if (iVar2 != 0) {\n                    \n    cVar4 = _M_terminate_output(this);\n    *(undefined4 *)(this + 0x40) = 0;\n    this[0x70] = (filebuf)0x0;\n    _M_destroy_internal_buffer(this);\n    puVar1 = PTR_close_004c5170;\n    uVar3 = *(undefined4 *)(this + 0x5c);\n    this[0x65] = (filebuf)0x0;\n    this[0x66] = (filebuf)0x0;\n    *(undefined4 *)(this + 4) = uVar3;\n    *(undefined4 *)(this + 8) = uVar3;\n    *(undefined4 *)(this + 0xc) = uVar3;\n    *(undefined4 *)(this + 0x14) = 0;\n    *(undefined4 *)(this + 0x10) = 0;\n    *(undefined4 *)(this + 0x18) = 0;\n    *(undefined4 *)(this + 0x4c) = *(undefined4 *)(this + 0x44);\n    *(undefined4 *)(this + 0x50) = *(undefined4 *)(this + 0x48);\n    *(undefined4 *)(this + 0x54) = *(undefined4 *)(this + 0x44);\n    *(undefined4 *)(this + 0x58) = *(undefined4 *)(this + 0x48);\n    iVar2 = (*(code *)puVar1)(this + 0x38);\n    if ((iVar2 != 0) && (cVar4 == '\x01')) {\n      return this;\n    }\n  }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n                    \n    cVar4 = _M_terminate_output(this);\n    *(undefined4 *)(this + 0x40) = 0;\n    this[0x70] = (filebuf)0x0;\n    _M_destroy_internal_buffer(this);\n    puVar1 = PTR_close_004c5170;\n    uVar3 = *(undefined4 *)(this + 0x5c);\n    this[0x65] = (filebuf)0x0;\n    this[0x66] = (filebuf)0x0;\n    *(undefined4 *)(this + 4) = uVar3;\n    *(undefined4 *)(this + 8) = uVar3;\n    *(undefined4 *)(this + 0xc) = uVar3;\n    *(undefined4 *)(this + 0x14) = 0;\n    *(undefined4 *)(this + 0x10) = 0;\n    *(undefined4 *)(this + 0x18) = 0;\n    *(undefined4 *)(this + 0x4c) = *(undefined4 *)(this + 0x44);\n    *(undefined4 *)(this + 0x50) = *(undefined4 *)(this + 0x48);\n    *(undefined4 *)(this + 0x54) = *(undefined4 *)(this + 0x44);\n    *(undefined4 *)(this + 0x58) = *(undefined4 *)(this + 0x48);\n    iVar2 = (*(code *)puVar1)(this + 0x38);\n    if ((iVar2 != 0) && (cVar4 == '\x01')) {\n      return this;\n    }\n  }" ({ "{") (expression_statement "cVar4 = _M_terminate_output(this);" (assignment_expression "cVar4 = _M_terminate_output(this)" (identifier "cVar4") (= "=") (call_expression "_M_terminate_output(this)" (identifier "_M_terminate_output") (argument_list "(this)" (( "(") (identifier "this") () ")")))) (; ";")) (expression_statement "*(undefined4 *)(this + 0x40) = 0;" (assignment_expression "*(undefined4 *)(this + 0x40) = 0" (pointer_expression "*(undefined4 *)(this + 0x40)" (* "*") (cast_expression "(undefined4 *)(this + 0x40)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(this + 0x40)" (( "(") (binary_expression "this + 0x40" (identifier "this") (+ "+") (number_literal "0x40")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "this[0x70] = (filebuf)0x0;" (assignment_expression "this[0x70] = (filebuf)0x0" (subscript_expression "this[0x70]" (identifier "this") ([ "[") (number_literal "0x70") (] "]")) (= "=") (cast_expression "(filebuf)0x0" (( "(") (type_descriptor "filebuf" (type_identifier "filebuf")) () ")") (number_literal "0x0"))) (; ";")) (expression_statement "_M_destroy_internal_buffer(this);" (call_expression "_M_destroy_internal_buffer(this)" (identifier "_M_destroy_internal_buffer") (argument_list "(this)" (( "(") (identifier "this") () ")"))) (; ";")) (expression_statement "puVar1 = PTR_close_004c5170;" (assignment_expression "puVar1 = PTR_close_004c5170" (identifier "puVar1") (= "=") (identifier "PTR_close_004c5170")) (; ";")) (expression_statement "uVar3 = *(undefined4 *)(this + 0x5c);" (assignment_expression "uVar3 = *(undefined4 *)(this + 0x5c)" (identifier "uVar3") (= "=") (pointer_expression "*(undefined4 *)(this + 0x5c)" (* "*") (cast_expression "(undefined4 *)(this + 0x5c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(this + 0x5c)" (( "(") (binary_expression "this + 0x5c" (identifier "this") (+ "+") (number_literal "0x5c")) () ")"))))) (; ";")) (expression_statement "this[0x65] = (filebuf)0x0;" (assignment_expression "this[0x65] = (filebuf)0x0" (subscript_expression "this[0x65]" (identifier "this") ([ "[") (number_literal "0x65") (] "]")) (= "=") (cast_expression "(filebuf)0x0" (( "(") (type_descriptor "filebuf" (type_identifier "filebuf")) () ")") (number_literal "0x0"))) (; ";")) (expression_statement "this[0x66] = (filebuf)0x0;" (assignment_expression "this[0x66] = (filebuf)0x0" (subscript_expression "this[0x66]" (identifier "this") ([ "[") (number_literal "0x66") (] "]")) (= "=") (cast_expression "(filebuf)0x0" (( "(") (type_descriptor "filebuf" (type_identifier "filebuf")) () ")") (number_literal "0x0"))) (; ";")) (expression_statement "*(undefined4 *)(this + 4) = uVar3;" (assignment_expression "*(undefined4 *)(this + 4) = uVar3" (pointer_expression "*(undefined4 *)(this + 4)" (* "*") (cast_expression "(undefined4 *)(this + 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(this + 4)" (( "(") (binary_expression "this + 4" (identifier "this") (+ "+") (number_literal "4")) () ")")))) (= "=") (identifier "uVar3")) (; ";")) (expression_statement "*(undefined4 *)(this + 8) = uVar3;" (assignment_expression "*(undefined4 *)(this + 8) = uVar3" (pointer_expression "*(undefined4 *)(this + 8)" (* "*") (cast_expression "(undefined4 *)(this + 8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(this + 8)" (( "(") (binary_expression "this + 8" (identifier "this") (+ "+") (number_literal "8")) () ")")))) (= "=") (identifier "uVar3")) (; ";")) (expression_statement "*(undefined4 *)(this + 0xc) = uVar3;" (assignment_expression "*(undefined4 *)(this + 0xc) = uVar3" (pointer_expression "*(undefined4 *)(this + 0xc)" (* "*") (cast_expression "(undefined4 *)(this + 0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(this + 0xc)" (( "(") (binary_expression "this + 0xc" (identifier "this") (+ "+") (number_literal "0xc")) () ")")))) (= "=") (identifier "uVar3")) (; ";")) (expression_statement "*(undefined4 *)(this + 0x14) = 0;" (assignment_expression "*(undefined4 *)(this + 0x14) = 0" (pointer_expression "*(undefined4 *)(this + 0x14)" (* "*") (cast_expression "(undefined4 *)(this + 0x14)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(this + 0x14)" (( "(") (binary_expression "this + 0x14" (identifier "this") (+ "+") (number_literal "0x14")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined4 *)(this + 0x10) = 0;" (assignment_expression "*(undefined4 *)(this + 0x10) = 0" (pointer_expression "*(undefined4 *)(this + 0x10)" (* "*") (cast_expression "(undefined4 *)(this + 0x10)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(this + 0x10)" (( "(") (binary_expression "this + 0x10" (identifier "this") (+ "+") (number_literal "0x10")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined4 *)(this + 0x18) = 0;" (assignment_expression "*(undefined4 *)(this + 0x18) = 0" (pointer_expression "*(undefined4 *)(this + 0x18)" (* "*") (cast_expression "(undefined4 *)(this + 0x18)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(this + 0x18)" (( "(") (binary_expression "this + 0x18" (identifier "this") (+ "+") (number_literal "0x18")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined4 *)(this + 0x4c) = *(undefined4 *)(this + 0x44);" (assignment_expression "*(undefined4 *)(this + 0x4c) = *(undefined4 *)(this + 0x44)" (pointer_expression "*(undefined4 *)(this + 0x4c)" (* "*") (cast_expression "(undefined4 *)(this + 0x4c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(this + 0x4c)" (( "(") (binary_expression "this + 0x4c" (identifier "this") (+ "+") (number_literal "0x4c")) () ")")))) (= "=") (pointer_expression "*(undefined4 *)(this + 0x44)" (* "*") (cast_expression "(undefined4 *)(this + 0x44)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(this + 0x44)" (( "(") (binary_expression "this + 0x44" (identifier "this") (+ "+") (number_literal "0x44")) () ")"))))) (; ";")) (expression_statement "*(undefined4 *)(this + 0x50) = *(undefined4 *)(this + 0x48);" (assignment_expression "*(undefined4 *)(this + 0x50) = *(undefined4 *)(this + 0x48)" (pointer_expression "*(undefined4 *)(this + 0x50)" (* "*") (cast_expression "(undefined4 *)(this + 0x50)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(this + 0x50)" (( "(") (binary_expression "this + 0x50" (identifier "this") (+ "+") (number_literal "0x50")) () ")")))) (= "=") (pointer_expression "*(undefined4 *)(this + 0x48)" (* "*") (cast_expression "(undefined4 *)(this + 0x48)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(this + 0x48)" (( "(") (binary_expression "this + 0x48" (identifier "this") (+ "+") (number_literal "0x48")) () ")"))))) (; ";")) (expression_statement "*(undefined4 *)(this + 0x54) = *(undefined4 *)(this + 0x44);" (assignment_expression "*(undefined4 *)(this + 0x54) = *(undefined4 *)(this + 0x44)" (pointer_expression "*(undefined4 *)(this + 0x54)" (* "*") (cast_expression "(undefined4 *)(this + 0x54)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(this + 0x54)" (( "(") (binary_expression "this + 0x54" (identifier "this") (+ "+") (number_literal "0x54")) () ")")))) (= "=") (pointer_expression "*(undefined4 *)(this + 0x44)" (* "*") (cast_expression "(undefined4 *)(this + 0x44)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(this + 0x44)" (( "(") (binary_expression "this + 0x44" (identifier "this") (+ "+") (number_literal "0x44")) () ")"))))) (; ";")) (expression_statement "*(undefined4 *)(this + 0x58) = *(undefined4 *)(this + 0x48);" (assignment_expression "*(undefined4 *)(this + 0x58) = *(undefined4 *)(this + 0x48)" (pointer_expression "*(undefined4 *)(this + 0x58)" (* "*") (cast_expression "(undefined4 *)(this + 0x58)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(this + 0x58)" (( "(") (binary_expression "this + 0x58" (identifier "this") (+ "+") (number_literal "0x58")) () ")")))) (= "=") (pointer_expression "*(undefined4 *)(this + 0x48)" (* "*") (cast_expression "(undefined4 *)(this + 0x48)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(this + 0x48)" (( "(") (binary_expression "this + 0x48" (identifier "this") (+ "+") (number_literal "0x48")) () ")"))))) (; ";")) (expression_statement "iVar2 = (*(code *)puVar1)(this + 0x38);" (assignment_expression "iVar2 = (*(code *)puVar1)(this + 0x38)" (identifier "iVar2") (= "=") (call_expression "(*(code *)puVar1)(this + 0x38)" (parenthesized_expression "(*(code *)puVar1)" (( "(") (pointer_expression "*(code *)puVar1" (* "*") (cast_expression "(code *)puVar1" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar1"))) () ")")) (argument_list "(this + 0x38)" (( "(") (binary_expression "this + 0x38" (identifier "this") (+ "+") (number_literal "0x38")) () ")")))) (; ";")) (if_statement "if ((iVar2 != 0) && (cVar4 == '\x01')) {\n      return this;\n    }" (if "if") (parenthesized_expression "((iVar2 != 0) && (cVar4 == '\x01'))" (( "(") (binary_expression "(iVar2 != 0) && (cVar4 == '\x01')" (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(cVar4 == '\x01')" (( "(") (binary_expression "cVar4 == '\x01'" (identifier "cVar4") (== "==") (char_literal "'\x01'" (' "'") (escape_sequence "\x01") (' "'"))) () ")"))) () ")")) (compound_statement "{\n      return this;\n    }" ({ "{") (return_statement "return this;" (return "return") (identifier "this") (; ";")) (} "}"))) (} "}"))) (return_statement "return (filebuf *)0x0;" (return "return") (cast_expression "(filebuf *)0x0" (( "(") (type_descriptor "filebuf *" (type_identifier "filebuf") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (; ";")) (} "}"))

/* std::filebuf::close() */

type_4 * __thiscall std::type_4::close(type_4 *var_1)

{
  type_1 *puVar1;
  int var_2;
  char var_5;
  type_2 uVar3;
  
  var_2 = (*(type_3 *)PTR_is_open_004c516c)(var_1 + 0x38);
  if (var_2 != 0) {
                    /* try { // try from 003698d0 to 003698d7 has its CatchHandler @ 00369984 */
    var_5 = var_3(var_1);
    *(type_2 *)(var_1 + 0x40) = 0;
    var_1[0x70] = (type_4)0x0;
    var_4(var_1);
    puVar1 = PTR_close_004c5170;
    uVar3 = *(type_2 *)(var_1 + 0x5c);
    var_1[0x65] = (type_4)0x0;
    var_1[0x66] = (type_4)0x0;
    *(type_2 *)(var_1 + 4) = uVar3;
    *(type_2 *)(var_1 + 8) = uVar3;
    *(type_2 *)(var_1 + 0xc) = uVar3;
    *(type_2 *)(var_1 + 0x14) = 0;
    *(type_2 *)(var_1 + 0x10) = 0;
    *(type_2 *)(var_1 + 0x18) = 0;
    *(type_2 *)(var_1 + 0x4c) = *(type_2 *)(var_1 + 0x44);
    *(type_2 *)(var_1 + 0x50) = *(type_2 *)(var_1 + 0x48);
    *(type_2 *)(var_1 + 0x54) = *(type_2 *)(var_1 + 0x44);
    *(type_2 *)(var_1 + 0x58) = *(type_2 *)(var_1 + 0x48);
    var_2 = (*(type_3 *)puVar1)(var_1 + 0x38);
    if ((var_2 != 0) && (var_5 == '\x01')) {
      return var_1;
    }
  }
  return (type_4 *)0x0;
}


(translation_unit (ERROR (binary_expression left: (binary_expression left: (identifier) right: (identifier)) (ERROR (identifier) (identifier) (identifier) (identifier)) right: (identifier))) (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (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: (subscript_expression argument: (identifier) index: (number_literal)) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (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))))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (number_literal)))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (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: (identifier))) (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: (identifier))) (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: (identifier))) (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: (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))))))) (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: (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))))))) (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: (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))))))) (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: (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))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (escape_sequence)))))) consequence: (compound_statement (return_statement (identifier)))))) (return_statement (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))))

/* std::filebuf::MASKED() */

filebuf * __thiscall std::filebuf::MASKED(filebuf *this)

{
  undefined *puVar1;
  int iVar2;
  char cVar4;
  undefined4 uVar3;
  
  iVar2 = (*(code *)PTR_is_open_004c516c)(this + 0x38);
  if (iVar2 != 0) {
                    /* try { // try from 003698d0 to 003698d7 has its CatchHandler @ 00369984 */
    cVar4 = _M_terminate_output(this);
    *(undefined4 *)(this + 0x40) = 0;
    this[0x70] = (filebuf)0x0;
    _M_destroy_internal_buffer(this);
    puVar1 = PTR_MASKED_004c5170;
    uVar3 = *(undefined4 *)(this + 0x5c);
    this[0x65] = (filebuf)0x0;
    this[0x66] = (filebuf)0x0;
    *(undefined4 *)(this + 4) = uVar3;
    *(undefined4 *)(this + 8) = uVar3;
    *(undefined4 *)(this + 0xc) = uVar3;
    *(undefined4 *)(this + 0x14) = 0;
    *(undefined4 *)(this + 0x10) = 0;
    *(undefined4 *)(this + 0x18) = 0;
    *(undefined4 *)(this + 0x4c) = *(undefined4 *)(this + 0x44);
    *(undefined4 *)(this + 0x50) = *(undefined4 *)(this + 0x48);
    *(undefined4 *)(this + 0x54) = *(undefined4 *)(this + 0x44);
    *(undefined4 *)(this + 0x58) = *(undefined4 *)(this + 0x48);
    iVar2 = (*(code *)puVar1)(this + 0x38);
    if ((iVar2 != 0) && (cVar4 == '\x01')) {
      return this;
    }
  }
  return (filebuf *)0x0;
}

