void FUN_00402480(int param_1,int param_2,void *param_3,void *param_4,ushort param_5,short param_6)

{
  undefined1 uVar1;
  undefined1 *puVar2;
  size_t __n;
  undefined1 uStack_1f;
  undefined4 local_1c [2];
  
  local_1c[0] = 0;
  puVar2 = (undefined1 *)((int)param_3 + param_2);
  __n = (size_t)param_5;
  memcpy(param_3,(void *)(param_1 + 0xc),param_2 + 4)   //possible issue identified - semgrep
  local_1c[0] = 0x1e000000;
  memcpy(puVar2 + 4,local_1c,4)   //possible issue identified - semgrep
  if (__n == 0) {
    if (param_6 == 1) {
      puVar2[1] = 1;
      *puVar2 = 0;
      __n = 4   //possible issue identified - semgrep
    }
    else {
      uVar1 = (undefined1)(param_5 >> 8);
      if (param_6 != 0x1c) goto LAB_00402544;
      puVar2[1] = 0x1c;
      *puVar2 = 0;
      __n = 0x10   //possible issue identified - semgrep
    }
  }
  uVar1 = (undefined1)(__n >> 8);
LAB_00402544:
  puVar2[8] = uVar1;
  uStack_1f = (undefined1)__n;
  puVar2[9] = uStack_1f;
  memcpy(puVar2 + 10,param_4,__n)   //possible issue identified - semgrep
  return;
}