MiGetVadWakeList

__int64 *__fastcall MiGetVadWakeList(__int64 a1, int a2){
  __int64 **v2; 
  __int64 *v3; 
  __int64 v5; 
  LONG *v6; 
  UINT8 CurrentIrql; 
  __int64 *v8; 
  __int64 *v10; 
  v2 = (__int64 **)(a1 + 56);
  v3 = 0i64;
  v5 = *((_QWORD *)KeGetCurrentThread() + 23);
  if( (*(_BYTE *)(v5 + 1848) & 7) == 2 )
    v6 = &dword_140C4F4C0;
  else
    v6 = (LONG *)(v5 + 1856);
  CurrentIrql = KeGetCurrentIrql();
  __writecr8(2ui64);
  ExpAcquireSpinLockExclusive((INT64 *)v6, CurrentIrql);
  v6[1] = 0;
  v8 = *v2;
  if( *v2 )
  {
    do
    {
      v10 = (__int64 *)*v8;
      if( (a2 & (_DWORD)v8[8]) != 0 )
      {
        *v8 = (__int64)v3;
        v3 = v8;
        *v2 = v10;
      }
      else
      {
        v2 = (__int64 **)v8;
      }
      v8 = v10;
    }
    while( v10 );
  }
  MiUnlockWorkingSetExclusive(v5 + 1664, CurrentIrql);
  return v3;
}

Referenced by:

MiDeletePartialCloneVads
MiFreePlaceholderStorage
MiFreeRotateView
MiFreeVadEventBitmap
MiReleaseVadEventBlocks