undefined4 FUN_0040c7a4(undefined4 param_1,undefined4 param_2,undefined4 param_3)
{
char *pcVar1;
size_t sVar2;
int iVar3;
void *local_828;
in_addr iStack_824;
undefined1 local_820;
undefined1 auStack_81f [4];
undefined1 auStack_81b [2047];
memset(&local_820,0,0x800) //possible issue identified - semgrep
local_828 = (void *)0x0;
pcVar1 = getenv("REMOTE_ADDR") //possible issue identified - semgrep
inet_aton(pcVar1,&iStack_824);
pcVar1 = (char *)FUN_0040c5d0(param_3,"NewMessage");
if (pcVar1 != (char *)0x0) {
sVar2 = strlen(pcVar1);
sVar2 = base64decode(pcVar1,sVar2,&local_828);
if (sVar2 != 0) {
iVar3 = FUN_0040c654(5,"upnp:ssr");
if (iVar3 != 0) {
local_820 = 3;
memcpy(auStack_81f,&iStack_824,4) //possible issue identified - semgrep
memcpy(auStack_81b,local_828,sVar2) //possible issue identified - semgrep
free(local_828);
local_828 = (void *)0x0;
usock_send(iVar3,&local_820,sVar2 + 5,0x4000);
}
goto LAB_0040c908;
}
}
iVar3 = 0;
LAB_0040c908:
FUN_0040c1f0(200,param_1,param_2,0,0);
if (local_828 != (void *)0x0) {
free(local_828);
}
if (iVar3 != 0) {
usock_close(iVar3);
}
return 0;
}