ExpApplyPrewaitBoost

VOID __stdcall ExpApplyPrewaitBoost(){
  _ETHREAD *v0; 
  unsigned int v1; 
  _ERESOURCE *v2; 
  unsigned int v3; 
  UINT64 v4; 

  if( PsGetIoPriorityThread((_ETHREAD *)KeGetCurrentThread()) > IoPriorityLow
    && ((unsigned __int8)(v1 + 4) & v2->ReservedLowFlags) == 0 )
  {
    v1 += 4;
  }
  v3 = v1 | 2;
  if( (v2->ReservedLowFlags & 2) != 0 )
    v3 = v1;
  v4 = v3 | 0xFF00;
  if( v0->Tcb.Priority <= (int)v2->WaiterPriority )
    v4 = v3;
  if( (_DWORD)v4 )
    ExpApplyPriorityBoost(v2, v4, v0);
}

Referenced by:

ExAcquireResourceExclusiveLite
ExAcquireSharedWaitForExclusive
ExpAcquireSharedStarveExclusive