int FUN_0040d89c(undefined4 param_1,undefined4 param_2)
{
int iVar1;
int iVar2;
int iVar3;
char acStack_428 [128];
char local_3a8 [128];
char acStack_328 [256];
char acStack_228 [256];
char local_128 [256];
iVar1 = sloop_uptime();
iVar2 = 0;
do {
iVar3 = iVar2;
snprintf(acStack_228,0x100,"%s/subscription:%d/host",param_1,iVar3 + 1) //possible issue identified - semgrep
xmldbc_get_wb(0,0,acStack_228,local_128,0x100);
iVar2 = iVar3 + 1;
} while (local_128[0] != '\0');
for (; iVar3 != 0; iVar3 = iVar3 + -1) {
snprintf(acStack_228,0x100,"%s/subscription:%d/timeout",param_1,iVar3) //possible issue identified - semgrep
xmldbc_get_wb(0,0,acStack_228,local_128,0x100);
iVar2 = atoi(local_128);
if (iVar2 < iVar1) {
snprintf(acStack_228,0x100,"%s/subscription:%d",param_1,iVar3) //possible issue identified - semgrep
xmldbc_del(0,0,acStack_228);
}
}
iVar2 = 0;
while( true ) {
snprintf(acStack_428,0x80,"%s/subscription:%d",param_1,iVar2 + 1) //possible issue identified - semgrep
snprintf(acStack_328,0x100,"%s/host",acStack_428) //possible issue identified - semgrep
xmldbc_get_wb(0,0,acStack_328,local_3a8,0x80);
if (local_3a8[0] == '\0') break;
FUN_0040d354(acStack_428,local_3a8,param_2);
iVar2 = iVar2 + 1;
}
return iVar2;
}