MiDoesDriverProvideImportsForDriver

NTSTATUS __stdcall MiDoesDriverProvideImportsForDriver(INT64 a1, INT64 a2){
  unsigned __int64 v2; 
  __int64 v3; 
  int v4; 
  unsigned __int64 v5; 
  _QWORD *v6; 
  unsigned __int64 v7; 
  UINT64 Size; 

  v2 = *(_QWORD *)(a1 + 48);
  v3 = *(unsigned int *)(a1 + 64);
  v4 = 0;
  LODWORD(Size) = 0;
  v5 = v2 + v3;
  v6 = RtlImageDirectoryEntryToData(*(VOID **)(a2 + 48), 1u, 0xCu, &Size);
  if( !v6 || !((unsigned int)Size >> 3) )
    return 0;
  while( 1 )
  {
    v7 = v6[v4];
    if( v7 >= v2 && v7 < v5 )
      break;
    if( ++v4 >= (unsigned int)Size >> 3 )
      return 0;
  }
  return 1;
}

Referenced by:

MiImportOptimizationCompatibleWithDriverRelocation