void RTMPIoctlQueryRadiusConf(int param_1,uint *param_2)
{
byte bVar1;
byte bVar2;
char cVar3;
bool bVar4;
code *pcVar5;
int iVar6;
char *pcVar7;
int iVar8;
int iVar9;
int iVar10;
uint uVar11;
uint uVar12;
int unaff_gp;
char *local_40 [2];
int local_38;
char *local_34;
int local_30;
char *local_2c;
if (2 < RTDebugLevel) {
printk("RTMPIoctlQueryRadiusConf==>\n");
}
os_alloc_mem(0,local_40,0x6c5);
if (local_40[0] == (char *)0x0) {
if (RTDebugLevel == 0) {
return;
}
pcVar7 = "!!!%s: out of resource!!!\n";
local_40[0] = "RTMPIoctlQueryRadiusConf";
pcVar5 = printk;
goto LAB_00086ec8;
}
memset(local_40[0],0,0x6c5) //possible issue identified - semgrep
pcVar7 = local_40[0];
local_40[0][4] = *(char *)(param_1 + 0x51aa);
*(undefined4 *)(local_40[0] + 5) = *(undefined4 *)(param_1 + 0x16644);
*(undefined4 *)(local_40[0] + 9) = *(undefined4 *)(param_1 + 0x16648);
local_30 = param_1 + 0x16654;
*(undefined4 *)(local_40[0] + 0xd) = *(undefined4 *)(param_1 + 0x1664c);
local_38 = param_1 + 0x16764;
*(undefined4 *)(local_40[0] + 0x11) = *(undefined4 *)(param_1 + 0x16650);
local_34 = local_40[0] + 0x9d;
local_2c = local_40[0] + 0x15;
for (uVar11 = 0; uVar11 < *(byte *)(param_1 + 0x51aa); uVar11 = uVar11 + 1 & 0xff) {
iVar10 = param_1 + uVar11 * 0x1140;
pcVar7[uVar11 * 0xb4 + 0x125] = *(char *)(iVar10 + 0x5b33);
uVar12 = 0;
while( true ) {
iVar8 = uVar12 * 0x49 + uVar11 * 0xb4;
iVar6 = uVar12 * 0x49 + uVar11 * 0x1140;
iVar9 = param_1 + iVar6;
if (*(byte *)(iVar10 + 0x5b33) <= uVar12) break;
if (*(int *)(iVar9 + 0x5b34) != 0) {
*(int *)(pcVar7 + iVar8 + 0x126) = *(int *)(iVar9 + 0x5b34);
*(undefined4 *)(pcVar7 + iVar8 + 0x12a) = *(undefined4 *)(iVar9 + 0x5b38);
pcVar7[iVar8 + 0x16e] = *(char *)(iVar9 + 0x5b7c);
if (*(byte *)(iVar9 + 0x5b7c) != 0) {
memmove(pcVar7 + iVar8 + 0x12e,(void *)(param_1 + iVar6 + 0x5b3c),
(uint)*(byte *)(iVar9 + 0x5b7c)) //possible issue identified - semgrep
}
}
uVar12 = uVar12 + 1 & 0xff;
}
bVar4 = *(char *)(iVar10 + 0x52b5) != '\0';
pcVar7[uVar11 * 0xb4 + 0x1b8] = bVar4;
if (bVar4) {
bVar1 = *(byte *)(iVar10 + 0x5240);
pcVar7[uVar11 * 0xb4 + 0x1b9] = bVar1;
bVar2 = *(byte *)(param_1 + uVar11 * 0x10c + (uint)bVar1 * 0x43 + 0x755d5);
uVar12 = (uint)bVar2;
if ((uVar12 == 5) || (uVar12 == 0xd)) {
pcVar7[uVar11 * 0xb4 + 0x1ba] = bVar2;
memmove(pcVar7 + uVar11 * 0xb4 + 0x1bb,
(void *)(param_1 + uVar11 * 0x10c + (uint)bVar1 * 0x43 + 0x75594),uVar12) //possible issue identified - semgrep
}
}
iVar10 = param_1 + uVar11 * 0x1140;
if (*(char *)(iVar10 + 0x5bd6) != '\0') {
pcVar7[uVar11 * 0xb4 + 0x1d8] = *(char *)(iVar10 + 0x5bd6);
memmove(pcVar7 + uVar11 * 0xb4 + 0x1c8,(void *)(iVar10 + 0x5bc6),
(uint)*(byte *)(iVar10 + 0x5bd6)) //possible issue identified - semgrep
}
cVar3 = *(char *)(param_1 + uVar11 + 0x16754) //possible issue identified - semgrep
if (cVar3 != '\0') {
pcVar7[uVar11 + 0x95] = cVar3;
memmove(local_2c + uVar11 * 0x10,(void *)(local_30 + uVar11 * 0x10),
(uint)*(byte *)(param_1 + uVar11 + 0x16754)) //possible issue identified - semgrep
}
cVar3 = *(char *)(param_1 + uVar11 + 0x16864) //possible issue identified - semgrep
if (cVar3 != '\0') {
pcVar7[uVar11 + 0x11d] = cVar3;
memmove(local_34 + uVar11 * 0x10,(void *)(local_38 + uVar11 * 0x10),
(uint)*(byte *)(param_1 + uVar11 + 0x16864)) //possible issue identified - semgrep
}
}
uVar11 = *param_2;
*(undefined2 *)(param_2 + 1) = 0x6c5;
if (((uVar11 + 0x6c5 | uVar11) & *(uint *)(unaff_gp + 0x18)) == 0) {
iVar10 = 0x6c5;
__copy_user(uVar11,pcVar7);
if (iVar10 != 0) goto LAB_00086e8c;
}
else {
LAB_00086e8c:
if (RTDebugLevel != 0) {
printk("%s: copy_to_user() fail\n","RTMPIoctlQueryRadiusConf");
}
}
pcVar7 = (char *)0x0;
pcVar5 = os_free_mem;
LAB_00086ec8:
(*pcVar5)(pcVar7,local_40[0]);
return;
}