undefined4 client6_script(char *param_1,undefined4 param_2,int param_3)

{
  bool bVar1;
  int *piVar2;
  int *piVar3;
  char *pcVar4;
  char *pcVar5;
  char *__s;
  __pid_t _Var6;
  __pid_t _Var7;
  uint uVar8;
  int iVar9;
  uint uVar10;
  int iVar11;
  uint uVar12;
  int iVar13;
  uint uVar14;
  int iVar15;
  int iVar16;
  uint uVar17;
  int iVar18;
  uint uVar19;
  int iVar20;
  size_t sVar21;
  char **ppcVar22;
  undefined4 uVar23;
  int iVar24;
  size_t __size;
  int iVar25;
  int iVar26;
  int iVar27;
  int iVar28;
  char acStack_f0 [4];
  undefined1 auStack_ec [4];
  char *local_e8;
  undefined4 local_e4;
  char acStack_e0 [12];
  char local_d4 [12];
  char acStack_c8 [48];
  char acStack_98 [48];
  int local_68;
  int local_64;
  int local_60;
  int local_5c;
  int local_58;
  int local_54;
  int local_50;
  int local_4c;
  int local_48;
  int local_44;
  int local_40;
  int local_3c;
  char **local_38;
  char *local_34;
  char *local_30;
  
  builtin_strncpy(local_d4,"REASON=NBI",0xb)   //possible issue identified - semgrep
  if (param_1 == (char *)0x0) {
    return 0xffffffff;
  }
  if (*param_1 == '\0') {
    return 0xffffffff;
  }
  piVar2 = *(int **)(param_3 + 0x68);
  if (piVar2 == (int *)0x0) {
    iVar24 = 0;
    iVar18 = 0;
  }
  else {
    iVar24 = 0;
    do {
      piVar2 = (int *)*piVar2;
      iVar24 = iVar24 + 1;
    } while (piVar2 != (int *)0x0);
    iVar18 = 1;
  }
  piVar2 = *(int **)(param_3 + 0x70);
  if (piVar2 == (int *)0x0) {
    iVar28 = 0;
    uVar17 = 0;
  }
  else {
    iVar28 = 0;
    do {
      piVar3 = piVar2 + 3;
      piVar2 = (int *)*piVar2;
      iVar28 = iVar28 + *piVar3;
    } while (piVar2 != (int *)0x0);
    uVar17 = (uint)(iVar28 != 0);
  }
  piVar2 = *(int **)(param_3 + 0x78);
  if (piVar2 == (int *)0x0) {
    iVar25 = 0;
    iVar16 = 0;
  }
  else {
    iVar25 = 0;
    do {
      piVar2 = (int *)*piVar2;
      iVar25 = iVar25 + 1;
    } while (piVar2 != (int *)0x0);
    iVar16 = 1;
  }
  piVar2 = *(int **)(param_3 + 0x48);
  if (piVar2 == (int *)0x0) {
    iVar26 = 0;
    iVar20 = 0;
  }
  else {
    iVar26 = 0;
    do {
      piVar2 = (int *)*piVar2;
      iVar26 = iVar26 + 1;
    } while (piVar2 != (int *)0x0);
    iVar20 = 1;
  }
  piVar2 = *(int **)(param_3 + 0x50);
  if (piVar2 == (int *)0x0) {
    local_40 = 0;
    uVar19 = 0;
  }
  else {
    local_40 = 0;
    do {
      piVar3 = piVar2 + 3;
      piVar2 = (int *)*piVar2;
      local_40 = local_40 + *piVar3;
    } while (piVar2 != (int *)0x0);
    uVar19 = (uint)(local_40 != 0);
  }
  piVar2 = *(int **)(param_3 + 0x88);
  if (piVar2 == (int *)0x0) {
    iVar27 = 0;
    iVar13 = 0;
  }
  else {
    iVar27 = 0;
    do {
      piVar2 = (int *)*piVar2;
      iVar27 = iVar27 + 1;
    } while (piVar2 != (int *)0x0);
    iVar13 = 1;
  }
  piVar2 = *(int **)(param_3 + 0x90);
  if (piVar2 == (int *)0x0) {
    local_44 = 0;
    uVar14 = 0;
  }
  else {
    local_44 = 0;
    do {
      piVar3 = piVar2 + 3;
      piVar2 = (int *)*piVar2;
      local_44 = local_44 + *piVar3;
    } while (piVar2 != (int *)0x0);
    uVar14 = (uint)(local_44 != 0);
  }
  piVar2 = *(int **)(param_3 + 0x98);
  if (piVar2 == (int *)0x0) {
    local_48 = 0;
    iVar15 = 0;
  }
  else {
    local_48 = 0;
    do {
      piVar2 = (int *)*piVar2;
      local_48 = local_48 + 1;
    } while (piVar2 != (int *)0x0);
    iVar15 = 1;
  }
  piVar2 = *(int **)(param_3 + 0xa0);
  if (piVar2 == (int *)0x0) {
    local_4c = 0;
    uVar12 = 0;
  }
  else {
    local_4c = 0;
    do {
      piVar3 = piVar2 + 3;
      piVar2 = (int *)*piVar2;
      local_4c = local_4c + *piVar3;
    } while (piVar2 != (int *)0x0);
    uVar12 = (uint)(local_4c != 0);
  }
  piVar2 = *(int **)(param_3 + 0xa8);
  if (piVar2 == (int *)0x0) {
    local_50 = 0;
    iVar11 = 0;
  }
  else {
    local_50 = 0;
    do {
      piVar2 = (int *)*piVar2;
      local_50 = local_50 + 1;
    } while (piVar2 != (int *)0x0);
    iVar11 = 1;
  }
  piVar2 = *(int **)(param_3 + 0xb0);
  if (piVar2 == (int *)0x0) {
    local_54 = 0;
    uVar10 = 0;
  }
  else {
    local_54 = 0;
    do {
      piVar3 = piVar2 + 3;
      piVar2 = (int *)*piVar2;
      local_54 = local_54 + *piVar3;
    } while (piVar2 != (int *)0x0);
    uVar10 = (uint)(local_54 != 0);
  }
  iVar9 = 0;
  for (piVar2 = *(int **)(param_3 + 0x58); piVar2 != (int *)0x0; piVar2 = (int *)*piVar2) {
    iVar9 = 1;
  }
  piVar2 = *(int **)(param_3 + 0x60);
  if (piVar2 == (int *)0x0) {
    local_58 = 0;
    uVar8 = 0;
  }
  else {
    local_58 = 0;
    do {
      piVar3 = piVar2 + 3;
      piVar2 = (int *)*piVar2;
      local_58 = local_58 + *piVar3;
    } while (piVar2 != (int *)0x0);
    uVar8 = (uint)(local_58 != 0);
  }
  piVar2 = *(int **)(param_3 + 0x30);
  iVar18 = iVar18 + 2 + uVar17 + iVar16 + iVar20 + uVar19 + iVar13 + uVar14 + iVar15 + uVar12 +
           iVar11 + uVar10 + iVar9 + uVar8;
  if (piVar2 == (int *)0x0) {
    local_5c = 0;
    iVar16 = 0;
    uVar17 = 0;
  }
  else {
    iVar16 = 0;
    do {
      for (piVar3 = (int *)piVar2[10]; piVar3 != (int *)0x0; piVar3 = (int *)*piVar3) {
        iVar16 = iVar16 + 1;
      }
      piVar2 = (int *)*piVar2;
    } while (piVar2 != (int *)0x0);
    iVar18 = iVar18 + (uint)(iVar16 != 0);
    if (iVar16 == 0) {
      local_5c = 0;
      uVar17 = 0;
    }
    else {
      local_5c = iVar16 * 0x30;
      uVar17 = (uint)(local_5c != 0);
    }
  }
  piVar2 = *(int **)(param_3 + 0x28);
  iVar18 = iVar18 + uVar17;
  if (piVar2 == (int *)0x0) {
    iVar13 = 0;
    local_60 = 0;
    local_64 = 0;
    iVar20 = 0;
  }
  else {
    iVar20 = 0;
    local_64 = 0;
    do {
      for (piVar3 = (int *)piVar2[10]; piVar3 != (int *)0x0; piVar3 = (int *)*piVar3) {
        iVar20 = iVar20 + 1;
        local_64 = local_64 + 1;
      }
      piVar2 = (int *)*piVar2;
    } while (piVar2 != (int *)0x0);
    if (iVar20 == 0) {
      iVar13 = 0;
      local_60 = 0;
      local_64 = 0;
    }
    else {
      local_60 = iVar20 * 0x30;
      local_64 = local_64 * 3;
      iVar18 = iVar18 + 2;
      iVar13 = (uint)(local_60 != 0) << 1;
    }
  }
  local_68 = iVar13 + iVar18 + 2;
  sVar21 = local_68 * 4   //possible issue identified - semgrep
  local_38 = (char **)malloc(sVar21)   //possible issue identified - semgrep
  if (local_38 == (char **)0x0) {
    dprintf(5,"client6_script","failed to allocate environment buffer");
    return 0xffffffff;
  }
  memset(local_38,0,sVar21);
  pcVar4 = strdup(local_d4);
  *local_38 = pcVar4;
  if (pcVar4 == (char *)0x0) {
    pcVar4 = "failed to allocate reason strings";
  }
  else {
    if (iVar24 == 0) {
      local_3c = 1;
    }
    else {
      sVar21 = iVar24 * 0x2f + 0x19   //possible issue identified - semgrep
      pcVar4 = (char *)malloc(sVar21)   //possible issue identified - semgrep
      local_38[1] = pcVar4;
      if (pcVar4 == (char *)0x0) {
        pcVar4 = "failed to allocate strings for DNS servers";
        goto LAB_00419044;
      }
      memset(pcVar4,0,sVar21);
      snprintf(pcVar4,sVar21,"%s=",s_new_domain_name_servers_0043e340)   //possible issue identified - semgrep
      for (piVar2 = *(int **)(param_3 + 0x68); piVar2 != (int *)0x0; piVar2 = (int *)*piVar2) {
        uVar23 = in6addr2str(piVar2 + 3,0);
        strlcat(pcVar4,uVar23,sVar21)   //possible issue identified - semgrep
        strlcat(pcVar4,&DAT_0042a53c,sVar21)   //possible issue identified - semgrep
      }
      local_3c = 2;
    }
    if (iVar25 != 0) {
      sVar21 = iVar25 * 0x2f + 0x11   //possible issue identified - semgrep
      pcVar4 = (char *)malloc(sVar21)   //possible issue identified - semgrep
      ppcVar22 = local_38 + local_3c;
      local_3c = local_3c + 1;
      *ppcVar22 = pcVar4;
      if (pcVar4 == (char *)0x0) {
        pcVar4 = "failed to allocate strings for NTP servers";
        goto LAB_00419044;
      }
      memset(pcVar4,0,sVar21);
      snprintf(pcVar4,sVar21,"%s=",s_new_ntp_servers_0043e358)   //possible issue identified - semgrep
      for (piVar2 = *(int **)(param_3 + 0x78); piVar2 != (int *)0x0; piVar2 = (int *)*piVar2) {
        uVar23 = in6addr2str(piVar2 + 3,0);
        strlcat(pcVar4,uVar23,sVar21)   //possible issue identified - semgrep
        strlcat(pcVar4,&DAT_0042a53c,sVar21)   //possible issue identified - semgrep
      }
    }
    if (iVar28 != 0) {
      sVar21 = iVar28 + 0x11   //possible issue identified - semgrep
      pcVar4 = (char *)malloc(sVar21)   //possible issue identified - semgrep
      ppcVar22 = local_38 + local_3c;
      local_3c = local_3c + 1;
      *ppcVar22 = pcVar4;
      if (pcVar4 == (char *)0x0) {
        pcVar4 = "failed to allocate strings for DNS name";
        goto LAB_00419044;
      }
      memset(pcVar4,0,sVar21);
      snprintf(pcVar4,sVar21,"%s=",s_new_domain_name_0043e368)   //possible issue identified - semgrep
      for (piVar2 = *(int **)(param_3 + 0x70); piVar2 != (int *)0x0; piVar2 = (int *)*piVar2) {
        strlcat(pcVar4,piVar2[4],sVar21)   //possible issue identified - semgrep
        strlcat(pcVar4,&DAT_0042a53c,sVar21)   //possible issue identified - semgrep
      }
    }
    if (iVar26 != 0) {
      sVar21 = iVar26 * 0x2f + 0x11   //possible issue identified - semgrep
      pcVar4 = (char *)malloc(sVar21)   //possible issue identified - semgrep
      ppcVar22 = local_38 + local_3c;
      local_3c = local_3c + 1;
      *ppcVar22 = pcVar4;
      if (pcVar4 == (char *)0x0) {
        pcVar4 = "failed to allocate strings for SIP servers";
        goto LAB_00419044;
      }
      memset(pcVar4,0,sVar21);
      snprintf(pcVar4,sVar21,"%s=",s_new_sip_servers_0043e378)   //possible issue identified - semgrep
      for (piVar2 = *(int **)(param_3 + 0x48); piVar2 != (int *)0x0; piVar2 = (int *)*piVar2) {
        uVar23 = in6addr2str(piVar2 + 3,0);
        strlcat(pcVar4,uVar23,sVar21)   //possible issue identified - semgrep
        strlcat(pcVar4,&DAT_0042a53c,sVar21)   //possible issue identified - semgrep
      }
    }
    if (local_40 != 0) {
      sVar21 = local_40 + 0xe   //possible issue identified - semgrep
      pcVar4 = (char *)malloc(sVar21)   //possible issue identified - semgrep
      ppcVar22 = local_38 + local_3c;
      local_3c = local_3c + 1;
      *ppcVar22 = pcVar4;
      if (pcVar4 == (char *)0x0) {
        pcVar4 = "failed to allocate strings for SIP domain name";
        goto LAB_00419044;
      }
      memset(pcVar4,0,sVar21);
      snprintf(pcVar4,sVar21,"%s=",s_new_sip_name_0043e388)   //possible issue identified - semgrep
      for (piVar2 = *(int **)(param_3 + 0x50); piVar2 != (int *)0x0; piVar2 = (int *)*piVar2) {
        strlcat(pcVar4,piVar2[4],sVar21)   //possible issue identified - semgrep
        strlcat(pcVar4,&DAT_0042a53c,sVar21)   //possible issue identified - semgrep
      }
    }
    if (iVar27 != 0) {
      sVar21 = iVar27 * 0x2f + 0x11   //possible issue identified - semgrep
      pcVar4 = (char *)malloc(sVar21)   //possible issue identified - semgrep
      ppcVar22 = local_38 + local_3c;
      local_3c = local_3c + 1;
      *ppcVar22 = pcVar4;
      if (pcVar4 == (char *)0x0) {
        pcVar4 = "failed to allocate strings for NIS servers";
        goto LAB_00419044;
      }
      memset(pcVar4,0,sVar21);
      snprintf(pcVar4,sVar21,"%s=",s_new_nis_servers_0043e398)   //possible issue identified - semgrep
      for (piVar2 = *(int **)(param_3 + 0x88); piVar2 != (int *)0x0; piVar2 = (int *)*piVar2) {
        uVar23 = in6addr2str(piVar2 + 3,0);
        strlcat(pcVar4,uVar23,sVar21)   //possible issue identified - semgrep
        strlcat(pcVar4,&DAT_0042a53c,sVar21)   //possible issue identified - semgrep
      }
    }
    if (local_44 != 0) {
      sVar21 = local_44 + 0xe   //possible issue identified - semgrep
      pcVar4 = (char *)malloc(sVar21)   //possible issue identified - semgrep
      ppcVar22 = local_38 + local_3c;
      local_3c = local_3c + 1;
      *ppcVar22 = pcVar4;
      if (pcVar4 == (char *)0x0) {
        pcVar4 = "failed to allocate strings for NIS domain name";
        goto LAB_00419044;
      }
      memset(pcVar4,0,sVar21);
      snprintf(pcVar4,sVar21,"%s=",s_new_nis_name_0043e3a8)   //possible issue identified - semgrep
      for (piVar2 = *(int **)(param_3 + 0x90); piVar2 != (int *)0x0; piVar2 = (int *)*piVar2) {
        strlcat(pcVar4,piVar2[4],sVar21)   //possible issue identified - semgrep
        strlcat(pcVar4,&DAT_0042a53c,sVar21)   //possible issue identified - semgrep
      }
    }
    if (local_48 != 0) {
      sVar21 = local_48 * 0x2f + 0x12   //possible issue identified - semgrep
      pcVar4 = (char *)malloc(sVar21)   //possible issue identified - semgrep
      ppcVar22 = local_38 + local_3c;
      local_3c = local_3c + 1;
      *ppcVar22 = pcVar4;
      if (pcVar4 == (char *)0x0) {
        pcVar4 = "failed to allocate strings for NIS+ servers";
        goto LAB_00419044;
      }
      memset(pcVar4,0,sVar21);
      snprintf(pcVar4,sVar21,"%s=",s_new_nisp_servers_0043e3b8)   //possible issue identified - semgrep
      for (piVar2 = *(int **)(param_3 + 0x98); piVar2 != (int *)0x0; piVar2 = (int *)*piVar2) {
        uVar23 = in6addr2str(piVar2 + 3,0);
        strlcat(pcVar4,uVar23,sVar21)   //possible issue identified - semgrep
        strlcat(pcVar4,&DAT_0042a53c,sVar21)   //possible issue identified - semgrep
      }
    }
    if (local_4c != 0) {
      sVar21 = local_4c + 0xf   //possible issue identified - semgrep
      pcVar4 = (char *)malloc(sVar21)   //possible issue identified - semgrep
      ppcVar22 = local_38 + local_3c;
      local_3c = local_3c + 1;
      *ppcVar22 = pcVar4;
      if (pcVar4 == (char *)0x0) {
        pcVar4 = "failed to allocate strings for NIS+ domain name";
        goto LAB_00419044;
      }
      memset(pcVar4,0,sVar21);
      snprintf(pcVar4,sVar21,"%s=",s_new_nisp_name_0043e3cc)   //possible issue identified - semgrep
      for (piVar2 = *(int **)(param_3 + 0xa0); piVar2 != (int *)0x0; piVar2 = (int *)*piVar2) {
        strlcat(pcVar4,piVar2[4],sVar21)   //possible issue identified - semgrep
        strlcat(pcVar4,&DAT_0042a53c,sVar21)   //possible issue identified - semgrep
      }
    }
    if (local_50 != 0) {
      sVar21 = local_50 * 0x2f + 0x13   //possible issue identified - semgrep
      pcVar4 = (char *)malloc(sVar21)   //possible issue identified - semgrep
      ppcVar22 = local_38 + local_3c;
      local_3c = local_3c + 1;
      *ppcVar22 = pcVar4;
      if (pcVar4 == (char *)0x0) {
        pcVar4 = "failed to allocate strings for BCMC servers";
        goto LAB_00419044;
      }
      memset(pcVar4,0,sVar21);
      snprintf(pcVar4,sVar21,"%s=",s_new_bcmcs_servers_0043e3dc)   //possible issue identified - semgrep
      for (piVar2 = *(int **)(param_3 + 0xa8); piVar2 != (int *)0x0; piVar2 = (int *)*piVar2) {
        uVar23 = in6addr2str(piVar2 + 3,0);
        strlcat(pcVar4,uVar23,sVar21)   //possible issue identified - semgrep
        strlcat(pcVar4,&DAT_0042a53c,sVar21)   //possible issue identified - semgrep
      }
    }
    if (local_54 != 0) {
      sVar21 = local_54 + 0x10   //possible issue identified - semgrep
      pcVar4 = (char *)malloc(sVar21)   //possible issue identified - semgrep
      ppcVar22 = local_38 + local_3c;
      local_3c = local_3c + 1;
      *ppcVar22 = pcVar4;
      if (pcVar4 == (char *)0x0) {
        pcVar4 = "failed to allocate strings for BCMC domain name";
        goto LAB_00419044;
      }
      memset(pcVar4,0,sVar21);
      snprintf(pcVar4,sVar21,"%s=",s_new_bcmcs_name_0043e3f0)   //possible issue identified - semgrep
      for (piVar2 = *(int **)(param_3 + 0xb0); piVar2 != (int *)0x0; piVar2 = (int *)*piVar2) {
        strlcat(pcVar4,piVar2[4],sVar21)   //possible issue identified - semgrep
        strlcat(pcVar4,&DAT_0042a53c,sVar21)   //possible issue identified - semgrep
      }
    }
    if (local_58 != 0) {
      sVar21 = local_58 + 0xf   //possible issue identified - semgrep
      pcVar4 = (char *)malloc(sVar21)   //possible issue identified - semgrep
      local_38[local_3c] = pcVar4;
      if (pcVar4 == (char *)0x0) {
        pcVar4 = "failed to allocate strings for AFTR domain name";
        goto LAB_00419044;
      }
      memset(pcVar4,0,sVar21);
      snprintf(pcVar4,sVar21,"%s=",s_new_aftr_name_0043e400)   //possible issue identified - semgrep
      local_3c = local_3c + 1;
      strlcat(pcVar4,*(undefined4 *)(*(int *)(param_3 + 0x60) + 0x10),sVar21)   //possible issue identified - semgrep
    }
    if (iVar16 != 0) {
      sVar21 = local_5c + 10   //possible issue identified - semgrep
      pcVar4 = (char *)malloc(sVar21)   //possible issue identified - semgrep
      ppcVar22 = local_38 + local_3c;
      local_3c = local_3c + 1;
      *ppcVar22 = pcVar4;
      if (pcVar4 == (char *)0x0) {
        pcVar4 = "failed to allocate strings for address";
        goto LAB_00419044;
      }
      memset(pcVar4,0,sVar21);
      snprintf(pcVar4,sVar21,"%s=",s_new_addr_0043e410)   //possible issue identified - semgrep
      piVar2 = *(int **)(param_3 + 0x30);
      if (piVar2 != (int *)0x0) {
        do {
          for (piVar3 = (int *)piVar2[10]; piVar3 != (int *)0x0; piVar3 = (int *)*piVar3) {
            while (piVar3[2] == 7) {
              uVar23 = in6addr2str(piVar3 + 5,0);
              snprintf(acStack_c8,0x30,"%s",uVar23)   //possible issue identified - semgrep
              strlcat(pcVar4,acStack_c8,sVar21)   //possible issue identified - semgrep
              strlcat(pcVar4,&DAT_0042a53c,sVar21)   //possible issue identified - semgrep
              piVar3 = (int *)*piVar3;
              if (piVar3 == (int *)0x0) goto LAB_00418b4c;
            }
          }
LAB_00418b4c:
          piVar2 = (int *)*piVar2;
        } while (piVar2 != (int *)0x0);
      }
    }
    if (iVar20 == 0) {
LAB_0041828c:
      _Var6 = fork()   //possible issue identified - semgrep
      if (_Var6 < 0) {
        uVar23 = 0xffffffff;
        piVar2 = __errno_location();
        pcVar4 = strerror(*piVar2);
        pcVar5 = "failed to fork: %s";
      }
      else {
        if (_Var6 == 0) {
          local_e4 = 0;
          local_e8 = param_1;
          iVar18 = safefile(param_1);
          if (iVar18 == 0) {
            if ((foreground == 0) && (iVar18 = open("/dev/null",2), iVar18 != -1)) {   //possible issue identified - semgrep
              dup2(iVar18,0);
              dup2(iVar18,1);
              dup2(iVar18,2);
              if (2 < iVar18) {
                close(iVar18);
              }
            }
            execve(param_1,&local_e8,local_38)   //possible issue identified - semgrep
            piVar2 = __errno_location();
            pcVar4 = strerror(*piVar2);
            dprintf(3,"client6_script","child: exec failed: %s",pcVar4);
                    /* WARNING: Subroutine does not return */
            exit(0);
          }
          dprintf(3,"client6_script","script \"%s\" cannot be executed safely",param_1);
                    /* WARNING: Subroutine does not return */
          exit(1);
        }
        do {
          _Var7 = wait(auStack_ec);
          if (_Var6 == _Var7) goto LAB_004182dc;
        } while (0 < _Var7);
        if (_Var7 == 0) {
LAB_004182dc:
          dprintf(7,"client6_script","script \"%s\" terminated",param_1);
          uVar23 = 0;
          goto LAB_00418304;
        }
        uVar23 = 0;
        piVar2 = __errno_location();
        pcVar4 = strerror(*piVar2);
        pcVar5 = "wait: %s";
      }
      dprintf(3,"client6_script",pcVar5,pcVar4);
      goto LAB_00418304;
    }
    sVar21 = local_60 + 0xf   //possible issue identified - semgrep
    pcVar4 = (char *)malloc(sVar21)   //possible issue identified - semgrep
    local_38[local_3c] = pcVar4;
    if (pcVar4 == (char *)0x0) {
      pcVar4 = "failed to allocate strings for pd prefix";
    }
    else {
      __size = local_64 + 0xd   //possible issue identified - semgrep
      iVar18 = local_3c + 1;
      pcVar5 = (char *)malloc(__size)   //possible issue identified - semgrep
      local_38[iVar18] = pcVar5;
      if (pcVar5 == (char *)0x0) {
        pcVar4 = "failed to allocate strings for pd prefix length";
      }
      else {
        iVar18 = local_3c + 2;
        local_34 = (char *)malloc(0x19)   //possible issue identified - semgrep
        local_38[iVar18] = local_34;
        if (local_34 == (char *)0x0) {
          pcVar4 = "failed to allocate strings for pd pltime";
        }
        else {
          __s = (char *)malloc(0x19)   //possible issue identified - semgrep
          local_38[local_3c + 3] = __s;
          if (__s != (char *)0x0) {
            memset(local_34,0,0x19)   //possible issue identified - semgrep
            memset(__s,0,0x19)   //possible issue identified - semgrep
            snprintf(local_34,0x19,"%s=",s_new_pd_pltime_0043e41c)   //possible issue identified - semgrep
            snprintf(__s,0x19,"%s=",s_new_pd_vltime_0043e42c)   //possible issue identified - semgrep
            memset(pcVar4,0,sVar21);
            memset(pcVar5,0,__size);
            snprintf(pcVar4,sVar21,"%s=",s_new_pd_prefix_0043e43c)   //possible issue identified - semgrep
            snprintf(pcVar5,__size,"%s=",s_new_pd_plen_0043e44c)   //possible issue identified - semgrep
            piVar2 = *(int **)(param_3 + 0x28);
            if (piVar2 != (int *)0x0) {
              local_30 = acStack_f0;
              do {
                for (piVar3 = (int *)piVar2[10]; piVar3 != (int *)0x0; piVar3 = (int *)*piVar3) {
                  while ((piVar3[2] == 5 && (piVar3[4] != 0))) {
                    uVar23 = in6addr2str(piVar3 + 5,0);
                    snprintf(acStack_98,0x30,"%s",uVar23)   //possible issue identified - semgrep
                    strlcat(pcVar4,acStack_98,sVar21)   //possible issue identified - semgrep
                    strlcat(pcVar4,&DAT_0042a53c,sVar21)   //possible issue identified - semgrep
                    snprintf(local_30,3,"%d",piVar3[9])   //possible issue identified - semgrep
                    strlcat(pcVar5,local_30,__size)   //possible issue identified - semgrep
                    strlcat(pcVar5,&DAT_0042a53c,__size)   //possible issue identified - semgrep
                    piVar3 = (int *)*piVar3;
                    if (piVar3 == (int *)0x0) goto LAB_00418188;
                  }
                }
LAB_00418188:
                piVar2 = (int *)*piVar2;
              } while (piVar2 != (int *)0x0);
              piVar2 = *(int **)(param_3 + 0x28);
              if (piVar2 != (int *)0x0) {
                do {
                  piVar3 = (int *)piVar2[10];
                  bVar1 = false;
                  if (piVar3 != (int *)0x0) {
                    do {
                      while ((piVar3[2] != 5 || (piVar3[4] == 0))) {
                        piVar3 = (int *)*piVar3;
                        if (piVar3 == (int *)0x0) goto LAB_00418274;
                      }
                      snprintf(acStack_e0,10,"%d",piVar3[3])   //possible issue identified - semgrep
                      strlcat(local_34,acStack_e0,0x19)   //possible issue identified - semgrep
                      snprintf(acStack_e0,10,"%d",piVar3[4])   //possible issue identified - semgrep
                      strlcat(__s,acStack_e0,0x19)   //possible issue identified - semgrep
                      piVar3 = (int *)*piVar3;
                      bVar1 = true;
                    } while (piVar3 != (int *)0x0);
LAB_00418274:
                    if (bVar1) break;
                  }
                  piVar2 = (int *)*piVar2;
                } while (piVar2 != (int *)0x0);
              }
            }
            goto LAB_0041828c;
          }
          pcVar4 = "failed to allocate strings for pd vltime";
        }
      }
    }
  }
LAB_00419044:
  dprintf(5,"client6_script",pcVar4);
  uVar23 = 0xffffffff;
LAB_00418304:
  iVar18 = 0;
  ppcVar22 = local_38;
  do {
    iVar18 = iVar18 + 1;
    free(*ppcVar22);
    ppcVar22 = ppcVar22 + 1;
  } while (iVar18 < local_68);
  free(local_38);
  return uVar23;
}