PopCoolingExtensionPnpNotification

NTSTATUS __stdcall PopCoolingExtensionPnpNotification(VOID *NotificationStructure, VOID *Context){
  __int64 v3; 
  __int64 v4; 
  __int64 v6; 

  v3 = *(_QWORD *)((char *)NotificationStructure + 4) - *(_QWORD *)&GUID_TARGET_DEVICE_QUERY_REMOVE.Data1;
  if( !v3 )
    v3 = *(_QWORD *)((char *)NotificationStructure + 12) - *(_QWORD *)GUID_TARGET_DEVICE_QUERY_REMOVE.Data4;
  if( !v3 )
  {
    PopDisableCoolingExtension((_POP_COOLING_EXTENSION *)Context);
    return 0;
  }
  v4 = *(_QWORD *)((char *)NotificationStructure + 4) - *(_QWORD *)&GUID_TARGET_DEVICE_REMOVE_COMPLETE.Data1;
  if( !v4 )
    v4 = *(_QWORD *)((char *)NotificationStructure + 12) - *(_QWORD *)GUID_TARGET_DEVICE_REMOVE_COMPLETE.Data4;
  if( !v4 )
  {
    PopDisableCoolingExtension((_POP_COOLING_EXTENSION *)Context);
LABEL_9:
    PopOrphanCoolingExtension((_POP_COOLING_EXTENSION *)Context);
    return 0;
  }
  v6 = *(_QWORD *)((char *)NotificationStructure + 4) - *(_QWORD *)&GUID_TARGET_DEVICE_REMOVE_CANCELLED.Data1;
  if( !v6 )
    v6 = *(_QWORD *)((char *)NotificationStructure + 12) - *(_QWORD *)GUID_TARGET_DEVICE_REMOVE_CANCELLED.Data4;
  if( !v6 )
  {
    if( PopAcquireCoolingInterface((POP_COOLING_EXTENSION *)Context) < 0 )
      goto LABEL_9;
    PopAcquireRwLockExclusive((_POP_RW_LOCK *)Context + 2);
    *((_BYTE *)Context + 64) = 1;
    PopDiagTraceCoolingExtension((__int64)Context, (const _EVENT_DESCRIPTOR *)POP_ETW_EVENT_COOLING_EXTENSION_ADD);
    if( *((VOID **)Context + 2) != (char *)Context + 16 )
      PopPropogateCoolingChange((_POP_COOLING_EXTENSION *)Context);
    PopReleaseRwLock((_POP_RW_LOCK *)Context + 2);
  }
  return 0;
}

Referenced by:

No references.