WmipGenerateRegistrationNotification

VOID __stdcall WmipGenerateRegistrationNotification(tagDATASOURCE *DataSource, UINT64 NotificationType){
  unsigned int v2; 
  UINT64 v4; 
  PTRCACHE *v5; 
  tagDATASOURCE *v6; 
  _GUID *v7; 
  UINT64 PtrCount; 
  UINT64 PtrMax; 
  VOID *PtrArray; 

  v2 = NotificationType;
  WmipReferenceEntry((INT64)DataSource);
  v4 = 0i64;
  LODWORD(PtrMax) = 0;
  v5 = 0i64;
  v6 = (tagDATASOURCE *)*((_QWORD *)DataSource + 5);
  LODWORD(PtrCount) = 0;
  PtrArray = 0i64;
  if( v6 != DataSource + 10 )
  {
    do
    {
      if( (*(v6 - 6) & 8) == 0 )
      {
        v7 = (_GUID *)(*((_QWORD *)v6 + 2) + 72i64);
        WmipCachePtrs(v7, v6 - 10, &PtrCount, &PtrMax, (const VOID **)&PtrArray);
        if( v2 == 1 )
        {
          WmipEnableCollectionForNewGuid(v7, v6 - 10);
        }
        else if( v2 == 2 )
        {
          WmipDisableCollectionForRemovedGuid(v7, v6 - 10);
        }
      }
      v6 = *(tagDATASOURCE **)v6;
    }
    while( v6 != DataSource + 10 );
    v5 = (PTRCACHE *)PtrArray;
    v4 = (unsigned int)PtrCount;
  }
  WmipSendGuidUpdateNotifications(v2, v4, v5);
  if( v5 )
    ExFreePoolWithTag(v5, 0);
  WmipUnreferenceEntry((__int64)&stru_140C00F40 + 7664, (volatile signed __int64 *)DataSource);
}

Referenced by:

WmipAddDataSource
WmipRemoveDS