PfpUpdateRepurposedByPrefetch

UINT64 *__fastcall PfpUpdateRepurposedByPrefetch(__int64 a1, unsigned __int64 a2){
  UINT64 v4; 
  UINT64 PageListCount; 
  __int64 v6; 
  unsigned __int64 v7; 
  UINT64 *result; 
  __int128 v9; 
  __int128 v10; 
  __int128 v11; 
  __int128 v12; 
  __int128 v13; 
  __int128 v14; 
  __int128 v15; 
  _OWORD *v16; 
  __int128 v17; 
  __int128 v18; 
  UINT64 SystemInformationLength[22]; 

  memset(SystemInformationLength, 0i64, sizeof(SystemInformationLength));
  MmQueryMemoryListInformation((VOID *)0xFFFFFFFFFFFFFFFFi64, (UINT64)SystemInformationLength, (UINT64 *)0xB0);
  PfpGetPageListCount((UINT64 *)(a1 + 104), 0i64, 7ui64);
  PageListCount = PfpGetPageListCount(&SystemInformationLength[13], 0i64, v4);
  v7 = PageListCount - v6;
  if( v7 <= a2 )
    a2 = v7;
  if( a2 )
    _InterlockedExchangeAdd64(qword_140C50170, a2);
  result = SystemInformationLength;
  v9 = *(_OWORD *)&SystemInformationLength[2];
  *(_OWORD *)a1 = *(_OWORD *)SystemInformationLength;
  v10 = *(_OWORD *)&SystemInformationLength[4];
  *(_OWORD *)(a1 + 16) = v9;
  v11 = *(_OWORD *)&SystemInformationLength[6];
  *(_OWORD *)(a1 + 32) = v10;
  v12 = *(_OWORD *)&SystemInformationLength[8];
  *(_OWORD *)(a1 + 48) = v11;
  v13 = *(_OWORD *)&SystemInformationLength[10];
  *(_OWORD *)(a1 + 64) = v12;
  v14 = *(_OWORD *)&SystemInformationLength[12];
  *(_OWORD *)(a1 + 80) = v13;
  v15 = *(_OWORD *)&SystemInformationLength[16];
  *(_OWORD *)(a1 + 96) = v14;
  v16 = (_OWORD *)(a1 + 128);
  *(v16 - 1) = *(_OWORD *)&SystemInformationLength[14];
  v17 = *(_OWORD *)&SystemInformationLength[18];
  *v16 = v15;
  v18 = *(_OWORD *)&SystemInformationLength[20];
  v16[1] = v17;
  v16[2] = v18;
  return result;
}

Referenced by:

PfpPrefetchDirectoryStream
PfpPrefetchFilesTrickle
PfpPrefetchPrivatePages
PfpVolumePrefetchMetadata