void BssCipherParse(int param_1)
{
byte bVar1;
char cVar2;
uint uVar3;
int iVar4;
undefined4 uVar5;
byte *pbVar6;
int iVar7;
uint uVar8;
uint uVar9;
byte *__s1;
uint uVar10;
if (*(char *)(param_1 + 0x5e) == '\0') {
*(undefined4 *)(param_1 + 0xd0) = 1;
}
else {
*(undefined4 *)(param_1 + 0xd0) = 0;
}
*(undefined4 *)(param_1 + 0xb4) = 1;
*(undefined4 *)(param_1 + 0xcc) = 0;
*(undefined4 *)(param_1 + 200) = 0;
*(undefined4 *)(param_1 + 0x9c) = 1;
*(undefined4 *)(param_1 + 0xa0) = 1;
*(undefined4 *)(param_1 + 0xa4) = 1;
*(undefined2 *)(param_1 + 0xa8) = 0;
*(undefined1 *)(param_1 + 0xaa) = 0;
*(undefined4 *)(param_1 + 0xac) = 1;
*(undefined4 *)(param_1 + 0xb0) = 1;
*(undefined2 *)(param_1 + 0xb8) = 0;
*(undefined1 *)(param_1 + 0xba) = 0;
uVar10 = (uint)*(ushort *)(param_1 + 0xd4);
do {
if ((int)uVar10 < 1) {
return;
}
iVar7 = param_1 + (*(ushort *)(param_1 + 0xd4) - uVar10) + 0xd0;
if (*(char *)(iVar7 + 6) == '0') {
if (*(short *)(iVar7 + 8) == 1) {
iVar4 = memcmp((void *)(iVar7 + 10),&RSN_OUI,3);
if (iVar4 == 0) {
bVar1 = *(byte *)(iVar7 + 0xd);
uVar5 = 4;
if (bVar1 == 2) {
LAB_00018920:
*(undefined4 *)(param_1 + 0xb4) = uVar5;
LAB_00018924:
uVar3 = (uint)*(byte *)(iVar7 + 0xf);
}
else {
if (2 < bVar1) {
if (bVar1 == 4) {
uVar5 = 6;
goto LAB_00018920;
}
if (bVar1 != 5) {
uVar3 = (uint)*(byte *)(iVar7 + 0xf);
goto LAB_00018928;
}
*(undefined4 *)(param_1 + 0xb4) = 0xb;
goto LAB_00018924;
}
if (bVar1 == 1) {
*(undefined4 *)(param_1 + 0xb4) = 10;
uVar3 = (uint)*(byte *)(iVar7 + 0xf);
}
else {
uVar3 = (uint)*(byte *)(iVar7 + 0xf);
}
}
LAB_00018928:
uVar9 = uVar3 * 0x100 + (uint)*(byte *)(iVar7 + 0xe) & 0xffff;
iVar4 = iVar7 + 0x10;
for (uVar3 = uVar9; uVar3 != 0; uVar3 = uVar3 - 1 & 0xffff) {
bVar1 = *(byte *)(iVar4 + 3);
uVar8 = 4;
if (bVar1 != 2) {
if (bVar1 < 3) {
if (bVar1 == 1) {
uVar8 = 0;
}
else {
uVar8 = 1;
}
}
else {
uVar8 = 6;
if (bVar1 != 4) {
if (bVar1 == 5) {
uVar8 = 0;
}
else {
uVar8 = 1;
}
}
}
}
if (*(uint *)(param_1 + 0xac) < uVar8) {
*(uint *)(param_1 + 0xb0) = *(uint *)(param_1 + 0xac);
*(uint *)(param_1 + 0xac) = uVar8;
}
else {
*(uint *)(param_1 + 0xb0) = uVar8;
}
iVar4 = iVar4 + 4;
}
pbVar6 = (byte *)(iVar7 + 0x10 + uVar9 * 4);
__s1 = pbVar6 + 2;
for (uVar3 = (uint)pbVar6[1] * 0x100 + (uint)*pbVar6; uVar3 = uVar3 & 0xffff, uVar3 != 0;
uVar3 = uVar3 - 1) {
iVar4 = memcmp(__s1,&RSN_OUI,3);
if (iVar4 != 0) {
cVar2 = *(char *)(param_1 + 8) //possible issue identified - semgrep
goto LAB_00018a7c;
}
bVar1 = __s1[3];
if (bVar1 == 1) {
uVar5 = 6;
if (*(int *)(param_1 + 0xcc) == 0) {
uVar5 = 6;
LAB_00018a44:
*(undefined4 *)(param_1 + 0xcc) = uVar5;
}
else {
LAB_00018a4c:
*(undefined4 *)(param_1 + 200) = uVar5;
}
}
else if (bVar1 == 0) {
if (*(int *)(param_1 + 0xcc) == 0) {
*(undefined4 *)(param_1 + 0xcc) = 5;
}
else {
*(undefined4 *)(param_1 + 200) = 5;
}
}
else {
if (bVar1 == 2) {
uVar5 = 7;
if (*(int *)(param_1 + 0xcc) != 0) goto LAB_00018a4c;
uVar5 = 7;
goto LAB_00018a44;
}
if (*(int *)(param_1 + 0xcc) == 0) {
*(undefined4 *)(param_1 + 0xcc) = 10;
}
else {
*(undefined4 *)(param_1 + 200) = 10;
}
}
__s1 = __s1 + uVar3 * 4;
}
cVar2 = *(char *)(param_1 + 8) //possible issue identified - semgrep
LAB_00018a7c:
if (cVar2 == '\0') {
uVar5 = *(undefined4 *)(param_1 + 0xb4);
*(undefined4 *)(param_1 + 0xa4) = uVar5;
*(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xb0);
*(undefined4 *)(param_1 + 0xd0) = uVar5;
if (*(int *)(param_1 + 0xb0) == 1) {
*(undefined4 *)(param_1 + 0xa0) = uVar5;
}
iVar4 = *(int *)(param_1 + 0xac);
}
else {
iVar4 = *(int *)(param_1 + 0xac);
}
*(int *)(param_1 + 0xd0) = iVar4;
*(ushort *)(param_1 + 0xb8) = (ushort)__s1[1] * 0x100 + (ushort)*__s1;
if (*(int *)(param_1 + 0xb4) != iVar4) {
*(undefined1 *)(param_1 + 0xba) = 1;
}
goto LAB_00018acc;
}
uVar3 = (uint)*(byte *)(iVar7 + 7);
}
else {
uVar3 = (uint)*(byte *)(iVar7 + 7);
}
}
else {
if (*(char *)(iVar7 + 6) != -0x23) {
uVar3 = (uint)*(byte *)(iVar7 + 7);
goto LAB_00018ad0;
}
iVar4 = memcmp((void *)(iVar7 + 8),&SES_OUI,3);
if ((iVar4 == 0) && (*(char *)(iVar7 + 7) == '\a')) {
*(undefined1 *)(param_1 + 0x98) = 1;
}
else {
iVar4 = memcmp((void *)(iVar7 + 8),&WPA_OUI,4);
if (iVar4 != 0) {
uVar3 = (uint)*(byte *)(iVar7 + 7);
goto LAB_00018ad0;
}
bVar1 = *(byte *)(iVar7 + 0x11);
if (bVar1 == 2) {
uVar5 = 4;
LAB_00018770:
*(undefined4 *)(param_1 + 0xa4) = uVar5;
LAB_00018774:
uVar3 = (uint)*(byte *)(iVar7 + 0x13);
}
else {
if (2 < bVar1) {
if (bVar1 == 4) {
uVar5 = 6;
goto LAB_00018770;
}
if (bVar1 != 5) {
uVar3 = (uint)*(byte *)(iVar7 + 0x13);
goto LAB_00018778;
}
*(undefined4 *)(param_1 + 0xa4) = 0xb;
goto LAB_00018774;
}
if (bVar1 == 1) {
*(undefined4 *)(param_1 + 0xa4) = 10;
uVar3 = (uint)*(byte *)(iVar7 + 0x13);
}
else {
uVar3 = (uint)*(byte *)(iVar7 + 0x13);
}
}
LAB_00018778:
uVar9 = uVar3 * 0x100 + (uint)*(byte *)(iVar7 + 0x12) & 0xffff;
iVar4 = iVar7 + 0x14;
for (uVar3 = uVar9; uVar3 != 0; uVar3 = uVar3 - 1 & 0xffff) {
bVar1 = *(byte *)(iVar4 + 3);
uVar8 = 4;
if (bVar1 != 2) {
if (bVar1 < 3) {
if (bVar1 == 1) {
uVar8 = 0;
}
else {
uVar8 = 1;
}
}
else {
uVar8 = 6;
if (bVar1 != 4) {
if (bVar1 == 5) {
uVar8 = 0;
}
else {
uVar8 = 1;
}
}
}
}
if (*(uint *)(param_1 + 0x9c) < uVar8) {
*(uint *)(param_1 + 0xa0) = *(uint *)(param_1 + 0x9c);
*(uint *)(param_1 + 0x9c) = uVar8;
}
else {
*(uint *)(param_1 + 0xa0) = uVar8;
}
iVar4 = iVar4 + 4;
}
cVar2 = *(char *)(iVar7 + 0x14 + uVar9 * 4 + 5) //possible issue identified - semgrep
if (cVar2 == '\x01') {
uVar5 = 3;
if (*(int *)(param_1 + 0xcc) == 0) {
*(undefined4 *)(param_1 + 0xcc) = 3;
}
else {
LAB_00018844:
*(undefined4 *)(param_1 + 200) = uVar5;
}
LAB_00018848:
cVar2 = *(char *)(param_1 + 8) //possible issue identified - semgrep
}
else {
if (cVar2 == '\x02') {
uVar5 = 4;
if (*(int *)(param_1 + 0xcc) != 0) goto LAB_00018844;
*(undefined4 *)(param_1 + 0xcc) = 4;
goto LAB_00018848;
}
cVar2 = *(char *)(param_1 + 8) //possible issue identified - semgrep
}
if (cVar2 == '\0') {
*(undefined4 *)(param_1 + 0xcc) = 5;
*(undefined4 *)(param_1 + 200) = 5;
*(undefined4 *)(param_1 + 0xd0) = *(undefined4 *)(param_1 + 0xa4);
if (*(int *)(param_1 + 0xa0) == 1) {
*(undefined4 *)(param_1 + 0xa0) = *(undefined4 *)(param_1 + 0xa4);
}
}
else {
*(undefined4 *)(param_1 + 0xd0) = *(undefined4 *)(param_1 + 0x9c);
}
if (*(int *)(param_1 + 0xa4) != *(int *)(param_1 + 0x9c)) {
*(undefined1 *)(param_1 + 0xaa) = 1;
}
}
LAB_00018acc:
uVar3 = (uint)*(byte *)(iVar7 + 7);
}
LAB_00018ad0:
uVar10 = (uVar10 - uVar3) - 2;
} while( true );
}