int cgibin_parse_request(undefined4 param_1,undefined4 param_2,uint param_3)
{
char *pcVar1;
uint uVar2;
size_t sVar3;
int iVar4;
char *__s2;
int iVar5;
undefined **ppuVar6;
int iVar7;
undefined *__n;
undefined4 local_38;
int local_34;
int local_30;
undefined4 local_2c;
undefined4 local_28;
pcVar1 = getenv("CONTENT_TYPE") //possible issue identified - semgrep
if (pcVar1 != (char *)0x0) {
pcVar1 = getenv("CONTENT_LENGTH") //possible issue identified - semgrep
if (pcVar1 != (char *)0x0) {
uVar2 = atoi(pcVar1);
goto LAB_00403648;
}
}
uVar2 = 0;
LAB_00403648:
local_34 = sobj_new();
local_30 = sobj_new();
iVar5 = -1;
if ((local_34 != 0) && (local_30 != 0)) {
pcVar1 = getenv("REQUEST_URI") //possible issue identified - semgrep
if (pcVar1 == (char *)0x0) {
iVar5 = -1;
}
else {
pcVar1 = strchr(pcVar1,0x3f);
iVar5 = 0;
if (pcVar1 != (char *)0x0) {
local_38 = 0;
local_2c = param_1;
local_28 = param_2;
sVar3 = strlen(pcVar1 + 1) //possible issue identified - semgrep
FUN_00402ef0(&local_38,pcVar1 + 1,sVar3);
FUN_00402ef0(&local_38,0,0);
iVar5 = 0;
}
}
}
if (local_34 != 0) {
sobj_del();
}
if (local_30 != 0) {
sobj_del();
}
if (iVar5 != -1) {
if (param_3 < uVar2) {
FUN_00403098(uVar2);
iVar5 = -100;
}
else if (uVar2 != 0) {
getenv("CONTENT_TYPE") //possible issue identified - semgrep
pcVar1 = getenv("CONTENT_TYPE") //possible issue identified - semgrep
if (pcVar1 == (char *)0x0) {
LAB_00403844:
iVar5 = -1;
}
else {
ppuVar6 = &PTR_s_application__004302c8;
iVar5 = 0;
do {
iVar7 = iVar5;
__s2 = *ppuVar6;
if (__s2 == (char *)0x0) goto LAB_00403844;
__n = ppuVar6[1];
ppuVar6 = ppuVar6 + 3;
iVar4 = strncasecmp(pcVar1,__s2,(size_t)__n) //possible issue identified - semgrep
iVar5 = iVar7 + 1;
} while (iVar4 != 0);
iVar5 = (*(code *)(&PTR_FUN_004302d0)[iVar7 * 3])(param_1,param_2,uVar2,pcVar1 + (int)__n);
}
}
}
return iVar5;
}