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

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

{
  undefined4 uVar1;
  char cVar2;
  int unaff_EDI;
  
  __x86_get_pc_thunk_di();
  std::filebuf::filebuf((filebuf *)this);
  *(int *)this = unaff_EDI + 0x203bc7;
                    /* try { // try from 003e414a to 003e4184 has its CatchHandler @ 003e41b7 */
  std::__basic_file<char>::sys_open((_IO_FILE *)(this + 0x38),(_Ios_Openmode)param_1);
  cVar2 = std::__basic_file<char>::is_open((__basic_file<char> *)(this + 0x38));
  if (cVar2 == '\0') {
    return;
  }
  *(_Ios_Openmode *)(this + 0x40) = param_2;
  *(uint *)(this + 0x60) = param_3;
  std::filebuf::_M_allocate_internal_buffer();
  uVar1 = *(undefined4 *)(this + 0x5c);
  *(undefined4 *)(this + 0x14) = 0;
  *(undefined2 *)(this + 0x65) = 0;
  *(undefined4 *)(this + 4) = uVar1;
  *(undefined4 *)(this + 8) = uVar1;
  *(undefined4 *)(this + 0xc) = uVar1;
  *(undefined4 *)(this + 0x10) = 0;
  *(undefined4 *)(this + 0x18) = 0;
  return;
}



void FUN_003e4110(int *param_1,undefined4 param_2,int param_3,int param_4)

{
  int iVar1;
  char cVar2;
  int unaff_EDI;
  
  FUN_00074f0a();
  FUN_003da940(param_1);
  *param_1 = unaff_EDI + 0x203bc7;
                    /* try { // try from 003e414a to 003e4184 has its CatchHandler @ 003e41b7 */
  FUN_003ae6c0(param_1 + 0xe,param_2,param_3);
  cVar2 = FUN_003ae6b0(param_1 + 0xe);
  if (cVar2 == '\0') {
    return;
  }
  param_1[0x10] = param_3;
  param_1[0x18] = param_4;
  FUN_003dae40(param_1);
  iVar1 = param_1[0x17];
  param_1[5] = 0;
  *(undefined2 *)((int)param_1 + 0x65) = 0;
  param_1[1] = iVar1;
  param_1[2] = iVar1;
  param_1[3] = iVar1;
  param_1[4] = 0;
  param_1[6] = 0;
  return;
}


PUSH EBP
MOV EBP,ESP
PUSH EDI
CALL 0x00074f0a
ADD EDI,0x205ee7
PUSH ESI
PUSH EBX
SUB ESP,0x28
MOV ESI,dword ptr [EBP + 0x8]
PUSH ESI
MOV EBX,EDI
CALL 0x003da940
LEA EAX,[EDI + 0xffffdcd8]
ADD ESP,0xc
ADD EAX,0x8
MOV dword ptr [ESI],EAX
LEA EAX,[ESI + 0x38]
PUSH dword ptr [EBP + 0x10]
PUSH dword ptr [EBP + 0xc]
PUSH EAX
MOV dword ptr [EBP + -0x1c],EAX
CALL 0x003ae6c0
POP ECX
PUSH dword ptr [EBP + -0x1c]
CALL 0x003ae6b0
ADD ESP,0x10
TEST AL,AL
JNZ 0x003e4170
LEA ESP,[EBP + -0xc]
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EAX,dword ptr [EBP + 0x10]
SUB ESP,0xc
MOV dword ptr [ESI + 0x40],EAX
MOV EAX,dword ptr [EBP + 0x14]
MOV dword ptr [ESI + 0x60],EAX
PUSH ESI
CALL 0x003dae40
MOV EAX,dword ptr [ESI + 0x5c]
XOR EDX,EDX
MOV dword ptr [ESI + 0x14],0x0
ADD ESP,0x10
MOV word ptr [ESI + 0x65],DX
MOV dword ptr [ESI + 0x4],EAX
MOV dword ptr [ESI + 0x8],EAX
MOV dword ptr [ESI + 0xc],EAX
MOV dword ptr [ESI + 0x10],0x0
MOV dword ptr [ESI + 0x18],0x0
LEA ESP,[EBP + -0xc]
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "void FUN_003e4110(int *param_1,undefined4 param_2,int param_3,int param_4)\n\n{\n  int iVar1;\n  char cVar2;\n  int unaff_EDI;\n  \n  FUN_00074f0a();\n  FUN_003da940(param_1);\n  *param_1 = unaff_EDI + 0x203bc7;\n                    /* try { // try from 003e414a to 003e4184 has its CatchHandler @ 003e41b7 */\n  FUN_003ae6c0(param_1 + 0xe,param_2,param_3);\n  cVar2 = FUN_003ae6b0(param_1 + 0xe);\n  if (cVar2 == '\0') {\n    return;\n  }\n  param_1[0x10] = param_3;\n  param_1[0x18] = param_4;\n  FUN_003dae40(param_1);\n  iVar1 = param_1[0x17];\n  param_1[5] = 0;\n  *(undefined2 *)((int)param_1 + 0x65) = 0;\n  param_1[1] = iVar1;\n  param_1[2] = iVar1;\n  param_1[3] = iVar1;\n  param_1[4] = 0;\n  param_1[6] = 0;\n  return;\n}\n\n" (function_definition "void FUN_003e4110(int *param_1,undefined4 param_2,int param_3,int param_4)\n\n{\n  int iVar1;\n  char cVar2;\n  int unaff_EDI;\n  \n  FUN_00074f0a();\n  FUN_003da940(param_1);\n  *param_1 = unaff_EDI + 0x203bc7;\n                    /* try { // try from 003e414a to 003e4184 has its CatchHandler @ 003e41b7 */\n  FUN_003ae6c0(param_1 + 0xe,param_2,param_3);\n  cVar2 = FUN_003ae6b0(param_1 + 0xe);\n  if (cVar2 == '\0') {\n    return;\n  }\n  param_1[0x10] = param_3;\n  param_1[0x18] = param_4;\n  FUN_003dae40(param_1);\n  iVar1 = param_1[0x17];\n  param_1[5] = 0;\n  *(undefined2 *)((int)param_1 + 0x65) = 0;\n  param_1[1] = iVar1;\n  param_1[2] = iVar1;\n  param_1[3] = iVar1;\n  param_1[4] = 0;\n  param_1[6] = 0;\n  return;\n}" primitive_type (function_declarator "FUN_003e4110(int *param_1,undefined4 param_2,int param_3,int param_4)" identifier (parameter_list "(int *param_1,undefined4 param_2,int param_3,int param_4)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  char cVar2;\n  int unaff_EDI;\n  \n  FUN_00074f0a();\n  FUN_003da940(param_1);\n  *param_1 = unaff_EDI + 0x203bc7;\n                    /* try { // try from 003e414a to 003e4184 has its CatchHandler @ 003e41b7 */\n  FUN_003ae6c0(param_1 + 0xe,param_2,param_3);\n  cVar2 = FUN_003ae6b0(param_1 + 0xe);\n  if (cVar2 == '\0') {\n    return;\n  }\n  param_1[0x10] = param_3;\n  param_1[0x18] = param_4;\n  FUN_003dae40(param_1);\n  iVar1 = param_1[0x17];\n  param_1[5] = 0;\n  *(undefined2 *)((int)param_1 + 0x65) = 0;\n  param_1[1] = iVar1;\n  param_1[2] = iVar1;\n  param_1[3] = iVar1;\n  param_1[4] = 0;\n  param_1[6] = 0;\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "char cVar2;" primitive_type identifier ;) (declaration "int unaff_EDI;" primitive_type identifier ;) (expression_statement "FUN_00074f0a();" (call_expression "FUN_00074f0a()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_003da940(param_1);" (call_expression "FUN_003da940(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (expression_statement "*param_1 = unaff_EDI + 0x203bc7;" (assignment_expression "*param_1 = unaff_EDI + 0x203bc7" (pointer_expression "*param_1" * identifier) = (binary_expression "unaff_EDI + 0x203bc7" identifier + number_literal)) ;) comment (expression_statement "FUN_003ae6c0(param_1 + 0xe,param_2,param_3);" (call_expression "FUN_003ae6c0(param_1 + 0xe,param_2,param_3)" identifier (argument_list "(param_1 + 0xe,param_2,param_3)" ( (binary_expression "param_1 + 0xe" identifier + number_literal) , identifier , identifier ))) ;) (expression_statement "cVar2 = FUN_003ae6b0(param_1 + 0xe);" (assignment_expression "cVar2 = FUN_003ae6b0(param_1 + 0xe)" identifier = (call_expression "FUN_003ae6b0(param_1 + 0xe)" identifier (argument_list "(param_1 + 0xe)" ( (binary_expression "param_1 + 0xe" 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 "param_1[0x10] = param_3;" (assignment_expression "param_1[0x10] = param_3" (subscript_expression "param_1[0x10]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[0x18] = param_4;" (assignment_expression "param_1[0x18] = param_4" (subscript_expression "param_1[0x18]" identifier [ number_literal ]) = identifier) ;) (expression_statement "FUN_003dae40(param_1);" (call_expression "FUN_003dae40(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (expression_statement "iVar1 = param_1[0x17];" (assignment_expression "iVar1 = param_1[0x17]" identifier = (subscript_expression "param_1[0x17]" identifier [ number_literal ])) ;) (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 *)((int)param_1 + 0x65) = 0;" (assignment_expression "*(undefined2 *)((int)param_1 + 0x65) = 0" (pointer_expression "*(undefined2 *)((int)param_1 + 0x65)" * (cast_expression "(undefined2 *)((int)param_1 + 0x65)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + 0x65)" ( (binary_expression "(int)param_1 + 0x65" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;) (expression_statement "param_1[1] = iVar1;" (assignment_expression "param_1[1] = iVar1" (subscript_expression "param_1[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[2] = iVar1;" (assignment_expression "param_1[2] = iVar1" (subscript_expression "param_1[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[3] = iVar1;" (assignment_expression "param_1[3] = iVar1" (subscript_expression "param_1[3]" identifier [ number_literal ]) = identifier) ;) (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[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(_IO_FILE*, std::_Ios_Openmode,\n   unsigned int) */\n\nvoid __thiscall\nstdio_filebuf<char,std::char_traits<char>>::stdio_filebuf\n          (stdio_filebuf<char,std::char_traits<char>> *this,_IO_FILE *param_1,_Ios_Openmode param_2,\n          uint param_3)\n\n{\n  undefined4 uVar1;\n  char cVar2;\n  int unaff_EDI;\n  \n  __x86_get_pc_thunk_di();\n  std::filebuf::filebuf((filebuf *)this);\n  *(int *)this = unaff_EDI + 0x203bc7;\n                    /* try { // try from 003e414a to 003e4184 has its CatchHandler @ 003e41b7 */\n  std::__basic_file<char>::sys_open((_IO_FILE *)(this + 0x38),(_Ios_Openmode)param_1);\n  cVar2 = std::__basic_file<char>::is_open((__basic_file<char> *)(this + 0x38));\n  if (cVar2 == '\0') {\n    return;\n  }\n  *(_Ios_Openmode *)(this + 0x40) = param_2;\n  *(uint *)(this + 0x60) = param_3;\n  std::filebuf::_M_allocate_internal_buffer();\n  uVar1 = *(undefined4 *)(this + 0x5c);\n  *(undefined4 *)(this + 0x14) = 0;\n  *(undefined2 *)(this + 0x65) = 0;\n  *(undefined4 *)(this + 4) = uVar1;\n  *(undefined4 *)(this + 8) = uVar1;\n  *(undefined4 *)(this + 0xc) = uVar1;\n  *(undefined4 *)(this + 0x10) = 0;\n  *(undefined4 *)(this + 0x18) = 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,_IO_FILE *param_1,_Ios_Openmode param_2,\n          uint param_3)\n\n{\n  undefined4 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,_IO_FILE *param_1,_Ios_Openmode param_2,\n          uint param_3)\n\n{\n  undefined4" identifier : : identifier < primitive_type >> : : (function_declarator "stdio_filebuf\n          (stdio_filebuf<char,std::char_traits<char>> *this,_IO_FILE *param_1,_Ios_Openmode param_2,\n          uint param_3)" identifier (parameter_list "(stdio_filebuf<char,std::char_traits<char>> *this,_IO_FILE *param_1,_Ios_Openmode param_2,\n          uint 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 "_IO_FILE *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "_Ios_Openmode param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) ))) { identifier) identifier ;) (declaration "char cVar2;" primitive_type identifier ;) (declaration "int unaff_EDI;" primitive_type identifier ;) (expression_statement "__x86_get_pc_thunk_di();" (call_expression "__x86_get_pc_thunk_di()" identifier (argument_list "()" ( ))) ;) (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 "*(int *)this = unaff_EDI + 0x203bc7;" (assignment_expression "*(int *)this = unaff_EDI + 0x203bc7" (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) = (binary_expression "unaff_EDI + 0x203bc7" identifier + number_literal)) ;) comment (labeled_statement "std::__basic_file<char>::sys_open((_IO_FILE *)(this + 0x38),(_Ios_Openmode)param_1);" statement_identifier (ERROR "::__basic_file<char>:" : : (binary_expression "__basic_file<char" identifier < identifier) > :) : (expression_statement "sys_open((_IO_FILE *)(this + 0x38),(_Ios_Openmode)param_1);" (call_expression "sys_open((_IO_FILE *)(this + 0x38),(_Ios_Openmode)param_1)" identifier (argument_list "((_IO_FILE *)(this + 0x38),(_Ios_Openmode)param_1)" ( (cast_expression "(_IO_FILE *)(this + 0x38)" ( (type_descriptor "_IO_FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x38)" ( (binary_expression "this + 0x38" identifier + number_literal) ))) , (cast_expression "(_Ios_Openmode)param_1" ( (type_descriptor "_Ios_Openmode" type_identifier) ) identifier) ))) ;)) (ERROR "cVar2 = std::__basic_file<char>::is_open((__basic_file<char> *)(this + 0x38))" (assignment_expression "cVar2 = std" identifier = identifier) : : (binary_expression "__basic_file<char>::is_open((__basic_file<char> *)(this + 0x38))" (binary_expression "__basic_file<char" identifier < identifier) > (ERROR "::" : :) (call_expression "is_open((__basic_file<char> *)(this + 0x38))" identifier (argument_list "((__basic_file<char> *)(this + 0x38))" ( (call_expression "(__basic_file<char> *)(this + 0x38)" (parenthesized_expression "(__basic_file<char> *)" ( (binary_expression "__basic_file<char> *" (binary_expression "__basic_file<char" identifier < identifier) > (pointer_expression "*" * identifier)) )) (argument_list "(this + 0x38)" ( (binary_expression "this + 0x38" 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 + 0x40) = param_2;" (assignment_expression "*(_Ios_Openmode *)(this + 0x40) = param_2" (pointer_expression "*(_Ios_Openmode *)(this + 0x40)" * (cast_expression "(_Ios_Openmode *)(this + 0x40)" ( (type_descriptor "_Ios_Openmode *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x40)" ( (binary_expression "this + 0x40" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(uint *)(this + 0x60) = param_3;" (assignment_expression "*(uint *)(this + 0x60) = param_3" (pointer_expression "*(uint *)(this + 0x60)" * (cast_expression "(uint *)(this + 0x60)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x60)" ( (binary_expression "this + 0x60" identifier + number_literal) )))) = identifier) ;) (labeled_statement "std::filebuf::_M_allocate_internal_buffer();" statement_identifier : (ERROR ":" :) (labeled_statement "filebuf::_M_allocate_internal_buffer();" statement_identifier : (ERROR ":" :) (expression_statement "_M_allocate_internal_buffer();" (call_expression "_M_allocate_internal_buffer()" identifier (argument_list "()" ( ))) ;))) (expression_statement "uVar1 = *(undefined4 *)(this + 0x5c);" (assignment_expression "uVar1 = *(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 "*(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 "*(undefined2 *)(this + 0x65) = 0;" (assignment_expression "*(undefined2 *)(this + 0x65) = 0" (pointer_expression "*(undefined2 *)(this + 0x65)" * (cast_expression "(undefined2 *)(this + 0x65)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x65)" ( (binary_expression "this + 0x65" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(this + 4) = uVar1;" (assignment_expression "*(undefined4 *)(this + 4) = uVar1" (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) = uVar1;" (assignment_expression "*(undefined4 *)(this + 8) = uVar1" (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) = uVar1;" (assignment_expression "*(undefined4 *)(this + 0xc) = uVar1" (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 + 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) ;) (return_statement "return;" return ;) (ERROR "}" }))
(translation_unit "void FUN_003e4110(int *param_1,undefined4 param_2,int param_3,int param_4)\n\n{\n  int iVar1;\n  char cVar2;\n  int unaff_EDI;\n  \n  FUN_00074f0a();\n  FUN_003da940(param_1);\n  *param_1 = unaff_EDI + 0x203bc7;\n                    \n  FUN_003ae6c0(param_1 + 0xe,param_2,param_3);\n  cVar2 = FUN_003ae6b0(param_1 + 0xe);\n  if (cVar2 == '\0') {\n    return;\n  }\n  param_1[0x10] = param_3;\n  param_1[0x18] = param_4;\n  FUN_003dae40(param_1);\n  iVar1 = param_1[0x17];\n  param_1[5] = 0;\n  *(undefined2 *)((int)param_1 + 0x65) = 0;\n  param_1[1] = iVar1;\n  param_1[2] = iVar1;\n  param_1[3] = iVar1;\n  param_1[4] = 0;\n  param_1[6] = 0;\n  return;\n}\n\n" (function_definition "void FUN_003e4110(int *param_1,undefined4 param_2,int param_3,int param_4)\n\n{\n  int iVar1;\n  char cVar2;\n  int unaff_EDI;\n  \n  FUN_00074f0a();\n  FUN_003da940(param_1);\n  *param_1 = unaff_EDI + 0x203bc7;\n                    \n  FUN_003ae6c0(param_1 + 0xe,param_2,param_3);\n  cVar2 = FUN_003ae6b0(param_1 + 0xe);\n  if (cVar2 == '\0') {\n    return;\n  }\n  param_1[0x10] = param_3;\n  param_1[0x18] = param_4;\n  FUN_003dae40(param_1);\n  iVar1 = param_1[0x17];\n  param_1[5] = 0;\n  *(undefined2 *)((int)param_1 + 0x65) = 0;\n  param_1[1] = iVar1;\n  param_1[2] = iVar1;\n  param_1[3] = iVar1;\n  param_1[4] = 0;\n  param_1[6] = 0;\n  return;\n}" primitive_type (function_declarator "FUN_003e4110(int *param_1,undefined4 param_2,int param_3,int param_4)" identifier (parameter_list "(int *param_1,undefined4 param_2,int param_3,int param_4)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  char cVar2;\n  int unaff_EDI;\n  \n  FUN_00074f0a();\n  FUN_003da940(param_1);\n  *param_1 = unaff_EDI + 0x203bc7;\n                    \n  FUN_003ae6c0(param_1 + 0xe,param_2,param_3);\n  cVar2 = FUN_003ae6b0(param_1 + 0xe);\n  if (cVar2 == '\0') {\n    return;\n  }\n  param_1[0x10] = param_3;\n  param_1[0x18] = param_4;\n  FUN_003dae40(param_1);\n  iVar1 = param_1[0x17];\n  param_1[5] = 0;\n  *(undefined2 *)((int)param_1 + 0x65) = 0;\n  param_1[1] = iVar1;\n  param_1[2] = iVar1;\n  param_1[3] = iVar1;\n  param_1[4] = 0;\n  param_1[6] = 0;\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "char cVar2;" primitive_type identifier ;) (declaration "int unaff_EDI;" primitive_type identifier ;) (expression_statement "FUN_00074f0a();" (call_expression "FUN_00074f0a()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_003da940(param_1);" (call_expression "FUN_003da940(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (expression_statement "*param_1 = unaff_EDI + 0x203bc7;" (assignment_expression "*param_1 = unaff_EDI + 0x203bc7" (pointer_expression "*param_1" * identifier) = (binary_expression "unaff_EDI + 0x203bc7" identifier + number_literal)) ;) (expression_statement "FUN_003ae6c0(param_1 + 0xe,param_2,param_3);" (call_expression "FUN_003ae6c0(param_1 + 0xe,param_2,param_3)" identifier (argument_list "(param_1 + 0xe,param_2,param_3)" ( (binary_expression "param_1 + 0xe" identifier + number_literal) , identifier , identifier ))) ;) (expression_statement "cVar2 = FUN_003ae6b0(param_1 + 0xe);" (assignment_expression "cVar2 = FUN_003ae6b0(param_1 + 0xe)" identifier = (call_expression "FUN_003ae6b0(param_1 + 0xe)" identifier (argument_list "(param_1 + 0xe)" ( (binary_expression "param_1 + 0xe" 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 "param_1[0x10] = param_3;" (assignment_expression "param_1[0x10] = param_3" (subscript_expression "param_1[0x10]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[0x18] = param_4;" (assignment_expression "param_1[0x18] = param_4" (subscript_expression "param_1[0x18]" identifier [ number_literal ]) = identifier) ;) (expression_statement "FUN_003dae40(param_1);" (call_expression "FUN_003dae40(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (expression_statement "iVar1 = param_1[0x17];" (assignment_expression "iVar1 = param_1[0x17]" identifier = (subscript_expression "param_1[0x17]" identifier [ number_literal ])) ;) (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 *)((int)param_1 + 0x65) = 0;" (assignment_expression "*(undefined2 *)((int)param_1 + 0x65) = 0" (pointer_expression "*(undefined2 *)((int)param_1 + 0x65)" * (cast_expression "(undefined2 *)((int)param_1 + 0x65)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + 0x65)" ( (binary_expression "(int)param_1 + 0x65" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;) (expression_statement "param_1[1] = iVar1;" (assignment_expression "param_1[1] = iVar1" (subscript_expression "param_1[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[2] = iVar1;" (assignment_expression "param_1[2] = iVar1" (subscript_expression "param_1[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[3] = iVar1;" (assignment_expression "param_1[3] = iVar1" (subscript_expression "param_1[3]" identifier [ number_literal ]) = identifier) ;) (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[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 ;) (declaration TYPE IDENT ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression IDENT + LIT)) ;) (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 (subscript_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 IDENT = (subscript_expression IDENT [ LIT ])) ;) (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 TYPE) ) 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) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (return_statement return ;) })))
(function_definition "void FUN_003e4110(int *param_1,undefined4 param_2,int param_3,int param_4)\n\n{\n  int iVar1;\n  char cVar2;\n  int unaff_EDI;\n  \n  FUN_00074f0a();\n  FUN_003da940(param_1);\n  *param_1 = unaff_EDI + 0x203bc7;\n                    \n  FUN_003ae6c0(param_1 + 0xe,param_2,param_3);\n  cVar2 = FUN_003ae6b0(param_1 + 0xe);\n  if (cVar2 == '\0') {\n    return;\n  }\n  param_1[0x10] = param_3;\n  param_1[0x18] = param_4;\n  FUN_003dae40(param_1);\n  iVar1 = param_1[0x17];\n  param_1[5] = 0;\n  *(undefined2 *)((int)param_1 + 0x65) = 0;\n  param_1[1] = iVar1;\n  param_1[2] = iVar1;\n  param_1[3] = iVar1;\n  param_1[4] = 0;\n  param_1[6] = 0;\n  return;\n}" (primitive_type "void") (function_declarator "FUN_003e4110(int *param_1,undefined4 param_2,int param_3,int param_4)" (identifier "FUN_003e4110") (parameter_list "(int *param_1,undefined4 param_2,int param_3,int param_4)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) (, ",") (parameter_declaration "int param_4" (primitive_type "int") (identifier "param_4")) () ")"))) (compound_statement "{\n  int iVar1;\n  char cVar2;\n  int unaff_EDI;\n  \n  FUN_00074f0a();\n  FUN_003da940(param_1);\n  *param_1 = unaff_EDI + 0x203bc7;\n                    \n  FUN_003ae6c0(param_1 + 0xe,param_2,param_3);\n  cVar2 = FUN_003ae6b0(param_1 + 0xe);\n  if (cVar2 == '\0') {\n    return;\n  }\n  param_1[0x10] = param_3;\n  param_1[0x18] = param_4;\n  FUN_003dae40(param_1);\n  iVar1 = param_1[0x17];\n  param_1[5] = 0;\n  *(undefined2 *)((int)param_1 + 0x65) = 0;\n  param_1[1] = iVar1;\n  param_1[2] = iVar1;\n  param_1[3] = iVar1;\n  param_1[4] = 0;\n  param_1[6] = 0;\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "char cVar2;" (primitive_type "char") (identifier "cVar2") (; ";")) (declaration "int unaff_EDI;" (primitive_type "int") (identifier "unaff_EDI") (; ";")) (expression_statement "FUN_00074f0a();" (call_expression "FUN_00074f0a()" (identifier "FUN_00074f0a") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "FUN_003da940(param_1);" (call_expression "FUN_003da940(param_1)" (identifier "FUN_003da940") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (expression_statement "*param_1 = unaff_EDI + 0x203bc7;" (assignment_expression "*param_1 = unaff_EDI + 0x203bc7" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (binary_expression "unaff_EDI + 0x203bc7" (identifier "unaff_EDI") (+ "+") (number_literal "0x203bc7"))) (; ";")) (expression_statement "FUN_003ae6c0(param_1 + 0xe,param_2,param_3);" (call_expression "FUN_003ae6c0(param_1 + 0xe,param_2,param_3)" (identifier "FUN_003ae6c0") (argument_list "(param_1 + 0xe,param_2,param_3)" (( "(") (binary_expression "param_1 + 0xe" (identifier "param_1") (+ "+") (number_literal "0xe")) (, ",") (identifier "param_2") (, ",") (identifier "param_3") () ")"))) (; ";")) (expression_statement "cVar2 = FUN_003ae6b0(param_1 + 0xe);" (assignment_expression "cVar2 = FUN_003ae6b0(param_1 + 0xe)" (identifier "cVar2") (= "=") (call_expression "FUN_003ae6b0(param_1 + 0xe)" (identifier "FUN_003ae6b0") (argument_list "(param_1 + 0xe)" (( "(") (binary_expression "param_1 + 0xe" (identifier "param_1") (+ "+") (number_literal "0xe")) () ")")))) (; ";")) (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 "param_1[0x10] = param_3;" (assignment_expression "param_1[0x10] = param_3" (subscript_expression "param_1[0x10]" (identifier "param_1") ([ "[") (number_literal "0x10") (] "]")) (= "=") (identifier "param_3")) (; ";")) (expression_statement "param_1[0x18] = param_4;" (assignment_expression "param_1[0x18] = param_4" (subscript_expression "param_1[0x18]" (identifier "param_1") ([ "[") (number_literal "0x18") (] "]")) (= "=") (identifier "param_4")) (; ";")) (expression_statement "FUN_003dae40(param_1);" (call_expression "FUN_003dae40(param_1)" (identifier "FUN_003dae40") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (expression_statement "iVar1 = param_1[0x17];" (assignment_expression "iVar1 = param_1[0x17]" (identifier "iVar1") (= "=") (subscript_expression "param_1[0x17]" (identifier "param_1") ([ "[") (number_literal "0x17") (] "]"))) (; ";")) (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 *)((int)param_1 + 0x65) = 0;" (assignment_expression "*(undefined2 *)((int)param_1 + 0x65) = 0" (pointer_expression "*(undefined2 *)((int)param_1 + 0x65)" (* "*") (cast_expression "(undefined2 *)((int)param_1 + 0x65)" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)param_1 + 0x65)" (( "(") (binary_expression "(int)param_1 + 0x65" (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1")) (+ "+") (number_literal "0x65")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "param_1[1] = iVar1;" (assignment_expression "param_1[1] = iVar1" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "iVar1")) (; ";")) (expression_statement "param_1[2] = iVar1;" (assignment_expression "param_1[2] = iVar1" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (= "=") (identifier "iVar1")) (; ";")) (expression_statement "param_1[3] = iVar1;" (assignment_expression "param_1[3] = iVar1" (subscript_expression "param_1[3]" (identifier "param_1") ([ "[") (number_literal "3") (] "]")) (= "=") (identifier "iVar1")) (; ";")) (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[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(_IO_FILE*, std::_Ios_Openmode,
   unsigned int) */

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

{
  type_4 uVar1;
  char var_6;
  int var_3;
  
  var_1();
  std::filebuf::var_2((var_2 *)var_5);
  *(int *)var_5 = var_3 + 0x203bc7;
                    /* try { // try from 003e414a to 003e4184 has its CatchHandler @ 003e41b7 */
  std::__basic_file<char>::var_4((type_1 *)(var_5 + 0x38),(type_2)param_1);
  var_6 = std::__basic_file<char>::is_open((__basic_file<char> *)(var_5 + 0x38));
  if (var_6 == '\0') {
    return;
  }
  *(type_2 *)(var_5 + 0x40) = param_2;
  *(type_3 *)(var_5 + 0x60) = param_3;
  std::filebuf::var_7();
  uVar1 = *(type_4 *)(var_5 + 0x5c);
  *(type_4 *)(var_5 + 0x14) = 0;
  *(type_5 *)(var_5 + 0x65) = 0;
  *(type_4 *)(var_5 + 4) = uVar1;
  *(type_4 *)(var_5 + 8) = uVar1;
  *(type_4 *)(var_5 + 0xc) = uVar1;
  *(type_4 *)(var_5 + 0x10) = 0;
  *(type_4 *)(var_5 + 0x18) = 0;
  return;
}


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

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

{
  int iVar1;
  char cVar2;
  int unaff_EDI;
  
  FUN_00074f0a();
  FUN_003da940(param_1);
  *param_1 = unaff_EDI + 0x203bc7;
                    /* try { // try from 003e414a to 003e4184 has its CatchHandler @ 003e41b7 */
  FUN_003ae6c0(param_1 + 0xe,param_2,param_3);
  cVar2 = FUN_003ae6b0(param_1 + 0xe);
  if (cVar2 == '\0') {
    return;
  }
  param_1[0x10] = param_3;
  param_1[0x18] = param_4;
  FUN_003dae40(param_1);
  iVar1 = param_1[0x17];
  param_1[5] = 0;
  *(undefined2 *)((int)param_1 + 0x65) = 0;
  param_1[1] = iVar1;
  param_1[2] = iVar1;
  param_1[3] = iVar1;
  param_1[4] = 0;
  param_1[6] = 0;
  return;
}

