
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* DWARF original prototype: int diropen(FTS * sp, char * dir, FTS * sp) */

int __regparm3 diropen(FTS *sp,char *dir,FTS *sp_1)

{
  int iVar1;
  uint flags;
  
  flags = ((uint)dir & 0x10) << 0xd | ((uint)dir & 0x800) << 7 | 0x90900;
  if (((uint)dir & 0x200) != 0) {
    iVar1 = openat_safer((int)sp,(char *)sp_1,flags,0x19bc8);
    return iVar1;
  }
  iVar1 = open_safer((char *)sp_1,flags);
  return iVar1;
}



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

void __regparm3 FUN_00019bb0(undefined4 param_1,uint param_2,undefined4 param_3)

{
  uint uVar1;
  
  uVar1 = (param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7 | 0x90900;
  if ((param_2 & 0x200) != 0) {
    FUN_0001d410(param_1,param_3,uVar1,0x19bc8);
    return;
  }
  FUN_0001d200(param_3,uVar1);
  return;
}


PUSH EDI
MOV EDI,EDX
PUSH ESI
MOV ESI,EDX
SHL EDI,0x7
SHL ESI,0xd
AND EDI,0x40000
PUSH EBX
CALL 0x00012d90
ADD EBX,0xb438
AND ESI,0x20000
OR ESI,EDI
OR ESI,0x90900
AND DH,0x2
JZ 0x00019bf8
SUB ESP,0x4
PUSH ESI
PUSH ECX
PUSH EAX
CALL 0x0001d410
ADD ESP,0x10
POP EBX
POP ESI
POP EDI
RET
SUB ESP,0x8
PUSH ESI
PUSH ECX
CALL 0x0001d200
ADD ESP,0x10
POP EBX
POP ESI
POP EDI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 FUN_00019bb0(undefined4 param_1,uint param_2,undefined4 param_3)\n\n{\n  uint uVar1;\n  \n  uVar1 = (param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7 | 0x90900;\n  if ((param_2 & 0x200) != 0) {\n    FUN_0001d410(param_1,param_3,uVar1,0x19bc8);\n    return;\n  }\n  FUN_0001d200(param_3,uVar1);\n  return;\n}\n\n" comment (function_definition "void __regparm3 FUN_00019bb0(undefined4 param_1,uint param_2,undefined4 param_3)\n\n{\n  uint uVar1;\n  \n  uVar1 = (param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7 | 0x90900;\n  if ((param_2 & 0x200) != 0) {\n    FUN_0001d410(param_1,param_3,uVar1,0x19bc8);\n    return;\n  }\n  FUN_0001d200(param_3,uVar1);\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00019bb0(undefined4 param_1,uint param_2,undefined4 param_3)" identifier (parameter_list "(undefined4 param_1,uint param_2,undefined4 param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  \n  uVar1 = (param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7 | 0x90900;\n  if ((param_2 & 0x200) != 0) {\n    FUN_0001d410(param_1,param_3,uVar1,0x19bc8);\n    return;\n  }\n  FUN_0001d200(param_3,uVar1);\n  return;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (expression_statement "uVar1 = (param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7 | 0x90900;" (assignment_expression "uVar1 = (param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7 | 0x90900" identifier = (binary_expression "(param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7 | 0x90900" (binary_expression "(param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7" (binary_expression "(param_2 & 0x10) << 0xd" (parenthesized_expression "(param_2 & 0x10)" ( (binary_expression "param_2 & 0x10" identifier & number_literal) )) << number_literal) | (binary_expression "(param_2 & 0x800) << 7" (parenthesized_expression "(param_2 & 0x800)" ( (binary_expression "param_2 & 0x800" identifier & number_literal) )) << number_literal)) | number_literal)) ;) (if_statement "if ((param_2 & 0x200) != 0) {\n    FUN_0001d410(param_1,param_3,uVar1,0x19bc8);\n    return;\n  }" if (parenthesized_expression "((param_2 & 0x200) != 0)" ( (binary_expression "(param_2 & 0x200) != 0" (parenthesized_expression "(param_2 & 0x200)" ( (binary_expression "param_2 & 0x200" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    FUN_0001d410(param_1,param_3,uVar1,0x19bc8);\n    return;\n  }" { (expression_statement "FUN_0001d410(param_1,param_3,uVar1,0x19bc8);" (call_expression "FUN_0001d410(param_1,param_3,uVar1,0x19bc8)" identifier (argument_list "(param_1,param_3,uVar1,0x19bc8)" ( identifier , identifier , identifier , number_literal ))) ;) (return_statement "return;" return ;) })) (expression_statement "FUN_0001d200(param_3,uVar1);" (call_expression "FUN_0001d200(param_3,uVar1)" identifier (argument_list "(param_3,uVar1)" ( identifier , identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* DWARF original prototype: int diropen(FTS * sp, char * dir, FTS * sp) */\n\nint __regparm3 diropen(FTS *sp,char *dir,FTS *sp_1)\n\n{\n  int iVar1;\n  uint flags;\n  \n  flags = ((uint)dir & 0x10) << 0xd | ((uint)dir & 0x800) << 7 | 0x90900;\n  if (((uint)dir & 0x200) != 0) {\n    iVar1 = openat_safer((int)sp,(char *)sp_1,flags,0x19bc8);\n    return iVar1;\n  }\n  iVar1 = open_safer((char *)sp_1,flags);\n  return iVar1;\n}\n\n" comment comment (function_definition "int __regparm3 diropen(FTS *sp,char *dir,FTS *sp_1)\n\n{\n  int iVar1;\n  uint flags;\n  \n  flags = ((uint)dir & 0x10) << 0xd | ((uint)dir & 0x800) << 7 | 0x90900;\n  if (((uint)dir & 0x200) != 0) {\n    iVar1 = openat_safer((int)sp,(char *)sp_1,flags,0x19bc8);\n    return iVar1;\n  }\n  iVar1 = open_safer((char *)sp_1,flags);\n  return iVar1;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "diropen(FTS *sp,char *dir,FTS *sp_1)" identifier (parameter_list "(FTS *sp,char *dir,FTS *sp_1)" ( (parameter_declaration "FTS *sp" type_identifier (pointer_declarator "*sp" * identifier)) , (parameter_declaration "char *dir" primitive_type (pointer_declarator "*dir" * identifier)) , (parameter_declaration "FTS *sp_1" type_identifier (pointer_declarator "*sp_1" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  uint flags;\n  \n  flags = ((uint)dir & 0x10) << 0xd | ((uint)dir & 0x800) << 7 | 0x90900;\n  if (((uint)dir & 0x200) != 0) {\n    iVar1 = openat_safer((int)sp,(char *)sp_1,flags,0x19bc8);\n    return iVar1;\n  }\n  iVar1 = open_safer((char *)sp_1,flags);\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint flags;" type_identifier identifier ;) (expression_statement "flags = ((uint)dir & 0x10) << 0xd | ((uint)dir & 0x800) << 7 | 0x90900;" (assignment_expression "flags = ((uint)dir & 0x10) << 0xd | ((uint)dir & 0x800) << 7 | 0x90900" identifier = (binary_expression "((uint)dir & 0x10) << 0xd | ((uint)dir & 0x800) << 7 | 0x90900" (binary_expression "((uint)dir & 0x10) << 0xd | ((uint)dir & 0x800) << 7" (binary_expression "((uint)dir & 0x10) << 0xd" (parenthesized_expression "((uint)dir & 0x10)" ( (binary_expression "(uint)dir & 0x10" (cast_expression "(uint)dir" ( (type_descriptor "uint" type_identifier) ) identifier) & number_literal) )) << number_literal) | (binary_expression "((uint)dir & 0x800) << 7" (parenthesized_expression "((uint)dir & 0x800)" ( (binary_expression "(uint)dir & 0x800" (cast_expression "(uint)dir" ( (type_descriptor "uint" type_identifier) ) identifier) & number_literal) )) << number_literal)) | number_literal)) ;) (if_statement "if (((uint)dir & 0x200) != 0) {\n    iVar1 = openat_safer((int)sp,(char *)sp_1,flags,0x19bc8);\n    return iVar1;\n  }" if (parenthesized_expression "(((uint)dir & 0x200) != 0)" ( (binary_expression "((uint)dir & 0x200) != 0" (parenthesized_expression "((uint)dir & 0x200)" ( (binary_expression "(uint)dir & 0x200" (cast_expression "(uint)dir" ( (type_descriptor "uint" type_identifier) ) identifier) & number_literal) )) != number_literal) )) (compound_statement "{\n    iVar1 = openat_safer((int)sp,(char *)sp_1,flags,0x19bc8);\n    return iVar1;\n  }" { (expression_statement "iVar1 = openat_safer((int)sp,(char *)sp_1,flags,0x19bc8);" (assignment_expression "iVar1 = openat_safer((int)sp,(char *)sp_1,flags,0x19bc8)" identifier = (call_expression "openat_safer((int)sp,(char *)sp_1,flags,0x19bc8)" identifier (argument_list "((int)sp,(char *)sp_1,flags,0x19bc8)" ( (cast_expression "(int)sp" ( (type_descriptor "int" primitive_type) ) identifier) , (cast_expression "(char *)sp_1" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , identifier , number_literal )))) ;) (return_statement "return iVar1;" return identifier ;) })) (expression_statement "iVar1 = open_safer((char *)sp_1,flags);" (assignment_expression "iVar1 = open_safer((char *)sp_1,flags)" identifier = (call_expression "open_safer((char *)sp_1,flags)" identifier (argument_list "((char *)sp_1,flags)" ( (cast_expression "(char *)sp_1" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , identifier )))) ;) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "void __regparm3 FUN_00019bb0(undefined4 param_1,uint param_2,undefined4 param_3)\n\n{\n  uint uVar1;\n  \n  uVar1 = (param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7 | 0x90900;\n  if ((param_2 & 0x200) != 0) {\n    FUN_0001d410(param_1,param_3,uVar1,0x19bc8);\n    return;\n  }\n  FUN_0001d200(param_3,uVar1);\n  return;\n}\n\n" (function_definition "void __regparm3 FUN_00019bb0(undefined4 param_1,uint param_2,undefined4 param_3)\n\n{\n  uint uVar1;\n  \n  uVar1 = (param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7 | 0x90900;\n  if ((param_2 & 0x200) != 0) {\n    FUN_0001d410(param_1,param_3,uVar1,0x19bc8);\n    return;\n  }\n  FUN_0001d200(param_3,uVar1);\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00019bb0(undefined4 param_1,uint param_2,undefined4 param_3)" identifier (parameter_list "(undefined4 param_1,uint param_2,undefined4 param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  \n  uVar1 = (param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7 | 0x90900;\n  if ((param_2 & 0x200) != 0) {\n    FUN_0001d410(param_1,param_3,uVar1,0x19bc8);\n    return;\n  }\n  FUN_0001d200(param_3,uVar1);\n  return;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (expression_statement "uVar1 = (param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7 | 0x90900;" (assignment_expression "uVar1 = (param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7 | 0x90900" identifier = (binary_expression "(param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7 | 0x90900" (binary_expression "(param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7" (binary_expression "(param_2 & 0x10) << 0xd" (parenthesized_expression "(param_2 & 0x10)" ( (binary_expression "param_2 & 0x10" identifier & number_literal) )) << number_literal) | (binary_expression "(param_2 & 0x800) << 7" (parenthesized_expression "(param_2 & 0x800)" ( (binary_expression "param_2 & 0x800" identifier & number_literal) )) << number_literal)) | number_literal)) ;) (if_statement "if ((param_2 & 0x200) != 0) {\n    FUN_0001d410(param_1,param_3,uVar1,0x19bc8);\n    return;\n  }" if (parenthesized_expression "((param_2 & 0x200) != 0)" ( (binary_expression "(param_2 & 0x200) != 0" (parenthesized_expression "(param_2 & 0x200)" ( (binary_expression "param_2 & 0x200" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    FUN_0001d410(param_1,param_3,uVar1,0x19bc8);\n    return;\n  }" { (expression_statement "FUN_0001d410(param_1,param_3,uVar1,0x19bc8);" (call_expression "FUN_0001d410(param_1,param_3,uVar1,0x19bc8)" identifier (argument_list "(param_1,param_3,uVar1,0x19bc8)" ( identifier , identifier , identifier , number_literal ))) ;) (return_statement "return;" return ;) })) (expression_statement "FUN_0001d200(param_3,uVar1);" (call_expression "FUN_0001d200(param_3,uVar1)" identifier (argument_list "(param_3,uVar1)" ( identifier , identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) << LIT) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) << LIT)) | LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , LIT ))) ;) (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (return_statement return ;) })))
(function_definition "void __regparm3 FUN_00019bb0(undefined4 param_1,uint param_2,undefined4 param_3)\n\n{\n  uint uVar1;\n  \n  uVar1 = (param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7 | 0x90900;\n  if ((param_2 & 0x200) != 0) {\n    FUN_0001d410(param_1,param_3,uVar1,0x19bc8);\n    return;\n  }\n  FUN_0001d200(param_3,uVar1);\n  return;\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00019bb0(undefined4 param_1,uint param_2,undefined4 param_3)" (identifier "FUN_00019bb0") (parameter_list "(undefined4 param_1,uint param_2,undefined4 param_3)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (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  uint uVar1;\n  \n  uVar1 = (param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7 | 0x90900;\n  if ((param_2 & 0x200) != 0) {\n    FUN_0001d410(param_1,param_3,uVar1,0x19bc8);\n    return;\n  }\n  FUN_0001d200(param_3,uVar1);\n  return;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (expression_statement "uVar1 = (param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7 | 0x90900;" (assignment_expression "uVar1 = (param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7 | 0x90900" (identifier "uVar1") (= "=") (binary_expression "(param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7 | 0x90900" (binary_expression "(param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7" (binary_expression "(param_2 & 0x10) << 0xd" (parenthesized_expression "(param_2 & 0x10)" (( "(") (binary_expression "param_2 & 0x10" (identifier "param_2") (& "&") (number_literal "0x10")) () ")")) (<< "<<") (number_literal "0xd")) (| "|") (binary_expression "(param_2 & 0x800) << 7" (parenthesized_expression "(param_2 & 0x800)" (( "(") (binary_expression "param_2 & 0x800" (identifier "param_2") (& "&") (number_literal "0x800")) () ")")) (<< "<<") (number_literal "7"))) (| "|") (number_literal "0x90900"))) (; ";")) (if_statement "if ((param_2 & 0x200) != 0) {\n    FUN_0001d410(param_1,param_3,uVar1,0x19bc8);\n    return;\n  }" (if "if") (parenthesized_expression "((param_2 & 0x200) != 0)" (( "(") (binary_expression "(param_2 & 0x200) != 0" (parenthesized_expression "(param_2 & 0x200)" (( "(") (binary_expression "param_2 & 0x200" (identifier "param_2") (& "&") (number_literal "0x200")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    FUN_0001d410(param_1,param_3,uVar1,0x19bc8);\n    return;\n  }" ({ "{") (expression_statement "FUN_0001d410(param_1,param_3,uVar1,0x19bc8);" (call_expression "FUN_0001d410(param_1,param_3,uVar1,0x19bc8)" (identifier "FUN_0001d410") (argument_list "(param_1,param_3,uVar1,0x19bc8)" (( "(") (identifier "param_1") (, ",") (identifier "param_3") (, ",") (identifier "uVar1") (, ",") (number_literal "0x19bc8") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_0001d200(param_3,uVar1);" (call_expression "FUN_0001d200(param_3,uVar1)" (identifier "FUN_0001d200") (argument_list "(param_3,uVar1)" (( "(") (identifier "param_3") (, ",") (identifier "uVar1") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* DWARF original prototype: int diropen(FTS * sp, char * dir, FTS * sp) */

int __regparm3 function_1(type_1 *sp,char *dir,type_1 *sp_1)

{
  int iVar1;
  type_2 flags;
  
  flags = ((type_2)dir & 0x10) << 0xd | ((type_2)dir & 0x800) << 7 | 0x90900;
  if (((type_2)dir & 0x200) != 0) {
    iVar1 = var_1((int)sp,(char *)sp_1,flags,0x19bc8);
    return iVar1;
  }
  iVar1 = var_2((char *)sp_1,flags);
  return iVar1;
}


(translation_unit (function_definition type: (primitive_type) (ERROR (identifier)) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) 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)) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) 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 (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier) (number_literal)))) (return_statement))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier)))) (return_statement))))

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

void __regparm3 MASKED(undefined4 param_1,uint param_2,undefined4 param_3)

{
  uint uVar1;
  
  uVar1 = (param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7 | 0x90900;
  if ((param_2 & 0x200) != 0) {
    FUN_0001d410(param_1,param_3,uVar1,0x19bc8);
    return;
  }
  FUN_0001d200(param_3,uVar1);
  return;
}

