WmipDSCleanup

VOID __fastcall WmipDSCleanup(INT64 BugCheckParameter2){
  tagInstanceSet *v2; 
  volatile signed __int64 *v3; 
  __int64 v4; 
  __int64 v5; 
  __int64 i; 
  volatile signed __int64 *v7; 
  void *v8; 
  _GUID *v9; 

  if( (*(_DWORD *)(BugCheckParameter2 + 16) & 1) == 0 )
    KeBugCheckEx(0x14Au, (PVOID)1, (PVOID)BugCheckParameter2, 0i64, 0i64);
  KeWaitForSingleObject((UINT64)&ExBootDevicesRemovedEvent + 3072, 0, 0, 0, 0i64);
  v2 = *(tagInstanceSet **)(BugCheckParameter2 + 40);
  while( v2 != (tagInstanceSet *)(BugCheckParameter2 + 40) )
  {
    v3 = (volatile signed __int64 *)(v2 - 10);
    if( *((_QWORD *)v2 - 5) )
    {
      WmipUnlinkInstanceSetFromGuidEntry(v2 - 10);
      *((_QWORD *)v3 + 8) = 0i64;
    }
    v4 = *((_QWORD *)v3 + 7);
    if( v4 && (v3[2] & 8) == 0 )
    {
      v5 = *(_QWORD *)(v4 + 72) - WmipBinaryMofGuid;
      if( !v5 )
        v5 = *(_QWORD *)(v4 + 80) - 0x102906C9A000F0B2i64;
      if( !v5 )
      {
        KeReleaseMutex((_KMUTANT *)((char *)&ExBootDevicesRemovedEvent + 3072), 0);
        WmipGenerateBinaryMofNotification(v2 - 10, &GUID_MOF_RESOURCE_REMOVED_NOTIFICATION, v9);
        KeWaitForSingleObject((UINT64)&ExBootDevicesRemovedEvent + 3072, 0, 0, 0, 0i64);
        v4 = *((_QWORD *)v3 + 7);
      }
      WmipUnreferenceEntry((__int64)&stru_140C00F40 + 4528, (volatile signed __int64 *)v4);
    }
    *((_QWORD *)v3 + 7) = 0i64;
    v2 = *(tagInstanceSet **)v2;
    WmipUnreferenceEntry((__int64)&stru_140C00F40 + 4496, v3);
  }
  KeReleaseMutex((_KMUTANT *)((char *)&ExBootDevicesRemovedEvent + 3072), 0);
  for( i = 0i64; (unsigned int)i < *(_DWORD *)(BugCheckParameter2 + 64); i = (unsigned int)(i + 1) )
  {
    v7 = *(volatile signed __int64 **)(*(_QWORD *)(BugCheckParameter2 + 72) + 8 * i);
    if( v7 )
      WmipUnreferenceEntry((__int64)&stru_140C00F40 + 4560, v7);
  }
  v8 = *(void **)(BugCheckParameter2 + 72);
  if( v8 != (void *)(BugCheckParameter2 + 80) )
  {
    ExFreePoolWithTag(v8, 0);
    *(_QWORD *)(BugCheckParameter2 + 72) = 0i64;
  }
}

Referenced by:

No references.