
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

int open_safer(char *file,int flags,...)

{
  undefined4 uVar1;
  int iVar2;
  undefined4 in_stack_0000000c;
  
  uVar1 = 0;
  if ((flags & 0x40U) != 0) {
    uVar1 = in_stack_0000000c;
  }
  iVar2 = open64(file,flags,uVar1);
  iVar2 = fd_safer(iVar2);
  return iVar2;
}



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

void FUN_0001b380(char *param_1,uint param_2,undefined4 param_3)

{
  undefined4 uVar1;
  int iVar2;
  
  uVar1 = 0;
  if ((param_2 & 0x40) != 0) {
    uVar1 = param_3;
  }
  iVar2 = open64(param_1,param_2,uVar1);
  FUN_0001c7f0(iVar2);
  return;
}


PUSH EBX
MOV EAX,0x0
CALL 0x00012c00
ADD EBX,0xac75
SUB ESP,0xc
MOV EDX,dword ptr [ESP + 0x18]
TEST DL,0x40
CMOVNZ EAX,dword ptr [ESP + 0x1c]
PUSH EAX
PUSH EDX
PUSH dword ptr [ESP + 0x1c]
CALL 0x00012060
MOV dword ptr [ESP],EAX
CALL 0x0001c7f0
ADD ESP,0x18
POP EBX
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_0001b380(char *param_1,uint param_2,undefined4 param_3)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  \n  uVar1 = 0;\n  if ((param_2 & 0x40) != 0) {\n    uVar1 = param_3;\n  }\n  iVar2 = open64(param_1,param_2,uVar1);\n  FUN_0001c7f0(iVar2);\n  return;\n}\n\n" comment (function_definition "void FUN_0001b380(char *param_1,uint param_2,undefined4 param_3)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  \n  uVar1 = 0;\n  if ((param_2 & 0x40) != 0) {\n    uVar1 = param_3;\n  }\n  iVar2 = open64(param_1,param_2,uVar1);\n  FUN_0001c7f0(iVar2);\n  return;\n}" primitive_type (function_declarator "FUN_0001b380(char *param_1,uint param_2,undefined4 param_3)" identifier (parameter_list "(char *param_1,uint param_2,undefined4 param_3)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  \n  uVar1 = 0;\n  if ((param_2 & 0x40) != 0) {\n    uVar1 = param_3;\n  }\n  iVar2 = open64(param_1,param_2,uVar1);\n  FUN_0001c7f0(iVar2);\n  return;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" identifier = number_literal) ;) (if_statement "if ((param_2 & 0x40) != 0) {\n    uVar1 = param_3;\n  }" if (parenthesized_expression "((param_2 & 0x40) != 0)" ( (binary_expression "(param_2 & 0x40) != 0" (parenthesized_expression "(param_2 & 0x40)" ( (binary_expression "param_2 & 0x40" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    uVar1 = param_3;\n  }" { (expression_statement "uVar1 = param_3;" (assignment_expression "uVar1 = param_3" identifier = identifier) ;) })) (expression_statement "iVar2 = open64(param_1,param_2,uVar1);" (assignment_expression "iVar2 = open64(param_1,param_2,uVar1)" identifier = (call_expression "open64(param_1,param_2,uVar1)" identifier (argument_list "(param_1,param_2,uVar1)" ( identifier , identifier , identifier )))) ;) (expression_statement "FUN_0001c7f0(iVar2);" (call_expression "FUN_0001c7f0(iVar2)" identifier (argument_list "(iVar2)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nint open_safer(char *file,int flags,...)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  undefined4 in_stack_0000000c;\n  \n  uVar1 = 0;\n  if ((flags & 0x40U) != 0) {\n    uVar1 = in_stack_0000000c;\n  }\n  iVar2 = open64(file,flags,uVar1);\n  iVar2 = fd_safer(iVar2);\n  return iVar2;\n}\n\n" comment comment (function_definition "int open_safer(char *file,int flags,...)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  undefined4 in_stack_0000000c;\n  \n  uVar1 = 0;\n  if ((flags & 0x40U) != 0) {\n    uVar1 = in_stack_0000000c;\n  }\n  iVar2 = open64(file,flags,uVar1);\n  iVar2 = fd_safer(iVar2);\n  return iVar2;\n}" primitive_type (function_declarator "open_safer(char *file,int flags,...)" identifier (parameter_list "(char *file,int flags,...)" ( (parameter_declaration "char *file" primitive_type (pointer_declarator "*file" * identifier)) , (parameter_declaration "int flags" primitive_type identifier) , (variadic_parameter "..." ...) ))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  undefined4 in_stack_0000000c;\n  \n  uVar1 = 0;\n  if ((flags & 0x40U) != 0) {\n    uVar1 = in_stack_0000000c;\n  }\n  iVar2 = open64(file,flags,uVar1);\n  iVar2 = fd_safer(iVar2);\n  return iVar2;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 in_stack_0000000c;" type_identifier identifier ;) (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" identifier = number_literal) ;) (if_statement "if ((flags & 0x40U) != 0) {\n    uVar1 = in_stack_0000000c;\n  }" if (parenthesized_expression "((flags & 0x40U) != 0)" ( (binary_expression "(flags & 0x40U) != 0" (parenthesized_expression "(flags & 0x40U)" ( (binary_expression "flags & 0x40U" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    uVar1 = in_stack_0000000c;\n  }" { (expression_statement "uVar1 = in_stack_0000000c;" (assignment_expression "uVar1 = in_stack_0000000c" identifier = identifier) ;) })) (expression_statement "iVar2 = open64(file,flags,uVar1);" (assignment_expression "iVar2 = open64(file,flags,uVar1)" identifier = (call_expression "open64(file,flags,uVar1)" identifier (argument_list "(file,flags,uVar1)" ( identifier , identifier , identifier )))) ;) (expression_statement "iVar2 = fd_safer(iVar2);" (assignment_expression "iVar2 = fd_safer(iVar2)" identifier = (call_expression "fd_safer(iVar2)" identifier (argument_list "(iVar2)" ( identifier )))) ;) (return_statement "return iVar2;" return identifier ;) })))
(translation_unit "void FUN_0001b380(char *param_1,uint param_2,undefined4 param_3)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  \n  uVar1 = 0;\n  if ((param_2 & 0x40) != 0) {\n    uVar1 = param_3;\n  }\n  iVar2 = open64(param_1,param_2,uVar1);\n  FUN_0001c7f0(iVar2);\n  return;\n}\n\n" (function_definition "void FUN_0001b380(char *param_1,uint param_2,undefined4 param_3)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  \n  uVar1 = 0;\n  if ((param_2 & 0x40) != 0) {\n    uVar1 = param_3;\n  }\n  iVar2 = open64(param_1,param_2,uVar1);\n  FUN_0001c7f0(iVar2);\n  return;\n}" primitive_type (function_declarator "FUN_0001b380(char *param_1,uint param_2,undefined4 param_3)" identifier (parameter_list "(char *param_1,uint param_2,undefined4 param_3)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  \n  uVar1 = 0;\n  if ((param_2 & 0x40) != 0) {\n    uVar1 = param_3;\n  }\n  iVar2 = open64(param_1,param_2,uVar1);\n  FUN_0001c7f0(iVar2);\n  return;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" identifier = number_literal) ;) (if_statement "if ((param_2 & 0x40) != 0) {\n    uVar1 = param_3;\n  }" if (parenthesized_expression "((param_2 & 0x40) != 0)" ( (binary_expression "(param_2 & 0x40) != 0" (parenthesized_expression "(param_2 & 0x40)" ( (binary_expression "param_2 & 0x40" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    uVar1 = param_3;\n  }" { (expression_statement "uVar1 = param_3;" (assignment_expression "uVar1 = param_3" identifier = identifier) ;) })) (expression_statement "iVar2 = open64(param_1,param_2,uVar1);" (assignment_expression "iVar2 = open64(param_1,param_2,uVar1)" identifier = (call_expression "open64(param_1,param_2,uVar1)" identifier (argument_list "(param_1,param_2,uVar1)" ( identifier , identifier , identifier )))) ;) (expression_statement "FUN_0001c7f0(iVar2);" (call_expression "FUN_0001c7f0(iVar2)" identifier (argument_list "(iVar2)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return ;) })))
(function_definition "void FUN_0001b380(char *param_1,uint param_2,undefined4 param_3)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  \n  uVar1 = 0;\n  if ((param_2 & 0x40) != 0) {\n    uVar1 = param_3;\n  }\n  iVar2 = open64(param_1,param_2,uVar1);\n  FUN_0001c7f0(iVar2);\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0001b380(char *param_1,uint param_2,undefined4 param_3)" (identifier "FUN_0001b380") (parameter_list "(char *param_1,uint param_2,undefined4 param_3)" (( "(") (parameter_declaration "char *param_1" (primitive_type "char") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) () ")"))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  \n  uVar1 = 0;\n  if ((param_2 & 0x40) != 0) {\n    uVar1 = param_3;\n  }\n  iVar2 = open64(param_1,param_2,uVar1);\n  FUN_0001c7f0(iVar2);\n  return;\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" (identifier "uVar1") (= "=") (number_literal "0")) (; ";")) (if_statement "if ((param_2 & 0x40) != 0) {\n    uVar1 = param_3;\n  }" (if "if") (parenthesized_expression "((param_2 & 0x40) != 0)" (( "(") (binary_expression "(param_2 & 0x40) != 0" (parenthesized_expression "(param_2 & 0x40)" (( "(") (binary_expression "param_2 & 0x40" (identifier "param_2") (& "&") (number_literal "0x40")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    uVar1 = param_3;\n  }" ({ "{") (expression_statement "uVar1 = param_3;" (assignment_expression "uVar1 = param_3" (identifier "uVar1") (= "=") (identifier "param_3")) (; ";")) (} "}"))) (expression_statement "iVar2 = open64(param_1,param_2,uVar1);" (assignment_expression "iVar2 = open64(param_1,param_2,uVar1)" (identifier "iVar2") (= "=") (call_expression "open64(param_1,param_2,uVar1)" (identifier "open64") (argument_list "(param_1,param_2,uVar1)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "uVar1") () ")")))) (; ";")) (expression_statement "FUN_0001c7f0(iVar2);" (call_expression "FUN_0001c7f0(iVar2)" (identifier "FUN_0001c7f0") (argument_list "(iVar2)" (( "(") (identifier "iVar2") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

int function_1(char *file,int var_1,...)

{
  type_1 uVar1;
  int iVar2;
  type_1 in_stack_0000000c;
  
  uVar1 = 0;
  if ((var_1 & 0x40U) != 0) {
    uVar1 = in_stack_0000000c;
  }
  iVar2 = var_2(file,var_1,uVar1);
  iVar2 = var_3(iVar2);
  return iVar2;
}


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

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

void MASKED(char *param_1,uint param_2,undefined4 param_3)

{
  undefined4 uVar1;
  int iVar2;
  
  uVar1 = 0;
  if ((param_2 & 0x40) != 0) {
    uVar1 = param_3;
  }
  iVar2 = open64(param_1,param_2,uVar1);
  FUN_0001c7f0(iVar2);
  return;
}

