void CalculateMIC(char param_1,undefined4 param_2,int param_3)
{
int local_80;
undefined4 local_7c;
undefined1 auStack_78 [16];
undefined1 auStack_68 [84];
local_7c = 0;
os_alloc_mem(0,&local_80,0x200);
if (local_80 == 0) {
if (RTDebugLevel != 0) {
printk("!!!CalculateMIC: no memory!!!\n");
}
}
else {
MakeOutgoingFrame(local_80,&local_7c,
CONCAT11(*(undefined1 *)(param_3 + 2),*(undefined1 *)(param_3 + 3)) + 4,
param_3,0xffffffff);
memset(auStack_78,0,0x10) //possible issue identified - semgrep
if (param_1 == '\x02') {
RT_HMAC_SHA1(param_2,0x10,local_80,local_7c,auStack_68,0x14);
memmove(auStack_78,auStack_68,0x10) //possible issue identified - semgrep
}
else {
RT_HMAC_MD5(param_2,0x10,local_80,local_7c,auStack_78,0x10);
}
memmove((void *)(param_3 + 0x51),auStack_78,0x10) //possible issue identified - semgrep
os_free_mem(0,local_80);
}
return;
}