MiFlowThroughInsertNode
VOID __fastcall MiFlowThroughInsertNode(_MMINPAGE_SUPPORT *InPageSupport, _MMPFN *TransitionPfn){
unsigned __int16 v2;
_QWORD *v5;
__int64 v6;
_QWORD *v7;
unsigned int PagingFileOffset;
__int64 v9;
KIRQL v10;
_QWORD *v11;
_QWORD *v12;
bool v13;
unsigned __int64 v14;
unsigned __int64 v15;
_QWORD *v16;
__int64 v17;
v17 = *((_QWORD *)TransitionPfn + 2);
v2 = v17;
if( (v17 & 0x400) != 0 )
{
*((_QWORD *)InPageSupport + 42) = 0i64;
goto LABEL_3;
}
PagingFileOffset = MiGetPagingFileOffset((MMPTE *)&v17);
v9 = *(_QWORD *)(*(_QWORD *)(qword_140C4E388 + 8 * ((*((_QWORD *)TransitionPfn + 5) >> 39) & 0x3FFi64))
+ 8i64 * (v2 >> 12)
+ 6944);
*((_QWORD *)InPageSupport + 42) = v9;
*((_QWORD *)InPageSupport + 43) = PagingFileOffset;
v10 = ExAcquireSpinLockExclusive((PEX_SPIN_LOCK)(v9 + 232));
v11 = *(_QWORD **)(v9 + 240);
v12 = (_QWORD *)((char *)InPageSupport + 352);
v13 = 0;
v14 = v10;
if( !v11 )
goto LABEL_11;
v15 = *((_QWORD *)InPageSupport + 43);
while( v15 <= *(v11 - 1) && (v15 < *(v11 - 1) || v12 <= v11) )
{
v16 = (_QWORD *)*v11;
if( !*v11 )
goto LABEL_11;
LABEL_14:
v11 = v16;
}
v16 = (_QWORD *)v11[1];
if( v16 )
goto LABEL_14;
v13 = 1;
LABEL_11:
RtlAvlInsertNodeEx((unsigned __int64 *)(v9 + 240), (__int64)v11, v13, v12);
ExReleaseSpinLockExclusiveFromDpcLevel((INT64 *)(v9 + 232));
__writecr8(v14);
LABEL_3:
*((_DWORD *)InPageSupport + 48) |= 0x10u;
v5 = (_QWORD *)((char *)InPageSupport + 16);
v6 = *(_QWORD *)TransitionPfn - 32i64;
v7 = *(_QWORD **)(v6 + 24);
if( *v7 != v6 + 16 )
__fastfail(3u);
*v5 = v6 + 16;
*((_QWORD *)InPageSupport + 3) = v7;
*v7 = v5;
*(_QWORD *)(v6 + 24) = v5;
*((_QWORD *)InPageSupport + 41) = v6;
}Referenced by:
MiCopyFileOnlyGlobalSubsectionPage
MiCopyImageExtentContents
MiFinishMdlForMappedFileFault
MiResolvePageFileFault