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

int test_wildcard(char *name,int cmdline)

{
  int iVar1;
  int iVar2;
  int iVar3;
  int in_GS_OFFSET;
  glob_t globbed;
  stat statbuf;
  
  iVar3 = 1;
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  iVar2 = __xstat64(3,name,(stat64 *)&statbuf);
  if ((iVar2 != 0) && (iVar3 = 0, cmdline == 0)) {
    iVar3 = glob64(name,1,(__errfunc *)0x0,(glob64_t *)&globbed);
    if (iVar3 == 0) {
      iVar3 = 0;
      if (globbed.gl_pathc != 0) {
        iVar3 = 2;
      }
      globfree64((glob64_t *)&globbed);
    }
    else {
      iVar3 = 0;
    }
  }
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar3;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



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

undefined4 FUN_0006a980(char *param_1,int param_2)

{
  int iVar1;
  undefined4 uVar2;
  int in_GS_OFFSET;
  glob64_t local_a4;
  stat64 local_80;
  int local_20;
  undefined4 uStack_14;
  
  uVar2 = 1;
  uStack_14 = 0x6a98e;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  iVar1 = __xstat64(3,param_1,&local_80);
  if ((iVar1 != 0) && (uVar2 = 0, param_2 == 0)) {
    iVar1 = glob64(param_1,1,(__errfunc *)0x0,&local_a4);
    if (iVar1 == 0) {
      uVar2 = 0;
      if (local_a4.gl_pathc != 0) {
        uVar2 = 2;
      }
      globfree64(&local_a4);
    }
    else {
      uVar2 = 0;
    }
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return uVar2;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0006f2a0();
}


PUSH EBP
PUSH EDI
PUSH ESI
MOV ESI,0x1
PUSH EBX
CALL 0x00014980
ADD EBX,0x3e3e2
SUB ESP,0xa0
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x90],EAX
XOR EAX,EAX
MOV EDI,dword ptr [ESP + 0xb4]
LEA EAX,[ESP + 0x30]
PUSH EAX
PUSH EDI
PUSH 0x3
CALL 0x000147c0
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0006a9d1
MOV EDX,dword ptr [ESP + 0xb4]
XOR ESI,ESI
TEST EDX,EDX
JZ 0x0006a9f0
MOV EDX,dword ptr [ESP + 0x8c]
XOR EDX,dword ptr GS:[0x14]
MOV EAX,ESI
JNZ 0x0006aa2c
ADD ESP,0x9c
POP EBX
POP ESI
POP EDI
POP EBP
RET
LEA EBP,[ESP + 0x8]
PUSH EBP
PUSH 0x0
PUSH 0x1
PUSH EDI
CALL 0x000143b0
ADD ESP,0x10
MOV ESI,EAX
TEST EAX,EAX
JNZ 0x0006aa28
MOV EAX,dword ptr [ESP + 0x8]
TEST EAX,EAX
MOV EAX,0x2
CMOVNZ ESI,EAX
SUB ESP,0xc
PUSH EBP
CALL 0x00014250
ADD ESP,0x10
JMP 0x0006a9d1
XOR ESI,ESI
JMP 0x0006a9d1
CALL 0x0006f2a0
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 FUN_0006a980(char *param_1,int param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  glob64_t local_a4;\n  stat64 local_80;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uVar2 = 1;\n  uStack_14 = 0x6a98e;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = __xstat64(3,param_1,&local_80);\n  if ((iVar1 != 0) && (uVar2 = 0, param_2 == 0)) {\n    iVar1 = glob64(param_1,1,(__errfunc *)0x0,&local_a4);\n    if (iVar1 == 0) {\n      uVar2 = 0;\n      if (local_a4.gl_pathc != 0) {\n        uVar2 = 2;\n      }\n      globfree64(&local_a4);\n    }\n    else {\n      uVar2 = 0;\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0006f2a0();\n}\n\n" comment (function_definition "undefined4 FUN_0006a980(char *param_1,int param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  glob64_t local_a4;\n  stat64 local_80;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uVar2 = 1;\n  uStack_14 = 0x6a98e;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = __xstat64(3,param_1,&local_80);\n  if ((iVar1 != 0) && (uVar2 = 0, param_2 == 0)) {\n    iVar1 = glob64(param_1,1,(__errfunc *)0x0,&local_a4);\n    if (iVar1 == 0) {\n      uVar2 = 0;\n      if (local_a4.gl_pathc != 0) {\n        uVar2 = 2;\n      }\n      globfree64(&local_a4);\n    }\n    else {\n      uVar2 = 0;\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0006f2a0();\n}" type_identifier (function_declarator "FUN_0006a980(char *param_1,int param_2)" identifier (parameter_list "(char *param_1,int param_2)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  glob64_t local_a4;\n  stat64 local_80;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uVar2 = 1;\n  uStack_14 = 0x6a98e;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = __xstat64(3,param_1,&local_80);\n  if ((iVar1 != 0) && (uVar2 = 0, param_2 == 0)) {\n    iVar1 = glob64(param_1,1,(__errfunc *)0x0,&local_a4);\n    if (iVar1 == 0) {\n      uVar2 = 0;\n      if (local_a4.gl_pathc != 0) {\n        uVar2 = 2;\n      }\n      globfree64(&local_a4);\n    }\n    else {\n      uVar2 = 0;\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0006f2a0();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "glob64_t local_a4;" type_identifier identifier ;) (declaration "stat64 local_80;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" identifier = number_literal) ;) (expression_statement "uStack_14 = 0x6a98e;" (assignment_expression "uStack_14 = 0x6a98e" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "iVar1 = __xstat64(3,param_1,&local_80);" (assignment_expression "iVar1 = __xstat64(3,param_1,&local_80)" identifier = (call_expression "__xstat64(3,param_1,&local_80)" identifier (argument_list "(3,param_1,&local_80)" ( number_literal , identifier , (pointer_expression "&local_80" & identifier) )))) ;) (if_statement "if ((iVar1 != 0) && (uVar2 = 0, param_2 == 0)) {\n    iVar1 = glob64(param_1,1,(__errfunc *)0x0,&local_a4);\n    if (iVar1 == 0) {\n      uVar2 = 0;\n      if (local_a4.gl_pathc != 0) {\n        uVar2 = 2;\n      }\n      globfree64(&local_a4);\n    }\n    else {\n      uVar2 = 0;\n    }\n  }" if (parenthesized_expression "((iVar1 != 0) && (uVar2 = 0, param_2 == 0))" ( (binary_expression "(iVar1 != 0) && (uVar2 = 0, param_2 == 0)" (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) && (parenthesized_expression "(uVar2 = 0, param_2 == 0)" ( (comma_expression "uVar2 = 0, param_2 == 0" (assignment_expression "uVar2 = 0" identifier = number_literal) , (binary_expression "param_2 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n    iVar1 = glob64(param_1,1,(__errfunc *)0x0,&local_a4);\n    if (iVar1 == 0) {\n      uVar2 = 0;\n      if (local_a4.gl_pathc != 0) {\n        uVar2 = 2;\n      }\n      globfree64(&local_a4);\n    }\n    else {\n      uVar2 = 0;\n    }\n  }" { (expression_statement "iVar1 = glob64(param_1,1,(__errfunc *)0x0,&local_a4);" (assignment_expression "iVar1 = glob64(param_1,1,(__errfunc *)0x0,&local_a4)" identifier = (call_expression "glob64(param_1,1,(__errfunc *)0x0,&local_a4)" identifier (argument_list "(param_1,1,(__errfunc *)0x0,&local_a4)" ( identifier , number_literal , (cast_expression "(__errfunc *)0x0" ( (type_descriptor "__errfunc *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) , (pointer_expression "&local_a4" & identifier) )))) ;) (if_statement "if (iVar1 == 0) {\n      uVar2 = 0;\n      if (local_a4.gl_pathc != 0) {\n        uVar2 = 2;\n      }\n      globfree64(&local_a4);\n    }\n    else {\n      uVar2 = 0;\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar2 = 0;\n      if (local_a4.gl_pathc != 0) {\n        uVar2 = 2;\n      }\n      globfree64(&local_a4);\n    }" { (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (if_statement "if (local_a4.gl_pathc != 0) {\n        uVar2 = 2;\n      }" if (parenthesized_expression "(local_a4.gl_pathc != 0)" ( (binary_expression "local_a4.gl_pathc != 0" (field_expression "local_a4.gl_pathc" identifier . field_identifier) != number_literal) )) (compound_statement "{\n        uVar2 = 2;\n      }" { (expression_statement "uVar2 = 2;" (assignment_expression "uVar2 = 2" identifier = number_literal) ;) })) (expression_statement "globfree64(&local_a4);" (call_expression "globfree64(&local_a4)" identifier (argument_list "(&local_a4)" ( (pointer_expression "&local_a4" & identifier) ))) ;) }) (else_clause "else {\n      uVar2 = 0;\n    }" else (compound_statement "{\n      uVar2 = 0;\n    }" { (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) }))) })) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return uVar2;\n  }" { (return_statement "return uVar2;" return identifier ;) })) comment (expression_statement "FUN_0006f2a0();" (call_expression "FUN_0006f2a0()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nint test_wildcard(char *name,int cmdline)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int in_GS_OFFSET;\n  glob_t globbed;\n  stat statbuf;\n  \n  iVar3 = 1;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = __xstat64(3,name,(stat64 *)&statbuf);\n  if ((iVar2 != 0) && (iVar3 = 0, cmdline == 0)) {\n    iVar3 = glob64(name,1,(__errfunc *)0x0,(glob64_t *)&globbed);\n    if (iVar3 == 0) {\n      iVar3 = 0;\n      if (globbed.gl_pathc != 0) {\n        iVar3 = 2;\n      }\n      globfree64((glob64_t *)&globbed);\n    }\n    else {\n      iVar3 = 0;\n    }\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment comment (function_definition "int test_wildcard(char *name,int cmdline)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int in_GS_OFFSET;\n  glob_t globbed;\n  stat statbuf;\n  \n  iVar3 = 1;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = __xstat64(3,name,(stat64 *)&statbuf);\n  if ((iVar2 != 0) && (iVar3 = 0, cmdline == 0)) {\n    iVar3 = glob64(name,1,(__errfunc *)0x0,(glob64_t *)&globbed);\n    if (iVar3 == 0) {\n      iVar3 = 0;\n      if (globbed.gl_pathc != 0) {\n        iVar3 = 2;\n      }\n      globfree64((glob64_t *)&globbed);\n    }\n    else {\n      iVar3 = 0;\n    }\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (function_declarator "test_wildcard(char *name,int cmdline)" identifier (parameter_list "(char *name,int cmdline)" ( (parameter_declaration "char *name" primitive_type (pointer_declarator "*name" * identifier)) , (parameter_declaration "int cmdline" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int in_GS_OFFSET;\n  glob_t globbed;\n  stat statbuf;\n  \n  iVar3 = 1;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = __xstat64(3,name,(stat64 *)&statbuf);\n  if ((iVar2 != 0) && (iVar3 = 0, cmdline == 0)) {\n    iVar3 = glob64(name,1,(__errfunc *)0x0,(glob64_t *)&globbed);\n    if (iVar3 == 0) {\n      iVar3 = 0;\n      if (globbed.gl_pathc != 0) {\n        iVar3 = 2;\n      }\n      globfree64((glob64_t *)&globbed);\n    }\n    else {\n      iVar3 = 0;\n    }\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "glob_t globbed;" type_identifier identifier ;) (declaration "stat statbuf;" type_identifier identifier ;) (expression_statement "iVar3 = 1;" (assignment_expression "iVar3 = 1" identifier = number_literal) ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "iVar2 = __xstat64(3,name,(stat64 *)&statbuf);" (assignment_expression "iVar2 = __xstat64(3,name,(stat64 *)&statbuf)" identifier = (call_expression "__xstat64(3,name,(stat64 *)&statbuf)" identifier (argument_list "(3,name,(stat64 *)&statbuf)" ( number_literal , identifier , (cast_expression "(stat64 *)&statbuf" ( (type_descriptor "stat64 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&statbuf" & identifier)) )))) ;) (if_statement "if ((iVar2 != 0) && (iVar3 = 0, cmdline == 0)) {\n    iVar3 = glob64(name,1,(__errfunc *)0x0,(glob64_t *)&globbed);\n    if (iVar3 == 0) {\n      iVar3 = 0;\n      if (globbed.gl_pathc != 0) {\n        iVar3 = 2;\n      }\n      globfree64((glob64_t *)&globbed);\n    }\n    else {\n      iVar3 = 0;\n    }\n  }" if (parenthesized_expression "((iVar2 != 0) && (iVar3 = 0, cmdline == 0))" ( (binary_expression "(iVar2 != 0) && (iVar3 = 0, cmdline == 0)" (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) && (parenthesized_expression "(iVar3 = 0, cmdline == 0)" ( (comma_expression "iVar3 = 0, cmdline == 0" (assignment_expression "iVar3 = 0" identifier = number_literal) , (binary_expression "cmdline == 0" identifier == number_literal)) ))) )) (compound_statement "{\n    iVar3 = glob64(name,1,(__errfunc *)0x0,(glob64_t *)&globbed);\n    if (iVar3 == 0) {\n      iVar3 = 0;\n      if (globbed.gl_pathc != 0) {\n        iVar3 = 2;\n      }\n      globfree64((glob64_t *)&globbed);\n    }\n    else {\n      iVar3 = 0;\n    }\n  }" { (expression_statement "iVar3 = glob64(name,1,(__errfunc *)0x0,(glob64_t *)&globbed);" (assignment_expression "iVar3 = glob64(name,1,(__errfunc *)0x0,(glob64_t *)&globbed)" identifier = (call_expression "glob64(name,1,(__errfunc *)0x0,(glob64_t *)&globbed)" identifier (argument_list "(name,1,(__errfunc *)0x0,(glob64_t *)&globbed)" ( identifier , number_literal , (cast_expression "(__errfunc *)0x0" ( (type_descriptor "__errfunc *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) , (cast_expression "(glob64_t *)&globbed" ( (type_descriptor "glob64_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&globbed" & identifier)) )))) ;) (if_statement "if (iVar3 == 0) {\n      iVar3 = 0;\n      if (globbed.gl_pathc != 0) {\n        iVar3 = 2;\n      }\n      globfree64((glob64_t *)&globbed);\n    }\n    else {\n      iVar3 = 0;\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar3 = 0;\n      if (globbed.gl_pathc != 0) {\n        iVar3 = 2;\n      }\n      globfree64((glob64_t *)&globbed);\n    }" { (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (if_statement "if (globbed.gl_pathc != 0) {\n        iVar3 = 2;\n      }" if (parenthesized_expression "(globbed.gl_pathc != 0)" ( (binary_expression "globbed.gl_pathc != 0" (field_expression "globbed.gl_pathc" identifier . field_identifier) != number_literal) )) (compound_statement "{\n        iVar3 = 2;\n      }" { (expression_statement "iVar3 = 2;" (assignment_expression "iVar3 = 2" identifier = number_literal) ;) })) (expression_statement "globfree64((glob64_t *)&globbed);" (call_expression "globfree64((glob64_t *)&globbed)" identifier (argument_list "((glob64_t *)&globbed)" ( (cast_expression "(glob64_t *)&globbed" ( (type_descriptor "glob64_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&globbed" & identifier)) ))) ;) }) (else_clause "else {\n      iVar3 = 0;\n    }" else (compound_statement "{\n      iVar3 = 0;\n    }" { (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) }))) })) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }" if (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return iVar3;\n  }" { (return_statement "return iVar3;" return identifier ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "undefined4 FUN_0006a980(char *param_1,int param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  glob64_t local_a4;\n  stat64 local_80;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uVar2 = 1;\n  uStack_14 = 0x6a98e;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = __xstat64(3,param_1,&local_80);\n  if ((iVar1 != 0) && (uVar2 = 0, param_2 == 0)) {\n    iVar1 = glob64(param_1,1,(__errfunc *)0x0,&local_a4);\n    if (iVar1 == 0) {\n      uVar2 = 0;\n      if (local_a4.gl_pathc != 0) {\n        uVar2 = 2;\n      }\n      globfree64(&local_a4);\n    }\n    else {\n      uVar2 = 0;\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }\n                    \n  FUN_0006f2a0();\n}\n\n" (function_definition "undefined4 FUN_0006a980(char *param_1,int param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  glob64_t local_a4;\n  stat64 local_80;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uVar2 = 1;\n  uStack_14 = 0x6a98e;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = __xstat64(3,param_1,&local_80);\n  if ((iVar1 != 0) && (uVar2 = 0, param_2 == 0)) {\n    iVar1 = glob64(param_1,1,(__errfunc *)0x0,&local_a4);\n    if (iVar1 == 0) {\n      uVar2 = 0;\n      if (local_a4.gl_pathc != 0) {\n        uVar2 = 2;\n      }\n      globfree64(&local_a4);\n    }\n    else {\n      uVar2 = 0;\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }\n                    \n  FUN_0006f2a0();\n}" type_identifier (function_declarator "FUN_0006a980(char *param_1,int param_2)" identifier (parameter_list "(char *param_1,int param_2)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  glob64_t local_a4;\n  stat64 local_80;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uVar2 = 1;\n  uStack_14 = 0x6a98e;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = __xstat64(3,param_1,&local_80);\n  if ((iVar1 != 0) && (uVar2 = 0, param_2 == 0)) {\n    iVar1 = glob64(param_1,1,(__errfunc *)0x0,&local_a4);\n    if (iVar1 == 0) {\n      uVar2 = 0;\n      if (local_a4.gl_pathc != 0) {\n        uVar2 = 2;\n      }\n      globfree64(&local_a4);\n    }\n    else {\n      uVar2 = 0;\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }\n                    \n  FUN_0006f2a0();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "glob64_t local_a4;" type_identifier identifier ;) (declaration "stat64 local_80;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" identifier = number_literal) ;) (expression_statement "uStack_14 = 0x6a98e;" (assignment_expression "uStack_14 = 0x6a98e" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "iVar1 = __xstat64(3,param_1,&local_80);" (assignment_expression "iVar1 = __xstat64(3,param_1,&local_80)" identifier = (call_expression "__xstat64(3,param_1,&local_80)" identifier (argument_list "(3,param_1,&local_80)" ( number_literal , identifier , (pointer_expression "&local_80" & identifier) )))) ;) (if_statement "if ((iVar1 != 0) && (uVar2 = 0, param_2 == 0)) {\n    iVar1 = glob64(param_1,1,(__errfunc *)0x0,&local_a4);\n    if (iVar1 == 0) {\n      uVar2 = 0;\n      if (local_a4.gl_pathc != 0) {\n        uVar2 = 2;\n      }\n      globfree64(&local_a4);\n    }\n    else {\n      uVar2 = 0;\n    }\n  }" if (parenthesized_expression "((iVar1 != 0) && (uVar2 = 0, param_2 == 0))" ( (binary_expression "(iVar1 != 0) && (uVar2 = 0, param_2 == 0)" (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) && (parenthesized_expression "(uVar2 = 0, param_2 == 0)" ( (comma_expression "uVar2 = 0, param_2 == 0" (assignment_expression "uVar2 = 0" identifier = number_literal) , (binary_expression "param_2 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n    iVar1 = glob64(param_1,1,(__errfunc *)0x0,&local_a4);\n    if (iVar1 == 0) {\n      uVar2 = 0;\n      if (local_a4.gl_pathc != 0) {\n        uVar2 = 2;\n      }\n      globfree64(&local_a4);\n    }\n    else {\n      uVar2 = 0;\n    }\n  }" { (expression_statement "iVar1 = glob64(param_1,1,(__errfunc *)0x0,&local_a4);" (assignment_expression "iVar1 = glob64(param_1,1,(__errfunc *)0x0,&local_a4)" identifier = (call_expression "glob64(param_1,1,(__errfunc *)0x0,&local_a4)" identifier (argument_list "(param_1,1,(__errfunc *)0x0,&local_a4)" ( identifier , number_literal , (cast_expression "(__errfunc *)0x0" ( (type_descriptor "__errfunc *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) , (pointer_expression "&local_a4" & identifier) )))) ;) (if_statement "if (iVar1 == 0) {\n      uVar2 = 0;\n      if (local_a4.gl_pathc != 0) {\n        uVar2 = 2;\n      }\n      globfree64(&local_a4);\n    }\n    else {\n      uVar2 = 0;\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar2 = 0;\n      if (local_a4.gl_pathc != 0) {\n        uVar2 = 2;\n      }\n      globfree64(&local_a4);\n    }" { (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (if_statement "if (local_a4.gl_pathc != 0) {\n        uVar2 = 2;\n      }" if (parenthesized_expression "(local_a4.gl_pathc != 0)" ( (binary_expression "local_a4.gl_pathc != 0" (field_expression "local_a4.gl_pathc" identifier . field_identifier) != number_literal) )) (compound_statement "{\n        uVar2 = 2;\n      }" { (expression_statement "uVar2 = 2;" (assignment_expression "uVar2 = 2" identifier = number_literal) ;) })) (expression_statement "globfree64(&local_a4);" (call_expression "globfree64(&local_a4)" identifier (argument_list "(&local_a4)" ( (pointer_expression "&local_a4" & identifier) ))) ;) }) (else_clause "else {\n      uVar2 = 0;\n    }" else (compound_statement "{\n      uVar2 = 0;\n    }" { (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) }))) })) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return uVar2;\n  }" { (return_statement "return uVar2;" return identifier ;) })) (expression_statement "FUN_0006f2a0();" (call_expression "FUN_0006f2a0()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , IDENT , (pointer_expression & IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != LIT) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = LIT) , (binary_expression IDENT == LIT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT , (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) , (pointer_expression & IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (field_expression IDENT . field_identifier) != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression & IDENT) ))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }))) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "undefined4 FUN_0006a980(char *param_1,int param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  glob64_t local_a4;\n  stat64 local_80;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uVar2 = 1;\n  uStack_14 = 0x6a98e;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = __xstat64(3,param_1,&local_80);\n  if ((iVar1 != 0) && (uVar2 = 0, param_2 == 0)) {\n    iVar1 = glob64(param_1,1,(__errfunc *)0x0,&local_a4);\n    if (iVar1 == 0) {\n      uVar2 = 0;\n      if (local_a4.gl_pathc != 0) {\n        uVar2 = 2;\n      }\n      globfree64(&local_a4);\n    }\n    else {\n      uVar2 = 0;\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }\n                    \n  FUN_0006f2a0();\n}" (type_identifier "undefined4") (function_declarator "FUN_0006a980(char *param_1,int param_2)" (identifier "FUN_0006a980") (parameter_list "(char *param_1,int param_2)" (( "(") (parameter_declaration "char *param_1" (primitive_type "char") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  glob64_t local_a4;\n  stat64 local_80;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uVar2 = 1;\n  uStack_14 = 0x6a98e;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = __xstat64(3,param_1,&local_80);\n  if ((iVar1 != 0) && (uVar2 = 0, param_2 == 0)) {\n    iVar1 = glob64(param_1,1,(__errfunc *)0x0,&local_a4);\n    if (iVar1 == 0) {\n      uVar2 = 0;\n      if (local_a4.gl_pathc != 0) {\n        uVar2 = 2;\n      }\n      globfree64(&local_a4);\n    }\n    else {\n      uVar2 = 0;\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }\n                    \n  FUN_0006f2a0();\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "glob64_t local_a4;" (type_identifier "glob64_t") (identifier "local_a4") (; ";")) (declaration "stat64 local_80;" (type_identifier "stat64") (identifier "local_80") (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" (identifier "uVar2") (= "=") (number_literal "1")) (; ";")) (expression_statement "uStack_14 = 0x6a98e;" (assignment_expression "uStack_14 = 0x6a98e" (identifier "uStack_14") (= "=") (number_literal "0x6a98e")) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "iVar1 = __xstat64(3,param_1,&local_80);" (assignment_expression "iVar1 = __xstat64(3,param_1,&local_80)" (identifier "iVar1") (= "=") (call_expression "__xstat64(3,param_1,&local_80)" (identifier "__xstat64") (argument_list "(3,param_1,&local_80)" (( "(") (number_literal "3") (, ",") (identifier "param_1") (, ",") (pointer_expression "&local_80" (& "&") (identifier "local_80")) () ")")))) (; ";")) (if_statement "if ((iVar1 != 0) && (uVar2 = 0, param_2 == 0)) {\n    iVar1 = glob64(param_1,1,(__errfunc *)0x0,&local_a4);\n    if (iVar1 == 0) {\n      uVar2 = 0;\n      if (local_a4.gl_pathc != 0) {\n        uVar2 = 2;\n      }\n      globfree64(&local_a4);\n    }\n    else {\n      uVar2 = 0;\n    }\n  }" (if "if") (parenthesized_expression "((iVar1 != 0) && (uVar2 = 0, param_2 == 0))" (( "(") (binary_expression "(iVar1 != 0) && (uVar2 = 0, param_2 == 0)" (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(uVar2 = 0, param_2 == 0)" (( "(") (comma_expression "uVar2 = 0, param_2 == 0" (assignment_expression "uVar2 = 0" (identifier "uVar2") (= "=") (number_literal "0")) (, ",") (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0"))) () ")"))) () ")")) (compound_statement "{\n    iVar1 = glob64(param_1,1,(__errfunc *)0x0,&local_a4);\n    if (iVar1 == 0) {\n      uVar2 = 0;\n      if (local_a4.gl_pathc != 0) {\n        uVar2 = 2;\n      }\n      globfree64(&local_a4);\n    }\n    else {\n      uVar2 = 0;\n    }\n  }" ({ "{") (expression_statement "iVar1 = glob64(param_1,1,(__errfunc *)0x0,&local_a4);" (assignment_expression "iVar1 = glob64(param_1,1,(__errfunc *)0x0,&local_a4)" (identifier "iVar1") (= "=") (call_expression "glob64(param_1,1,(__errfunc *)0x0,&local_a4)" (identifier "glob64") (argument_list "(param_1,1,(__errfunc *)0x0,&local_a4)" (( "(") (identifier "param_1") (, ",") (number_literal "1") (, ",") (cast_expression "(__errfunc *)0x0" (( "(") (type_descriptor "__errfunc *" (type_identifier "__errfunc") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (, ",") (pointer_expression "&local_a4" (& "&") (identifier "local_a4")) () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n      uVar2 = 0;\n      if (local_a4.gl_pathc != 0) {\n        uVar2 = 2;\n      }\n      globfree64(&local_a4);\n    }\n    else {\n      uVar2 = 0;\n    }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      uVar2 = 0;\n      if (local_a4.gl_pathc != 0) {\n        uVar2 = 2;\n      }\n      globfree64(&local_a4);\n    }" ({ "{") (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" (identifier "uVar2") (= "=") (number_literal "0")) (; ";")) (if_statement "if (local_a4.gl_pathc != 0) {\n        uVar2 = 2;\n      }" (if "if") (parenthesized_expression "(local_a4.gl_pathc != 0)" (( "(") (binary_expression "local_a4.gl_pathc != 0" (field_expression "local_a4.gl_pathc" (identifier "local_a4") (. ".") (field_identifier "gl_pathc")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        uVar2 = 2;\n      }" ({ "{") (expression_statement "uVar2 = 2;" (assignment_expression "uVar2 = 2" (identifier "uVar2") (= "=") (number_literal "2")) (; ";")) (} "}"))) (expression_statement "globfree64(&local_a4);" (call_expression "globfree64(&local_a4)" (identifier "globfree64") (argument_list "(&local_a4)" (( "(") (pointer_expression "&local_a4" (& "&") (identifier "local_a4")) () ")"))) (; ";")) (} "}")) (else_clause "else {\n      uVar2 = 0;\n    }" (else "else") (compound_statement "{\n      uVar2 = 0;\n    }" ({ "{") (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" (identifier "uVar2") (= "=") (number_literal "0")) (; ";")) (} "}")))) (} "}"))) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }" (if "if") (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return uVar2;\n  }" ({ "{") (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}"))) (expression_statement "FUN_0006f2a0();" (call_expression "FUN_0006f2a0()" (identifier "FUN_0006f2a0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

int function_1(char *name,int var_4)

{
  int var_8;
  int var_3;
  int var_6;
  int var_1;
  type_1 globbed;
  type_2 statbuf;
  
  var_6 = 1;
  var_8 = *(int *)(var_1 + 0x14);
  var_3 = var_2(3,name,(type_3 *)&statbuf);
  if ((var_3 != 0) && (var_6 = 0, var_4 == 0)) {
    var_6 = var_5(name,1,(type_4 *)0x0,(type_5 *)&globbed);
    if (var_6 == 0) {
      var_6 = 0;
      if (globbed.gl_pathc != 0) {
        var_6 = 2;
      }
      var_7((type_5 *)&globbed);
    }
    else {
      var_6 = 0;
    }
  }
  if (var_8 == *(int *)(var_1 + 0x14)) {
    return var_6;
  }
                    /* WARNING: Subroutine does not return */
  var_9();
}


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

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

undefined4 MASKED(char *param_1,int param_2)

{
  int iVar1;
  undefined4 uVar2;
  int in_GS_OFFSET;
  glob64_t local_a4;
  stat64 local_80;
  int local_20;
  undefined4 uStack_14;
  
  uVar2 = 1;
  uStack_14 = 0x6a98e;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  iVar1 = __xstat64(3,param_1,&local_80);
  if ((iVar1 != 0) && (uVar2 = 0, param_2 == 0)) {
    iVar1 = glob64(param_1,1,(__errfunc *)0x0,&local_a4);
    if (iVar1 == 0) {
      uVar2 = 0;
      if (local_a4.gl_pathc != 0) {
        uVar2 = 2;
      }
      globfree64(&local_a4);
    }
    else {
      uVar2 = 0;
    }
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return uVar2;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0006f2a0();
}

