MiUnlockEntireDriver

VOID __stdcall MiUnlockEntireDriver(UINT64 *a1, INT64 a2){
  _MMPTE *PteAddress; 
  UINT64 v5; 
  _KTBFLUSH_TYPE v6; 

  if( a2 )
  {
    if( (*(_BYTE *)(a2 + 10) & 1) != 0 )
    {
      PteAddress = MiGetPteAddress(*(VOID **)(a2 + 24));
      MiReleasePtes((_MI_SYSTEM_PTE_TYPE *)((char *)&stru_140C4DB30 + 4432), PteAddress, v5, v6);
      *(_WORD *)(a2 + 10) &= ~1u;
    }
    IoFreeMdl((PMDL)a2);
  }
  MiUnlockDriverPages(a1);
}

Referenced by:

MmRemoveImportOptimizationForDriverVerifier