SmcVolumePnpNotification

INT64 __fastcall SmcVolumePnpNotification(VOID *NotificationStructure, VOID *Context){
  __int64 v2; 
  unsigned int v4; 
  __int64 v5; 
  unsigned int v6; 
  __int64 *v7; 
  unsigned int v8; 
  struct EX_RUNDOWN_REF v9; 
  unsigned __int64 Count; 
  v2 = *(_QWORD *)((char *)NotificationStructure + 4) - *(_QWORD *)&GUID_TARGET_DEVICE_QUERY_REMOVE.Data1;
  v4 = 0;
  if( !v2 )
    v2 = *(_QWORD *)((char *)NotificationStructure + 12) - *(_QWORD *)GUID_TARGET_DEVICE_QUERY_REMOVE.Data4;
  if( !v2 )
    goto LABEL_7;
  v5 = *(_QWORD *)((char *)NotificationStructure + 4) - *(_QWORD *)&GUID_TARGET_DEVICE_REMOVE_COMPLETE.Data1;
  if( !v5 )
    v5 = *(_QWORD *)((char *)NotificationStructure + 12) - *(_QWORD *)GUID_TARGET_DEVICE_REMOVE_COMPLETE.Data4;
  if( !v5 )
  {
LABEL_7:
    v6 = 0;
    v7 = qword_140D231D8;
    do
    {
      v8 = v6 | (16 * (*(_DWORD *)v7 & 0xFFF));
      v9.Count = SmcCacheReference((INT64)&qword_140D231C0, v8).Count;
      Count = v9.Count;
      if( v9.Count )
        v4 = v8;
      if( v9.Count )
      {
        if( *(_QWORD *)(v9.Count + 48) != *((_QWORD *)NotificationStructure + 3) )
          Count = 0i64;
        ExReleaseRundownProtection((PEX_RUNDOWN_REF)&qword_140D231C8[4 * (v4 & 0xF)]);
        if( Count )
          SmcCacheDelete((__int64)&qword_140D231C0, v4);
      }
      ++v6;
      v7 += 4;
    }
    while( v6 < 0x10 );
  }
  return 0i64;
}

Referenced by:

No references.