MdlInvariantPostProcessing1
VOID __fastcall MdlInvariantPostProcessing1(INT64 a1, UINT64 a2, CHAR *a3){
_MMPTE *v3;
__int64 v5;
__int64 v6;
CHAR *v7;
char v9;
__int64 v10;
_QWORD *MdlInfo;
__int64 v12;
char *v13;
__int64 v14;
__int64 v15;
unsigned __int64 v16;
CHAR v17;
unsigned __int64 v18;
UINT64 v19;
UINT64 BugCheckOnFailure;
_MMPFN **Priority;
UINT64 Prioritya;
v5 = 0i64;
v6 = *(_QWORD *)(a2 + 8);
v7 = a3;
if( *(_QWORD *)v6 || KeGetCurrentIrql() < 2u && *(_DWORD *)(v6 + 40) == -1 )
return;
v9 = *(_BYTE *)(a2 + 67);
LOBYTE(a3) = *(_BYTE *)(a2 + 66);
if( (MmVerifierData & 0x2000) != 0 && (MmVerifierData & 0x4000) == 0 && v9 != (_BYTE)a3 )
return;
if( (unsigned int)MmMdlPageContentsState((_MMPFN *)v6, (_MMPTE *)2, (UINT64)a3, v3, BugCheckOnFailure, Priority) != 1 )
return;
v10 = *(_QWORD *)(a1 + 224);
if( v10 )
*(_QWORD *)(v10 + 16) = *(_QWORD *)(a2 + 8);
MdlInfo = MdlInvariantFindMdlInfo(a1, *(_QWORD *)(a2 + 8));
if( !MdlInfo && *v7 == 4 )
return;
v13 = (*(_BYTE *)(v12 + 10) & 5) != 0 ? *(char **)(v12 + 24) : (char *)MmMapLockedPagesSpecifyCache(
(PMDL)v12,
0,
MmCached,
0i64,
0,
0x40000020u);
if( !v13 )
return;
if( !MdlInfo
|| (v14 = *((unsigned int *)MdlInfo + 6),
v15 = *(unsigned int *)(*(_QWORD *)(a2 + 8) + 40i64),
(_DWORD)v14 == (_DWORD)v15) )
{
v17 = *v7;
if( *v7 == 4 )
{
if( RtlpComputeCrcInternal(v13, *(unsigned int *)(*(_QWORD *)(a2 + 8) + 40i64), 0i64, (__int64)&Crc64Ctrl) != MdlInfo[1] )
{
v19 = 4112i64;
goto LABEL_25;
}
return;
}
}
else
{
v16 = MdlInfo[2];
if( (unsigned __int64)v13 < v16 || (unsigned __int64)&v13[v15] > v16 + v14 )
{
LOBYTE(v5) = *v7 != 4;
v19 = v5 + 4112;
goto LABEL_25;
}
v17 = *v7;
}
if( v17 == 3 && KeGetCurrentIrql() < 2u )
{
v18 = RtlpComputeCrcInternal(v13, *(unsigned int *)(*(_QWORD *)(a2 + 8) + 40i64), 0i64, (__int64)&Crc64Ctrl);
KeDelayExecutionThread(0, 0, (PLARGE_INTEGER)&IovMdlInvariant10Milliseconds);
if( v18 != RtlpComputeCrcInternal(v13, *(unsigned int *)(*(_QWORD *)(a2 + 8) + 40i64), 0i64, (__int64)&Crc64Ctrl) )
{
v19 = 4113i64;
LABEL_25:
VerifierBugCheckIfAppropriate(0xC4ui64, v19, *((_QWORD *)v7 + 5), a2, (UINT64)v13, Prioritya);
}
}
}Referenced by:
IovpCompleteRequest2