IopFilterResourceRequirementsCall

NTSTATUS __stdcall IopFilterResourceRequirementsCall(
        DEVICE_OBJECT *DeviceObject,
        IO_RESOURCE_REQUIREMENTS_LIST *ResReqList,
        PVOID *Information){
  DEVICE_OBJECT *AttachedDeviceReference; 
  IRP *Irp; 
  IRP *v7; 
  __int64 v8; 
  NTSTATUS v9; 
  __int128 v11; 
  struct _KEVENT Event; 
  memset(&Event, 0, sizeof(Event));
  v11 = 0i64;
  AttachedDeviceReference = IoGetAttachedDeviceReference(DeviceObject);
  Irp = IoAllocateIrp(*((_BYTE *)AttachedDeviceReference + 76), 0);
  v7 = Irp;
  if( Irp )
  {
    IovUtilWatermarkIrp(Irp, 1ui64);
    if( ResReqList )
    {
      *((_DWORD *)v7 + 12) = 0;
      *((_QWORD *)&v11 + 1) = ResReqList;
      *((_QWORD *)v7 + 7) = ResReqList;
    }
    else
    {
      LODWORD(v11) = -1073741637;
      *((_DWORD *)v7 + 12) = -1073741637;
    }
    KeInitializeEvent(&Event, SynchronizationEvent, 0);
    *((_QWORD *)v7 + 9) = &v11;
    *((_QWORD *)v7 + 10) = &Event;
    *((_QWORD *)v7 + 19) = KeGetCurrentThread();
    IopQueueThreadIrp(v7);
    v8 = *((_QWORD *)v7 + 23);
    *(_WORD *)(v8 - 72) = 3355;
    *(_QWORD *)(v8 - 64) = ResReqList;
    v9 = IofCallDriver(AttachedDeviceReference, v7);
    if( v9 == 259 )
    {
      KeWaitForSingleObject(&Event, Executive, 0, 0, 0i64);
      v9 = v11;
    }
    *Information = (PVOID)*((_QWORD *)&v11 + 1);
  }
  else
  {
    v9 = -1073741670;
  }
  HalPutDmaAdapter((PADAPTER_OBJECT)AttachedDeviceReference);
  return v9;
}

Referenced by:

IopQueryDeviceResources