
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::__basic_file<char>::open(char const*, std::_Ios_Openmode, int) */

char * std::__basic_file<char>::open(char *param_1,_Ios_Openmode param_2,int param_3)

{
  char cVar1;
  char *__modes;
  FILE *pFVar2;
  
  __modes = (char *)::(anonymous_namespace)::fopen_mode(param_3);
  if (__modes != (char *)0x0) {
    cVar1 = is_open((__basic_file<char> *)param_1);
    if (cVar1 == '\0') {
      pFVar2 = fopen64((char *)param_2,__modes);
      *(FILE **)param_1 = pFVar2;
      if (pFVar2 != (FILE *)0x0) {
        param_1[4] = '\x01';
        return param_1;
      }
    }
  }
  return (char *)0x0;
}



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

undefined4 * FUN_001acbb0(undefined4 *param_1,char *param_2)

{
  char cVar1;
  char *__modes;
  FILE *pFVar2;
  
  __modes = (char *)FUN_001ac930();
  if (__modes != (char *)0x0) {
    cVar1 = FUN_001acaa0(param_1);
    if (cVar1 == '\0') {
      pFVar2 = fopen64(param_2,__modes);
      *param_1 = pFVar2;
      if (pFVar2 != (FILE *)0x0) {
        *(undefined1 *)(param_1 + 1) = 1;
        return param_1;
      }
    }
  }
  return (undefined4 *)0x0;
}


PUSH EDI
PUSH ESI
PUSH EBX
MOV EAX,dword ptr [ESP + 0x18]
CALL 0x00035680
ADD EBX,0x192444
MOV ESI,dword ptr [ESP + 0x10]
CALL 0x001ac930
TEST EAX,EAX
JZ 0x001acc08
SUB ESP,0xc
MOV EDI,EAX
PUSH ESI
CALL 0x001acaa0
ADD ESP,0x10
TEST AL,AL
JNZ 0x001acc08
SUB ESP,0x8
PUSH EDI
PUSH dword ptr [ESP + 0x20]
CALL 0x00028310
ADD ESP,0x10
MOV dword ptr [ESI],EAX
TEST EAX,EAX
JZ 0x001acc08
MOV byte ptr [ESI + 0x4],0x1
MOV EAX,ESI
POP EBX
POP ESI
POP EDI
RET
POP EBX
XOR EAX,EAX
POP ESI
POP EDI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 * FUN_001acbb0(undefined4 *param_1,char *param_2)\n\n{\n  char cVar1;\n  char *__modes;\n  FILE *pFVar2;\n  \n  __modes = (char *)FUN_001ac930();\n  if (__modes != (char *)0x0) {\n    cVar1 = FUN_001acaa0(param_1);\n    if (cVar1 == '\0') {\n      pFVar2 = fopen64(param_2,__modes);\n      *param_1 = pFVar2;\n      if (pFVar2 != (FILE *)0x0) {\n        *(undefined1 *)(param_1 + 1) = 1;\n        return param_1;\n      }\n    }\n  }\n  return (undefined4 *)0x0;\n}\n\n" comment (function_definition "undefined4 * FUN_001acbb0(undefined4 *param_1,char *param_2)\n\n{\n  char cVar1;\n  char *__modes;\n  FILE *pFVar2;\n  \n  __modes = (char *)FUN_001ac930();\n  if (__modes != (char *)0x0) {\n    cVar1 = FUN_001acaa0(param_1);\n    if (cVar1 == '\0') {\n      pFVar2 = fopen64(param_2,__modes);\n      *param_1 = pFVar2;\n      if (pFVar2 != (FILE *)0x0) {\n        *(undefined1 *)(param_1 + 1) = 1;\n        return param_1;\n      }\n    }\n  }\n  return (undefined4 *)0x0;\n}" type_identifier (pointer_declarator "* FUN_001acbb0(undefined4 *param_1,char *param_2)" * (function_declarator "FUN_001acbb0(undefined4 *param_1,char *param_2)" identifier (parameter_list "(undefined4 *param_1,char *param_2)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) )))) (compound_statement "{\n  char cVar1;\n  char *__modes;\n  FILE *pFVar2;\n  \n  __modes = (char *)FUN_001ac930();\n  if (__modes != (char *)0x0) {\n    cVar1 = FUN_001acaa0(param_1);\n    if (cVar1 == '\0') {\n      pFVar2 = fopen64(param_2,__modes);\n      *param_1 = pFVar2;\n      if (pFVar2 != (FILE *)0x0) {\n        *(undefined1 *)(param_1 + 1) = 1;\n        return param_1;\n      }\n    }\n  }\n  return (undefined4 *)0x0;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "char *__modes;" primitive_type (pointer_declarator "*__modes" * identifier) ;) (declaration "FILE *pFVar2;" type_identifier (pointer_declarator "*pFVar2" * identifier) ;) (expression_statement "__modes = (char *)FUN_001ac930();" (assignment_expression "__modes = (char *)FUN_001ac930()" identifier = (cast_expression "(char *)FUN_001ac930()" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_001ac930()" identifier (argument_list "()" ( ))))) ;) (if_statement "if (__modes != (char *)0x0) {\n    cVar1 = FUN_001acaa0(param_1);\n    if (cVar1 == '\0') {\n      pFVar2 = fopen64(param_2,__modes);\n      *param_1 = pFVar2;\n      if (pFVar2 != (FILE *)0x0) {\n        *(undefined1 *)(param_1 + 1) = 1;\n        return param_1;\n      }\n    }\n  }" if (parenthesized_expression "(__modes != (char *)0x0)" ( (binary_expression "__modes != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    cVar1 = FUN_001acaa0(param_1);\n    if (cVar1 == '\0') {\n      pFVar2 = fopen64(param_2,__modes);\n      *param_1 = pFVar2;\n      if (pFVar2 != (FILE *)0x0) {\n        *(undefined1 *)(param_1 + 1) = 1;\n        return param_1;\n      }\n    }\n  }" { (expression_statement "cVar1 = FUN_001acaa0(param_1);" (assignment_expression "cVar1 = FUN_001acaa0(param_1)" identifier = (call_expression "FUN_001acaa0(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (cVar1 == '\0') {\n      pFVar2 = fopen64(param_2,__modes);\n      *param_1 = pFVar2;\n      if (pFVar2 != (FILE *)0x0) {\n        *(undefined1 *)(param_1 + 1) = 1;\n        return param_1;\n      }\n    }" if (parenthesized_expression "(cVar1 == '\0')" ( (binary_expression "cVar1 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      pFVar2 = fopen64(param_2,__modes);\n      *param_1 = pFVar2;\n      if (pFVar2 != (FILE *)0x0) {\n        *(undefined1 *)(param_1 + 1) = 1;\n        return param_1;\n      }\n    }" { (expression_statement "pFVar2 = fopen64(param_2,__modes);" (assignment_expression "pFVar2 = fopen64(param_2,__modes)" identifier = (call_expression "fopen64(param_2,__modes)" identifier (argument_list "(param_2,__modes)" ( identifier , identifier )))) ;) (expression_statement "*param_1 = pFVar2;" (assignment_expression "*param_1 = pFVar2" (pointer_expression "*param_1" * identifier) = identifier) ;) (if_statement "if (pFVar2 != (FILE *)0x0) {\n        *(undefined1 *)(param_1 + 1) = 1;\n        return param_1;\n      }" if (parenthesized_expression "(pFVar2 != (FILE *)0x0)" ( (binary_expression "pFVar2 != (FILE *)0x0" identifier != (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        *(undefined1 *)(param_1 + 1) = 1;\n        return param_1;\n      }" { (expression_statement "*(undefined1 *)(param_1 + 1) = 1;" (assignment_expression "*(undefined1 *)(param_1 + 1) = 1" (pointer_expression "*(undefined1 *)(param_1 + 1)" * (cast_expression "(undefined1 *)(param_1 + 1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 1)" ( (binary_expression "param_1 + 1" identifier + number_literal) )))) = number_literal) ;) (return_statement "return param_1;" return identifier ;) })) })) })) (return_statement "return (undefined4 *)0x0;" return (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* std::__basic_file<char>::open(char const*, std::_Ios_Openmode, int) */\n\nchar * std::__basic_file<char>::open(char *param_1,_Ios_Openmode param_2,int param_3)\n\n{\n  char cVar1;\n  char *__modes;\n  FILE *pFVar2;\n  \n  __modes = (char *)::(anonymous_namespace)::fopen_mode(param_3);\n  if (__modes != (char *)0x0) {\n    cVar1 = is_open((__basic_file<char> *)param_1);\n    if (cVar1 == '\0') {\n      pFVar2 = fopen64((char *)param_2,__modes);\n      *(FILE **)param_1 = pFVar2;\n      if (pFVar2 != (FILE *)0x0) {\n        param_1[4] = '\x01';\n        return param_1;\n      }\n    }\n  }\n  return (char *)0x0;\n}\n\n" comment comment (function_definition "char * std::__basic_file<char>::open(char *param_1,_Ios_Openmode param_2,int param_3)\n\n{\n  char cVar1;\n  char *__modes;\n  FILE *pFVar2;\n  \n  __modes = (char *)::(anonymous_namespace)::fopen_mode(param_3);\n  if (__modes != (char *)0x0) {\n    cVar1 = is_open((__basic_file<char> *)param_1);\n    if (cVar1 == '\0') {\n      pFVar2 = fopen64((char *)param_2,__modes);\n      *(FILE **)param_1 = pFVar2;\n      if (pFVar2 != (FILE *)0x0) {\n        param_1[4] = '\x01';\n        return param_1;\n      }\n    }\n  }\n  return (char *)0x0;\n}" primitive_type (pointer_declarator "* std::__basic_file<char>::open(char *param_1,_Ios_Openmode param_2,int param_3)" * (ERROR "std::__basic_file<char>::" identifier : : identifier < primitive_type > : :) (function_declarator "open(char *param_1,_Ios_Openmode param_2,int param_3)" identifier (parameter_list "(char *param_1,_Ios_Openmode param_2,int param_3)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "_Ios_Openmode param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) )))) (compound_statement "{\n  char cVar1;\n  char *__modes;\n  FILE *pFVar2;\n  \n  __modes = (char *)::(anonymous_namespace)::fopen_mode(param_3);\n  if (__modes != (char *)0x0) {\n    cVar1 = is_open((__basic_file<char> *)param_1);\n    if (cVar1 == '\0') {\n      pFVar2 = fopen64((char *)param_2,__modes);\n      *(FILE **)param_1 = pFVar2;\n      if (pFVar2 != (FILE *)0x0) {\n        param_1[4] = '\x01';\n        return param_1;\n      }\n    }\n  }\n  return (char *)0x0;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "char *__modes;" primitive_type (pointer_declarator "*__modes" * identifier) ;) (declaration "FILE *pFVar2;" type_identifier (pointer_declarator "*pFVar2" * identifier) ;) (labeled_statement "__modes = (char *)::(anonymous_namespace)::fopen_mode(param_3);" statement_identifier (ERROR "= (char *)::(anonymous_namespace):" = ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) : : (parenthesized_expression "(anonymous_namespace)" ( identifier )) :) : (expression_statement "fopen_mode(param_3);" (call_expression "fopen_mode(param_3)" identifier (argument_list "(param_3)" ( identifier ))) ;)) (if_statement "if (__modes != (char *)0x0) {\n    cVar1 = is_open((__basic_file<char> *)param_1);\n    if (cVar1 == '\0') {\n      pFVar2 = fopen64((char *)param_2,__modes);\n      *(FILE **)param_1 = pFVar2;\n      if (pFVar2 != (FILE *)0x0) {\n        param_1[4] = '\x01';\n        return param_1;\n      }\n    }\n  }" if (parenthesized_expression "(__modes != (char *)0x0)" ( (binary_expression "__modes != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    cVar1 = is_open((__basic_file<char> *)param_1);\n    if (cVar1 == '\0') {\n      pFVar2 = fopen64((char *)param_2,__modes);\n      *(FILE **)param_1 = pFVar2;\n      if (pFVar2 != (FILE *)0x0) {\n        param_1[4] = '\x01';\n        return param_1;\n      }\n    }\n  }" { (expression_statement "cVar1 = is_open((__basic_file<char> *)param_1);" (assignment_expression "cVar1 = is_open((__basic_file<char> *)param_1)" identifier = (call_expression "is_open((__basic_file<char> *)param_1)" identifier (argument_list "((__basic_file<char> *)param_1)" ( (parenthesized_expression "(__basic_file<char> *)param_1)" ( (binary_expression "__basic_file<char> *)param_1" (binary_expression "__basic_file<char" identifier < identifier) > (pointer_expression "*)param_1" * (ERROR ")" )) identifier)) )) )))) ;) (if_statement "if (cVar1 == '\0') {\n      pFVar2 = fopen64((char *)param_2,__modes);\n      *(FILE **)param_1 = pFVar2;\n      if (pFVar2 != (FILE *)0x0) {\n        param_1[4] = '\x01';\n        return param_1;\n      }\n    }" if (parenthesized_expression "(cVar1 == '\0')" ( (binary_expression "cVar1 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      pFVar2 = fopen64((char *)param_2,__modes);\n      *(FILE **)param_1 = pFVar2;\n      if (pFVar2 != (FILE *)0x0) {\n        param_1[4] = '\x01';\n        return param_1;\n      }\n    }" { (expression_statement "pFVar2 = fopen64((char *)param_2,__modes);" (assignment_expression "pFVar2 = fopen64((char *)param_2,__modes)" identifier = (call_expression "fopen64((char *)param_2,__modes)" identifier (argument_list "((char *)param_2,__modes)" ( (cast_expression "(char *)param_2" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , identifier )))) ;) (expression_statement "*(FILE **)param_1 = pFVar2;" (assignment_expression "*(FILE **)param_1 = pFVar2" (pointer_expression "*(FILE **)param_1" * (cast_expression "(FILE **)param_1" ( (type_descriptor "FILE **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) = identifier) ;) (if_statement "if (pFVar2 != (FILE *)0x0) {\n        param_1[4] = '\x01';\n        return param_1;\n      }" if (parenthesized_expression "(pFVar2 != (FILE *)0x0)" ( (binary_expression "pFVar2 != (FILE *)0x0" identifier != (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        param_1[4] = '\x01';\n        return param_1;\n      }" { (expression_statement "param_1[4] = '\x01';" (assignment_expression "param_1[4] = '\x01'" (subscript_expression "param_1[4]" identifier [ number_literal ]) = (char_literal "'\x01'" ' escape_sequence ')) ;) (return_statement "return param_1;" return identifier ;) })) })) })) (return_statement "return (char *)0x0;" return (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })))
(translation_unit "undefined4 * FUN_001acbb0(undefined4 *param_1,char *param_2)\n\n{\n  char cVar1;\n  char *__modes;\n  FILE *pFVar2;\n  \n  __modes = (char *)FUN_001ac930();\n  if (__modes != (char *)0x0) {\n    cVar1 = FUN_001acaa0(param_1);\n    if (cVar1 == '\0') {\n      pFVar2 = fopen64(param_2,__modes);\n      *param_1 = pFVar2;\n      if (pFVar2 != (FILE *)0x0) {\n        *(undefined1 *)(param_1 + 1) = 1;\n        return param_1;\n      }\n    }\n  }\n  return (undefined4 *)0x0;\n}\n\n" (function_definition "undefined4 * FUN_001acbb0(undefined4 *param_1,char *param_2)\n\n{\n  char cVar1;\n  char *__modes;\n  FILE *pFVar2;\n  \n  __modes = (char *)FUN_001ac930();\n  if (__modes != (char *)0x0) {\n    cVar1 = FUN_001acaa0(param_1);\n    if (cVar1 == '\0') {\n      pFVar2 = fopen64(param_2,__modes);\n      *param_1 = pFVar2;\n      if (pFVar2 != (FILE *)0x0) {\n        *(undefined1 *)(param_1 + 1) = 1;\n        return param_1;\n      }\n    }\n  }\n  return (undefined4 *)0x0;\n}" type_identifier (pointer_declarator "* FUN_001acbb0(undefined4 *param_1,char *param_2)" * (function_declarator "FUN_001acbb0(undefined4 *param_1,char *param_2)" identifier (parameter_list "(undefined4 *param_1,char *param_2)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) )))) (compound_statement "{\n  char cVar1;\n  char *__modes;\n  FILE *pFVar2;\n  \n  __modes = (char *)FUN_001ac930();\n  if (__modes != (char *)0x0) {\n    cVar1 = FUN_001acaa0(param_1);\n    if (cVar1 == '\0') {\n      pFVar2 = fopen64(param_2,__modes);\n      *param_1 = pFVar2;\n      if (pFVar2 != (FILE *)0x0) {\n        *(undefined1 *)(param_1 + 1) = 1;\n        return param_1;\n      }\n    }\n  }\n  return (undefined4 *)0x0;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "char *__modes;" primitive_type (pointer_declarator "*__modes" * identifier) ;) (declaration "FILE *pFVar2;" type_identifier (pointer_declarator "*pFVar2" * identifier) ;) (expression_statement "__modes = (char *)FUN_001ac930();" (assignment_expression "__modes = (char *)FUN_001ac930()" identifier = (cast_expression "(char *)FUN_001ac930()" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_001ac930()" identifier (argument_list "()" ( ))))) ;) (if_statement "if (__modes != (char *)0x0) {\n    cVar1 = FUN_001acaa0(param_1);\n    if (cVar1 == '\0') {\n      pFVar2 = fopen64(param_2,__modes);\n      *param_1 = pFVar2;\n      if (pFVar2 != (FILE *)0x0) {\n        *(undefined1 *)(param_1 + 1) = 1;\n        return param_1;\n      }\n    }\n  }" if (parenthesized_expression "(__modes != (char *)0x0)" ( (binary_expression "__modes != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    cVar1 = FUN_001acaa0(param_1);\n    if (cVar1 == '\0') {\n      pFVar2 = fopen64(param_2,__modes);\n      *param_1 = pFVar2;\n      if (pFVar2 != (FILE *)0x0) {\n        *(undefined1 *)(param_1 + 1) = 1;\n        return param_1;\n      }\n    }\n  }" { (expression_statement "cVar1 = FUN_001acaa0(param_1);" (assignment_expression "cVar1 = FUN_001acaa0(param_1)" identifier = (call_expression "FUN_001acaa0(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (cVar1 == '\0') {\n      pFVar2 = fopen64(param_2,__modes);\n      *param_1 = pFVar2;\n      if (pFVar2 != (FILE *)0x0) {\n        *(undefined1 *)(param_1 + 1) = 1;\n        return param_1;\n      }\n    }" if (parenthesized_expression "(cVar1 == '\0')" ( (binary_expression "cVar1 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      pFVar2 = fopen64(param_2,__modes);\n      *param_1 = pFVar2;\n      if (pFVar2 != (FILE *)0x0) {\n        *(undefined1 *)(param_1 + 1) = 1;\n        return param_1;\n      }\n    }" { (expression_statement "pFVar2 = fopen64(param_2,__modes);" (assignment_expression "pFVar2 = fopen64(param_2,__modes)" identifier = (call_expression "fopen64(param_2,__modes)" identifier (argument_list "(param_2,__modes)" ( identifier , identifier )))) ;) (expression_statement "*param_1 = pFVar2;" (assignment_expression "*param_1 = pFVar2" (pointer_expression "*param_1" * identifier) = identifier) ;) (if_statement "if (pFVar2 != (FILE *)0x0) {\n        *(undefined1 *)(param_1 + 1) = 1;\n        return param_1;\n      }" if (parenthesized_expression "(pFVar2 != (FILE *)0x0)" ( (binary_expression "pFVar2 != (FILE *)0x0" identifier != (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        *(undefined1 *)(param_1 + 1) = 1;\n        return param_1;\n      }" { (expression_statement "*(undefined1 *)(param_1 + 1) = 1;" (assignment_expression "*(undefined1 *)(param_1 + 1) = 1" (pointer_expression "*(undefined1 *)(param_1 + 1)" * (cast_expression "(undefined1 *)(param_1 + 1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 1)" ( (binary_expression "param_1 + 1" identifier + number_literal) )))) = number_literal) ;) (return_statement "return param_1;" return identifier ;) })) })) })) (return_statement "return (undefined4 *)0x0;" return (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) )))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (return_statement return IDENT ;) })) })) })) (return_statement return (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) ;) })))
(function_definition "undefined4 * FUN_001acbb0(undefined4 *param_1,char *param_2)\n\n{\n  char cVar1;\n  char *__modes;\n  FILE *pFVar2;\n  \n  __modes = (char *)FUN_001ac930();\n  if (__modes != (char *)0x0) {\n    cVar1 = FUN_001acaa0(param_1);\n    if (cVar1 == '\0') {\n      pFVar2 = fopen64(param_2,__modes);\n      *param_1 = pFVar2;\n      if (pFVar2 != (FILE *)0x0) {\n        *(undefined1 *)(param_1 + 1) = 1;\n        return param_1;\n      }\n    }\n  }\n  return (undefined4 *)0x0;\n}" (type_identifier "undefined4") (pointer_declarator "* FUN_001acbb0(undefined4 *param_1,char *param_2)" (* "*") (function_declarator "FUN_001acbb0(undefined4 *param_1,char *param_2)" (identifier "FUN_001acbb0") (parameter_list "(undefined4 *param_1,char *param_2)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "char *param_2" (primitive_type "char") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")")))) (compound_statement "{\n  char cVar1;\n  char *__modes;\n  FILE *pFVar2;\n  \n  __modes = (char *)FUN_001ac930();\n  if (__modes != (char *)0x0) {\n    cVar1 = FUN_001acaa0(param_1);\n    if (cVar1 == '\0') {\n      pFVar2 = fopen64(param_2,__modes);\n      *param_1 = pFVar2;\n      if (pFVar2 != (FILE *)0x0) {\n        *(undefined1 *)(param_1 + 1) = 1;\n        return param_1;\n      }\n    }\n  }\n  return (undefined4 *)0x0;\n}" ({ "{") (declaration "char cVar1;" (primitive_type "char") (identifier "cVar1") (; ";")) (declaration "char *__modes;" (primitive_type "char") (pointer_declarator "*__modes" (* "*") (identifier "__modes")) (; ";")) (declaration "FILE *pFVar2;" (type_identifier "FILE") (pointer_declarator "*pFVar2" (* "*") (identifier "pFVar2")) (; ";")) (expression_statement "__modes = (char *)FUN_001ac930();" (assignment_expression "__modes = (char *)FUN_001ac930()" (identifier "__modes") (= "=") (cast_expression "(char *)FUN_001ac930()" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_001ac930()" (identifier "FUN_001ac930") (argument_list "()" (( "(") () ")"))))) (; ";")) (if_statement "if (__modes != (char *)0x0) {\n    cVar1 = FUN_001acaa0(param_1);\n    if (cVar1 == '\0') {\n      pFVar2 = fopen64(param_2,__modes);\n      *param_1 = pFVar2;\n      if (pFVar2 != (FILE *)0x0) {\n        *(undefined1 *)(param_1 + 1) = 1;\n        return param_1;\n      }\n    }\n  }" (if "if") (parenthesized_expression "(__modes != (char *)0x0)" (( "(") (binary_expression "__modes != (char *)0x0" (identifier "__modes") (!= "!=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    cVar1 = FUN_001acaa0(param_1);\n    if (cVar1 == '\0') {\n      pFVar2 = fopen64(param_2,__modes);\n      *param_1 = pFVar2;\n      if (pFVar2 != (FILE *)0x0) {\n        *(undefined1 *)(param_1 + 1) = 1;\n        return param_1;\n      }\n    }\n  }" ({ "{") (expression_statement "cVar1 = FUN_001acaa0(param_1);" (assignment_expression "cVar1 = FUN_001acaa0(param_1)" (identifier "cVar1") (= "=") (call_expression "FUN_001acaa0(param_1)" (identifier "FUN_001acaa0") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (if_statement "if (cVar1 == '\0') {\n      pFVar2 = fopen64(param_2,__modes);\n      *param_1 = pFVar2;\n      if (pFVar2 != (FILE *)0x0) {\n        *(undefined1 *)(param_1 + 1) = 1;\n        return param_1;\n      }\n    }" (if "if") (parenthesized_expression "(cVar1 == '\0')" (( "(") (binary_expression "cVar1 == '\0'" (identifier "cVar1") (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n      pFVar2 = fopen64(param_2,__modes);\n      *param_1 = pFVar2;\n      if (pFVar2 != (FILE *)0x0) {\n        *(undefined1 *)(param_1 + 1) = 1;\n        return param_1;\n      }\n    }" ({ "{") (expression_statement "pFVar2 = fopen64(param_2,__modes);" (assignment_expression "pFVar2 = fopen64(param_2,__modes)" (identifier "pFVar2") (= "=") (call_expression "fopen64(param_2,__modes)" (identifier "fopen64") (argument_list "(param_2,__modes)" (( "(") (identifier "param_2") (, ",") (identifier "__modes") () ")")))) (; ";")) (expression_statement "*param_1 = pFVar2;" (assignment_expression "*param_1 = pFVar2" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (identifier "pFVar2")) (; ";")) (if_statement "if (pFVar2 != (FILE *)0x0) {\n        *(undefined1 *)(param_1 + 1) = 1;\n        return param_1;\n      }" (if "if") (parenthesized_expression "(pFVar2 != (FILE *)0x0)" (( "(") (binary_expression "pFVar2 != (FILE *)0x0" (identifier "pFVar2") (!= "!=") (cast_expression "(FILE *)0x0" (( "(") (type_descriptor "FILE *" (type_identifier "FILE") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        *(undefined1 *)(param_1 + 1) = 1;\n        return param_1;\n      }" ({ "{") (expression_statement "*(undefined1 *)(param_1 + 1) = 1;" (assignment_expression "*(undefined1 *)(param_1 + 1) = 1" (pointer_expression "*(undefined1 *)(param_1 + 1)" (* "*") (cast_expression "(undefined1 *)(param_1 + 1)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 1)" (( "(") (binary_expression "param_1 + 1" (identifier "param_1") (+ "+") (number_literal "1")) () ")")))) (= "=") (number_literal "1")) (; ";")) (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}"))) (} "}"))) (} "}"))) (return_statement "return (undefined4 *)0x0;" (return "return") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::__basic_file<char>::open(char const*, std::_Ios_Openmode, int) */

char * std::var_4<char>::function_1(char *param_1,type_1 param_2,int param_3)

{
  char var_6;
  char *var_2;
  type_2 *var_8;
  
  __modes = (char *)::(anonymous_namespace)::var_1(param_3);
  if (var_2 != (char *)0x0) {
    var_6 = var_3((var_4<var_5> *)param_1);
    if (var_6 == '\0') {
      var_8 = var_7((char *)param_2,var_2);
      *(type_2 **)param_1 = var_8;
      if (var_8 != (type_2 *)0x0) {
        param_1[4] = '\x01';
        return param_1;
      }
    }
  }
  return (char *)0x0;
}


(translation_unit (function_definition type: (type_identifier) declarator: (pointer_declarator declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier)))))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (escape_sequence)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (return_statement (identifier)))))))) (return_statement (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal))))))

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

undefined4 * MASKED(undefined4 *param_1,char *param_2)

{
  char cVar1;
  char *__modes;
  FILE *pFVar2;
  
  __modes = (char *)FUN_001ac930();
  if (__modes != (char *)0x0) {
    cVar1 = FUN_001acaa0(param_1);
    if (cVar1 == '\0') {
      pFVar2 = fopen64(param_2,__modes);
      *param_1 = pFVar2;
      if (pFVar2 != (FILE *)0x0) {
        *(undefined1 *)(param_1 + 1) = 1;
        return param_1;
      }
    }
  }
  return (undefined4 *)0x0;
}

