TtmpSessionPowerControl

VOID __stdcall TtmpSessionPowerControl(
        _TTMI_SESSION *LockedSession,
        UINT8 On,
        POWER_MONITOR_REQUEST_REASON RequestReason){
  unsigned int v3; 
  _ETHREAD *CurrentThread; 
  INT64 v8; 

  v3 = *LockedSession;
  TtmiLogSessionPowerControlStart(On, RequestReason);
  *((_QWORD *)LockedSession + 29) = 0i64;
  ExReleaseResourceLite(&TtmpSessionLock);
  KeLeaveCriticalRegion();
  PoSessionPowerControl(On, RequestReason, v3);
  CurrentThread = (_ETHREAD *)KeGetCurrentThread();
  --CurrentThread->Tcb.KernelApcDisable;
  ExAcquireResourceExclusiveLite((UINT64)&TtmpSessionLock, 1, v8);
  *((_QWORD *)LockedSession + 29) = KeGetCurrentThread();
  TtmiLogSessionPowerControlStop();
}

Referenced by:

TtmpActivateSessionWorker
TtmpDeactivateSessionWorker