MiPrefetchControlArea
NTSTATUS __stdcall MiPrefetchControlArea(
_CONTROL_AREA *ControlArea,
_LARGE_INTEGER FileOffset,
UINT64 NumberOfBytes,
UINT64 DesiredPriority,
UINT64 ReadListFlags,
UINT64 SessionId){
_ETHREAD *CurrentThread;
int v7;
NTSTATUS v8;
UINT64 v9;
_MI_READ_LIST *v10;
CHAR v11;
UINT64 v13;
_MI_READ_LIST **v14;
_MI_READ_LIST *ReadList;
ReadList = 0i64;
CurrentThread = (_ETHREAD *)KeGetCurrentThread();
--CurrentThread->Tcb.KernelApcDisable;
LODWORD(v14) = SessionId;
LODWORD(v13) = DesiredPriority;
v7 = MiPfPrepareSequentialReadList(0i64, ControlArea, FileOffset, 0i64, NumberOfBytes, v13, v14, &ReadList);
if( v7 >= 0 && ReadList )
{
++CurrentThread->ActiveFaultCount;
ReadList[26] = 0;
v8 = MiPfPutPagesInTransition(ReadList, 0i64);
v10 = ReadList;
v7 = v8;
if( v8 >= 0 && *((_MI_READ_LIST **)ReadList + 15) != ReadList + 30 )
{
MiPfExecuteReadList(ReadList, (unsigned int)ReadListFlags, (unsigned int)SessionId, 0i64);
MiPfCompletePrefetchIos((_LIST_ENTRY *)(ReadList + 30), 0i64, 0i64, v11);
v10 = ReadList;
}
MiReleaseReadListResources(v10, v9);
KeLeaveCriticalRegionThread(&CurrentThread->Tcb);
--CurrentThread->ActiveFaultCount;
ExFreePoolWithTag(ReadList, 0);
}
else
{
KeLeaveCriticalRegionThread(&CurrentThread->Tcb);
}
return v7;
}Referenced by:
MiLoadSectionIntoVsmEnclave
MiSetPagesModified
MiValidateSectionCreate
MiWalkEntireImage