MiReleasePartitionHugeIoSpace
NTSTATUS __stdcall MiReleasePartitionHugeIoSpace(PVOID BugCheckParameter2){
INT64 v1;
__int64 v3;
__int64 v4;
__int64 **v5;
__int64 *v6;
_QWORD **v7;
_QWORD *v8;
bool v9;
_QWORD *v10;
ULONG_PTR v11;
ULONG_PTR BugCheckParameter4;
INT64 a6;
struct _KLOCK_QUEUE_HANDLE LockHandle;
v1 = *((_QWORD *)BugCheckParameter2 + 771) << 18;
memset(&LockHandle, 0, sizeof(LockHandle));
v3 = *((_QWORD *)BugCheckParameter2 + 22);
v4 = **(_QWORD **)(v3 + 56);
if( v1 )
{
LODWORD(a6) = 1;
LODWORD(BugCheckParameter4) = 769;
LODWORD(v3) = MiAllocatePartitionPhysicalPages(
(_MI_PARTITION *)BugCheckParameter2,
(_MI_PARTITION *)v4,
v1,
0i64,
BugCheckParameter4,
a6);
}
v5 = (__int64 **)((char *)BugCheckParameter2 + 4896);
if( *((_QWORD *)BugCheckParameter2 + 612) )
{
KeAcquireInStackQueuedSpinLock((UINT64 *)(v4 + 4128), &LockHandle);
v6 = *v5;
if( !*v5 )
goto LABEL_14;
v7 = (_QWORD **)(v4 + 4896);
while( 1 )
{
RtlAvlRemoveNode((unsigned __int64 *)BugCheckParameter2 + 612, v6);
v8 = *v7;
v9 = 0;
if( !*v7 )
goto LABEL_13;
while( (v6[3] & 0x3FFFFui64) < (v8[3] & 0x3FFFFui64) )
{
v10 = (_QWORD *)*v8;
if( !*v8 )
goto LABEL_13;
LABEL_11:
v8 = v10;
}
v10 = (_QWORD *)v8[1];
if( v10 )
goto LABEL_11;
v9 = 1;
LABEL_13:
RtlAvlInsertNodeEx((unsigned __int64 *)(v4 + 4896), (__int64)v8, v9, v6);
--*((_QWORD *)BugCheckParameter2 + 53);
++*(_QWORD *)(v4 + 424);
v6 = *v5;
if( !*v5 )
{
LABEL_14:
KeReleaseInStackQueuedSpinLock(&LockHandle);
break;
}
}
}
v11 = *((_QWORD *)BugCheckParameter2 + 53);
if( v11 )
KeBugCheckEx(0x1Au, 0x30000003ui64, (ULONG_PTR)BugCheckParameter2, v11, *((_QWORD *)BugCheckParameter2 + 771));
return v3;
}Referenced by:
MiReturnPartitionPagesToParent