MiFreeDriverInitialization

void __fastcall MiFreeDriverInitialization(__int64 a1){
  PVOID v1; 
  unsigned int v3; 
  char *v4; 
  char *v5; 
  v1 = *(PVOID *)(a1 + 48);
  v5 = 0i64;
  v4 = 0i64;
  if( (!(unsigned int)MI_IS_PHYSICAL_ADDRESS(v1) || v1 == (PVOID)PsNtosImageBase || v1 == PsHalImageBase)
    && (*(_DWORD *)(a1 + 104) & 0x800) == 0
    && (!dword_140CFA1D8 || v1 != (PVOID)PsNtosImageBase && v1 != PsHalImageBase) )
  {
    v3 = 0;
    do
    {
      v3 = MiSnapDriverRange(a1, v3, 2, 0i64, &v4, &v5);
      if( v4 )
        MiFreeInitializationCode((_QWORD *)a1, (unsigned __int64)v4, (__int64)v5, 0);
    }
    while( v3 );
  }
}

Referenced by:

IopLoadDriver
MiLoadImportDll
MmFreeBootDriverInitializationCode