MiPrefetchControlArea

INT64 __fastcall MiPrefetchControlArea(INT64 a1, UINT64 a2, UINT64 r8_0, UINT64 a4, INT64 a5, UINT64 a3){
  _ETHREAD *CurrentThread; 
  int List; 
  __int64 v8; 
  void *v9; 
  int v10; 
  unsigned int v12; 
  UINT64 v13; 
  int v14; 
  UINT64 v15; 
  void *P[3]; 
  P[0] = 0i64;
  CurrentThread = (_ETHREAD *)KeGetCurrentThread();
  --*((_WORD *)CurrentThread + 242);
  LODWORD(v15) = a3;
  LODWORD(v13) = a4;
  List = MiPfPrepareSequentialReadList(0i64, a1, a2, 0i64, r8_0, v13, v15, (INT64 *)P);
  if( List >= 0 && P[0] )
  {
    ++*((_BYTE *)CurrentThread + 1310);
    *((_DWORD *)P[0] + 26) = 0;
    MiPfPutPagesInTransition((INT64)P[0], 0i64, a5, v8, (const char *__ptr32)v12, v14);
    v9 = P[0];
    List = v10;
    if( v10 >= 0 && *((void **)P[0] + 15) != (char *)P[0] + 120 )
    {
      MiPfExecuteReadList((INT64)P[0], a5, (unsigned int)a3, 0i64);
      MiPfCompletePrefetchIos((_LIST_ENTRY *)((char *)P[0] + 120), 0i64, 0i64);
      v9 = P[0];
    }
    MiReleaseReadListResources((INT64)v9);
    KeLeaveCriticalRegionThread((__int64)CurrentThread);
    --*((_BYTE *)CurrentThread + 1310);
    ExFreePoolWithTag(P[0], 0);
  }
  else
  {
    KeLeaveCriticalRegionThread((__int64)CurrentThread);
  }
  return(unsigned int)List;
}

Referenced by:

MiLoadSectionIntoVsmEnclave
MiSetPagesModified
MiValidateSectionCreate
MiWalkEntireImage