MmDiscardDriverSection

VOID __fastcall MmDiscardDriverSection(VOID *AddressWithinSection){
  INT64 v1; 
  _QWORD *v3; 
  PVOID v4; 
  char *v5; 
  _ETHREAD *Lock; 
  char *v7; 
  char *v8; 
  v8 = 0i64;
  v7 = 0i64;
  v3 = (_QWORD *)MiLookupDataTableEntry((unsigned __int64)AddressWithinSection, 1i64, v1);
  v4 = (PVOID)v3[6];
  if( !(unsigned int)MI_IS_PHYSICAL_ADDRESS(v4) || v4 == (PVOID)PsNtosImageBase || v4 == PsHalImageBase )
  {
    MiSnapDriverRange((__int64)v3, 0, 0, (__int64)AddressWithinSection, &v7, &v8);
    v5 = v7;
    if( v7 )
    {
      Lock = MmAcquireLoadLock();
      MiFreeInitializationCode(v3, (unsigned __int64)v5, (__int64)v8, 0);
      MmReleaseLoadLock(Lock);
    }
  }
}

Referenced by:

KeFreeInitializationCode