TtmNotifySessionPowerStateChange

VOID __stdcall TtmNotifySessionPowerStateChange(UINT64 SessionId, UINT8 On){
  int v3; 
  __int64 v4; 
  int v5; 
  unsigned int v6; 
  __int64 v7; 
  v7 = 0i64;
  v3 = TtmpAcquireSessionById(&v7, SessionId);
  if( v3 < 0 )
  {
    TtmiLogError((PSTR)"TtmNotifySessionPowerStateChange", 3215i64, (unsigned int)v3, 0xFFFFFFFFi64);
    return;
  }
  TtmiLogSessionPowerStateChange(On);
  v4 = v7;
  v5 = *(_DWORD *)(v7 + 4);
  if( On )
  {
    if( (v5 & 0x80u) != 0 )
    {
      v6 = v5 & 0xFFFFFB7F;
      goto LABEL_8;
    }
  }
  else if( (v5 & 0x40) != 0 )
  {
    v6 = v5 & 0xFFFFFBBF | 0x400;
LABEL_8:
    *(_DWORD *)(v7 + 4) = v6;
    TtmiScheduleSessionWorker(v4, 4);
  }
  ExReleaseResourceLite(&TtmpSessionLock);
  KeLeaveCriticalRegion();
}

Referenced by:

PopPowerInformationInternal