void FUN_0040411c(char *param_1,int param_2,ulong *param_3)

{
  size_t sVar1;
  char *__dest;
  ulong uVar2;
  
  if (param_2 == 1) {
    uVar2 = strtoul(param_1,(char **)0x0,0);
    *(char *)param_3 = (char)uVar2;
  }
  else if (param_2 < 2) {
    if (param_2 == 0) {
      if (*param_3 != 0) {
        xfree();
      }
      sVar1 = strlen(param_1);
      __dest = (char *)xmalloc(sVar1 + 1)   //possible issue identified - semgrep
      *param_3 = (ulong)__dest;
                    /* WARNING: Could not recover jumptable at 0x004041f0. Too many branches */
                    /* WARNING: Treating indirect jump as call */
      strcpy(__dest,param_1)   //possible issue identified - semgrep
      return;
    }
  }
  else if (param_2 == 2) {
    uVar2 = strtoul(param_1,(char **)0x0,0);
    *(short *)param_3 = (short)uVar2;
  }
  else if (param_2 == 3) {
    uVar2 = strtoul(param_1,(char **)0x0,0);
    *param_3 = uVar2;
  }
  return;
}