void Indicate_Legacy_Packet(int param_1,int param_2,uint param_3)
{
int iVar1;
undefined4 uVar2;
short sVar3;
undefined2 uVar4;
void *__s2;
void *__src;
void *__src_00;
undefined4 uVar5;
undefined1 local_40;
undefined1 local_3f;
undefined1 auStack_3c [6];
undefined1 auStack_36 [6];
undefined1 auStack_30 [12];
param_3 = param_3 & 0xff;
uVar5 = *(undefined4 *)(param_2 + 0x18);
if ((*(ushort *)(param_2 + 0x22) & 0x201) == 0) {
iVar1 = *(int *)(param_2 + 0x14);
if ((*(ushort *)(param_2 + 0x22) & 0x400) == 0) {
__src_00 = (void *)(iVar1 + 10);
__src = (void *)(iVar1 + 0x10);
}
else {
__src_00 = (void *)(iVar1 + 0x10);
__src = (void *)(iVar1 + 4);
}
}
else {
__src_00 = (void *)(*(int *)(param_2 + 0x14) + 0x18);
__src = (void *)(*(int *)(param_2 + 0x14) + 0x10);
}
iVar1 = memcmp(&SNAP_802_1H,*(void **)(param_2 + 0x1c),6);
if (iVar1 == 0) {
iVar1 = *(int *)(param_2 + 0x1c);
LAB_000230f4:
__s2 = (void *)(iVar1 + 6);
iVar1 = memcmp(&IPX,__s2,2);
if (((iVar1 != 0) && (iVar1 = memcmp(&APPLE_TALK,__s2,2), iVar1 != 0)) ||
(iVar1 = memcmp(&SNAP_802_1H,*(void **)(param_2 + 0x1c),6), iVar1 != 0)) {
memmove(auStack_3c,__src,6) //possible issue identified - semgrep
memmove(auStack_36,__src_00,6) //possible issue identified - semgrep
memmove(auStack_30,__s2,2) //possible issue identified - semgrep
*(short *)(param_2 + 0x20) = *(short *)(param_2 + 0x20) + -8;
*(int *)(param_2 + 0x1c) = *(int *)(param_2 + 0x1c) + 8;
goto LAB_000231f4;
}
uVar4 = *(undefined2 *)(param_2 + 0x20);
}
else {
iVar1 = memcmp(&SNAP_BRIDGE_TUNNEL,*(void **)(param_2 + 0x1c),6);
if (iVar1 == 0) {
iVar1 = *(int *)(param_2 + 0x1c);
goto LAB_000230f4;
}
uVar4 = *(undefined2 *)(param_2 + 0x20);
}
local_40 = (undefined1)((ushort)uVar4 >> 8);
local_3f = (undefined1)uVar4;
memmove(auStack_3c,__src,6) //possible issue identified - semgrep
memmove(auStack_36,__src_00,6) //possible issue identified - semgrep
memmove(auStack_30,&local_40,2) //possible issue identified - semgrep
LAB_000231f4:
if (*(ushort *)(param_2 + 0x20) < 0x5f1) {
sVar3 = 0;
if (param_3 < *(byte *)(param_1 + 0x51aa)) {
uVar4 = 0;
if (param_3 < 0x10) {
iVar1 = param_3 * 0x1140 + param_1;
sVar3 = *(short *)(iVar1 + 0x5924) //possible issue identified - semgrep
if (sVar3 != 0) {
uVar4 = *(undefined2 *)(iVar1 + 0x5926);
}
}
}
else {
uVar4 = 0;
}
uVar2 = get_netdev_from_bssid(param_1,param_3);
wlan_802_11_to_802_3_packet
(uVar2,*(undefined1 *)(param_2 + 0x25),sVar3,uVar4,*(undefined4 *)(param_2 + 0x18),
*(undefined4 *)(param_2 + 0x1c),*(undefined2 *)(param_2 + 0x20),auStack_3c,param_3,
&TPID);
Announce_or_Forward_802_3_Packet(param_1,uVar5,param_3);
}
else {
RTMPFreeNdisPacket(param_1,uVar5);
}
return;
}