undefined4 Set_BASetup_Proc(undefined4 param_1,char *param_2)

{
  byte bVar1;
  size_t sVar2;
  undefined4 uVar3;
  char *__s;
  byte *__s_00;
  undefined1 *puVar4;
  int iVar5;
  undefined2 local_38 [2];
  undefined1 local_34 [4];
  undefined1 local_30;
  undefined1 local_2f;
  
  local_38[0] = 0x3a;
  sVar2 = strlen(param_2);
  uVar3 = 0;
  if (0x12 < sVar2) {
    __s = strchr(param_2,0x2d);
    if ((__s == (char *)0x0) || (sVar2 = strlen(__s), sVar2 < 2)) {
LAB_0003996c:
      uVar3 = 0;
    }
    else {
      bVar1 = simple_strtol(__s + 1,0,10);
      uVar3 = 0;
      if (bVar1 < 8) {
        *__s = '\0';
        __s_00 = (byte *)rstrtok(param_2,local_38)   //possible issue identified - semgrep
        iVar5 = 0;
        while (__s_00 != (byte *)0x0) {
          sVar2 = strlen((char *)__s_00);
          puVar4 = local_34 + iVar5;
          iVar5 = iVar5 + 1;
          if (sVar2 != 2) goto LAB_0003996c;
          if (((&_ctype)[*__s_00] & 0x44) == 0) {
            return 0;
          }
          if (((&_ctype)[__s_00[1]] & 0x44) == 0) {
            return 0;
          }
          AtoH(__s_00,puVar4,1);
          __s_00 = (byte *)rstrtok(0,local_38)   //possible issue identified - semgrep
        }
        if (iVar5 == 6) {
          printk("\n%02x:%02x:%02x:%02x:%02x:%02x-%02x\n",local_34[0],local_34[1],local_34[2],
                 local_34[3],local_30,local_2f,bVar1);
          iVar5 = MacTableLookup(param_1,local_34);
          uVar3 = 1;
          if (iVar5 != 0) {
            printk("\nSetup BA Session: Tid = %d\n",bVar1);
            BAOriSessionSetUp(param_1,iVar5,bVar1,0,100,1);
            uVar3 = 1;
          }
        }
        else {
          uVar3 = 0;
        }
      }
    }
  }
  return uVar3;
}