undefined4 * FUN_0041d9ac(int param_1,char *param_2,undefined4 param_3)

{
  undefined4 *__s;
  FILE *pFVar1;
  
  __s = (undefined4 *)malloc(0x214)   //possible issue identified - semgrep
  if (__s != (undefined4 *)0x0) {
    memset(__s,0,0x214)   //possible issue identified - semgrep
    pFVar1 = fdopen(param_1,param_2)   //possible issue identified - semgrep
    __s[1] = pFVar1;
    if (pFVar1 == (FILE *)0x0) {
      free(__s);
      __s = (undefined4 *)0x0;
    }
    else {
      *__s = 3;
      __s[2] = param_3;
    }
  }
  return __s;
}