EtwGetKernelTraceTimestampSilo

_LARGE_INTEGER __stdcall EtwGetKernelTraceTimestampSilo(_LARGE_INTEGER *a1, UINT64 a2, INT64 a3){
  int v3; 
  INT64 *v5; 
  INT64 v6; 
  unsigned int v7; 
  unsigned int v9; 
  __int64 v10; 
  __int64 v11; 
  LONGLONG PerformanceCounter; 
  _LARGE_INTEGER result; 
  _LARGE_INTEGER v14; 

  v3 = 0;
  if( a3 )
    v5 = *(INT64 **)(a3 + 1272);
  else
    v5 = &PspHostSiloGlobals;
  v6 = v5[108];
  if( v6 )
  {
    v7 = *(_DWORD *)(v6 + 4224);
    while( _BitScanForward(&v9, v7) )
    {
      v10 = v9;
      v7 &= v7 - 1;
      v11 = 32i64 * v9 + v6 + 4260;
      if( v11 )
      {
        if( ((unsigned int)a2 & *(_DWORD *)(v11 + 4 * ((unsigned __int64)(unsigned int)a2 >> 29)) & 0x1FFFFFFF) != 0 )
          v3 |= 1 << *(_BYTE *)(v6 + 2 * v10 + 4209);
      }
    }
  }
  else
  {
    LOBYTE(v3) = 30;
  }
  if( (v3 & 2) != 0 )
    PerformanceCounter = KeQueryPerformanceCounter(0i64);
  else
    PerformanceCounter = 0i64;
  a1->QuadPart = PerformanceCounter;
  if( (v3 & 4) != 0 )
    result.anonymous_0.LowPart = RtlGetSystemTimePrecise();
  else
    result.QuadPart = 0i64;
  a1[1] = result;
  if( (v3 & 8) != 0 )
  {
    result.QuadPart = __rdtsc();
    a1[2] = result;
  }
  else
  {
    a1[2].QuadPart = 0i64;
  }
  if( (v3 & 0x10) != 0 )
  {
    v14.QuadPart = 0i64;
    ((void(__fastcall *)(_LARGE_INTEGER *))off_140C009E0[0])(&v14);
    result = v14;
    a1[3] = v14;
  }
  else
  {
    a1[3].QuadPart = 0i64;
  }
  return result;
}

Referenced by:

No references.