
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::wifstream::close() */

void __thiscall std::wifstream::close(wifstream *this)

{
  int iVar1;
  
  iVar1 = wfilebuf::close((wfilebuf *)(this + 8));
  if (iVar1 != 0) {
    return;
  }
  wios::clear((wios *)(this + *(int *)(*(int *)this + -0xc)),
              *(_Ios_Iostate *)((wios *)(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_0021b920(int *param_1)

{
  int iVar1;
  
  iVar1 = FUN_002199f0(param_1 + 2);
  if (iVar1 != 0) {
    return;
  }
  iVar1 = (int)param_1 + *(int *)(*param_1 + -0xc);
  FUN_002116a0(iVar1,*(uint *)(iVar1 + 0x14) | 4);
  return;
}


PUSH ESI
PUSH EBX
CALL 0x00035840
ADD EBX,0x1736d9
SUB ESP,0x10
MOV ESI,dword ptr [ESP + 0x1c]
LEA EAX,[ESI + 0x8]
PUSH EAX
CALL 0x002199f0
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0021b950
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 0x002116a0
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_0021b920(int *param_1)\n\n{\n  int iVar1;\n  \n  iVar1 = FUN_002199f0(param_1 + 2);\n  if (iVar1 != 0) {\n    return;\n  }\n  iVar1 = (int)param_1 + *(int *)(*param_1 + -0xc);\n  FUN_002116a0(iVar1,*(uint *)(iVar1 + 0x14) | 4);\n  return;\n}\n\n" comment (function_definition "void FUN_0021b920(int *param_1)\n\n{\n  int iVar1;\n  \n  iVar1 = FUN_002199f0(param_1 + 2);\n  if (iVar1 != 0) {\n    return;\n  }\n  iVar1 = (int)param_1 + *(int *)(*param_1 + -0xc);\n  FUN_002116a0(iVar1,*(uint *)(iVar1 + 0x14) | 4);\n  return;\n}" primitive_type (function_declarator "FUN_0021b920(int *param_1)" identifier (parameter_list "(int *param_1)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = FUN_002199f0(param_1 + 2);\n  if (iVar1 != 0) {\n    return;\n  }\n  iVar1 = (int)param_1 + *(int *)(*param_1 + -0xc);\n  FUN_002116a0(iVar1,*(uint *)(iVar1 + 0x14) | 4);\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "iVar1 = FUN_002199f0(param_1 + 2);" (assignment_expression "iVar1 = FUN_002199f0(param_1 + 2)" identifier = (call_expression "FUN_002199f0(param_1 + 2)" identifier (argument_list "(param_1 + 2)" ( (binary_expression "param_1 + 2" identifier + number_literal) )))) ;) (if_statement "if (iVar1 != 0) {\n    return;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    return;\n  }" { (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_002116a0(iVar1,*(uint *)(iVar1 + 0x14) | 4);" (call_expression "FUN_002116a0(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::wifstream::close() */\n\nvoid __thiscall std::wifstream::close(wifstream *this)\n\n{\n  int iVar1;\n  \n  iVar1 = wfilebuf::close((wfilebuf *)(this + 8));\n  if (iVar1 != 0) {\n    return;\n  }\n  wios::clear((wios *)(this + *(int *)(*(int *)this + -0xc)),\n              *(_Ios_Iostate *)((wios *)(this + *(int *)(*(int *)this + -0xc)) + 0x14) | _S_failbit)\n  ;\n  return;\n}\n\n" comment comment (function_definition "void __thiscall std::wifstream::close(wifstream *this)\n\n{\n  int iVar1;\n  \n  iVar1 = wfilebuf::close((wfilebuf *)(this + 8));\n  if (iVar1 != 0) {\n    return;\n  }\n  wios::clear((wios *)(this + *(int *)(*(int *)this + -0xc)),\n              *(_Ios_Iostate *)((wios *)(this + *(int *)(*(int *)this + -0xc)) + 0x14) | _S_failbit)\n  ;\n  return;\n}" primitive_type (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::wifstream::" identifier : : identifier : :) (function_declarator "close(wifstream *this)" identifier (parameter_list "(wifstream *this)" ( (parameter_declaration "wifstream *this" type_identifier (pointer_declarator "*this" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = wfilebuf::close((wfilebuf *)(this + 8));\n  if (iVar1 != 0) {\n    return;\n  }\n  wios::clear((wios *)(this + *(int *)(*(int *)this + -0xc)),\n              *(_Ios_Iostate *)((wios *)(this + *(int *)(*(int *)this + -0xc)) + 0x14) | _S_failbit)\n  ;\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (ERROR "iVar1 = wfilebuf::" (assignment_expression "iVar1 = wfilebuf" identifier = identifier) : :) (expression_statement "close((wfilebuf *)(this + 8));" (call_expression "close((wfilebuf *)(this + 8))" identifier (argument_list "((wfilebuf *)(this + 8))" ( (cast_expression "(wfilebuf *)(this + 8)" ( (type_descriptor "wfilebuf *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) ))) ))) ;) (if_statement "if (iVar1 != 0) {\n    return;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (labeled_statement "wios::clear((wios *)(this + *(int *)(*(int *)this + -0xc)),\n              *(_Ios_Iostate *)((wios *)(this + *(int *)(*(int *)this + -0xc)) + 0x14) | _S_failbit)\n  ;" statement_identifier : (ERROR ":" :) (expression_statement "clear((wios *)(this + *(int *)(*(int *)this + -0xc)),\n              *(_Ios_Iostate *)((wios *)(this + *(int *)(*(int *)this + -0xc)) + 0x14) | _S_failbit)\n  ;" (call_expression "clear((wios *)(this + *(int *)(*(int *)this + -0xc)),\n              *(_Ios_Iostate *)((wios *)(this + *(int *)(*(int *)this + -0xc)) + 0x14) | _S_failbit)" identifier (argument_list "((wios *)(this + *(int *)(*(int *)this + -0xc)),\n              *(_Ios_Iostate *)((wios *)(this + *(int *)(*(int *)this + -0xc)) + 0x14) | _S_failbit)" ( (cast_expression "(wios *)(this + *(int *)(*(int *)this + -0xc))" ( (type_descriptor "wios *" 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 *)((wios *)(this + *(int *)(*(int *)this + -0xc)) + 0x14) | _S_failbit" (pointer_expression "*(_Ios_Iostate *)((wios *)(this + *(int *)(*(int *)this + -0xc)) + 0x14)" * (cast_expression "(_Ios_Iostate *)((wios *)(this + *(int *)(*(int *)this + -0xc)) + 0x14)" ( (type_descriptor "_Ios_Iostate *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((wios *)(this + *(int *)(*(int *)this + -0xc)) + 0x14)" ( (binary_expression "(wios *)(this + *(int *)(*(int *)this + -0xc)) + 0x14" (cast_expression "(wios *)(this + *(int *)(*(int *)this + -0xc))" ( (type_descriptor "wios *" 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_0021b920(int *param_1)\n\n{\n  int iVar1;\n  \n  iVar1 = FUN_002199f0(param_1 + 2);\n  if (iVar1 != 0) {\n    return;\n  }\n  iVar1 = (int)param_1 + *(int *)(*param_1 + -0xc);\n  FUN_002116a0(iVar1,*(uint *)(iVar1 + 0x14) | 4);\n  return;\n}\n\n" (function_definition "void FUN_0021b920(int *param_1)\n\n{\n  int iVar1;\n  \n  iVar1 = FUN_002199f0(param_1 + 2);\n  if (iVar1 != 0) {\n    return;\n  }\n  iVar1 = (int)param_1 + *(int *)(*param_1 + -0xc);\n  FUN_002116a0(iVar1,*(uint *)(iVar1 + 0x14) | 4);\n  return;\n}" primitive_type (function_declarator "FUN_0021b920(int *param_1)" identifier (parameter_list "(int *param_1)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = FUN_002199f0(param_1 + 2);\n  if (iVar1 != 0) {\n    return;\n  }\n  iVar1 = (int)param_1 + *(int *)(*param_1 + -0xc);\n  FUN_002116a0(iVar1,*(uint *)(iVar1 + 0x14) | 4);\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "iVar1 = FUN_002199f0(param_1 + 2);" (assignment_expression "iVar1 = FUN_002199f0(param_1 + 2)" identifier = (call_expression "FUN_002199f0(param_1 + 2)" identifier (argument_list "(param_1 + 2)" ( (binary_expression "param_1 + 2" identifier + number_literal) )))) ;) (if_statement "if (iVar1 != 0) {\n    return;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    return;\n  }" { (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_002116a0(iVar1,*(uint *)(iVar1 + 0x14) | 4);" (call_expression "FUN_002116a0(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)) ))) (compound_statement { (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (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_0021b920(int *param_1)\n\n{\n  int iVar1;\n  \n  iVar1 = FUN_002199f0(param_1 + 2);\n  if (iVar1 != 0) {\n    return;\n  }\n  iVar1 = (int)param_1 + *(int *)(*param_1 + -0xc);\n  FUN_002116a0(iVar1,*(uint *)(iVar1 + 0x14) | 4);\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0021b920(int *param_1)" (identifier "FUN_0021b920") (parameter_list "(int *param_1)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = FUN_002199f0(param_1 + 2);\n  if (iVar1 != 0) {\n    return;\n  }\n  iVar1 = (int)param_1 + *(int *)(*param_1 + -0xc);\n  FUN_002116a0(iVar1,*(uint *)(iVar1 + 0x14) | 4);\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (expression_statement "iVar1 = FUN_002199f0(param_1 + 2);" (assignment_expression "iVar1 = FUN_002199f0(param_1 + 2)" (identifier "iVar1") (= "=") (call_expression "FUN_002199f0(param_1 + 2)" (identifier "FUN_002199f0") (argument_list "(param_1 + 2)" (( "(") (binary_expression "param_1 + 2" (identifier "param_1") (+ "+") (number_literal "2")) () ")")))) (; ";")) (if_statement "if (iVar1 != 0) {\n    return;\n  }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (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_002116a0(iVar1,*(uint *)(iVar1 + 0x14) | 4);" (call_expression "FUN_002116a0(iVar1,*(uint *)(iVar1 + 0x14) | 4)" (identifier "FUN_002116a0") (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::wifstream::close() */

void __thiscall std::type_1::function_1(type_1 *var_1)

{
  int var_2;
  
  var_2 = type_2::function_1((type_2 *)(var_1 + 8));
  if (var_2 != 0) {
    return;
  }
  wios::var_3((type_3 *)(var_1 + *(int *)(*(int *)var_1 + -0xc)),
              *(type_4 *)((type_3 *)(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))))) 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)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (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)

{
  int iVar1;
  
  iVar1 = FUN_002199f0(param_1 + 2);
  if (iVar1 != 0) {
    return;
  }
  iVar1 = (int)param_1 + *(int *)(*param_1 + -0xc);
  FUN_002116a0(iVar1,*(uint *)(iVar1 + 0x14) | 4);
  return;
}

