MiQueuePageFileExtension

VOID __fastcall MiQueuePageFileExtension(_MMPAGE_FILE_EXPANSION *PageExtend, UINT64 SemaphoreFlags){
  KIRQL v2; 
  __int64 v3; 
  KIRQL v4; 
  _QWORD *v6; 
  _QWORD *v7; 
  _QWORD *v8; 
  UINT64 v9; 
  v3 = *((_QWORD *)PageExtend + 3);
  v4 = v2;
  if( v2 == 17 )
    v4 = ExAcquireSpinLockExclusive((PEX_SPIN_LOCK)(v3 + 1344));
  v6 = (_QWORD *)((char *)PageExtend + 8);
  if( (*((_BYTE *)PageExtend + 79) & 8) != 0 )
  {
    v7 = *(_QWORD **)(v3 + 1576);
    if( *v7 == v3 + 1568 )
    {
      *v6 = v3 + 1568;
      *((_QWORD *)PageExtend + 2) = v7;
      *v7 = v6;
      *(_QWORD *)(v3 + 1576) = v6;
      goto LABEL_10;
    }
LABEL_7:
    __fastfail(3u);
  }
  v8 = *(_QWORD **)(v3 + 1592);
  if( *v8 != v3 + 1584 )
    goto LABEL_7;
  *v6 = v3 + 1584;
  *((_QWORD *)PageExtend + 2) = v8;
  *v8 = v6;
  *(_QWORD *)(v3 + 1592) = v6;
  if( *((_QWORD *)PageExtend + 4) != -1i64 )
    ++*(_DWORD *)(v3 + 1868);
LABEL_10:
  ExReleaseSpinLockExclusiveFromDpcLevel((INT64 *)(v3 + 1344));
  __writecr8(v4);
  KeReleaseSemaphoreEx((KSEMAPHORE *)(v3 + 1520), 0i64, 1i64, v9);
}

Referenced by:

MiContractPagingFiles
MiContractWsSwapPageFileWorker
MiIssuePageExtendRequest