undefined4
FUN_00409800(undefined4 param_1,int param_2,undefined4 param_3,undefined4 param_4,int param_5)

{
  int *__s;
  undefined4 uVar1;
  undefined4 *__s_00;
  undefined4 *puVar2;
  undefined4 *puVar3;
  int *piVar4;
  
  __s = (int *)malloc(0x24)   //possible issue identified - semgrep
  uVar1 = 0xffffffff;
  if (__s != (int *)0x0) {
    memset(__s,0,0x24)   //possible issue identified - semgrep
    piVar4 = __s + 3;
    __s[2] = 5;
    __s[4] = (int)piVar4;
    __s[3] = (int)piVar4;
    __s_00 = (undefined4 *)malloc(0x20)   //possible issue identified - semgrep
    if (__s_00 == (undefined4 *)0x0) {
      free(__s);
      uVar1 = 0xffffffff;
    }
    else {
      memset(__s_00,0,0x20)   //possible issue identified - semgrep
      if (param_5 == 0) {
        __s_00[2] = 0;
        uVar1 = sobj_strdup(param_4);
        __s_00[3] = uVar1;
      }
      else {
        __s_00[2] = 1;
        uVar1 = sobj_strdup(param_4);
        __s_00[3] = uVar1;
        __s_00[4] = param_3;
      }
      puVar2 = (undefined4 *)__s[4];
      puVar3 = *(undefined4 **)(param_2 + 4);
      *__s_00 = piVar4;
      __s_00[1] = puVar2;
      *puVar2 = __s_00;
      __s[4] = (int)__s_00;
      *__s = param_2;
      *(int **)(param_2 + 4) = __s;
      *puVar3 = __s;
      __s[1] = (int)puVar3;
      uVar1 = 0;
    }
  }
  return uVar1;
}