
/* std::ofstream::ofstream(char const*, std::_Ios_Openmode) */

void __thiscall std::ofstream::ofstream(ofstream *this,char *param_1,_Ios_Openmode param_2)

{
  filebuf *this_00;
  int iVar1;
  ios *this_01;
  _Ios_Openmode in_stack_00000010;
  
  __x86_get_pc_thunk_di();
  iVar1 = *(int *)(*(int *)(param_1 + 4) + -0xc);
  *(int *)this = *(int *)(param_1 + 4);
  *(undefined4 *)(this + iVar1) = *(undefined4 *)(param_1 + 8);
  ios::init((ios *)(this + iVar1),(streambuf *)0x0);
  iVar1 = *(int *)param_1;
  *(int *)this = iVar1;
  *(undefined4 *)(this + *(int *)(iVar1 + -0xc)) = *(undefined4 *)(param_1 + 0xc);
  this_00 = (filebuf *)(this + 4);
                    /* try { // try from 001dda44 to 001dda48 has its CatchHandler @ 001ddabf */
  filebuf::filebuf(this_00);
                    /* try { // try from 001dda56 to 001ddab1 has its CatchHandler @ 001ddabd */
  ios::init((ios *)(this + *(int *)(*(int *)this + -0xc)),(streambuf *)this_00);
  iVar1 = filebuf::open(this_00,(char *)param_2,in_stack_00000010 | _S_out);
  this_01 = (ios *)(this + *(int *)(*(int *)this + -0xc));
  if (iVar1 != 0) {
    ios::clear(this_01,_S_goodbit);
    return;
  }
  ios::clear(this_01,*(_Ios_Iostate *)(this_01 + 0x14) | _S_failbit);
  return;
}



void FUN_001dd9f0(int *param_1,int *param_2,undefined4 param_3,uint param_4)

{
  int iVar1;
  int *piVar2;
  int iVar3;
  
  FUN_00058c4a();
  iVar1 = *(int *)(param_2[1] + -0xc);
  *param_1 = param_2[1];
  piVar2 = (int *)(iVar1 + (int)param_1);
  *piVar2 = param_2[2];
  FUN_001d6b10(piVar2,0);
  iVar1 = *param_2;
  *param_1 = iVar1;
  *(int *)((int)param_1 + *(int *)(iVar1 + -0xc)) = param_2[3];
  piVar2 = param_1 + 1;
                    /* try { // try from 001dda44 to 001dda48 has its CatchHandler @ 001ddabf */
  FUN_001d8d30(piVar2);
                    /* try { // try from 001dda56 to 001ddab1 has its CatchHandler @ 001ddabd */
  FUN_001d6b10(*(int *)(*param_1 + -0xc) + (int)param_1,piVar2);
  iVar1 = FUN_001dd010(piVar2,param_3,param_4 | 0x10);
  iVar3 = *(int *)(*param_1 + -0xc) + (int)param_1;
  if (iVar1 != 0) {
    FUN_001d62c0(iVar3,0);
    return;
  }
  FUN_001d62c0(iVar3,*(uint *)(iVar3 + 0x14) | 4);
  return;
}


PUSH EBP
MOV EBP,ESP
PUSH EDI
CALL 0x00058c4a
ADD EDI,0x161607
PUSH ESI
PUSH EBX
SUB ESP,0x24
MOV EAX,dword ptr [EBP + 0xc]
MOV ESI,dword ptr [EBP + 0x8]
MOV EAX,dword ptr [EAX + 0x4]
MOV EBX,EDI
MOV ECX,dword ptr [EAX + -0xc]
MOV dword ptr [ESI],EAX
ADD ECX,ESI
MOV EAX,ECX
MOV ECX,dword ptr [EBP + 0xc]
MOV EDX,dword ptr [ECX + 0x8]
MOV dword ptr [EAX],EDX
PUSH 0x0
PUSH EAX
CALL 0x001d6b10
MOV EAX,dword ptr [EBP + 0xc]
MOV ECX,dword ptr [EBP + 0xc]
MOV EAX,dword ptr [EAX]
MOV dword ptr [ESI],EAX
MOV EAX,dword ptr [EAX + -0xc]
MOV EDX,dword ptr [ECX + 0xc]
MOV dword ptr [ESI + EAX*0x1],EDX
LEA EAX,[ESI + 0x4]
MOV dword ptr [EBP + -0x1c],EAX
MOV dword ptr [ESP],EAX
CALL 0x001d8d30
POP EAX
POP EDX
PUSH dword ptr [EBP + -0x1c]
MOV EAX,dword ptr [ESI]
MOV ECX,dword ptr [EAX + -0xc]
ADD ECX,ESI
PUSH ECX
CALL 0x001d6b10
MOV EAX,dword ptr [EBP + 0x14]
ADD ESP,0xc
OR EAX,0x10
PUSH EAX
PUSH dword ptr [EBP + 0x10]
PUSH dword ptr [EBP + -0x1c]
CALL 0x001dd010
MOV EDX,dword ptr [ESI]
ADD ESP,0x10
MOV EBX,dword ptr [EDX + -0xc]
ADD EBX,ESI
TEST EAX,EAX
JZ 0x001ddaa0
SUB ESP,0x8
PUSH 0x0
PUSH EBX
MOV EBX,EDI
CALL 0x001d62c0
ADD ESP,0x10
LEA ESP,[EBP + -0xc]
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EAX,dword ptr [EBX + 0x14]
SUB ESP,0x8
OR EAX,0x4
PUSH EAX
PUSH EBX
MOV EBX,EDI
CALL 0x001d62c0
ADD ESP,0x10
LEA ESP,[EBP + -0xc]
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "void FUN_001dd9f0(int *param_1,int *param_2,undefined4 param_3,uint param_4)\n\n{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  \n  FUN_00058c4a();\n  iVar1 = *(int *)(param_2[1] + -0xc);\n  *param_1 = param_2[1];\n  piVar2 = (int *)(iVar1 + (int)param_1);\n  *piVar2 = param_2[2];\n  FUN_001d6b10(piVar2,0);\n  iVar1 = *param_2;\n  *param_1 = iVar1;\n  *(int *)((int)param_1 + *(int *)(iVar1 + -0xc)) = param_2[3];\n  piVar2 = param_1 + 1;\n                    /* try { // try from 001dda44 to 001dda48 has its CatchHandler @ 001ddabf */\n  FUN_001d8d30(piVar2);\n                    /* try { // try from 001dda56 to 001ddab1 has its CatchHandler @ 001ddabd */\n  FUN_001d6b10(*(int *)(*param_1 + -0xc) + (int)param_1,piVar2);\n  iVar1 = FUN_001dd010(piVar2,param_3,param_4 | 0x10);\n  iVar3 = *(int *)(*param_1 + -0xc) + (int)param_1;\n  if (iVar1 != 0) {\n    FUN_001d62c0(iVar3,0);\n    return;\n  }\n  FUN_001d62c0(iVar3,*(uint *)(iVar3 + 0x14) | 4);\n  return;\n}\n\n" (function_definition "void FUN_001dd9f0(int *param_1,int *param_2,undefined4 param_3,uint param_4)\n\n{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  \n  FUN_00058c4a();\n  iVar1 = *(int *)(param_2[1] + -0xc);\n  *param_1 = param_2[1];\n  piVar2 = (int *)(iVar1 + (int)param_1);\n  *piVar2 = param_2[2];\n  FUN_001d6b10(piVar2,0);\n  iVar1 = *param_2;\n  *param_1 = iVar1;\n  *(int *)((int)param_1 + *(int *)(iVar1 + -0xc)) = param_2[3];\n  piVar2 = param_1 + 1;\n                    /* try { // try from 001dda44 to 001dda48 has its CatchHandler @ 001ddabf */\n  FUN_001d8d30(piVar2);\n                    /* try { // try from 001dda56 to 001ddab1 has its CatchHandler @ 001ddabd */\n  FUN_001d6b10(*(int *)(*param_1 + -0xc) + (int)param_1,piVar2);\n  iVar1 = FUN_001dd010(piVar2,param_3,param_4 | 0x10);\n  iVar3 = *(int *)(*param_1 + -0xc) + (int)param_1;\n  if (iVar1 != 0) {\n    FUN_001d62c0(iVar3,0);\n    return;\n  }\n  FUN_001d62c0(iVar3,*(uint *)(iVar3 + 0x14) | 4);\n  return;\n}" primitive_type (function_declarator "FUN_001dd9f0(int *param_1,int *param_2,undefined4 param_3,uint param_4)" identifier (parameter_list "(int *param_1,int *param_2,undefined4 param_3,uint param_4)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "uint param_4" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  \n  FUN_00058c4a();\n  iVar1 = *(int *)(param_2[1] + -0xc);\n  *param_1 = param_2[1];\n  piVar2 = (int *)(iVar1 + (int)param_1);\n  *piVar2 = param_2[2];\n  FUN_001d6b10(piVar2,0);\n  iVar1 = *param_2;\n  *param_1 = iVar1;\n  *(int *)((int)param_1 + *(int *)(iVar1 + -0xc)) = param_2[3];\n  piVar2 = param_1 + 1;\n                    /* try { // try from 001dda44 to 001dda48 has its CatchHandler @ 001ddabf */\n  FUN_001d8d30(piVar2);\n                    /* try { // try from 001dda56 to 001ddab1 has its CatchHandler @ 001ddabd */\n  FUN_001d6b10(*(int *)(*param_1 + -0xc) + (int)param_1,piVar2);\n  iVar1 = FUN_001dd010(piVar2,param_3,param_4 | 0x10);\n  iVar3 = *(int *)(*param_1 + -0xc) + (int)param_1;\n  if (iVar1 != 0) {\n    FUN_001d62c0(iVar3,0);\n    return;\n  }\n  FUN_001d62c0(iVar3,*(uint *)(iVar3 + 0x14) | 4);\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "FUN_00058c4a();" (call_expression "FUN_00058c4a()" identifier (argument_list "()" ( ))) ;) (expression_statement "iVar1 = *(int *)(param_2[1] + -0xc);" (assignment_expression "iVar1 = *(int *)(param_2[1] + -0xc)" identifier = (pointer_expression "*(int *)(param_2[1] + -0xc)" * (cast_expression "(int *)(param_2[1] + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2[1] + -0xc)" ( (binary_expression "param_2[1] + -0xc" (subscript_expression "param_2[1]" identifier [ number_literal ]) + number_literal) ))))) ;) (expression_statement "*param_1 = param_2[1];" (assignment_expression "*param_1 = param_2[1]" (pointer_expression "*param_1" * identifier) = (subscript_expression "param_2[1]" identifier [ number_literal ])) ;) (expression_statement "piVar2 = (int *)(iVar1 + (int)param_1);" (assignment_expression "piVar2 = (int *)(iVar1 + (int)param_1)" identifier = (cast_expression "(int *)(iVar1 + (int)param_1)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + (int)param_1)" ( (binary_expression "iVar1 + (int)param_1" identifier + (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier)) )))) ;) (expression_statement "*piVar2 = param_2[2];" (assignment_expression "*piVar2 = param_2[2]" (pointer_expression "*piVar2" * identifier) = (subscript_expression "param_2[2]" identifier [ number_literal ])) ;) (expression_statement "FUN_001d6b10(piVar2,0);" (call_expression "FUN_001d6b10(piVar2,0)" identifier (argument_list "(piVar2,0)" ( identifier , number_literal ))) ;) (expression_statement "iVar1 = *param_2;" (assignment_expression "iVar1 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (expression_statement "*param_1 = iVar1;" (assignment_expression "*param_1 = iVar1" (pointer_expression "*param_1" * identifier) = identifier) ;) (expression_statement "*(int *)((int)param_1 + *(int *)(iVar1 + -0xc)) = param_2[3];" (assignment_expression "*(int *)((int)param_1 + *(int *)(iVar1 + -0xc)) = param_2[3]" (pointer_expression "*(int *)((int)param_1 + *(int *)(iVar1 + -0xc))" * (cast_expression "(int *)((int)param_1 + *(int *)(iVar1 + -0xc))" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + *(int *)(iVar1 + -0xc))" ( (binary_expression "(int)param_1 + *(int *)(iVar1 + -0xc)" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + (pointer_expression "*(int *)(iVar1 + -0xc)" * (cast_expression "(int *)(iVar1 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + -0xc)" ( (binary_expression "iVar1 + -0xc" identifier + number_literal) ))))) )))) = (subscript_expression "param_2[3]" identifier [ number_literal ])) ;) (expression_statement "piVar2 = param_1 + 1;" (assignment_expression "piVar2 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) comment (expression_statement "FUN_001d8d30(piVar2);" (call_expression "FUN_001d8d30(piVar2)" identifier (argument_list "(piVar2)" ( identifier ))) ;) comment (expression_statement "FUN_001d6b10(*(int *)(*param_1 + -0xc) + (int)param_1,piVar2);" (call_expression "FUN_001d6b10(*(int *)(*param_1 + -0xc) + (int)param_1,piVar2)" identifier (argument_list "(*(int *)(*param_1 + -0xc) + (int)param_1,piVar2)" ( (binary_expression "*(int *)(*param_1 + -0xc) + (int)param_1" (pointer_expression "*(int *)(*param_1 + -0xc)" * (cast_expression "(int *)(*param_1 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + -0xc)" ( (binary_expression "*param_1 + -0xc" (pointer_expression "*param_1" * identifier) + number_literal) )))) + (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier)) , identifier ))) ;) (expression_statement "iVar1 = FUN_001dd010(piVar2,param_3,param_4 | 0x10);" (assignment_expression "iVar1 = FUN_001dd010(piVar2,param_3,param_4 | 0x10)" identifier = (call_expression "FUN_001dd010(piVar2,param_3,param_4 | 0x10)" identifier (argument_list "(piVar2,param_3,param_4 | 0x10)" ( identifier , identifier , (binary_expression "param_4 | 0x10" identifier | number_literal) )))) ;) (expression_statement "iVar3 = *(int *)(*param_1 + -0xc) + (int)param_1;" (assignment_expression "iVar3 = *(int *)(*param_1 + -0xc) + (int)param_1" identifier = (binary_expression "*(int *)(*param_1 + -0xc) + (int)param_1" (pointer_expression "*(int *)(*param_1 + -0xc)" * (cast_expression "(int *)(*param_1 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + -0xc)" ( (binary_expression "*param_1 + -0xc" (pointer_expression "*param_1" * identifier) + number_literal) )))) + (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (if_statement "if (iVar1 != 0) {\n    FUN_001d62c0(iVar3,0);\n    return;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    FUN_001d62c0(iVar3,0);\n    return;\n  }" { (expression_statement "FUN_001d62c0(iVar3,0);" (call_expression "FUN_001d62c0(iVar3,0)" identifier (argument_list "(iVar3,0)" ( identifier , number_literal ))) ;) (return_statement "return;" return ;) })) (expression_statement "FUN_001d62c0(iVar3,*(uint *)(iVar3 + 0x14) | 4);" (call_expression "FUN_001d62c0(iVar3,*(uint *)(iVar3 + 0x14) | 4)" identifier (argument_list "(iVar3,*(uint *)(iVar3 + 0x14) | 4)" ( identifier , (binary_expression "*(uint *)(iVar3 + 0x14) | 4" (pointer_expression "*(uint *)(iVar3 + 0x14)" * (cast_expression "(uint *)(iVar3 + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x14)" ( (binary_expression "iVar3 + 0x14" identifier + number_literal) )))) | number_literal) ))) ;) (return_statement "return;" return ;) })))
(translation_unit "/* std::ofstream::ofstream(char const*, std::_Ios_Openmode) */\n\nvoid __thiscall std::ofstream::ofstream(ofstream *this,char *param_1,_Ios_Openmode param_2)\n\n{\n  filebuf *this_00;\n  int iVar1;\n  ios *this_01;\n  _Ios_Openmode in_stack_00000010;\n  \n  __x86_get_pc_thunk_di();\n  iVar1 = *(int *)(*(int *)(param_1 + 4) + -0xc);\n  *(int *)this = *(int *)(param_1 + 4);\n  *(undefined4 *)(this + iVar1) = *(undefined4 *)(param_1 + 8);\n  ios::init((ios *)(this + iVar1),(streambuf *)0x0);\n  iVar1 = *(int *)param_1;\n  *(int *)this = iVar1;\n  *(undefined4 *)(this + *(int *)(iVar1 + -0xc)) = *(undefined4 *)(param_1 + 0xc);\n  this_00 = (filebuf *)(this + 4);\n                    /* try { // try from 001dda44 to 001dda48 has its CatchHandler @ 001ddabf */\n  filebuf::filebuf(this_00);\n                    /* try { // try from 001dda56 to 001ddab1 has its CatchHandler @ 001ddabd */\n  ios::init((ios *)(this + *(int *)(*(int *)this + -0xc)),(streambuf *)this_00);\n  iVar1 = filebuf::open(this_00,(char *)param_2,in_stack_00000010 | _S_out);\n  this_01 = (ios *)(this + *(int *)(*(int *)this + -0xc));\n  if (iVar1 != 0) {\n    ios::clear(this_01,_S_goodbit);\n    return;\n  }\n  ios::clear(this_01,*(_Ios_Iostate *)(this_01 + 0x14) | _S_failbit);\n  return;\n}\n\n" comment (function_definition "void __thiscall std::ofstream::ofstream(ofstream *this,char *param_1,_Ios_Openmode param_2)\n\n{\n  filebuf *this_00;\n  int iVar1;\n  ios *this_01;\n  _Ios_Openmode in_stack_00000010;\n  \n  __x86_get_pc_thunk_di();\n  iVar1 = *(int *)(*(int *)(param_1 + 4) + -0xc);\n  *(int *)this = *(int *)(param_1 + 4);\n  *(undefined4 *)(this + iVar1) = *(undefined4 *)(param_1 + 8);\n  ios::init((ios *)(this + iVar1),(streambuf *)0x0);\n  iVar1 = *(int *)param_1;\n  *(int *)this = iVar1;\n  *(undefined4 *)(this + *(int *)(iVar1 + -0xc)) = *(undefined4 *)(param_1 + 0xc);\n  this_00 = (filebuf *)(this + 4);\n                    /* try { // try from 001dda44 to 001dda48 has its CatchHandler @ 001ddabf */\n  filebuf::filebuf(this_00);\n                    /* try { // try from 001dda56 to 001ddab1 has its CatchHandler @ 001ddabd */\n  ios::init((ios *)(this + *(int *)(*(int *)this + -0xc)),(streambuf *)this_00);\n  iVar1 = filebuf::open(this_00,(char *)param_2,in_stack_00000010 | _S_out);\n  this_01 = (ios *)(this + *(int *)(*(int *)this + -0xc));\n  if (iVar1 != 0) {\n    ios::clear(this_01,_S_goodbit);\n    return;\n  }\n  ios::clear(this_01,*(_Ios_Iostate *)(this_01 + 0x14) | _S_failbit);\n  return;\n}" primitive_type (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::ofstream::" identifier : : identifier : :) (function_declarator "ofstream(ofstream *this,char *param_1,_Ios_Openmode param_2)" identifier (parameter_list "(ofstream *this,char *param_1,_Ios_Openmode param_2)" ( (parameter_declaration "ofstream *this" type_identifier (pointer_declarator "*this" * identifier)) , (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "_Ios_Openmode param_2" type_identifier identifier) ))) (compound_statement "{\n  filebuf *this_00;\n  int iVar1;\n  ios *this_01;\n  _Ios_Openmode in_stack_00000010;\n  \n  __x86_get_pc_thunk_di();\n  iVar1 = *(int *)(*(int *)(param_1 + 4) + -0xc);\n  *(int *)this = *(int *)(param_1 + 4);\n  *(undefined4 *)(this + iVar1) = *(undefined4 *)(param_1 + 8);\n  ios::init((ios *)(this + iVar1),(streambuf *)0x0);\n  iVar1 = *(int *)param_1;\n  *(int *)this = iVar1;\n  *(undefined4 *)(this + *(int *)(iVar1 + -0xc)) = *(undefined4 *)(param_1 + 0xc);\n  this_00 = (filebuf *)(this + 4);\n                    /* try { // try from 001dda44 to 001dda48 has its CatchHandler @ 001ddabf */\n  filebuf::filebuf(this_00);\n                    /* try { // try from 001dda56 to 001ddab1 has its CatchHandler @ 001ddabd */\n  ios::init((ios *)(this + *(int *)(*(int *)this + -0xc)),(streambuf *)this_00);\n  iVar1 = filebuf::open(this_00,(char *)param_2,in_stack_00000010 | _S_out);\n  this_01 = (ios *)(this + *(int *)(*(int *)this + -0xc));\n  if (iVar1 != 0) {\n    ios::clear(this_01,_S_goodbit);\n    return;\n  }\n  ios::clear(this_01,*(_Ios_Iostate *)(this_01 + 0x14) | _S_failbit);\n  return;\n}" { (declaration "filebuf *this_00;" type_identifier (pointer_declarator "*this_00" * identifier) ;) (declaration "int iVar1;" primitive_type identifier ;) (declaration "ios *this_01;" type_identifier (pointer_declarator "*this_01" * identifier) ;) (declaration "_Ios_Openmode in_stack_00000010;" type_identifier identifier ;) (expression_statement "__x86_get_pc_thunk_di();" (call_expression "__x86_get_pc_thunk_di()" identifier (argument_list "()" ( ))) ;) (expression_statement "iVar1 = *(int *)(*(int *)(param_1 + 4) + -0xc);" (assignment_expression "iVar1 = *(int *)(*(int *)(param_1 + 4) + -0xc)" identifier = (pointer_expression "*(int *)(*(int *)(param_1 + 4) + -0xc)" * (cast_expression "(int *)(*(int *)(param_1 + 4) + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 4) + -0xc)" ( (binary_expression "*(int *)(param_1 + 4) + -0xc" (pointer_expression "*(int *)(param_1 + 4)" * (cast_expression "(int *)(param_1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) + number_literal) ))))) ;) (expression_statement "*(int *)this = *(int *)(param_1 + 4);" (assignment_expression "*(int *)this = *(int *)(param_1 + 4)" (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) = (pointer_expression "*(int *)(param_1 + 4)" * (cast_expression "(int *)(param_1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) ))))) ;) (expression_statement "*(undefined4 *)(this + iVar1) = *(undefined4 *)(param_1 + 8);" (assignment_expression "*(undefined4 *)(this + iVar1) = *(undefined4 *)(param_1 + 8)" (pointer_expression "*(undefined4 *)(this + iVar1)" * (cast_expression "(undefined4 *)(this + iVar1)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + iVar1)" ( (binary_expression "this + iVar1" identifier + identifier) )))) = (pointer_expression "*(undefined4 *)(param_1 + 8)" * (cast_expression "(undefined4 *)(param_1 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) (labeled_statement "ios::init((ios *)(this + iVar1),(streambuf *)0x0);" statement_identifier : (ERROR ":" :) (expression_statement "init((ios *)(this + iVar1),(streambuf *)0x0);" (call_expression "init((ios *)(this + iVar1),(streambuf *)0x0)" identifier (argument_list "((ios *)(this + iVar1),(streambuf *)0x0)" ( (cast_expression "(ios *)(this + iVar1)" ( (type_descriptor "ios *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + iVar1)" ( (binary_expression "this + iVar1" identifier + identifier) ))) , (cast_expression "(streambuf *)0x0" ( (type_descriptor "streambuf *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ))) ;)) (expression_statement "iVar1 = *(int *)param_1;" (assignment_expression "iVar1 = *(int *)param_1" identifier = (pointer_expression "*(int *)param_1" * (cast_expression "(int *)param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "*(int *)this = iVar1;" (assignment_expression "*(int *)this = iVar1" (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) = identifier) ;) (expression_statement "*(undefined4 *)(this + *(int *)(iVar1 + -0xc)) = *(undefined4 *)(param_1 + 0xc);" (assignment_expression "*(undefined4 *)(this + *(int *)(iVar1 + -0xc)) = *(undefined4 *)(param_1 + 0xc)" (pointer_expression "*(undefined4 *)(this + *(int *)(iVar1 + -0xc))" * (cast_expression "(undefined4 *)(this + *(int *)(iVar1 + -0xc))" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + *(int *)(iVar1 + -0xc))" ( (binary_expression "this + *(int *)(iVar1 + -0xc)" identifier + (pointer_expression "*(int *)(iVar1 + -0xc)" * (cast_expression "(int *)(iVar1 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + -0xc)" ( (binary_expression "iVar1 + -0xc" identifier + number_literal) ))))) )))) = (pointer_expression "*(undefined4 *)(param_1 + 0xc)" * (cast_expression "(undefined4 *)(param_1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) ))))) ;) (expression_statement "this_00 = (filebuf *)(this + 4);" (assignment_expression "this_00 = (filebuf *)(this + 4)" identifier = (cast_expression "(filebuf *)(this + 4)" ( (type_descriptor "filebuf *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 4)" ( (binary_expression "this + 4" identifier + number_literal) )))) ;) comment (labeled_statement "filebuf::filebuf(this_00);" statement_identifier : (ERROR ":" :) (expression_statement "filebuf(this_00);" (call_expression "filebuf(this_00)" identifier (argument_list "(this_00)" ( identifier ))) ;)) comment (labeled_statement "ios::init((ios *)(this + *(int *)(*(int *)this + -0xc)),(streambuf *)this_00);" statement_identifier : (ERROR ":" :) (expression_statement "init((ios *)(this + *(int *)(*(int *)this + -0xc)),(streambuf *)this_00);" (call_expression "init((ios *)(this + *(int *)(*(int *)this + -0xc)),(streambuf *)this_00)" identifier (argument_list "((ios *)(this + *(int *)(*(int *)this + -0xc)),(streambuf *)this_00)" ( (cast_expression "(ios *)(this + *(int *)(*(int *)this + -0xc))" ( (type_descriptor "ios *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + *(int *)(*(int *)this + -0xc))" ( (binary_expression "this + *(int *)(*(int *)this + -0xc)" identifier + (pointer_expression "*(int *)(*(int *)this + -0xc)" * (cast_expression "(int *)(*(int *)this + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)this + -0xc)" ( (binary_expression "*(int *)this + -0xc" (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) ))))) ))) , (cast_expression "(streambuf *)this_00" ( (type_descriptor "streambuf *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) ))) ;)) (ERROR "iVar1 = filebuf::" (assignment_expression "iVar1 = filebuf" identifier = identifier) : :) (expression_statement "open(this_00,(char *)param_2,in_stack_00000010 | _S_out);" (call_expression "open(this_00,(char *)param_2,in_stack_00000010 | _S_out)" identifier (argument_list "(this_00,(char *)param_2,in_stack_00000010 | _S_out)" ( identifier , (cast_expression "(char *)param_2" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , (binary_expression "in_stack_00000010 | _S_out" identifier | identifier) ))) ;) (expression_statement "this_01 = (ios *)(this + *(int *)(*(int *)this + -0xc));" (assignment_expression "this_01 = (ios *)(this + *(int *)(*(int *)this + -0xc))" identifier = (cast_expression "(ios *)(this + *(int *)(*(int *)this + -0xc))" ( (type_descriptor "ios *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + *(int *)(*(int *)this + -0xc))" ( (binary_expression "this + *(int *)(*(int *)this + -0xc)" identifier + (pointer_expression "*(int *)(*(int *)this + -0xc)" * (cast_expression "(int *)(*(int *)this + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)this + -0xc)" ( (binary_expression "*(int *)this + -0xc" (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) ))))) )))) ;) (if_statement "if (iVar1 != 0) {\n    ios::clear(this_01,_S_goodbit);\n    return;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    ios::clear(this_01,_S_goodbit);\n    return;\n  }" { (labeled_statement "ios::clear(this_01,_S_goodbit);" statement_identifier : (ERROR ":" :) (expression_statement "clear(this_01,_S_goodbit);" (call_expression "clear(this_01,_S_goodbit)" identifier (argument_list "(this_01,_S_goodbit)" ( identifier , identifier ))) ;)) (return_statement "return;" return ;) })) (labeled_statement "ios::clear(this_01,*(_Ios_Iostate *)(this_01 + 0x14) | _S_failbit);" statement_identifier : (ERROR ":" :) (expression_statement "clear(this_01,*(_Ios_Iostate *)(this_01 + 0x14) | _S_failbit);" (call_expression "clear(this_01,*(_Ios_Iostate *)(this_01 + 0x14) | _S_failbit)" identifier (argument_list "(this_01,*(_Ios_Iostate *)(this_01 + 0x14) | _S_failbit)" ( identifier , (binary_expression "*(_Ios_Iostate *)(this_01 + 0x14) | _S_failbit" (pointer_expression "*(_Ios_Iostate *)(this_01 + 0x14)" * (cast_expression "(_Ios_Iostate *)(this_01 + 0x14)" ( (type_descriptor "_Ios_Iostate *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this_01 + 0x14)" ( (binary_expression "this_01 + 0x14" identifier + number_literal) )))) | identifier) ))) ;)) (return_statement "return;" return ;) })))
(translation_unit "void FUN_001dd9f0(int *param_1,int *param_2,undefined4 param_3,uint param_4)\n\n{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  \n  FUN_00058c4a();\n  iVar1 = *(int *)(param_2[1] + -0xc);\n  *param_1 = param_2[1];\n  piVar2 = (int *)(iVar1 + (int)param_1);\n  *piVar2 = param_2[2];\n  FUN_001d6b10(piVar2,0);\n  iVar1 = *param_2;\n  *param_1 = iVar1;\n  *(int *)((int)param_1 + *(int *)(iVar1 + -0xc)) = param_2[3];\n  piVar2 = param_1 + 1;\n                    \n  FUN_001d8d30(piVar2);\n                    \n  FUN_001d6b10(*(int *)(*param_1 + -0xc) + (int)param_1,piVar2);\n  iVar1 = FUN_001dd010(piVar2,param_3,param_4 | 0x10);\n  iVar3 = *(int *)(*param_1 + -0xc) + (int)param_1;\n  if (iVar1 != 0) {\n    FUN_001d62c0(iVar3,0);\n    return;\n  }\n  FUN_001d62c0(iVar3,*(uint *)(iVar3 + 0x14) | 4);\n  return;\n}\n\n" (function_definition "void FUN_001dd9f0(int *param_1,int *param_2,undefined4 param_3,uint param_4)\n\n{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  \n  FUN_00058c4a();\n  iVar1 = *(int *)(param_2[1] + -0xc);\n  *param_1 = param_2[1];\n  piVar2 = (int *)(iVar1 + (int)param_1);\n  *piVar2 = param_2[2];\n  FUN_001d6b10(piVar2,0);\n  iVar1 = *param_2;\n  *param_1 = iVar1;\n  *(int *)((int)param_1 + *(int *)(iVar1 + -0xc)) = param_2[3];\n  piVar2 = param_1 + 1;\n                    \n  FUN_001d8d30(piVar2);\n                    \n  FUN_001d6b10(*(int *)(*param_1 + -0xc) + (int)param_1,piVar2);\n  iVar1 = FUN_001dd010(piVar2,param_3,param_4 | 0x10);\n  iVar3 = *(int *)(*param_1 + -0xc) + (int)param_1;\n  if (iVar1 != 0) {\n    FUN_001d62c0(iVar3,0);\n    return;\n  }\n  FUN_001d62c0(iVar3,*(uint *)(iVar3 + 0x14) | 4);\n  return;\n}" primitive_type (function_declarator "FUN_001dd9f0(int *param_1,int *param_2,undefined4 param_3,uint param_4)" identifier (parameter_list "(int *param_1,int *param_2,undefined4 param_3,uint param_4)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "uint param_4" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  \n  FUN_00058c4a();\n  iVar1 = *(int *)(param_2[1] + -0xc);\n  *param_1 = param_2[1];\n  piVar2 = (int *)(iVar1 + (int)param_1);\n  *piVar2 = param_2[2];\n  FUN_001d6b10(piVar2,0);\n  iVar1 = *param_2;\n  *param_1 = iVar1;\n  *(int *)((int)param_1 + *(int *)(iVar1 + -0xc)) = param_2[3];\n  piVar2 = param_1 + 1;\n                    \n  FUN_001d8d30(piVar2);\n                    \n  FUN_001d6b10(*(int *)(*param_1 + -0xc) + (int)param_1,piVar2);\n  iVar1 = FUN_001dd010(piVar2,param_3,param_4 | 0x10);\n  iVar3 = *(int *)(*param_1 + -0xc) + (int)param_1;\n  if (iVar1 != 0) {\n    FUN_001d62c0(iVar3,0);\n    return;\n  }\n  FUN_001d62c0(iVar3,*(uint *)(iVar3 + 0x14) | 4);\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "FUN_00058c4a();" (call_expression "FUN_00058c4a()" identifier (argument_list "()" ( ))) ;) (expression_statement "iVar1 = *(int *)(param_2[1] + -0xc);" (assignment_expression "iVar1 = *(int *)(param_2[1] + -0xc)" identifier = (pointer_expression "*(int *)(param_2[1] + -0xc)" * (cast_expression "(int *)(param_2[1] + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2[1] + -0xc)" ( (binary_expression "param_2[1] + -0xc" (subscript_expression "param_2[1]" identifier [ number_literal ]) + number_literal) ))))) ;) (expression_statement "*param_1 = param_2[1];" (assignment_expression "*param_1 = param_2[1]" (pointer_expression "*param_1" * identifier) = (subscript_expression "param_2[1]" identifier [ number_literal ])) ;) (expression_statement "piVar2 = (int *)(iVar1 + (int)param_1);" (assignment_expression "piVar2 = (int *)(iVar1 + (int)param_1)" identifier = (cast_expression "(int *)(iVar1 + (int)param_1)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + (int)param_1)" ( (binary_expression "iVar1 + (int)param_1" identifier + (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier)) )))) ;) (expression_statement "*piVar2 = param_2[2];" (assignment_expression "*piVar2 = param_2[2]" (pointer_expression "*piVar2" * identifier) = (subscript_expression "param_2[2]" identifier [ number_literal ])) ;) (expression_statement "FUN_001d6b10(piVar2,0);" (call_expression "FUN_001d6b10(piVar2,0)" identifier (argument_list "(piVar2,0)" ( identifier , number_literal ))) ;) (expression_statement "iVar1 = *param_2;" (assignment_expression "iVar1 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (expression_statement "*param_1 = iVar1;" (assignment_expression "*param_1 = iVar1" (pointer_expression "*param_1" * identifier) = identifier) ;) (expression_statement "*(int *)((int)param_1 + *(int *)(iVar1 + -0xc)) = param_2[3];" (assignment_expression "*(int *)((int)param_1 + *(int *)(iVar1 + -0xc)) = param_2[3]" (pointer_expression "*(int *)((int)param_1 + *(int *)(iVar1 + -0xc))" * (cast_expression "(int *)((int)param_1 + *(int *)(iVar1 + -0xc))" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + *(int *)(iVar1 + -0xc))" ( (binary_expression "(int)param_1 + *(int *)(iVar1 + -0xc)" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + (pointer_expression "*(int *)(iVar1 + -0xc)" * (cast_expression "(int *)(iVar1 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + -0xc)" ( (binary_expression "iVar1 + -0xc" identifier + number_literal) ))))) )))) = (subscript_expression "param_2[3]" identifier [ number_literal ])) ;) (expression_statement "piVar2 = param_1 + 1;" (assignment_expression "piVar2 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) (expression_statement "FUN_001d8d30(piVar2);" (call_expression "FUN_001d8d30(piVar2)" identifier (argument_list "(piVar2)" ( identifier ))) ;) (expression_statement "FUN_001d6b10(*(int *)(*param_1 + -0xc) + (int)param_1,piVar2);" (call_expression "FUN_001d6b10(*(int *)(*param_1 + -0xc) + (int)param_1,piVar2)" identifier (argument_list "(*(int *)(*param_1 + -0xc) + (int)param_1,piVar2)" ( (binary_expression "*(int *)(*param_1 + -0xc) + (int)param_1" (pointer_expression "*(int *)(*param_1 + -0xc)" * (cast_expression "(int *)(*param_1 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + -0xc)" ( (binary_expression "*param_1 + -0xc" (pointer_expression "*param_1" * identifier) + number_literal) )))) + (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier)) , identifier ))) ;) (expression_statement "iVar1 = FUN_001dd010(piVar2,param_3,param_4 | 0x10);" (assignment_expression "iVar1 = FUN_001dd010(piVar2,param_3,param_4 | 0x10)" identifier = (call_expression "FUN_001dd010(piVar2,param_3,param_4 | 0x10)" identifier (argument_list "(piVar2,param_3,param_4 | 0x10)" ( identifier , identifier , (binary_expression "param_4 | 0x10" identifier | number_literal) )))) ;) (expression_statement "iVar3 = *(int *)(*param_1 + -0xc) + (int)param_1;" (assignment_expression "iVar3 = *(int *)(*param_1 + -0xc) + (int)param_1" identifier = (binary_expression "*(int *)(*param_1 + -0xc) + (int)param_1" (pointer_expression "*(int *)(*param_1 + -0xc)" * (cast_expression "(int *)(*param_1 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + -0xc)" ( (binary_expression "*param_1 + -0xc" (pointer_expression "*param_1" * identifier) + number_literal) )))) + (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (if_statement "if (iVar1 != 0) {\n    FUN_001d62c0(iVar3,0);\n    return;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    FUN_001d62c0(iVar3,0);\n    return;\n  }" { (expression_statement "FUN_001d62c0(iVar3,0);" (call_expression "FUN_001d62c0(iVar3,0)" identifier (argument_list "(iVar3,0)" ( identifier , number_literal ))) ;) (return_statement "return;" return ;) })) (expression_statement "FUN_001d62c0(iVar3,*(uint *)(iVar3 + 0x14) | 4);" (call_expression "FUN_001d62c0(iVar3,*(uint *)(iVar3 + 0x14) | 4)" identifier (argument_list "(iVar3,*(uint *)(iVar3 + 0x14) | 4)" ( identifier , (binary_expression "*(uint *)(iVar3 + 0x14) | 4" (pointer_expression "*(uint *)(iVar3 + 0x14)" * (cast_expression "(uint *)(iVar3 + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x14)" ( (binary_expression "iVar3 + 0x14" 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 (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (cast_expression ( (type_descriptor TYPE) ) IDENT)) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )))) = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) + (cast_expression ( (type_descriptor TYPE) ) IDENT)) , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , (binary_expression IDENT | LIT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) + (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT ))) ;) (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) | LIT) ))) ;) (return_statement return ;) })))
(function_definition "void FUN_001dd9f0(int *param_1,int *param_2,undefined4 param_3,uint param_4)\n\n{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  \n  FUN_00058c4a();\n  iVar1 = *(int *)(param_2[1] + -0xc);\n  *param_1 = param_2[1];\n  piVar2 = (int *)(iVar1 + (int)param_1);\n  *piVar2 = param_2[2];\n  FUN_001d6b10(piVar2,0);\n  iVar1 = *param_2;\n  *param_1 = iVar1;\n  *(int *)((int)param_1 + *(int *)(iVar1 + -0xc)) = param_2[3];\n  piVar2 = param_1 + 1;\n                    \n  FUN_001d8d30(piVar2);\n                    \n  FUN_001d6b10(*(int *)(*param_1 + -0xc) + (int)param_1,piVar2);\n  iVar1 = FUN_001dd010(piVar2,param_3,param_4 | 0x10);\n  iVar3 = *(int *)(*param_1 + -0xc) + (int)param_1;\n  if (iVar1 != 0) {\n    FUN_001d62c0(iVar3,0);\n    return;\n  }\n  FUN_001d62c0(iVar3,*(uint *)(iVar3 + 0x14) | 4);\n  return;\n}" (primitive_type "void") (function_declarator "FUN_001dd9f0(int *param_1,int *param_2,undefined4 param_3,uint param_4)" (identifier "FUN_001dd9f0") (parameter_list "(int *param_1,int *param_2,undefined4 param_3,uint param_4)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int *param_2" (primitive_type "int") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) (, ",") (parameter_declaration "uint param_4" (type_identifier "uint") (identifier "param_4")) () ")"))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  \n  FUN_00058c4a();\n  iVar1 = *(int *)(param_2[1] + -0xc);\n  *param_1 = param_2[1];\n  piVar2 = (int *)(iVar1 + (int)param_1);\n  *piVar2 = param_2[2];\n  FUN_001d6b10(piVar2,0);\n  iVar1 = *param_2;\n  *param_1 = iVar1;\n  *(int *)((int)param_1 + *(int *)(iVar1 + -0xc)) = param_2[3];\n  piVar2 = param_1 + 1;\n                    \n  FUN_001d8d30(piVar2);\n                    \n  FUN_001d6b10(*(int *)(*param_1 + -0xc) + (int)param_1,piVar2);\n  iVar1 = FUN_001dd010(piVar2,param_3,param_4 | 0x10);\n  iVar3 = *(int *)(*param_1 + -0xc) + (int)param_1;\n  if (iVar1 != 0) {\n    FUN_001d62c0(iVar3,0);\n    return;\n  }\n  FUN_001d62c0(iVar3,*(uint *)(iVar3 + 0x14) | 4);\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (expression_statement "FUN_00058c4a();" (call_expression "FUN_00058c4a()" (identifier "FUN_00058c4a") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "iVar1 = *(int *)(param_2[1] + -0xc);" (assignment_expression "iVar1 = *(int *)(param_2[1] + -0xc)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(param_2[1] + -0xc)" (* "*") (cast_expression "(int *)(param_2[1] + -0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2[1] + -0xc)" (( "(") (binary_expression "param_2[1] + -0xc" (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]")) (+ "+") (number_literal "-0xc")) () ")"))))) (; ";")) (expression_statement "*param_1 = param_2[1];" (assignment_expression "*param_1 = param_2[1]" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]"))) (; ";")) (expression_statement "piVar2 = (int *)(iVar1 + (int)param_1);" (assignment_expression "piVar2 = (int *)(iVar1 + (int)param_1)" (identifier "piVar2") (= "=") (cast_expression "(int *)(iVar1 + (int)param_1)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + (int)param_1)" (( "(") (binary_expression "iVar1 + (int)param_1" (identifier "iVar1") (+ "+") (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1"))) () ")")))) (; ";")) (expression_statement "*piVar2 = param_2[2];" (assignment_expression "*piVar2 = param_2[2]" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (= "=") (subscript_expression "param_2[2]" (identifier "param_2") ([ "[") (number_literal "2") (] "]"))) (; ";")) (expression_statement "FUN_001d6b10(piVar2,0);" (call_expression "FUN_001d6b10(piVar2,0)" (identifier "FUN_001d6b10") (argument_list "(piVar2,0)" (( "(") (identifier "piVar2") (, ",") (number_literal "0") () ")"))) (; ";")) (expression_statement "iVar1 = *param_2;" (assignment_expression "iVar1 = *param_2" (identifier "iVar1") (= "=") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (; ";")) (expression_statement "*param_1 = iVar1;" (assignment_expression "*param_1 = iVar1" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (identifier "iVar1")) (; ";")) (expression_statement "*(int *)((int)param_1 + *(int *)(iVar1 + -0xc)) = param_2[3];" (assignment_expression "*(int *)((int)param_1 + *(int *)(iVar1 + -0xc)) = param_2[3]" (pointer_expression "*(int *)((int)param_1 + *(int *)(iVar1 + -0xc))" (* "*") (cast_expression "(int *)((int)param_1 + *(int *)(iVar1 + -0xc))" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)param_1 + *(int *)(iVar1 + -0xc))" (( "(") (binary_expression "(int)param_1 + *(int *)(iVar1 + -0xc)" (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1")) (+ "+") (pointer_expression "*(int *)(iVar1 + -0xc)" (* "*") (cast_expression "(int *)(iVar1 + -0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + -0xc)" (( "(") (binary_expression "iVar1 + -0xc" (identifier "iVar1") (+ "+") (number_literal "-0xc")) () ")"))))) () ")")))) (= "=") (subscript_expression "param_2[3]" (identifier "param_2") ([ "[") (number_literal "3") (] "]"))) (; ";")) (expression_statement "piVar2 = param_1 + 1;" (assignment_expression "piVar2 = param_1 + 1" (identifier "piVar2") (= "=") (binary_expression "param_1 + 1" (identifier "param_1") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "FUN_001d8d30(piVar2);" (call_expression "FUN_001d8d30(piVar2)" (identifier "FUN_001d8d30") (argument_list "(piVar2)" (( "(") (identifier "piVar2") () ")"))) (; ";")) (expression_statement "FUN_001d6b10(*(int *)(*param_1 + -0xc) + (int)param_1,piVar2);" (call_expression "FUN_001d6b10(*(int *)(*param_1 + -0xc) + (int)param_1,piVar2)" (identifier "FUN_001d6b10") (argument_list "(*(int *)(*param_1 + -0xc) + (int)param_1,piVar2)" (( "(") (binary_expression "*(int *)(*param_1 + -0xc) + (int)param_1" (pointer_expression "*(int *)(*param_1 + -0xc)" (* "*") (cast_expression "(int *)(*param_1 + -0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + -0xc)" (( "(") (binary_expression "*param_1 + -0xc" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "-0xc")) () ")")))) (+ "+") (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1"))) (, ",") (identifier "piVar2") () ")"))) (; ";")) (expression_statement "iVar1 = FUN_001dd010(piVar2,param_3,param_4 | 0x10);" (assignment_expression "iVar1 = FUN_001dd010(piVar2,param_3,param_4 | 0x10)" (identifier "iVar1") (= "=") (call_expression "FUN_001dd010(piVar2,param_3,param_4 | 0x10)" (identifier "FUN_001dd010") (argument_list "(piVar2,param_3,param_4 | 0x10)" (( "(") (identifier "piVar2") (, ",") (identifier "param_3") (, ",") (binary_expression "param_4 | 0x10" (identifier "param_4") (| "|") (number_literal "0x10")) () ")")))) (; ";")) (expression_statement "iVar3 = *(int *)(*param_1 + -0xc) + (int)param_1;" (assignment_expression "iVar3 = *(int *)(*param_1 + -0xc) + (int)param_1" (identifier "iVar3") (= "=") (binary_expression "*(int *)(*param_1 + -0xc) + (int)param_1" (pointer_expression "*(int *)(*param_1 + -0xc)" (* "*") (cast_expression "(int *)(*param_1 + -0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + -0xc)" (( "(") (binary_expression "*param_1 + -0xc" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "-0xc")) () ")")))) (+ "+") (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1")))) (; ";")) (if_statement "if (iVar1 != 0) {\n    FUN_001d62c0(iVar3,0);\n    return;\n  }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    FUN_001d62c0(iVar3,0);\n    return;\n  }" ({ "{") (expression_statement "FUN_001d62c0(iVar3,0);" (call_expression "FUN_001d62c0(iVar3,0)" (identifier "FUN_001d62c0") (argument_list "(iVar3,0)" (( "(") (identifier "iVar3") (, ",") (number_literal "0") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_001d62c0(iVar3,*(uint *)(iVar3 + 0x14) | 4);" (call_expression "FUN_001d62c0(iVar3,*(uint *)(iVar3 + 0x14) | 4)" (identifier "FUN_001d62c0") (argument_list "(iVar3,*(uint *)(iVar3 + 0x14) | 4)" (( "(") (identifier "iVar3") (, ",") (binary_expression "*(uint *)(iVar3 + 0x14) | 4" (pointer_expression "*(uint *)(iVar3 + 0x14)" (* "*") (cast_expression "(uint *)(iVar3 + 0x14)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0x14)" (( "(") (binary_expression "iVar3 + 0x14" (identifier "iVar3") (+ "+") (number_literal "0x14")) () ")")))) (| "|") (number_literal "4")) () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* std::ofstream::ofstream(char const*, std::_Ios_Openmode) */

void __thiscall std::function_1::function_1(function_1 *var_3,char *var_2,type_1 param_2)

{
  type_2 *this_00;
  int var_4;
  type_3 *var_10;
  type_1 var_7;
  
  var_1();
  var_4 = *(int *)(*(int *)(var_2 + 4) + -0xc);
  *(int *)var_3 = *(int *)(var_2 + 4);
  *(type_4 *)(var_3 + var_4) = *(type_4 *)(var_2 + 8);
  ios::var_5((type_3 *)(var_3 + var_4),(type_5 *)0x0);
  var_4 = *(int *)var_2;
  *(int *)var_3 = var_4;
  *(type_4 *)(var_3 + *(int *)(var_4 + -0xc)) = *(type_4 *)(var_2 + 0xc);
  this_00 = (type_2 *)(var_3 + 4);
                    /* try { // try from 001dda44 to 001dda48 has its CatchHandler @ 001ddabf */
  filebuf::type_2(this_00);
                    /* try { // try from 001dda56 to 001ddab1 has its CatchHandler @ 001ddabd */
  ios::var_5((type_3 *)(var_3 + *(int *)(*(int *)var_3 + -0xc)),(type_5 *)this_00);
  var_4 = type_2::var_6(this_00,(char *)param_2,var_7 | var_8);
  var_10 = (type_3 *)(var_3 + *(int *)(*(int *)var_3 + -0xc));
  if (var_4 != 0) {
    ios::var_9(var_10,_S_goodbit);
    return;
  }
  ios::var_9(var_10,*(type_6 *)(var_10 + 0x14) | var_11);
  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: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (subscript_expression argument: (identifier) index: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (subscript_expression argument: (identifier) index: (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))))) right: (subscript_expression argument: (identifier) index: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal)))) (return_statement))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))))) (return_statement))))

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

{
  int iVar1;
  int *piVar2;
  int iVar3;
  
  FUN_00058c4a();
  iVar1 = *(int *)(param_2[1] + -0xc);
  *param_1 = param_2[1];
  piVar2 = (int *)(iVar1 + (int)param_1);
  *piVar2 = param_2[2];
  FUN_001d6b10(piVar2,0);
  iVar1 = *param_2;
  *param_1 = iVar1;
  *(int *)((int)param_1 + *(int *)(iVar1 + -0xc)) = param_2[3];
  piVar2 = param_1 + 1;
                    /* try { // try from 001dda44 to 001dda48 has its CatchHandler @ 001ddabf */
  FUN_001d8d30(piVar2);
                    /* try { // try from 001dda56 to 001ddab1 has its CatchHandler @ 001ddabd */
  FUN_001d6b10(*(int *)(*param_1 + -0xc) + (int)param_1,piVar2);
  iVar1 = FUN_001dd010(piVar2,param_3,param_4 | 0x10);
  iVar3 = *(int *)(*param_1 + -0xc) + (int)param_1;
  if (iVar1 != 0) {
    FUN_001d62c0(iVar3,0);
    return;
  }
  FUN_001d62c0(iVar3,*(uint *)(iVar3 + 0x14) | 4);
  return;
}

