PiControlAllocateBufferForUserModeCaller

NTSTATUS __stdcall PiControlAllocateBufferForUserModeCaller(VOID **Dest, UINT64 Size, INT8 CallerMode, VOID *Src){
  size_t v6; 
  VOID *PoolWithQuotaTag; 

  if( !(_DWORD)Size )
  {
    *Dest = 0i64;
    return 0;
  }
  if( !CallerMode )
  {
    *Dest = Src;
    return 0;
  }
  v6 = Size;
  PoolWithQuotaTag = ExAllocatePoolWithQuotaTag((POOL_TYPE)9, (unsigned int)Size, 0x20207050ui64);
  *Dest = PoolWithQuotaTag;
  if( PoolWithQuotaTag )
  {
    memset(PoolWithQuotaTag, 0i64, v6);
    return 0;
  }
  return -1073741670;
}

Referenced by:

PiControlGetPropertyData
PiControlGetRelatedDevice
PiControlQueryAndRemoveDevice
PiControlQueryConflictList
PiControlQueryDeviceRelations