IoAllocateIrpEx

_IRP *__stdcall IoAllocateIrpEx(_DEVICE_OBJECT *DeviceObject, INT8 StackSize, UINT8 ChargeQuota){
  VOID *retaddr; 

  if( !IopDispatchAllocateIrp )
    return IopAllocateIrpPrivate(DeviceObject, StackSize, ChargeQuota, retaddr);
  if( IopDispatchAllocateIrp == 2 )
    return IopAllocateIrpWithExtension(DeviceObject, StackSize, ChargeQuota, retaddr);
  return IovAllocateIrp(DeviceObject, StackSize, ChargeQuota, retaddr);
}

Referenced by:

FsRtlGetDirectImageOriginalBase
FsRtlGetFileExtents
FsRtlGetFileSize
FsRtlKernelFsControlFile
FsRtlQueryInformationFile
FsRtlQueryKernelEaFile
FsRtlSetFileSize
FsRtlSetKernelEaFile
VfIrpSendSynchronousIrp