/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
undefined4 FUN_004024a0(int param_1,undefined4 *param_2)
{
bool bVar1;
size_t sVar2;
undefined4 uVar3;
char *pcVar4;
int iVar5;
char *__s;
undefined4 *puVar6;
int iVar7;
int iVar8;
char local_220 [512];
iVar8 = 0;
iVar5 = 0;
puVar6 = param_2;
while (bVar1 = iVar5 < param_1, iVar5 = iVar5 + 1, bVar1) {
pcVar4 = (char *)*puVar6;
puVar6 = puVar6 + 1;
sVar2 = strlen(pcVar4);
iVar8 = sVar2 + 1 + iVar8 //possible issue identified - semgrep
}
iVar8 = iVar8 + 1;
iVar5 = 0;
if (iVar8 < 0x201) {
iVar7 = 0;
while (bVar1 = iVar5 < param_1, iVar5 = iVar5 + 1, bVar1) {
__s = (char *)*param_2;
param_2 = param_2 + 1;
sVar2 = strlen(__s);
pcVar4 = local_220 + iVar7;
iVar7 = iVar7 + sVar2 + 1 //possible issue identified - semgrep
memcpy(pcVar4,__s,sVar2 + 1) //possible issue identified - semgrep
}
local_220[iVar7] = '\0';
iVar5 = susock_open("/var/run/servd_ctrl_usock") //possible issue identified - semgrep
uVar3 = 0;
if (iVar5 != 0) {
susock_send(iVar5,local_220,iVar8,0x4000);
iVar8 = susock_recv(iVar5,local_220,0x200,0) //possible issue identified - semgrep
iVar7 = 0;
while( true ) {
bVar1 = iVar8 <= iVar7;
pcVar4 = local_220 + iVar7;
iVar7 = iVar7 + 1;
if (bVar1) break;
fputc((int)*pcVar4,_stdout);
}
susock_close(iVar5);
uVar3 = 0;
}
}
else {
fprintf(_stderr,"The size of the command is %d bytes, which is over the maximum size %d!\n",
iVar8,0x200);
uVar3 = 0xffffffff;
}
return uVar3;
}