PopDiagTraceZoneS4TripPointExceeded

VOID __stdcall PopDiagTraceZoneS4TripPointExceeded(_THERMAL_INFORMATION_EX *ThermalInfo, _DEVICE_OBJECT *DeviceObject){
  REGHANDLE v4; 
  _DEVICE_OBJECT *DeviceAttachmentBaseRefWithTag; 
  _DEVICE_OBJECT *v6; 
  void *DeviceNode; 

  if( PopDiagHandleRegistered )
  {
    v4 = PopDiagHandle;
    if( EtwEventEnabled(PopDiagHandle, &POP_ETW_EVENT_CRITICAL_TRIP_POINT_DIAGNOSTIC)
      || EtwEventEnabled(v4, &POP_ETW_EVENT_CRITICAL_TRIP_POINT_SYSTEM) )
    {
      DeviceAttachmentBaseRefWithTag = IoGetDeviceAttachmentBaseRefWithTag(DeviceObject, 0x67446F50ui64);
      v6 = DeviceAttachmentBaseRefWithTag;
      if( DeviceAttachmentBaseRefWithTag )
        DeviceNode = DeviceAttachmentBaseRefWithTag->DeviceObjectExtension->DeviceNode;
      else
        DeviceNode = 0i64;
      if( DeviceNode )
      {
        PopDiagTraceTripPointExceeded(
          *((_WORD *)DeviceNode + 64) >> 1,
          *((_QWORD *)DeviceNode + 17),
          ThermalInfo->S4TransitionTripPoint / 0xA,
          (const _EVENT_DESCRIPTOR *)POP_ETW_EVENT_S4_TRIP_POINT_DIAGNOSTIC);
        PopDiagTraceTripPointExceeded(
          *((_WORD *)DeviceNode + 64) >> 1,
          *((_QWORD *)DeviceNode + 17),
          ThermalInfo->S4TransitionTripPoint / 0xA,
          (const _EVENT_DESCRIPTOR *)POP_ETW_EVENT_S4_TRIP_POINT_SYSTEM);
      }
      if( v6 )
        ObfDereferenceObjectWithTag(v6, 0x67446F50ui64);
    }
  }
}

Referenced by:

PopCheckAndHandleThermalConditions