/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */

undefined4 FUN_00403454(char *param_1)

{
  char cVar1;
  char *pcVar2;
  size_t __n;
  int iVar3;
  int iVar4;
  undefined4 uVar5;
  byte bVar6;
  undefined4 uVar7;
  uint uVar8;
  int iVar9;
  undefined4 uVar10;
  undefined4 *puVar11;
  undefined4 uVar12;
  char *pcVar13;
  char *pcVar14;
  undefined4 local_70;
  undefined4 local_6c;
  undefined4 local_68;
  undefined4 local_64;
  undefined4 local_60;
  char local_5c [4];
  undefined4 local_58 [14];
  undefined1 local_1d;
  
  if (DAT_0041bbe0 < 0x20) {
    pcVar2 = strtok(param_1,", \t")   //possible issue identified - semgrep
    memset(local_5c,0,0x40)   //possible issue identified - semgrep
    __n = strlen(pcVar2);
    if (__n < 0x41) {
      memcpy(local_5c,pcVar2,__n)   //possible issue identified - semgrep
    }
    else {
      pcVar14 = pcVar2 + 0x40;
      pcVar13 = local_5c;
      do {
        uVar5 = *(undefined4 *)pcVar2;
        uVar7 = *(undefined4 *)(pcVar2 + 4);
        uVar10 = *(undefined4 *)(pcVar2 + 8);
        uVar12 = *(undefined4 *)(pcVar2 + 0xc);
        pcVar2 = pcVar2 + 0x10;
        *(undefined4 *)pcVar13 = uVar5;
        *(undefined4 *)(pcVar13 + 4) = uVar7;
        *(undefined4 *)(pcVar13 + 8) = uVar10;
        *(undefined4 *)(pcVar13 + 0xc) = uVar12;
        pcVar13 = pcVar13 + 0x10;
      } while (pcVar2 != pcVar14);
      local_1d = 0;
    }
    pcVar2 = strtok((char *)0x0,", \t/-")   //possible issue identified - semgrep
    iVar3 = FUN_004033bc(pcVar2,&local_70);
    pcVar2 = strtok((char *)0x0,", \t/-")   //possible issue identified - semgrep
    if (pcVar2 != (char *)0x0) {
      local_6c = 0;
      local_68 = 0;
      local_64 = 0;
      local_60 = 0;
      if (iVar3 == 0) {
        return 0;
      }
      pcVar2 = strtok(pcVar2,", \t")   //possible issue identified - semgrep
      uVar8 = (uint)*pcVar2;
      iVar3 = 0;
      while (uVar8 != 0) {
        if (iVar3 == 6) {
          return 0;
        }
        if ((*(ushort *)(___ctype_b + uVar8 * 2) & 8) == 0) {
          if (5 < ((uVar8 & 0xff) - 0x61 & 0xff)) {
            iVar4 = uVar8 - 0x37;
            if (5 < ((uVar8 & 0xff) - 0x41 & 0xff)) {
              return 0;
            }
            goto LAB_004035ec;
          }
          cVar1 = pcVar2[1]   //possible issue identified - semgrep
          iVar9 = (int)cVar1;
          uVar8 = (uVar8 - 0x57) * 0x10;
          if ((*(ushort *)(___ctype_b + iVar9 * 2) & 8) != 0) goto LAB_00403614;
LAB_004036e8:
          if ((byte)(cVar1 + 0x9fU) < 6) {
            bVar6 = (byte)uVar8 | (char)iVar9 + 0xa9U;
            goto LAB_00403618;
          }
          if ((byte)(cVar1 + 0xbfU) < 6) {
            bVar6 = (byte)uVar8 | (char)iVar9 - 0x37U;
            goto LAB_00403618;
          }
          bVar6 = (byte)(uVar8 >> 4);
          if ((iVar9 == 0x3a) || (iVar9 == 0x2d)) goto LAB_00403618;
          pcVar13 = pcVar2 + 1;
          if (iVar9 != 0) {
            return 0;
          }
        }
        else {
          iVar4 = uVar8 - 0x30;
LAB_004035ec:
          cVar1 = pcVar2[1]   //possible issue identified - semgrep
          iVar9 = (int)cVar1;
          uVar8 = iVar4 << 4;
          if ((*(ushort *)(___ctype_b + iVar9 * 2) & 8) == 0) goto LAB_004036e8;
LAB_00403614:
          bVar6 = (byte)uVar8 | (char)iVar9 - 0x30U;
LAB_00403618:
          pcVar13 = pcVar2 + 1;
          if (iVar9 != 0) {
            pcVar13 = pcVar2 + 2;
          }
        }
        pcVar2 = pcVar13;
        *(byte *)((int)&local_6c + iVar3) = bVar6;
        uVar8 = (uint)*pcVar2;
        if ((uVar8 == 0x3a) || (uVar8 == 0x2d)) {
          pcVar2 = pcVar2 + 1;
          uVar8 = (uint)*pcVar2;
          iVar3 = iVar3 + 1;
        }
        else {
          iVar3 = iVar3 + 1;
        }
      }
      if (iVar3 == 6) {
        strcpy((char *)(static_leases + DAT_0041bbe0 * 0x5c + 0x1c),local_5c)   //possible issue identified - semgrep
        puVar11 = (undefined4 *)(static_leases + DAT_0041bbe0 * 0x5c);
        puVar11[4] = local_70;
        puVar11[3] = local_60;
        puVar11[1] = local_68;
        *puVar11 = local_6c;
        puVar11[2] = local_64;
        iVar3 = static_leases + DAT_0041bbe0 * 0x5c;
        *(undefined4 *)(iVar3 + 0x14) = 0xffffffff;
        *(undefined4 *)(iVar3 + 0x18) = 0;
        DAT_0041bbe0 = DAT_0041bbe0 + 1;
        return 1;
      }
    }
  }
  return 0;
}