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

char ** __regparm3 glob_dir_to_array(char *dir,char **array,int flags)

{
  char cVar1;
  int iVar2;
  size_t sVar3;
  int iVar4;
  char *pcVar5;
  size_t sVar6;
  char *__dest;
  int iVar7;
  char **ppcVar8;
  int in_GS_OFFSET;
  char **local_ac;
  stat sb;
  
  iVar2 = *(int *)(in_GS_OFFSET + 0x14);
  sVar3 = strlen(dir);
  if (sVar3 == 0) {
    local_ac = array;
    if (((flags & 1U) != 0) && (pcVar5 = *array, pcVar5 != (char *)0x0)) {
      ppcVar8 = array;
      do {
        while ((iVar4 = __xstat64(3,pcVar5,(stat64 *)&sb), iVar4 != 0 ||
               ((sb.st_mode & 0xf000) != 0x4000))) {
          ppcVar8 = ppcVar8 + 1;
          pcVar5 = *ppcVar8;
          if (pcVar5 == (char *)0x0) goto LAB_000b4f3f;
        }
        pcVar5 = *ppcVar8;
        sVar3 = strlen(pcVar5);
        pcVar5 = (char *)realloc(pcVar5,sVar3 + 2);
        if (pcVar5 == (char *)0x0) goto LAB_000b50cf;
        pcVar5[sVar3] = '/';
        pcVar5[sVar3 + 1] = '\0';
        *ppcVar8 = pcVar5;
        pcVar5 = ppcVar8[1];
        ppcVar8 = ppcVar8 + 1;
      } while (pcVar5 != (char *)0x0);
    }
    goto LAB_000b4f3f;
  }
  cVar1 = dir[sVar3 - 1];
  pcVar5 = *array;
  if (pcVar5 == (char *)0x0) {
    local_ac = (char **)malloc(4);
    if (local_ac != (char **)0x0) {
      *local_ac = (char *)0x0;
      goto LAB_000b5136;
    }
  }
  else {
    iVar4 = 0;
    do {
      iVar7 = iVar4;
      iVar4 = iVar7 + 1;
    } while (array[iVar4] != (char *)0x0);
    local_ac = (char **)malloc(iVar7 * 4 + 8);
    if (local_ac != (char **)0x0) {
      iVar4 = 0;
LAB_000b4ff9:
      sVar6 = strlen(pcVar5);
      __dest = (char *)malloc(sVar6 + sVar3 + 3);
      local_ac[iVar4] = __dest;
      if (__dest != (char *)0x0) goto code_r0x000b5022;
      ppcVar8 = local_ac;
      if (iVar4 != 0) {
        do {
          pcVar5 = *ppcVar8;
          ppcVar8 = ppcVar8 + 1;
          free(pcVar5);
        } while (local_ac + iVar4 != ppcVar8);
      }
      free(local_ac);
    }
  }
LAB_000b50cf:
  local_ac = (char **)0x0;
  goto LAB_000b4f3f;
code_r0x000b5022:
  strcpy(__dest,dir);
  if (cVar1 != '/') {
    __dest[sVar3] = '/';
  }
  strcpy(__dest + (cVar1 != '/') + sVar3,pcVar5);
  if ((((flags & 1U) != 0) && (iVar7 = __xstat64(3,__dest,(stat64 *)&sb), iVar7 == 0)) &&
     ((sb.st_mode & 0xf000) == 0x4000)) {
    pcVar5 = local_ac[iVar4];
    sVar6 = strlen(pcVar5);
    pcVar5[sVar6] = '/';
    local_ac[iVar4][sVar6 + 1] = '\0';
  }
  iVar4 = iVar4 + 1;
  pcVar5 = array[iVar4];
  if (pcVar5 == (char *)0x0) goto LAB_000b5100;
  goto LAB_000b4ff9;
LAB_000b5100:
  pcVar5 = *array;
  local_ac[iVar4] = (char *)0x0;
  ppcVar8 = array;
  while (pcVar5 != (char *)0x0) {
    ppcVar8 = ppcVar8 + 1;
    free(pcVar5);
    pcVar5 = *ppcVar8;
  }
LAB_000b5136:
  free(array);
LAB_000b4f3f:
  if (iVar2 == *(int *)(in_GS_OFFSET + 0x14)) {
    return local_ac;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



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

int * __regparm3 FUN_000b4e60(char *param_1,int *param_2,uint param_3)

{
  char cVar1;
  size_t sVar2;
  char *pcVar3;
  int iVar4;
  void *pvVar5;
  size_t sVar6;
  char *__dest;
  int iVar7;
  int *piVar8;
  int in_GS_OFFSET;
  int *local_ac;
  stat64 local_80;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0xb4e6b;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  sVar2 = strlen(param_1);
  if (sVar2 == 0) {
    local_ac = param_2;
    if (((param_3 & 1) != 0) && (pcVar3 = (char *)*param_2, pcVar3 != (char *)0x0)) {
      do {
        while ((iVar4 = __xstat64(3,pcVar3,&local_80), iVar4 != 0 ||
               ((local_80.st_mode & 0xf000) != 0x4000))) {
          param_2 = param_2 + 1;
          pcVar3 = (char *)*param_2;
          if (pcVar3 == (char *)0x0) goto LAB_000b4f3f;
        }
        pcVar3 = (char *)*param_2;
        sVar2 = strlen(pcVar3);
        pvVar5 = realloc(pcVar3,sVar2 + 2);
        if (pvVar5 == (void *)0x0) goto LAB_000b50cf;
        *(undefined1 *)((int)pvVar5 + sVar2) = 0x2f;
        *(undefined1 *)((int)pvVar5 + sVar2 + 1) = 0;
        *param_2 = (int)pvVar5;
        pcVar3 = (char *)param_2[1];
        param_2 = param_2 + 1;
      } while (pcVar3 != (char *)0x0);
    }
    goto LAB_000b4f3f;
  }
  cVar1 = param_1[sVar2 - 1];
  pcVar3 = (char *)*param_2;
  if (pcVar3 == (char *)0x0) {
    local_ac = (int *)malloc(4);
    if (local_ac != (int *)0x0) {
      *local_ac = 0;
      goto LAB_000b5136;
    }
  }
  else {
    iVar4 = 0;
    do {
      iVar7 = iVar4;
      iVar4 = iVar7 + 1;
    } while (param_2[iVar4] != 0);
    local_ac = (int *)malloc(iVar7 * 4 + 8);
    if (local_ac != (int *)0x0) {
      iVar4 = 0;
LAB_000b4ff9:
      sVar6 = strlen(pcVar3);
      __dest = (char *)malloc(sVar6 + sVar2 + 3);
      local_ac[iVar4] = (int)__dest;
      if (__dest != (char *)0x0) goto code_r0x000b5022;
      piVar8 = local_ac;
      if (iVar4 != 0) {
        do {
          pvVar5 = (void *)*piVar8;
          piVar8 = piVar8 + 1;
          free(pvVar5);
        } while (local_ac + iVar4 != piVar8);
      }
      free(local_ac);
    }
  }
LAB_000b50cf:
  local_ac = (int *)0x0;
  goto LAB_000b4f3f;
code_r0x000b5022:
  strcpy(__dest,param_1);
  if (cVar1 != '/') {
    __dest[sVar2] = '/';
  }
  strcpy(__dest + (cVar1 != '/') + sVar2,pcVar3);
  if ((((param_3 & 1) != 0) && (iVar7 = __xstat64(3,__dest,&local_80), iVar7 == 0)) &&
     ((local_80.st_mode & 0xf000) == 0x4000)) {
    pcVar3 = (char *)local_ac[iVar4];
    sVar6 = strlen(pcVar3);
    pcVar3[sVar6] = '/';
    *(undefined1 *)(local_ac[iVar4] + 1 + sVar6) = 0;
  }
  iVar4 = iVar4 + 1;
  pcVar3 = (char *)param_2[iVar4];
  if (pcVar3 == (char *)0x0) goto LAB_000b5100;
  goto LAB_000b4ff9;
LAB_000b5100:
  pvVar5 = (void *)*param_2;
  local_ac[iVar4] = 0;
  piVar8 = param_2;
  while (pvVar5 != (void *)0x0) {
    piVar8 = piVar8 + 1;
    free(pvVar5);
    pvVar5 = (void *)*piVar8;
  }
LAB_000b5136:
  free(param_2);
LAB_000b4f3f:
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return local_ac;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000ecc40();
}


PUSH EBP
PUSH EDI
MOV EDI,ECX
PUSH ESI
PUSH EBX
CALL 0x00031ed0
ADD EBX,0x95195
SUB ESP,0xa8
MOV dword ptr [ESP + 0x14],EAX
MOV dword ptr [ESP + 0x10],EDX
MOV dword ptr [ESP + 0x18],ECX
MOV EDX,dword ptr GS:[0x14]
MOV dword ptr [ESP + 0x98],EDX
XOR EDX,EDX
PUSH EAX
CALL 0x0002f760
ADD ESP,0x10
MOV dword ptr [ESP + 0x14],EAX
TEST EAX,EAX
JNZ 0x000b4f68
AND EDI,0x1
JZ 0x000b4f38
MOV ESI,dword ptr [ESP + 0x4]
MOV EAX,dword ptr [ESI]
TEST EAX,EAX
JZ 0x000b4f38
LEA EDI,[ESP + 0x2c]
JMP 0x000b4ed1
ADD ESI,0x4
MOV EAX,dword ptr [ESI]
TEST EAX,EAX
JZ 0x000b4f38
SUB ESP,0x4
PUSH EDI
PUSH EAX
PUSH 0x3
CALL 0x0002fc90
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x000b4ec8
MOV EAX,dword ptr [ESP + 0x3c]
AND EAX,0xf000
CMP EAX,0x4000
JNZ 0x000b4ec8
MOV EDX,dword ptr [ESI]
SUB ESP,0xc
PUSH EDX
MOV dword ptr [ESP + 0x10],EDX
CALL 0x0002f760
POP EBP
POP EDX
MOV EBP,EAX
LEA EAX,[EAX + 0x2]
PUSH EAX
MOV EDX,dword ptr [ESP + 0xc]
PUSH EDX
CALL 0x0002f610
ADD ESP,0x10
TEST EAX,EAX
JZ 0x000b50cf
MOV byte ptr [EAX + EBP*0x1],0x2f
ADD ESI,0x4
MOV byte ptr [EAX + EBP*0x1 + 0x1],0x0
MOV dword ptr [ESI + -0x4],EAX
MOV EAX,dword ptr [ESI]
TEST EAX,EAX
JNZ 0x000b4ed1
LEA ESI,[ESI]
MOV EAX,dword ptr [ESP + 0x4]
MOV dword ptr [ESP],EAX
MOV ECX,dword ptr [ESP + 0x8c]
XOR ECX,dword ptr GS:[0x14]
MOV EAX,dword ptr [ESP]
JNZ 0x000b5171
ADD ESP,0x9c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EAX,dword ptr [ESP + 0x8]
MOV EDX,dword ptr [ESP + 0x14]
MOV ECX,dword ptr [ESP + 0x4]
MOVZX EAX,byte ptr [EAX + EDX*0x1 + -0x1]
MOV EDI,dword ptr [ECX]
CMP AL,0x2f
MOV byte ptr [ESP + 0x1b],AL
SETNZ AL
MOV EBP,EAX
TEST EDI,EDI
JZ 0x000b5150
XOR EDX,EDX
JMP 0x000b4f9a
MOV EDX,EAX
LEA EAX,[EDX + 0x1]
MOV ESI,dword ptr [ECX + EAX*0x4]
TEST ESI,ESI
JNZ 0x000b4f98
SUB ESP,0xc
LEA EAX,[EDX*0x4 + 0x8]
PUSH EAX
CALL 0x0002f630
MOV dword ptr [ESP + 0x10],EAX
ADD ESP,0x10
TEST EAX,EAX
JZ 0x000b50cf
MOV ECX,dword ptr [ESP + 0x14]
XOR ESI,ESI
LEA EAX,[ECX + 0x3]
MOV dword ptr [ESP + 0x10],EAX
MOV EAX,EBP
MOVZX EAX,AL
ADD EAX,ECX
MOV dword ptr [ESP + 0x1c],EAX
JMP 0x000b4ff9
MOV EAX,dword ptr [ESP + 0x4]
ADD ESI,0x1
LEA EDX,[ESI*0x4 + 0x0]
MOV EDI,dword ptr [EAX + ESI*0x4]
TEST EDI,EDI
JZ 0x000b5100
SUB ESP,0xc
PUSH EDI
CALL 0x0002f760
ADD EAX,dword ptr [ESP + 0x20]
MOV dword ptr [ESP],EAX
CALL 0x0002f630
MOV EBP,EAX
MOV EAX,dword ptr [ESP + 0x10]
ADD ESP,0x10
MOV dword ptr [EAX + ESI*0x4],EBP
TEST EBP,EBP
JZ 0x000b50b0
SUB ESP,0x8
PUSH dword ptr [ESP + 0x10]
PUSH EBP
CALL 0x0002f580
ADD ESP,0x10
CMP byte ptr [ESP + 0x1b],0x2f
JZ 0x000b5042
MOV EAX,dword ptr [ESP + 0x14]
MOV byte ptr [EBP + EAX*0x1],0x2f
SUB ESP,0x8
PUSH EDI
MOV EAX,dword ptr [ESP + 0x28]
ADD EAX,EBP
PUSH EAX
CALL 0x0002f580
ADD ESP,0x10
TEST byte ptr [ESP + 0xc],0x1
JZ 0x000b4fe0
SUB ESP,0x4
LEA EAX,[ESP + 0x30]
PUSH EAX
PUSH EBP
PUSH 0x3
CALL 0x0002fc90
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x000b4fe0
MOV EAX,dword ptr [ESP + 0x3c]
AND EAX,0xf000
CMP EAX,0x4000
JNZ 0x000b4fe0
MOV EBP,dword ptr [ESP]
SUB ESP,0xc
MOV EDI,dword ptr [EBP + ESI*0x4]
PUSH EDI
CALL 0x0002f760
ADD ESP,0x10
MOV byte ptr [EDI + EAX*0x1],0x2f
MOV EDX,dword ptr [EBP + ESI*0x4]
MOV byte ptr [EDX + EAX*0x1 + 0x1],0x0
JMP 0x000b4fe0
MOV EBP,EAX
LEA EDI,[EAX + ESI*0x4]
TEST ESI,ESI
JNZ 0x000b50e0
LEA ESI,[ESI]
SUB ESP,0xc
PUSH dword ptr [ESP + 0xc]
CALL 0x0002f200
ADD ESP,0x10
MOV dword ptr [ESP],0x0
JMP 0x000b4f3f
SUB ESP,0xc
PUSH dword ptr [EBP]
ADD EBP,0x4
CALL 0x0002f200
ADD ESP,0x10
CMP EDI,EBP
JNZ 0x000b50e0
JMP 0x000b50c0
MOV EAX,dword ptr [EAX]
MOV ECX,dword ptr [ESP]
MOV dword ptr [ECX + EDX*0x1],0x0
TEST EAX,EAX
JZ 0x000b5136
MOV ECX,dword ptr [ESP + 0x4]
LEA ESI,[ECX + 0x4]
LEA ESI,[ESI]
NOP
SUB ESP,0xc
ADD ESI,0x4
PUSH EAX
CALL 0x0002f200
MOV EAX,dword ptr [ESI + -0x4]
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x000b5120
SUB ESP,0xc
PUSH dword ptr [ESP + 0x10]
CALL 0x0002f200
ADD ESP,0x10
JMP 0x000b4f3f
SUB ESP,0xc
PUSH 0x4
CALL 0x0002f630
MOV dword ptr [ESP + 0x10],EAX
ADD ESP,0x10
TEST EAX,EAX
JZ 0x000b50cf
MOV dword ptr [EAX],0x0
JMP 0x000b5136
CALL 0x000ecc40
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint * __regparm3 FUN_000b4e60(char *param_1,int *param_2,uint param_3)\n\n{\n  char cVar1;\n  size_t sVar2;\n  char *pcVar3;\n  int iVar4;\n  void *pvVar5;\n  size_t sVar6;\n  char *__dest;\n  int iVar7;\n  int *piVar8;\n  int in_GS_OFFSET;\n  int *local_ac;\n  stat64 local_80;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0xb4e6b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  sVar2 = strlen(param_1);\n  if (sVar2 == 0) {\n    local_ac = param_2;\n    if (((param_3 & 1) != 0) && (pcVar3 = (char *)*param_2, pcVar3 != (char *)0x0)) {\n      do {\n        while ((iVar4 = __xstat64(3,pcVar3,&local_80), iVar4 != 0 ||\n               ((local_80.st_mode & 0xf000) != 0x4000))) {\n          param_2 = param_2 + 1;\n          pcVar3 = (char *)*param_2;\n          if (pcVar3 == (char *)0x0) goto LAB_000b4f3f;\n        }\n        pcVar3 = (char *)*param_2;\n        sVar2 = strlen(pcVar3);\n        pvVar5 = realloc(pcVar3,sVar2 + 2);\n        if (pvVar5 == (void *)0x0) goto LAB_000b50cf;\n        *(undefined1 *)((int)pvVar5 + sVar2) = 0x2f;\n        *(undefined1 *)((int)pvVar5 + sVar2 + 1) = 0;\n        *param_2 = (int)pvVar5;\n        pcVar3 = (char *)param_2[1];\n        param_2 = param_2 + 1;\n      } while (pcVar3 != (char *)0x0);\n    }\n    goto LAB_000b4f3f;\n  }\n  cVar1 = param_1[sVar2 - 1];\n  pcVar3 = (char *)*param_2;\n  if (pcVar3 == (char *)0x0) {\n    local_ac = (int *)malloc(4);\n    if (local_ac != (int *)0x0) {\n      *local_ac = 0;\n      goto LAB_000b5136;\n    }\n  }\n  else {\n    iVar4 = 0;\n    do {\n      iVar7 = iVar4;\n      iVar4 = iVar7 + 1;\n    } while (param_2[iVar4] != 0);\n    local_ac = (int *)malloc(iVar7 * 4 + 8);\n    if (local_ac != (int *)0x0) {\n      iVar4 = 0;\nLAB_000b4ff9:\n      sVar6 = strlen(pcVar3);\n      __dest = (char *)malloc(sVar6 + sVar2 + 3);\n      local_ac[iVar4] = (int)__dest;\n      if (__dest != (char *)0x0) goto code_r0x000b5022;\n      piVar8 = local_ac;\n      if (iVar4 != 0) {\n        do {\n          pvVar5 = (void *)*piVar8;\n          piVar8 = piVar8 + 1;\n          free(pvVar5);\n        } while (local_ac + iVar4 != piVar8);\n      }\n      free(local_ac);\n    }\n  }\nLAB_000b50cf:\n  local_ac = (int *)0x0;\n  goto LAB_000b4f3f;\ncode_r0x000b5022:\n  strcpy(__dest,param_1);\n  if (cVar1 != '/') {\n    __dest[sVar2] = '/';\n  }\n  strcpy(__dest + (cVar1 != '/') + sVar2,pcVar3);\n  if ((((param_3 & 1) != 0) && (iVar7 = __xstat64(3,__dest,&local_80), iVar7 == 0)) &&\n     ((local_80.st_mode & 0xf000) == 0x4000)) {\n    pcVar3 = (char *)local_ac[iVar4];\n    sVar6 = strlen(pcVar3);\n    pcVar3[sVar6] = '/';\n    *(undefined1 *)(local_ac[iVar4] + 1 + sVar6) = 0;\n  }\n  iVar4 = iVar4 + 1;\n  pcVar3 = (char *)param_2[iVar4];\n  if (pcVar3 == (char *)0x0) goto LAB_000b5100;\n  goto LAB_000b4ff9;\nLAB_000b5100:\n  pvVar5 = (void *)*param_2;\n  local_ac[iVar4] = 0;\n  piVar8 = param_2;\n  while (pvVar5 != (void *)0x0) {\n    piVar8 = piVar8 + 1;\n    free(pvVar5);\n    pvVar5 = (void *)*piVar8;\n  }\nLAB_000b5136:\n  free(param_2);\nLAB_000b4f3f:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_ac;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000ecc40();\n}\n\n" comment (function_definition "int * __regparm3 FUN_000b4e60(char *param_1,int *param_2,uint param_3)\n\n{\n  char cVar1;\n  size_t sVar2;\n  char *pcVar3;\n  int iVar4;\n  void *pvVar5;\n  size_t sVar6;\n  char *__dest;\n  int iVar7;\n  int *piVar8;\n  int in_GS_OFFSET;\n  int *local_ac;\n  stat64 local_80;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0xb4e6b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  sVar2 = strlen(param_1);\n  if (sVar2 == 0) {\n    local_ac = param_2;\n    if (((param_3 & 1) != 0) && (pcVar3 = (char *)*param_2, pcVar3 != (char *)0x0)) {\n      do {\n        while ((iVar4 = __xstat64(3,pcVar3,&local_80), iVar4 != 0 ||\n               ((local_80.st_mode & 0xf000) != 0x4000))) {\n          param_2 = param_2 + 1;\n          pcVar3 = (char *)*param_2;\n          if (pcVar3 == (char *)0x0) goto LAB_000b4f3f;\n        }\n        pcVar3 = (char *)*param_2;\n        sVar2 = strlen(pcVar3);\n        pvVar5 = realloc(pcVar3,sVar2 + 2);\n        if (pvVar5 == (void *)0x0) goto LAB_000b50cf;\n        *(undefined1 *)((int)pvVar5 + sVar2) = 0x2f;\n        *(undefined1 *)((int)pvVar5 + sVar2 + 1) = 0;\n        *param_2 = (int)pvVar5;\n        pcVar3 = (char *)param_2[1];\n        param_2 = param_2 + 1;\n      } while (pcVar3 != (char *)0x0);\n    }\n    goto LAB_000b4f3f;\n  }\n  cVar1 = param_1[sVar2 - 1];\n  pcVar3 = (char *)*param_2;\n  if (pcVar3 == (char *)0x0) {\n    local_ac = (int *)malloc(4);\n    if (local_ac != (int *)0x0) {\n      *local_ac = 0;\n      goto LAB_000b5136;\n    }\n  }\n  else {\n    iVar4 = 0;\n    do {\n      iVar7 = iVar4;\n      iVar4 = iVar7 + 1;\n    } while (param_2[iVar4] != 0);\n    local_ac = (int *)malloc(iVar7 * 4 + 8);\n    if (local_ac != (int *)0x0) {\n      iVar4 = 0;\nLAB_000b4ff9:\n      sVar6 = strlen(pcVar3);\n      __dest = (char *)malloc(sVar6 + sVar2 + 3);\n      local_ac[iVar4] = (int)__dest;\n      if (__dest != (char *)0x0) goto code_r0x000b5022;\n      piVar8 = local_ac;\n      if (iVar4 != 0) {\n        do {\n          pvVar5 = (void *)*piVar8;\n          piVar8 = piVar8 + 1;\n          free(pvVar5);\n        } while (local_ac + iVar4 != piVar8);\n      }\n      free(local_ac);\n    }\n  }\nLAB_000b50cf:\n  local_ac = (int *)0x0;\n  goto LAB_000b4f3f;\ncode_r0x000b5022:\n  strcpy(__dest,param_1);\n  if (cVar1 != '/') {\n    __dest[sVar2] = '/';\n  }\n  strcpy(__dest + (cVar1 != '/') + sVar2,pcVar3);\n  if ((((param_3 & 1) != 0) && (iVar7 = __xstat64(3,__dest,&local_80), iVar7 == 0)) &&\n     ((local_80.st_mode & 0xf000) == 0x4000)) {\n    pcVar3 = (char *)local_ac[iVar4];\n    sVar6 = strlen(pcVar3);\n    pcVar3[sVar6] = '/';\n    *(undefined1 *)(local_ac[iVar4] + 1 + sVar6) = 0;\n  }\n  iVar4 = iVar4 + 1;\n  pcVar3 = (char *)param_2[iVar4];\n  if (pcVar3 == (char *)0x0) goto LAB_000b5100;\n  goto LAB_000b4ff9;\nLAB_000b5100:\n  pvVar5 = (void *)*param_2;\n  local_ac[iVar4] = 0;\n  piVar8 = param_2;\n  while (pvVar5 != (void *)0x0) {\n    piVar8 = piVar8 + 1;\n    free(pvVar5);\n    pvVar5 = (void *)*piVar8;\n  }\nLAB_000b5136:\n  free(param_2);\nLAB_000b4f3f:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_ac;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000ecc40();\n}" primitive_type (pointer_declarator "* __regparm3 FUN_000b4e60(char *param_1,int *param_2,uint param_3)" * (ERROR "__regparm3" identifier) (function_declarator "FUN_000b4e60(char *param_1,int *param_2,uint param_3)" identifier (parameter_list "(char *param_1,int *param_2,uint param_3)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "uint param_3" type_identifier identifier) )))) (compound_statement "{\n  char cVar1;\n  size_t sVar2;\n  char *pcVar3;\n  int iVar4;\n  void *pvVar5;\n  size_t sVar6;\n  char *__dest;\n  int iVar7;\n  int *piVar8;\n  int in_GS_OFFSET;\n  int *local_ac;\n  stat64 local_80;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0xb4e6b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  sVar2 = strlen(param_1);\n  if (sVar2 == 0) {\n    local_ac = param_2;\n    if (((param_3 & 1) != 0) && (pcVar3 = (char *)*param_2, pcVar3 != (char *)0x0)) {\n      do {\n        while ((iVar4 = __xstat64(3,pcVar3,&local_80), iVar4 != 0 ||\n               ((local_80.st_mode & 0xf000) != 0x4000))) {\n          param_2 = param_2 + 1;\n          pcVar3 = (char *)*param_2;\n          if (pcVar3 == (char *)0x0) goto LAB_000b4f3f;\n        }\n        pcVar3 = (char *)*param_2;\n        sVar2 = strlen(pcVar3);\n        pvVar5 = realloc(pcVar3,sVar2 + 2);\n        if (pvVar5 == (void *)0x0) goto LAB_000b50cf;\n        *(undefined1 *)((int)pvVar5 + sVar2) = 0x2f;\n        *(undefined1 *)((int)pvVar5 + sVar2 + 1) = 0;\n        *param_2 = (int)pvVar5;\n        pcVar3 = (char *)param_2[1];\n        param_2 = param_2 + 1;\n      } while (pcVar3 != (char *)0x0);\n    }\n    goto LAB_000b4f3f;\n  }\n  cVar1 = param_1[sVar2 - 1];\n  pcVar3 = (char *)*param_2;\n  if (pcVar3 == (char *)0x0) {\n    local_ac = (int *)malloc(4);\n    if (local_ac != (int *)0x0) {\n      *local_ac = 0;\n      goto LAB_000b5136;\n    }\n  }\n  else {\n    iVar4 = 0;\n    do {\n      iVar7 = iVar4;\n      iVar4 = iVar7 + 1;\n    } while (param_2[iVar4] != 0);\n    local_ac = (int *)malloc(iVar7 * 4 + 8);\n    if (local_ac != (int *)0x0) {\n      iVar4 = 0;\nLAB_000b4ff9:\n      sVar6 = strlen(pcVar3);\n      __dest = (char *)malloc(sVar6 + sVar2 + 3);\n      local_ac[iVar4] = (int)__dest;\n      if (__dest != (char *)0x0) goto code_r0x000b5022;\n      piVar8 = local_ac;\n      if (iVar4 != 0) {\n        do {\n          pvVar5 = (void *)*piVar8;\n          piVar8 = piVar8 + 1;\n          free(pvVar5);\n        } while (local_ac + iVar4 != piVar8);\n      }\n      free(local_ac);\n    }\n  }\nLAB_000b50cf:\n  local_ac = (int *)0x0;\n  goto LAB_000b4f3f;\ncode_r0x000b5022:\n  strcpy(__dest,param_1);\n  if (cVar1 != '/') {\n    __dest[sVar2] = '/';\n  }\n  strcpy(__dest + (cVar1 != '/') + sVar2,pcVar3);\n  if ((((param_3 & 1) != 0) && (iVar7 = __xstat64(3,__dest,&local_80), iVar7 == 0)) &&\n     ((local_80.st_mode & 0xf000) == 0x4000)) {\n    pcVar3 = (char *)local_ac[iVar4];\n    sVar6 = strlen(pcVar3);\n    pcVar3[sVar6] = '/';\n    *(undefined1 *)(local_ac[iVar4] + 1 + sVar6) = 0;\n  }\n  iVar4 = iVar4 + 1;\n  pcVar3 = (char *)param_2[iVar4];\n  if (pcVar3 == (char *)0x0) goto LAB_000b5100;\n  goto LAB_000b4ff9;\nLAB_000b5100:\n  pvVar5 = (void *)*param_2;\n  local_ac[iVar4] = 0;\n  piVar8 = param_2;\n  while (pvVar5 != (void *)0x0) {\n    piVar8 = piVar8 + 1;\n    free(pvVar5);\n    pvVar5 = (void *)*piVar8;\n  }\nLAB_000b5136:\n  free(param_2);\nLAB_000b4f3f:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_ac;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000ecc40();\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "void *pvVar5;" primitive_type (pointer_declarator "*pvVar5" * identifier) ;) (declaration "size_t sVar6;" primitive_type identifier ;) (declaration "char *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "int *piVar8;" primitive_type (pointer_declarator "*piVar8" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "int *local_ac;" primitive_type (pointer_declarator "*local_ac" * identifier) ;) (declaration "stat64 local_80;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0xb4e6b;" (assignment_expression "uStack_14 = 0xb4e6b" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "sVar2 = strlen(param_1);" (assignment_expression "sVar2 = strlen(param_1)" identifier = (call_expression "strlen(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (sVar2 == 0) {\n    local_ac = param_2;\n    if (((param_3 & 1) != 0) && (pcVar3 = (char *)*param_2, pcVar3 != (char *)0x0)) {\n      do {\n        while ((iVar4 = __xstat64(3,pcVar3,&local_80), iVar4 != 0 ||\n               ((local_80.st_mode & 0xf000) != 0x4000))) {\n          param_2 = param_2 + 1;\n          pcVar3 = (char *)*param_2;\n          if (pcVar3 == (char *)0x0) goto LAB_000b4f3f;\n        }\n        pcVar3 = (char *)*param_2;\n        sVar2 = strlen(pcVar3);\n        pvVar5 = realloc(pcVar3,sVar2 + 2);\n        if (pvVar5 == (void *)0x0) goto LAB_000b50cf;\n        *(undefined1 *)((int)pvVar5 + sVar2) = 0x2f;\n        *(undefined1 *)((int)pvVar5 + sVar2 + 1) = 0;\n        *param_2 = (int)pvVar5;\n        pcVar3 = (char *)param_2[1];\n        param_2 = param_2 + 1;\n      } while (pcVar3 != (char *)0x0);\n    }\n    goto LAB_000b4f3f;\n  }" if (parenthesized_expression "(sVar2 == 0)" ( (binary_expression "sVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    local_ac = param_2;\n    if (((param_3 & 1) != 0) && (pcVar3 = (char *)*param_2, pcVar3 != (char *)0x0)) {\n      do {\n        while ((iVar4 = __xstat64(3,pcVar3,&local_80), iVar4 != 0 ||\n               ((local_80.st_mode & 0xf000) != 0x4000))) {\n          param_2 = param_2 + 1;\n          pcVar3 = (char *)*param_2;\n          if (pcVar3 == (char *)0x0) goto LAB_000b4f3f;\n        }\n        pcVar3 = (char *)*param_2;\n        sVar2 = strlen(pcVar3);\n        pvVar5 = realloc(pcVar3,sVar2 + 2);\n        if (pvVar5 == (void *)0x0) goto LAB_000b50cf;\n        *(undefined1 *)((int)pvVar5 + sVar2) = 0x2f;\n        *(undefined1 *)((int)pvVar5 + sVar2 + 1) = 0;\n        *param_2 = (int)pvVar5;\n        pcVar3 = (char *)param_2[1];\n        param_2 = param_2 + 1;\n      } while (pcVar3 != (char *)0x0);\n    }\n    goto LAB_000b4f3f;\n  }" { (expression_statement "local_ac = param_2;" (assignment_expression "local_ac = param_2" identifier = identifier) ;) (if_statement "if (((param_3 & 1) != 0) && (pcVar3 = (char *)*param_2, pcVar3 != (char *)0x0)) {\n      do {\n        while ((iVar4 = __xstat64(3,pcVar3,&local_80), iVar4 != 0 ||\n               ((local_80.st_mode & 0xf000) != 0x4000))) {\n          param_2 = param_2 + 1;\n          pcVar3 = (char *)*param_2;\n          if (pcVar3 == (char *)0x0) goto LAB_000b4f3f;\n        }\n        pcVar3 = (char *)*param_2;\n        sVar2 = strlen(pcVar3);\n        pvVar5 = realloc(pcVar3,sVar2 + 2);\n        if (pvVar5 == (void *)0x0) goto LAB_000b50cf;\n        *(undefined1 *)((int)pvVar5 + sVar2) = 0x2f;\n        *(undefined1 *)((int)pvVar5 + sVar2 + 1) = 0;\n        *param_2 = (int)pvVar5;\n        pcVar3 = (char *)param_2[1];\n        param_2 = param_2 + 1;\n      } while (pcVar3 != (char *)0x0);\n    }" if (parenthesized_expression "(((param_3 & 1) != 0) && (pcVar3 = (char *)*param_2, pcVar3 != (char *)0x0))" ( (binary_expression "((param_3 & 1) != 0) && (pcVar3 = (char *)*param_2, pcVar3 != (char *)0x0)" (parenthesized_expression "((param_3 & 1) != 0)" ( (binary_expression "(param_3 & 1) != 0" (parenthesized_expression "(param_3 & 1)" ( (binary_expression "param_3 & 1" identifier & number_literal) )) != number_literal) )) && (parenthesized_expression "(pcVar3 = (char *)*param_2, pcVar3 != (char *)0x0)" ( (comma_expression "pcVar3 = (char *)*param_2, pcVar3 != (char *)0x0" (assignment_expression "pcVar3 = (char *)*param_2" identifier = (cast_expression "(char *)*param_2" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier))) , (binary_expression "pcVar3 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal))) ))) )) (compound_statement "{\n      do {\n        while ((iVar4 = __xstat64(3,pcVar3,&local_80), iVar4 != 0 ||\n               ((local_80.st_mode & 0xf000) != 0x4000))) {\n          param_2 = param_2 + 1;\n          pcVar3 = (char *)*param_2;\n          if (pcVar3 == (char *)0x0) goto LAB_000b4f3f;\n        }\n        pcVar3 = (char *)*param_2;\n        sVar2 = strlen(pcVar3);\n        pvVar5 = realloc(pcVar3,sVar2 + 2);\n        if (pvVar5 == (void *)0x0) goto LAB_000b50cf;\n        *(undefined1 *)((int)pvVar5 + sVar2) = 0x2f;\n        *(undefined1 *)((int)pvVar5 + sVar2 + 1) = 0;\n        *param_2 = (int)pvVar5;\n        pcVar3 = (char *)param_2[1];\n        param_2 = param_2 + 1;\n      } while (pcVar3 != (char *)0x0);\n    }" { (do_statement "do {\n        while ((iVar4 = __xstat64(3,pcVar3,&local_80), iVar4 != 0 ||\n               ((local_80.st_mode & 0xf000) != 0x4000))) {\n          param_2 = param_2 + 1;\n          pcVar3 = (char *)*param_2;\n          if (pcVar3 == (char *)0x0) goto LAB_000b4f3f;\n        }\n        pcVar3 = (char *)*param_2;\n        sVar2 = strlen(pcVar3);\n        pvVar5 = realloc(pcVar3,sVar2 + 2);\n        if (pvVar5 == (void *)0x0) goto LAB_000b50cf;\n        *(undefined1 *)((int)pvVar5 + sVar2) = 0x2f;\n        *(undefined1 *)((int)pvVar5 + sVar2 + 1) = 0;\n        *param_2 = (int)pvVar5;\n        pcVar3 = (char *)param_2[1];\n        param_2 = param_2 + 1;\n      } while (pcVar3 != (char *)0x0);" do (compound_statement "{\n        while ((iVar4 = __xstat64(3,pcVar3,&local_80), iVar4 != 0 ||\n               ((local_80.st_mode & 0xf000) != 0x4000))) {\n          param_2 = param_2 + 1;\n          pcVar3 = (char *)*param_2;\n          if (pcVar3 == (char *)0x0) goto LAB_000b4f3f;\n        }\n        pcVar3 = (char *)*param_2;\n        sVar2 = strlen(pcVar3);\n        pvVar5 = realloc(pcVar3,sVar2 + 2);\n        if (pvVar5 == (void *)0x0) goto LAB_000b50cf;\n        *(undefined1 *)((int)pvVar5 + sVar2) = 0x2f;\n        *(undefined1 *)((int)pvVar5 + sVar2 + 1) = 0;\n        *param_2 = (int)pvVar5;\n        pcVar3 = (char *)param_2[1];\n        param_2 = param_2 + 1;\n      }" { (while_statement "while ((iVar4 = __xstat64(3,pcVar3,&local_80), iVar4 != 0 ||\n               ((local_80.st_mode & 0xf000) != 0x4000))) {\n          param_2 = param_2 + 1;\n          pcVar3 = (char *)*param_2;\n          if (pcVar3 == (char *)0x0) goto LAB_000b4f3f;\n        }" while (parenthesized_expression "((iVar4 = __xstat64(3,pcVar3,&local_80), iVar4 != 0 ||\n               ((local_80.st_mode & 0xf000) != 0x4000)))" ( (parenthesized_expression "(iVar4 = __xstat64(3,pcVar3,&local_80), iVar4 != 0 ||\n               ((local_80.st_mode & 0xf000) != 0x4000))" ( (comma_expression "iVar4 = __xstat64(3,pcVar3,&local_80), iVar4 != 0 ||\n               ((local_80.st_mode & 0xf000) != 0x4000)" (assignment_expression "iVar4 = __xstat64(3,pcVar3,&local_80)" identifier = (call_expression "__xstat64(3,pcVar3,&local_80)" identifier (argument_list "(3,pcVar3,&local_80)" ( number_literal , identifier , (pointer_expression "&local_80" & identifier) )))) , (binary_expression "iVar4 != 0 ||\n               ((local_80.st_mode & 0xf000) != 0x4000)" (binary_expression "iVar4 != 0" identifier != number_literal) || (parenthesized_expression "((local_80.st_mode & 0xf000) != 0x4000)" ( (binary_expression "(local_80.st_mode & 0xf000) != 0x4000" (parenthesized_expression "(local_80.st_mode & 0xf000)" ( (binary_expression "local_80.st_mode & 0xf000" (field_expression "local_80.st_mode" identifier . field_identifier) & number_literal) )) != number_literal) )))) )) )) (compound_statement "{\n          param_2 = param_2 + 1;\n          pcVar3 = (char *)*param_2;\n          if (pcVar3 == (char *)0x0) goto LAB_000b4f3f;\n        }" { (expression_statement "param_2 = param_2 + 1;" (assignment_expression "param_2 = param_2 + 1" identifier = (binary_expression "param_2 + 1" identifier + number_literal)) ;) (expression_statement "pcVar3 = (char *)*param_2;" (assignment_expression "pcVar3 = (char *)*param_2" identifier = (cast_expression "(char *)*param_2" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier))) ;) (if_statement "if (pcVar3 == (char *)0x0) goto LAB_000b4f3f;" if (parenthesized_expression "(pcVar3 == (char *)0x0)" ( (binary_expression "pcVar3 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_000b4f3f;" goto statement_identifier ;)) })) (expression_statement "pcVar3 = (char *)*param_2;" (assignment_expression "pcVar3 = (char *)*param_2" identifier = (cast_expression "(char *)*param_2" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier))) ;) (expression_statement "sVar2 = strlen(pcVar3);" (assignment_expression "sVar2 = strlen(pcVar3)" identifier = (call_expression "strlen(pcVar3)" identifier (argument_list "(pcVar3)" ( identifier )))) ;) (expression_statement "pvVar5 = realloc(pcVar3,sVar2 + 2);" (assignment_expression "pvVar5 = realloc(pcVar3,sVar2 + 2)" identifier = (call_expression "realloc(pcVar3,sVar2 + 2)" identifier (argument_list "(pcVar3,sVar2 + 2)" ( identifier , (binary_expression "sVar2 + 2" identifier + number_literal) )))) ;) (if_statement "if (pvVar5 == (void *)0x0) goto LAB_000b50cf;" if (parenthesized_expression "(pvVar5 == (void *)0x0)" ( (binary_expression "pvVar5 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_000b50cf;" goto statement_identifier ;)) (expression_statement "*(undefined1 *)((int)pvVar5 + sVar2) = 0x2f;" (assignment_expression "*(undefined1 *)((int)pvVar5 + sVar2) = 0x2f" (pointer_expression "*(undefined1 *)((int)pvVar5 + sVar2)" * (cast_expression "(undefined1 *)((int)pvVar5 + sVar2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar5 + sVar2)" ( (binary_expression "(int)pvVar5 + sVar2" (cast_expression "(int)pvVar5" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) = number_literal) ;) (expression_statement "*(undefined1 *)((int)pvVar5 + sVar2 + 1) = 0;" (assignment_expression "*(undefined1 *)((int)pvVar5 + sVar2 + 1) = 0" (pointer_expression "*(undefined1 *)((int)pvVar5 + sVar2 + 1)" * (cast_expression "(undefined1 *)((int)pvVar5 + sVar2 + 1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar5 + sVar2 + 1)" ( (binary_expression "(int)pvVar5 + sVar2 + 1" (binary_expression "(int)pvVar5 + sVar2" (cast_expression "(int)pvVar5" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) + number_literal) )))) = number_literal) ;) (expression_statement "*param_2 = (int)pvVar5;" (assignment_expression "*param_2 = (int)pvVar5" (pointer_expression "*param_2" * identifier) = (cast_expression "(int)pvVar5" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "pcVar3 = (char *)param_2[1];" (assignment_expression "pcVar3 = (char *)param_2[1]" identifier = (cast_expression "(char *)param_2[1]" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_2[1]" identifier [ number_literal ]))) ;) (expression_statement "param_2 = param_2 + 1;" (assignment_expression "param_2 = param_2 + 1" identifier = (binary_expression "param_2 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(pcVar3 != (char *)0x0)" ( (binary_expression "pcVar3 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) })) (goto_statement "goto LAB_000b4f3f;" goto statement_identifier ;) })) (expression_statement "cVar1 = param_1[sVar2 - 1];" (assignment_expression "cVar1 = param_1[sVar2 - 1]" identifier = (subscript_expression "param_1[sVar2 - 1]" identifier [ (binary_expression "sVar2 - 1" identifier - number_literal) ])) ;) (expression_statement "pcVar3 = (char *)*param_2;" (assignment_expression "pcVar3 = (char *)*param_2" identifier = (cast_expression "(char *)*param_2" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier))) ;) (if_statement "if (pcVar3 == (char *)0x0) {\n    local_ac = (int *)malloc(4);\n    if (local_ac != (int *)0x0) {\n      *local_ac = 0;\n      goto LAB_000b5136;\n    }\n  }\n  else {\n    iVar4 = 0;\n    do {\n      iVar7 = iVar4;\n      iVar4 = iVar7 + 1;\n    } while (param_2[iVar4] != 0);\n    local_ac = (int *)malloc(iVar7 * 4 + 8);\n    if (local_ac != (int *)0x0) {\n      iVar4 = 0;\nLAB_000b4ff9:\n      sVar6 = strlen(pcVar3);\n      __dest = (char *)malloc(sVar6 + sVar2 + 3);\n      local_ac[iVar4] = (int)__dest;\n      if (__dest != (char *)0x0) goto code_r0x000b5022;\n      piVar8 = local_ac;\n      if (iVar4 != 0) {\n        do {\n          pvVar5 = (void *)*piVar8;\n          piVar8 = piVar8 + 1;\n          free(pvVar5);\n        } while (local_ac + iVar4 != piVar8);\n      }\n      free(local_ac);\n    }\n  }" if (parenthesized_expression "(pcVar3 == (char *)0x0)" ( (binary_expression "pcVar3 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    local_ac = (int *)malloc(4);\n    if (local_ac != (int *)0x0) {\n      *local_ac = 0;\n      goto LAB_000b5136;\n    }\n  }" { (expression_statement "local_ac = (int *)malloc(4);" (assignment_expression "local_ac = (int *)malloc(4)" identifier = (cast_expression "(int *)malloc(4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "malloc(4)" identifier (argument_list "(4)" ( number_literal ))))) ;) (if_statement "if (local_ac != (int *)0x0) {\n      *local_ac = 0;\n      goto LAB_000b5136;\n    }" if (parenthesized_expression "(local_ac != (int *)0x0)" ( (binary_expression "local_ac != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      *local_ac = 0;\n      goto LAB_000b5136;\n    }" { (expression_statement "*local_ac = 0;" (assignment_expression "*local_ac = 0" (pointer_expression "*local_ac" * identifier) = number_literal) ;) (goto_statement "goto LAB_000b5136;" goto statement_identifier ;) })) }) (else_clause "else {\n    iVar4 = 0;\n    do {\n      iVar7 = iVar4;\n      iVar4 = iVar7 + 1;\n    } while (param_2[iVar4] != 0);\n    local_ac = (int *)malloc(iVar7 * 4 + 8);\n    if (local_ac != (int *)0x0) {\n      iVar4 = 0;\nLAB_000b4ff9:\n      sVar6 = strlen(pcVar3);\n      __dest = (char *)malloc(sVar6 + sVar2 + 3);\n      local_ac[iVar4] = (int)__dest;\n      if (__dest != (char *)0x0) goto code_r0x000b5022;\n      piVar8 = local_ac;\n      if (iVar4 != 0) {\n        do {\n          pvVar5 = (void *)*piVar8;\n          piVar8 = piVar8 + 1;\n          free(pvVar5);\n        } while (local_ac + iVar4 != piVar8);\n      }\n      free(local_ac);\n    }\n  }" else (compound_statement "{\n    iVar4 = 0;\n    do {\n      iVar7 = iVar4;\n      iVar4 = iVar7 + 1;\n    } while (param_2[iVar4] != 0);\n    local_ac = (int *)malloc(iVar7 * 4 + 8);\n    if (local_ac != (int *)0x0) {\n      iVar4 = 0;\nLAB_000b4ff9:\n      sVar6 = strlen(pcVar3);\n      __dest = (char *)malloc(sVar6 + sVar2 + 3);\n      local_ac[iVar4] = (int)__dest;\n      if (__dest != (char *)0x0) goto code_r0x000b5022;\n      piVar8 = local_ac;\n      if (iVar4 != 0) {\n        do {\n          pvVar5 = (void *)*piVar8;\n          piVar8 = piVar8 + 1;\n          free(pvVar5);\n        } while (local_ac + iVar4 != piVar8);\n      }\n      free(local_ac);\n    }\n  }" { (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (do_statement "do {\n      iVar7 = iVar4;\n      iVar4 = iVar7 + 1;\n    } while (param_2[iVar4] != 0);" do (compound_statement "{\n      iVar7 = iVar4;\n      iVar4 = iVar7 + 1;\n    }" { (expression_statement "iVar7 = iVar4;" (assignment_expression "iVar7 = iVar4" identifier = identifier) ;) (expression_statement "iVar4 = iVar7 + 1;" (assignment_expression "iVar4 = iVar7 + 1" identifier = (binary_expression "iVar7 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(param_2[iVar4] != 0)" ( (binary_expression "param_2[iVar4] != 0" (subscript_expression "param_2[iVar4]" identifier [ identifier ]) != number_literal) )) ;) (expression_statement "local_ac = (int *)malloc(iVar7 * 4 + 8);" (assignment_expression "local_ac = (int *)malloc(iVar7 * 4 + 8)" identifier = (cast_expression "(int *)malloc(iVar7 * 4 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "malloc(iVar7 * 4 + 8)" identifier (argument_list "(iVar7 * 4 + 8)" ( (binary_expression "iVar7 * 4 + 8" (binary_expression "iVar7 * 4" identifier * number_literal) + number_literal) ))))) ;) (if_statement "if (local_ac != (int *)0x0) {\n      iVar4 = 0;\nLAB_000b4ff9:\n      sVar6 = strlen(pcVar3);\n      __dest = (char *)malloc(sVar6 + sVar2 + 3);\n      local_ac[iVar4] = (int)__dest;\n      if (__dest != (char *)0x0) goto code_r0x000b5022;\n      piVar8 = local_ac;\n      if (iVar4 != 0) {\n        do {\n          pvVar5 = (void *)*piVar8;\n          piVar8 = piVar8 + 1;\n          free(pvVar5);\n        } while (local_ac + iVar4 != piVar8);\n      }\n      free(local_ac);\n    }" if (parenthesized_expression "(local_ac != (int *)0x0)" ( (binary_expression "local_ac != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      iVar4 = 0;\nLAB_000b4ff9:\n      sVar6 = strlen(pcVar3);\n      __dest = (char *)malloc(sVar6 + sVar2 + 3);\n      local_ac[iVar4] = (int)__dest;\n      if (__dest != (char *)0x0) goto code_r0x000b5022;\n      piVar8 = local_ac;\n      if (iVar4 != 0) {\n        do {\n          pvVar5 = (void *)*piVar8;\n          piVar8 = piVar8 + 1;\n          free(pvVar5);\n        } while (local_ac + iVar4 != piVar8);\n      }\n      free(local_ac);\n    }" { (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (labeled_statement "LAB_000b4ff9:\n      sVar6 = strlen(pcVar3);" statement_identifier : (expression_statement "sVar6 = strlen(pcVar3);" (assignment_expression "sVar6 = strlen(pcVar3)" identifier = (call_expression "strlen(pcVar3)" identifier (argument_list "(pcVar3)" ( identifier )))) ;)) (expression_statement "__dest = (char *)malloc(sVar6 + sVar2 + 3);" (assignment_expression "__dest = (char *)malloc(sVar6 + sVar2 + 3)" identifier = (cast_expression "(char *)malloc(sVar6 + sVar2 + 3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "malloc(sVar6 + sVar2 + 3)" identifier (argument_list "(sVar6 + sVar2 + 3)" ( (binary_expression "sVar6 + sVar2 + 3" (binary_expression "sVar6 + sVar2" identifier + identifier) + number_literal) ))))) ;) (expression_statement "local_ac[iVar4] = (int)__dest;" (assignment_expression "local_ac[iVar4] = (int)__dest" (subscript_expression "local_ac[iVar4]" identifier [ identifier ]) = (cast_expression "(int)__dest" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (if_statement "if (__dest != (char *)0x0) goto code_r0x000b5022;" if (parenthesized_expression "(__dest != (char *)0x0)" ( (binary_expression "__dest != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto code_r0x000b5022;" goto statement_identifier ;)) (expression_statement "piVar8 = local_ac;" (assignment_expression "piVar8 = local_ac" identifier = identifier) ;) (if_statement "if (iVar4 != 0) {\n        do {\n          pvVar5 = (void *)*piVar8;\n          piVar8 = piVar8 + 1;\n          free(pvVar5);\n        } while (local_ac + iVar4 != piVar8);\n      }" if (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) (compound_statement "{\n        do {\n          pvVar5 = (void *)*piVar8;\n          piVar8 = piVar8 + 1;\n          free(pvVar5);\n        } while (local_ac + iVar4 != piVar8);\n      }" { (do_statement "do {\n          pvVar5 = (void *)*piVar8;\n          piVar8 = piVar8 + 1;\n          free(pvVar5);\n        } while (local_ac + iVar4 != piVar8);" do (compound_statement "{\n          pvVar5 = (void *)*piVar8;\n          piVar8 = piVar8 + 1;\n          free(pvVar5);\n        }" { (expression_statement "pvVar5 = (void *)*piVar8;" (assignment_expression "pvVar5 = (void *)*piVar8" identifier = (cast_expression "(void *)*piVar8" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar8" * identifier))) ;) (expression_statement "piVar8 = piVar8 + 1;" (assignment_expression "piVar8 = piVar8 + 1" identifier = (binary_expression "piVar8 + 1" identifier + number_literal)) ;) (expression_statement "free(pvVar5);" (call_expression "free(pvVar5)" identifier (argument_list "(pvVar5)" ( identifier ))) ;) }) while (parenthesized_expression "(local_ac + iVar4 != piVar8)" ( (binary_expression "local_ac + iVar4 != piVar8" (binary_expression "local_ac + iVar4" identifier + identifier) != identifier) )) ;) })) (expression_statement "free(local_ac);" (call_expression "free(local_ac)" identifier (argument_list "(local_ac)" ( identifier ))) ;) })) }))) (labeled_statement "LAB_000b50cf:\n  local_ac = (int *)0x0;" statement_identifier : (expression_statement "local_ac = (int *)0x0;" (assignment_expression "local_ac = (int *)0x0" identifier = (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;)) (goto_statement "goto LAB_000b4f3f;" goto statement_identifier ;) (labeled_statement "code_r0x000b5022:\n  strcpy(__dest,param_1);" statement_identifier : (expression_statement "strcpy(__dest,param_1);" (call_expression "strcpy(__dest,param_1)" identifier (argument_list "(__dest,param_1)" ( identifier , identifier ))) ;)) (if_statement "if (cVar1 != '/') {\n    __dest[sVar2] = '/';\n  }" if (parenthesized_expression "(cVar1 != '/')" ( (binary_expression "cVar1 != '/'" identifier != (char_literal "'/'" ' character ')) )) (compound_statement "{\n    __dest[sVar2] = '/';\n  }" { (expression_statement "__dest[sVar2] = '/';" (assignment_expression "__dest[sVar2] = '/'" (subscript_expression "__dest[sVar2]" identifier [ identifier ]) = (char_literal "'/'" ' character ')) ;) })) (expression_statement "strcpy(__dest + (cVar1 != '/') + sVar2,pcVar3);" (call_expression "strcpy(__dest + (cVar1 != '/') + sVar2,pcVar3)" identifier (argument_list "(__dest + (cVar1 != '/') + sVar2,pcVar3)" ( (binary_expression "__dest + (cVar1 != '/') + sVar2" (binary_expression "__dest + (cVar1 != '/')" identifier + (parenthesized_expression "(cVar1 != '/')" ( (binary_expression "cVar1 != '/'" identifier != (char_literal "'/'" ' character ')) ))) + identifier) , identifier ))) ;) (if_statement "if ((((param_3 & 1) != 0) && (iVar7 = __xstat64(3,__dest,&local_80), iVar7 == 0)) &&\n     ((local_80.st_mode & 0xf000) == 0x4000)) {\n    pcVar3 = (char *)local_ac[iVar4];\n    sVar6 = strlen(pcVar3);\n    pcVar3[sVar6] = '/';\n    *(undefined1 *)(local_ac[iVar4] + 1 + sVar6) = 0;\n  }" if (parenthesized_expression "((((param_3 & 1) != 0) && (iVar7 = __xstat64(3,__dest,&local_80), iVar7 == 0)) &&\n     ((local_80.st_mode & 0xf000) == 0x4000))" ( (binary_expression "(((param_3 & 1) != 0) && (iVar7 = __xstat64(3,__dest,&local_80), iVar7 == 0)) &&\n     ((local_80.st_mode & 0xf000) == 0x4000)" (parenthesized_expression "(((param_3 & 1) != 0) && (iVar7 = __xstat64(3,__dest,&local_80), iVar7 == 0))" ( (binary_expression "((param_3 & 1) != 0) && (iVar7 = __xstat64(3,__dest,&local_80), iVar7 == 0)" (parenthesized_expression "((param_3 & 1) != 0)" ( (binary_expression "(param_3 & 1) != 0" (parenthesized_expression "(param_3 & 1)" ( (binary_expression "param_3 & 1" identifier & number_literal) )) != number_literal) )) && (parenthesized_expression "(iVar7 = __xstat64(3,__dest,&local_80), iVar7 == 0)" ( (comma_expression "iVar7 = __xstat64(3,__dest,&local_80), iVar7 == 0" (assignment_expression "iVar7 = __xstat64(3,__dest,&local_80)" identifier = (call_expression "__xstat64(3,__dest,&local_80)" identifier (argument_list "(3,__dest,&local_80)" ( number_literal , identifier , (pointer_expression "&local_80" & identifier) )))) , (binary_expression "iVar7 == 0" identifier == number_literal)) ))) )) && (parenthesized_expression "((local_80.st_mode & 0xf000) == 0x4000)" ( (binary_expression "(local_80.st_mode & 0xf000) == 0x4000" (parenthesized_expression "(local_80.st_mode & 0xf000)" ( (binary_expression "local_80.st_mode & 0xf000" (field_expression "local_80.st_mode" identifier . field_identifier) & number_literal) )) == number_literal) ))) )) (compound_statement "{\n    pcVar3 = (char *)local_ac[iVar4];\n    sVar6 = strlen(pcVar3);\n    pcVar3[sVar6] = '/';\n    *(undefined1 *)(local_ac[iVar4] + 1 + sVar6) = 0;\n  }" { (expression_statement "pcVar3 = (char *)local_ac[iVar4];" (assignment_expression "pcVar3 = (char *)local_ac[iVar4]" identifier = (cast_expression "(char *)local_ac[iVar4]" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "local_ac[iVar4]" identifier [ identifier ]))) ;) (expression_statement "sVar6 = strlen(pcVar3);" (assignment_expression "sVar6 = strlen(pcVar3)" identifier = (call_expression "strlen(pcVar3)" identifier (argument_list "(pcVar3)" ( identifier )))) ;) (expression_statement "pcVar3[sVar6] = '/';" (assignment_expression "pcVar3[sVar6] = '/'" (subscript_expression "pcVar3[sVar6]" identifier [ identifier ]) = (char_literal "'/'" ' character ')) ;) (expression_statement "*(undefined1 *)(local_ac[iVar4] + 1 + sVar6) = 0;" (assignment_expression "*(undefined1 *)(local_ac[iVar4] + 1 + sVar6) = 0" (pointer_expression "*(undefined1 *)(local_ac[iVar4] + 1 + sVar6)" * (cast_expression "(undefined1 *)(local_ac[iVar4] + 1 + sVar6)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_ac[iVar4] + 1 + sVar6)" ( (binary_expression "local_ac[iVar4] + 1 + sVar6" (binary_expression "local_ac[iVar4] + 1" (subscript_expression "local_ac[iVar4]" identifier [ identifier ]) + number_literal) + identifier) )))) = number_literal) ;) })) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) (expression_statement "pcVar3 = (char *)param_2[iVar4];" (assignment_expression "pcVar3 = (char *)param_2[iVar4]" identifier = (cast_expression "(char *)param_2[iVar4]" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_2[iVar4]" identifier [ identifier ]))) ;) (if_statement "if (pcVar3 == (char *)0x0) goto LAB_000b5100;" if (parenthesized_expression "(pcVar3 == (char *)0x0)" ( (binary_expression "pcVar3 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_000b5100;" goto statement_identifier ;)) (goto_statement "goto LAB_000b4ff9;" goto statement_identifier ;) (labeled_statement "LAB_000b5100:\n  pvVar5 = (void *)*param_2;" statement_identifier : (expression_statement "pvVar5 = (void *)*param_2;" (assignment_expression "pvVar5 = (void *)*param_2" identifier = (cast_expression "(void *)*param_2" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier))) ;)) (expression_statement "local_ac[iVar4] = 0;" (assignment_expression "local_ac[iVar4] = 0" (subscript_expression "local_ac[iVar4]" identifier [ identifier ]) = number_literal) ;) (expression_statement "piVar8 = param_2;" (assignment_expression "piVar8 = param_2" identifier = identifier) ;) (while_statement "while (pvVar5 != (void *)0x0) {\n    piVar8 = piVar8 + 1;\n    free(pvVar5);\n    pvVar5 = (void *)*piVar8;\n  }" while (parenthesized_expression "(pvVar5 != (void *)0x0)" ( (binary_expression "pvVar5 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    piVar8 = piVar8 + 1;\n    free(pvVar5);\n    pvVar5 = (void *)*piVar8;\n  }" { (expression_statement "piVar8 = piVar8 + 1;" (assignment_expression "piVar8 = piVar8 + 1" identifier = (binary_expression "piVar8 + 1" identifier + number_literal)) ;) (expression_statement "free(pvVar5);" (call_expression "free(pvVar5)" identifier (argument_list "(pvVar5)" ( identifier ))) ;) (expression_statement "pvVar5 = (void *)*piVar8;" (assignment_expression "pvVar5 = (void *)*piVar8" identifier = (cast_expression "(void *)*piVar8" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar8" * identifier))) ;) })) (labeled_statement "LAB_000b5136:\n  free(param_2);" statement_identifier : (expression_statement "free(param_2);" (call_expression "free(param_2)" identifier (argument_list "(param_2)" ( identifier ))) ;)) (labeled_statement "LAB_000b4f3f:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_ac;\n  }" statement_identifier : (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_ac;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return local_ac;\n  }" { (return_statement "return local_ac;" return identifier ;) }))) comment (expression_statement "FUN_000ecc40();" (call_expression "FUN_000ecc40()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nchar ** __regparm3 glob_dir_to_array(char *dir,char **array,int flags)\n\n{\n  char cVar1;\n  int iVar2;\n  size_t sVar3;\n  int iVar4;\n  char *pcVar5;\n  size_t sVar6;\n  char *__dest;\n  int iVar7;\n  char **ppcVar8;\n  int in_GS_OFFSET;\n  char **local_ac;\n  stat sb;\n  \n  iVar2 = *(int *)(in_GS_OFFSET + 0x14);\n  sVar3 = strlen(dir);\n  if (sVar3 == 0) {\n    local_ac = array;\n    if (((flags & 1U) != 0) && (pcVar5 = *array, pcVar5 != (char *)0x0)) {\n      ppcVar8 = array;\n      do {\n        while ((iVar4 = __xstat64(3,pcVar5,(stat64 *)&sb), iVar4 != 0 ||\n               ((sb.st_mode & 0xf000) != 0x4000))) {\n          ppcVar8 = ppcVar8 + 1;\n          pcVar5 = *ppcVar8;\n          if (pcVar5 == (char *)0x0) goto LAB_000b4f3f;\n        }\n        pcVar5 = *ppcVar8;\n        sVar3 = strlen(pcVar5);\n        pcVar5 = (char *)realloc(pcVar5,sVar3 + 2);\n        if (pcVar5 == (char *)0x0) goto LAB_000b50cf;\n        pcVar5[sVar3] = '/';\n        pcVar5[sVar3 + 1] = '\0';\n        *ppcVar8 = pcVar5;\n        pcVar5 = ppcVar8[1];\n        ppcVar8 = ppcVar8 + 1;\n      } while (pcVar5 != (char *)0x0);\n    }\n    goto LAB_000b4f3f;\n  }\n  cVar1 = dir[sVar3 - 1];\n  pcVar5 = *array;\n  if (pcVar5 == (char *)0x0) {\n    local_ac = (char **)malloc(4);\n    if (local_ac != (char **)0x0) {\n      *local_ac = (char *)0x0;\n      goto LAB_000b5136;\n    }\n  }\n  else {\n    iVar4 = 0;\n    do {\n      iVar7 = iVar4;\n      iVar4 = iVar7 + 1;\n    } while (array[iVar4] != (char *)0x0);\n    local_ac = (char **)malloc(iVar7 * 4 + 8);\n    if (local_ac != (char **)0x0) {\n      iVar4 = 0;\nLAB_000b4ff9:\n      sVar6 = strlen(pcVar5);\n      __dest = (char *)malloc(sVar6 + sVar3 + 3);\n      local_ac[iVar4] = __dest;\n      if (__dest != (char *)0x0) goto code_r0x000b5022;\n      ppcVar8 = local_ac;\n      if (iVar4 != 0) {\n        do {\n          pcVar5 = *ppcVar8;\n          ppcVar8 = ppcVar8 + 1;\n          free(pcVar5);\n        } while (local_ac + iVar4 != ppcVar8);\n      }\n      free(local_ac);\n    }\n  }\nLAB_000b50cf:\n  local_ac = (char **)0x0;\n  goto LAB_000b4f3f;\ncode_r0x000b5022:\n  strcpy(__dest,dir);\n  if (cVar1 != '/') {\n    __dest[sVar3] = '/';\n  }\n  strcpy(__dest + (cVar1 != '/') + sVar3,pcVar5);\n  if ((((flags & 1U) != 0) && (iVar7 = __xstat64(3,__dest,(stat64 *)&sb), iVar7 == 0)) &&\n     ((sb.st_mode & 0xf000) == 0x4000)) {\n    pcVar5 = local_ac[iVar4];\n    sVar6 = strlen(pcVar5);\n    pcVar5[sVar6] = '/';\n    local_ac[iVar4][sVar6 + 1] = '\0';\n  }\n  iVar4 = iVar4 + 1;\n  pcVar5 = array[iVar4];\n  if (pcVar5 == (char *)0x0) goto LAB_000b5100;\n  goto LAB_000b4ff9;\nLAB_000b5100:\n  pcVar5 = *array;\n  local_ac[iVar4] = (char *)0x0;\n  ppcVar8 = array;\n  while (pcVar5 != (char *)0x0) {\n    ppcVar8 = ppcVar8 + 1;\n    free(pcVar5);\n    pcVar5 = *ppcVar8;\n  }\nLAB_000b5136:\n  free(array);\nLAB_000b4f3f:\n  if (iVar2 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_ac;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment (function_definition "char ** __regparm3 glob_dir_to_array(char *dir,char **array,int flags)\n\n{\n  char cVar1;\n  int iVar2;\n  size_t sVar3;\n  int iVar4;\n  char *pcVar5;\n  size_t sVar6;\n  char *__dest;\n  int iVar7;\n  char **ppcVar8;\n  int in_GS_OFFSET;\n  char **local_ac;\n  stat sb;\n  \n  iVar2 = *(int *)(in_GS_OFFSET + 0x14);\n  sVar3 = strlen(dir);\n  if (sVar3 == 0) {\n    local_ac = array;\n    if (((flags & 1U) != 0) && (pcVar5 = *array, pcVar5 != (char *)0x0)) {\n      ppcVar8 = array;\n      do {\n        while ((iVar4 = __xstat64(3,pcVar5,(stat64 *)&sb), iVar4 != 0 ||\n               ((sb.st_mode & 0xf000) != 0x4000))) {\n          ppcVar8 = ppcVar8 + 1;\n          pcVar5 = *ppcVar8;\n          if (pcVar5 == (char *)0x0) goto LAB_000b4f3f;\n        }\n        pcVar5 = *ppcVar8;\n        sVar3 = strlen(pcVar5);\n        pcVar5 = (char *)realloc(pcVar5,sVar3 + 2);\n        if (pcVar5 == (char *)0x0) goto LAB_000b50cf;\n        pcVar5[sVar3] = '/';\n        pcVar5[sVar3 + 1] = '\0';\n        *ppcVar8 = pcVar5;\n        pcVar5 = ppcVar8[1];\n        ppcVar8 = ppcVar8 + 1;\n      } while (pcVar5 != (char *)0x0);\n    }\n    goto LAB_000b4f3f;\n  }\n  cVar1 = dir[sVar3 - 1];\n  pcVar5 = *array;\n  if (pcVar5 == (char *)0x0) {\n    local_ac = (char **)malloc(4);\n    if (local_ac != (char **)0x0) {\n      *local_ac = (char *)0x0;\n      goto LAB_000b5136;\n    }\n  }\n  else {\n    iVar4 = 0;\n    do {\n      iVar7 = iVar4;\n      iVar4 = iVar7 + 1;\n    } while (array[iVar4] != (char *)0x0);\n    local_ac = (char **)malloc(iVar7 * 4 + 8);\n    if (local_ac != (char **)0x0) {\n      iVar4 = 0;\nLAB_000b4ff9:\n      sVar6 = strlen(pcVar5);\n      __dest = (char *)malloc(sVar6 + sVar3 + 3);\n      local_ac[iVar4] = __dest;\n      if (__dest != (char *)0x0) goto code_r0x000b5022;\n      ppcVar8 = local_ac;\n      if (iVar4 != 0) {\n        do {\n          pcVar5 = *ppcVar8;\n          ppcVar8 = ppcVar8 + 1;\n          free(pcVar5);\n        } while (local_ac + iVar4 != ppcVar8);\n      }\n      free(local_ac);\n    }\n  }\nLAB_000b50cf:\n  local_ac = (char **)0x0;\n  goto LAB_000b4f3f;\ncode_r0x000b5022:\n  strcpy(__dest,dir);\n  if (cVar1 != '/') {\n    __dest[sVar3] = '/';\n  }\n  strcpy(__dest + (cVar1 != '/') + sVar3,pcVar5);\n  if ((((flags & 1U) != 0) && (iVar7 = __xstat64(3,__dest,(stat64 *)&sb), iVar7 == 0)) &&\n     ((sb.st_mode & 0xf000) == 0x4000)) {\n    pcVar5 = local_ac[iVar4];\n    sVar6 = strlen(pcVar5);\n    pcVar5[sVar6] = '/';\n    local_ac[iVar4][sVar6 + 1] = '\0';\n  }\n  iVar4 = iVar4 + 1;\n  pcVar5 = array[iVar4];\n  if (pcVar5 == (char *)0x0) goto LAB_000b5100;\n  goto LAB_000b4ff9;\nLAB_000b5100:\n  pcVar5 = *array;\n  local_ac[iVar4] = (char *)0x0;\n  ppcVar8 = array;\n  while (pcVar5 != (char *)0x0) {\n    ppcVar8 = ppcVar8 + 1;\n    free(pcVar5);\n    pcVar5 = *ppcVar8;\n  }\nLAB_000b5136:\n  free(array);\nLAB_000b4f3f:\n  if (iVar2 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_ac;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (pointer_declarator "** __regparm3 glob_dir_to_array(char *dir,char **array,int flags)" * (pointer_declarator "* __regparm3 glob_dir_to_array(char *dir,char **array,int flags)" * (ERROR "__regparm3" identifier) (function_declarator "glob_dir_to_array(char *dir,char **array,int flags)" identifier (parameter_list "(char *dir,char **array,int flags)" ( (parameter_declaration "char *dir" primitive_type (pointer_declarator "*dir" * identifier)) , (parameter_declaration "char **array" primitive_type (pointer_declarator "**array" * (pointer_declarator "*array" * identifier))) , (parameter_declaration "int flags" primitive_type identifier) ))))) (compound_statement "{\n  char cVar1;\n  int iVar2;\n  size_t sVar3;\n  int iVar4;\n  char *pcVar5;\n  size_t sVar6;\n  char *__dest;\n  int iVar7;\n  char **ppcVar8;\n  int in_GS_OFFSET;\n  char **local_ac;\n  stat sb;\n  \n  iVar2 = *(int *)(in_GS_OFFSET + 0x14);\n  sVar3 = strlen(dir);\n  if (sVar3 == 0) {\n    local_ac = array;\n    if (((flags & 1U) != 0) && (pcVar5 = *array, pcVar5 != (char *)0x0)) {\n      ppcVar8 = array;\n      do {\n        while ((iVar4 = __xstat64(3,pcVar5,(stat64 *)&sb), iVar4 != 0 ||\n               ((sb.st_mode & 0xf000) != 0x4000))) {\n          ppcVar8 = ppcVar8 + 1;\n          pcVar5 = *ppcVar8;\n          if (pcVar5 == (char *)0x0) goto LAB_000b4f3f;\n        }\n        pcVar5 = *ppcVar8;\n        sVar3 = strlen(pcVar5);\n        pcVar5 = (char *)realloc(pcVar5,sVar3 + 2);\n        if (pcVar5 == (char *)0x0) goto LAB_000b50cf;\n        pcVar5[sVar3] = '/';\n        pcVar5[sVar3 + 1] = '\0';\n        *ppcVar8 = pcVar5;\n        pcVar5 = ppcVar8[1];\n        ppcVar8 = ppcVar8 + 1;\n      } while (pcVar5 != (char *)0x0);\n    }\n    goto LAB_000b4f3f;\n  }\n  cVar1 = dir[sVar3 - 1];\n  pcVar5 = *array;\n  if (pcVar5 == (char *)0x0) {\n    local_ac = (char **)malloc(4);\n    if (local_ac != (char **)0x0) {\n      *local_ac = (char *)0x0;\n      goto LAB_000b5136;\n    }\n  }\n  else {\n    iVar4 = 0;\n    do {\n      iVar7 = iVar4;\n      iVar4 = iVar7 + 1;\n    } while (array[iVar4] != (char *)0x0);\n    local_ac = (char **)malloc(iVar7 * 4 + 8);\n    if (local_ac != (char **)0x0) {\n      iVar4 = 0;\nLAB_000b4ff9:\n      sVar6 = strlen(pcVar5);\n      __dest = (char *)malloc(sVar6 + sVar3 + 3);\n      local_ac[iVar4] = __dest;\n      if (__dest != (char *)0x0) goto code_r0x000b5022;\n      ppcVar8 = local_ac;\n      if (iVar4 != 0) {\n        do {\n          pcVar5 = *ppcVar8;\n          ppcVar8 = ppcVar8 + 1;\n          free(pcVar5);\n        } while (local_ac + iVar4 != ppcVar8);\n      }\n      free(local_ac);\n    }\n  }\nLAB_000b50cf:\n  local_ac = (char **)0x0;\n  goto LAB_000b4f3f;\ncode_r0x000b5022:\n  strcpy(__dest,dir);\n  if (cVar1 != '/') {\n    __dest[sVar3] = '/';\n  }\n  strcpy(__dest + (cVar1 != '/') + sVar3,pcVar5);\n  if ((((flags & 1U) != 0) && (iVar7 = __xstat64(3,__dest,(stat64 *)&sb), iVar7 == 0)) &&\n     ((sb.st_mode & 0xf000) == 0x4000)) {\n    pcVar5 = local_ac[iVar4];\n    sVar6 = strlen(pcVar5);\n    pcVar5[sVar6] = '/';\n    local_ac[iVar4][sVar6 + 1] = '\0';\n  }\n  iVar4 = iVar4 + 1;\n  pcVar5 = array[iVar4];\n  if (pcVar5 == (char *)0x0) goto LAB_000b5100;\n  goto LAB_000b4ff9;\nLAB_000b5100:\n  pcVar5 = *array;\n  local_ac[iVar4] = (char *)0x0;\n  ppcVar8 = array;\n  while (pcVar5 != (char *)0x0) {\n    ppcVar8 = ppcVar8 + 1;\n    free(pcVar5);\n    pcVar5 = *ppcVar8;\n  }\nLAB_000b5136:\n  free(array);\nLAB_000b4f3f:\n  if (iVar2 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_ac;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "size_t sVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "char *pcVar5;" primitive_type (pointer_declarator "*pcVar5" * identifier) ;) (declaration "size_t sVar6;" primitive_type identifier ;) (declaration "char *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "char **ppcVar8;" primitive_type (pointer_declarator "**ppcVar8" * (pointer_declarator "*ppcVar8" * identifier)) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char **local_ac;" primitive_type (pointer_declarator "**local_ac" * (pointer_declarator "*local_ac" * identifier)) ;) (declaration "stat sb;" type_identifier identifier ;) (expression_statement "iVar2 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar2 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "sVar3 = strlen(dir);" (assignment_expression "sVar3 = strlen(dir)" identifier = (call_expression "strlen(dir)" identifier (argument_list "(dir)" ( identifier )))) ;) (if_statement "if (sVar3 == 0) {\n    local_ac = array;\n    if (((flags & 1U) != 0) && (pcVar5 = *array, pcVar5 != (char *)0x0)) {\n      ppcVar8 = array;\n      do {\n        while ((iVar4 = __xstat64(3,pcVar5,(stat64 *)&sb), iVar4 != 0 ||\n               ((sb.st_mode & 0xf000) != 0x4000))) {\n          ppcVar8 = ppcVar8 + 1;\n          pcVar5 = *ppcVar8;\n          if (pcVar5 == (char *)0x0) goto LAB_000b4f3f;\n        }\n        pcVar5 = *ppcVar8;\n        sVar3 = strlen(pcVar5);\n        pcVar5 = (char *)realloc(pcVar5,sVar3 + 2);\n        if (pcVar5 == (char *)0x0) goto LAB_000b50cf;\n        pcVar5[sVar3] = '/';\n        pcVar5[sVar3 + 1] = '\0';\n        *ppcVar8 = pcVar5;\n        pcVar5 = ppcVar8[1];\n        ppcVar8 = ppcVar8 + 1;\n      } while (pcVar5 != (char *)0x0);\n    }\n    goto LAB_000b4f3f;\n  }" if (parenthesized_expression "(sVar3 == 0)" ( (binary_expression "sVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    local_ac = array;\n    if (((flags & 1U) != 0) && (pcVar5 = *array, pcVar5 != (char *)0x0)) {\n      ppcVar8 = array;\n      do {\n        while ((iVar4 = __xstat64(3,pcVar5,(stat64 *)&sb), iVar4 != 0 ||\n               ((sb.st_mode & 0xf000) != 0x4000))) {\n          ppcVar8 = ppcVar8 + 1;\n          pcVar5 = *ppcVar8;\n          if (pcVar5 == (char *)0x0) goto LAB_000b4f3f;\n        }\n        pcVar5 = *ppcVar8;\n        sVar3 = strlen(pcVar5);\n        pcVar5 = (char *)realloc(pcVar5,sVar3 + 2);\n        if (pcVar5 == (char *)0x0) goto LAB_000b50cf;\n        pcVar5[sVar3] = '/';\n        pcVar5[sVar3 + 1] = '\0';\n        *ppcVar8 = pcVar5;\n        pcVar5 = ppcVar8[1];\n        ppcVar8 = ppcVar8 + 1;\n      } while (pcVar5 != (char *)0x0);\n    }\n    goto LAB_000b4f3f;\n  }" { (expression_statement "local_ac = array;" (assignment_expression "local_ac = array" identifier = identifier) ;) (if_statement "if (((flags & 1U) != 0) && (pcVar5 = *array, pcVar5 != (char *)0x0)) {\n      ppcVar8 = array;\n      do {\n        while ((iVar4 = __xstat64(3,pcVar5,(stat64 *)&sb), iVar4 != 0 ||\n               ((sb.st_mode & 0xf000) != 0x4000))) {\n          ppcVar8 = ppcVar8 + 1;\n          pcVar5 = *ppcVar8;\n          if (pcVar5 == (char *)0x0) goto LAB_000b4f3f;\n        }\n        pcVar5 = *ppcVar8;\n        sVar3 = strlen(pcVar5);\n        pcVar5 = (char *)realloc(pcVar5,sVar3 + 2);\n        if (pcVar5 == (char *)0x0) goto LAB_000b50cf;\n        pcVar5[sVar3] = '/';\n        pcVar5[sVar3 + 1] = '\0';\n        *ppcVar8 = pcVar5;\n        pcVar5 = ppcVar8[1];\n        ppcVar8 = ppcVar8 + 1;\n      } while (pcVar5 != (char *)0x0);\n    }" if (parenthesized_expression "(((flags & 1U) != 0) && (pcVar5 = *array, pcVar5 != (char *)0x0))" ( (binary_expression "((flags & 1U) != 0) && (pcVar5 = *array, pcVar5 != (char *)0x0)" (parenthesized_expression "((flags & 1U) != 0)" ( (binary_expression "(flags & 1U) != 0" (parenthesized_expression "(flags & 1U)" ( (binary_expression "flags & 1U" identifier & number_literal) )) != number_literal) )) && (parenthesized_expression "(pcVar5 = *array, pcVar5 != (char *)0x0)" ( (comma_expression "pcVar5 = *array, pcVar5 != (char *)0x0" (assignment_expression "pcVar5 = *array" identifier = (pointer_expression "*array" * identifier)) , (binary_expression "pcVar5 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal))) ))) )) (compound_statement "{\n      ppcVar8 = array;\n      do {\n        while ((iVar4 = __xstat64(3,pcVar5,(stat64 *)&sb), iVar4 != 0 ||\n               ((sb.st_mode & 0xf000) != 0x4000))) {\n          ppcVar8 = ppcVar8 + 1;\n          pcVar5 = *ppcVar8;\n          if (pcVar5 == (char *)0x0) goto LAB_000b4f3f;\n        }\n        pcVar5 = *ppcVar8;\n        sVar3 = strlen(pcVar5);\n        pcVar5 = (char *)realloc(pcVar5,sVar3 + 2);\n        if (pcVar5 == (char *)0x0) goto LAB_000b50cf;\n        pcVar5[sVar3] = '/';\n        pcVar5[sVar3 + 1] = '\0';\n        *ppcVar8 = pcVar5;\n        pcVar5 = ppcVar8[1];\n        ppcVar8 = ppcVar8 + 1;\n      } while (pcVar5 != (char *)0x0);\n    }" { (expression_statement "ppcVar8 = array;" (assignment_expression "ppcVar8 = array" identifier = identifier) ;) (do_statement "do {\n        while ((iVar4 = __xstat64(3,pcVar5,(stat64 *)&sb), iVar4 != 0 ||\n               ((sb.st_mode & 0xf000) != 0x4000))) {\n          ppcVar8 = ppcVar8 + 1;\n          pcVar5 = *ppcVar8;\n          if (pcVar5 == (char *)0x0) goto LAB_000b4f3f;\n        }\n        pcVar5 = *ppcVar8;\n        sVar3 = strlen(pcVar5);\n        pcVar5 = (char *)realloc(pcVar5,sVar3 + 2);\n        if (pcVar5 == (char *)0x0) goto LAB_000b50cf;\n        pcVar5[sVar3] = '/';\n        pcVar5[sVar3 + 1] = '\0';\n        *ppcVar8 = pcVar5;\n        pcVar5 = ppcVar8[1];\n        ppcVar8 = ppcVar8 + 1;\n      } while (pcVar5 != (char *)0x0);" do (compound_statement "{\n        while ((iVar4 = __xstat64(3,pcVar5,(stat64 *)&sb), iVar4 != 0 ||\n               ((sb.st_mode & 0xf000) != 0x4000))) {\n          ppcVar8 = ppcVar8 + 1;\n          pcVar5 = *ppcVar8;\n          if (pcVar5 == (char *)0x0) goto LAB_000b4f3f;\n        }\n        pcVar5 = *ppcVar8;\n        sVar3 = strlen(pcVar5);\n        pcVar5 = (char *)realloc(pcVar5,sVar3 + 2);\n        if (pcVar5 == (char *)0x0) goto LAB_000b50cf;\n        pcVar5[sVar3] = '/';\n        pcVar5[sVar3 + 1] = '\0';\n        *ppcVar8 = pcVar5;\n        pcVar5 = ppcVar8[1];\n        ppcVar8 = ppcVar8 + 1;\n      }" { (while_statement "while ((iVar4 = __xstat64(3,pcVar5,(stat64 *)&sb), iVar4 != 0 ||\n               ((sb.st_mode & 0xf000) != 0x4000))) {\n          ppcVar8 = ppcVar8 + 1;\n          pcVar5 = *ppcVar8;\n          if (pcVar5 == (char *)0x0) goto LAB_000b4f3f;\n        }" while (parenthesized_expression "((iVar4 = __xstat64(3,pcVar5,(stat64 *)&sb), iVar4 != 0 ||\n               ((sb.st_mode & 0xf000) != 0x4000)))" ( (parenthesized_expression "(iVar4 = __xstat64(3,pcVar5,(stat64 *)&sb), iVar4 != 0 ||\n               ((sb.st_mode & 0xf000) != 0x4000))" ( (comma_expression "iVar4 = __xstat64(3,pcVar5,(stat64 *)&sb), iVar4 != 0 ||\n               ((sb.st_mode & 0xf000) != 0x4000)" (assignment_expression "iVar4 = __xstat64(3,pcVar5,(stat64 *)&sb)" identifier = (call_expression "__xstat64(3,pcVar5,(stat64 *)&sb)" identifier (argument_list "(3,pcVar5,(stat64 *)&sb)" ( number_literal , identifier , (cast_expression "(stat64 *)&sb" ( (type_descriptor "stat64 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&sb" & identifier)) )))) , (binary_expression "iVar4 != 0 ||\n               ((sb.st_mode & 0xf000) != 0x4000)" (binary_expression "iVar4 != 0" identifier != number_literal) || (parenthesized_expression "((sb.st_mode & 0xf000) != 0x4000)" ( (binary_expression "(sb.st_mode & 0xf000) != 0x4000" (parenthesized_expression "(sb.st_mode & 0xf000)" ( (binary_expression "sb.st_mode & 0xf000" (field_expression "sb.st_mode" identifier . field_identifier) & number_literal) )) != number_literal) )))) )) )) (compound_statement "{\n          ppcVar8 = ppcVar8 + 1;\n          pcVar5 = *ppcVar8;\n          if (pcVar5 == (char *)0x0) goto LAB_000b4f3f;\n        }" { (expression_statement "ppcVar8 = ppcVar8 + 1;" (assignment_expression "ppcVar8 = ppcVar8 + 1" identifier = (binary_expression "ppcVar8 + 1" identifier + number_literal)) ;) (expression_statement "pcVar5 = *ppcVar8;" (assignment_expression "pcVar5 = *ppcVar8" identifier = (pointer_expression "*ppcVar8" * identifier)) ;) (if_statement "if (pcVar5 == (char *)0x0) goto LAB_000b4f3f;" if (parenthesized_expression "(pcVar5 == (char *)0x0)" ( (binary_expression "pcVar5 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_000b4f3f;" goto statement_identifier ;)) })) (expression_statement "pcVar5 = *ppcVar8;" (assignment_expression "pcVar5 = *ppcVar8" identifier = (pointer_expression "*ppcVar8" * identifier)) ;) (expression_statement "sVar3 = strlen(pcVar5);" (assignment_expression "sVar3 = strlen(pcVar5)" identifier = (call_expression "strlen(pcVar5)" identifier (argument_list "(pcVar5)" ( identifier )))) ;) (expression_statement "pcVar5 = (char *)realloc(pcVar5,sVar3 + 2);" (assignment_expression "pcVar5 = (char *)realloc(pcVar5,sVar3 + 2)" identifier = (cast_expression "(char *)realloc(pcVar5,sVar3 + 2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "realloc(pcVar5,sVar3 + 2)" identifier (argument_list "(pcVar5,sVar3 + 2)" ( identifier , (binary_expression "sVar3 + 2" identifier + number_literal) ))))) ;) (if_statement "if (pcVar5 == (char *)0x0) goto LAB_000b50cf;" if (parenthesized_expression "(pcVar5 == (char *)0x0)" ( (binary_expression "pcVar5 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_000b50cf;" goto statement_identifier ;)) (expression_statement "pcVar5[sVar3] = '/';" (assignment_expression "pcVar5[sVar3] = '/'" (subscript_expression "pcVar5[sVar3]" identifier [ identifier ]) = (char_literal "'/'" ' character ')) ;) (expression_statement "pcVar5[sVar3 + 1] = '\0';" (assignment_expression "pcVar5[sVar3 + 1] = '\0'" (subscript_expression "pcVar5[sVar3 + 1]" identifier [ (binary_expression "sVar3 + 1" identifier + number_literal) ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "*ppcVar8 = pcVar5;" (assignment_expression "*ppcVar8 = pcVar5" (pointer_expression "*ppcVar8" * identifier) = identifier) ;) (expression_statement "pcVar5 = ppcVar8[1];" (assignment_expression "pcVar5 = ppcVar8[1]" identifier = (subscript_expression "ppcVar8[1]" identifier [ number_literal ])) ;) (expression_statement "ppcVar8 = ppcVar8 + 1;" (assignment_expression "ppcVar8 = ppcVar8 + 1" identifier = (binary_expression "ppcVar8 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(pcVar5 != (char *)0x0)" ( (binary_expression "pcVar5 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) })) (goto_statement "goto LAB_000b4f3f;" goto statement_identifier ;) })) (expression_statement "cVar1 = dir[sVar3 - 1];" (assignment_expression "cVar1 = dir[sVar3 - 1]" identifier = (subscript_expression "dir[sVar3 - 1]" identifier [ (binary_expression "sVar3 - 1" identifier - number_literal) ])) ;) (expression_statement "pcVar5 = *array;" (assignment_expression "pcVar5 = *array" identifier = (pointer_expression "*array" * identifier)) ;) (if_statement "if (pcVar5 == (char *)0x0) {\n    local_ac = (char **)malloc(4);\n    if (local_ac != (char **)0x0) {\n      *local_ac = (char *)0x0;\n      goto LAB_000b5136;\n    }\n  }\n  else {\n    iVar4 = 0;\n    do {\n      iVar7 = iVar4;\n      iVar4 = iVar7 + 1;\n    } while (array[iVar4] != (char *)0x0);\n    local_ac = (char **)malloc(iVar7 * 4 + 8);\n    if (local_ac != (char **)0x0) {\n      iVar4 = 0;\nLAB_000b4ff9:\n      sVar6 = strlen(pcVar5);\n      __dest = (char *)malloc(sVar6 + sVar3 + 3);\n      local_ac[iVar4] = __dest;\n      if (__dest != (char *)0x0) goto code_r0x000b5022;\n      ppcVar8 = local_ac;\n      if (iVar4 != 0) {\n        do {\n          pcVar5 = *ppcVar8;\n          ppcVar8 = ppcVar8 + 1;\n          free(pcVar5);\n        } while (local_ac + iVar4 != ppcVar8);\n      }\n      free(local_ac);\n    }\n  }" if (parenthesized_expression "(pcVar5 == (char *)0x0)" ( (binary_expression "pcVar5 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    local_ac = (char **)malloc(4);\n    if (local_ac != (char **)0x0) {\n      *local_ac = (char *)0x0;\n      goto LAB_000b5136;\n    }\n  }" { (expression_statement "local_ac = (char **)malloc(4);" (assignment_expression "local_ac = (char **)malloc(4)" identifier = (cast_expression "(char **)malloc(4)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (call_expression "malloc(4)" identifier (argument_list "(4)" ( number_literal ))))) ;) (if_statement "if (local_ac != (char **)0x0) {\n      *local_ac = (char *)0x0;\n      goto LAB_000b5136;\n    }" if (parenthesized_expression "(local_ac != (char **)0x0)" ( (binary_expression "local_ac != (char **)0x0" identifier != (cast_expression "(char **)0x0" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal)) )) (compound_statement "{\n      *local_ac = (char *)0x0;\n      goto LAB_000b5136;\n    }" { (expression_statement "*local_ac = (char *)0x0;" (assignment_expression "*local_ac = (char *)0x0" (pointer_expression "*local_ac" * identifier) = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (goto_statement "goto LAB_000b5136;" goto statement_identifier ;) })) }) (else_clause "else {\n    iVar4 = 0;\n    do {\n      iVar7 = iVar4;\n      iVar4 = iVar7 + 1;\n    } while (array[iVar4] != (char *)0x0);\n    local_ac = (char **)malloc(iVar7 * 4 + 8);\n    if (local_ac != (char **)0x0) {\n      iVar4 = 0;\nLAB_000b4ff9:\n      sVar6 = strlen(pcVar5);\n      __dest = (char *)malloc(sVar6 + sVar3 + 3);\n      local_ac[iVar4] = __dest;\n      if (__dest != (char *)0x0) goto code_r0x000b5022;\n      ppcVar8 = local_ac;\n      if (iVar4 != 0) {\n        do {\n          pcVar5 = *ppcVar8;\n          ppcVar8 = ppcVar8 + 1;\n          free(pcVar5);\n        } while (local_ac + iVar4 != ppcVar8);\n      }\n      free(local_ac);\n    }\n  }" else (compound_statement "{\n    iVar4 = 0;\n    do {\n      iVar7 = iVar4;\n      iVar4 = iVar7 + 1;\n    } while (array[iVar4] != (char *)0x0);\n    local_ac = (char **)malloc(iVar7 * 4 + 8);\n    if (local_ac != (char **)0x0) {\n      iVar4 = 0;\nLAB_000b4ff9:\n      sVar6 = strlen(pcVar5);\n      __dest = (char *)malloc(sVar6 + sVar3 + 3);\n      local_ac[iVar4] = __dest;\n      if (__dest != (char *)0x0) goto code_r0x000b5022;\n      ppcVar8 = local_ac;\n      if (iVar4 != 0) {\n        do {\n          pcVar5 = *ppcVar8;\n          ppcVar8 = ppcVar8 + 1;\n          free(pcVar5);\n        } while (local_ac + iVar4 != ppcVar8);\n      }\n      free(local_ac);\n    }\n  }" { (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (do_statement "do {\n      iVar7 = iVar4;\n      iVar4 = iVar7 + 1;\n    } while (array[iVar4] != (char *)0x0);" do (compound_statement "{\n      iVar7 = iVar4;\n      iVar4 = iVar7 + 1;\n    }" { (expression_statement "iVar7 = iVar4;" (assignment_expression "iVar7 = iVar4" identifier = identifier) ;) (expression_statement "iVar4 = iVar7 + 1;" (assignment_expression "iVar4 = iVar7 + 1" identifier = (binary_expression "iVar7 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(array[iVar4] != (char *)0x0)" ( (binary_expression "array[iVar4] != (char *)0x0" (subscript_expression "array[iVar4]" identifier [ identifier ]) != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) (expression_statement "local_ac = (char **)malloc(iVar7 * 4 + 8);" (assignment_expression "local_ac = (char **)malloc(iVar7 * 4 + 8)" identifier = (cast_expression "(char **)malloc(iVar7 * 4 + 8)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (call_expression "malloc(iVar7 * 4 + 8)" identifier (argument_list "(iVar7 * 4 + 8)" ( (binary_expression "iVar7 * 4 + 8" (binary_expression "iVar7 * 4" identifier * number_literal) + number_literal) ))))) ;) (if_statement "if (local_ac != (char **)0x0) {\n      iVar4 = 0;\nLAB_000b4ff9:\n      sVar6 = strlen(pcVar5);\n      __dest = (char *)malloc(sVar6 + sVar3 + 3);\n      local_ac[iVar4] = __dest;\n      if (__dest != (char *)0x0) goto code_r0x000b5022;\n      ppcVar8 = local_ac;\n      if (iVar4 != 0) {\n        do {\n          pcVar5 = *ppcVar8;\n          ppcVar8 = ppcVar8 + 1;\n          free(pcVar5);\n        } while (local_ac + iVar4 != ppcVar8);\n      }\n      free(local_ac);\n    }" if (parenthesized_expression "(local_ac != (char **)0x0)" ( (binary_expression "local_ac != (char **)0x0" identifier != (cast_expression "(char **)0x0" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal)) )) (compound_statement "{\n      iVar4 = 0;\nLAB_000b4ff9:\n      sVar6 = strlen(pcVar5);\n      __dest = (char *)malloc(sVar6 + sVar3 + 3);\n      local_ac[iVar4] = __dest;\n      if (__dest != (char *)0x0) goto code_r0x000b5022;\n      ppcVar8 = local_ac;\n      if (iVar4 != 0) {\n        do {\n          pcVar5 = *ppcVar8;\n          ppcVar8 = ppcVar8 + 1;\n          free(pcVar5);\n        } while (local_ac + iVar4 != ppcVar8);\n      }\n      free(local_ac);\n    }" { (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (labeled_statement "LAB_000b4ff9:\n      sVar6 = strlen(pcVar5);" statement_identifier : (expression_statement "sVar6 = strlen(pcVar5);" (assignment_expression "sVar6 = strlen(pcVar5)" identifier = (call_expression "strlen(pcVar5)" identifier (argument_list "(pcVar5)" ( identifier )))) ;)) (expression_statement "__dest = (char *)malloc(sVar6 + sVar3 + 3);" (assignment_expression "__dest = (char *)malloc(sVar6 + sVar3 + 3)" identifier = (cast_expression "(char *)malloc(sVar6 + sVar3 + 3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "malloc(sVar6 + sVar3 + 3)" identifier (argument_list "(sVar6 + sVar3 + 3)" ( (binary_expression "sVar6 + sVar3 + 3" (binary_expression "sVar6 + sVar3" identifier + identifier) + number_literal) ))))) ;) (expression_statement "local_ac[iVar4] = __dest;" (assignment_expression "local_ac[iVar4] = __dest" (subscript_expression "local_ac[iVar4]" identifier [ identifier ]) = identifier) ;) (if_statement "if (__dest != (char *)0x0) goto code_r0x000b5022;" if (parenthesized_expression "(__dest != (char *)0x0)" ( (binary_expression "__dest != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto code_r0x000b5022;" goto statement_identifier ;)) (expression_statement "ppcVar8 = local_ac;" (assignment_expression "ppcVar8 = local_ac" identifier = identifier) ;) (if_statement "if (iVar4 != 0) {\n        do {\n          pcVar5 = *ppcVar8;\n          ppcVar8 = ppcVar8 + 1;\n          free(pcVar5);\n        } while (local_ac + iVar4 != ppcVar8);\n      }" if (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) (compound_statement "{\n        do {\n          pcVar5 = *ppcVar8;\n          ppcVar8 = ppcVar8 + 1;\n          free(pcVar5);\n        } while (local_ac + iVar4 != ppcVar8);\n      }" { (do_statement "do {\n          pcVar5 = *ppcVar8;\n          ppcVar8 = ppcVar8 + 1;\n          free(pcVar5);\n        } while (local_ac + iVar4 != ppcVar8);" do (compound_statement "{\n          pcVar5 = *ppcVar8;\n          ppcVar8 = ppcVar8 + 1;\n          free(pcVar5);\n        }" { (expression_statement "pcVar5 = *ppcVar8;" (assignment_expression "pcVar5 = *ppcVar8" identifier = (pointer_expression "*ppcVar8" * identifier)) ;) (expression_statement "ppcVar8 = ppcVar8 + 1;" (assignment_expression "ppcVar8 = ppcVar8 + 1" identifier = (binary_expression "ppcVar8 + 1" identifier + number_literal)) ;) (expression_statement "free(pcVar5);" (call_expression "free(pcVar5)" identifier (argument_list "(pcVar5)" ( identifier ))) ;) }) while (parenthesized_expression "(local_ac + iVar4 != ppcVar8)" ( (binary_expression "local_ac + iVar4 != ppcVar8" (binary_expression "local_ac + iVar4" identifier + identifier) != identifier) )) ;) })) (expression_statement "free(local_ac);" (call_expression "free(local_ac)" identifier (argument_list "(local_ac)" ( identifier ))) ;) })) }))) (labeled_statement "LAB_000b50cf:\n  local_ac = (char **)0x0;" statement_identifier : (expression_statement "local_ac = (char **)0x0;" (assignment_expression "local_ac = (char **)0x0" identifier = (cast_expression "(char **)0x0" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal)) ;)) (goto_statement "goto LAB_000b4f3f;" goto statement_identifier ;) (labeled_statement "code_r0x000b5022:\n  strcpy(__dest,dir);" statement_identifier : (expression_statement "strcpy(__dest,dir);" (call_expression "strcpy(__dest,dir)" identifier (argument_list "(__dest,dir)" ( identifier , identifier ))) ;)) (if_statement "if (cVar1 != '/') {\n    __dest[sVar3] = '/';\n  }" if (parenthesized_expression "(cVar1 != '/')" ( (binary_expression "cVar1 != '/'" identifier != (char_literal "'/'" ' character ')) )) (compound_statement "{\n    __dest[sVar3] = '/';\n  }" { (expression_statement "__dest[sVar3] = '/';" (assignment_expression "__dest[sVar3] = '/'" (subscript_expression "__dest[sVar3]" identifier [ identifier ]) = (char_literal "'/'" ' character ')) ;) })) (expression_statement "strcpy(__dest + (cVar1 != '/') + sVar3,pcVar5);" (call_expression "strcpy(__dest + (cVar1 != '/') + sVar3,pcVar5)" identifier (argument_list "(__dest + (cVar1 != '/') + sVar3,pcVar5)" ( (binary_expression "__dest + (cVar1 != '/') + sVar3" (binary_expression "__dest + (cVar1 != '/')" identifier + (parenthesized_expression "(cVar1 != '/')" ( (binary_expression "cVar1 != '/'" identifier != (char_literal "'/'" ' character ')) ))) + identifier) , identifier ))) ;) (if_statement "if ((((flags & 1U) != 0) && (iVar7 = __xstat64(3,__dest,(stat64 *)&sb), iVar7 == 0)) &&\n     ((sb.st_mode & 0xf000) == 0x4000)) {\n    pcVar5 = local_ac[iVar4];\n    sVar6 = strlen(pcVar5);\n    pcVar5[sVar6] = '/';\n    local_ac[iVar4][sVar6 + 1] = '\0';\n  }" if (parenthesized_expression "((((flags & 1U) != 0) && (iVar7 = __xstat64(3,__dest,(stat64 *)&sb), iVar7 == 0)) &&\n     ((sb.st_mode & 0xf000) == 0x4000))" ( (binary_expression "(((flags & 1U) != 0) && (iVar7 = __xstat64(3,__dest,(stat64 *)&sb), iVar7 == 0)) &&\n     ((sb.st_mode & 0xf000) == 0x4000)" (parenthesized_expression "(((flags & 1U) != 0) && (iVar7 = __xstat64(3,__dest,(stat64 *)&sb), iVar7 == 0))" ( (binary_expression "((flags & 1U) != 0) && (iVar7 = __xstat64(3,__dest,(stat64 *)&sb), iVar7 == 0)" (parenthesized_expression "((flags & 1U) != 0)" ( (binary_expression "(flags & 1U) != 0" (parenthesized_expression "(flags & 1U)" ( (binary_expression "flags & 1U" identifier & number_literal) )) != number_literal) )) && (parenthesized_expression "(iVar7 = __xstat64(3,__dest,(stat64 *)&sb), iVar7 == 0)" ( (comma_expression "iVar7 = __xstat64(3,__dest,(stat64 *)&sb), iVar7 == 0" (assignment_expression "iVar7 = __xstat64(3,__dest,(stat64 *)&sb)" identifier = (call_expression "__xstat64(3,__dest,(stat64 *)&sb)" identifier (argument_list "(3,__dest,(stat64 *)&sb)" ( number_literal , identifier , (cast_expression "(stat64 *)&sb" ( (type_descriptor "stat64 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&sb" & identifier)) )))) , (binary_expression "iVar7 == 0" identifier == number_literal)) ))) )) && (parenthesized_expression "((sb.st_mode & 0xf000) == 0x4000)" ( (binary_expression "(sb.st_mode & 0xf000) == 0x4000" (parenthesized_expression "(sb.st_mode & 0xf000)" ( (binary_expression "sb.st_mode & 0xf000" (field_expression "sb.st_mode" identifier . field_identifier) & number_literal) )) == number_literal) ))) )) (compound_statement "{\n    pcVar5 = local_ac[iVar4];\n    sVar6 = strlen(pcVar5);\n    pcVar5[sVar6] = '/';\n    local_ac[iVar4][sVar6 + 1] = '\0';\n  }" { (expression_statement "pcVar5 = local_ac[iVar4];" (assignment_expression "pcVar5 = local_ac[iVar4]" identifier = (subscript_expression "local_ac[iVar4]" identifier [ identifier ])) ;) (expression_statement "sVar6 = strlen(pcVar5);" (assignment_expression "sVar6 = strlen(pcVar5)" identifier = (call_expression "strlen(pcVar5)" identifier (argument_list "(pcVar5)" ( identifier )))) ;) (expression_statement "pcVar5[sVar6] = '/';" (assignment_expression "pcVar5[sVar6] = '/'" (subscript_expression "pcVar5[sVar6]" identifier [ identifier ]) = (char_literal "'/'" ' character ')) ;) (expression_statement "local_ac[iVar4][sVar6 + 1] = '\0';" (assignment_expression "local_ac[iVar4][sVar6 + 1] = '\0'" (subscript_expression "local_ac[iVar4][sVar6 + 1]" (subscript_expression "local_ac[iVar4]" identifier [ identifier ]) [ (binary_expression "sVar6 + 1" identifier + number_literal) ]) = (char_literal "'\0'" ' escape_sequence ')) ;) })) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) (expression_statement "pcVar5 = array[iVar4];" (assignment_expression "pcVar5 = array[iVar4]" identifier = (subscript_expression "array[iVar4]" identifier [ identifier ])) ;) (if_statement "if (pcVar5 == (char *)0x0) goto LAB_000b5100;" if (parenthesized_expression "(pcVar5 == (char *)0x0)" ( (binary_expression "pcVar5 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_000b5100;" goto statement_identifier ;)) (goto_statement "goto LAB_000b4ff9;" goto statement_identifier ;) (labeled_statement "LAB_000b5100:\n  pcVar5 = *array;" statement_identifier : (expression_statement "pcVar5 = *array;" (assignment_expression "pcVar5 = *array" identifier = (pointer_expression "*array" * identifier)) ;)) (expression_statement "local_ac[iVar4] = (char *)0x0;" (assignment_expression "local_ac[iVar4] = (char *)0x0" (subscript_expression "local_ac[iVar4]" identifier [ identifier ]) = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "ppcVar8 = array;" (assignment_expression "ppcVar8 = array" identifier = identifier) ;) (while_statement "while (pcVar5 != (char *)0x0) {\n    ppcVar8 = ppcVar8 + 1;\n    free(pcVar5);\n    pcVar5 = *ppcVar8;\n  }" while (parenthesized_expression "(pcVar5 != (char *)0x0)" ( (binary_expression "pcVar5 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    ppcVar8 = ppcVar8 + 1;\n    free(pcVar5);\n    pcVar5 = *ppcVar8;\n  }" { (expression_statement "ppcVar8 = ppcVar8 + 1;" (assignment_expression "ppcVar8 = ppcVar8 + 1" identifier = (binary_expression "ppcVar8 + 1" identifier + number_literal)) ;) (expression_statement "free(pcVar5);" (call_expression "free(pcVar5)" identifier (argument_list "(pcVar5)" ( identifier ))) ;) (expression_statement "pcVar5 = *ppcVar8;" (assignment_expression "pcVar5 = *ppcVar8" identifier = (pointer_expression "*ppcVar8" * identifier)) ;) })) (labeled_statement "LAB_000b5136:\n  free(array);" statement_identifier : (expression_statement "free(array);" (call_expression "free(array)" identifier (argument_list "(array)" ( identifier ))) ;)) (labeled_statement "LAB_000b4f3f:\n  if (iVar2 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_ac;\n  }" statement_identifier : (if_statement "if (iVar2 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_ac;\n  }" if (parenthesized_expression "(iVar2 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar2 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return local_ac;\n  }" { (return_statement "return local_ac;" return identifier ;) }))) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "int * __regparm3 FUN_000b4e60(char *param_1,int *param_2,uint param_3)\n\n{\n  char cVar1;\n  size_t sVar2;\n  char *pcVar3;\n  int iVar4;\n  void *pvVar5;\n  size_t sVar6;\n  char *__dest;\n  int iVar7;\n  int *piVar8;\n  int in_GS_OFFSET;\n  int *local_ac;\n  stat64 local_80;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0xb4e6b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  sVar2 = strlen(param_1);\n  if (sVar2 == 0) {\n    local_ac = param_2;\n    if (((param_3 & 1) != 0) && (pcVar3 = (char *)*param_2, pcVar3 != (char *)0x0)) {\n      do {\n        while ((iVar4 = __xstat64(3,pcVar3,&local_80), iVar4 != 0 ||\n               ((local_80.st_mode & 0xf000) != 0x4000))) {\n          param_2 = param_2 + 1;\n          pcVar3 = (char *)*param_2;\n          if (pcVar3 == (char *)0x0) goto LAB_000b4f3f;\n        }\n        pcVar3 = (char *)*param_2;\n        sVar2 = strlen(pcVar3);\n        pvVar5 = realloc(pcVar3,sVar2 + 2);\n        if (pvVar5 == (void *)0x0) goto LAB_000b50cf;\n        *(undefined1 *)((int)pvVar5 + sVar2) = 0x2f;\n        *(undefined1 *)((int)pvVar5 + sVar2 + 1) = 0;\n        *param_2 = (int)pvVar5;\n        pcVar3 = (char *)param_2[1];\n        param_2 = param_2 + 1;\n      } while (pcVar3 != (char *)0x0);\n    }\n    goto LAB_000b4f3f;\n  }\n  cVar1 = param_1[sVar2 - 1];\n  pcVar3 = (char *)*param_2;\n  if (pcVar3 == (char *)0x0) {\n    local_ac = (int *)malloc(4);\n    if (local_ac != (int *)0x0) {\n      *local_ac = 0;\n      goto LAB_000b5136;\n    }\n  }\n  else {\n    iVar4 = 0;\n    do {\n      iVar7 = iVar4;\n      iVar4 = iVar7 + 1;\n    } while (param_2[iVar4] != 0);\n    local_ac = (int *)malloc(iVar7 * 4 + 8);\n    if (local_ac != (int *)0x0) {\n      iVar4 = 0;\nLAB_000b4ff9:\n      sVar6 = strlen(pcVar3);\n      __dest = (char *)malloc(sVar6 + sVar2 + 3);\n      local_ac[iVar4] = (int)__dest;\n      if (__dest != (char *)0x0) goto code_r0x000b5022;\n      piVar8 = local_ac;\n      if (iVar4 != 0) {\n        do {\n          pvVar5 = (void *)*piVar8;\n          piVar8 = piVar8 + 1;\n          free(pvVar5);\n        } while (local_ac + iVar4 != piVar8);\n      }\n      free(local_ac);\n    }\n  }\nLAB_000b50cf:\n  local_ac = (int *)0x0;\n  goto LAB_000b4f3f;\ncode_r0x000b5022:\n  strcpy(__dest,param_1);\n  if (cVar1 != '/') {\n    __dest[sVar2] = '/';\n  }\n  strcpy(__dest + (cVar1 != '/') + sVar2,pcVar3);\n  if ((((param_3 & 1) != 0) && (iVar7 = __xstat64(3,__dest,&local_80), iVar7 == 0)) &&\n     ((local_80.st_mode & 0xf000) == 0x4000)) {\n    pcVar3 = (char *)local_ac[iVar4];\n    sVar6 = strlen(pcVar3);\n    pcVar3[sVar6] = '/';\n    *(undefined1 *)(local_ac[iVar4] + 1 + sVar6) = 0;\n  }\n  iVar4 = iVar4 + 1;\n  pcVar3 = (char *)param_2[iVar4];\n  if (pcVar3 == (char *)0x0) goto LAB_000b5100;\n  goto LAB_000b4ff9;\nLAB_000b5100:\n  pvVar5 = (void *)*param_2;\n  local_ac[iVar4] = 0;\n  piVar8 = param_2;\n  while (pvVar5 != (void *)0x0) {\n    piVar8 = piVar8 + 1;\n    free(pvVar5);\n    pvVar5 = (void *)*piVar8;\n  }\nLAB_000b5136:\n  free(param_2);\nLAB_000b4f3f:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_ac;\n  }\n                    \n  FUN_000ecc40();\n}\n\n" (function_definition "int * __regparm3 FUN_000b4e60(char *param_1,int *param_2,uint param_3)\n\n{\n  char cVar1;\n  size_t sVar2;\n  char *pcVar3;\n  int iVar4;\n  void *pvVar5;\n  size_t sVar6;\n  char *__dest;\n  int iVar7;\n  int *piVar8;\n  int in_GS_OFFSET;\n  int *local_ac;\n  stat64 local_80;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0xb4e6b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  sVar2 = strlen(param_1);\n  if (sVar2 == 0) {\n    local_ac = param_2;\n    if (((param_3 & 1) != 0) && (pcVar3 = (char *)*param_2, pcVar3 != (char *)0x0)) {\n      do {\n        while ((iVar4 = __xstat64(3,pcVar3,&local_80), iVar4 != 0 ||\n               ((local_80.st_mode & 0xf000) != 0x4000))) {\n          param_2 = param_2 + 1;\n          pcVar3 = (char *)*param_2;\n          if (pcVar3 == (char *)0x0) goto LAB_000b4f3f;\n        }\n        pcVar3 = (char *)*param_2;\n        sVar2 = strlen(pcVar3);\n        pvVar5 = realloc(pcVar3,sVar2 + 2);\n        if (pvVar5 == (void *)0x0) goto LAB_000b50cf;\n        *(undefined1 *)((int)pvVar5 + sVar2) = 0x2f;\n        *(undefined1 *)((int)pvVar5 + sVar2 + 1) = 0;\n        *param_2 = (int)pvVar5;\n        pcVar3 = (char *)param_2[1];\n        param_2 = param_2 + 1;\n      } while (pcVar3 != (char *)0x0);\n    }\n    goto LAB_000b4f3f;\n  }\n  cVar1 = param_1[sVar2 - 1];\n  pcVar3 = (char *)*param_2;\n  if (pcVar3 == (char *)0x0) {\n    local_ac = (int *)malloc(4);\n    if (local_ac != (int *)0x0) {\n      *local_ac = 0;\n      goto LAB_000b5136;\n    }\n  }\n  else {\n    iVar4 = 0;\n    do {\n      iVar7 = iVar4;\n      iVar4 = iVar7 + 1;\n    } while (param_2[iVar4] != 0);\n    local_ac = (int *)malloc(iVar7 * 4 + 8);\n    if (local_ac != (int *)0x0) {\n      iVar4 = 0;\nLAB_000b4ff9:\n      sVar6 = strlen(pcVar3);\n      __dest = (char *)malloc(sVar6 + sVar2 + 3);\n      local_ac[iVar4] = (int)__dest;\n      if (__dest != (char *)0x0) goto code_r0x000b5022;\n      piVar8 = local_ac;\n      if (iVar4 != 0) {\n        do {\n          pvVar5 = (void *)*piVar8;\n          piVar8 = piVar8 + 1;\n          free(pvVar5);\n        } while (local_ac + iVar4 != piVar8);\n      }\n      free(local_ac);\n    }\n  }\nLAB_000b50cf:\n  local_ac = (int *)0x0;\n  goto LAB_000b4f3f;\ncode_r0x000b5022:\n  strcpy(__dest,param_1);\n  if (cVar1 != '/') {\n    __dest[sVar2] = '/';\n  }\n  strcpy(__dest + (cVar1 != '/') + sVar2,pcVar3);\n  if ((((param_3 & 1) != 0) && (iVar7 = __xstat64(3,__dest,&local_80), iVar7 == 0)) &&\n     ((local_80.st_mode & 0xf000) == 0x4000)) {\n    pcVar3 = (char *)local_ac[iVar4];\n    sVar6 = strlen(pcVar3);\n    pcVar3[sVar6] = '/';\n    *(undefined1 *)(local_ac[iVar4] + 1 + sVar6) = 0;\n  }\n  iVar4 = iVar4 + 1;\n  pcVar3 = (char *)param_2[iVar4];\n  if (pcVar3 == (char *)0x0) goto LAB_000b5100;\n  goto LAB_000b4ff9;\nLAB_000b5100:\n  pvVar5 = (void *)*param_2;\n  local_ac[iVar4] = 0;\n  piVar8 = param_2;\n  while (pvVar5 != (void *)0x0) {\n    piVar8 = piVar8 + 1;\n    free(pvVar5);\n    pvVar5 = (void *)*piVar8;\n  }\nLAB_000b5136:\n  free(param_2);\nLAB_000b4f3f:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_ac;\n  }\n                    \n  FUN_000ecc40();\n}" primitive_type (pointer_declarator "* __regparm3 FUN_000b4e60(char *param_1,int *param_2,uint param_3)" * (ERROR "__regparm3" identifier) (function_declarator "FUN_000b4e60(char *param_1,int *param_2,uint param_3)" identifier (parameter_list "(char *param_1,int *param_2,uint param_3)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "uint param_3" type_identifier identifier) )))) (compound_statement "{\n  char cVar1;\n  size_t sVar2;\n  char *pcVar3;\n  int iVar4;\n  void *pvVar5;\n  size_t sVar6;\n  char *__dest;\n  int iVar7;\n  int *piVar8;\n  int in_GS_OFFSET;\n  int *local_ac;\n  stat64 local_80;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0xb4e6b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  sVar2 = strlen(param_1);\n  if (sVar2 == 0) {\n    local_ac = param_2;\n    if (((param_3 & 1) != 0) && (pcVar3 = (char *)*param_2, pcVar3 != (char *)0x0)) {\n      do {\n        while ((iVar4 = __xstat64(3,pcVar3,&local_80), iVar4 != 0 ||\n               ((local_80.st_mode & 0xf000) != 0x4000))) {\n          param_2 = param_2 + 1;\n          pcVar3 = (char *)*param_2;\n          if (pcVar3 == (char *)0x0) goto LAB_000b4f3f;\n        }\n        pcVar3 = (char *)*param_2;\n        sVar2 = strlen(pcVar3);\n        pvVar5 = realloc(pcVar3,sVar2 + 2);\n        if (pvVar5 == (void *)0x0) goto LAB_000b50cf;\n        *(undefined1 *)((int)pvVar5 + sVar2) = 0x2f;\n        *(undefined1 *)((int)pvVar5 + sVar2 + 1) = 0;\n        *param_2 = (int)pvVar5;\n        pcVar3 = (char *)param_2[1];\n        param_2 = param_2 + 1;\n      } while (pcVar3 != (char *)0x0);\n    }\n    goto LAB_000b4f3f;\n  }\n  cVar1 = param_1[sVar2 - 1];\n  pcVar3 = (char *)*param_2;\n  if (pcVar3 == (char *)0x0) {\n    local_ac = (int *)malloc(4);\n    if (local_ac != (int *)0x0) {\n      *local_ac = 0;\n      goto LAB_000b5136;\n    }\n  }\n  else {\n    iVar4 = 0;\n    do {\n      iVar7 = iVar4;\n      iVar4 = iVar7 + 1;\n    } while (param_2[iVar4] != 0);\n    local_ac = (int *)malloc(iVar7 * 4 + 8);\n    if (local_ac != (int *)0x0) {\n      iVar4 = 0;\nLAB_000b4ff9:\n      sVar6 = strlen(pcVar3);\n      __dest = (char *)malloc(sVar6 + sVar2 + 3);\n      local_ac[iVar4] = (int)__dest;\n      if (__dest != (char *)0x0) goto code_r0x000b5022;\n      piVar8 = local_ac;\n      if (iVar4 != 0) {\n        do {\n          pvVar5 = (void *)*piVar8;\n          piVar8 = piVar8 + 1;\n          free(pvVar5);\n        } while (local_ac + iVar4 != piVar8);\n      }\n      free(local_ac);\n    }\n  }\nLAB_000b50cf:\n  local_ac = (int *)0x0;\n  goto LAB_000b4f3f;\ncode_r0x000b5022:\n  strcpy(__dest,param_1);\n  if (cVar1 != '/') {\n    __dest[sVar2] = '/';\n  }\n  strcpy(__dest + (cVar1 != '/') + sVar2,pcVar3);\n  if ((((param_3 & 1) != 0) && (iVar7 = __xstat64(3,__dest,&local_80), iVar7 == 0)) &&\n     ((local_80.st_mode & 0xf000) == 0x4000)) {\n    pcVar3 = (char *)local_ac[iVar4];\n    sVar6 = strlen(pcVar3);\n    pcVar3[sVar6] = '/';\n    *(undefined1 *)(local_ac[iVar4] + 1 + sVar6) = 0;\n  }\n  iVar4 = iVar4 + 1;\n  pcVar3 = (char *)param_2[iVar4];\n  if (pcVar3 == (char *)0x0) goto LAB_000b5100;\n  goto LAB_000b4ff9;\nLAB_000b5100:\n  pvVar5 = (void *)*param_2;\n  local_ac[iVar4] = 0;\n  piVar8 = param_2;\n  while (pvVar5 != (void *)0x0) {\n    piVar8 = piVar8 + 1;\n    free(pvVar5);\n    pvVar5 = (void *)*piVar8;\n  }\nLAB_000b5136:\n  free(param_2);\nLAB_000b4f3f:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_ac;\n  }\n                    \n  FUN_000ecc40();\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "void *pvVar5;" primitive_type (pointer_declarator "*pvVar5" * identifier) ;) (declaration "size_t sVar6;" primitive_type identifier ;) (declaration "char *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "int *piVar8;" primitive_type (pointer_declarator "*piVar8" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "int *local_ac;" primitive_type (pointer_declarator "*local_ac" * identifier) ;) (declaration "stat64 local_80;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0xb4e6b;" (assignment_expression "uStack_14 = 0xb4e6b" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "sVar2 = strlen(param_1);" (assignment_expression "sVar2 = strlen(param_1)" identifier = (call_expression "strlen(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (sVar2 == 0) {\n    local_ac = param_2;\n    if (((param_3 & 1) != 0) && (pcVar3 = (char *)*param_2, pcVar3 != (char *)0x0)) {\n      do {\n        while ((iVar4 = __xstat64(3,pcVar3,&local_80), iVar4 != 0 ||\n               ((local_80.st_mode & 0xf000) != 0x4000))) {\n          param_2 = param_2 + 1;\n          pcVar3 = (char *)*param_2;\n          if (pcVar3 == (char *)0x0) goto LAB_000b4f3f;\n        }\n        pcVar3 = (char *)*param_2;\n        sVar2 = strlen(pcVar3);\n        pvVar5 = realloc(pcVar3,sVar2 + 2);\n        if (pvVar5 == (void *)0x0) goto LAB_000b50cf;\n        *(undefined1 *)((int)pvVar5 + sVar2) = 0x2f;\n        *(undefined1 *)((int)pvVar5 + sVar2 + 1) = 0;\n        *param_2 = (int)pvVar5;\n        pcVar3 = (char *)param_2[1];\n        param_2 = param_2 + 1;\n      } while (pcVar3 != (char *)0x0);\n    }\n    goto LAB_000b4f3f;\n  }" if (parenthesized_expression "(sVar2 == 0)" ( (binary_expression "sVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    local_ac = param_2;\n    if (((param_3 & 1) != 0) && (pcVar3 = (char *)*param_2, pcVar3 != (char *)0x0)) {\n      do {\n        while ((iVar4 = __xstat64(3,pcVar3,&local_80), iVar4 != 0 ||\n               ((local_80.st_mode & 0xf000) != 0x4000))) {\n          param_2 = param_2 + 1;\n          pcVar3 = (char *)*param_2;\n          if (pcVar3 == (char *)0x0) goto LAB_000b4f3f;\n        }\n        pcVar3 = (char *)*param_2;\n        sVar2 = strlen(pcVar3);\n        pvVar5 = realloc(pcVar3,sVar2 + 2);\n        if (pvVar5 == (void *)0x0) goto LAB_000b50cf;\n        *(undefined1 *)((int)pvVar5 + sVar2) = 0x2f;\n        *(undefined1 *)((int)pvVar5 + sVar2 + 1) = 0;\n        *param_2 = (int)pvVar5;\n        pcVar3 = (char *)param_2[1];\n        param_2 = param_2 + 1;\n      } while (pcVar3 != (char *)0x0);\n    }\n    goto LAB_000b4f3f;\n  }" { (expression_statement "local_ac = param_2;" (assignment_expression "local_ac = param_2" identifier = identifier) ;) (if_statement "if (((param_3 & 1) != 0) && (pcVar3 = (char *)*param_2, pcVar3 != (char *)0x0)) {\n      do {\n        while ((iVar4 = __xstat64(3,pcVar3,&local_80), iVar4 != 0 ||\n               ((local_80.st_mode & 0xf000) != 0x4000))) {\n          param_2 = param_2 + 1;\n          pcVar3 = (char *)*param_2;\n          if (pcVar3 == (char *)0x0) goto LAB_000b4f3f;\n        }\n        pcVar3 = (char *)*param_2;\n        sVar2 = strlen(pcVar3);\n        pvVar5 = realloc(pcVar3,sVar2 + 2);\n        if (pvVar5 == (void *)0x0) goto LAB_000b50cf;\n        *(undefined1 *)((int)pvVar5 + sVar2) = 0x2f;\n        *(undefined1 *)((int)pvVar5 + sVar2 + 1) = 0;\n        *param_2 = (int)pvVar5;\n        pcVar3 = (char *)param_2[1];\n        param_2 = param_2 + 1;\n      } while (pcVar3 != (char *)0x0);\n    }" if (parenthesized_expression "(((param_3 & 1) != 0) && (pcVar3 = (char *)*param_2, pcVar3 != (char *)0x0))" ( (binary_expression "((param_3 & 1) != 0) && (pcVar3 = (char *)*param_2, pcVar3 != (char *)0x0)" (parenthesized_expression "((param_3 & 1) != 0)" ( (binary_expression "(param_3 & 1) != 0" (parenthesized_expression "(param_3 & 1)" ( (binary_expression "param_3 & 1" identifier & number_literal) )) != number_literal) )) && (parenthesized_expression "(pcVar3 = (char *)*param_2, pcVar3 != (char *)0x0)" ( (comma_expression "pcVar3 = (char *)*param_2, pcVar3 != (char *)0x0" (assignment_expression "pcVar3 = (char *)*param_2" identifier = (cast_expression "(char *)*param_2" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier))) , (binary_expression "pcVar3 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal))) ))) )) (compound_statement "{\n      do {\n        while ((iVar4 = __xstat64(3,pcVar3,&local_80), iVar4 != 0 ||\n               ((local_80.st_mode & 0xf000) != 0x4000))) {\n          param_2 = param_2 + 1;\n          pcVar3 = (char *)*param_2;\n          if (pcVar3 == (char *)0x0) goto LAB_000b4f3f;\n        }\n        pcVar3 = (char *)*param_2;\n        sVar2 = strlen(pcVar3);\n        pvVar5 = realloc(pcVar3,sVar2 + 2);\n        if (pvVar5 == (void *)0x0) goto LAB_000b50cf;\n        *(undefined1 *)((int)pvVar5 + sVar2) = 0x2f;\n        *(undefined1 *)((int)pvVar5 + sVar2 + 1) = 0;\n        *param_2 = (int)pvVar5;\n        pcVar3 = (char *)param_2[1];\n        param_2 = param_2 + 1;\n      } while (pcVar3 != (char *)0x0);\n    }" { (do_statement "do {\n        while ((iVar4 = __xstat64(3,pcVar3,&local_80), iVar4 != 0 ||\n               ((local_80.st_mode & 0xf000) != 0x4000))) {\n          param_2 = param_2 + 1;\n          pcVar3 = (char *)*param_2;\n          if (pcVar3 == (char *)0x0) goto LAB_000b4f3f;\n        }\n        pcVar3 = (char *)*param_2;\n        sVar2 = strlen(pcVar3);\n        pvVar5 = realloc(pcVar3,sVar2 + 2);\n        if (pvVar5 == (void *)0x0) goto LAB_000b50cf;\n        *(undefined1 *)((int)pvVar5 + sVar2) = 0x2f;\n        *(undefined1 *)((int)pvVar5 + sVar2 + 1) = 0;\n        *param_2 = (int)pvVar5;\n        pcVar3 = (char *)param_2[1];\n        param_2 = param_2 + 1;\n      } while (pcVar3 != (char *)0x0);" do (compound_statement "{\n        while ((iVar4 = __xstat64(3,pcVar3,&local_80), iVar4 != 0 ||\n               ((local_80.st_mode & 0xf000) != 0x4000))) {\n          param_2 = param_2 + 1;\n          pcVar3 = (char *)*param_2;\n          if (pcVar3 == (char *)0x0) goto LAB_000b4f3f;\n        }\n        pcVar3 = (char *)*param_2;\n        sVar2 = strlen(pcVar3);\n        pvVar5 = realloc(pcVar3,sVar2 + 2);\n        if (pvVar5 == (void *)0x0) goto LAB_000b50cf;\n        *(undefined1 *)((int)pvVar5 + sVar2) = 0x2f;\n        *(undefined1 *)((int)pvVar5 + sVar2 + 1) = 0;\n        *param_2 = (int)pvVar5;\n        pcVar3 = (char *)param_2[1];\n        param_2 = param_2 + 1;\n      }" { (while_statement "while ((iVar4 = __xstat64(3,pcVar3,&local_80), iVar4 != 0 ||\n               ((local_80.st_mode & 0xf000) != 0x4000))) {\n          param_2 = param_2 + 1;\n          pcVar3 = (char *)*param_2;\n          if (pcVar3 == (char *)0x0) goto LAB_000b4f3f;\n        }" while (parenthesized_expression "((iVar4 = __xstat64(3,pcVar3,&local_80), iVar4 != 0 ||\n               ((local_80.st_mode & 0xf000) != 0x4000)))" ( (parenthesized_expression "(iVar4 = __xstat64(3,pcVar3,&local_80), iVar4 != 0 ||\n               ((local_80.st_mode & 0xf000) != 0x4000))" ( (comma_expression "iVar4 = __xstat64(3,pcVar3,&local_80), iVar4 != 0 ||\n               ((local_80.st_mode & 0xf000) != 0x4000)" (assignment_expression "iVar4 = __xstat64(3,pcVar3,&local_80)" identifier = (call_expression "__xstat64(3,pcVar3,&local_80)" identifier (argument_list "(3,pcVar3,&local_80)" ( number_literal , identifier , (pointer_expression "&local_80" & identifier) )))) , (binary_expression "iVar4 != 0 ||\n               ((local_80.st_mode & 0xf000) != 0x4000)" (binary_expression "iVar4 != 0" identifier != number_literal) || (parenthesized_expression "((local_80.st_mode & 0xf000) != 0x4000)" ( (binary_expression "(local_80.st_mode & 0xf000) != 0x4000" (parenthesized_expression "(local_80.st_mode & 0xf000)" ( (binary_expression "local_80.st_mode & 0xf000" (field_expression "local_80.st_mode" identifier . field_identifier) & number_literal) )) != number_literal) )))) )) )) (compound_statement "{\n          param_2 = param_2 + 1;\n          pcVar3 = (char *)*param_2;\n          if (pcVar3 == (char *)0x0) goto LAB_000b4f3f;\n        }" { (expression_statement "param_2 = param_2 + 1;" (assignment_expression "param_2 = param_2 + 1" identifier = (binary_expression "param_2 + 1" identifier + number_literal)) ;) (expression_statement "pcVar3 = (char *)*param_2;" (assignment_expression "pcVar3 = (char *)*param_2" identifier = (cast_expression "(char *)*param_2" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier))) ;) (if_statement "if (pcVar3 == (char *)0x0) goto LAB_000b4f3f;" if (parenthesized_expression "(pcVar3 == (char *)0x0)" ( (binary_expression "pcVar3 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_000b4f3f;" goto statement_identifier ;)) })) (expression_statement "pcVar3 = (char *)*param_2;" (assignment_expression "pcVar3 = (char *)*param_2" identifier = (cast_expression "(char *)*param_2" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier))) ;) (expression_statement "sVar2 = strlen(pcVar3);" (assignment_expression "sVar2 = strlen(pcVar3)" identifier = (call_expression "strlen(pcVar3)" identifier (argument_list "(pcVar3)" ( identifier )))) ;) (expression_statement "pvVar5 = realloc(pcVar3,sVar2 + 2);" (assignment_expression "pvVar5 = realloc(pcVar3,sVar2 + 2)" identifier = (call_expression "realloc(pcVar3,sVar2 + 2)" identifier (argument_list "(pcVar3,sVar2 + 2)" ( identifier , (binary_expression "sVar2 + 2" identifier + number_literal) )))) ;) (if_statement "if (pvVar5 == (void *)0x0) goto LAB_000b50cf;" if (parenthesized_expression "(pvVar5 == (void *)0x0)" ( (binary_expression "pvVar5 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_000b50cf;" goto statement_identifier ;)) (expression_statement "*(undefined1 *)((int)pvVar5 + sVar2) = 0x2f;" (assignment_expression "*(undefined1 *)((int)pvVar5 + sVar2) = 0x2f" (pointer_expression "*(undefined1 *)((int)pvVar5 + sVar2)" * (cast_expression "(undefined1 *)((int)pvVar5 + sVar2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar5 + sVar2)" ( (binary_expression "(int)pvVar5 + sVar2" (cast_expression "(int)pvVar5" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) = number_literal) ;) (expression_statement "*(undefined1 *)((int)pvVar5 + sVar2 + 1) = 0;" (assignment_expression "*(undefined1 *)((int)pvVar5 + sVar2 + 1) = 0" (pointer_expression "*(undefined1 *)((int)pvVar5 + sVar2 + 1)" * (cast_expression "(undefined1 *)((int)pvVar5 + sVar2 + 1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar5 + sVar2 + 1)" ( (binary_expression "(int)pvVar5 + sVar2 + 1" (binary_expression "(int)pvVar5 + sVar2" (cast_expression "(int)pvVar5" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) + number_literal) )))) = number_literal) ;) (expression_statement "*param_2 = (int)pvVar5;" (assignment_expression "*param_2 = (int)pvVar5" (pointer_expression "*param_2" * identifier) = (cast_expression "(int)pvVar5" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "pcVar3 = (char *)param_2[1];" (assignment_expression "pcVar3 = (char *)param_2[1]" identifier = (cast_expression "(char *)param_2[1]" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_2[1]" identifier [ number_literal ]))) ;) (expression_statement "param_2 = param_2 + 1;" (assignment_expression "param_2 = param_2 + 1" identifier = (binary_expression "param_2 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(pcVar3 != (char *)0x0)" ( (binary_expression "pcVar3 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) })) (goto_statement "goto LAB_000b4f3f;" goto statement_identifier ;) })) (expression_statement "cVar1 = param_1[sVar2 - 1];" (assignment_expression "cVar1 = param_1[sVar2 - 1]" identifier = (subscript_expression "param_1[sVar2 - 1]" identifier [ (binary_expression "sVar2 - 1" identifier - number_literal) ])) ;) (expression_statement "pcVar3 = (char *)*param_2;" (assignment_expression "pcVar3 = (char *)*param_2" identifier = (cast_expression "(char *)*param_2" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier))) ;) (if_statement "if (pcVar3 == (char *)0x0) {\n    local_ac = (int *)malloc(4);\n    if (local_ac != (int *)0x0) {\n      *local_ac = 0;\n      goto LAB_000b5136;\n    }\n  }\n  else {\n    iVar4 = 0;\n    do {\n      iVar7 = iVar4;\n      iVar4 = iVar7 + 1;\n    } while (param_2[iVar4] != 0);\n    local_ac = (int *)malloc(iVar7 * 4 + 8);\n    if (local_ac != (int *)0x0) {\n      iVar4 = 0;\nLAB_000b4ff9:\n      sVar6 = strlen(pcVar3);\n      __dest = (char *)malloc(sVar6 + sVar2 + 3);\n      local_ac[iVar4] = (int)__dest;\n      if (__dest != (char *)0x0) goto code_r0x000b5022;\n      piVar8 = local_ac;\n      if (iVar4 != 0) {\n        do {\n          pvVar5 = (void *)*piVar8;\n          piVar8 = piVar8 + 1;\n          free(pvVar5);\n        } while (local_ac + iVar4 != piVar8);\n      }\n      free(local_ac);\n    }\n  }" if (parenthesized_expression "(pcVar3 == (char *)0x0)" ( (binary_expression "pcVar3 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    local_ac = (int *)malloc(4);\n    if (local_ac != (int *)0x0) {\n      *local_ac = 0;\n      goto LAB_000b5136;\n    }\n  }" { (expression_statement "local_ac = (int *)malloc(4);" (assignment_expression "local_ac = (int *)malloc(4)" identifier = (cast_expression "(int *)malloc(4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "malloc(4)" identifier (argument_list "(4)" ( number_literal ))))) ;) (if_statement "if (local_ac != (int *)0x0) {\n      *local_ac = 0;\n      goto LAB_000b5136;\n    }" if (parenthesized_expression "(local_ac != (int *)0x0)" ( (binary_expression "local_ac != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      *local_ac = 0;\n      goto LAB_000b5136;\n    }" { (expression_statement "*local_ac = 0;" (assignment_expression "*local_ac = 0" (pointer_expression "*local_ac" * identifier) = number_literal) ;) (goto_statement "goto LAB_000b5136;" goto statement_identifier ;) })) }) (else_clause "else {\n    iVar4 = 0;\n    do {\n      iVar7 = iVar4;\n      iVar4 = iVar7 + 1;\n    } while (param_2[iVar4] != 0);\n    local_ac = (int *)malloc(iVar7 * 4 + 8);\n    if (local_ac != (int *)0x0) {\n      iVar4 = 0;\nLAB_000b4ff9:\n      sVar6 = strlen(pcVar3);\n      __dest = (char *)malloc(sVar6 + sVar2 + 3);\n      local_ac[iVar4] = (int)__dest;\n      if (__dest != (char *)0x0) goto code_r0x000b5022;\n      piVar8 = local_ac;\n      if (iVar4 != 0) {\n        do {\n          pvVar5 = (void *)*piVar8;\n          piVar8 = piVar8 + 1;\n          free(pvVar5);\n        } while (local_ac + iVar4 != piVar8);\n      }\n      free(local_ac);\n    }\n  }" else (compound_statement "{\n    iVar4 = 0;\n    do {\n      iVar7 = iVar4;\n      iVar4 = iVar7 + 1;\n    } while (param_2[iVar4] != 0);\n    local_ac = (int *)malloc(iVar7 * 4 + 8);\n    if (local_ac != (int *)0x0) {\n      iVar4 = 0;\nLAB_000b4ff9:\n      sVar6 = strlen(pcVar3);\n      __dest = (char *)malloc(sVar6 + sVar2 + 3);\n      local_ac[iVar4] = (int)__dest;\n      if (__dest != (char *)0x0) goto code_r0x000b5022;\n      piVar8 = local_ac;\n      if (iVar4 != 0) {\n        do {\n          pvVar5 = (void *)*piVar8;\n          piVar8 = piVar8 + 1;\n          free(pvVar5);\n        } while (local_ac + iVar4 != piVar8);\n      }\n      free(local_ac);\n    }\n  }" { (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (do_statement "do {\n      iVar7 = iVar4;\n      iVar4 = iVar7 + 1;\n    } while (param_2[iVar4] != 0);" do (compound_statement "{\n      iVar7 = iVar4;\n      iVar4 = iVar7 + 1;\n    }" { (expression_statement "iVar7 = iVar4;" (assignment_expression "iVar7 = iVar4" identifier = identifier) ;) (expression_statement "iVar4 = iVar7 + 1;" (assignment_expression "iVar4 = iVar7 + 1" identifier = (binary_expression "iVar7 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(param_2[iVar4] != 0)" ( (binary_expression "param_2[iVar4] != 0" (subscript_expression "param_2[iVar4]" identifier [ identifier ]) != number_literal) )) ;) (expression_statement "local_ac = (int *)malloc(iVar7 * 4 + 8);" (assignment_expression "local_ac = (int *)malloc(iVar7 * 4 + 8)" identifier = (cast_expression "(int *)malloc(iVar7 * 4 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "malloc(iVar7 * 4 + 8)" identifier (argument_list "(iVar7 * 4 + 8)" ( (binary_expression "iVar7 * 4 + 8" (binary_expression "iVar7 * 4" identifier * number_literal) + number_literal) ))))) ;) (if_statement "if (local_ac != (int *)0x0) {\n      iVar4 = 0;\nLAB_000b4ff9:\n      sVar6 = strlen(pcVar3);\n      __dest = (char *)malloc(sVar6 + sVar2 + 3);\n      local_ac[iVar4] = (int)__dest;\n      if (__dest != (char *)0x0) goto code_r0x000b5022;\n      piVar8 = local_ac;\n      if (iVar4 != 0) {\n        do {\n          pvVar5 = (void *)*piVar8;\n          piVar8 = piVar8 + 1;\n          free(pvVar5);\n        } while (local_ac + iVar4 != piVar8);\n      }\n      free(local_ac);\n    }" if (parenthesized_expression "(local_ac != (int *)0x0)" ( (binary_expression "local_ac != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      iVar4 = 0;\nLAB_000b4ff9:\n      sVar6 = strlen(pcVar3);\n      __dest = (char *)malloc(sVar6 + sVar2 + 3);\n      local_ac[iVar4] = (int)__dest;\n      if (__dest != (char *)0x0) goto code_r0x000b5022;\n      piVar8 = local_ac;\n      if (iVar4 != 0) {\n        do {\n          pvVar5 = (void *)*piVar8;\n          piVar8 = piVar8 + 1;\n          free(pvVar5);\n        } while (local_ac + iVar4 != piVar8);\n      }\n      free(local_ac);\n    }" { (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (labeled_statement "LAB_000b4ff9:\n      sVar6 = strlen(pcVar3);" statement_identifier : (expression_statement "sVar6 = strlen(pcVar3);" (assignment_expression "sVar6 = strlen(pcVar3)" identifier = (call_expression "strlen(pcVar3)" identifier (argument_list "(pcVar3)" ( identifier )))) ;)) (expression_statement "__dest = (char *)malloc(sVar6 + sVar2 + 3);" (assignment_expression "__dest = (char *)malloc(sVar6 + sVar2 + 3)" identifier = (cast_expression "(char *)malloc(sVar6 + sVar2 + 3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "malloc(sVar6 + sVar2 + 3)" identifier (argument_list "(sVar6 + sVar2 + 3)" ( (binary_expression "sVar6 + sVar2 + 3" (binary_expression "sVar6 + sVar2" identifier + identifier) + number_literal) ))))) ;) (expression_statement "local_ac[iVar4] = (int)__dest;" (assignment_expression "local_ac[iVar4] = (int)__dest" (subscript_expression "local_ac[iVar4]" identifier [ identifier ]) = (cast_expression "(int)__dest" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (if_statement "if (__dest != (char *)0x0) goto code_r0x000b5022;" if (parenthesized_expression "(__dest != (char *)0x0)" ( (binary_expression "__dest != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto code_r0x000b5022;" goto statement_identifier ;)) (expression_statement "piVar8 = local_ac;" (assignment_expression "piVar8 = local_ac" identifier = identifier) ;) (if_statement "if (iVar4 != 0) {\n        do {\n          pvVar5 = (void *)*piVar8;\n          piVar8 = piVar8 + 1;\n          free(pvVar5);\n        } while (local_ac + iVar4 != piVar8);\n      }" if (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) (compound_statement "{\n        do {\n          pvVar5 = (void *)*piVar8;\n          piVar8 = piVar8 + 1;\n          free(pvVar5);\n        } while (local_ac + iVar4 != piVar8);\n      }" { (do_statement "do {\n          pvVar5 = (void *)*piVar8;\n          piVar8 = piVar8 + 1;\n          free(pvVar5);\n        } while (local_ac + iVar4 != piVar8);" do (compound_statement "{\n          pvVar5 = (void *)*piVar8;\n          piVar8 = piVar8 + 1;\n          free(pvVar5);\n        }" { (expression_statement "pvVar5 = (void *)*piVar8;" (assignment_expression "pvVar5 = (void *)*piVar8" identifier = (cast_expression "(void *)*piVar8" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar8" * identifier))) ;) (expression_statement "piVar8 = piVar8 + 1;" (assignment_expression "piVar8 = piVar8 + 1" identifier = (binary_expression "piVar8 + 1" identifier + number_literal)) ;) (expression_statement "free(pvVar5);" (call_expression "free(pvVar5)" identifier (argument_list "(pvVar5)" ( identifier ))) ;) }) while (parenthesized_expression "(local_ac + iVar4 != piVar8)" ( (binary_expression "local_ac + iVar4 != piVar8" (binary_expression "local_ac + iVar4" identifier + identifier) != identifier) )) ;) })) (expression_statement "free(local_ac);" (call_expression "free(local_ac)" identifier (argument_list "(local_ac)" ( identifier ))) ;) })) }))) (labeled_statement "LAB_000b50cf:\n  local_ac = (int *)0x0;" statement_identifier : (expression_statement "local_ac = (int *)0x0;" (assignment_expression "local_ac = (int *)0x0" identifier = (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;)) (goto_statement "goto LAB_000b4f3f;" goto statement_identifier ;) (labeled_statement "code_r0x000b5022:\n  strcpy(__dest,param_1);" statement_identifier : (expression_statement "strcpy(__dest,param_1);" (call_expression "strcpy(__dest,param_1)" identifier (argument_list "(__dest,param_1)" ( identifier , identifier ))) ;)) (if_statement "if (cVar1 != '/') {\n    __dest[sVar2] = '/';\n  }" if (parenthesized_expression "(cVar1 != '/')" ( (binary_expression "cVar1 != '/'" identifier != (char_literal "'/'" ' character ')) )) (compound_statement "{\n    __dest[sVar2] = '/';\n  }" { (expression_statement "__dest[sVar2] = '/';" (assignment_expression "__dest[sVar2] = '/'" (subscript_expression "__dest[sVar2]" identifier [ identifier ]) = (char_literal "'/'" ' character ')) ;) })) (expression_statement "strcpy(__dest + (cVar1 != '/') + sVar2,pcVar3);" (call_expression "strcpy(__dest + (cVar1 != '/') + sVar2,pcVar3)" identifier (argument_list "(__dest + (cVar1 != '/') + sVar2,pcVar3)" ( (binary_expression "__dest + (cVar1 != '/') + sVar2" (binary_expression "__dest + (cVar1 != '/')" identifier + (parenthesized_expression "(cVar1 != '/')" ( (binary_expression "cVar1 != '/'" identifier != (char_literal "'/'" ' character ')) ))) + identifier) , identifier ))) ;) (if_statement "if ((((param_3 & 1) != 0) && (iVar7 = __xstat64(3,__dest,&local_80), iVar7 == 0)) &&\n     ((local_80.st_mode & 0xf000) == 0x4000)) {\n    pcVar3 = (char *)local_ac[iVar4];\n    sVar6 = strlen(pcVar3);\n    pcVar3[sVar6] = '/';\n    *(undefined1 *)(local_ac[iVar4] + 1 + sVar6) = 0;\n  }" if (parenthesized_expression "((((param_3 & 1) != 0) && (iVar7 = __xstat64(3,__dest,&local_80), iVar7 == 0)) &&\n     ((local_80.st_mode & 0xf000) == 0x4000))" ( (binary_expression "(((param_3 & 1) != 0) && (iVar7 = __xstat64(3,__dest,&local_80), iVar7 == 0)) &&\n     ((local_80.st_mode & 0xf000) == 0x4000)" (parenthesized_expression "(((param_3 & 1) != 0) && (iVar7 = __xstat64(3,__dest,&local_80), iVar7 == 0))" ( (binary_expression "((param_3 & 1) != 0) && (iVar7 = __xstat64(3,__dest,&local_80), iVar7 == 0)" (parenthesized_expression "((param_3 & 1) != 0)" ( (binary_expression "(param_3 & 1) != 0" (parenthesized_expression "(param_3 & 1)" ( (binary_expression "param_3 & 1" identifier & number_literal) )) != number_literal) )) && (parenthesized_expression "(iVar7 = __xstat64(3,__dest,&local_80), iVar7 == 0)" ( (comma_expression "iVar7 = __xstat64(3,__dest,&local_80), iVar7 == 0" (assignment_expression "iVar7 = __xstat64(3,__dest,&local_80)" identifier = (call_expression "__xstat64(3,__dest,&local_80)" identifier (argument_list "(3,__dest,&local_80)" ( number_literal , identifier , (pointer_expression "&local_80" & identifier) )))) , (binary_expression "iVar7 == 0" identifier == number_literal)) ))) )) && (parenthesized_expression "((local_80.st_mode & 0xf000) == 0x4000)" ( (binary_expression "(local_80.st_mode & 0xf000) == 0x4000" (parenthesized_expression "(local_80.st_mode & 0xf000)" ( (binary_expression "local_80.st_mode & 0xf000" (field_expression "local_80.st_mode" identifier . field_identifier) & number_literal) )) == number_literal) ))) )) (compound_statement "{\n    pcVar3 = (char *)local_ac[iVar4];\n    sVar6 = strlen(pcVar3);\n    pcVar3[sVar6] = '/';\n    *(undefined1 *)(local_ac[iVar4] + 1 + sVar6) = 0;\n  }" { (expression_statement "pcVar3 = (char *)local_ac[iVar4];" (assignment_expression "pcVar3 = (char *)local_ac[iVar4]" identifier = (cast_expression "(char *)local_ac[iVar4]" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "local_ac[iVar4]" identifier [ identifier ]))) ;) (expression_statement "sVar6 = strlen(pcVar3);" (assignment_expression "sVar6 = strlen(pcVar3)" identifier = (call_expression "strlen(pcVar3)" identifier (argument_list "(pcVar3)" ( identifier )))) ;) (expression_statement "pcVar3[sVar6] = '/';" (assignment_expression "pcVar3[sVar6] = '/'" (subscript_expression "pcVar3[sVar6]" identifier [ identifier ]) = (char_literal "'/'" ' character ')) ;) (expression_statement "*(undefined1 *)(local_ac[iVar4] + 1 + sVar6) = 0;" (assignment_expression "*(undefined1 *)(local_ac[iVar4] + 1 + sVar6) = 0" (pointer_expression "*(undefined1 *)(local_ac[iVar4] + 1 + sVar6)" * (cast_expression "(undefined1 *)(local_ac[iVar4] + 1 + sVar6)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(local_ac[iVar4] + 1 + sVar6)" ( (binary_expression "local_ac[iVar4] + 1 + sVar6" (binary_expression "local_ac[iVar4] + 1" (subscript_expression "local_ac[iVar4]" identifier [ identifier ]) + number_literal) + identifier) )))) = number_literal) ;) })) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) (expression_statement "pcVar3 = (char *)param_2[iVar4];" (assignment_expression "pcVar3 = (char *)param_2[iVar4]" identifier = (cast_expression "(char *)param_2[iVar4]" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_2[iVar4]" identifier [ identifier ]))) ;) (if_statement "if (pcVar3 == (char *)0x0) goto LAB_000b5100;" if (parenthesized_expression "(pcVar3 == (char *)0x0)" ( (binary_expression "pcVar3 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_000b5100;" goto statement_identifier ;)) (goto_statement "goto LAB_000b4ff9;" goto statement_identifier ;) (labeled_statement "LAB_000b5100:\n  pvVar5 = (void *)*param_2;" statement_identifier : (expression_statement "pvVar5 = (void *)*param_2;" (assignment_expression "pvVar5 = (void *)*param_2" identifier = (cast_expression "(void *)*param_2" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier))) ;)) (expression_statement "local_ac[iVar4] = 0;" (assignment_expression "local_ac[iVar4] = 0" (subscript_expression "local_ac[iVar4]" identifier [ identifier ]) = number_literal) ;) (expression_statement "piVar8 = param_2;" (assignment_expression "piVar8 = param_2" identifier = identifier) ;) (while_statement "while (pvVar5 != (void *)0x0) {\n    piVar8 = piVar8 + 1;\n    free(pvVar5);\n    pvVar5 = (void *)*piVar8;\n  }" while (parenthesized_expression "(pvVar5 != (void *)0x0)" ( (binary_expression "pvVar5 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    piVar8 = piVar8 + 1;\n    free(pvVar5);\n    pvVar5 = (void *)*piVar8;\n  }" { (expression_statement "piVar8 = piVar8 + 1;" (assignment_expression "piVar8 = piVar8 + 1" identifier = (binary_expression "piVar8 + 1" identifier + number_literal)) ;) (expression_statement "free(pvVar5);" (call_expression "free(pvVar5)" identifier (argument_list "(pvVar5)" ( identifier ))) ;) (expression_statement "pvVar5 = (void *)*piVar8;" (assignment_expression "pvVar5 = (void *)*piVar8" identifier = (cast_expression "(void *)*piVar8" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar8" * identifier))) ;) })) (labeled_statement "LAB_000b5136:\n  free(param_2);" statement_identifier : (expression_statement "free(param_2);" (call_expression "free(param_2)" identifier (argument_list "(param_2)" ( identifier ))) ;)) (labeled_statement "LAB_000b4f3f:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_ac;\n  }" statement_identifier : (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_ac;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return local_ac;\n  }" { (return_statement "return local_ac;" return identifier ;) }))) (expression_statement "FUN_000ecc40();" (call_expression "FUN_000ecc40()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) , (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT))) ))) )) (compound_statement { (do_statement do (compound_statement { (while_statement while (parenthesized_expression ( (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , IDENT , (pointer_expression & IDENT) )))) , (binary_expression (binary_expression IDENT != LIT) || (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (field_expression IDENT . field_identifier) & LIT) )) != LIT) )))) )) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (goto_statement goto statement_identifier ;)) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT + LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + IDENT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + IDENT) + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) ;) })) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ (binary_expression IDENT - LIT) ])) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (goto_statement goto statement_identifier ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ IDENT ]) != LIT) )) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (binary_expression (binary_expression IDENT * LIT) + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;)) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (binary_expression (binary_expression IDENT + IDENT) + LIT) ))))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) }) while (parenthesized_expression ( (binary_expression (binary_expression IDENT + IDENT) != IDENT) )) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) }))) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;)) (goto_statement goto statement_identifier ;) (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (char_literal ' character ')) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = (char_literal ' character ')) ;) })) (expression_statement (call_expression IDENT (argument_list ( (binary_expression (binary_expression IDENT + (parenthesized_expression ( (binary_expression IDENT != (char_literal ' character ')) ))) + IDENT) , IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , IDENT , (pointer_expression & IDENT) )))) , (binary_expression IDENT == LIT)) ))) )) && (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (field_expression IDENT . field_identifier) & LIT) )) == LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ IDENT ]))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = (char_literal ' character ')) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (subscript_expression IDENT [ IDENT ]) + LIT) + IDENT) )))) = LIT) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ IDENT ]))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (goto_statement goto statement_identifier ;)) (goto_statement goto statement_identifier ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;)) (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (while_statement while (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) })) (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;)) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return IDENT ;) }))) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "int * __regparm3 FUN_000b4e60(char *param_1,int *param_2,uint param_3)\n\n{\n  char cVar1;\n  size_t sVar2;\n  char *pcVar3;\n  int iVar4;\n  void *pvVar5;\n  size_t sVar6;\n  char *__dest;\n  int iVar7;\n  int *piVar8;\n  int in_GS_OFFSET;\n  int *local_ac;\n  stat64 local_80;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0xb4e6b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  sVar2 = strlen(param_1);\n  if (sVar2 == 0) {\n    local_ac = param_2;\n    if (((param_3 & 1) != 0) && (pcVar3 = (char *)*param_2, pcVar3 != (char *)0x0)) {\n      do {\n        while ((iVar4 = __xstat64(3,pcVar3,&local_80), iVar4 != 0 ||\n               ((local_80.st_mode & 0xf000) != 0x4000))) {\n          param_2 = param_2 + 1;\n          pcVar3 = (char *)*param_2;\n          if (pcVar3 == (char *)0x0) goto LAB_000b4f3f;\n        }\n        pcVar3 = (char *)*param_2;\n        sVar2 = strlen(pcVar3);\n        pvVar5 = realloc(pcVar3,sVar2 + 2);\n        if (pvVar5 == (void *)0x0) goto LAB_000b50cf;\n        *(undefined1 *)((int)pvVar5 + sVar2) = 0x2f;\n        *(undefined1 *)((int)pvVar5 + sVar2 + 1) = 0;\n        *param_2 = (int)pvVar5;\n        pcVar3 = (char *)param_2[1];\n        param_2 = param_2 + 1;\n      } while (pcVar3 != (char *)0x0);\n    }\n    goto LAB_000b4f3f;\n  }\n  cVar1 = param_1[sVar2 - 1];\n  pcVar3 = (char *)*param_2;\n  if (pcVar3 == (char *)0x0) {\n    local_ac = (int *)malloc(4);\n    if (local_ac != (int *)0x0) {\n      *local_ac = 0;\n      goto LAB_000b5136;\n    }\n  }\n  else {\n    iVar4 = 0;\n    do {\n      iVar7 = iVar4;\n      iVar4 = iVar7 + 1;\n    } while (param_2[iVar4] != 0);\n    local_ac = (int *)malloc(iVar7 * 4 + 8);\n    if (local_ac != (int *)0x0) {\n      iVar4 = 0;\nLAB_000b4ff9:\n      sVar6 = strlen(pcVar3);\n      __dest = (char *)malloc(sVar6 + sVar2 + 3);\n      local_ac[iVar4] = (int)__dest;\n      if (__dest != (char *)0x0) goto code_r0x000b5022;\n      piVar8 = local_ac;\n      if (iVar4 != 0) {\n        do {\n          pvVar5 = (void *)*piVar8;\n          piVar8 = piVar8 + 1;\n          free(pvVar5);\n        } while (local_ac + iVar4 != piVar8);\n      }\n      free(local_ac);\n    }\n  }\nLAB_000b50cf:\n  local_ac = (int *)0x0;\n  goto LAB_000b4f3f;\ncode_r0x000b5022:\n  strcpy(__dest,param_1);\n  if (cVar1 != '/') {\n    __dest[sVar2] = '/';\n  }\n  strcpy(__dest + (cVar1 != '/') + sVar2,pcVar3);\n  if ((((param_3 & 1) != 0) && (iVar7 = __xstat64(3,__dest,&local_80), iVar7 == 0)) &&\n     ((local_80.st_mode & 0xf000) == 0x4000)) {\n    pcVar3 = (char *)local_ac[iVar4];\n    sVar6 = strlen(pcVar3);\n    pcVar3[sVar6] = '/';\n    *(undefined1 *)(local_ac[iVar4] + 1 + sVar6) = 0;\n  }\n  iVar4 = iVar4 + 1;\n  pcVar3 = (char *)param_2[iVar4];\n  if (pcVar3 == (char *)0x0) goto LAB_000b5100;\n  goto LAB_000b4ff9;\nLAB_000b5100:\n  pvVar5 = (void *)*param_2;\n  local_ac[iVar4] = 0;\n  piVar8 = param_2;\n  while (pvVar5 != (void *)0x0) {\n    piVar8 = piVar8 + 1;\n    free(pvVar5);\n    pvVar5 = (void *)*piVar8;\n  }\nLAB_000b5136:\n  free(param_2);\nLAB_000b4f3f:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_ac;\n  }\n                    \n  FUN_000ecc40();\n}" (primitive_type "int") (pointer_declarator "* __regparm3 FUN_000b4e60(char *param_1,int *param_2,uint param_3)" (* "*") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_000b4e60(char *param_1,int *param_2,uint param_3)" (identifier "FUN_000b4e60") (parameter_list "(char *param_1,int *param_2,uint param_3)" (( "(") (parameter_declaration "char *param_1" (primitive_type "char") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int *param_2" (primitive_type "int") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) () ")")))) (compound_statement "{\n  char cVar1;\n  size_t sVar2;\n  char *pcVar3;\n  int iVar4;\n  void *pvVar5;\n  size_t sVar6;\n  char *__dest;\n  int iVar7;\n  int *piVar8;\n  int in_GS_OFFSET;\n  int *local_ac;\n  stat64 local_80;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0xb4e6b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  sVar2 = strlen(param_1);\n  if (sVar2 == 0) {\n    local_ac = param_2;\n    if (((param_3 & 1) != 0) && (pcVar3 = (char *)*param_2, pcVar3 != (char *)0x0)) {\n      do {\n        while ((iVar4 = __xstat64(3,pcVar3,&local_80), iVar4 != 0 ||\n               ((local_80.st_mode & 0xf000) != 0x4000))) {\n          param_2 = param_2 + 1;\n          pcVar3 = (char *)*param_2;\n          if (pcVar3 == (char *)0x0) goto LAB_000b4f3f;\n        }\n        pcVar3 = (char *)*param_2;\n        sVar2 = strlen(pcVar3);\n        pvVar5 = realloc(pcVar3,sVar2 + 2);\n        if (pvVar5 == (void *)0x0) goto LAB_000b50cf;\n        *(undefined1 *)((int)pvVar5 + sVar2) = 0x2f;\n        *(undefined1 *)((int)pvVar5 + sVar2 + 1) = 0;\n        *param_2 = (int)pvVar5;\n        pcVar3 = (char *)param_2[1];\n        param_2 = param_2 + 1;\n      } while (pcVar3 != (char *)0x0);\n    }\n    goto LAB_000b4f3f;\n  }\n  cVar1 = param_1[sVar2 - 1];\n  pcVar3 = (char *)*param_2;\n  if (pcVar3 == (char *)0x0) {\n    local_ac = (int *)malloc(4);\n    if (local_ac != (int *)0x0) {\n      *local_ac = 0;\n      goto LAB_000b5136;\n    }\n  }\n  else {\n    iVar4 = 0;\n    do {\n      iVar7 = iVar4;\n      iVar4 = iVar7 + 1;\n    } while (param_2[iVar4] != 0);\n    local_ac = (int *)malloc(iVar7 * 4 + 8);\n    if (local_ac != (int *)0x0) {\n      iVar4 = 0;\nLAB_000b4ff9:\n      sVar6 = strlen(pcVar3);\n      __dest = (char *)malloc(sVar6 + sVar2 + 3);\n      local_ac[iVar4] = (int)__dest;\n      if (__dest != (char *)0x0) goto code_r0x000b5022;\n      piVar8 = local_ac;\n      if (iVar4 != 0) {\n        do {\n          pvVar5 = (void *)*piVar8;\n          piVar8 = piVar8 + 1;\n          free(pvVar5);\n        } while (local_ac + iVar4 != piVar8);\n      }\n      free(local_ac);\n    }\n  }\nLAB_000b50cf:\n  local_ac = (int *)0x0;\n  goto LAB_000b4f3f;\ncode_r0x000b5022:\n  strcpy(__dest,param_1);\n  if (cVar1 != '/') {\n    __dest[sVar2] = '/';\n  }\n  strcpy(__dest + (cVar1 != '/') + sVar2,pcVar3);\n  if ((((param_3 & 1) != 0) && (iVar7 = __xstat64(3,__dest,&local_80), iVar7 == 0)) &&\n     ((local_80.st_mode & 0xf000) == 0x4000)) {\n    pcVar3 = (char *)local_ac[iVar4];\n    sVar6 = strlen(pcVar3);\n    pcVar3[sVar6] = '/';\n    *(undefined1 *)(local_ac[iVar4] + 1 + sVar6) = 0;\n  }\n  iVar4 = iVar4 + 1;\n  pcVar3 = (char *)param_2[iVar4];\n  if (pcVar3 == (char *)0x0) goto LAB_000b5100;\n  goto LAB_000b4ff9;\nLAB_000b5100:\n  pvVar5 = (void *)*param_2;\n  local_ac[iVar4] = 0;\n  piVar8 = param_2;\n  while (pvVar5 != (void *)0x0) {\n    piVar8 = piVar8 + 1;\n    free(pvVar5);\n    pvVar5 = (void *)*piVar8;\n  }\nLAB_000b5136:\n  free(param_2);\nLAB_000b4f3f:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_ac;\n  }\n                    \n  FUN_000ecc40();\n}" ({ "{") (declaration "char cVar1;" (primitive_type "char") (identifier "cVar1") (; ";")) (declaration "size_t sVar2;" (primitive_type "size_t") (identifier "sVar2") (; ";")) (declaration "char *pcVar3;" (primitive_type "char") (pointer_declarator "*pcVar3" (* "*") (identifier "pcVar3")) (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "void *pvVar5;" (primitive_type "void") (pointer_declarator "*pvVar5" (* "*") (identifier "pvVar5")) (; ";")) (declaration "size_t sVar6;" (primitive_type "size_t") (identifier "sVar6") (; ";")) (declaration "char *__dest;" (primitive_type "char") (pointer_declarator "*__dest" (* "*") (identifier "__dest")) (; ";")) (declaration "int iVar7;" (primitive_type "int") (identifier "iVar7") (; ";")) (declaration "int *piVar8;" (primitive_type "int") (pointer_declarator "*piVar8" (* "*") (identifier "piVar8")) (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "int *local_ac;" (primitive_type "int") (pointer_declarator "*local_ac" (* "*") (identifier "local_ac")) (; ";")) (declaration "stat64 local_80;" (type_identifier "stat64") (identifier "local_80") (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0xb4e6b;" (assignment_expression "uStack_14 = 0xb4e6b" (identifier "uStack_14") (= "=") (number_literal "0xb4e6b")) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "sVar2 = strlen(param_1);" (assignment_expression "sVar2 = strlen(param_1)" (identifier "sVar2") (= "=") (call_expression "strlen(param_1)" (identifier "strlen") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (if_statement "if (sVar2 == 0) {\n    local_ac = param_2;\n    if (((param_3 & 1) != 0) && (pcVar3 = (char *)*param_2, pcVar3 != (char *)0x0)) {\n      do {\n        while ((iVar4 = __xstat64(3,pcVar3,&local_80), iVar4 != 0 ||\n               ((local_80.st_mode & 0xf000) != 0x4000))) {\n          param_2 = param_2 + 1;\n          pcVar3 = (char *)*param_2;\n          if (pcVar3 == (char *)0x0) goto LAB_000b4f3f;\n        }\n        pcVar3 = (char *)*param_2;\n        sVar2 = strlen(pcVar3);\n        pvVar5 = realloc(pcVar3,sVar2 + 2);\n        if (pvVar5 == (void *)0x0) goto LAB_000b50cf;\n        *(undefined1 *)((int)pvVar5 + sVar2) = 0x2f;\n        *(undefined1 *)((int)pvVar5 + sVar2 + 1) = 0;\n        *param_2 = (int)pvVar5;\n        pcVar3 = (char *)param_2[1];\n        param_2 = param_2 + 1;\n      } while (pcVar3 != (char *)0x0);\n    }\n    goto LAB_000b4f3f;\n  }" (if "if") (parenthesized_expression "(sVar2 == 0)" (( "(") (binary_expression "sVar2 == 0" (identifier "sVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    local_ac = param_2;\n    if (((param_3 & 1) != 0) && (pcVar3 = (char *)*param_2, pcVar3 != (char *)0x0)) {\n      do {\n        while ((iVar4 = __xstat64(3,pcVar3,&local_80), iVar4 != 0 ||\n               ((local_80.st_mode & 0xf000) != 0x4000))) {\n          param_2 = param_2 + 1;\n          pcVar3 = (char *)*param_2;\n          if (pcVar3 == (char *)0x0) goto LAB_000b4f3f;\n        }\n        pcVar3 = (char *)*param_2;\n        sVar2 = strlen(pcVar3);\n        pvVar5 = realloc(pcVar3,sVar2 + 2);\n        if (pvVar5 == (void *)0x0) goto LAB_000b50cf;\n        *(undefined1 *)((int)pvVar5 + sVar2) = 0x2f;\n        *(undefined1 *)((int)pvVar5 + sVar2 + 1) = 0;\n        *param_2 = (int)pvVar5;\n        pcVar3 = (char *)param_2[1];\n        param_2 = param_2 + 1;\n      } while (pcVar3 != (char *)0x0);\n    }\n    goto LAB_000b4f3f;\n  }" ({ "{") (expression_statement "local_ac = param_2;" (assignment_expression "local_ac = param_2" (identifier "local_ac") (= "=") (identifier "param_2")) (; ";")) (if_statement "if (((param_3 & 1) != 0) && (pcVar3 = (char *)*param_2, pcVar3 != (char *)0x0)) {\n      do {\n        while ((iVar4 = __xstat64(3,pcVar3,&local_80), iVar4 != 0 ||\n               ((local_80.st_mode & 0xf000) != 0x4000))) {\n          param_2 = param_2 + 1;\n          pcVar3 = (char *)*param_2;\n          if (pcVar3 == (char *)0x0) goto LAB_000b4f3f;\n        }\n        pcVar3 = (char *)*param_2;\n        sVar2 = strlen(pcVar3);\n        pvVar5 = realloc(pcVar3,sVar2 + 2);\n        if (pvVar5 == (void *)0x0) goto LAB_000b50cf;\n        *(undefined1 *)((int)pvVar5 + sVar2) = 0x2f;\n        *(undefined1 *)((int)pvVar5 + sVar2 + 1) = 0;\n        *param_2 = (int)pvVar5;\n        pcVar3 = (char *)param_2[1];\n        param_2 = param_2 + 1;\n      } while (pcVar3 != (char *)0x0);\n    }" (if "if") (parenthesized_expression "(((param_3 & 1) != 0) && (pcVar3 = (char *)*param_2, pcVar3 != (char *)0x0))" (( "(") (binary_expression "((param_3 & 1) != 0) && (pcVar3 = (char *)*param_2, pcVar3 != (char *)0x0)" (parenthesized_expression "((param_3 & 1) != 0)" (( "(") (binary_expression "(param_3 & 1) != 0" (parenthesized_expression "(param_3 & 1)" (( "(") (binary_expression "param_3 & 1" (identifier "param_3") (& "&") (number_literal "1")) () ")")) (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(pcVar3 = (char *)*param_2, pcVar3 != (char *)0x0)" (( "(") (comma_expression "pcVar3 = (char *)*param_2, pcVar3 != (char *)0x0" (assignment_expression "pcVar3 = (char *)*param_2" (identifier "pcVar3") (= "=") (cast_expression "(char *)*param_2" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_2" (* "*") (identifier "param_2")))) (, ",") (binary_expression "pcVar3 != (char *)0x0" (identifier "pcVar3") (!= "!=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")))) () ")"))) () ")")) (compound_statement "{\n      do {\n        while ((iVar4 = __xstat64(3,pcVar3,&local_80), iVar4 != 0 ||\n               ((local_80.st_mode & 0xf000) != 0x4000))) {\n          param_2 = param_2 + 1;\n          pcVar3 = (char *)*param_2;\n          if (pcVar3 == (char *)0x0) goto LAB_000b4f3f;\n        }\n        pcVar3 = (char *)*param_2;\n        sVar2 = strlen(pcVar3);\n        pvVar5 = realloc(pcVar3,sVar2 + 2);\n        if (pvVar5 == (void *)0x0) goto LAB_000b50cf;\n        *(undefined1 *)((int)pvVar5 + sVar2) = 0x2f;\n        *(undefined1 *)((int)pvVar5 + sVar2 + 1) = 0;\n        *param_2 = (int)pvVar5;\n        pcVar3 = (char *)param_2[1];\n        param_2 = param_2 + 1;\n      } while (pcVar3 != (char *)0x0);\n    }" ({ "{") (do_statement "do {\n        while ((iVar4 = __xstat64(3,pcVar3,&local_80), iVar4 != 0 ||\n               ((local_80.st_mode & 0xf000) != 0x4000))) {\n          param_2 = param_2 + 1;\n          pcVar3 = (char *)*param_2;\n          if (pcVar3 == (char *)0x0) goto LAB_000b4f3f;\n        }\n        pcVar3 = (char *)*param_2;\n        sVar2 = strlen(pcVar3);\n        pvVar5 = realloc(pcVar3,sVar2 + 2);\n        if (pvVar5 == (void *)0x0) goto LAB_000b50cf;\n        *(undefined1 *)((int)pvVar5 + sVar2) = 0x2f;\n        *(undefined1 *)((int)pvVar5 + sVar2 + 1) = 0;\n        *param_2 = (int)pvVar5;\n        pcVar3 = (char *)param_2[1];\n        param_2 = param_2 + 1;\n      } while (pcVar3 != (char *)0x0);" (do "do") (compound_statement "{\n        while ((iVar4 = __xstat64(3,pcVar3,&local_80), iVar4 != 0 ||\n               ((local_80.st_mode & 0xf000) != 0x4000))) {\n          param_2 = param_2 + 1;\n          pcVar3 = (char *)*param_2;\n          if (pcVar3 == (char *)0x0) goto LAB_000b4f3f;\n        }\n        pcVar3 = (char *)*param_2;\n        sVar2 = strlen(pcVar3);\n        pvVar5 = realloc(pcVar3,sVar2 + 2);\n        if (pvVar5 == (void *)0x0) goto LAB_000b50cf;\n        *(undefined1 *)((int)pvVar5 + sVar2) = 0x2f;\n        *(undefined1 *)((int)pvVar5 + sVar2 + 1) = 0;\n        *param_2 = (int)pvVar5;\n        pcVar3 = (char *)param_2[1];\n        param_2 = param_2 + 1;\n      }" ({ "{") (while_statement "while ((iVar4 = __xstat64(3,pcVar3,&local_80), iVar4 != 0 ||\n               ((local_80.st_mode & 0xf000) != 0x4000))) {\n          param_2 = param_2 + 1;\n          pcVar3 = (char *)*param_2;\n          if (pcVar3 == (char *)0x0) goto LAB_000b4f3f;\n        }" (while "while") (parenthesized_expression "((iVar4 = __xstat64(3,pcVar3,&local_80), iVar4 != 0 ||\n               ((local_80.st_mode & 0xf000) != 0x4000)))" (( "(") (parenthesized_expression "(iVar4 = __xstat64(3,pcVar3,&local_80), iVar4 != 0 ||\n               ((local_80.st_mode & 0xf000) != 0x4000))" (( "(") (comma_expression "iVar4 = __xstat64(3,pcVar3,&local_80), iVar4 != 0 ||\n               ((local_80.st_mode & 0xf000) != 0x4000)" (assignment_expression "iVar4 = __xstat64(3,pcVar3,&local_80)" (identifier "iVar4") (= "=") (call_expression "__xstat64(3,pcVar3,&local_80)" (identifier "__xstat64") (argument_list "(3,pcVar3,&local_80)" (( "(") (number_literal "3") (, ",") (identifier "pcVar3") (, ",") (pointer_expression "&local_80" (& "&") (identifier "local_80")) () ")")))) (, ",") (binary_expression "iVar4 != 0 ||\n               ((local_80.st_mode & 0xf000) != 0x4000)" (binary_expression "iVar4 != 0" (identifier "iVar4") (!= "!=") (number_literal "0")) (|| "||") (parenthesized_expression "((local_80.st_mode & 0xf000) != 0x4000)" (( "(") (binary_expression "(local_80.st_mode & 0xf000) != 0x4000" (parenthesized_expression "(local_80.st_mode & 0xf000)" (( "(") (binary_expression "local_80.st_mode & 0xf000" (field_expression "local_80.st_mode" (identifier "local_80") (. ".") (field_identifier "st_mode")) (& "&") (number_literal "0xf000")) () ")")) (!= "!=") (number_literal "0x4000")) () ")")))) () ")")) () ")")) (compound_statement "{\n          param_2 = param_2 + 1;\n          pcVar3 = (char *)*param_2;\n          if (pcVar3 == (char *)0x0) goto LAB_000b4f3f;\n        }" ({ "{") (expression_statement "param_2 = param_2 + 1;" (assignment_expression "param_2 = param_2 + 1" (identifier "param_2") (= "=") (binary_expression "param_2 + 1" (identifier "param_2") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "pcVar3 = (char *)*param_2;" (assignment_expression "pcVar3 = (char *)*param_2" (identifier "pcVar3") (= "=") (cast_expression "(char *)*param_2" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_2" (* "*") (identifier "param_2")))) (; ";")) (if_statement "if (pcVar3 == (char *)0x0) goto LAB_000b4f3f;" (if "if") (parenthesized_expression "(pcVar3 == (char *)0x0)" (( "(") (binary_expression "pcVar3 == (char *)0x0" (identifier "pcVar3") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (goto_statement "goto LAB_000b4f3f;" (goto "goto") (statement_identifier "LAB_000b4f3f") (; ";"))) (} "}"))) (expression_statement "pcVar3 = (char *)*param_2;" (assignment_expression "pcVar3 = (char *)*param_2" (identifier "pcVar3") (= "=") (cast_expression "(char *)*param_2" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_2" (* "*") (identifier "param_2")))) (; ";")) (expression_statement "sVar2 = strlen(pcVar3);" (assignment_expression "sVar2 = strlen(pcVar3)" (identifier "sVar2") (= "=") (call_expression "strlen(pcVar3)" (identifier "strlen") (argument_list "(pcVar3)" (( "(") (identifier "pcVar3") () ")")))) (; ";")) (expression_statement "pvVar5 = realloc(pcVar3,sVar2 + 2);" (assignment_expression "pvVar5 = realloc(pcVar3,sVar2 + 2)" (identifier "pvVar5") (= "=") (call_expression "realloc(pcVar3,sVar2 + 2)" (identifier "realloc") (argument_list "(pcVar3,sVar2 + 2)" (( "(") (identifier "pcVar3") (, ",") (binary_expression "sVar2 + 2" (identifier "sVar2") (+ "+") (number_literal "2")) () ")")))) (; ";")) (if_statement "if (pvVar5 == (void *)0x0) goto LAB_000b50cf;" (if "if") (parenthesized_expression "(pvVar5 == (void *)0x0)" (( "(") (binary_expression "pvVar5 == (void *)0x0" (identifier "pvVar5") (== "==") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (goto_statement "goto LAB_000b50cf;" (goto "goto") (statement_identifier "LAB_000b50cf") (; ";"))) (expression_statement "*(undefined1 *)((int)pvVar5 + sVar2) = 0x2f;" (assignment_expression "*(undefined1 *)((int)pvVar5 + sVar2) = 0x2f" (pointer_expression "*(undefined1 *)((int)pvVar5 + sVar2)" (* "*") (cast_expression "(undefined1 *)((int)pvVar5 + sVar2)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)pvVar5 + sVar2)" (( "(") (binary_expression "(int)pvVar5 + sVar2" (cast_expression "(int)pvVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pvVar5")) (+ "+") (identifier "sVar2")) () ")")))) (= "=") (number_literal "0x2f")) (; ";")) (expression_statement "*(undefined1 *)((int)pvVar5 + sVar2 + 1) = 0;" (assignment_expression "*(undefined1 *)((int)pvVar5 + sVar2 + 1) = 0" (pointer_expression "*(undefined1 *)((int)pvVar5 + sVar2 + 1)" (* "*") (cast_expression "(undefined1 *)((int)pvVar5 + sVar2 + 1)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)pvVar5 + sVar2 + 1)" (( "(") (binary_expression "(int)pvVar5 + sVar2 + 1" (binary_expression "(int)pvVar5 + sVar2" (cast_expression "(int)pvVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pvVar5")) (+ "+") (identifier "sVar2")) (+ "+") (number_literal "1")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*param_2 = (int)pvVar5;" (assignment_expression "*param_2 = (int)pvVar5" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (cast_expression "(int)pvVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pvVar5"))) (; ";")) (expression_statement "pcVar3 = (char *)param_2[1];" (assignment_expression "pcVar3 = (char *)param_2[1]" (identifier "pcVar3") (= "=") (cast_expression "(char *)param_2[1]" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]")))) (; ";")) (expression_statement "param_2 = param_2 + 1;" (assignment_expression "param_2 = param_2 + 1" (identifier "param_2") (= "=") (binary_expression "param_2 + 1" (identifier "param_2") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(pcVar3 != (char *)0x0)" (( "(") (binary_expression "pcVar3 != (char *)0x0" (identifier "pcVar3") (!= "!=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (; ";")) (} "}"))) (goto_statement "goto LAB_000b4f3f;" (goto "goto") (statement_identifier "LAB_000b4f3f") (; ";")) (} "}"))) (expression_statement "cVar1 = param_1[sVar2 - 1];" (assignment_expression "cVar1 = param_1[sVar2 - 1]" (identifier "cVar1") (= "=") (subscript_expression "param_1[sVar2 - 1]" (identifier "param_1") ([ "[") (binary_expression "sVar2 - 1" (identifier "sVar2") (- "-") (number_literal "1")) (] "]"))) (; ";")) (expression_statement "pcVar3 = (char *)*param_2;" (assignment_expression "pcVar3 = (char *)*param_2" (identifier "pcVar3") (= "=") (cast_expression "(char *)*param_2" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_2" (* "*") (identifier "param_2")))) (; ";")) (if_statement "if (pcVar3 == (char *)0x0) {\n    local_ac = (int *)malloc(4);\n    if (local_ac != (int *)0x0) {\n      *local_ac = 0;\n      goto LAB_000b5136;\n    }\n  }\n  else {\n    iVar4 = 0;\n    do {\n      iVar7 = iVar4;\n      iVar4 = iVar7 + 1;\n    } while (param_2[iVar4] != 0);\n    local_ac = (int *)malloc(iVar7 * 4 + 8);\n    if (local_ac != (int *)0x0) {\n      iVar4 = 0;\nLAB_000b4ff9:\n      sVar6 = strlen(pcVar3);\n      __dest = (char *)malloc(sVar6 + sVar2 + 3);\n      local_ac[iVar4] = (int)__dest;\n      if (__dest != (char *)0x0) goto code_r0x000b5022;\n      piVar8 = local_ac;\n      if (iVar4 != 0) {\n        do {\n          pvVar5 = (void *)*piVar8;\n          piVar8 = piVar8 + 1;\n          free(pvVar5);\n        } while (local_ac + iVar4 != piVar8);\n      }\n      free(local_ac);\n    }\n  }" (if "if") (parenthesized_expression "(pcVar3 == (char *)0x0)" (( "(") (binary_expression "pcVar3 == (char *)0x0" (identifier "pcVar3") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    local_ac = (int *)malloc(4);\n    if (local_ac != (int *)0x0) {\n      *local_ac = 0;\n      goto LAB_000b5136;\n    }\n  }" ({ "{") (expression_statement "local_ac = (int *)malloc(4);" (assignment_expression "local_ac = (int *)malloc(4)" (identifier "local_ac") (= "=") (cast_expression "(int *)malloc(4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "malloc(4)" (identifier "malloc") (argument_list "(4)" (( "(") (number_literal "4") () ")"))))) (; ";")) (if_statement "if (local_ac != (int *)0x0) {\n      *local_ac = 0;\n      goto LAB_000b5136;\n    }" (if "if") (parenthesized_expression "(local_ac != (int *)0x0)" (( "(") (binary_expression "local_ac != (int *)0x0" (identifier "local_ac") (!= "!=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      *local_ac = 0;\n      goto LAB_000b5136;\n    }" ({ "{") (expression_statement "*local_ac = 0;" (assignment_expression "*local_ac = 0" (pointer_expression "*local_ac" (* "*") (identifier "local_ac")) (= "=") (number_literal "0")) (; ";")) (goto_statement "goto LAB_000b5136;" (goto "goto") (statement_identifier "LAB_000b5136") (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    iVar4 = 0;\n    do {\n      iVar7 = iVar4;\n      iVar4 = iVar7 + 1;\n    } while (param_2[iVar4] != 0);\n    local_ac = (int *)malloc(iVar7 * 4 + 8);\n    if (local_ac != (int *)0x0) {\n      iVar4 = 0;\nLAB_000b4ff9:\n      sVar6 = strlen(pcVar3);\n      __dest = (char *)malloc(sVar6 + sVar2 + 3);\n      local_ac[iVar4] = (int)__dest;\n      if (__dest != (char *)0x0) goto code_r0x000b5022;\n      piVar8 = local_ac;\n      if (iVar4 != 0) {\n        do {\n          pvVar5 = (void *)*piVar8;\n          piVar8 = piVar8 + 1;\n          free(pvVar5);\n        } while (local_ac + iVar4 != piVar8);\n      }\n      free(local_ac);\n    }\n  }" (else "else") (compound_statement "{\n    iVar4 = 0;\n    do {\n      iVar7 = iVar4;\n      iVar4 = iVar7 + 1;\n    } while (param_2[iVar4] != 0);\n    local_ac = (int *)malloc(iVar7 * 4 + 8);\n    if (local_ac != (int *)0x0) {\n      iVar4 = 0;\nLAB_000b4ff9:\n      sVar6 = strlen(pcVar3);\n      __dest = (char *)malloc(sVar6 + sVar2 + 3);\n      local_ac[iVar4] = (int)__dest;\n      if (__dest != (char *)0x0) goto code_r0x000b5022;\n      piVar8 = local_ac;\n      if (iVar4 != 0) {\n        do {\n          pvVar5 = (void *)*piVar8;\n          piVar8 = piVar8 + 1;\n          free(pvVar5);\n        } while (local_ac + iVar4 != piVar8);\n      }\n      free(local_ac);\n    }\n  }" ({ "{") (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" (identifier "iVar4") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n      iVar7 = iVar4;\n      iVar4 = iVar7 + 1;\n    } while (param_2[iVar4] != 0);" (do "do") (compound_statement "{\n      iVar7 = iVar4;\n      iVar4 = iVar7 + 1;\n    }" ({ "{") (expression_statement "iVar7 = iVar4;" (assignment_expression "iVar7 = iVar4" (identifier "iVar7") (= "=") (identifier "iVar4")) (; ";")) (expression_statement "iVar4 = iVar7 + 1;" (assignment_expression "iVar4 = iVar7 + 1" (identifier "iVar4") (= "=") (binary_expression "iVar7 + 1" (identifier "iVar7") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(param_2[iVar4] != 0)" (( "(") (binary_expression "param_2[iVar4] != 0" (subscript_expression "param_2[iVar4]" (identifier "param_2") ([ "[") (identifier "iVar4") (] "]")) (!= "!=") (number_literal "0")) () ")")) (; ";")) (expression_statement "local_ac = (int *)malloc(iVar7 * 4 + 8);" (assignment_expression "local_ac = (int *)malloc(iVar7 * 4 + 8)" (identifier "local_ac") (= "=") (cast_expression "(int *)malloc(iVar7 * 4 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "malloc(iVar7 * 4 + 8)" (identifier "malloc") (argument_list "(iVar7 * 4 + 8)" (( "(") (binary_expression "iVar7 * 4 + 8" (binary_expression "iVar7 * 4" (identifier "iVar7") (* "*") (number_literal "4")) (+ "+") (number_literal "8")) () ")"))))) (; ";")) (if_statement "if (local_ac != (int *)0x0) {\n      iVar4 = 0;\nLAB_000b4ff9:\n      sVar6 = strlen(pcVar3);\n      __dest = (char *)malloc(sVar6 + sVar2 + 3);\n      local_ac[iVar4] = (int)__dest;\n      if (__dest != (char *)0x0) goto code_r0x000b5022;\n      piVar8 = local_ac;\n      if (iVar4 != 0) {\n        do {\n          pvVar5 = (void *)*piVar8;\n          piVar8 = piVar8 + 1;\n          free(pvVar5);\n        } while (local_ac + iVar4 != piVar8);\n      }\n      free(local_ac);\n    }" (if "if") (parenthesized_expression "(local_ac != (int *)0x0)" (( "(") (binary_expression "local_ac != (int *)0x0" (identifier "local_ac") (!= "!=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      iVar4 = 0;\nLAB_000b4ff9:\n      sVar6 = strlen(pcVar3);\n      __dest = (char *)malloc(sVar6 + sVar2 + 3);\n      local_ac[iVar4] = (int)__dest;\n      if (__dest != (char *)0x0) goto code_r0x000b5022;\n      piVar8 = local_ac;\n      if (iVar4 != 0) {\n        do {\n          pvVar5 = (void *)*piVar8;\n          piVar8 = piVar8 + 1;\n          free(pvVar5);\n        } while (local_ac + iVar4 != piVar8);\n      }\n      free(local_ac);\n    }" ({ "{") (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" (identifier "iVar4") (= "=") (number_literal "0")) (; ";")) (labeled_statement "LAB_000b4ff9:\n      sVar6 = strlen(pcVar3);" (statement_identifier "LAB_000b4ff9") (: ":") (expression_statement "sVar6 = strlen(pcVar3);" (assignment_expression "sVar6 = strlen(pcVar3)" (identifier "sVar6") (= "=") (call_expression "strlen(pcVar3)" (identifier "strlen") (argument_list "(pcVar3)" (( "(") (identifier "pcVar3") () ")")))) (; ";"))) (expression_statement "__dest = (char *)malloc(sVar6 + sVar2 + 3);" (assignment_expression "__dest = (char *)malloc(sVar6 + sVar2 + 3)" (identifier "__dest") (= "=") (cast_expression "(char *)malloc(sVar6 + sVar2 + 3)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "malloc(sVar6 + sVar2 + 3)" (identifier "malloc") (argument_list "(sVar6 + sVar2 + 3)" (( "(") (binary_expression "sVar6 + sVar2 + 3" (binary_expression "sVar6 + sVar2" (identifier "sVar6") (+ "+") (identifier "sVar2")) (+ "+") (number_literal "3")) () ")"))))) (; ";")) (expression_statement "local_ac[iVar4] = (int)__dest;" (assignment_expression "local_ac[iVar4] = (int)__dest" (subscript_expression "local_ac[iVar4]" (identifier "local_ac") ([ "[") (identifier "iVar4") (] "]")) (= "=") (cast_expression "(int)__dest" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "__dest"))) (; ";")) (if_statement "if (__dest != (char *)0x0) goto code_r0x000b5022;" (if "if") (parenthesized_expression "(__dest != (char *)0x0)" (( "(") (binary_expression "__dest != (char *)0x0" (identifier "__dest") (!= "!=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (goto_statement "goto code_r0x000b5022;" (goto "goto") (statement_identifier "code_r0x000b5022") (; ";"))) (expression_statement "piVar8 = local_ac;" (assignment_expression "piVar8 = local_ac" (identifier "piVar8") (= "=") (identifier "local_ac")) (; ";")) (if_statement "if (iVar4 != 0) {\n        do {\n          pvVar5 = (void *)*piVar8;\n          piVar8 = piVar8 + 1;\n          free(pvVar5);\n        } while (local_ac + iVar4 != piVar8);\n      }" (if "if") (parenthesized_expression "(iVar4 != 0)" (( "(") (binary_expression "iVar4 != 0" (identifier "iVar4") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        do {\n          pvVar5 = (void *)*piVar8;\n          piVar8 = piVar8 + 1;\n          free(pvVar5);\n        } while (local_ac + iVar4 != piVar8);\n      }" ({ "{") (do_statement "do {\n          pvVar5 = (void *)*piVar8;\n          piVar8 = piVar8 + 1;\n          free(pvVar5);\n        } while (local_ac + iVar4 != piVar8);" (do "do") (compound_statement "{\n          pvVar5 = (void *)*piVar8;\n          piVar8 = piVar8 + 1;\n          free(pvVar5);\n        }" ({ "{") (expression_statement "pvVar5 = (void *)*piVar8;" (assignment_expression "pvVar5 = (void *)*piVar8" (identifier "pvVar5") (= "=") (cast_expression "(void *)*piVar8" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*piVar8" (* "*") (identifier "piVar8")))) (; ";")) (expression_statement "piVar8 = piVar8 + 1;" (assignment_expression "piVar8 = piVar8 + 1" (identifier "piVar8") (= "=") (binary_expression "piVar8 + 1" (identifier "piVar8") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "free(pvVar5);" (call_expression "free(pvVar5)" (identifier "free") (argument_list "(pvVar5)" (( "(") (identifier "pvVar5") () ")"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(local_ac + iVar4 != piVar8)" (( "(") (binary_expression "local_ac + iVar4 != piVar8" (binary_expression "local_ac + iVar4" (identifier "local_ac") (+ "+") (identifier "iVar4")) (!= "!=") (identifier "piVar8")) () ")")) (; ";")) (} "}"))) (expression_statement "free(local_ac);" (call_expression "free(local_ac)" (identifier "free") (argument_list "(local_ac)" (( "(") (identifier "local_ac") () ")"))) (; ";")) (} "}"))) (} "}")))) (labeled_statement "LAB_000b50cf:\n  local_ac = (int *)0x0;" (statement_identifier "LAB_000b50cf") (: ":") (expression_statement "local_ac = (int *)0x0;" (assignment_expression "local_ac = (int *)0x0" (identifier "local_ac") (= "=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";"))) (goto_statement "goto LAB_000b4f3f;" (goto "goto") (statement_identifier "LAB_000b4f3f") (; ";")) (labeled_statement "code_r0x000b5022:\n  strcpy(__dest,param_1);" (statement_identifier "code_r0x000b5022") (: ":") (expression_statement "strcpy(__dest,param_1);" (call_expression "strcpy(__dest,param_1)" (identifier "strcpy") (argument_list "(__dest,param_1)" (( "(") (identifier "__dest") (, ",") (identifier "param_1") () ")"))) (; ";"))) (if_statement "if (cVar1 != '/') {\n    __dest[sVar2] = '/';\n  }" (if "if") (parenthesized_expression "(cVar1 != '/')" (( "(") (binary_expression "cVar1 != '/'" (identifier "cVar1") (!= "!=") (char_literal "'/'" (' "'") (character "/") (' "'"))) () ")")) (compound_statement "{\n    __dest[sVar2] = '/';\n  }" ({ "{") (expression_statement "__dest[sVar2] = '/';" (assignment_expression "__dest[sVar2] = '/'" (subscript_expression "__dest[sVar2]" (identifier "__dest") ([ "[") (identifier "sVar2") (] "]")) (= "=") (char_literal "'/'" (' "'") (character "/") (' "'"))) (; ";")) (} "}"))) (expression_statement "strcpy(__dest + (cVar1 != '/') + sVar2,pcVar3);" (call_expression "strcpy(__dest + (cVar1 != '/') + sVar2,pcVar3)" (identifier "strcpy") (argument_list "(__dest + (cVar1 != '/') + sVar2,pcVar3)" (( "(") (binary_expression "__dest + (cVar1 != '/') + sVar2" (binary_expression "__dest + (cVar1 != '/')" (identifier "__dest") (+ "+") (parenthesized_expression "(cVar1 != '/')" (( "(") (binary_expression "cVar1 != '/'" (identifier "cVar1") (!= "!=") (char_literal "'/'" (' "'") (character "/") (' "'"))) () ")"))) (+ "+") (identifier "sVar2")) (, ",") (identifier "pcVar3") () ")"))) (; ";")) (if_statement "if ((((param_3 & 1) != 0) && (iVar7 = __xstat64(3,__dest,&local_80), iVar7 == 0)) &&\n     ((local_80.st_mode & 0xf000) == 0x4000)) {\n    pcVar3 = (char *)local_ac[iVar4];\n    sVar6 = strlen(pcVar3);\n    pcVar3[sVar6] = '/';\n    *(undefined1 *)(local_ac[iVar4] + 1 + sVar6) = 0;\n  }" (if "if") (parenthesized_expression "((((param_3 & 1) != 0) && (iVar7 = __xstat64(3,__dest,&local_80), iVar7 == 0)) &&\n     ((local_80.st_mode & 0xf000) == 0x4000))" (( "(") (binary_expression "(((param_3 & 1) != 0) && (iVar7 = __xstat64(3,__dest,&local_80), iVar7 == 0)) &&\n     ((local_80.st_mode & 0xf000) == 0x4000)" (parenthesized_expression "(((param_3 & 1) != 0) && (iVar7 = __xstat64(3,__dest,&local_80), iVar7 == 0))" (( "(") (binary_expression "((param_3 & 1) != 0) && (iVar7 = __xstat64(3,__dest,&local_80), iVar7 == 0)" (parenthesized_expression "((param_3 & 1) != 0)" (( "(") (binary_expression "(param_3 & 1) != 0" (parenthesized_expression "(param_3 & 1)" (( "(") (binary_expression "param_3 & 1" (identifier "param_3") (& "&") (number_literal "1")) () ")")) (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(iVar7 = __xstat64(3,__dest,&local_80), iVar7 == 0)" (( "(") (comma_expression "iVar7 = __xstat64(3,__dest,&local_80), iVar7 == 0" (assignment_expression "iVar7 = __xstat64(3,__dest,&local_80)" (identifier "iVar7") (= "=") (call_expression "__xstat64(3,__dest,&local_80)" (identifier "__xstat64") (argument_list "(3,__dest,&local_80)" (( "(") (number_literal "3") (, ",") (identifier "__dest") (, ",") (pointer_expression "&local_80" (& "&") (identifier "local_80")) () ")")))) (, ",") (binary_expression "iVar7 == 0" (identifier "iVar7") (== "==") (number_literal "0"))) () ")"))) () ")")) (&& "&&") (parenthesized_expression "((local_80.st_mode & 0xf000) == 0x4000)" (( "(") (binary_expression "(local_80.st_mode & 0xf000) == 0x4000" (parenthesized_expression "(local_80.st_mode & 0xf000)" (( "(") (binary_expression "local_80.st_mode & 0xf000" (field_expression "local_80.st_mode" (identifier "local_80") (. ".") (field_identifier "st_mode")) (& "&") (number_literal "0xf000")) () ")")) (== "==") (number_literal "0x4000")) () ")"))) () ")")) (compound_statement "{\n    pcVar3 = (char *)local_ac[iVar4];\n    sVar6 = strlen(pcVar3);\n    pcVar3[sVar6] = '/';\n    *(undefined1 *)(local_ac[iVar4] + 1 + sVar6) = 0;\n  }" ({ "{") (expression_statement "pcVar3 = (char *)local_ac[iVar4];" (assignment_expression "pcVar3 = (char *)local_ac[iVar4]" (identifier "pcVar3") (= "=") (cast_expression "(char *)local_ac[iVar4]" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "local_ac[iVar4]" (identifier "local_ac") ([ "[") (identifier "iVar4") (] "]")))) (; ";")) (expression_statement "sVar6 = strlen(pcVar3);" (assignment_expression "sVar6 = strlen(pcVar3)" (identifier "sVar6") (= "=") (call_expression "strlen(pcVar3)" (identifier "strlen") (argument_list "(pcVar3)" (( "(") (identifier "pcVar3") () ")")))) (; ";")) (expression_statement "pcVar3[sVar6] = '/';" (assignment_expression "pcVar3[sVar6] = '/'" (subscript_expression "pcVar3[sVar6]" (identifier "pcVar3") ([ "[") (identifier "sVar6") (] "]")) (= "=") (char_literal "'/'" (' "'") (character "/") (' "'"))) (; ";")) (expression_statement "*(undefined1 *)(local_ac[iVar4] + 1 + sVar6) = 0;" (assignment_expression "*(undefined1 *)(local_ac[iVar4] + 1 + sVar6) = 0" (pointer_expression "*(undefined1 *)(local_ac[iVar4] + 1 + sVar6)" (* "*") (cast_expression "(undefined1 *)(local_ac[iVar4] + 1 + sVar6)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(local_ac[iVar4] + 1 + sVar6)" (( "(") (binary_expression "local_ac[iVar4] + 1 + sVar6" (binary_expression "local_ac[iVar4] + 1" (subscript_expression "local_ac[iVar4]" (identifier "local_ac") ([ "[") (identifier "iVar4") (] "]")) (+ "+") (number_literal "1")) (+ "+") (identifier "sVar6")) () ")")))) (= "=") (number_literal "0")) (; ";")) (} "}"))) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" (identifier "iVar4") (= "=") (binary_expression "iVar4 + 1" (identifier "iVar4") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "pcVar3 = (char *)param_2[iVar4];" (assignment_expression "pcVar3 = (char *)param_2[iVar4]" (identifier "pcVar3") (= "=") (cast_expression "(char *)param_2[iVar4]" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_2[iVar4]" (identifier "param_2") ([ "[") (identifier "iVar4") (] "]")))) (; ";")) (if_statement "if (pcVar3 == (char *)0x0) goto LAB_000b5100;" (if "if") (parenthesized_expression "(pcVar3 == (char *)0x0)" (( "(") (binary_expression "pcVar3 == (char *)0x0" (identifier "pcVar3") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (goto_statement "goto LAB_000b5100;" (goto "goto") (statement_identifier "LAB_000b5100") (; ";"))) (goto_statement "goto LAB_000b4ff9;" (goto "goto") (statement_identifier "LAB_000b4ff9") (; ";")) (labeled_statement "LAB_000b5100:\n  pvVar5 = (void *)*param_2;" (statement_identifier "LAB_000b5100") (: ":") (expression_statement "pvVar5 = (void *)*param_2;" (assignment_expression "pvVar5 = (void *)*param_2" (identifier "pvVar5") (= "=") (cast_expression "(void *)*param_2" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_2" (* "*") (identifier "param_2")))) (; ";"))) (expression_statement "local_ac[iVar4] = 0;" (assignment_expression "local_ac[iVar4] = 0" (subscript_expression "local_ac[iVar4]" (identifier "local_ac") ([ "[") (identifier "iVar4") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "piVar8 = param_2;" (assignment_expression "piVar8 = param_2" (identifier "piVar8") (= "=") (identifier "param_2")) (; ";")) (while_statement "while (pvVar5 != (void *)0x0) {\n    piVar8 = piVar8 + 1;\n    free(pvVar5);\n    pvVar5 = (void *)*piVar8;\n  }" (while "while") (parenthesized_expression "(pvVar5 != (void *)0x0)" (( "(") (binary_expression "pvVar5 != (void *)0x0" (identifier "pvVar5") (!= "!=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    piVar8 = piVar8 + 1;\n    free(pvVar5);\n    pvVar5 = (void *)*piVar8;\n  }" ({ "{") (expression_statement "piVar8 = piVar8 + 1;" (assignment_expression "piVar8 = piVar8 + 1" (identifier "piVar8") (= "=") (binary_expression "piVar8 + 1" (identifier "piVar8") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "free(pvVar5);" (call_expression "free(pvVar5)" (identifier "free") (argument_list "(pvVar5)" (( "(") (identifier "pvVar5") () ")"))) (; ";")) (expression_statement "pvVar5 = (void *)*piVar8;" (assignment_expression "pvVar5 = (void *)*piVar8" (identifier "pvVar5") (= "=") (cast_expression "(void *)*piVar8" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*piVar8" (* "*") (identifier "piVar8")))) (; ";")) (} "}"))) (labeled_statement "LAB_000b5136:\n  free(param_2);" (statement_identifier "LAB_000b5136") (: ":") (expression_statement "free(param_2);" (call_expression "free(param_2)" (identifier "free") (argument_list "(param_2)" (( "(") (identifier "param_2") () ")"))) (; ";"))) (labeled_statement "LAB_000b4f3f:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_ac;\n  }" (statement_identifier "LAB_000b4f3f") (: ":") (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_ac;\n  }" (if "if") (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return local_ac;\n  }" ({ "{") (return_statement "return local_ac;" (return "return") (identifier "local_ac") (; ";")) (} "}")))) (expression_statement "FUN_000ecc40();" (call_expression "FUN_000ecc40()" (identifier "FUN_000ecc40") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

char ** __regparm3 function_1(char *dir,char **array,int var_4)

{
  char var_17;
  int var_18;
  size_t var_3;
  int var_7;
  char *var_5;
  size_t var_13;
  char *var_14;
  int var_12;
  char **var_8;
  int var_1;
  char **var_11;
  type_1 sb;
  
  var_18 = *(int *)(var_1 + 0x14);
  var_3 = var_2(dir);
  if (var_3 == 0) {
    var_11 = array;
    if (((var_4 & 1U) != 0) && (var_5 = *array, var_5 != (char *)0x0)) {
      var_8 = array;
      do {
        while ((var_7 = var_6(3,var_5,(type_2 *)&sb), var_7 != 0 ||
               ((sb.st_mode & 0xf000) != 0x4000))) {
          var_8 = var_8 + 1;
          var_5 = *var_8;
          if (var_5 == (char *)0x0) goto LAB_000b4f3f;
        }
        var_5 = *var_8;
        var_3 = var_2(var_5);
        var_5 = (char *)var_9(var_5,var_3 + 2);
        if (var_5 == (char *)0x0) goto LAB_000b50cf;
        var_5[var_3] = '/';
        var_5[var_3 + 1] = '\0';
        *var_8 = var_5;
        var_5 = var_8[1];
        var_8 = var_8 + 1;
      } while (var_5 != (char *)0x0);
    }
    goto LAB_000b4f3f;
  }
  var_17 = dir[var_3 - 1];
  var_5 = *array;
  if (var_5 == (char *)0x0) {
    var_11 = (char **)var_10(4);
    if (var_11 != (char **)0x0) {
      *var_11 = (char *)0x0;
      goto LAB_000b5136;
    }
  }
  else {
    var_7 = 0;
    do {
      var_12 = var_7;
      var_7 = var_12 + 1;
    } while (array[var_7] != (char *)0x0);
    var_11 = (char **)var_10(var_12 * 4 + 8);
    if (var_11 != (char **)0x0) {
      var_7 = 0;
LAB_000b4ff9:
      var_13 = var_2(var_5);
      var_14 = (char *)var_10(var_13 + var_3 + 3);
      var_11[var_7] = var_14;
      if (var_14 != (char *)0x0) goto code_r0x000b5022;
      var_8 = var_11;
      if (var_7 != 0) {
        do {
          var_5 = *var_8;
          var_8 = var_8 + 1;
          var_15(var_5);
        } while (var_11 + var_7 != var_8);
      }
      var_15(var_11);
    }
  }
LAB_000b50cf:
  var_11 = (char **)0x0;
  goto LAB_000b4f3f;
code_r0x000b5022:
  var_16(var_14,dir);
  if (var_17 != '/') {
    var_14[var_3] = '/';
  }
  var_16(var_14 + (var_17 != '/') + var_3,var_5);
  if ((((var_4 & 1U) != 0) && (var_12 = var_6(3,var_14,(type_2 *)&sb), var_12 == 0)) &&
     ((sb.st_mode & 0xf000) == 0x4000)) {
    var_5 = var_11[var_7];
    var_13 = var_2(var_5);
    var_5[var_13] = '/';
    var_11[var_7][var_13 + 1] = '\0';
  }
  var_7 = var_7 + 1;
  var_5 = array[var_7];
  if (var_5 == (char *)0x0) goto LAB_000b5100;
  goto LAB_000b4ff9;
LAB_000b5100:
  var_5 = *array;
  var_11[var_7] = (char *)0x0;
  var_8 = array;
  while (var_5 != (char *)0x0) {
    var_8 = var_8 + 1;
    var_15(var_5);
    var_5 = *var_8;
  }
LAB_000b5136:
  var_15(array);
LAB_000b4f3f:
  if (var_18 == *(int *)(var_1 + 0x14)) {
    return var_11;
  }
                    /* WARNING: Subroutine does not return */
  var_19();
}


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

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

int * __regparm3 MASKED(char *param_1,int *param_2,uint param_3)

{
  char cVar1;
  size_t sVar2;
  char *pcVar3;
  int iVar4;
  void *pvVar5;
  size_t sVar6;
  char *__dest;
  int iVar7;
  int *piVar8;
  int in_GS_OFFSET;
  int *local_ac;
  stat64 local_80;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0xb4e6b;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  sVar2 = strlen(param_1);
  if (sVar2 == 0) {
    local_ac = param_2;
    if (((param_3 & 1) != 0) && (pcVar3 = (char *)*param_2, pcVar3 != (char *)0x0)) {
      do {
        while ((iVar4 = __xstat64(3,pcVar3,&local_80), iVar4 != 0 ||
               ((local_80.st_mode & 0xf000) != 0x4000))) {
          param_2 = param_2 + 1;
          pcVar3 = (char *)*param_2;
          if (pcVar3 == (char *)0x0) goto LAB_000b4f3f;
        }
        pcVar3 = (char *)*param_2;
        sVar2 = strlen(pcVar3);
        pvVar5 = realloc(pcVar3,sVar2 + 2);
        if (pvVar5 == (void *)0x0) goto LAB_000b50cf;
        *(undefined1 *)((int)pvVar5 + sVar2) = 0x2f;
        *(undefined1 *)((int)pvVar5 + sVar2 + 1) = 0;
        *param_2 = (int)pvVar5;
        pcVar3 = (char *)param_2[1];
        param_2 = param_2 + 1;
      } while (pcVar3 != (char *)0x0);
    }
    goto LAB_000b4f3f;
  }
  cVar1 = param_1[sVar2 - 1];
  pcVar3 = (char *)*param_2;
  if (pcVar3 == (char *)0x0) {
    local_ac = (int *)malloc(4);
    if (local_ac != (int *)0x0) {
      *local_ac = 0;
      goto LAB_000b5136;
    }
  }
  else {
    iVar4 = 0;
    do {
      iVar7 = iVar4;
      iVar4 = iVar7 + 1;
    } while (param_2[iVar4] != 0);
    local_ac = (int *)malloc(iVar7 * 4 + 8);
    if (local_ac != (int *)0x0) {
      iVar4 = 0;
LAB_000b4ff9:
      sVar6 = strlen(pcVar3);
      __dest = (char *)malloc(sVar6 + sVar2 + 3);
      local_ac[iVar4] = (int)__dest;
      if (__dest != (char *)0x0) goto code_r0x000b5022;
      piVar8 = local_ac;
      if (iVar4 != 0) {
        do {
          pvVar5 = (void *)*piVar8;
          piVar8 = piVar8 + 1;
          free(pvVar5);
        } while (local_ac + iVar4 != piVar8);
      }
      free(local_ac);
    }
  }
LAB_000b50cf:
  local_ac = (int *)0x0;
  goto LAB_000b4f3f;
code_r0x000b5022:
  strcpy(__dest,param_1);
  if (cVar1 != '/') {
    __dest[sVar2] = '/';
  }
  strcpy(__dest + (cVar1 != '/') + sVar2,pcVar3);
  if ((((param_3 & 1) != 0) && (iVar7 = __xstat64(3,__dest,&local_80), iVar7 == 0)) &&
     ((local_80.st_mode & 0xf000) == 0x4000)) {
    pcVar3 = (char *)local_ac[iVar4];
    sVar6 = strlen(pcVar3);
    pcVar3[sVar6] = '/';
    *(undefined1 *)(local_ac[iVar4] + 1 + sVar6) = 0;
  }
  iVar4 = iVar4 + 1;
  pcVar3 = (char *)param_2[iVar4];
  if (pcVar3 == (char *)0x0) goto LAB_000b5100;
  goto LAB_000b4ff9;
LAB_000b5100:
  pvVar5 = (void *)*param_2;
  local_ac[iVar4] = 0;
  piVar8 = param_2;
  while (pvVar5 != (void *)0x0) {
    piVar8 = piVar8 + 1;
    free(pvVar5);
    pvVar5 = (void *)*piVar8;
  }
LAB_000b5136:
  free(param_2);
LAB_000b4f3f:
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return local_ac;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000ecc40();
}

