IoStartPacket

VOID __stdcall IoStartPacket(PDEVICE_OBJECT DeviceObject, PIRP Irp, PULONG Key, PDRIVER_CANCEL CancelFunction){
  unsigned __int8 v8; 
  unsigned __int8 CurrentIrql; 
  struct {$817F037CBF4C641BBFB4CCB9AE79FC42 ___u0;_ETHREAD *Thread;char *AuxiliaryBuffer;_LIST_ENTRY ListEntry;$53AF3F349F2CB9475F75F7184FEA4434 ___u4;_FILE_OBJECT *OriginalFileObject;void *IrpExtension;} *p_Tail; 
  _KDEVICE_QUEUE *p_DeviceQueue; 
  INT8 v12; 

  v8 = 0;
  CurrentIrql = KeGetCurrentIrql();
  __writecr8(2ui64);
  if( CancelFunction )
  {
    v8 = KeAcquireQueuedSpinLock(7i64, (INT64)Irp, (INT64)Key);
    Irp->CancelRoutine = CancelFunction;
  }
  p_Tail = &Irp->Tail;
  p_DeviceQueue = &DeviceObject->DeviceQueue;
  if( Key )
    v12 = KeInsertByKeyDeviceQueue((INT64)p_DeviceQueue, (INT64)p_Tail, *Key);
  else
    KeInsertDeviceQueue(p_DeviceQueue, &p_Tail->DeviceQueueEntry);
  if( v12 )
  {
    if( CancelFunction )
    {
      if( Irp->Cancel )
      {
        Irp->CancelRoutine = 0i64;
        Irp->CancelIrql = v8;
        CancelFunction(DeviceObject, Irp);
      }
      else
      {
        KeReleaseQueuedSpinLock(LockQueueIoCancelLock, v8);
      }
    }
  }
  else
  {
    DeviceObject->CurrentIrp = Irp;
    if( CancelFunction )
    {
      if( (DeviceObject->DeviceObjectExtension->StartIoFlags & 0x200) != 0 )
        Irp->CancelRoutine = 0i64;
      KeReleaseQueuedSpinLock(LockQueueIoCancelLock, v8);
    }
    DeviceObject->DriverObject->DriverStartIo(DeviceObject, Irp);
  }
  __writecr8(CurrentIrql);
}

Referenced by:

No references.