
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::fstream::open(std::string const&, std::_Ios_Openmode) */

void __thiscall std::fstream::open(fstream *this,string *param_1,_Ios_Openmode param_2)

{
  int iVar1;
  
  iVar1 = filebuf::open((filebuf *)(this + 0xc),*(char **)param_1,param_2);
  if (iVar1 != 0) {
    ios::clear((ios *)(this + *(int *)(*(int *)this + -0xc)),_S_goodbit);
    return;
  }
  ios::clear((ios *)(this + *(int *)(*(int *)this + -0xc)),
             *(_Ios_Iostate *)((ios *)(this + *(int *)(*(int *)this + -0xc)) + 0x14) | _S_failbit);
  return;
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void FUN_001b1540(int *param_1,undefined4 *param_2,undefined4 param_3)

{
  int iVar1;
  
  iVar1 = FUN_001b1340(param_1 + 3,*param_2,param_3);
  if (iVar1 != 0) {
    FUN_001aa5f0((int)param_1 + *(int *)(*param_1 + -0xc),0);
    return;
  }
  iVar1 = (int)param_1 + *(int *)(*param_1 + -0xc);
  FUN_001aa5f0(iVar1,*(uint *)(iVar1 + 0x14) | 4);
  return;
}


PUSH ESI
PUSH EBX
CALL 0x00032730
ADD EBX,0x150ab9
SUB ESP,0x8
MOV ESI,dword ptr [ESP + 0x14]
PUSH dword ptr [ESP + 0x1c]
MOV EAX,dword ptr [ESP + 0x1c]
PUSH dword ptr [EAX]
LEA EAX,[ESI + 0xc]
PUSH EAX
CALL 0x001b1340
ADD ESP,0x10
TEST EAX,EAX
JZ 0x001b1590
SUB ESP,0x8
PUSH 0x0
MOV EAX,dword ptr [ESI]
ADD ESI,dword ptr [EAX + -0xc]
PUSH ESI
CALL 0x001aa5f0
ADD ESP,0x10
ADD ESP,0x4
POP EBX
POP ESI
RET
MOV EAX,dword ptr [ESI]
SUB ESP,0x8
ADD ESI,dword ptr [EAX + -0xc]
MOV EAX,dword ptr [ESI + 0x14]
OR EAX,0x4
PUSH EAX
PUSH ESI
CALL 0x001aa5f0
ADD ESP,0x10
ADD ESP,0x4
POP EBX
POP ESI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_001b1540(int *param_1,undefined4 *param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  \n  iVar1 = FUN_001b1340(param_1 + 3,*param_2,param_3);\n  if (iVar1 != 0) {\n    FUN_001aa5f0((int)param_1 + *(int *)(*param_1 + -0xc),0);\n    return;\n  }\n  iVar1 = (int)param_1 + *(int *)(*param_1 + -0xc);\n  FUN_001aa5f0(iVar1,*(uint *)(iVar1 + 0x14) | 4);\n  return;\n}\n\n" comment (function_definition "void FUN_001b1540(int *param_1,undefined4 *param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  \n  iVar1 = FUN_001b1340(param_1 + 3,*param_2,param_3);\n  if (iVar1 != 0) {\n    FUN_001aa5f0((int)param_1 + *(int *)(*param_1 + -0xc),0);\n    return;\n  }\n  iVar1 = (int)param_1 + *(int *)(*param_1 + -0xc);\n  FUN_001aa5f0(iVar1,*(uint *)(iVar1 + 0x14) | 4);\n  return;\n}" primitive_type (function_declarator "FUN_001b1540(int *param_1,undefined4 *param_2,undefined4 param_3)" identifier (parameter_list "(int *param_1,undefined4 *param_2,undefined4 param_3)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = FUN_001b1340(param_1 + 3,*param_2,param_3);\n  if (iVar1 != 0) {\n    FUN_001aa5f0((int)param_1 + *(int *)(*param_1 + -0xc),0);\n    return;\n  }\n  iVar1 = (int)param_1 + *(int *)(*param_1 + -0xc);\n  FUN_001aa5f0(iVar1,*(uint *)(iVar1 + 0x14) | 4);\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "iVar1 = FUN_001b1340(param_1 + 3,*param_2,param_3);" (assignment_expression "iVar1 = FUN_001b1340(param_1 + 3,*param_2,param_3)" identifier = (call_expression "FUN_001b1340(param_1 + 3,*param_2,param_3)" identifier (argument_list "(param_1 + 3,*param_2,param_3)" ( (binary_expression "param_1 + 3" identifier + number_literal) , (pointer_expression "*param_2" * identifier) , identifier )))) ;) (if_statement "if (iVar1 != 0) {\n    FUN_001aa5f0((int)param_1 + *(int *)(*param_1 + -0xc),0);\n    return;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    FUN_001aa5f0((int)param_1 + *(int *)(*param_1 + -0xc),0);\n    return;\n  }" { (expression_statement "FUN_001aa5f0((int)param_1 + *(int *)(*param_1 + -0xc),0);" (call_expression "FUN_001aa5f0((int)param_1 + *(int *)(*param_1 + -0xc),0)" identifier (argument_list "((int)param_1 + *(int *)(*param_1 + -0xc),0)" ( (binary_expression "(int)param_1 + *(int *)(*param_1 + -0xc)" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + (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) ))))) , number_literal ))) ;) (return_statement "return;" return ;) })) (expression_statement "iVar1 = (int)param_1 + *(int *)(*param_1 + -0xc);" (assignment_expression "iVar1 = (int)param_1 + *(int *)(*param_1 + -0xc)" identifier = (binary_expression "(int)param_1 + *(int *)(*param_1 + -0xc)" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + (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) )))))) ;) (expression_statement "FUN_001aa5f0(iVar1,*(uint *)(iVar1 + 0x14) | 4);" (call_expression "FUN_001aa5f0(iVar1,*(uint *)(iVar1 + 0x14) | 4)" identifier (argument_list "(iVar1,*(uint *)(iVar1 + 0x14) | 4)" ( identifier , (binary_expression "*(uint *)(iVar1 + 0x14) | 4" (pointer_expression "*(uint *)(iVar1 + 0x14)" * (cast_expression "(uint *)(iVar1 + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x14)" ( (binary_expression "iVar1 + 0x14" identifier + number_literal) )))) | number_literal) ))) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* std::fstream::open(std::string const&, std::_Ios_Openmode) */\n\nvoid __thiscall std::fstream::open(fstream *this,string *param_1,_Ios_Openmode param_2)\n\n{\n  int iVar1;\n  \n  iVar1 = filebuf::open((filebuf *)(this + 0xc),*(char **)param_1,param_2);\n  if (iVar1 != 0) {\n    ios::clear((ios *)(this + *(int *)(*(int *)this + -0xc)),_S_goodbit);\n    return;\n  }\n  ios::clear((ios *)(this + *(int *)(*(int *)this + -0xc)),\n             *(_Ios_Iostate *)((ios *)(this + *(int *)(*(int *)this + -0xc)) + 0x14) | _S_failbit);\n  return;\n}\n\n" comment comment (function_definition "void __thiscall std::fstream::open(fstream *this,string *param_1,_Ios_Openmode param_2)\n\n{\n  int iVar1;\n  \n  iVar1 = filebuf::open((filebuf *)(this + 0xc),*(char **)param_1,param_2);\n  if (iVar1 != 0) {\n    ios::clear((ios *)(this + *(int *)(*(int *)this + -0xc)),_S_goodbit);\n    return;\n  }\n  ios::clear((ios *)(this + *(int *)(*(int *)this + -0xc)),\n             *(_Ios_Iostate *)((ios *)(this + *(int *)(*(int *)this + -0xc)) + 0x14) | _S_failbit);\n  return;\n}" primitive_type (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::fstream::" identifier : : identifier : :) (function_declarator "open(fstream *this,string *param_1,_Ios_Openmode param_2)" identifier (parameter_list "(fstream *this,string *param_1,_Ios_Openmode param_2)" ( (parameter_declaration "fstream *this" type_identifier (pointer_declarator "*this" * identifier)) , (parameter_declaration "string *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "_Ios_Openmode param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = filebuf::open((filebuf *)(this + 0xc),*(char **)param_1,param_2);\n  if (iVar1 != 0) {\n    ios::clear((ios *)(this + *(int *)(*(int *)this + -0xc)),_S_goodbit);\n    return;\n  }\n  ios::clear((ios *)(this + *(int *)(*(int *)this + -0xc)),\n             *(_Ios_Iostate *)((ios *)(this + *(int *)(*(int *)this + -0xc)) + 0x14) | _S_failbit);\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (ERROR "iVar1 = filebuf::" (assignment_expression "iVar1 = filebuf" identifier = identifier) : :) (expression_statement "open((filebuf *)(this + 0xc),*(char **)param_1,param_2);" (call_expression "open((filebuf *)(this + 0xc),*(char **)param_1,param_2)" identifier (argument_list "((filebuf *)(this + 0xc),*(char **)param_1,param_2)" ( (cast_expression "(filebuf *)(this + 0xc)" ( (type_descriptor "filebuf *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0xc)" ( (binary_expression "this + 0xc" identifier + number_literal) ))) , (pointer_expression "*(char **)param_1" * (cast_expression "(char **)param_1" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) , identifier ))) ;) (if_statement "if (iVar1 != 0) {\n    ios::clear((ios *)(this + *(int *)(*(int *)this + -0xc)),_S_goodbit);\n    return;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    ios::clear((ios *)(this + *(int *)(*(int *)this + -0xc)),_S_goodbit);\n    return;\n  }" { (labeled_statement "ios::clear((ios *)(this + *(int *)(*(int *)this + -0xc)),_S_goodbit);" statement_identifier : (ERROR ":" :) (expression_statement "clear((ios *)(this + *(int *)(*(int *)this + -0xc)),_S_goodbit);" (call_expression "clear((ios *)(this + *(int *)(*(int *)this + -0xc)),_S_goodbit)" identifier (argument_list "((ios *)(this + *(int *)(*(int *)this + -0xc)),_S_goodbit)" ( (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) ))))) ))) , identifier ))) ;)) (return_statement "return;" return ;) })) (labeled_statement "ios::clear((ios *)(this + *(int *)(*(int *)this + -0xc)),\n             *(_Ios_Iostate *)((ios *)(this + *(int *)(*(int *)this + -0xc)) + 0x14) | _S_failbit);" statement_identifier : (ERROR ":" :) (expression_statement "clear((ios *)(this + *(int *)(*(int *)this + -0xc)),\n             *(_Ios_Iostate *)((ios *)(this + *(int *)(*(int *)this + -0xc)) + 0x14) | _S_failbit);" (call_expression "clear((ios *)(this + *(int *)(*(int *)this + -0xc)),\n             *(_Ios_Iostate *)((ios *)(this + *(int *)(*(int *)this + -0xc)) + 0x14) | _S_failbit)" identifier (argument_list "((ios *)(this + *(int *)(*(int *)this + -0xc)),\n             *(_Ios_Iostate *)((ios *)(this + *(int *)(*(int *)this + -0xc)) + 0x14) | _S_failbit)" ( (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) ))))) ))) , (binary_expression "*(_Ios_Iostate *)((ios *)(this + *(int *)(*(int *)this + -0xc)) + 0x14) | _S_failbit" (pointer_expression "*(_Ios_Iostate *)((ios *)(this + *(int *)(*(int *)this + -0xc)) + 0x14)" * (cast_expression "(_Ios_Iostate *)((ios *)(this + *(int *)(*(int *)this + -0xc)) + 0x14)" ( (type_descriptor "_Ios_Iostate *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((ios *)(this + *(int *)(*(int *)this + -0xc)) + 0x14)" ( (binary_expression "(ios *)(this + *(int *)(*(int *)this + -0xc)) + 0x14" (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) ))))) ))) + number_literal) )))) | identifier) ))) ;)) (return_statement "return;" return ;) })))
(translation_unit "void FUN_001b1540(int *param_1,undefined4 *param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  \n  iVar1 = FUN_001b1340(param_1 + 3,*param_2,param_3);\n  if (iVar1 != 0) {\n    FUN_001aa5f0((int)param_1 + *(int *)(*param_1 + -0xc),0);\n    return;\n  }\n  iVar1 = (int)param_1 + *(int *)(*param_1 + -0xc);\n  FUN_001aa5f0(iVar1,*(uint *)(iVar1 + 0x14) | 4);\n  return;\n}\n\n" (function_definition "void FUN_001b1540(int *param_1,undefined4 *param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  \n  iVar1 = FUN_001b1340(param_1 + 3,*param_2,param_3);\n  if (iVar1 != 0) {\n    FUN_001aa5f0((int)param_1 + *(int *)(*param_1 + -0xc),0);\n    return;\n  }\n  iVar1 = (int)param_1 + *(int *)(*param_1 + -0xc);\n  FUN_001aa5f0(iVar1,*(uint *)(iVar1 + 0x14) | 4);\n  return;\n}" primitive_type (function_declarator "FUN_001b1540(int *param_1,undefined4 *param_2,undefined4 param_3)" identifier (parameter_list "(int *param_1,undefined4 *param_2,undefined4 param_3)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = FUN_001b1340(param_1 + 3,*param_2,param_3);\n  if (iVar1 != 0) {\n    FUN_001aa5f0((int)param_1 + *(int *)(*param_1 + -0xc),0);\n    return;\n  }\n  iVar1 = (int)param_1 + *(int *)(*param_1 + -0xc);\n  FUN_001aa5f0(iVar1,*(uint *)(iVar1 + 0x14) | 4);\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "iVar1 = FUN_001b1340(param_1 + 3,*param_2,param_3);" (assignment_expression "iVar1 = FUN_001b1340(param_1 + 3,*param_2,param_3)" identifier = (call_expression "FUN_001b1340(param_1 + 3,*param_2,param_3)" identifier (argument_list "(param_1 + 3,*param_2,param_3)" ( (binary_expression "param_1 + 3" identifier + number_literal) , (pointer_expression "*param_2" * identifier) , identifier )))) ;) (if_statement "if (iVar1 != 0) {\n    FUN_001aa5f0((int)param_1 + *(int *)(*param_1 + -0xc),0);\n    return;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    FUN_001aa5f0((int)param_1 + *(int *)(*param_1 + -0xc),0);\n    return;\n  }" { (expression_statement "FUN_001aa5f0((int)param_1 + *(int *)(*param_1 + -0xc),0);" (call_expression "FUN_001aa5f0((int)param_1 + *(int *)(*param_1 + -0xc),0)" identifier (argument_list "((int)param_1 + *(int *)(*param_1 + -0xc),0)" ( (binary_expression "(int)param_1 + *(int *)(*param_1 + -0xc)" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + (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) ))))) , number_literal ))) ;) (return_statement "return;" return ;) })) (expression_statement "iVar1 = (int)param_1 + *(int *)(*param_1 + -0xc);" (assignment_expression "iVar1 = (int)param_1 + *(int *)(*param_1 + -0xc)" identifier = (binary_expression "(int)param_1 + *(int *)(*param_1 + -0xc)" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + (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) )))))) ;) (expression_statement "FUN_001aa5f0(iVar1,*(uint *)(iVar1 + 0x14) | 4);" (call_expression "FUN_001aa5f0(iVar1,*(uint *)(iVar1 + 0x14) | 4)" identifier (argument_list "(iVar1,*(uint *)(iVar1 + 0x14) | 4)" ( identifier , (binary_expression "*(uint *)(iVar1 + 0x14) | 4" (pointer_expression "*(uint *)(iVar1 + 0x14)" * (cast_expression "(uint *)(iVar1 + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x14)" ( (binary_expression "iVar1 + 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) ))) (compound_statement { (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , (pointer_expression * IDENT) , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) ))))) , LIT ))) ;) (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))))) ;) (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_001b1540(int *param_1,undefined4 *param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  \n  iVar1 = FUN_001b1340(param_1 + 3,*param_2,param_3);\n  if (iVar1 != 0) {\n    FUN_001aa5f0((int)param_1 + *(int *)(*param_1 + -0xc),0);\n    return;\n  }\n  iVar1 = (int)param_1 + *(int *)(*param_1 + -0xc);\n  FUN_001aa5f0(iVar1,*(uint *)(iVar1 + 0x14) | 4);\n  return;\n}" (primitive_type "void") (function_declarator "FUN_001b1540(int *param_1,undefined4 *param_2,undefined4 param_3)" (identifier "FUN_001b1540") (parameter_list "(int *param_1,undefined4 *param_2,undefined4 param_3)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "undefined4 *param_2" (type_identifier "undefined4") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) () ")"))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = FUN_001b1340(param_1 + 3,*param_2,param_3);\n  if (iVar1 != 0) {\n    FUN_001aa5f0((int)param_1 + *(int *)(*param_1 + -0xc),0);\n    return;\n  }\n  iVar1 = (int)param_1 + *(int *)(*param_1 + -0xc);\n  FUN_001aa5f0(iVar1,*(uint *)(iVar1 + 0x14) | 4);\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (expression_statement "iVar1 = FUN_001b1340(param_1 + 3,*param_2,param_3);" (assignment_expression "iVar1 = FUN_001b1340(param_1 + 3,*param_2,param_3)" (identifier "iVar1") (= "=") (call_expression "FUN_001b1340(param_1 + 3,*param_2,param_3)" (identifier "FUN_001b1340") (argument_list "(param_1 + 3,*param_2,param_3)" (( "(") (binary_expression "param_1 + 3" (identifier "param_1") (+ "+") (number_literal "3")) (, ",") (pointer_expression "*param_2" (* "*") (identifier "param_2")) (, ",") (identifier "param_3") () ")")))) (; ";")) (if_statement "if (iVar1 != 0) {\n    FUN_001aa5f0((int)param_1 + *(int *)(*param_1 + -0xc),0);\n    return;\n  }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    FUN_001aa5f0((int)param_1 + *(int *)(*param_1 + -0xc),0);\n    return;\n  }" ({ "{") (expression_statement "FUN_001aa5f0((int)param_1 + *(int *)(*param_1 + -0xc),0);" (call_expression "FUN_001aa5f0((int)param_1 + *(int *)(*param_1 + -0xc),0)" (identifier "FUN_001aa5f0") (argument_list "((int)param_1 + *(int *)(*param_1 + -0xc),0)" (( "(") (binary_expression "(int)param_1 + *(int *)(*param_1 + -0xc)" (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "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")) () ")"))))) (, ",") (number_literal "0") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "iVar1 = (int)param_1 + *(int *)(*param_1 + -0xc);" (assignment_expression "iVar1 = (int)param_1 + *(int *)(*param_1 + -0xc)" (identifier "iVar1") (= "=") (binary_expression "(int)param_1 + *(int *)(*param_1 + -0xc)" (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "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")) () ")")))))) (; ";")) (expression_statement "FUN_001aa5f0(iVar1,*(uint *)(iVar1 + 0x14) | 4);" (call_expression "FUN_001aa5f0(iVar1,*(uint *)(iVar1 + 0x14) | 4)" (identifier "FUN_001aa5f0") (argument_list "(iVar1,*(uint *)(iVar1 + 0x14) | 4)" (( "(") (identifier "iVar1") (, ",") (binary_expression "*(uint *)(iVar1 + 0x14) | 4" (pointer_expression "*(uint *)(iVar1 + 0x14)" (* "*") (cast_expression "(uint *)(iVar1 + 0x14)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x14)" (( "(") (binary_expression "iVar1 + 0x14" (identifier "iVar1") (+ "+") (number_literal "0x14")) () ")")))) (| "|") (number_literal "4")) () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::fstream::open(std::string const&, std::_Ios_Openmode) */

void __thiscall std::type_1::function_1(type_1 *var_1,type_2 *param_1,type_3 param_2)

{
  int var_2;
  
  var_2 = type_4::function_1((type_4 *)(var_1 + 0xc),*(char **)param_1,param_2);
  if (var_2 != 0) {
    ios::var_3((type_5 *)(var_1 + *(int *)(*(int *)var_1 + -0xc)),_S_goodbit);
    return;
  }
  ios::var_3((type_5 *)(var_1 + *(int *)(*(int *)var_1 + -0xc)),
             *(type_6 *)((type_5 *)(var_1 + *(int *)(*(int *)var_1 + -0xc)) + 0x14) | var_4);
  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: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)) (pointer_expression argument: (identifier)) (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 (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: (pointer_expression argument: (identifier)) right: (number_literal)))))) (number_literal)))) (return_statement))) (expression_statement (assignment_expression left: (identifier) right: (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: (pointer_expression argument: (identifier)) right: (number_literal)))))))) (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))))

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

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

{
  int iVar1;
  
  iVar1 = FUN_001b1340(param_1 + 3,*param_2,param_3);
  if (iVar1 != 0) {
    FUN_001aa5f0((int)param_1 + *(int *)(*param_1 + -0xc),0);
    return;
  }
  iVar1 = (int)param_1 + *(int *)(*param_1 + -0xc);
  FUN_001aa5f0(iVar1,*(uint *)(iVar1 + 0x14) | 4);
  return;
}

