ViGetAdapterInformationInternal

LIST_ENTRY *__fastcall ViGetAdapterInformationInternal(DMA_ADAPTER *DmaAdapter, INT64 VerifyActive){
  char v2; 
  _LIST_ENTRY *Param3; 
  unsigned __int8 v5; 
  unsigned __int64 v6; 
  UINT64 v8; 
  v2 = VerifyActive;
  if( !DmaAdapter )
    return 0i64;
  if( KeGetCurrentIrql() > 2u )
  {
    if( ViVerifyDma )
      VF_ASSERT_MAX_IRQL((UINT8)DmaAdapter);
    return 0i64;
  }
  if( !ViVerifyDma && ViEnableAfterHibernate == 1 )
    return 0i64;
  KeAcquireSpinLockRaiseToDpc(&qword_140D49088, VerifyActive);
  Param3 = ViAdapterList.Flink;
  v6 = v5;
  while( 1 )
  {
    if( &ViAdapterList == Param3 )
    {
      KxReleaseSpinLock(&qword_140D49088);
      __writecr8(v6);
      return 0i64;
    }
    if( DmaAdapter == (DMA_ADAPTER *)Param3[1].Flink )
      break;
    Param3 = Param3->Flink;
  }
  KxReleaseSpinLock(&qword_140D49088);
  __writecr8(v6);
  if( v2 && SHIDWORD(Param3[2].Flink) <= 0 )
  {
    ViHalPreprocessOptions(
      &dword_140C12D34,
      (PSTR)"Driver has attempted to access an adapter(%p) that has already been released",
      0x18ui64,
      (UINT64)DmaAdapter,
      (UINT64)Param3,
      0i64,
      v8);
    VfReportIssueWithOptions(0xE6ui64, 0x18ui64, (UINT64)DmaAdapter, (UINT64)Param3, 0i64, &dword_140C12D34);
  }
  return Param3;
}

Referenced by:

VfAllocateAdapterChannel
VfAllocateAdapterChannelEx
VfAllocateCommonBuffer
VfAllocateCommonBufferEx
VfAllocateCommonBufferWithBounds
VfAllocateCrashDumpRegisters
VfBuildMdlFromScatterGatherList
VfBuildScatterGatherList
VfBuildScatterGatherListEx
VfCancelAdapterChannel
VfFlushAdapterBuffers
VfFlushAdapterBuffersEx
VfFreeAdapterChannel
VfFreeAdapterObject
VfFreeCommonBuffer
VfFreeMapRegisters
VfGetScatterGatherList
VfGetScatterGatherListEx
VfHalAllocateMapRegisters
VfMapTransfer
VfMapTransferEx
VfPutScatterGatherList
ViGetRealDmaOperation
ViHookDmaAdapter