PfpQueryGpuUtilization

INT64 __fastcall PfpQueryGpuUtilization(__int64 a1, char a2, _DWORD *a3){
  INT64 result; 
  UINT64 v6; 
  __int128 v7; 
  v7 = 0i64;
  if( *(_DWORD *)(a1 + 24) < 0x10u )
    return 3221225990i64;
  if( a2 )
    ProbeForWrite(*(VOID **)(a1 + 16), 0x10ui64, 8ui64);
  v7 = *(_OWORD *)*(_QWORD *)(a1 + 16);
  if( (_DWORD)v7 != 1 )
    return 3221225561i64;
  LODWORD(v6) = DWORD1(v7);
  if( DWORD1(v7) == -1 )
    LODWORD(v6) = MmGetSessionIdEx(*((_QWORD *)KeGetCurrentThread() + 23));
  result = PsInvokeWin32Callout(25i64, (char *)&v7 + 8, 1i64, &v6);
  if( (int)result >= 0 )
  {
    *(_OWORD *)*(_QWORD *)(a1 + 16) = v7;
    *a3 = 16;
    return 0i64;
  }
  return result;
}

Referenced by:

PfQuerySuperfetchInformation