IoAllocateController

VOID __stdcall IoAllocateController(
        PCONTROLLER_OBJECT ControllerObject,
        PDEVICE_OBJECT DeviceObject,
        PDRIVER_CONTROL ExecutionRoutine,
        PVOID Context){
  *((_QWORD *)DeviceObject + 13) = ExecutionRoutine;
  *((_QWORD *)DeviceObject + 14) = Context;
  if( !KeInsertDeviceQueue(&ControllerObject->DeviceWaitQueue, (_KDEVICE_QUEUE_ENTRY *)((char *)DeviceObject + 80))
    && ((unsigned int(__fastcall *)(PDEVICE_OBJECT, _QWORD, _QWORD, PVOID))ExecutionRoutine)(
         DeviceObject,
         *((_QWORD *)DeviceObject + 4),
         0i64,
         Context) == 2 )
  {
    IoFreeController(ControllerObject);
  }
}

Referenced by:

No references.