void FUN_0040c1f0(int param_1,undefined4 param_2,undefined4 param_3,int param_4,int param_5)

{
  int iVar1;
  int iVar2;
  int iVar3;
  char *__s;
  char acStack_1020 [4100];
  
  if (param_1 == 200) {
    puts("HTTP/1.1 200 OK\r");
    iVar1 = sprintf(acStack_1020,PTR_s_<s:Envelope_xmlns:s__http:__sche_004303b8);
    if (param_4 == 0) {
      iVar2 = sprintf(acStack_1020 + iVar1,"<u:%sResponse xmlns:u=\"%s\" />\n",param_2,param_3)   //possible issue identified - semgrep
    }
    else {
      __s = acStack_1020 + iVar1;
      if (param_5 == 0) {
        iVar2 = sprintf(__s,"<u:%sResponse xmlns:u=\"%s\"><%s/></u:%sResponse>\n",param_2,param_3,
                        param_4,param_2)   //possible issue identified - semgrep
      }
      else {
        iVar2 = sprintf(__s,"<u:%sResponse xmlns:u=\"%s\"><%s>%s</%s></u:%sResponse>\n",param_2,
                        param_3,param_4,param_5,param_4,param_2)   //possible issue identified - semgrep
      }
    }
    iVar3 = sprintf(acStack_1020 + iVar2 + iVar1,PTR_s_<_s:Body>_<_s:Envelope>_004303b4)   //possible issue identified - semgrep
    iVar3 = iVar2 + iVar1 + iVar3;
  }
  else {
    puts("HTTP/1.1 500 Internal Server Error\r");
    iVar3 = sprintf(acStack_1020,PTR_s_<s:Envelope_xmlns:s__http:__sche_004303b0,param_1,
                    "Action Failed");
  }
  printf(PTR_s_Content_Type__text_xml__Content__004303bc,iVar3)   //possible issue identified - semgrep
  printf(acStack_1020)   //possible issue identified - semgrep
  return;
}