
/* stdio_filebuf<char, std::char_traits<char> >::stdio_filebuf(int, std::_Ios_Openmode, unsigned
   long) */

void __thiscall
stdio_filebuf<char,std::char_traits<char>>::stdio_filebuf
          (stdio_filebuf<char,std::char_traits<char>> *this,int param_1,_Ios_Openmode param_2,
          ulong param_3)

{
  undefined8 uVar1;
  char cVar2;
  
  std::filebuf::filebuf((filebuf *)this);
  *(undefined ***)this = &PTR__stdio_filebuf_003f3e98;
  std::__basic_file<char>::sys_open((__basic_file<char> *)(this + 0x68),param_1,param_2);
  cVar2 = std::__basic_file<char>::is_open((__basic_file<char> *)(this + 0x68));
  if (cVar2 == '\0') {
    return;
  }
  *(_Ios_Openmode *)(this + 0x78) = param_2;
  *(ulong *)(this + 0xa0) = param_3;
                    /* try { // try from 002d403e to 002d4042 has its CatchHandler @ 002d4080 */
  std::filebuf::_M_allocate_internal_buffer((filebuf *)this);
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined2 *)(this + 0xa9) = 0;
  uVar1 = *(undefined8 *)(this + 0x98);
  *(undefined8 *)(this + 0x20) = 0;
  *(undefined8 *)(this + 8) = uVar1;
  *(undefined8 *)(this + 0x10) = uVar1;
  *(undefined8 *)(this + 0x18) = uVar1;
  *(undefined8 *)(this + 0x30) = 0;
  return;
}



void FUN_002d3fe0(undefined8 *param_1,undefined4 param_2,undefined4 param_3,undefined8 param_4)

{
  undefined8 uVar1;
  char cVar2;
  
  FUN_002cafe0();
  *param_1 = &PTR_FUN_003f3e98;
  FUN_002a2f10(param_1 + 0xd,param_2,param_3);
  cVar2 = FUN_002a2e70(param_1 + 0xd);
  if (cVar2 == '\0') {
    return;
  }
  *(undefined4 *)(param_1 + 0xf) = param_3;
  param_1[0x14] = param_4;
                    /* try { // try from 002d403e to 002d4042 has its CatchHandler @ 002d4080 */
  FUN_002cb5e0(param_1);
  param_1[5] = 0;
  *(undefined2 *)((long)param_1 + 0xa9) = 0;
  uVar1 = param_1[0x13];
  param_1[4] = 0;
  param_1[1] = uVar1;
  param_1[2] = uVar1;
  param_1[3] = uVar1;
  param_1[6] = 0;
  return;
}


PUSH R14
MOV R14,RCX
PUSH R13
MOV R13D,ESI
PUSH R12
MOV R12D,EDX
PUSH RBP
PUSH RBX
MOV RBX,RDI
LEA RBP,[RBX + 0x68]
CALL 0x002cafe0
MOV RDI,RBP
MOV EDX,R12D
MOV ESI,R13D
LEA RAX,[0x3f3e88]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
CALL 0x002a2f10
MOV RDI,RBP
CALL 0x002a2e70
TEST AL,AL
JNZ 0x002d4030
POP RBX
POP RBP
POP R12
POP R13
POP R14
RET
MOV dword ptr [RBX + 0x78],R12D
MOV RDI,RBX
MOV qword ptr [RBX + 0xa0],R14
CALL 0x002cb5e0
XOR EAX,EAX
MOV qword ptr [RBX + 0x28],0x0
MOV word ptr [RBX + 0xa9],AX
MOV RAX,qword ptr [RBX + 0x98]
MOV qword ptr [RBX + 0x20],0x0
MOV qword ptr [RBX + 0x8],RAX
MOV qword ptr [RBX + 0x10],RAX
MOV qword ptr [RBX + 0x18],RAX
MOV qword ptr [RBX + 0x30],0x0
POP RBX
POP RBP
POP R12
POP R13
POP R14
RET
(translation_unit "void FUN_002d3fe0(undefined8 *param_1,undefined4 param_2,undefined4 param_3,undefined8 param_4)\n\n{\n  undefined8 uVar1;\n  char cVar2;\n  \n  FUN_002cafe0();\n  *param_1 = &PTR_FUN_003f3e98;\n  FUN_002a2f10(param_1 + 0xd,param_2,param_3);\n  cVar2 = FUN_002a2e70(param_1 + 0xd);\n  if (cVar2 == '\0') {\n    return;\n  }\n  *(undefined4 *)(param_1 + 0xf) = param_3;\n  param_1[0x14] = param_4;\n                    /* try { // try from 002d403e to 002d4042 has its CatchHandler @ 002d4080 */\n  FUN_002cb5e0(param_1);\n  param_1[5] = 0;\n  *(undefined2 *)((long)param_1 + 0xa9) = 0;\n  uVar1 = param_1[0x13];\n  param_1[4] = 0;\n  param_1[1] = uVar1;\n  param_1[2] = uVar1;\n  param_1[3] = uVar1;\n  param_1[6] = 0;\n  return;\n}\n\n" (function_definition "void FUN_002d3fe0(undefined8 *param_1,undefined4 param_2,undefined4 param_3,undefined8 param_4)\n\n{\n  undefined8 uVar1;\n  char cVar2;\n  \n  FUN_002cafe0();\n  *param_1 = &PTR_FUN_003f3e98;\n  FUN_002a2f10(param_1 + 0xd,param_2,param_3);\n  cVar2 = FUN_002a2e70(param_1 + 0xd);\n  if (cVar2 == '\0') {\n    return;\n  }\n  *(undefined4 *)(param_1 + 0xf) = param_3;\n  param_1[0x14] = param_4;\n                    /* try { // try from 002d403e to 002d4042 has its CatchHandler @ 002d4080 */\n  FUN_002cb5e0(param_1);\n  param_1[5] = 0;\n  *(undefined2 *)((long)param_1 + 0xa9) = 0;\n  uVar1 = param_1[0x13];\n  param_1[4] = 0;\n  param_1[1] = uVar1;\n  param_1[2] = uVar1;\n  param_1[3] = uVar1;\n  param_1[6] = 0;\n  return;\n}" primitive_type (function_declarator "FUN_002d3fe0(undefined8 *param_1,undefined4 param_2,undefined4 param_3,undefined8 param_4)" identifier (parameter_list "(undefined8 *param_1,undefined4 param_2,undefined4 param_3,undefined8 param_4)" ( (parameter_declaration "undefined8 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined8 param_4" type_identifier identifier) ))) (compound_statement "{\n  undefined8 uVar1;\n  char cVar2;\n  \n  FUN_002cafe0();\n  *param_1 = &PTR_FUN_003f3e98;\n  FUN_002a2f10(param_1 + 0xd,param_2,param_3);\n  cVar2 = FUN_002a2e70(param_1 + 0xd);\n  if (cVar2 == '\0') {\n    return;\n  }\n  *(undefined4 *)(param_1 + 0xf) = param_3;\n  param_1[0x14] = param_4;\n                    /* try { // try from 002d403e to 002d4042 has its CatchHandler @ 002d4080 */\n  FUN_002cb5e0(param_1);\n  param_1[5] = 0;\n  *(undefined2 *)((long)param_1 + 0xa9) = 0;\n  uVar1 = param_1[0x13];\n  param_1[4] = 0;\n  param_1[1] = uVar1;\n  param_1[2] = uVar1;\n  param_1[3] = uVar1;\n  param_1[6] = 0;\n  return;\n}" { (declaration "undefined8 uVar1;" type_identifier identifier ;) (declaration "char cVar2;" primitive_type identifier ;) (expression_statement "FUN_002cafe0();" (call_expression "FUN_002cafe0()" identifier (argument_list "()" ( ))) ;) (expression_statement "*param_1 = &PTR_FUN_003f3e98;" (assignment_expression "*param_1 = &PTR_FUN_003f3e98" (pointer_expression "*param_1" * identifier) = (pointer_expression "&PTR_FUN_003f3e98" & identifier)) ;) (expression_statement "FUN_002a2f10(param_1 + 0xd,param_2,param_3);" (call_expression "FUN_002a2f10(param_1 + 0xd,param_2,param_3)" identifier (argument_list "(param_1 + 0xd,param_2,param_3)" ( (binary_expression "param_1 + 0xd" identifier + number_literal) , identifier , identifier ))) ;) (expression_statement "cVar2 = FUN_002a2e70(param_1 + 0xd);" (assignment_expression "cVar2 = FUN_002a2e70(param_1 + 0xd)" identifier = (call_expression "FUN_002a2e70(param_1 + 0xd)" identifier (argument_list "(param_1 + 0xd)" ( (binary_expression "param_1 + 0xd" identifier + number_literal) )))) ;) (if_statement "if (cVar2 == '\0') {\n    return;\n  }" if (parenthesized_expression "(cVar2 == '\0')" ( (binary_expression "cVar2 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "*(undefined4 *)(param_1 + 0xf) = param_3;" (assignment_expression "*(undefined4 *)(param_1 + 0xf) = param_3" (pointer_expression "*(undefined4 *)(param_1 + 0xf)" * (cast_expression "(undefined4 *)(param_1 + 0xf)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xf)" ( (binary_expression "param_1 + 0xf" identifier + number_literal) )))) = identifier) ;) (expression_statement "param_1[0x14] = param_4;" (assignment_expression "param_1[0x14] = param_4" (subscript_expression "param_1[0x14]" identifier [ number_literal ]) = identifier) ;) comment (expression_statement "FUN_002cb5e0(param_1);" (call_expression "FUN_002cb5e0(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (expression_statement "param_1[5] = 0;" (assignment_expression "param_1[5] = 0" (subscript_expression "param_1[5]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*(undefined2 *)((long)param_1 + 0xa9) = 0;" (assignment_expression "*(undefined2 *)((long)param_1 + 0xa9) = 0" (pointer_expression "*(undefined2 *)((long)param_1 + 0xa9)" * (cast_expression "(undefined2 *)((long)param_1 + 0xa9)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_1 + 0xa9)" ( (binary_expression "(long)param_1 + 0xa9" (cast_expression "(long)param_1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) = number_literal) ;) (expression_statement "uVar1 = param_1[0x13];" (assignment_expression "uVar1 = param_1[0x13]" identifier = (subscript_expression "param_1[0x13]" identifier [ number_literal ])) ;) (expression_statement "param_1[4] = 0;" (assignment_expression "param_1[4] = 0" (subscript_expression "param_1[4]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "param_1[1] = uVar1;" (assignment_expression "param_1[1] = uVar1" (subscript_expression "param_1[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[2] = uVar1;" (assignment_expression "param_1[2] = uVar1" (subscript_expression "param_1[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[3] = uVar1;" (assignment_expression "param_1[3] = uVar1" (subscript_expression "param_1[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[6] = 0;" (assignment_expression "param_1[6] = 0" (subscript_expression "param_1[6]" identifier [ number_literal ]) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit "/* stdio_filebuf<char, std::char_traits<char> >::stdio_filebuf(int, std::_Ios_Openmode, unsigned\n   long) */\n\nvoid __thiscall\nstdio_filebuf<char,std::char_traits<char>>::stdio_filebuf\n          (stdio_filebuf<char,std::char_traits<char>> *this,int param_1,_Ios_Openmode param_2,\n          ulong param_3)\n\n{\n  undefined8 uVar1;\n  char cVar2;\n  \n  std::filebuf::filebuf((filebuf *)this);\n  *(undefined ***)this = &PTR__stdio_filebuf_003f3e98;\n  std::__basic_file<char>::sys_open((__basic_file<char> *)(this + 0x68),param_1,param_2);\n  cVar2 = std::__basic_file<char>::is_open((__basic_file<char> *)(this + 0x68));\n  if (cVar2 == '\0') {\n    return;\n  }\n  *(_Ios_Openmode *)(this + 0x78) = param_2;\n  *(ulong *)(this + 0xa0) = param_3;\n                    /* try { // try from 002d403e to 002d4042 has its CatchHandler @ 002d4080 */\n  std::filebuf::_M_allocate_internal_buffer((filebuf *)this);\n  *(undefined8 *)(this + 0x28) = 0;\n  *(undefined2 *)(this + 0xa9) = 0;\n  uVar1 = *(undefined8 *)(this + 0x98);\n  *(undefined8 *)(this + 0x20) = 0;\n  *(undefined8 *)(this + 8) = uVar1;\n  *(undefined8 *)(this + 0x10) = uVar1;\n  *(undefined8 *)(this + 0x18) = uVar1;\n  *(undefined8 *)(this + 0x30) = 0;\n  return;\n}\n\n" comment (declaration "void __thiscall\nstdio_filebuf<char,std::char_traits<char>>::stdio_filebuf\n          (stdio_filebuf<char,std::char_traits<char>> *this,int param_1,_Ios_Openmode param_2,\n          ulong param_3)\n\n{\n  undefined8 uVar1;" primitive_type (ms_call_modifier "__thiscall" __thiscall) identifier (ERROR "<char" < primitive_type) , (ERROR "std::char_traits<char>>::stdio_filebuf\n          (stdio_filebuf<char,std::char_traits<char>> *this,int param_1,_Ios_Openmode param_2,\n          ulong param_3)\n\n{\n  undefined8" identifier : : identifier < primitive_type >> : : (function_declarator "stdio_filebuf\n          (stdio_filebuf<char,std::char_traits<char>> *this,int param_1,_Ios_Openmode param_2,\n          ulong param_3)" identifier (parameter_list "(stdio_filebuf<char,std::char_traits<char>> *this,int param_1,_Ios_Openmode param_2,\n          ulong param_3)" ( (parameter_declaration "stdio_filebuf" type_identifier) (ERROR "<char" < primitive_type) , (parameter_declaration "std::char_traits<char>> *this" type_identifier (ERROR "::char_traits<char>>" : : identifier < primitive_type >>) (pointer_declarator "*this" * identifier)) , (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "_Ios_Openmode param_2" type_identifier identifier) , (parameter_declaration "ulong param_3" type_identifier identifier) ))) { identifier) identifier ;) (declaration "char cVar2;" primitive_type identifier ;) (labeled_statement "std::filebuf::filebuf((filebuf *)this);" statement_identifier : (ERROR ":" :) (labeled_statement "filebuf::filebuf((filebuf *)this);" statement_identifier : (ERROR ":" :) (expression_statement "filebuf((filebuf *)this);" (call_expression "filebuf((filebuf *)this)" identifier (argument_list "((filebuf *)this)" ( (cast_expression "(filebuf *)this" ( (type_descriptor "filebuf *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) ))) ;))) (expression_statement "*(undefined ***)this = &PTR__stdio_filebuf_003f3e98;" (assignment_expression "*(undefined ***)this = &PTR__stdio_filebuf_003f3e98" (pointer_expression "*(undefined ***)this" * (cast_expression "(undefined ***)this" ( (type_descriptor "undefined ***" type_identifier (abstract_pointer_declarator "***" * (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *)))) ) identifier)) = (pointer_expression "&PTR__stdio_filebuf_003f3e98" & identifier)) ;) (labeled_statement "std::__basic_file<char>::sys_open((__basic_file<char> *)(this + 0x68),param_1,param_2);" statement_identifier (ERROR "::__basic_file<char>:" : : (binary_expression "__basic_file<char" identifier < identifier) > :) : (expression_statement "sys_open((__basic_file<char> *)(this + 0x68),param_1,param_2);" (call_expression "sys_open((__basic_file<char> *)(this + 0x68),param_1,param_2)" identifier (argument_list "((__basic_file<char> *)(this + 0x68),param_1,param_2)" ( (call_expression "(__basic_file<char> *)(this + 0x68)" (parenthesized_expression "(__basic_file<char> *)" ( (binary_expression "__basic_file<char> *" (binary_expression "__basic_file<char" identifier < identifier) > (pointer_expression "*" * identifier)) )) (argument_list "(this + 0x68)" ( (binary_expression "this + 0x68" identifier + number_literal) ))) , identifier , identifier ))) ;)) (ERROR "cVar2 = std::__basic_file<char>::is_open((__basic_file<char> *)(this + 0x68))" (assignment_expression "cVar2 = std" identifier = identifier) : : (binary_expression "__basic_file<char>::is_open((__basic_file<char> *)(this + 0x68))" (binary_expression "__basic_file<char" identifier < identifier) > (ERROR "::" : :) (call_expression "is_open((__basic_file<char> *)(this + 0x68))" identifier (argument_list "((__basic_file<char> *)(this + 0x68))" ( (call_expression "(__basic_file<char> *)(this + 0x68)" (parenthesized_expression "(__basic_file<char> *)" ( (binary_expression "__basic_file<char> *" (binary_expression "__basic_file<char" identifier < identifier) > (pointer_expression "*" * identifier)) )) (argument_list "(this + 0x68)" ( (binary_expression "this + 0x68" identifier + number_literal) ))) ))))) (expression_statement ";" ;) (if_statement "if (cVar2 == '\0') {\n    return;\n  }" if (parenthesized_expression "(cVar2 == '\0')" ( (binary_expression "cVar2 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "*(_Ios_Openmode *)(this + 0x78) = param_2;" (assignment_expression "*(_Ios_Openmode *)(this + 0x78) = param_2" (pointer_expression "*(_Ios_Openmode *)(this + 0x78)" * (cast_expression "(_Ios_Openmode *)(this + 0x78)" ( (type_descriptor "_Ios_Openmode *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x78)" ( (binary_expression "this + 0x78" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(ulong *)(this + 0xa0) = param_3;" (assignment_expression "*(ulong *)(this + 0xa0) = param_3" (pointer_expression "*(ulong *)(this + 0xa0)" * (cast_expression "(ulong *)(this + 0xa0)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0xa0)" ( (binary_expression "this + 0xa0" identifier + number_literal) )))) = identifier) ;) comment (labeled_statement "std::filebuf::_M_allocate_internal_buffer((filebuf *)this);" statement_identifier : (ERROR ":" :) (labeled_statement "filebuf::_M_allocate_internal_buffer((filebuf *)this);" statement_identifier : (ERROR ":" :) (expression_statement "_M_allocate_internal_buffer((filebuf *)this);" (call_expression "_M_allocate_internal_buffer((filebuf *)this)" identifier (argument_list "((filebuf *)this)" ( (cast_expression "(filebuf *)this" ( (type_descriptor "filebuf *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) ))) ;))) (expression_statement "*(undefined8 *)(this + 0x28) = 0;" (assignment_expression "*(undefined8 *)(this + 0x28) = 0" (pointer_expression "*(undefined8 *)(this + 0x28)" * (cast_expression "(undefined8 *)(this + 0x28)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x28)" ( (binary_expression "this + 0x28" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined2 *)(this + 0xa9) = 0;" (assignment_expression "*(undefined2 *)(this + 0xa9) = 0" (pointer_expression "*(undefined2 *)(this + 0xa9)" * (cast_expression "(undefined2 *)(this + 0xa9)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0xa9)" ( (binary_expression "this + 0xa9" identifier + number_literal) )))) = number_literal) ;) (expression_statement "uVar1 = *(undefined8 *)(this + 0x98);" (assignment_expression "uVar1 = *(undefined8 *)(this + 0x98)" identifier = (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) ))))) ;) (expression_statement "*(undefined8 *)(this + 0x20) = 0;" (assignment_expression "*(undefined8 *)(this + 0x20) = 0" (pointer_expression "*(undefined8 *)(this + 0x20)" * (cast_expression "(undefined8 *)(this + 0x20)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x20)" ( (binary_expression "this + 0x20" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined8 *)(this + 8) = uVar1;" (assignment_expression "*(undefined8 *)(this + 8) = uVar1" (pointer_expression "*(undefined8 *)(this + 8)" * (cast_expression "(undefined8 *)(this + 8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined8 *)(this + 0x10) = uVar1;" (assignment_expression "*(undefined8 *)(this + 0x10) = uVar1" (pointer_expression "*(undefined8 *)(this + 0x10)" * (cast_expression "(undefined8 *)(this + 0x10)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x10)" ( (binary_expression "this + 0x10" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined8 *)(this + 0x18) = uVar1;" (assignment_expression "*(undefined8 *)(this + 0x18) = uVar1" (pointer_expression "*(undefined8 *)(this + 0x18)" * (cast_expression "(undefined8 *)(this + 0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x18)" ( (binary_expression "this + 0x18" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined8 *)(this + 0x30) = 0;" (assignment_expression "*(undefined8 *)(this + 0x30) = 0" (pointer_expression "*(undefined8 *)(this + 0x30)" * (cast_expression "(undefined8 *)(this + 0x30)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x30)" ( (binary_expression "this + 0x30" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) (ERROR "}" }))
(translation_unit "void FUN_002d3fe0(undefined8 *param_1,undefined4 param_2,undefined4 param_3,undefined8 param_4)\n\n{\n  undefined8 uVar1;\n  char cVar2;\n  \n  FUN_002cafe0();\n  *param_1 = &PTR_FUN_003f3e98;\n  FUN_002a2f10(param_1 + 0xd,param_2,param_3);\n  cVar2 = FUN_002a2e70(param_1 + 0xd);\n  if (cVar2 == '\0') {\n    return;\n  }\n  *(undefined4 *)(param_1 + 0xf) = param_3;\n  param_1[0x14] = param_4;\n                    \n  FUN_002cb5e0(param_1);\n  param_1[5] = 0;\n  *(undefined2 *)((long)param_1 + 0xa9) = 0;\n  uVar1 = param_1[0x13];\n  param_1[4] = 0;\n  param_1[1] = uVar1;\n  param_1[2] = uVar1;\n  param_1[3] = uVar1;\n  param_1[6] = 0;\n  return;\n}\n\n" (function_definition "void FUN_002d3fe0(undefined8 *param_1,undefined4 param_2,undefined4 param_3,undefined8 param_4)\n\n{\n  undefined8 uVar1;\n  char cVar2;\n  \n  FUN_002cafe0();\n  *param_1 = &PTR_FUN_003f3e98;\n  FUN_002a2f10(param_1 + 0xd,param_2,param_3);\n  cVar2 = FUN_002a2e70(param_1 + 0xd);\n  if (cVar2 == '\0') {\n    return;\n  }\n  *(undefined4 *)(param_1 + 0xf) = param_3;\n  param_1[0x14] = param_4;\n                    \n  FUN_002cb5e0(param_1);\n  param_1[5] = 0;\n  *(undefined2 *)((long)param_1 + 0xa9) = 0;\n  uVar1 = param_1[0x13];\n  param_1[4] = 0;\n  param_1[1] = uVar1;\n  param_1[2] = uVar1;\n  param_1[3] = uVar1;\n  param_1[6] = 0;\n  return;\n}" primitive_type (function_declarator "FUN_002d3fe0(undefined8 *param_1,undefined4 param_2,undefined4 param_3,undefined8 param_4)" identifier (parameter_list "(undefined8 *param_1,undefined4 param_2,undefined4 param_3,undefined8 param_4)" ( (parameter_declaration "undefined8 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined8 param_4" type_identifier identifier) ))) (compound_statement "{\n  undefined8 uVar1;\n  char cVar2;\n  \n  FUN_002cafe0();\n  *param_1 = &PTR_FUN_003f3e98;\n  FUN_002a2f10(param_1 + 0xd,param_2,param_3);\n  cVar2 = FUN_002a2e70(param_1 + 0xd);\n  if (cVar2 == '\0') {\n    return;\n  }\n  *(undefined4 *)(param_1 + 0xf) = param_3;\n  param_1[0x14] = param_4;\n                    \n  FUN_002cb5e0(param_1);\n  param_1[5] = 0;\n  *(undefined2 *)((long)param_1 + 0xa9) = 0;\n  uVar1 = param_1[0x13];\n  param_1[4] = 0;\n  param_1[1] = uVar1;\n  param_1[2] = uVar1;\n  param_1[3] = uVar1;\n  param_1[6] = 0;\n  return;\n}" { (declaration "undefined8 uVar1;" type_identifier identifier ;) (declaration "char cVar2;" primitive_type identifier ;) (expression_statement "FUN_002cafe0();" (call_expression "FUN_002cafe0()" identifier (argument_list "()" ( ))) ;) (expression_statement "*param_1 = &PTR_FUN_003f3e98;" (assignment_expression "*param_1 = &PTR_FUN_003f3e98" (pointer_expression "*param_1" * identifier) = (pointer_expression "&PTR_FUN_003f3e98" & identifier)) ;) (expression_statement "FUN_002a2f10(param_1 + 0xd,param_2,param_3);" (call_expression "FUN_002a2f10(param_1 + 0xd,param_2,param_3)" identifier (argument_list "(param_1 + 0xd,param_2,param_3)" ( (binary_expression "param_1 + 0xd" identifier + number_literal) , identifier , identifier ))) ;) (expression_statement "cVar2 = FUN_002a2e70(param_1 + 0xd);" (assignment_expression "cVar2 = FUN_002a2e70(param_1 + 0xd)" identifier = (call_expression "FUN_002a2e70(param_1 + 0xd)" identifier (argument_list "(param_1 + 0xd)" ( (binary_expression "param_1 + 0xd" identifier + number_literal) )))) ;) (if_statement "if (cVar2 == '\0') {\n    return;\n  }" if (parenthesized_expression "(cVar2 == '\0')" ( (binary_expression "cVar2 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "*(undefined4 *)(param_1 + 0xf) = param_3;" (assignment_expression "*(undefined4 *)(param_1 + 0xf) = param_3" (pointer_expression "*(undefined4 *)(param_1 + 0xf)" * (cast_expression "(undefined4 *)(param_1 + 0xf)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xf)" ( (binary_expression "param_1 + 0xf" identifier + number_literal) )))) = identifier) ;) (expression_statement "param_1[0x14] = param_4;" (assignment_expression "param_1[0x14] = param_4" (subscript_expression "param_1[0x14]" identifier [ number_literal ]) = identifier) ;) (expression_statement "FUN_002cb5e0(param_1);" (call_expression "FUN_002cb5e0(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (expression_statement "param_1[5] = 0;" (assignment_expression "param_1[5] = 0" (subscript_expression "param_1[5]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*(undefined2 *)((long)param_1 + 0xa9) = 0;" (assignment_expression "*(undefined2 *)((long)param_1 + 0xa9) = 0" (pointer_expression "*(undefined2 *)((long)param_1 + 0xa9)" * (cast_expression "(undefined2 *)((long)param_1 + 0xa9)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_1 + 0xa9)" ( (binary_expression "(long)param_1 + 0xa9" (cast_expression "(long)param_1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) = number_literal) ;) (expression_statement "uVar1 = param_1[0x13];" (assignment_expression "uVar1 = param_1[0x13]" identifier = (subscript_expression "param_1[0x13]" identifier [ number_literal ])) ;) (expression_statement "param_1[4] = 0;" (assignment_expression "param_1[4] = 0" (subscript_expression "param_1[4]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "param_1[1] = uVar1;" (assignment_expression "param_1[1] = uVar1" (subscript_expression "param_1[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[2] = uVar1;" (assignment_expression "param_1[2] = uVar1" (subscript_expression "param_1[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[3] = uVar1;" (assignment_expression "param_1[3] = uVar1" (subscript_expression "param_1[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[6] = 0;" (assignment_expression "param_1[6] = 0" (subscript_expression "param_1[6]" identifier [ number_literal ]) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression & IDENT)) ;) (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (char_literal ' escape_sequence ')) )) (compound_statement { (return_statement return ;) })) (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 (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + LIT) )))) = LIT) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (return_statement return ;) })))
(function_definition "void FUN_002d3fe0(undefined8 *param_1,undefined4 param_2,undefined4 param_3,undefined8 param_4)\n\n{\n  undefined8 uVar1;\n  char cVar2;\n  \n  FUN_002cafe0();\n  *param_1 = &PTR_FUN_003f3e98;\n  FUN_002a2f10(param_1 + 0xd,param_2,param_3);\n  cVar2 = FUN_002a2e70(param_1 + 0xd);\n  if (cVar2 == '\0') {\n    return;\n  }\n  *(undefined4 *)(param_1 + 0xf) = param_3;\n  param_1[0x14] = param_4;\n                    \n  FUN_002cb5e0(param_1);\n  param_1[5] = 0;\n  *(undefined2 *)((long)param_1 + 0xa9) = 0;\n  uVar1 = param_1[0x13];\n  param_1[4] = 0;\n  param_1[1] = uVar1;\n  param_1[2] = uVar1;\n  param_1[3] = uVar1;\n  param_1[6] = 0;\n  return;\n}" (primitive_type "void") (function_declarator "FUN_002d3fe0(undefined8 *param_1,undefined4 param_2,undefined4 param_3,undefined8 param_4)" (identifier "FUN_002d3fe0") (parameter_list "(undefined8 *param_1,undefined4 param_2,undefined4 param_3,undefined8 param_4)" (( "(") (parameter_declaration "undefined8 *param_1" (type_identifier "undefined8") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) (, ",") (parameter_declaration "undefined8 param_4" (type_identifier "undefined8") (identifier "param_4")) () ")"))) (compound_statement "{\n  undefined8 uVar1;\n  char cVar2;\n  \n  FUN_002cafe0();\n  *param_1 = &PTR_FUN_003f3e98;\n  FUN_002a2f10(param_1 + 0xd,param_2,param_3);\n  cVar2 = FUN_002a2e70(param_1 + 0xd);\n  if (cVar2 == '\0') {\n    return;\n  }\n  *(undefined4 *)(param_1 + 0xf) = param_3;\n  param_1[0x14] = param_4;\n                    \n  FUN_002cb5e0(param_1);\n  param_1[5] = 0;\n  *(undefined2 *)((long)param_1 + 0xa9) = 0;\n  uVar1 = param_1[0x13];\n  param_1[4] = 0;\n  param_1[1] = uVar1;\n  param_1[2] = uVar1;\n  param_1[3] = uVar1;\n  param_1[6] = 0;\n  return;\n}" ({ "{") (declaration "undefined8 uVar1;" (type_identifier "undefined8") (identifier "uVar1") (; ";")) (declaration "char cVar2;" (primitive_type "char") (identifier "cVar2") (; ";")) (expression_statement "FUN_002cafe0();" (call_expression "FUN_002cafe0()" (identifier "FUN_002cafe0") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "*param_1 = &PTR_FUN_003f3e98;" (assignment_expression "*param_1 = &PTR_FUN_003f3e98" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (pointer_expression "&PTR_FUN_003f3e98" (& "&") (identifier "PTR_FUN_003f3e98"))) (; ";")) (expression_statement "FUN_002a2f10(param_1 + 0xd,param_2,param_3);" (call_expression "FUN_002a2f10(param_1 + 0xd,param_2,param_3)" (identifier "FUN_002a2f10") (argument_list "(param_1 + 0xd,param_2,param_3)" (( "(") (binary_expression "param_1 + 0xd" (identifier "param_1") (+ "+") (number_literal "0xd")) (, ",") (identifier "param_2") (, ",") (identifier "param_3") () ")"))) (; ";")) (expression_statement "cVar2 = FUN_002a2e70(param_1 + 0xd);" (assignment_expression "cVar2 = FUN_002a2e70(param_1 + 0xd)" (identifier "cVar2") (= "=") (call_expression "FUN_002a2e70(param_1 + 0xd)" (identifier "FUN_002a2e70") (argument_list "(param_1 + 0xd)" (( "(") (binary_expression "param_1 + 0xd" (identifier "param_1") (+ "+") (number_literal "0xd")) () ")")))) (; ";")) (if_statement "if (cVar2 == '\0') {\n    return;\n  }" (if "if") (parenthesized_expression "(cVar2 == '\0')" (( "(") (binary_expression "cVar2 == '\0'" (identifier "cVar2") (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "*(undefined4 *)(param_1 + 0xf) = param_3;" (assignment_expression "*(undefined4 *)(param_1 + 0xf) = param_3" (pointer_expression "*(undefined4 *)(param_1 + 0xf)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0xf)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xf)" (( "(") (binary_expression "param_1 + 0xf" (identifier "param_1") (+ "+") (number_literal "0xf")) () ")")))) (= "=") (identifier "param_3")) (; ";")) (expression_statement "param_1[0x14] = param_4;" (assignment_expression "param_1[0x14] = param_4" (subscript_expression "param_1[0x14]" (identifier "param_1") ([ "[") (number_literal "0x14") (] "]")) (= "=") (identifier "param_4")) (; ";")) (expression_statement "FUN_002cb5e0(param_1);" (call_expression "FUN_002cb5e0(param_1)" (identifier "FUN_002cb5e0") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (expression_statement "param_1[5] = 0;" (assignment_expression "param_1[5] = 0" (subscript_expression "param_1[5]" (identifier "param_1") ([ "[") (number_literal "5") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined2 *)((long)param_1 + 0xa9) = 0;" (assignment_expression "*(undefined2 *)((long)param_1 + 0xa9) = 0" (pointer_expression "*(undefined2 *)((long)param_1 + 0xa9)" (* "*") (cast_expression "(undefined2 *)((long)param_1 + 0xa9)" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)param_1 + 0xa9)" (( "(") (binary_expression "(long)param_1 + 0xa9" (cast_expression "(long)param_1" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_1")) (+ "+") (number_literal "0xa9")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar1 = param_1[0x13];" (assignment_expression "uVar1 = param_1[0x13]" (identifier "uVar1") (= "=") (subscript_expression "param_1[0x13]" (identifier "param_1") ([ "[") (number_literal "0x13") (] "]"))) (; ";")) (expression_statement "param_1[4] = 0;" (assignment_expression "param_1[4] = 0" (subscript_expression "param_1[4]" (identifier "param_1") ([ "[") (number_literal "4") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "param_1[1] = uVar1;" (assignment_expression "param_1[1] = uVar1" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "uVar1")) (; ";")) (expression_statement "param_1[2] = uVar1;" (assignment_expression "param_1[2] = uVar1" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (= "=") (identifier "uVar1")) (; ";")) (expression_statement "param_1[3] = uVar1;" (assignment_expression "param_1[3] = uVar1" (subscript_expression "param_1[3]" (identifier "param_1") ([ "[") (number_literal "3") (] "]")) (= "=") (identifier "uVar1")) (; ";")) (expression_statement "param_1[6] = 0;" (assignment_expression "param_1[6] = 0" (subscript_expression "param_1[6]" (identifier "param_1") ([ "[") (number_literal "6") (] "]")) (= "=") (number_literal "0")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* stdio_filebuf<char, std::char_traits<char> >::stdio_filebuf(int, std::_Ios_Openmode, unsigned
   long) */

void __thiscall
stdio_filebuf<char,std::char_traits<char>>::stdio_filebuf
          (stdio_filebuf<char,std::char_traits<char>> *var_5,int param_1,type_2 param_2,
          type_3 param_3)

{
  type_4 uVar1;
  char var_6;
  
  std::filebuf::var_1((var_1 *)var_5);
  *(type_1 ***)var_5 = &PTR__stdio_filebuf_003f3e98;
  std::var_3<var_4>::var_2((var_3<var_4> *)(var_5 + 0x68),param_1,param_2);
  var_6 = std::var_3<var_4>::is_open((var_3<var_4> *)(var_5 + 0x68));
  if (var_6 == '\0') {
    return;
  }
  *(type_2 *)(var_5 + 0x78) = param_2;
  *(type_3 *)(var_5 + 0xa0) = param_3;
                    /* try { // try from 002d403e to 002d4042 has its CatchHandler @ 002d4080 */
  std::filebuf::var_7((var_1 *)var_5);
  *(type_4 *)(var_5 + 0x28) = 0;
  *(type_5 *)(var_5 + 0xa9) = 0;
  uVar1 = *(type_4 *)(var_5 + 0x98);
  *(type_4 *)(var_5 + 0x20) = 0;
  *(type_4 *)(var_5 + 8) = uVar1;
  *(type_4 *)(var_5 + 0x10) = uVar1;
  *(type_4 *)(var_5 + 0x18) = uVar1;
  *(type_4 *)(var_5 + 0x30) = 0;
  return;
}


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

void MASKED(undefined8 *param_1,undefined4 param_2,undefined4 param_3,undefined8 param_4)

{
  undefined8 uVar1;
  char cVar2;
  
  FUN_002cafe0();
  *param_1 = &PTR_FUN_003f3e98;
  FUN_002a2f10(param_1 + 0xd,param_2,param_3);
  cVar2 = FUN_002a2e70(param_1 + 0xd);
  if (cVar2 == '\0') {
    return;
  }
  *(undefined4 *)(param_1 + 0xf) = param_3;
  param_1[0x14] = param_4;
                    /* try { // try from 002d403e to 002d4042 has its CatchHandler @ 002d4080 */
  FUN_002cb5e0(param_1);
  param_1[5] = 0;
  *(undefined2 *)((long)param_1 + 0xa9) = 0;
  uVar1 = param_1[0x13];
  param_1[4] = 0;
  param_1[1] = uVar1;
  param_1[2] = uVar1;
  param_1[3] = uVar1;
  param_1[6] = 0;
  return;
}

