PfSnQueryPrefetcherInformation
NTSTATUS __stdcall PfSnQueryPrefetcherInformation(
VOID *SystemInformation,
VOID *SystemInformationLength,
INT64 PreviousMode,
_KPROCESSOR_MODE Length,
UINT64 *Lengtha){
char v5;
int v6;
NTSTATUS v8;
_ETHREAD *CurrentThread;
char *v11;
_OWORD *v12;
__int64 v13;
__int64 v14;
__int64 v15;
_OWORD *v16;
char *v17;
__int128 v18;
__int128 Buffer;
char v20[416];
v5 = Length;
v6 = PreviousMode;
v8 = 0;
if( !SeSinglePrivilegeCheck(*(_QWORD *)&SeProfileSingleProcessPrivilege, Length) )
return -1073741790;
if( v6 != 32 )
{
v8 = -1073741820;
*(_DWORD *)Lengtha = 32;
return v8;
}
v18 = *(_OWORD *)SystemInformationLength;
Buffer = *((_OWORD *)SystemInformationLength + 1);
if( *(_QWORD *)SystemInformationLength != 0x6B75684300000001i64 )
return -1073741811;
if( DWORD2(v18) == 1 )
return PfSnGetCompletedTrace((VOID *)Buffer, DWORD2(Buffer), Lengtha);
if( DWORD2(v18) != 2 )
return -1073741821;
if( DWORD2(Buffer) != 408 )
return -1073741811;
CurrentThread = (_ETHREAD *)KeGetCurrentThread();
--CurrentThread->Tcb.KernelApcDisable;
ExAcquirePushLockSharedEx(&stru_140C4FFF8, 0i64);
v11 = v20;
v12 = (_OWORD *)((char *)&WaitTimeMax + 4);
v13 = 3i64;
v14 = 3i64;
do
{
*(_OWORD *)v11 = *v12;
*((_OWORD *)v11 + 1) = v12[1];
*((_OWORD *)v11 + 2) = v12[2];
*((_OWORD *)v11 + 3) = v12[3];
*((_OWORD *)v11 + 4) = v12[4];
*((_OWORD *)v11 + 5) = v12[5];
*((_OWORD *)v11 + 6) = v12[6];
v11 += 128;
*((_OWORD *)v11 - 1) = v12[7];
v12 += 8;
--v14;
}
while( v14 );
*(_OWORD *)v11 = *v12;
*((_QWORD *)v11 + 2) = *((_QWORD *)v12 + 2);
if( _InterlockedCompareExchange64(&stru_140C4FFF8._bf_0, 0i64, 17i64) != 17 )
ExfReleasePushLockShared(&stru_140C4FFF8);
KeAbPostRelease(&stru_140C4FFF8);
KeLeaveCriticalRegion();
if( v5 )
{
v15 = Buffer;
if( (Buffer & 7) != 0 )
ExRaiseDatatypeMisalignment();
if( (unsigned __int64)Buffer >= 0x7FFFFFFF0000i64 )
v15 = 0x7FFFFFFF0000i64;
*(_BYTE *)v15 = *(_BYTE *)v15;
*(_BYTE *)(v15 + 407) = *(_BYTE *)(v15 + 407);
}
v16 = (_OWORD *)Buffer;
v17 = v20;
do
{
*v16 = *(_OWORD *)v17;
v16[1] = *((_OWORD *)v17 + 1);
v16[2] = *((_OWORD *)v17 + 2);
v16[3] = *((_OWORD *)v17 + 3);
v16[4] = *((_OWORD *)v17 + 4);
v16[5] = *((_OWORD *)v17 + 5);
v16[6] = *((_OWORD *)v17 + 6);
v16 += 8;
*(v16 - 1) = *((_OWORD *)v17 + 7);
v17 += 128;
--v13;
}
while( v13 );
*v16 = *(_OWORD *)v17;
*((_QWORD *)v16 + 2) = *((_QWORD *)v17 + 2);
*(_DWORD *)Lengtha = 408;
return v8;
}Referenced by:
ExpQuerySystemInformation