MmLocateUnloadedDriver

UNICODE_STRING *__stdcall MmLocateUnloadedDriver(PVOID VirtualAddress){
  int v1; 
  UNICODE_STRING *result; 
  if( !MmUnloadedDrivers )
    return 0i64;
  v1 = 0;
  if( !MmLastUnloadedDriver )
    return 0i64;
  while( 1 )
  {
    result = (UNICODE_STRING *)((char *)MmUnloadedDrivers + 40 * (unsigned int)(MmLastUnloadedDriver - v1 - 1));
    if( result->Buffer )
    {
      if( (unsigned __int64)VirtualAddress >= *(_QWORD *)&result[1].Length && VirtualAddress < result[1].Buffer )
        break;
    }
    if( ++v1 >= (unsigned int)MmLastUnloadedDriver )
      return 0i64;
  }
  return result;
}

Referenced by:

KeBugCheck2
KiDumpParameterImages