MmLockLoadedModuleListExclusive

VOID __stdcall MmLockLoadedModuleListExclusive(UINT8 *OldIrql){
  UINT8 CurrentIrql; 
  CurrentIrql = KeGetCurrentIrql();
  *OldIrql = CurrentIrql;
  if( CurrentIrql < 0xFu )
  {
    KeGetCurrentIrql();
    __writecr8(0xFui64);
  }
  ExAcquireSpinLockExclusiveAtDpcLevel((INT64 *)PsLoadedModuleSpinLock);
}

Referenced by:

MiProcessLoaderEntry
MiSessionInsertImage
MiSessionRemoveImage
MiShowBadMapper
PsDispatchIumService
RtlInsertInvertedFunctionTable
RtlRemoveInvertedFunctionTable