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

bfd_boolean
ldfile_open_file_search(char *arch,lang_input_statement_type *entry,char *lib,char *suffix)

{
  search_dirs_type *search;
  byte bVar1;
  bfd_boolean bVar2;
  char *pcVar3;
  
  search = search_head;
  if (((ulonglong)entry->flags & 1) == 0) {
    pcVar3 = entry->filename;
    if ((((ulonglong)entry->flags & 8) == 0) || (*pcVar3 != '/')) {
      bVar2 = ldfile_try_open_bfd(pcVar3,entry);
      if (bVar2 != 0) {
        return 1;
      }
    }
    else {
      pcVar3 = (char *)concat(ld_sysroot,pcVar3,0);
      bVar2 = ldfile_try_open_bfd(pcVar3,entry);
      if (bVar2 != 0) {
        entry->filename = pcVar3;
        return 1;
      }
      free(pcVar3);
    }
    search = search_head;
    if (*entry->filename == '/') {
      return 0;
    }
  }
  while( true ) {
    if (search == (search_dirs_type *)0x0) {
      return 0;
    }
    bVar1 = *(byte *)&entry->flags;
    if (((bVar1 & 0x20) != 0) && ((link_info._0_1_ & 3) != 2)) {
      bVar2 = ldemul_open_dynamic_archive(arch,search,entry);
      if (bVar2 != 0) {
        return 1;
      }
      bVar1 = *(byte *)&entry->flags;
    }
    if ((bVar1 & 3) == 1) {
      pcVar3 = (char *)concat(search->name,"/",lib,entry->filename,arch,suffix,0);
    }
    else {
      pcVar3 = (char *)concat(search->name,"/",entry->filename,0);
    }
    bVar2 = ldfile_try_open_bfd(pcVar3,entry);
    if (bVar2 != 0) break;
    free(pcVar3);
    search = search->next;
  }
  entry->filename = pcVar3;
  return 1;
}



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

undefined4 FUN_000347e0(undefined4 param_1,int param_2,undefined4 param_3,undefined4 param_4)

{
  char *pcVar1;
  undefined4 *puVar2;
  byte bVar3;
  int iVar4;
  void *pvVar5;
  
  puVar2 = DAT_0013d8e4;
  if ((*(byte *)(param_2 + 0x24) & 1) == 0) {
    pcVar1 = *(char **)(param_2 + 8);
    if (((*(byte *)(param_2 + 0x24) & 8) == 0) || (*pcVar1 != '/')) {
      iVar4 = FUN_000341a0(pcVar1,param_2);
      if (iVar4 != 0) {
        return 1;
      }
    }
    else {
      pvVar5 = (void *)concat(DAT_0013d75c,pcVar1,0);
      iVar4 = FUN_000341a0(pvVar5,param_2);
      if (iVar4 != 0) {
        *(void **)(param_2 + 8) = pvVar5;
        return 1;
      }
      free(pvVar5);
    }
    puVar2 = DAT_0013d8e4;
    if (**(char **)(param_2 + 8) == '/') {
      return 0;
    }
  }
  while( true ) {
    if (puVar2 == (undefined4 *)0x0) {
      return 0;
    }
    bVar3 = *(byte *)(param_2 + 0x24);
    if (((bVar3 & 0x20) != 0) && ((DAT_0013d6c0 & 3) != 2)) {
      iVar4 = FUN_00032530(param_1,puVar2,param_2);
      if (iVar4 != 0) {
        return 1;
      }
      bVar3 = *(byte *)(param_2 + 0x24);
    }
    if ((bVar3 & 3) == 1) {
      pvVar5 = (void *)concat(puVar2[1],"/",param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);
    }
    else {
      pvVar5 = (void *)concat(puVar2[1],"/",*(undefined4 *)(param_2 + 8),0);
    }
    iVar4 = FUN_000341a0(pvVar5,param_2);
    if (iVar4 != 0) break;
    free(pvVar5);
    puVar2 = (undefined4 *)*puVar2;
  }
  *(void **)(param_2 + 8) = pvVar5;
  return 1;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00016a30
ADD EBX,0x107817
SUB ESP,0x1c
MOV EDI,dword ptr [ESP + 0x34]
MOVZX EAX,byte ptr [EDI + 0x24]
TEST AL,0x1
JNZ 0x0003482f
MOV EDX,dword ptr [EDI + 0x8]
TEST AL,0x8
JZ 0x0003480e
CMP byte ptr [EDX],0x2f
JZ 0x0003491a
SUB ESP,0x8
PUSH EDI
PUSH EDX
CALL 0x000341a0
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x00034903
MOV EAX,dword ptr [EDI + 0x8]
CMP byte ptr [EAX],0x2f
JZ 0x00034910
LEA EAX,[EBX + 0x18e4]
MOV ESI,dword ptr [EAX]
LEA EAX,[EBX + 0x16c0]
MOV dword ptr [ESP + 0xc],EAX
LEA EAX,[EBX + 0xfff25f8a]
MOV dword ptr [ESP + 0x4],EAX
TEST ESI,ESI
JNZ 0x00034891
JMP 0x00034910
PUSH 0x0
PUSH ECX
PUSH dword ptr [ESP + 0xc]
PUSH EDX
CALL 0x000153f0
ADD ESP,0x10
MOV EBP,EAX
SUB ESP,0x8
PUSH EDI
PUSH EBP
CALL 0x000341a0
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x00034900
SUB ESP,0xc
PUSH EBP
CALL 0x00015c60
MOV ESI,dword ptr [ESI]
ADD ESP,0x10
TEST ESI,ESI
JZ 0x00034910
MOVZX EAX,byte ptr [EDI + 0x24]
TEST AL,0x20
JZ 0x000348c7
MOV ECX,dword ptr [ESP + 0xc]
MOVZX ECX,byte ptr [ECX]
MOV EDX,ECX
MOV byte ptr [ESP + 0xb],CL
AND EDX,0x3
CMP DL,0x2
JZ 0x000348c7
SUB ESP,0x4
PUSH EDI
PUSH ESI
PUSH dword ptr [ESP + 0x3c]
CALL 0x00032530
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x00034903
MOVZX EAX,byte ptr [EDI + 0x24]
AND EAX,0x3
MOV ECX,dword ptr [EDI + 0x8]
MOV EDX,dword ptr [ESI + 0x4]
CMP AL,0x1
JNZ 0x00034858
SUB ESP,0x4
PUSH 0x0
PUSH dword ptr [ESP + 0x44]
PUSH dword ptr [ESP + 0x3c]
PUSH ECX
PUSH dword ptr [ESP + 0x4c]
PUSH dword ptr [ESP + 0x1c]
PUSH EDX
CALL 0x000153f0
ADD ESP,0x20
MOV EBP,EAX
JMP 0x0003486a
MOV dword ptr [EDI + 0x8],EBP
MOV EAX,0x1
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
ADD ESP,0x1c
XOR EAX,EAX
POP EBX
POP ESI
POP EDI
POP EBP
RET
LEA EAX,[EBX + 0x175c]
SUB ESP,0x4
PUSH 0x0
PUSH EDX
PUSH dword ptr [EAX]
CALL 0x000153f0
MOV ESI,EAX
POP EAX
POP EDX
PUSH EDI
PUSH ESI
CALL 0x000341a0
ADD ESP,0x10
TEST EAX,EAX
JZ 0x00034949
MOV dword ptr [EDI + 0x8],ESI
MOV EAX,0x1
JMP 0x00034908
SUB ESP,0xc
PUSH ESI
CALL 0x00015c60
ADD ESP,0x10
JMP 0x00034823
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 FUN_000347e0(undefined4 param_1,int param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  char *pcVar1;\n  undefined4 *puVar2;\n  byte bVar3;\n  int iVar4;\n  void *pvVar5;\n  \n  puVar2 = DAT_0013d8e4;\n  if ((*(byte *)(param_2 + 0x24) & 1) == 0) {\n    pcVar1 = *(char **)(param_2 + 8);\n    if (((*(byte *)(param_2 + 0x24) & 8) == 0) || (*pcVar1 != '/')) {\n      iVar4 = FUN_000341a0(pcVar1,param_2);\n      if (iVar4 != 0) {\n        return 1;\n      }\n    }\n    else {\n      pvVar5 = (void *)concat(DAT_0013d75c,pcVar1,0);\n      iVar4 = FUN_000341a0(pvVar5,param_2);\n      if (iVar4 != 0) {\n        *(void **)(param_2 + 8) = pvVar5;\n        return 1;\n      }\n      free(pvVar5);\n    }\n    puVar2 = DAT_0013d8e4;\n    if (**(char **)(param_2 + 8) == '/') {\n      return 0;\n    }\n  }\n  while( true ) {\n    if (puVar2 == (undefined4 *)0x0) {\n      return 0;\n    }\n    bVar3 = *(byte *)(param_2 + 0x24);\n    if (((bVar3 & 0x20) != 0) && ((DAT_0013d6c0 & 3) != 2)) {\n      iVar4 = FUN_00032530(param_1,puVar2,param_2);\n      if (iVar4 != 0) {\n        return 1;\n      }\n      bVar3 = *(byte *)(param_2 + 0x24);\n    }\n    if ((bVar3 & 3) == 1) {\n      pvVar5 = (void *)concat(puVar2[1],"/",param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n    }\n    else {\n      pvVar5 = (void *)concat(puVar2[1],"/",*(undefined4 *)(param_2 + 8),0);\n    }\n    iVar4 = FUN_000341a0(pvVar5,param_2);\n    if (iVar4 != 0) break;\n    free(pvVar5);\n    puVar2 = (undefined4 *)*puVar2;\n  }\n  *(void **)(param_2 + 8) = pvVar5;\n  return 1;\n}\n\n" comment (function_definition "undefined4 FUN_000347e0(undefined4 param_1,int param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  char *pcVar1;\n  undefined4 *puVar2;\n  byte bVar3;\n  int iVar4;\n  void *pvVar5;\n  \n  puVar2 = DAT_0013d8e4;\n  if ((*(byte *)(param_2 + 0x24) & 1) == 0) {\n    pcVar1 = *(char **)(param_2 + 8);\n    if (((*(byte *)(param_2 + 0x24) & 8) == 0) || (*pcVar1 != '/')) {\n      iVar4 = FUN_000341a0(pcVar1,param_2);\n      if (iVar4 != 0) {\n        return 1;\n      }\n    }\n    else {\n      pvVar5 = (void *)concat(DAT_0013d75c,pcVar1,0);\n      iVar4 = FUN_000341a0(pvVar5,param_2);\n      if (iVar4 != 0) {\n        *(void **)(param_2 + 8) = pvVar5;\n        return 1;\n      }\n      free(pvVar5);\n    }\n    puVar2 = DAT_0013d8e4;\n    if (**(char **)(param_2 + 8) == '/') {\n      return 0;\n    }\n  }\n  while( true ) {\n    if (puVar2 == (undefined4 *)0x0) {\n      return 0;\n    }\n    bVar3 = *(byte *)(param_2 + 0x24);\n    if (((bVar3 & 0x20) != 0) && ((DAT_0013d6c0 & 3) != 2)) {\n      iVar4 = FUN_00032530(param_1,puVar2,param_2);\n      if (iVar4 != 0) {\n        return 1;\n      }\n      bVar3 = *(byte *)(param_2 + 0x24);\n    }\n    if ((bVar3 & 3) == 1) {\n      pvVar5 = (void *)concat(puVar2[1],"/",param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n    }\n    else {\n      pvVar5 = (void *)concat(puVar2[1],"/",*(undefined4 *)(param_2 + 8),0);\n    }\n    iVar4 = FUN_000341a0(pvVar5,param_2);\n    if (iVar4 != 0) break;\n    free(pvVar5);\n    puVar2 = (undefined4 *)*puVar2;\n  }\n  *(void **)(param_2 + 8) = pvVar5;\n  return 1;\n}" type_identifier (function_declarator "FUN_000347e0(undefined4 param_1,int param_2,undefined4 param_3,undefined4 param_4)" identifier (parameter_list "(undefined4 param_1,int param_2,undefined4 param_3,undefined4 param_4)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) ))) (compound_statement "{\n  char *pcVar1;\n  undefined4 *puVar2;\n  byte bVar3;\n  int iVar4;\n  void *pvVar5;\n  \n  puVar2 = DAT_0013d8e4;\n  if ((*(byte *)(param_2 + 0x24) & 1) == 0) {\n    pcVar1 = *(char **)(param_2 + 8);\n    if (((*(byte *)(param_2 + 0x24) & 8) == 0) || (*pcVar1 != '/')) {\n      iVar4 = FUN_000341a0(pcVar1,param_2);\n      if (iVar4 != 0) {\n        return 1;\n      }\n    }\n    else {\n      pvVar5 = (void *)concat(DAT_0013d75c,pcVar1,0);\n      iVar4 = FUN_000341a0(pvVar5,param_2);\n      if (iVar4 != 0) {\n        *(void **)(param_2 + 8) = pvVar5;\n        return 1;\n      }\n      free(pvVar5);\n    }\n    puVar2 = DAT_0013d8e4;\n    if (**(char **)(param_2 + 8) == '/') {\n      return 0;\n    }\n  }\n  while( true ) {\n    if (puVar2 == (undefined4 *)0x0) {\n      return 0;\n    }\n    bVar3 = *(byte *)(param_2 + 0x24);\n    if (((bVar3 & 0x20) != 0) && ((DAT_0013d6c0 & 3) != 2)) {\n      iVar4 = FUN_00032530(param_1,puVar2,param_2);\n      if (iVar4 != 0) {\n        return 1;\n      }\n      bVar3 = *(byte *)(param_2 + 0x24);\n    }\n    if ((bVar3 & 3) == 1) {\n      pvVar5 = (void *)concat(puVar2[1],"/",param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n    }\n    else {\n      pvVar5 = (void *)concat(puVar2[1],"/",*(undefined4 *)(param_2 + 8),0);\n    }\n    iVar4 = FUN_000341a0(pvVar5,param_2);\n    if (iVar4 != 0) break;\n    free(pvVar5);\n    puVar2 = (undefined4 *)*puVar2;\n  }\n  *(void **)(param_2 + 8) = pvVar5;\n  return 1;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "byte bVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "void *pvVar5;" primitive_type (pointer_declarator "*pvVar5" * identifier) ;) (expression_statement "puVar2 = DAT_0013d8e4;" (assignment_expression "puVar2 = DAT_0013d8e4" identifier = identifier) ;) (if_statement "if ((*(byte *)(param_2 + 0x24) & 1) == 0) {\n    pcVar1 = *(char **)(param_2 + 8);\n    if (((*(byte *)(param_2 + 0x24) & 8) == 0) || (*pcVar1 != '/')) {\n      iVar4 = FUN_000341a0(pcVar1,param_2);\n      if (iVar4 != 0) {\n        return 1;\n      }\n    }\n    else {\n      pvVar5 = (void *)concat(DAT_0013d75c,pcVar1,0);\n      iVar4 = FUN_000341a0(pvVar5,param_2);\n      if (iVar4 != 0) {\n        *(void **)(param_2 + 8) = pvVar5;\n        return 1;\n      }\n      free(pvVar5);\n    }\n    puVar2 = DAT_0013d8e4;\n    if (**(char **)(param_2 + 8) == '/') {\n      return 0;\n    }\n  }" if (parenthesized_expression "((*(byte *)(param_2 + 0x24) & 1) == 0)" ( (binary_expression "(*(byte *)(param_2 + 0x24) & 1) == 0" (parenthesized_expression "(*(byte *)(param_2 + 0x24) & 1)" ( (binary_expression "*(byte *)(param_2 + 0x24) & 1" (pointer_expression "*(byte *)(param_2 + 0x24)" * (cast_expression "(byte *)(param_2 + 0x24)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x24)" ( (binary_expression "param_2 + 0x24" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n    pcVar1 = *(char **)(param_2 + 8);\n    if (((*(byte *)(param_2 + 0x24) & 8) == 0) || (*pcVar1 != '/')) {\n      iVar4 = FUN_000341a0(pcVar1,param_2);\n      if (iVar4 != 0) {\n        return 1;\n      }\n    }\n    else {\n      pvVar5 = (void *)concat(DAT_0013d75c,pcVar1,0);\n      iVar4 = FUN_000341a0(pvVar5,param_2);\n      if (iVar4 != 0) {\n        *(void **)(param_2 + 8) = pvVar5;\n        return 1;\n      }\n      free(pvVar5);\n    }\n    puVar2 = DAT_0013d8e4;\n    if (**(char **)(param_2 + 8) == '/') {\n      return 0;\n    }\n  }" { (expression_statement "pcVar1 = *(char **)(param_2 + 8);" (assignment_expression "pcVar1 = *(char **)(param_2 + 8)" identifier = (pointer_expression "*(char **)(param_2 + 8)" * (cast_expression "(char **)(param_2 + 8)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) ))))) ;) (if_statement "if (((*(byte *)(param_2 + 0x24) & 8) == 0) || (*pcVar1 != '/')) {\n      iVar4 = FUN_000341a0(pcVar1,param_2);\n      if (iVar4 != 0) {\n        return 1;\n      }\n    }\n    else {\n      pvVar5 = (void *)concat(DAT_0013d75c,pcVar1,0);\n      iVar4 = FUN_000341a0(pvVar5,param_2);\n      if (iVar4 != 0) {\n        *(void **)(param_2 + 8) = pvVar5;\n        return 1;\n      }\n      free(pvVar5);\n    }" if (parenthesized_expression "(((*(byte *)(param_2 + 0x24) & 8) == 0) || (*pcVar1 != '/'))" ( (binary_expression "((*(byte *)(param_2 + 0x24) & 8) == 0) || (*pcVar1 != '/')" (parenthesized_expression "((*(byte *)(param_2 + 0x24) & 8) == 0)" ( (binary_expression "(*(byte *)(param_2 + 0x24) & 8) == 0" (parenthesized_expression "(*(byte *)(param_2 + 0x24) & 8)" ( (binary_expression "*(byte *)(param_2 + 0x24) & 8" (pointer_expression "*(byte *)(param_2 + 0x24)" * (cast_expression "(byte *)(param_2 + 0x24)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x24)" ( (binary_expression "param_2 + 0x24" identifier + number_literal) )))) & number_literal) )) == number_literal) )) || (parenthesized_expression "(*pcVar1 != '/')" ( (binary_expression "*pcVar1 != '/'" (pointer_expression "*pcVar1" * identifier) != (char_literal "'/'" ' character ')) ))) )) (compound_statement "{\n      iVar4 = FUN_000341a0(pcVar1,param_2);\n      if (iVar4 != 0) {\n        return 1;\n      }\n    }" { (expression_statement "iVar4 = FUN_000341a0(pcVar1,param_2);" (assignment_expression "iVar4 = FUN_000341a0(pcVar1,param_2)" identifier = (call_expression "FUN_000341a0(pcVar1,param_2)" identifier (argument_list "(pcVar1,param_2)" ( identifier , identifier )))) ;) (if_statement "if (iVar4 != 0) {\n        return 1;\n      }" if (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) (compound_statement "{\n        return 1;\n      }" { (return_statement "return 1;" return number_literal ;) })) }) (else_clause "else {\n      pvVar5 = (void *)concat(DAT_0013d75c,pcVar1,0);\n      iVar4 = FUN_000341a0(pvVar5,param_2);\n      if (iVar4 != 0) {\n        *(void **)(param_2 + 8) = pvVar5;\n        return 1;\n      }\n      free(pvVar5);\n    }" else (compound_statement "{\n      pvVar5 = (void *)concat(DAT_0013d75c,pcVar1,0);\n      iVar4 = FUN_000341a0(pvVar5,param_2);\n      if (iVar4 != 0) {\n        *(void **)(param_2 + 8) = pvVar5;\n        return 1;\n      }\n      free(pvVar5);\n    }" { (expression_statement "pvVar5 = (void *)concat(DAT_0013d75c,pcVar1,0);" (assignment_expression "pvVar5 = (void *)concat(DAT_0013d75c,pcVar1,0)" identifier = (cast_expression "(void *)concat(DAT_0013d75c,pcVar1,0)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "concat(DAT_0013d75c,pcVar1,0)" identifier (argument_list "(DAT_0013d75c,pcVar1,0)" ( identifier , identifier , number_literal ))))) ;) (expression_statement "iVar4 = FUN_000341a0(pvVar5,param_2);" (assignment_expression "iVar4 = FUN_000341a0(pvVar5,param_2)" identifier = (call_expression "FUN_000341a0(pvVar5,param_2)" identifier (argument_list "(pvVar5,param_2)" ( identifier , identifier )))) ;) (if_statement "if (iVar4 != 0) {\n        *(void **)(param_2 + 8) = pvVar5;\n        return 1;\n      }" if (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) (compound_statement "{\n        *(void **)(param_2 + 8) = pvVar5;\n        return 1;\n      }" { (expression_statement "*(void **)(param_2 + 8) = pvVar5;" (assignment_expression "*(void **)(param_2 + 8) = pvVar5" (pointer_expression "*(void **)(param_2 + 8)" * (cast_expression "(void **)(param_2 + 8)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) )))) = identifier) ;) (return_statement "return 1;" return number_literal ;) })) (expression_statement "free(pvVar5);" (call_expression "free(pvVar5)" identifier (argument_list "(pvVar5)" ( identifier ))) ;) }))) (expression_statement "puVar2 = DAT_0013d8e4;" (assignment_expression "puVar2 = DAT_0013d8e4" identifier = identifier) ;) (if_statement "if (**(char **)(param_2 + 8) == '/') {\n      return 0;\n    }" if (parenthesized_expression "(**(char **)(param_2 + 8) == '/')" ( (binary_expression "**(char **)(param_2 + 8) == '/'" (pointer_expression "**(char **)(param_2 + 8)" * (pointer_expression "*(char **)(param_2 + 8)" * (cast_expression "(char **)(param_2 + 8)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) ))))) == (char_literal "'/'" ' character ')) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) })) (while_statement "while( true ) {\n    if (puVar2 == (undefined4 *)0x0) {\n      return 0;\n    }\n    bVar3 = *(byte *)(param_2 + 0x24);\n    if (((bVar3 & 0x20) != 0) && ((DAT_0013d6c0 & 3) != 2)) {\n      iVar4 = FUN_00032530(param_1,puVar2,param_2);\n      if (iVar4 != 0) {\n        return 1;\n      }\n      bVar3 = *(byte *)(param_2 + 0x24);\n    }\n    if ((bVar3 & 3) == 1) {\n      pvVar5 = (void *)concat(puVar2[1],"/",param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n    }\n    else {\n      pvVar5 = (void *)concat(puVar2[1],"/",*(undefined4 *)(param_2 + 8),0);\n    }\n    iVar4 = FUN_000341a0(pvVar5,param_2);\n    if (iVar4 != 0) break;\n    free(pvVar5);\n    puVar2 = (undefined4 *)*puVar2;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    if (puVar2 == (undefined4 *)0x0) {\n      return 0;\n    }\n    bVar3 = *(byte *)(param_2 + 0x24);\n    if (((bVar3 & 0x20) != 0) && ((DAT_0013d6c0 & 3) != 2)) {\n      iVar4 = FUN_00032530(param_1,puVar2,param_2);\n      if (iVar4 != 0) {\n        return 1;\n      }\n      bVar3 = *(byte *)(param_2 + 0x24);\n    }\n    if ((bVar3 & 3) == 1) {\n      pvVar5 = (void *)concat(puVar2[1],"/",param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n    }\n    else {\n      pvVar5 = (void *)concat(puVar2[1],"/",*(undefined4 *)(param_2 + 8),0);\n    }\n    iVar4 = FUN_000341a0(pvVar5,param_2);\n    if (iVar4 != 0) break;\n    free(pvVar5);\n    puVar2 = (undefined4 *)*puVar2;\n  }" { (if_statement "if (puVar2 == (undefined4 *)0x0) {\n      return 0;\n    }" if (parenthesized_expression "(puVar2 == (undefined4 *)0x0)" ( (binary_expression "puVar2 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "bVar3 = *(byte *)(param_2 + 0x24);" (assignment_expression "bVar3 = *(byte *)(param_2 + 0x24)" identifier = (pointer_expression "*(byte *)(param_2 + 0x24)" * (cast_expression "(byte *)(param_2 + 0x24)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x24)" ( (binary_expression "param_2 + 0x24" identifier + number_literal) ))))) ;) (if_statement "if (((bVar3 & 0x20) != 0) && ((DAT_0013d6c0 & 3) != 2)) {\n      iVar4 = FUN_00032530(param_1,puVar2,param_2);\n      if (iVar4 != 0) {\n        return 1;\n      }\n      bVar3 = *(byte *)(param_2 + 0x24);\n    }" if (parenthesized_expression "(((bVar3 & 0x20) != 0) && ((DAT_0013d6c0 & 3) != 2))" ( (binary_expression "((bVar3 & 0x20) != 0) && ((DAT_0013d6c0 & 3) != 2)" (parenthesized_expression "((bVar3 & 0x20) != 0)" ( (binary_expression "(bVar3 & 0x20) != 0" (parenthesized_expression "(bVar3 & 0x20)" ( (binary_expression "bVar3 & 0x20" identifier & number_literal) )) != number_literal) )) && (parenthesized_expression "((DAT_0013d6c0 & 3) != 2)" ( (binary_expression "(DAT_0013d6c0 & 3) != 2" (parenthesized_expression "(DAT_0013d6c0 & 3)" ( (binary_expression "DAT_0013d6c0 & 3" identifier & number_literal) )) != number_literal) ))) )) (compound_statement "{\n      iVar4 = FUN_00032530(param_1,puVar2,param_2);\n      if (iVar4 != 0) {\n        return 1;\n      }\n      bVar3 = *(byte *)(param_2 + 0x24);\n    }" { (expression_statement "iVar4 = FUN_00032530(param_1,puVar2,param_2);" (assignment_expression "iVar4 = FUN_00032530(param_1,puVar2,param_2)" identifier = (call_expression "FUN_00032530(param_1,puVar2,param_2)" identifier (argument_list "(param_1,puVar2,param_2)" ( identifier , identifier , identifier )))) ;) (if_statement "if (iVar4 != 0) {\n        return 1;\n      }" if (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) (compound_statement "{\n        return 1;\n      }" { (return_statement "return 1;" return number_literal ;) })) (expression_statement "bVar3 = *(byte *)(param_2 + 0x24);" (assignment_expression "bVar3 = *(byte *)(param_2 + 0x24)" identifier = (pointer_expression "*(byte *)(param_2 + 0x24)" * (cast_expression "(byte *)(param_2 + 0x24)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x24)" ( (binary_expression "param_2 + 0x24" identifier + number_literal) ))))) ;) })) (if_statement "if ((bVar3 & 3) == 1) {\n      pvVar5 = (void *)concat(puVar2[1],"/",param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n    }\n    else {\n      pvVar5 = (void *)concat(puVar2[1],"/",*(undefined4 *)(param_2 + 8),0);\n    }" if (parenthesized_expression "((bVar3 & 3) == 1)" ( (binary_expression "(bVar3 & 3) == 1" (parenthesized_expression "(bVar3 & 3)" ( (binary_expression "bVar3 & 3" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n      pvVar5 = (void *)concat(puVar2[1],"/",param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n    }" { (expression_statement "pvVar5 = (void *)concat(puVar2[1],"/",param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);" (assignment_expression "pvVar5 = (void *)concat(puVar2[1],"/",param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0)" identifier = (cast_expression "(void *)concat(puVar2[1],"/",param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "concat(puVar2[1],"/",param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0)" identifier (argument_list "(puVar2[1],"/",param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0)" ( (subscript_expression "puVar2[1]" identifier [ number_literal ]) , (string_literal ""/"" " string_content ") , identifier , (pointer_expression "*(undefined4 *)(param_2 + 8)" * (cast_expression "(undefined4 *)(param_2 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) )))) , identifier , identifier , number_literal ))))) ;) }) (else_clause "else {\n      pvVar5 = (void *)concat(puVar2[1],"/",*(undefined4 *)(param_2 + 8),0);\n    }" else (compound_statement "{\n      pvVar5 = (void *)concat(puVar2[1],"/",*(undefined4 *)(param_2 + 8),0);\n    }" { (expression_statement "pvVar5 = (void *)concat(puVar2[1],"/",*(undefined4 *)(param_2 + 8),0);" (assignment_expression "pvVar5 = (void *)concat(puVar2[1],"/",*(undefined4 *)(param_2 + 8),0)" identifier = (cast_expression "(void *)concat(puVar2[1],"/",*(undefined4 *)(param_2 + 8),0)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "concat(puVar2[1],"/",*(undefined4 *)(param_2 + 8),0)" identifier (argument_list "(puVar2[1],"/",*(undefined4 *)(param_2 + 8),0)" ( (subscript_expression "puVar2[1]" identifier [ number_literal ]) , (string_literal ""/"" " string_content ") , (pointer_expression "*(undefined4 *)(param_2 + 8)" * (cast_expression "(undefined4 *)(param_2 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) )))) , number_literal ))))) ;) }))) (expression_statement "iVar4 = FUN_000341a0(pvVar5,param_2);" (assignment_expression "iVar4 = FUN_000341a0(pvVar5,param_2)" identifier = (call_expression "FUN_000341a0(pvVar5,param_2)" identifier (argument_list "(pvVar5,param_2)" ( identifier , identifier )))) ;) (if_statement "if (iVar4 != 0) break;" if (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) (break_statement "break;" break ;)) (expression_statement "free(pvVar5);" (call_expression "free(pvVar5)" identifier (argument_list "(pvVar5)" ( identifier ))) ;) (expression_statement "puVar2 = (undefined4 *)*puVar2;" (assignment_expression "puVar2 = (undefined4 *)*puVar2" identifier = (cast_expression "(undefined4 *)*puVar2" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar2" * identifier))) ;) })) (expression_statement "*(void **)(param_2 + 8) = pvVar5;" (assignment_expression "*(void **)(param_2 + 8) = pvVar5" (pointer_expression "*(void **)(param_2 + 8)" * (cast_expression "(void **)(param_2 + 8)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) )))) = identifier) ;) (return_statement "return 1;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nbfd_boolean\nldfile_open_file_search(char *arch,lang_input_statement_type *entry,char *lib,char *suffix)\n\n{\n  search_dirs_type *search;\n  byte bVar1;\n  bfd_boolean bVar2;\n  char *pcVar3;\n  \n  search = search_head;\n  if (((ulonglong)entry->flags & 1) == 0) {\n    pcVar3 = entry->filename;\n    if ((((ulonglong)entry->flags & 8) == 0) || (*pcVar3 != '/')) {\n      bVar2 = ldfile_try_open_bfd(pcVar3,entry);\n      if (bVar2 != 0) {\n        return 1;\n      }\n    }\n    else {\n      pcVar3 = (char *)concat(ld_sysroot,pcVar3,0);\n      bVar2 = ldfile_try_open_bfd(pcVar3,entry);\n      if (bVar2 != 0) {\n        entry->filename = pcVar3;\n        return 1;\n      }\n      free(pcVar3);\n    }\n    search = search_head;\n    if (*entry->filename == '/') {\n      return 0;\n    }\n  }\n  while( true ) {\n    if (search == (search_dirs_type *)0x0) {\n      return 0;\n    }\n    bVar1 = *(byte *)&entry->flags;\n    if (((bVar1 & 0x20) != 0) && ((link_info._0_1_ & 3) != 2)) {\n      bVar2 = ldemul_open_dynamic_archive(arch,search,entry);\n      if (bVar2 != 0) {\n        return 1;\n      }\n      bVar1 = *(byte *)&entry->flags;\n    }\n    if ((bVar1 & 3) == 1) {\n      pcVar3 = (char *)concat(search->name,"/",lib,entry->filename,arch,suffix,0);\n    }\n    else {\n      pcVar3 = (char *)concat(search->name,"/",entry->filename,0);\n    }\n    bVar2 = ldfile_try_open_bfd(pcVar3,entry);\n    if (bVar2 != 0) break;\n    free(pcVar3);\n    search = search->next;\n  }\n  entry->filename = pcVar3;\n  return 1;\n}\n\n" comment comment (function_definition "bfd_boolean\nldfile_open_file_search(char *arch,lang_input_statement_type *entry,char *lib,char *suffix)\n\n{\n  search_dirs_type *search;\n  byte bVar1;\n  bfd_boolean bVar2;\n  char *pcVar3;\n  \n  search = search_head;\n  if (((ulonglong)entry->flags & 1) == 0) {\n    pcVar3 = entry->filename;\n    if ((((ulonglong)entry->flags & 8) == 0) || (*pcVar3 != '/')) {\n      bVar2 = ldfile_try_open_bfd(pcVar3,entry);\n      if (bVar2 != 0) {\n        return 1;\n      }\n    }\n    else {\n      pcVar3 = (char *)concat(ld_sysroot,pcVar3,0);\n      bVar2 = ldfile_try_open_bfd(pcVar3,entry);\n      if (bVar2 != 0) {\n        entry->filename = pcVar3;\n        return 1;\n      }\n      free(pcVar3);\n    }\n    search = search_head;\n    if (*entry->filename == '/') {\n      return 0;\n    }\n  }\n  while( true ) {\n    if (search == (search_dirs_type *)0x0) {\n      return 0;\n    }\n    bVar1 = *(byte *)&entry->flags;\n    if (((bVar1 & 0x20) != 0) && ((link_info._0_1_ & 3) != 2)) {\n      bVar2 = ldemul_open_dynamic_archive(arch,search,entry);\n      if (bVar2 != 0) {\n        return 1;\n      }\n      bVar1 = *(byte *)&entry->flags;\n    }\n    if ((bVar1 & 3) == 1) {\n      pcVar3 = (char *)concat(search->name,"/",lib,entry->filename,arch,suffix,0);\n    }\n    else {\n      pcVar3 = (char *)concat(search->name,"/",entry->filename,0);\n    }\n    bVar2 = ldfile_try_open_bfd(pcVar3,entry);\n    if (bVar2 != 0) break;\n    free(pcVar3);\n    search = search->next;\n  }\n  entry->filename = pcVar3;\n  return 1;\n}" type_identifier (function_declarator "ldfile_open_file_search(char *arch,lang_input_statement_type *entry,char *lib,char *suffix)" identifier (parameter_list "(char *arch,lang_input_statement_type *entry,char *lib,char *suffix)" ( (parameter_declaration "char *arch" primitive_type (pointer_declarator "*arch" * identifier)) , (parameter_declaration "lang_input_statement_type *entry" type_identifier (pointer_declarator "*entry" * identifier)) , (parameter_declaration "char *lib" primitive_type (pointer_declarator "*lib" * identifier)) , (parameter_declaration "char *suffix" primitive_type (pointer_declarator "*suffix" * identifier)) ))) (compound_statement "{\n  search_dirs_type *search;\n  byte bVar1;\n  bfd_boolean bVar2;\n  char *pcVar3;\n  \n  search = search_head;\n  if (((ulonglong)entry->flags & 1) == 0) {\n    pcVar3 = entry->filename;\n    if ((((ulonglong)entry->flags & 8) == 0) || (*pcVar3 != '/')) {\n      bVar2 = ldfile_try_open_bfd(pcVar3,entry);\n      if (bVar2 != 0) {\n        return 1;\n      }\n    }\n    else {\n      pcVar3 = (char *)concat(ld_sysroot,pcVar3,0);\n      bVar2 = ldfile_try_open_bfd(pcVar3,entry);\n      if (bVar2 != 0) {\n        entry->filename = pcVar3;\n        return 1;\n      }\n      free(pcVar3);\n    }\n    search = search_head;\n    if (*entry->filename == '/') {\n      return 0;\n    }\n  }\n  while( true ) {\n    if (search == (search_dirs_type *)0x0) {\n      return 0;\n    }\n    bVar1 = *(byte *)&entry->flags;\n    if (((bVar1 & 0x20) != 0) && ((link_info._0_1_ & 3) != 2)) {\n      bVar2 = ldemul_open_dynamic_archive(arch,search,entry);\n      if (bVar2 != 0) {\n        return 1;\n      }\n      bVar1 = *(byte *)&entry->flags;\n    }\n    if ((bVar1 & 3) == 1) {\n      pcVar3 = (char *)concat(search->name,"/",lib,entry->filename,arch,suffix,0);\n    }\n    else {\n      pcVar3 = (char *)concat(search->name,"/",entry->filename,0);\n    }\n    bVar2 = ldfile_try_open_bfd(pcVar3,entry);\n    if (bVar2 != 0) break;\n    free(pcVar3);\n    search = search->next;\n  }\n  entry->filename = pcVar3;\n  return 1;\n}" { (declaration "search_dirs_type *search;" type_identifier (pointer_declarator "*search" * identifier) ;) (declaration "byte bVar1;" type_identifier identifier ;) (declaration "bfd_boolean bVar2;" type_identifier identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (expression_statement "search = search_head;" (assignment_expression "search = search_head" identifier = identifier) ;) (if_statement "if (((ulonglong)entry->flags & 1) == 0) {\n    pcVar3 = entry->filename;\n    if ((((ulonglong)entry->flags & 8) == 0) || (*pcVar3 != '/')) {\n      bVar2 = ldfile_try_open_bfd(pcVar3,entry);\n      if (bVar2 != 0) {\n        return 1;\n      }\n    }\n    else {\n      pcVar3 = (char *)concat(ld_sysroot,pcVar3,0);\n      bVar2 = ldfile_try_open_bfd(pcVar3,entry);\n      if (bVar2 != 0) {\n        entry->filename = pcVar3;\n        return 1;\n      }\n      free(pcVar3);\n    }\n    search = search_head;\n    if (*entry->filename == '/') {\n      return 0;\n    }\n  }" if (parenthesized_expression "(((ulonglong)entry->flags & 1) == 0)" ( (binary_expression "((ulonglong)entry->flags & 1) == 0" (parenthesized_expression "((ulonglong)entry->flags & 1)" ( (binary_expression "(ulonglong)entry->flags & 1" (cast_expression "(ulonglong)entry->flags" ( (type_descriptor "ulonglong" type_identifier) ) (field_expression "entry->flags" identifier -> field_identifier)) & number_literal) )) == number_literal) )) (compound_statement "{\n    pcVar3 = entry->filename;\n    if ((((ulonglong)entry->flags & 8) == 0) || (*pcVar3 != '/')) {\n      bVar2 = ldfile_try_open_bfd(pcVar3,entry);\n      if (bVar2 != 0) {\n        return 1;\n      }\n    }\n    else {\n      pcVar3 = (char *)concat(ld_sysroot,pcVar3,0);\n      bVar2 = ldfile_try_open_bfd(pcVar3,entry);\n      if (bVar2 != 0) {\n        entry->filename = pcVar3;\n        return 1;\n      }\n      free(pcVar3);\n    }\n    search = search_head;\n    if (*entry->filename == '/') {\n      return 0;\n    }\n  }" { (expression_statement "pcVar3 = entry->filename;" (assignment_expression "pcVar3 = entry->filename" identifier = (field_expression "entry->filename" identifier -> field_identifier)) ;) (if_statement "if ((((ulonglong)entry->flags & 8) == 0) || (*pcVar3 != '/')) {\n      bVar2 = ldfile_try_open_bfd(pcVar3,entry);\n      if (bVar2 != 0) {\n        return 1;\n      }\n    }\n    else {\n      pcVar3 = (char *)concat(ld_sysroot,pcVar3,0);\n      bVar2 = ldfile_try_open_bfd(pcVar3,entry);\n      if (bVar2 != 0) {\n        entry->filename = pcVar3;\n        return 1;\n      }\n      free(pcVar3);\n    }" if (parenthesized_expression "((((ulonglong)entry->flags & 8) == 0) || (*pcVar3 != '/'))" ( (binary_expression "(((ulonglong)entry->flags & 8) == 0) || (*pcVar3 != '/')" (parenthesized_expression "(((ulonglong)entry->flags & 8) == 0)" ( (binary_expression "((ulonglong)entry->flags & 8) == 0" (parenthesized_expression "((ulonglong)entry->flags & 8)" ( (binary_expression "(ulonglong)entry->flags & 8" (cast_expression "(ulonglong)entry->flags" ( (type_descriptor "ulonglong" type_identifier) ) (field_expression "entry->flags" identifier -> field_identifier)) & number_literal) )) == number_literal) )) || (parenthesized_expression "(*pcVar3 != '/')" ( (binary_expression "*pcVar3 != '/'" (pointer_expression "*pcVar3" * identifier) != (char_literal "'/'" ' character ')) ))) )) (compound_statement "{\n      bVar2 = ldfile_try_open_bfd(pcVar3,entry);\n      if (bVar2 != 0) {\n        return 1;\n      }\n    }" { (expression_statement "bVar2 = ldfile_try_open_bfd(pcVar3,entry);" (assignment_expression "bVar2 = ldfile_try_open_bfd(pcVar3,entry)" identifier = (call_expression "ldfile_try_open_bfd(pcVar3,entry)" identifier (argument_list "(pcVar3,entry)" ( identifier , identifier )))) ;) (if_statement "if (bVar2 != 0) {\n        return 1;\n      }" if (parenthesized_expression "(bVar2 != 0)" ( (binary_expression "bVar2 != 0" identifier != number_literal) )) (compound_statement "{\n        return 1;\n      }" { (return_statement "return 1;" return number_literal ;) })) }) (else_clause "else {\n      pcVar3 = (char *)concat(ld_sysroot,pcVar3,0);\n      bVar2 = ldfile_try_open_bfd(pcVar3,entry);\n      if (bVar2 != 0) {\n        entry->filename = pcVar3;\n        return 1;\n      }\n      free(pcVar3);\n    }" else (compound_statement "{\n      pcVar3 = (char *)concat(ld_sysroot,pcVar3,0);\n      bVar2 = ldfile_try_open_bfd(pcVar3,entry);\n      if (bVar2 != 0) {\n        entry->filename = pcVar3;\n        return 1;\n      }\n      free(pcVar3);\n    }" { (expression_statement "pcVar3 = (char *)concat(ld_sysroot,pcVar3,0);" (assignment_expression "pcVar3 = (char *)concat(ld_sysroot,pcVar3,0)" identifier = (cast_expression "(char *)concat(ld_sysroot,pcVar3,0)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "concat(ld_sysroot,pcVar3,0)" identifier (argument_list "(ld_sysroot,pcVar3,0)" ( identifier , identifier , number_literal ))))) ;) (expression_statement "bVar2 = ldfile_try_open_bfd(pcVar3,entry);" (assignment_expression "bVar2 = ldfile_try_open_bfd(pcVar3,entry)" identifier = (call_expression "ldfile_try_open_bfd(pcVar3,entry)" identifier (argument_list "(pcVar3,entry)" ( identifier , identifier )))) ;) (if_statement "if (bVar2 != 0) {\n        entry->filename = pcVar3;\n        return 1;\n      }" if (parenthesized_expression "(bVar2 != 0)" ( (binary_expression "bVar2 != 0" identifier != number_literal) )) (compound_statement "{\n        entry->filename = pcVar3;\n        return 1;\n      }" { (expression_statement "entry->filename = pcVar3;" (assignment_expression "entry->filename = pcVar3" (field_expression "entry->filename" identifier -> field_identifier) = identifier) ;) (return_statement "return 1;" return number_literal ;) })) (expression_statement "free(pcVar3);" (call_expression "free(pcVar3)" identifier (argument_list "(pcVar3)" ( identifier ))) ;) }))) (expression_statement "search = search_head;" (assignment_expression "search = search_head" identifier = identifier) ;) (if_statement "if (*entry->filename == '/') {\n      return 0;\n    }" if (parenthesized_expression "(*entry->filename == '/')" ( (binary_expression "*entry->filename == '/'" (pointer_expression "*entry->filename" * (field_expression "entry->filename" identifier -> field_identifier)) == (char_literal "'/'" ' character ')) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) })) (while_statement "while( true ) {\n    if (search == (search_dirs_type *)0x0) {\n      return 0;\n    }\n    bVar1 = *(byte *)&entry->flags;\n    if (((bVar1 & 0x20) != 0) && ((link_info._0_1_ & 3) != 2)) {\n      bVar2 = ldemul_open_dynamic_archive(arch,search,entry);\n      if (bVar2 != 0) {\n        return 1;\n      }\n      bVar1 = *(byte *)&entry->flags;\n    }\n    if ((bVar1 & 3) == 1) {\n      pcVar3 = (char *)concat(search->name,"/",lib,entry->filename,arch,suffix,0);\n    }\n    else {\n      pcVar3 = (char *)concat(search->name,"/",entry->filename,0);\n    }\n    bVar2 = ldfile_try_open_bfd(pcVar3,entry);\n    if (bVar2 != 0) break;\n    free(pcVar3);\n    search = search->next;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    if (search == (search_dirs_type *)0x0) {\n      return 0;\n    }\n    bVar1 = *(byte *)&entry->flags;\n    if (((bVar1 & 0x20) != 0) && ((link_info._0_1_ & 3) != 2)) {\n      bVar2 = ldemul_open_dynamic_archive(arch,search,entry);\n      if (bVar2 != 0) {\n        return 1;\n      }\n      bVar1 = *(byte *)&entry->flags;\n    }\n    if ((bVar1 & 3) == 1) {\n      pcVar3 = (char *)concat(search->name,"/",lib,entry->filename,arch,suffix,0);\n    }\n    else {\n      pcVar3 = (char *)concat(search->name,"/",entry->filename,0);\n    }\n    bVar2 = ldfile_try_open_bfd(pcVar3,entry);\n    if (bVar2 != 0) break;\n    free(pcVar3);\n    search = search->next;\n  }" { (if_statement "if (search == (search_dirs_type *)0x0) {\n      return 0;\n    }" if (parenthesized_expression "(search == (search_dirs_type *)0x0)" ( (binary_expression "search == (search_dirs_type *)0x0" identifier == (cast_expression "(search_dirs_type *)0x0" ( (type_descriptor "search_dirs_type *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "bVar1 = *(byte *)&entry->flags;" (assignment_expression "bVar1 = *(byte *)&entry->flags" identifier = (pointer_expression "*(byte *)&entry->flags" * (cast_expression "(byte *)&entry->flags" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&entry->flags" & (field_expression "entry->flags" identifier -> field_identifier))))) ;) (if_statement "if (((bVar1 & 0x20) != 0) && ((link_info._0_1_ & 3) != 2)) {\n      bVar2 = ldemul_open_dynamic_archive(arch,search,entry);\n      if (bVar2 != 0) {\n        return 1;\n      }\n      bVar1 = *(byte *)&entry->flags;\n    }" if (parenthesized_expression "(((bVar1 & 0x20) != 0) && ((link_info._0_1_ & 3) != 2))" ( (binary_expression "((bVar1 & 0x20) != 0) && ((link_info._0_1_ & 3) != 2)" (parenthesized_expression "((bVar1 & 0x20) != 0)" ( (binary_expression "(bVar1 & 0x20) != 0" (parenthesized_expression "(bVar1 & 0x20)" ( (binary_expression "bVar1 & 0x20" identifier & number_literal) )) != number_literal) )) && (parenthesized_expression "((link_info._0_1_ & 3) != 2)" ( (binary_expression "(link_info._0_1_ & 3) != 2" (parenthesized_expression "(link_info._0_1_ & 3)" ( (binary_expression "link_info._0_1_ & 3" (field_expression "link_info._0_1_" identifier . field_identifier) & number_literal) )) != number_literal) ))) )) (compound_statement "{\n      bVar2 = ldemul_open_dynamic_archive(arch,search,entry);\n      if (bVar2 != 0) {\n        return 1;\n      }\n      bVar1 = *(byte *)&entry->flags;\n    }" { (expression_statement "bVar2 = ldemul_open_dynamic_archive(arch,search,entry);" (assignment_expression "bVar2 = ldemul_open_dynamic_archive(arch,search,entry)" identifier = (call_expression "ldemul_open_dynamic_archive(arch,search,entry)" identifier (argument_list "(arch,search,entry)" ( identifier , identifier , identifier )))) ;) (if_statement "if (bVar2 != 0) {\n        return 1;\n      }" if (parenthesized_expression "(bVar2 != 0)" ( (binary_expression "bVar2 != 0" identifier != number_literal) )) (compound_statement "{\n        return 1;\n      }" { (return_statement "return 1;" return number_literal ;) })) (expression_statement "bVar1 = *(byte *)&entry->flags;" (assignment_expression "bVar1 = *(byte *)&entry->flags" identifier = (pointer_expression "*(byte *)&entry->flags" * (cast_expression "(byte *)&entry->flags" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&entry->flags" & (field_expression "entry->flags" identifier -> field_identifier))))) ;) })) (if_statement "if ((bVar1 & 3) == 1) {\n      pcVar3 = (char *)concat(search->name,"/",lib,entry->filename,arch,suffix,0);\n    }\n    else {\n      pcVar3 = (char *)concat(search->name,"/",entry->filename,0);\n    }" if (parenthesized_expression "((bVar1 & 3) == 1)" ( (binary_expression "(bVar1 & 3) == 1" (parenthesized_expression "(bVar1 & 3)" ( (binary_expression "bVar1 & 3" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n      pcVar3 = (char *)concat(search->name,"/",lib,entry->filename,arch,suffix,0);\n    }" { (expression_statement "pcVar3 = (char *)concat(search->name,"/",lib,entry->filename,arch,suffix,0);" (assignment_expression "pcVar3 = (char *)concat(search->name,"/",lib,entry->filename,arch,suffix,0)" identifier = (cast_expression "(char *)concat(search->name,"/",lib,entry->filename,arch,suffix,0)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "concat(search->name,"/",lib,entry->filename,arch,suffix,0)" identifier (argument_list "(search->name,"/",lib,entry->filename,arch,suffix,0)" ( (field_expression "search->name" identifier -> field_identifier) , (string_literal ""/"" " string_content ") , identifier , (field_expression "entry->filename" identifier -> field_identifier) , identifier , identifier , number_literal ))))) ;) }) (else_clause "else {\n      pcVar3 = (char *)concat(search->name,"/",entry->filename,0);\n    }" else (compound_statement "{\n      pcVar3 = (char *)concat(search->name,"/",entry->filename,0);\n    }" { (expression_statement "pcVar3 = (char *)concat(search->name,"/",entry->filename,0);" (assignment_expression "pcVar3 = (char *)concat(search->name,"/",entry->filename,0)" identifier = (cast_expression "(char *)concat(search->name,"/",entry->filename,0)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "concat(search->name,"/",entry->filename,0)" identifier (argument_list "(search->name,"/",entry->filename,0)" ( (field_expression "search->name" identifier -> field_identifier) , (string_literal ""/"" " string_content ") , (field_expression "entry->filename" identifier -> field_identifier) , number_literal ))))) ;) }))) (expression_statement "bVar2 = ldfile_try_open_bfd(pcVar3,entry);" (assignment_expression "bVar2 = ldfile_try_open_bfd(pcVar3,entry)" identifier = (call_expression "ldfile_try_open_bfd(pcVar3,entry)" identifier (argument_list "(pcVar3,entry)" ( identifier , identifier )))) ;) (if_statement "if (bVar2 != 0) break;" if (parenthesized_expression "(bVar2 != 0)" ( (binary_expression "bVar2 != 0" identifier != number_literal) )) (break_statement "break;" break ;)) (expression_statement "free(pcVar3);" (call_expression "free(pcVar3)" identifier (argument_list "(pcVar3)" ( identifier ))) ;) (expression_statement "search = search->next;" (assignment_expression "search = search->next" identifier = (field_expression "search->next" identifier -> field_identifier)) ;) })) (expression_statement "entry->filename = pcVar3;" (assignment_expression "entry->filename = pcVar3" (field_expression "entry->filename" identifier -> field_identifier) = identifier) ;) (return_statement "return 1;" return number_literal ;) })))
(translation_unit "undefined4 FUN_000347e0(undefined4 param_1,int param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  char *pcVar1;\n  undefined4 *puVar2;\n  byte bVar3;\n  int iVar4;\n  void *pvVar5;\n  \n  puVar2 = DAT_0013d8e4;\n  if ((*(byte *)(param_2 + 0x24) & 1) == 0) {\n    pcVar1 = *(char **)(param_2 + 8);\n    if (((*(byte *)(param_2 + 0x24) & 8) == 0) || (*pcVar1 != '/')) {\n      iVar4 = FUN_000341a0(pcVar1,param_2);\n      if (iVar4 != 0) {\n        return 1;\n      }\n    }\n    else {\n      pvVar5 = (void *)concat(DAT_0013d75c,pcVar1,0);\n      iVar4 = FUN_000341a0(pvVar5,param_2);\n      if (iVar4 != 0) {\n        *(void **)(param_2 + 8) = pvVar5;\n        return 1;\n      }\n      free(pvVar5);\n    }\n    puVar2 = DAT_0013d8e4;\n    if (**(char **)(param_2 + 8) == '/') {\n      return 0;\n    }\n  }\n  while( true ) {\n    if (puVar2 == (undefined4 *)0x0) {\n      return 0;\n    }\n    bVar3 = *(byte *)(param_2 + 0x24);\n    if (((bVar3 & 0x20) != 0) && ((DAT_0013d6c0 & 3) != 2)) {\n      iVar4 = FUN_00032530(param_1,puVar2,param_2);\n      if (iVar4 != 0) {\n        return 1;\n      }\n      bVar3 = *(byte *)(param_2 + 0x24);\n    }\n    if ((bVar3 & 3) == 1) {\n      pvVar5 = (void *)concat(puVar2[1],"/",param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n    }\n    else {\n      pvVar5 = (void *)concat(puVar2[1],"/",*(undefined4 *)(param_2 + 8),0);\n    }\n    iVar4 = FUN_000341a0(pvVar5,param_2);\n    if (iVar4 != 0) break;\n    free(pvVar5);\n    puVar2 = (undefined4 *)*puVar2;\n  }\n  *(void **)(param_2 + 8) = pvVar5;\n  return 1;\n}\n\n" (function_definition "undefined4 FUN_000347e0(undefined4 param_1,int param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  char *pcVar1;\n  undefined4 *puVar2;\n  byte bVar3;\n  int iVar4;\n  void *pvVar5;\n  \n  puVar2 = DAT_0013d8e4;\n  if ((*(byte *)(param_2 + 0x24) & 1) == 0) {\n    pcVar1 = *(char **)(param_2 + 8);\n    if (((*(byte *)(param_2 + 0x24) & 8) == 0) || (*pcVar1 != '/')) {\n      iVar4 = FUN_000341a0(pcVar1,param_2);\n      if (iVar4 != 0) {\n        return 1;\n      }\n    }\n    else {\n      pvVar5 = (void *)concat(DAT_0013d75c,pcVar1,0);\n      iVar4 = FUN_000341a0(pvVar5,param_2);\n      if (iVar4 != 0) {\n        *(void **)(param_2 + 8) = pvVar5;\n        return 1;\n      }\n      free(pvVar5);\n    }\n    puVar2 = DAT_0013d8e4;\n    if (**(char **)(param_2 + 8) == '/') {\n      return 0;\n    }\n  }\n  while( true ) {\n    if (puVar2 == (undefined4 *)0x0) {\n      return 0;\n    }\n    bVar3 = *(byte *)(param_2 + 0x24);\n    if (((bVar3 & 0x20) != 0) && ((DAT_0013d6c0 & 3) != 2)) {\n      iVar4 = FUN_00032530(param_1,puVar2,param_2);\n      if (iVar4 != 0) {\n        return 1;\n      }\n      bVar3 = *(byte *)(param_2 + 0x24);\n    }\n    if ((bVar3 & 3) == 1) {\n      pvVar5 = (void *)concat(puVar2[1],"/",param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n    }\n    else {\n      pvVar5 = (void *)concat(puVar2[1],"/",*(undefined4 *)(param_2 + 8),0);\n    }\n    iVar4 = FUN_000341a0(pvVar5,param_2);\n    if (iVar4 != 0) break;\n    free(pvVar5);\n    puVar2 = (undefined4 *)*puVar2;\n  }\n  *(void **)(param_2 + 8) = pvVar5;\n  return 1;\n}" type_identifier (function_declarator "FUN_000347e0(undefined4 param_1,int param_2,undefined4 param_3,undefined4 param_4)" identifier (parameter_list "(undefined4 param_1,int param_2,undefined4 param_3,undefined4 param_4)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) ))) (compound_statement "{\n  char *pcVar1;\n  undefined4 *puVar2;\n  byte bVar3;\n  int iVar4;\n  void *pvVar5;\n  \n  puVar2 = DAT_0013d8e4;\n  if ((*(byte *)(param_2 + 0x24) & 1) == 0) {\n    pcVar1 = *(char **)(param_2 + 8);\n    if (((*(byte *)(param_2 + 0x24) & 8) == 0) || (*pcVar1 != '/')) {\n      iVar4 = FUN_000341a0(pcVar1,param_2);\n      if (iVar4 != 0) {\n        return 1;\n      }\n    }\n    else {\n      pvVar5 = (void *)concat(DAT_0013d75c,pcVar1,0);\n      iVar4 = FUN_000341a0(pvVar5,param_2);\n      if (iVar4 != 0) {\n        *(void **)(param_2 + 8) = pvVar5;\n        return 1;\n      }\n      free(pvVar5);\n    }\n    puVar2 = DAT_0013d8e4;\n    if (**(char **)(param_2 + 8) == '/') {\n      return 0;\n    }\n  }\n  while( true ) {\n    if (puVar2 == (undefined4 *)0x0) {\n      return 0;\n    }\n    bVar3 = *(byte *)(param_2 + 0x24);\n    if (((bVar3 & 0x20) != 0) && ((DAT_0013d6c0 & 3) != 2)) {\n      iVar4 = FUN_00032530(param_1,puVar2,param_2);\n      if (iVar4 != 0) {\n        return 1;\n      }\n      bVar3 = *(byte *)(param_2 + 0x24);\n    }\n    if ((bVar3 & 3) == 1) {\n      pvVar5 = (void *)concat(puVar2[1],"/",param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n    }\n    else {\n      pvVar5 = (void *)concat(puVar2[1],"/",*(undefined4 *)(param_2 + 8),0);\n    }\n    iVar4 = FUN_000341a0(pvVar5,param_2);\n    if (iVar4 != 0) break;\n    free(pvVar5);\n    puVar2 = (undefined4 *)*puVar2;\n  }\n  *(void **)(param_2 + 8) = pvVar5;\n  return 1;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "byte bVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "void *pvVar5;" primitive_type (pointer_declarator "*pvVar5" * identifier) ;) (expression_statement "puVar2 = DAT_0013d8e4;" (assignment_expression "puVar2 = DAT_0013d8e4" identifier = identifier) ;) (if_statement "if ((*(byte *)(param_2 + 0x24) & 1) == 0) {\n    pcVar1 = *(char **)(param_2 + 8);\n    if (((*(byte *)(param_2 + 0x24) & 8) == 0) || (*pcVar1 != '/')) {\n      iVar4 = FUN_000341a0(pcVar1,param_2);\n      if (iVar4 != 0) {\n        return 1;\n      }\n    }\n    else {\n      pvVar5 = (void *)concat(DAT_0013d75c,pcVar1,0);\n      iVar4 = FUN_000341a0(pvVar5,param_2);\n      if (iVar4 != 0) {\n        *(void **)(param_2 + 8) = pvVar5;\n        return 1;\n      }\n      free(pvVar5);\n    }\n    puVar2 = DAT_0013d8e4;\n    if (**(char **)(param_2 + 8) == '/') {\n      return 0;\n    }\n  }" if (parenthesized_expression "((*(byte *)(param_2 + 0x24) & 1) == 0)" ( (binary_expression "(*(byte *)(param_2 + 0x24) & 1) == 0" (parenthesized_expression "(*(byte *)(param_2 + 0x24) & 1)" ( (binary_expression "*(byte *)(param_2 + 0x24) & 1" (pointer_expression "*(byte *)(param_2 + 0x24)" * (cast_expression "(byte *)(param_2 + 0x24)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x24)" ( (binary_expression "param_2 + 0x24" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n    pcVar1 = *(char **)(param_2 + 8);\n    if (((*(byte *)(param_2 + 0x24) & 8) == 0) || (*pcVar1 != '/')) {\n      iVar4 = FUN_000341a0(pcVar1,param_2);\n      if (iVar4 != 0) {\n        return 1;\n      }\n    }\n    else {\n      pvVar5 = (void *)concat(DAT_0013d75c,pcVar1,0);\n      iVar4 = FUN_000341a0(pvVar5,param_2);\n      if (iVar4 != 0) {\n        *(void **)(param_2 + 8) = pvVar5;\n        return 1;\n      }\n      free(pvVar5);\n    }\n    puVar2 = DAT_0013d8e4;\n    if (**(char **)(param_2 + 8) == '/') {\n      return 0;\n    }\n  }" { (expression_statement "pcVar1 = *(char **)(param_2 + 8);" (assignment_expression "pcVar1 = *(char **)(param_2 + 8)" identifier = (pointer_expression "*(char **)(param_2 + 8)" * (cast_expression "(char **)(param_2 + 8)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) ))))) ;) (if_statement "if (((*(byte *)(param_2 + 0x24) & 8) == 0) || (*pcVar1 != '/')) {\n      iVar4 = FUN_000341a0(pcVar1,param_2);\n      if (iVar4 != 0) {\n        return 1;\n      }\n    }\n    else {\n      pvVar5 = (void *)concat(DAT_0013d75c,pcVar1,0);\n      iVar4 = FUN_000341a0(pvVar5,param_2);\n      if (iVar4 != 0) {\n        *(void **)(param_2 + 8) = pvVar5;\n        return 1;\n      }\n      free(pvVar5);\n    }" if (parenthesized_expression "(((*(byte *)(param_2 + 0x24) & 8) == 0) || (*pcVar1 != '/'))" ( (binary_expression "((*(byte *)(param_2 + 0x24) & 8) == 0) || (*pcVar1 != '/')" (parenthesized_expression "((*(byte *)(param_2 + 0x24) & 8) == 0)" ( (binary_expression "(*(byte *)(param_2 + 0x24) & 8) == 0" (parenthesized_expression "(*(byte *)(param_2 + 0x24) & 8)" ( (binary_expression "*(byte *)(param_2 + 0x24) & 8" (pointer_expression "*(byte *)(param_2 + 0x24)" * (cast_expression "(byte *)(param_2 + 0x24)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x24)" ( (binary_expression "param_2 + 0x24" identifier + number_literal) )))) & number_literal) )) == number_literal) )) || (parenthesized_expression "(*pcVar1 != '/')" ( (binary_expression "*pcVar1 != '/'" (pointer_expression "*pcVar1" * identifier) != (char_literal "'/'" ' character ')) ))) )) (compound_statement "{\n      iVar4 = FUN_000341a0(pcVar1,param_2);\n      if (iVar4 != 0) {\n        return 1;\n      }\n    }" { (expression_statement "iVar4 = FUN_000341a0(pcVar1,param_2);" (assignment_expression "iVar4 = FUN_000341a0(pcVar1,param_2)" identifier = (call_expression "FUN_000341a0(pcVar1,param_2)" identifier (argument_list "(pcVar1,param_2)" ( identifier , identifier )))) ;) (if_statement "if (iVar4 != 0) {\n        return 1;\n      }" if (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) (compound_statement "{\n        return 1;\n      }" { (return_statement "return 1;" return number_literal ;) })) }) (else_clause "else {\n      pvVar5 = (void *)concat(DAT_0013d75c,pcVar1,0);\n      iVar4 = FUN_000341a0(pvVar5,param_2);\n      if (iVar4 != 0) {\n        *(void **)(param_2 + 8) = pvVar5;\n        return 1;\n      }\n      free(pvVar5);\n    }" else (compound_statement "{\n      pvVar5 = (void *)concat(DAT_0013d75c,pcVar1,0);\n      iVar4 = FUN_000341a0(pvVar5,param_2);\n      if (iVar4 != 0) {\n        *(void **)(param_2 + 8) = pvVar5;\n        return 1;\n      }\n      free(pvVar5);\n    }" { (expression_statement "pvVar5 = (void *)concat(DAT_0013d75c,pcVar1,0);" (assignment_expression "pvVar5 = (void *)concat(DAT_0013d75c,pcVar1,0)" identifier = (cast_expression "(void *)concat(DAT_0013d75c,pcVar1,0)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "concat(DAT_0013d75c,pcVar1,0)" identifier (argument_list "(DAT_0013d75c,pcVar1,0)" ( identifier , identifier , number_literal ))))) ;) (expression_statement "iVar4 = FUN_000341a0(pvVar5,param_2);" (assignment_expression "iVar4 = FUN_000341a0(pvVar5,param_2)" identifier = (call_expression "FUN_000341a0(pvVar5,param_2)" identifier (argument_list "(pvVar5,param_2)" ( identifier , identifier )))) ;) (if_statement "if (iVar4 != 0) {\n        *(void **)(param_2 + 8) = pvVar5;\n        return 1;\n      }" if (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) (compound_statement "{\n        *(void **)(param_2 + 8) = pvVar5;\n        return 1;\n      }" { (expression_statement "*(void **)(param_2 + 8) = pvVar5;" (assignment_expression "*(void **)(param_2 + 8) = pvVar5" (pointer_expression "*(void **)(param_2 + 8)" * (cast_expression "(void **)(param_2 + 8)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) )))) = identifier) ;) (return_statement "return 1;" return number_literal ;) })) (expression_statement "free(pvVar5);" (call_expression "free(pvVar5)" identifier (argument_list "(pvVar5)" ( identifier ))) ;) }))) (expression_statement "puVar2 = DAT_0013d8e4;" (assignment_expression "puVar2 = DAT_0013d8e4" identifier = identifier) ;) (if_statement "if (**(char **)(param_2 + 8) == '/') {\n      return 0;\n    }" if (parenthesized_expression "(**(char **)(param_2 + 8) == '/')" ( (binary_expression "**(char **)(param_2 + 8) == '/'" (pointer_expression "**(char **)(param_2 + 8)" * (pointer_expression "*(char **)(param_2 + 8)" * (cast_expression "(char **)(param_2 + 8)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) ))))) == (char_literal "'/'" ' character ')) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) })) (while_statement "while( true ) {\n    if (puVar2 == (undefined4 *)0x0) {\n      return 0;\n    }\n    bVar3 = *(byte *)(param_2 + 0x24);\n    if (((bVar3 & 0x20) != 0) && ((DAT_0013d6c0 & 3) != 2)) {\n      iVar4 = FUN_00032530(param_1,puVar2,param_2);\n      if (iVar4 != 0) {\n        return 1;\n      }\n      bVar3 = *(byte *)(param_2 + 0x24);\n    }\n    if ((bVar3 & 3) == 1) {\n      pvVar5 = (void *)concat(puVar2[1],"/",param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n    }\n    else {\n      pvVar5 = (void *)concat(puVar2[1],"/",*(undefined4 *)(param_2 + 8),0);\n    }\n    iVar4 = FUN_000341a0(pvVar5,param_2);\n    if (iVar4 != 0) break;\n    free(pvVar5);\n    puVar2 = (undefined4 *)*puVar2;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    if (puVar2 == (undefined4 *)0x0) {\n      return 0;\n    }\n    bVar3 = *(byte *)(param_2 + 0x24);\n    if (((bVar3 & 0x20) != 0) && ((DAT_0013d6c0 & 3) != 2)) {\n      iVar4 = FUN_00032530(param_1,puVar2,param_2);\n      if (iVar4 != 0) {\n        return 1;\n      }\n      bVar3 = *(byte *)(param_2 + 0x24);\n    }\n    if ((bVar3 & 3) == 1) {\n      pvVar5 = (void *)concat(puVar2[1],"/",param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n    }\n    else {\n      pvVar5 = (void *)concat(puVar2[1],"/",*(undefined4 *)(param_2 + 8),0);\n    }\n    iVar4 = FUN_000341a0(pvVar5,param_2);\n    if (iVar4 != 0) break;\n    free(pvVar5);\n    puVar2 = (undefined4 *)*puVar2;\n  }" { (if_statement "if (puVar2 == (undefined4 *)0x0) {\n      return 0;\n    }" if (parenthesized_expression "(puVar2 == (undefined4 *)0x0)" ( (binary_expression "puVar2 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "bVar3 = *(byte *)(param_2 + 0x24);" (assignment_expression "bVar3 = *(byte *)(param_2 + 0x24)" identifier = (pointer_expression "*(byte *)(param_2 + 0x24)" * (cast_expression "(byte *)(param_2 + 0x24)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x24)" ( (binary_expression "param_2 + 0x24" identifier + number_literal) ))))) ;) (if_statement "if (((bVar3 & 0x20) != 0) && ((DAT_0013d6c0 & 3) != 2)) {\n      iVar4 = FUN_00032530(param_1,puVar2,param_2);\n      if (iVar4 != 0) {\n        return 1;\n      }\n      bVar3 = *(byte *)(param_2 + 0x24);\n    }" if (parenthesized_expression "(((bVar3 & 0x20) != 0) && ((DAT_0013d6c0 & 3) != 2))" ( (binary_expression "((bVar3 & 0x20) != 0) && ((DAT_0013d6c0 & 3) != 2)" (parenthesized_expression "((bVar3 & 0x20) != 0)" ( (binary_expression "(bVar3 & 0x20) != 0" (parenthesized_expression "(bVar3 & 0x20)" ( (binary_expression "bVar3 & 0x20" identifier & number_literal) )) != number_literal) )) && (parenthesized_expression "((DAT_0013d6c0 & 3) != 2)" ( (binary_expression "(DAT_0013d6c0 & 3) != 2" (parenthesized_expression "(DAT_0013d6c0 & 3)" ( (binary_expression "DAT_0013d6c0 & 3" identifier & number_literal) )) != number_literal) ))) )) (compound_statement "{\n      iVar4 = FUN_00032530(param_1,puVar2,param_2);\n      if (iVar4 != 0) {\n        return 1;\n      }\n      bVar3 = *(byte *)(param_2 + 0x24);\n    }" { (expression_statement "iVar4 = FUN_00032530(param_1,puVar2,param_2);" (assignment_expression "iVar4 = FUN_00032530(param_1,puVar2,param_2)" identifier = (call_expression "FUN_00032530(param_1,puVar2,param_2)" identifier (argument_list "(param_1,puVar2,param_2)" ( identifier , identifier , identifier )))) ;) (if_statement "if (iVar4 != 0) {\n        return 1;\n      }" if (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) (compound_statement "{\n        return 1;\n      }" { (return_statement "return 1;" return number_literal ;) })) (expression_statement "bVar3 = *(byte *)(param_2 + 0x24);" (assignment_expression "bVar3 = *(byte *)(param_2 + 0x24)" identifier = (pointer_expression "*(byte *)(param_2 + 0x24)" * (cast_expression "(byte *)(param_2 + 0x24)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x24)" ( (binary_expression "param_2 + 0x24" identifier + number_literal) ))))) ;) })) (if_statement "if ((bVar3 & 3) == 1) {\n      pvVar5 = (void *)concat(puVar2[1],"/",param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n    }\n    else {\n      pvVar5 = (void *)concat(puVar2[1],"/",*(undefined4 *)(param_2 + 8),0);\n    }" if (parenthesized_expression "((bVar3 & 3) == 1)" ( (binary_expression "(bVar3 & 3) == 1" (parenthesized_expression "(bVar3 & 3)" ( (binary_expression "bVar3 & 3" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n      pvVar5 = (void *)concat(puVar2[1],"/",param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n    }" { (expression_statement "pvVar5 = (void *)concat(puVar2[1],"/",param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);" (assignment_expression "pvVar5 = (void *)concat(puVar2[1],"/",param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0)" identifier = (cast_expression "(void *)concat(puVar2[1],"/",param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "concat(puVar2[1],"/",param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0)" identifier (argument_list "(puVar2[1],"/",param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0)" ( (subscript_expression "puVar2[1]" identifier [ number_literal ]) , (string_literal ""/"" " string_content ") , identifier , (pointer_expression "*(undefined4 *)(param_2 + 8)" * (cast_expression "(undefined4 *)(param_2 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) )))) , identifier , identifier , number_literal ))))) ;) }) (else_clause "else {\n      pvVar5 = (void *)concat(puVar2[1],"/",*(undefined4 *)(param_2 + 8),0);\n    }" else (compound_statement "{\n      pvVar5 = (void *)concat(puVar2[1],"/",*(undefined4 *)(param_2 + 8),0);\n    }" { (expression_statement "pvVar5 = (void *)concat(puVar2[1],"/",*(undefined4 *)(param_2 + 8),0);" (assignment_expression "pvVar5 = (void *)concat(puVar2[1],"/",*(undefined4 *)(param_2 + 8),0)" identifier = (cast_expression "(void *)concat(puVar2[1],"/",*(undefined4 *)(param_2 + 8),0)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "concat(puVar2[1],"/",*(undefined4 *)(param_2 + 8),0)" identifier (argument_list "(puVar2[1],"/",*(undefined4 *)(param_2 + 8),0)" ( (subscript_expression "puVar2[1]" identifier [ number_literal ]) , (string_literal ""/"" " string_content ") , (pointer_expression "*(undefined4 *)(param_2 + 8)" * (cast_expression "(undefined4 *)(param_2 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) )))) , number_literal ))))) ;) }))) (expression_statement "iVar4 = FUN_000341a0(pvVar5,param_2);" (assignment_expression "iVar4 = FUN_000341a0(pvVar5,param_2)" identifier = (call_expression "FUN_000341a0(pvVar5,param_2)" identifier (argument_list "(pvVar5,param_2)" ( identifier , identifier )))) ;) (if_statement "if (iVar4 != 0) break;" if (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) (break_statement "break;" break ;)) (expression_statement "free(pvVar5);" (call_expression "free(pvVar5)" identifier (argument_list "(pvVar5)" ( identifier ))) ;) (expression_statement "puVar2 = (undefined4 *)*puVar2;" (assignment_expression "puVar2 = (undefined4 *)*puVar2" identifier = (cast_expression "(undefined4 *)*puVar2" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar2" * identifier))) ;) })) (expression_statement "*(void **)(param_2 + 8) = pvVar5;" (assignment_expression "*(void **)(param_2 + 8) = pvVar5" (pointer_expression "*(void **)(param_2 + 8)" * (cast_expression "(void **)(param_2 + 8)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) )))) = identifier) ;) (return_statement "return 1;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = 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 (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (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) )) || (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != (char_literal ' character ')) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (return_statement return LIT ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , IDENT , LIT ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (return_statement return LIT ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) }))) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) == (char_literal ' character ')) )) (compound_statement { (return_statement return LIT ;) })) })) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) && (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (subscript_expression IDENT [ LIT ]) , (string_literal " string_content ") , IDENT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , IDENT , IDENT , LIT ))))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (subscript_expression IDENT [ LIT ]) , (string_literal " string_content ") , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , LIT ))))) ;) }))) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (break_statement break ;)) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (return_statement return LIT ;) })))
(function_definition "undefined4 FUN_000347e0(undefined4 param_1,int param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  char *pcVar1;\n  undefined4 *puVar2;\n  byte bVar3;\n  int iVar4;\n  void *pvVar5;\n  \n  puVar2 = DAT_0013d8e4;\n  if ((*(byte *)(param_2 + 0x24) & 1) == 0) {\n    pcVar1 = *(char **)(param_2 + 8);\n    if (((*(byte *)(param_2 + 0x24) & 8) == 0) || (*pcVar1 != '/')) {\n      iVar4 = FUN_000341a0(pcVar1,param_2);\n      if (iVar4 != 0) {\n        return 1;\n      }\n    }\n    else {\n      pvVar5 = (void *)concat(DAT_0013d75c,pcVar1,0);\n      iVar4 = FUN_000341a0(pvVar5,param_2);\n      if (iVar4 != 0) {\n        *(void **)(param_2 + 8) = pvVar5;\n        return 1;\n      }\n      free(pvVar5);\n    }\n    puVar2 = DAT_0013d8e4;\n    if (**(char **)(param_2 + 8) == '/') {\n      return 0;\n    }\n  }\n  while( true ) {\n    if (puVar2 == (undefined4 *)0x0) {\n      return 0;\n    }\n    bVar3 = *(byte *)(param_2 + 0x24);\n    if (((bVar3 & 0x20) != 0) && ((DAT_0013d6c0 & 3) != 2)) {\n      iVar4 = FUN_00032530(param_1,puVar2,param_2);\n      if (iVar4 != 0) {\n        return 1;\n      }\n      bVar3 = *(byte *)(param_2 + 0x24);\n    }\n    if ((bVar3 & 3) == 1) {\n      pvVar5 = (void *)concat(puVar2[1],"/",param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n    }\n    else {\n      pvVar5 = (void *)concat(puVar2[1],"/",*(undefined4 *)(param_2 + 8),0);\n    }\n    iVar4 = FUN_000341a0(pvVar5,param_2);\n    if (iVar4 != 0) break;\n    free(pvVar5);\n    puVar2 = (undefined4 *)*puVar2;\n  }\n  *(void **)(param_2 + 8) = pvVar5;\n  return 1;\n}" (type_identifier "undefined4") (function_declarator "FUN_000347e0(undefined4 param_1,int param_2,undefined4 param_3,undefined4 param_4)" (identifier "FUN_000347e0") (parameter_list "(undefined4 param_1,int param_2,undefined4 param_3,undefined4 param_4)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) (, ",") (parameter_declaration "undefined4 param_4" (type_identifier "undefined4") (identifier "param_4")) () ")"))) (compound_statement "{\n  char *pcVar1;\n  undefined4 *puVar2;\n  byte bVar3;\n  int iVar4;\n  void *pvVar5;\n  \n  puVar2 = DAT_0013d8e4;\n  if ((*(byte *)(param_2 + 0x24) & 1) == 0) {\n    pcVar1 = *(char **)(param_2 + 8);\n    if (((*(byte *)(param_2 + 0x24) & 8) == 0) || (*pcVar1 != '/')) {\n      iVar4 = FUN_000341a0(pcVar1,param_2);\n      if (iVar4 != 0) {\n        return 1;\n      }\n    }\n    else {\n      pvVar5 = (void *)concat(DAT_0013d75c,pcVar1,0);\n      iVar4 = FUN_000341a0(pvVar5,param_2);\n      if (iVar4 != 0) {\n        *(void **)(param_2 + 8) = pvVar5;\n        return 1;\n      }\n      free(pvVar5);\n    }\n    puVar2 = DAT_0013d8e4;\n    if (**(char **)(param_2 + 8) == '/') {\n      return 0;\n    }\n  }\n  while( true ) {\n    if (puVar2 == (undefined4 *)0x0) {\n      return 0;\n    }\n    bVar3 = *(byte *)(param_2 + 0x24);\n    if (((bVar3 & 0x20) != 0) && ((DAT_0013d6c0 & 3) != 2)) {\n      iVar4 = FUN_00032530(param_1,puVar2,param_2);\n      if (iVar4 != 0) {\n        return 1;\n      }\n      bVar3 = *(byte *)(param_2 + 0x24);\n    }\n    if ((bVar3 & 3) == 1) {\n      pvVar5 = (void *)concat(puVar2[1],"/",param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n    }\n    else {\n      pvVar5 = (void *)concat(puVar2[1],"/",*(undefined4 *)(param_2 + 8),0);\n    }\n    iVar4 = FUN_000341a0(pvVar5,param_2);\n    if (iVar4 != 0) break;\n    free(pvVar5);\n    puVar2 = (undefined4 *)*puVar2;\n  }\n  *(void **)(param_2 + 8) = pvVar5;\n  return 1;\n}" ({ "{") (declaration "char *pcVar1;" (primitive_type "char") (pointer_declarator "*pcVar1" (* "*") (identifier "pcVar1")) (; ";")) (declaration "undefined4 *puVar2;" (type_identifier "undefined4") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "byte bVar3;" (type_identifier "byte") (identifier "bVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "void *pvVar5;" (primitive_type "void") (pointer_declarator "*pvVar5" (* "*") (identifier "pvVar5")) (; ";")) (expression_statement "puVar2 = DAT_0013d8e4;" (assignment_expression "puVar2 = DAT_0013d8e4" (identifier "puVar2") (= "=") (identifier "DAT_0013d8e4")) (; ";")) (if_statement "if ((*(byte *)(param_2 + 0x24) & 1) == 0) {\n    pcVar1 = *(char **)(param_2 + 8);\n    if (((*(byte *)(param_2 + 0x24) & 8) == 0) || (*pcVar1 != '/')) {\n      iVar4 = FUN_000341a0(pcVar1,param_2);\n      if (iVar4 != 0) {\n        return 1;\n      }\n    }\n    else {\n      pvVar5 = (void *)concat(DAT_0013d75c,pcVar1,0);\n      iVar4 = FUN_000341a0(pvVar5,param_2);\n      if (iVar4 != 0) {\n        *(void **)(param_2 + 8) = pvVar5;\n        return 1;\n      }\n      free(pvVar5);\n    }\n    puVar2 = DAT_0013d8e4;\n    if (**(char **)(param_2 + 8) == '/') {\n      return 0;\n    }\n  }" (if "if") (parenthesized_expression "((*(byte *)(param_2 + 0x24) & 1) == 0)" (( "(") (binary_expression "(*(byte *)(param_2 + 0x24) & 1) == 0" (parenthesized_expression "(*(byte *)(param_2 + 0x24) & 1)" (( "(") (binary_expression "*(byte *)(param_2 + 0x24) & 1" (pointer_expression "*(byte *)(param_2 + 0x24)" (* "*") (cast_expression "(byte *)(param_2 + 0x24)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x24)" (( "(") (binary_expression "param_2 + 0x24" (identifier "param_2") (+ "+") (number_literal "0x24")) () ")")))) (& "&") (number_literal "1")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    pcVar1 = *(char **)(param_2 + 8);\n    if (((*(byte *)(param_2 + 0x24) & 8) == 0) || (*pcVar1 != '/')) {\n      iVar4 = FUN_000341a0(pcVar1,param_2);\n      if (iVar4 != 0) {\n        return 1;\n      }\n    }\n    else {\n      pvVar5 = (void *)concat(DAT_0013d75c,pcVar1,0);\n      iVar4 = FUN_000341a0(pvVar5,param_2);\n      if (iVar4 != 0) {\n        *(void **)(param_2 + 8) = pvVar5;\n        return 1;\n      }\n      free(pvVar5);\n    }\n    puVar2 = DAT_0013d8e4;\n    if (**(char **)(param_2 + 8) == '/') {\n      return 0;\n    }\n  }" ({ "{") (expression_statement "pcVar1 = *(char **)(param_2 + 8);" (assignment_expression "pcVar1 = *(char **)(param_2 + 8)" (identifier "pcVar1") (= "=") (pointer_expression "*(char **)(param_2 + 8)" (* "*") (cast_expression "(char **)(param_2 + 8)" (( "(") (type_descriptor "char **" (primitive_type "char") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_2 + 8)" (( "(") (binary_expression "param_2 + 8" (identifier "param_2") (+ "+") (number_literal "8")) () ")"))))) (; ";")) (if_statement "if (((*(byte *)(param_2 + 0x24) & 8) == 0) || (*pcVar1 != '/')) {\n      iVar4 = FUN_000341a0(pcVar1,param_2);\n      if (iVar4 != 0) {\n        return 1;\n      }\n    }\n    else {\n      pvVar5 = (void *)concat(DAT_0013d75c,pcVar1,0);\n      iVar4 = FUN_000341a0(pvVar5,param_2);\n      if (iVar4 != 0) {\n        *(void **)(param_2 + 8) = pvVar5;\n        return 1;\n      }\n      free(pvVar5);\n    }" (if "if") (parenthesized_expression "(((*(byte *)(param_2 + 0x24) & 8) == 0) || (*pcVar1 != '/'))" (( "(") (binary_expression "((*(byte *)(param_2 + 0x24) & 8) == 0) || (*pcVar1 != '/')" (parenthesized_expression "((*(byte *)(param_2 + 0x24) & 8) == 0)" (( "(") (binary_expression "(*(byte *)(param_2 + 0x24) & 8) == 0" (parenthesized_expression "(*(byte *)(param_2 + 0x24) & 8)" (( "(") (binary_expression "*(byte *)(param_2 + 0x24) & 8" (pointer_expression "*(byte *)(param_2 + 0x24)" (* "*") (cast_expression "(byte *)(param_2 + 0x24)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x24)" (( "(") (binary_expression "param_2 + 0x24" (identifier "param_2") (+ "+") (number_literal "0x24")) () ")")))) (& "&") (number_literal "8")) () ")")) (== "==") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(*pcVar1 != '/')" (( "(") (binary_expression "*pcVar1 != '/'" (pointer_expression "*pcVar1" (* "*") (identifier "pcVar1")) (!= "!=") (char_literal "'/'" (' "'") (character "/") (' "'"))) () ")"))) () ")")) (compound_statement "{\n      iVar4 = FUN_000341a0(pcVar1,param_2);\n      if (iVar4 != 0) {\n        return 1;\n      }\n    }" ({ "{") (expression_statement "iVar4 = FUN_000341a0(pcVar1,param_2);" (assignment_expression "iVar4 = FUN_000341a0(pcVar1,param_2)" (identifier "iVar4") (= "=") (call_expression "FUN_000341a0(pcVar1,param_2)" (identifier "FUN_000341a0") (argument_list "(pcVar1,param_2)" (( "(") (identifier "pcVar1") (, ",") (identifier "param_2") () ")")))) (; ";")) (if_statement "if (iVar4 != 0) {\n        return 1;\n      }" (if "if") (parenthesized_expression "(iVar4 != 0)" (( "(") (binary_expression "iVar4 != 0" (identifier "iVar4") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        return 1;\n      }" ({ "{") (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (} "}")) (else_clause "else {\n      pvVar5 = (void *)concat(DAT_0013d75c,pcVar1,0);\n      iVar4 = FUN_000341a0(pvVar5,param_2);\n      if (iVar4 != 0) {\n        *(void **)(param_2 + 8) = pvVar5;\n        return 1;\n      }\n      free(pvVar5);\n    }" (else "else") (compound_statement "{\n      pvVar5 = (void *)concat(DAT_0013d75c,pcVar1,0);\n      iVar4 = FUN_000341a0(pvVar5,param_2);\n      if (iVar4 != 0) {\n        *(void **)(param_2 + 8) = pvVar5;\n        return 1;\n      }\n      free(pvVar5);\n    }" ({ "{") (expression_statement "pvVar5 = (void *)concat(DAT_0013d75c,pcVar1,0);" (assignment_expression "pvVar5 = (void *)concat(DAT_0013d75c,pcVar1,0)" (identifier "pvVar5") (= "=") (cast_expression "(void *)concat(DAT_0013d75c,pcVar1,0)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "concat(DAT_0013d75c,pcVar1,0)" (identifier "concat") (argument_list "(DAT_0013d75c,pcVar1,0)" (( "(") (identifier "DAT_0013d75c") (, ",") (identifier "pcVar1") (, ",") (number_literal "0") () ")"))))) (; ";")) (expression_statement "iVar4 = FUN_000341a0(pvVar5,param_2);" (assignment_expression "iVar4 = FUN_000341a0(pvVar5,param_2)" (identifier "iVar4") (= "=") (call_expression "FUN_000341a0(pvVar5,param_2)" (identifier "FUN_000341a0") (argument_list "(pvVar5,param_2)" (( "(") (identifier "pvVar5") (, ",") (identifier "param_2") () ")")))) (; ";")) (if_statement "if (iVar4 != 0) {\n        *(void **)(param_2 + 8) = pvVar5;\n        return 1;\n      }" (if "if") (parenthesized_expression "(iVar4 != 0)" (( "(") (binary_expression "iVar4 != 0" (identifier "iVar4") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        *(void **)(param_2 + 8) = pvVar5;\n        return 1;\n      }" ({ "{") (expression_statement "*(void **)(param_2 + 8) = pvVar5;" (assignment_expression "*(void **)(param_2 + 8) = pvVar5" (pointer_expression "*(void **)(param_2 + 8)" (* "*") (cast_expression "(void **)(param_2 + 8)" (( "(") (type_descriptor "void **" (primitive_type "void") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_2 + 8)" (( "(") (binary_expression "param_2 + 8" (identifier "param_2") (+ "+") (number_literal "8")) () ")")))) (= "=") (identifier "pvVar5")) (; ";")) (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (expression_statement "free(pvVar5);" (call_expression "free(pvVar5)" (identifier "free") (argument_list "(pvVar5)" (( "(") (identifier "pvVar5") () ")"))) (; ";")) (} "}")))) (expression_statement "puVar2 = DAT_0013d8e4;" (assignment_expression "puVar2 = DAT_0013d8e4" (identifier "puVar2") (= "=") (identifier "DAT_0013d8e4")) (; ";")) (if_statement "if (**(char **)(param_2 + 8) == '/') {\n      return 0;\n    }" (if "if") (parenthesized_expression "(**(char **)(param_2 + 8) == '/')" (( "(") (binary_expression "**(char **)(param_2 + 8) == '/'" (pointer_expression "**(char **)(param_2 + 8)" (* "*") (pointer_expression "*(char **)(param_2 + 8)" (* "*") (cast_expression "(char **)(param_2 + 8)" (( "(") (type_descriptor "char **" (primitive_type "char") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_2 + 8)" (( "(") (binary_expression "param_2 + 8" (identifier "param_2") (+ "+") (number_literal "8")) () ")"))))) (== "==") (char_literal "'/'" (' "'") (character "/") (' "'"))) () ")")) (compound_statement "{\n      return 0;\n    }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (} "}"))) (while_statement "while( true ) {\n    if (puVar2 == (undefined4 *)0x0) {\n      return 0;\n    }\n    bVar3 = *(byte *)(param_2 + 0x24);\n    if (((bVar3 & 0x20) != 0) && ((DAT_0013d6c0 & 3) != 2)) {\n      iVar4 = FUN_00032530(param_1,puVar2,param_2);\n      if (iVar4 != 0) {\n        return 1;\n      }\n      bVar3 = *(byte *)(param_2 + 0x24);\n    }\n    if ((bVar3 & 3) == 1) {\n      pvVar5 = (void *)concat(puVar2[1],"/",param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n    }\n    else {\n      pvVar5 = (void *)concat(puVar2[1],"/",*(undefined4 *)(param_2 + 8),0);\n    }\n    iVar4 = FUN_000341a0(pvVar5,param_2);\n    if (iVar4 != 0) break;\n    free(pvVar5);\n    puVar2 = (undefined4 *)*puVar2;\n  }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n    if (puVar2 == (undefined4 *)0x0) {\n      return 0;\n    }\n    bVar3 = *(byte *)(param_2 + 0x24);\n    if (((bVar3 & 0x20) != 0) && ((DAT_0013d6c0 & 3) != 2)) {\n      iVar4 = FUN_00032530(param_1,puVar2,param_2);\n      if (iVar4 != 0) {\n        return 1;\n      }\n      bVar3 = *(byte *)(param_2 + 0x24);\n    }\n    if ((bVar3 & 3) == 1) {\n      pvVar5 = (void *)concat(puVar2[1],"/",param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n    }\n    else {\n      pvVar5 = (void *)concat(puVar2[1],"/",*(undefined4 *)(param_2 + 8),0);\n    }\n    iVar4 = FUN_000341a0(pvVar5,param_2);\n    if (iVar4 != 0) break;\n    free(pvVar5);\n    puVar2 = (undefined4 *)*puVar2;\n  }" ({ "{") (if_statement "if (puVar2 == (undefined4 *)0x0) {\n      return 0;\n    }" (if "if") (parenthesized_expression "(puVar2 == (undefined4 *)0x0)" (( "(") (binary_expression "puVar2 == (undefined4 *)0x0" (identifier "puVar2") (== "==") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      return 0;\n    }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "bVar3 = *(byte *)(param_2 + 0x24);" (assignment_expression "bVar3 = *(byte *)(param_2 + 0x24)" (identifier "bVar3") (= "=") (pointer_expression "*(byte *)(param_2 + 0x24)" (* "*") (cast_expression "(byte *)(param_2 + 0x24)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x24)" (( "(") (binary_expression "param_2 + 0x24" (identifier "param_2") (+ "+") (number_literal "0x24")) () ")"))))) (; ";")) (if_statement "if (((bVar3 & 0x20) != 0) && ((DAT_0013d6c0 & 3) != 2)) {\n      iVar4 = FUN_00032530(param_1,puVar2,param_2);\n      if (iVar4 != 0) {\n        return 1;\n      }\n      bVar3 = *(byte *)(param_2 + 0x24);\n    }" (if "if") (parenthesized_expression "(((bVar3 & 0x20) != 0) && ((DAT_0013d6c0 & 3) != 2))" (( "(") (binary_expression "((bVar3 & 0x20) != 0) && ((DAT_0013d6c0 & 3) != 2)" (parenthesized_expression "((bVar3 & 0x20) != 0)" (( "(") (binary_expression "(bVar3 & 0x20) != 0" (parenthesized_expression "(bVar3 & 0x20)" (( "(") (binary_expression "bVar3 & 0x20" (identifier "bVar3") (& "&") (number_literal "0x20")) () ")")) (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "((DAT_0013d6c0 & 3) != 2)" (( "(") (binary_expression "(DAT_0013d6c0 & 3) != 2" (parenthesized_expression "(DAT_0013d6c0 & 3)" (( "(") (binary_expression "DAT_0013d6c0 & 3" (identifier "DAT_0013d6c0") (& "&") (number_literal "3")) () ")")) (!= "!=") (number_literal "2")) () ")"))) () ")")) (compound_statement "{\n      iVar4 = FUN_00032530(param_1,puVar2,param_2);\n      if (iVar4 != 0) {\n        return 1;\n      }\n      bVar3 = *(byte *)(param_2 + 0x24);\n    }" ({ "{") (expression_statement "iVar4 = FUN_00032530(param_1,puVar2,param_2);" (assignment_expression "iVar4 = FUN_00032530(param_1,puVar2,param_2)" (identifier "iVar4") (= "=") (call_expression "FUN_00032530(param_1,puVar2,param_2)" (identifier "FUN_00032530") (argument_list "(param_1,puVar2,param_2)" (( "(") (identifier "param_1") (, ",") (identifier "puVar2") (, ",") (identifier "param_2") () ")")))) (; ";")) (if_statement "if (iVar4 != 0) {\n        return 1;\n      }" (if "if") (parenthesized_expression "(iVar4 != 0)" (( "(") (binary_expression "iVar4 != 0" (identifier "iVar4") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        return 1;\n      }" ({ "{") (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (expression_statement "bVar3 = *(byte *)(param_2 + 0x24);" (assignment_expression "bVar3 = *(byte *)(param_2 + 0x24)" (identifier "bVar3") (= "=") (pointer_expression "*(byte *)(param_2 + 0x24)" (* "*") (cast_expression "(byte *)(param_2 + 0x24)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x24)" (( "(") (binary_expression "param_2 + 0x24" (identifier "param_2") (+ "+") (number_literal "0x24")) () ")"))))) (; ";")) (} "}"))) (if_statement "if ((bVar3 & 3) == 1) {\n      pvVar5 = (void *)concat(puVar2[1],"/",param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n    }\n    else {\n      pvVar5 = (void *)concat(puVar2[1],"/",*(undefined4 *)(param_2 + 8),0);\n    }" (if "if") (parenthesized_expression "((bVar3 & 3) == 1)" (( "(") (binary_expression "(bVar3 & 3) == 1" (parenthesized_expression "(bVar3 & 3)" (( "(") (binary_expression "bVar3 & 3" (identifier "bVar3") (& "&") (number_literal "3")) () ")")) (== "==") (number_literal "1")) () ")")) (compound_statement "{\n      pvVar5 = (void *)concat(puVar2[1],"/",param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);\n    }" ({ "{") (expression_statement "pvVar5 = (void *)concat(puVar2[1],"/",param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);" (assignment_expression "pvVar5 = (void *)concat(puVar2[1],"/",param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0)" (identifier "pvVar5") (= "=") (cast_expression "(void *)concat(puVar2[1],"/",param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "concat(puVar2[1],"/",param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0)" (identifier "concat") (argument_list "(puVar2[1],"/",param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0)" (( "(") (subscript_expression "puVar2[1]" (identifier "puVar2") ([ "[") (number_literal "1") (] "]")) (, ",") (string_literal ""/"" (" """) (string_content "/") (" """)) (, ",") (identifier "param_3") (, ",") (pointer_expression "*(undefined4 *)(param_2 + 8)" (* "*") (cast_expression "(undefined4 *)(param_2 + 8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 8)" (( "(") (binary_expression "param_2 + 8" (identifier "param_2") (+ "+") (number_literal "8")) () ")")))) (, ",") (identifier "param_1") (, ",") (identifier "param_4") (, ",") (number_literal "0") () ")"))))) (; ";")) (} "}")) (else_clause "else {\n      pvVar5 = (void *)concat(puVar2[1],"/",*(undefined4 *)(param_2 + 8),0);\n    }" (else "else") (compound_statement "{\n      pvVar5 = (void *)concat(puVar2[1],"/",*(undefined4 *)(param_2 + 8),0);\n    }" ({ "{") (expression_statement "pvVar5 = (void *)concat(puVar2[1],"/",*(undefined4 *)(param_2 + 8),0);" (assignment_expression "pvVar5 = (void *)concat(puVar2[1],"/",*(undefined4 *)(param_2 + 8),0)" (identifier "pvVar5") (= "=") (cast_expression "(void *)concat(puVar2[1],"/",*(undefined4 *)(param_2 + 8),0)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "concat(puVar2[1],"/",*(undefined4 *)(param_2 + 8),0)" (identifier "concat") (argument_list "(puVar2[1],"/",*(undefined4 *)(param_2 + 8),0)" (( "(") (subscript_expression "puVar2[1]" (identifier "puVar2") ([ "[") (number_literal "1") (] "]")) (, ",") (string_literal ""/"" (" """) (string_content "/") (" """)) (, ",") (pointer_expression "*(undefined4 *)(param_2 + 8)" (* "*") (cast_expression "(undefined4 *)(param_2 + 8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 8)" (( "(") (binary_expression "param_2 + 8" (identifier "param_2") (+ "+") (number_literal "8")) () ")")))) (, ",") (number_literal "0") () ")"))))) (; ";")) (} "}")))) (expression_statement "iVar4 = FUN_000341a0(pvVar5,param_2);" (assignment_expression "iVar4 = FUN_000341a0(pvVar5,param_2)" (identifier "iVar4") (= "=") (call_expression "FUN_000341a0(pvVar5,param_2)" (identifier "FUN_000341a0") (argument_list "(pvVar5,param_2)" (( "(") (identifier "pvVar5") (, ",") (identifier "param_2") () ")")))) (; ";")) (if_statement "if (iVar4 != 0) break;" (if "if") (parenthesized_expression "(iVar4 != 0)" (( "(") (binary_expression "iVar4 != 0" (identifier "iVar4") (!= "!=") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "free(pvVar5);" (call_expression "free(pvVar5)" (identifier "free") (argument_list "(pvVar5)" (( "(") (identifier "pvVar5") () ")"))) (; ";")) (expression_statement "puVar2 = (undefined4 *)*puVar2;" (assignment_expression "puVar2 = (undefined4 *)*puVar2" (identifier "puVar2") (= "=") (cast_expression "(undefined4 *)*puVar2" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*puVar2" (* "*") (identifier "puVar2")))) (; ";")) (} "}"))) (expression_statement "*(void **)(param_2 + 8) = pvVar5;" (assignment_expression "*(void **)(param_2 + 8) = pvVar5" (pointer_expression "*(void **)(param_2 + 8)" (* "*") (cast_expression "(void **)(param_2 + 8)" (( "(") (type_descriptor "void **" (primitive_type "void") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_2 + 8)" (( "(") (binary_expression "param_2 + 8" (identifier "param_2") (+ "+") (number_literal "8")) () ")")))) (= "=") (identifier "pvVar5")) (; ";")) (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}")))

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

type_1
function_1(char *arch,type_2 *entry,char *lib,char *suffix)

{
  type_3 *var_5;
  type_4 var_6;
  type_1 var_2;
  char *pcVar3;
  
  var_5 = search_head;
  if (((type_5)entry->flags & 1) == 0) {
    pcVar3 = entry->filename;
    if ((((type_5)entry->flags & 8) == 0) || (*pcVar3 != '/')) {
      var_2 = var_1(pcVar3,entry);
      if (var_2 != 0) {
        return 1;
      }
    }
    else {
      pcVar3 = (char *)var_3(ld_sysroot,pcVar3,0);
      var_2 = var_1(pcVar3,entry);
      if (var_2 != 0) {
        entry->filename = pcVar3;
        return 1;
      }
      var_4(pcVar3);
    }
    var_5 = search_head;
    if (*entry->filename == '/') {
      return 0;
    }
  }
  while( true ) {
    if (var_5 == (type_3 *)0x0) {
      return 0;
    }
    var_6 = *(type_4 *)&entry->flags;
    if (((var_6 & 0x20) != 0) && ((link_info._0_1_ & 3) != 2)) {
      var_2 = var_7(arch,var_5,entry);
      if (var_2 != 0) {
        return 1;
      }
      var_6 = *(type_4 *)&entry->flags;
    }
    if ((var_6 & 3) == 1) {
      pcVar3 = (char *)var_3(var_5->name,"/",lib,entry->filename,arch,suffix,0);
    }
    else {
      pcVar3 = (char *)var_3(var_5->name,"/",entry->filename,0);
    }
    var_2 = var_1(pcVar3,entry);
    if (var_2 != 0) break;
    var_4(pcVar3);
    var_5 = var_5->next;
  }
  entry->filename = pcVar3;
  return 1;
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (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 (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (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))) right: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (char_literal (character)))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (number_literal))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (return_statement (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier))))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) right: (char_literal (character)))) consequence: (compound_statement (return_statement (number_literal)))))) (while_statement condition: (parenthesized_expression (true)) body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (return_statement (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (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))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) right: (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: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (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))))))))) (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: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (subscript_expression argument: (identifier) index: (number_literal)) (string_literal (string_content)) (identifier) (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))))) (identifier) (identifier) (number_literal))))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (subscript_expression argument: (identifier) index: (number_literal)) (string_literal (string_content)) (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))))) (number_literal))))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (break_statement)) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (return_statement (number_literal)))))

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

undefined4 MASKED(undefined4 param_1,int param_2,undefined4 param_3,undefined4 param_4)

{
  char *pcVar1;
  undefined4 *puVar2;
  byte bVar3;
  int iVar4;
  void *pvVar5;
  
  puVar2 = DAT_0013d8e4;
  if ((*(byte *)(param_2 + 0x24) & 1) == 0) {
    pcVar1 = *(char **)(param_2 + 8);
    if (((*(byte *)(param_2 + 0x24) & 8) == 0) || (*pcVar1 != '/')) {
      iVar4 = FUN_000341a0(pcVar1,param_2);
      if (iVar4 != 0) {
        return 1;
      }
    }
    else {
      pvVar5 = (void *)concat(DAT_0013d75c,pcVar1,0);
      iVar4 = FUN_000341a0(pvVar5,param_2);
      if (iVar4 != 0) {
        *(void **)(param_2 + 8) = pvVar5;
        return 1;
      }
      free(pvVar5);
    }
    puVar2 = DAT_0013d8e4;
    if (**(char **)(param_2 + 8) == '/') {
      return 0;
    }
  }
  while( true ) {
    if (puVar2 == (undefined4 *)0x0) {
      return 0;
    }
    bVar3 = *(byte *)(param_2 + 0x24);
    if (((bVar3 & 0x20) != 0) && ((DAT_0013d6c0 & 3) != 2)) {
      iVar4 = FUN_00032530(param_1,puVar2,param_2);
      if (iVar4 != 0) {
        return 1;
      }
      bVar3 = *(byte *)(param_2 + 0x24);
    }
    if ((bVar3 & 3) == 1) {
      pvVar5 = (void *)concat(puVar2[1],"/",param_3,*(undefined4 *)(param_2 + 8),param_1,param_4,0);
    }
    else {
      pvVar5 = (void *)concat(puVar2[1],"/",*(undefined4 *)(param_2 + 8),0);
    }
    iVar4 = FUN_000341a0(pvVar5,param_2);
    if (iVar4 != 0) break;
    free(pvVar5);
    puVar2 = (undefined4 *)*puVar2;
  }
  *(void **)(param_2 + 8) = pvVar5;
  return 1;
}

