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

int __regparm3 restore_initial_cwd(FTS *sp)

{
  int iVar1;
  
  if ((sp->fts_options & 4U) != 0) {
    fd_ring_clear(&sp->fts_fd_ring);
    return 0;
  }
  if ((sp->fts_options & 0x200U) != 0) {
    cwd_advance_fd(sp,-100,true);
    fd_ring_clear(&sp->fts_fd_ring);
    return 0;
  }
  iVar1 = fchdir(sp->fts_rfd);
  fd_ring_clear(&sp->fts_fd_ring);
  return (uint)(iVar1 != 0);
}



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

bool __regparm3 FUN_00023de0(int param_1)

{
  int iVar1;
  
  if ((*(uint *)(param_1 + 0x2c) & 4) != 0) {
    FUN_00023b50();
    return false;
  }
  if ((*(uint *)(param_1 + 0x2c) & 0x200) != 0) {
    FUN_00023d70();
    FUN_00023b50();
    return false;
  }
  iVar1 = fchdir(*(int *)(param_1 + 0x18));
  FUN_00023b50();
  return iVar1 != 0;
}


PUSH EDI
PUSH ESI
MOV ESI,EAX
PUSH EBX
MOV EAX,dword ptr [EAX + 0x2c]
CALL 0x000132d0
ADD EBX,0x15213
MOV EDI,EAX
AND EDI,0x4
JNZ 0x00023e20
TEST AH,0x2
JZ 0x00023e30
MOV EAX,ESI
MOV ECX,0x1
MOV EDX,0xffffff9c
CALL 0x00023d70
LEA EAX,[ESI + 0x38]
CALL 0x00023b50
MOV EAX,EDI
POP EBX
POP ESI
POP EDI
RET
LEA EAX,[ESI + 0x38]
XOR EDI,EDI
CALL 0x00023b50
MOV EAX,EDI
POP EBX
POP ESI
POP EDI
RET
SUB ESP,0xc
PUSH dword ptr [ESI + 0x18]
CALL 0x00012730
ADD ESP,0x10
TEST EAX,EAX
SETNZ AL
MOVZX EAX,AL
MOV EDI,EAX
LEA EAX,[ESI + 0x38]
CALL 0x00023b50
MOV EAX,EDI
POP EBX
POP ESI
POP EDI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nbool __regparm3 FUN_00023de0(int param_1)\n\n{\n  int iVar1;\n  \n  if ((*(uint *)(param_1 + 0x2c) & 4) != 0) {\n    FUN_00023b50();\n    return false;\n  }\n  if ((*(uint *)(param_1 + 0x2c) & 0x200) != 0) {\n    FUN_00023d70();\n    FUN_00023b50();\n    return false;\n  }\n  iVar1 = fchdir(*(int *)(param_1 + 0x18));\n  FUN_00023b50();\n  return iVar1 != 0;\n}\n\n" comment (function_definition "bool __regparm3 FUN_00023de0(int param_1)\n\n{\n  int iVar1;\n  \n  if ((*(uint *)(param_1 + 0x2c) & 4) != 0) {\n    FUN_00023b50();\n    return false;\n  }\n  if ((*(uint *)(param_1 + 0x2c) & 0x200) != 0) {\n    FUN_00023d70();\n    FUN_00023b50();\n    return false;\n  }\n  iVar1 = fchdir(*(int *)(param_1 + 0x18));\n  FUN_00023b50();\n  return iVar1 != 0;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00023de0(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  if ((*(uint *)(param_1 + 0x2c) & 4) != 0) {\n    FUN_00023b50();\n    return false;\n  }\n  if ((*(uint *)(param_1 + 0x2c) & 0x200) != 0) {\n    FUN_00023d70();\n    FUN_00023b50();\n    return false;\n  }\n  iVar1 = fchdir(*(int *)(param_1 + 0x18));\n  FUN_00023b50();\n  return iVar1 != 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (if_statement "if ((*(uint *)(param_1 + 0x2c) & 4) != 0) {\n    FUN_00023b50();\n    return false;\n  }" if (parenthesized_expression "((*(uint *)(param_1 + 0x2c) & 4) != 0)" ( (binary_expression "(*(uint *)(param_1 + 0x2c) & 4) != 0" (parenthesized_expression "(*(uint *)(param_1 + 0x2c) & 4)" ( (binary_expression "*(uint *)(param_1 + 0x2c) & 4" (pointer_expression "*(uint *)(param_1 + 0x2c)" * (cast_expression "(uint *)(param_1 + 0x2c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2c)" ( (binary_expression "param_1 + 0x2c" identifier + number_literal) )))) & number_literal) )) != number_literal) )) (compound_statement "{\n    FUN_00023b50();\n    return false;\n  }" { (expression_statement "FUN_00023b50();" (call_expression "FUN_00023b50()" identifier (argument_list "()" ( ))) ;) (return_statement "return false;" return false ;) })) (if_statement "if ((*(uint *)(param_1 + 0x2c) & 0x200) != 0) {\n    FUN_00023d70();\n    FUN_00023b50();\n    return false;\n  }" if (parenthesized_expression "((*(uint *)(param_1 + 0x2c) & 0x200) != 0)" ( (binary_expression "(*(uint *)(param_1 + 0x2c) & 0x200) != 0" (parenthesized_expression "(*(uint *)(param_1 + 0x2c) & 0x200)" ( (binary_expression "*(uint *)(param_1 + 0x2c) & 0x200" (pointer_expression "*(uint *)(param_1 + 0x2c)" * (cast_expression "(uint *)(param_1 + 0x2c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2c)" ( (binary_expression "param_1 + 0x2c" identifier + number_literal) )))) & number_literal) )) != number_literal) )) (compound_statement "{\n    FUN_00023d70();\n    FUN_00023b50();\n    return false;\n  }" { (expression_statement "FUN_00023d70();" (call_expression "FUN_00023d70()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_00023b50();" (call_expression "FUN_00023b50()" identifier (argument_list "()" ( ))) ;) (return_statement "return false;" return false ;) })) (expression_statement "iVar1 = fchdir(*(int *)(param_1 + 0x18));" (assignment_expression "iVar1 = fchdir(*(int *)(param_1 + 0x18))" identifier = (call_expression "fchdir(*(int *)(param_1 + 0x18))" identifier (argument_list "(*(int *)(param_1 + 0x18))" ( (pointer_expression "*(int *)(param_1 + 0x18)" * (cast_expression "(int *)(param_1 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) )))) ;) (expression_statement "FUN_00023b50();" (call_expression "FUN_00023b50()" identifier (argument_list "()" ( ))) ;) (return_statement "return iVar1 != 0;" return (binary_expression "iVar1 != 0" identifier != number_literal) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint __regparm3 restore_initial_cwd(FTS *sp)\n\n{\n  int iVar1;\n  \n  if ((sp->fts_options & 4U) != 0) {\n    fd_ring_clear(&sp->fts_fd_ring);\n    return 0;\n  }\n  if ((sp->fts_options & 0x200U) != 0) {\n    cwd_advance_fd(sp,-100,true);\n    fd_ring_clear(&sp->fts_fd_ring);\n    return 0;\n  }\n  iVar1 = fchdir(sp->fts_rfd);\n  fd_ring_clear(&sp->fts_fd_ring);\n  return (uint)(iVar1 != 0);\n}\n\n" comment (function_definition "int __regparm3 restore_initial_cwd(FTS *sp)\n\n{\n  int iVar1;\n  \n  if ((sp->fts_options & 4U) != 0) {\n    fd_ring_clear(&sp->fts_fd_ring);\n    return 0;\n  }\n  if ((sp->fts_options & 0x200U) != 0) {\n    cwd_advance_fd(sp,-100,true);\n    fd_ring_clear(&sp->fts_fd_ring);\n    return 0;\n  }\n  iVar1 = fchdir(sp->fts_rfd);\n  fd_ring_clear(&sp->fts_fd_ring);\n  return (uint)(iVar1 != 0);\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "restore_initial_cwd(FTS *sp)" identifier (parameter_list "(FTS *sp)" ( (parameter_declaration "FTS *sp" type_identifier (pointer_declarator "*sp" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  \n  if ((sp->fts_options & 4U) != 0) {\n    fd_ring_clear(&sp->fts_fd_ring);\n    return 0;\n  }\n  if ((sp->fts_options & 0x200U) != 0) {\n    cwd_advance_fd(sp,-100,true);\n    fd_ring_clear(&sp->fts_fd_ring);\n    return 0;\n  }\n  iVar1 = fchdir(sp->fts_rfd);\n  fd_ring_clear(&sp->fts_fd_ring);\n  return (uint)(iVar1 != 0);\n}" { (declaration "int iVar1;" primitive_type identifier ;) (if_statement "if ((sp->fts_options & 4U) != 0) {\n    fd_ring_clear(&sp->fts_fd_ring);\n    return 0;\n  }" if (parenthesized_expression "((sp->fts_options & 4U) != 0)" ( (binary_expression "(sp->fts_options & 4U) != 0" (parenthesized_expression "(sp->fts_options & 4U)" ( (binary_expression "sp->fts_options & 4U" (field_expression "sp->fts_options" identifier -> field_identifier) & number_literal) )) != number_literal) )) (compound_statement "{\n    fd_ring_clear(&sp->fts_fd_ring);\n    return 0;\n  }" { (expression_statement "fd_ring_clear(&sp->fts_fd_ring);" (call_expression "fd_ring_clear(&sp->fts_fd_ring)" identifier (argument_list "(&sp->fts_fd_ring)" ( (pointer_expression "&sp->fts_fd_ring" & (field_expression "sp->fts_fd_ring" identifier -> field_identifier)) ))) ;) (return_statement "return 0;" return number_literal ;) })) (if_statement "if ((sp->fts_options & 0x200U) != 0) {\n    cwd_advance_fd(sp,-100,true);\n    fd_ring_clear(&sp->fts_fd_ring);\n    return 0;\n  }" if (parenthesized_expression "((sp->fts_options & 0x200U) != 0)" ( (binary_expression "(sp->fts_options & 0x200U) != 0" (parenthesized_expression "(sp->fts_options & 0x200U)" ( (binary_expression "sp->fts_options & 0x200U" (field_expression "sp->fts_options" identifier -> field_identifier) & number_literal) )) != number_literal) )) (compound_statement "{\n    cwd_advance_fd(sp,-100,true);\n    fd_ring_clear(&sp->fts_fd_ring);\n    return 0;\n  }" { (expression_statement "cwd_advance_fd(sp,-100,true);" (call_expression "cwd_advance_fd(sp,-100,true)" identifier (argument_list "(sp,-100,true)" ( identifier , number_literal , true ))) ;) (expression_statement "fd_ring_clear(&sp->fts_fd_ring);" (call_expression "fd_ring_clear(&sp->fts_fd_ring)" identifier (argument_list "(&sp->fts_fd_ring)" ( (pointer_expression "&sp->fts_fd_ring" & (field_expression "sp->fts_fd_ring" identifier -> field_identifier)) ))) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar1 = fchdir(sp->fts_rfd);" (assignment_expression "iVar1 = fchdir(sp->fts_rfd)" identifier = (call_expression "fchdir(sp->fts_rfd)" identifier (argument_list "(sp->fts_rfd)" ( (field_expression "sp->fts_rfd" identifier -> field_identifier) )))) ;) (expression_statement "fd_ring_clear(&sp->fts_fd_ring);" (call_expression "fd_ring_clear(&sp->fts_fd_ring)" identifier (argument_list "(&sp->fts_fd_ring)" ( (pointer_expression "&sp->fts_fd_ring" & (field_expression "sp->fts_fd_ring" identifier -> field_identifier)) ))) ;) (return_statement "return (uint)(iVar1 != 0);" return (call_expression "(uint)(iVar1 != 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) ))) ;) })))
(translation_unit "bool __regparm3 FUN_00023de0(int param_1)\n\n{\n  int iVar1;\n  \n  if ((*(uint *)(param_1 + 0x2c) & 4) != 0) {\n    FUN_00023b50();\n    return false;\n  }\n  if ((*(uint *)(param_1 + 0x2c) & 0x200) != 0) {\n    FUN_00023d70();\n    FUN_00023b50();\n    return false;\n  }\n  iVar1 = fchdir(*(int *)(param_1 + 0x18));\n  FUN_00023b50();\n  return iVar1 != 0;\n}\n\n" (function_definition "bool __regparm3 FUN_00023de0(int param_1)\n\n{\n  int iVar1;\n  \n  if ((*(uint *)(param_1 + 0x2c) & 4) != 0) {\n    FUN_00023b50();\n    return false;\n  }\n  if ((*(uint *)(param_1 + 0x2c) & 0x200) != 0) {\n    FUN_00023d70();\n    FUN_00023b50();\n    return false;\n  }\n  iVar1 = fchdir(*(int *)(param_1 + 0x18));\n  FUN_00023b50();\n  return iVar1 != 0;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00023de0(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  if ((*(uint *)(param_1 + 0x2c) & 4) != 0) {\n    FUN_00023b50();\n    return false;\n  }\n  if ((*(uint *)(param_1 + 0x2c) & 0x200) != 0) {\n    FUN_00023d70();\n    FUN_00023b50();\n    return false;\n  }\n  iVar1 = fchdir(*(int *)(param_1 + 0x18));\n  FUN_00023b50();\n  return iVar1 != 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (if_statement "if ((*(uint *)(param_1 + 0x2c) & 4) != 0) {\n    FUN_00023b50();\n    return false;\n  }" if (parenthesized_expression "((*(uint *)(param_1 + 0x2c) & 4) != 0)" ( (binary_expression "(*(uint *)(param_1 + 0x2c) & 4) != 0" (parenthesized_expression "(*(uint *)(param_1 + 0x2c) & 4)" ( (binary_expression "*(uint *)(param_1 + 0x2c) & 4" (pointer_expression "*(uint *)(param_1 + 0x2c)" * (cast_expression "(uint *)(param_1 + 0x2c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2c)" ( (binary_expression "param_1 + 0x2c" identifier + number_literal) )))) & number_literal) )) != number_literal) )) (compound_statement "{\n    FUN_00023b50();\n    return false;\n  }" { (expression_statement "FUN_00023b50();" (call_expression "FUN_00023b50()" identifier (argument_list "()" ( ))) ;) (return_statement "return false;" return false ;) })) (if_statement "if ((*(uint *)(param_1 + 0x2c) & 0x200) != 0) {\n    FUN_00023d70();\n    FUN_00023b50();\n    return false;\n  }" if (parenthesized_expression "((*(uint *)(param_1 + 0x2c) & 0x200) != 0)" ( (binary_expression "(*(uint *)(param_1 + 0x2c) & 0x200) != 0" (parenthesized_expression "(*(uint *)(param_1 + 0x2c) & 0x200)" ( (binary_expression "*(uint *)(param_1 + 0x2c) & 0x200" (pointer_expression "*(uint *)(param_1 + 0x2c)" * (cast_expression "(uint *)(param_1 + 0x2c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2c)" ( (binary_expression "param_1 + 0x2c" identifier + number_literal) )))) & number_literal) )) != number_literal) )) (compound_statement "{\n    FUN_00023d70();\n    FUN_00023b50();\n    return false;\n  }" { (expression_statement "FUN_00023d70();" (call_expression "FUN_00023d70()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_00023b50();" (call_expression "FUN_00023b50()" identifier (argument_list "()" ( ))) ;) (return_statement "return false;" return false ;) })) (expression_statement "iVar1 = fchdir(*(int *)(param_1 + 0x18));" (assignment_expression "iVar1 = fchdir(*(int *)(param_1 + 0x18))" identifier = (call_expression "fchdir(*(int *)(param_1 + 0x18))" identifier (argument_list "(*(int *)(param_1 + 0x18))" ( (pointer_expression "*(int *)(param_1 + 0x18)" * (cast_expression "(int *)(param_1 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) )))) ;) (expression_statement "FUN_00023b50();" (call_expression "FUN_00023b50()" identifier (argument_list "()" ( ))) ;) (return_statement "return iVar1 != 0;" return (binary_expression "iVar1 != 0" identifier != number_literal) ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (return_statement return BOOL ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (return_statement return BOOL ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) )))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (return_statement return (binary_expression IDENT != LIT) ;) })))
(function_definition "bool __regparm3 FUN_00023de0(int param_1)\n\n{\n  int iVar1;\n  \n  if ((*(uint *)(param_1 + 0x2c) & 4) != 0) {\n    FUN_00023b50();\n    return false;\n  }\n  if ((*(uint *)(param_1 + 0x2c) & 0x200) != 0) {\n    FUN_00023d70();\n    FUN_00023b50();\n    return false;\n  }\n  iVar1 = fchdir(*(int *)(param_1 + 0x18));\n  FUN_00023b50();\n  return iVar1 != 0;\n}" (primitive_type "bool") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00023de0(int param_1)" (identifier "FUN_00023de0") (parameter_list "(int param_1)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) () ")"))) (compound_statement "{\n  int iVar1;\n  \n  if ((*(uint *)(param_1 + 0x2c) & 4) != 0) {\n    FUN_00023b50();\n    return false;\n  }\n  if ((*(uint *)(param_1 + 0x2c) & 0x200) != 0) {\n    FUN_00023d70();\n    FUN_00023b50();\n    return false;\n  }\n  iVar1 = fchdir(*(int *)(param_1 + 0x18));\n  FUN_00023b50();\n  return iVar1 != 0;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (if_statement "if ((*(uint *)(param_1 + 0x2c) & 4) != 0) {\n    FUN_00023b50();\n    return false;\n  }" (if "if") (parenthesized_expression "((*(uint *)(param_1 + 0x2c) & 4) != 0)" (( "(") (binary_expression "(*(uint *)(param_1 + 0x2c) & 4) != 0" (parenthesized_expression "(*(uint *)(param_1 + 0x2c) & 4)" (( "(") (binary_expression "*(uint *)(param_1 + 0x2c) & 4" (pointer_expression "*(uint *)(param_1 + 0x2c)" (* "*") (cast_expression "(uint *)(param_1 + 0x2c)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x2c)" (( "(") (binary_expression "param_1 + 0x2c" (identifier "param_1") (+ "+") (number_literal "0x2c")) () ")")))) (& "&") (number_literal "4")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    FUN_00023b50();\n    return false;\n  }" ({ "{") (expression_statement "FUN_00023b50();" (call_expression "FUN_00023b50()" (identifier "FUN_00023b50") (argument_list "()" (( "(") () ")"))) (; ";")) (return_statement "return false;" (return "return") (false "false") (; ";")) (} "}"))) (if_statement "if ((*(uint *)(param_1 + 0x2c) & 0x200) != 0) {\n    FUN_00023d70();\n    FUN_00023b50();\n    return false;\n  }" (if "if") (parenthesized_expression "((*(uint *)(param_1 + 0x2c) & 0x200) != 0)" (( "(") (binary_expression "(*(uint *)(param_1 + 0x2c) & 0x200) != 0" (parenthesized_expression "(*(uint *)(param_1 + 0x2c) & 0x200)" (( "(") (binary_expression "*(uint *)(param_1 + 0x2c) & 0x200" (pointer_expression "*(uint *)(param_1 + 0x2c)" (* "*") (cast_expression "(uint *)(param_1 + 0x2c)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x2c)" (( "(") (binary_expression "param_1 + 0x2c" (identifier "param_1") (+ "+") (number_literal "0x2c")) () ")")))) (& "&") (number_literal "0x200")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    FUN_00023d70();\n    FUN_00023b50();\n    return false;\n  }" ({ "{") (expression_statement "FUN_00023d70();" (call_expression "FUN_00023d70()" (identifier "FUN_00023d70") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "FUN_00023b50();" (call_expression "FUN_00023b50()" (identifier "FUN_00023b50") (argument_list "()" (( "(") () ")"))) (; ";")) (return_statement "return false;" (return "return") (false "false") (; ";")) (} "}"))) (expression_statement "iVar1 = fchdir(*(int *)(param_1 + 0x18));" (assignment_expression "iVar1 = fchdir(*(int *)(param_1 + 0x18))" (identifier "iVar1") (= "=") (call_expression "fchdir(*(int *)(param_1 + 0x18))" (identifier "fchdir") (argument_list "(*(int *)(param_1 + 0x18))" (( "(") (pointer_expression "*(int *)(param_1 + 0x18)" (* "*") (cast_expression "(int *)(param_1 + 0x18)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")")))) () ")")))) (; ";")) (expression_statement "FUN_00023b50();" (call_expression "FUN_00023b50()" (identifier "FUN_00023b50") (argument_list "()" (( "(") () ")"))) (; ";")) (return_statement "return iVar1 != 0;" (return "return") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) (; ";")) (} "}")))

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

int __regparm3 function_1(type_1 *sp)

{
  int var_4;
  
  if ((sp->fts_options & 4U) != 0) {
    var_1(&sp->fts_fd_ring);
    return 0;
  }
  if ((sp->fts_options & 0x200U) != 0) {
    var_2(sp,-100,true);
    var_1(&sp->fts_fd_ring);
    return 0;
  }
  var_4 = var_3(sp->fts_rfd);
  var_1(&sp->fts_fd_ring);
  return (uint)(var_4 != 0);
}


(translation_unit (function_definition type: (primitive_type) (ERROR (identifier)) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (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))) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (return_statement (false)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (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))) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (return_statement (false)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (return_statement (binary_expression left: (identifier) right: (number_literal))))))

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

bool __regparm3 MASKED(int param_1)

{
  int iVar1;
  
  if ((*(uint *)(param_1 + 0x2c) & 4) != 0) {
    FUN_00023b50();
    return false;
  }
  if ((*(uint *)(param_1 + 0x2c) & 0x200) != 0) {
    FUN_00023d70();
    FUN_00023b50();
    return false;
  }
  iVar1 = fchdir(*(int *)(param_1 + 0x18));
  FUN_00023b50();
  return iVar1 != 0;
}

