IoPerfReset

NTSTATUS __stdcall IoPerfReset(UINT64 Flags){
  char v1; 
  _KLOCK_QUEUE_HANDLE LockHandle; 

  v1 = Flags;
  memset(&LockHandle, 0, sizeof(LockHandle));
  KeAcquireInStackQueuedSpinLock((PKSPIN_LOCK)&stru_140C452E0 + 213, &LockHandle);
  if( (v1 & 1) != 0 && !--dword_140CF50A4 )
    IopPerfStatus &= ~1u;
  if( (v1 & 2) != 0 && !--dword_140CF50A8 )
    IopPerfStatus &= ~2u;
  if( !IopPerfStatus )
    IopUpdateFunctionPointers(2ui64, 0, 1u);
  KeReleaseInStackQueuedSpinLockFromDpcLevel(&LockHandle);
  __writecr8(LockHandle.OldIrql);
  return 0;
}

Referenced by:

EtwpDisableKernelTrace
IoUnregisterIoTracking