MalwareSourceCode/MSIL/Virus/Win32/E/Virus.Win32.Expiro.w-1f15ee7e9f7da02b6bfb4c5a5e6484eb9fa71b82d3699c54bcc7a31794b4a66d/Microsoft/InfoCards/X509Logo.cs

63 lines
1.9 KiB
C#
Raw Normal View History

2022-08-18 11:28:56 +00:00
// Decompiled with JetBrains decompiler
// Type: Microsoft.InfoCards.X509Logo
// Assembly: infocard, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// MVID: ADE0A079-11DB-4A46-8BDE-D2A592CA8DEA
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00001-msil\Virus.Win32.Expiro.w-1f15ee7e9f7da02b6bfb4c5a5e6484eb9fa71b82d3699c54bcc7a31794b4a66d.exe
using System.Collections.Generic;
using System.IO;
using System.Security.Cryptography;
namespace Microsoft.InfoCards
{
internal abstract class X509Logo
{
private X509LogoType m_logoType;
private string m_mediaType;
private Dictionary<Oid, byte[]> m_fileHashes;
private List<string> m_fileLocations;
public X509LogoType LogoType => this.m_logoType;
public string MediaType => this.m_mediaType;
public Dictionary<Oid, byte[]> Hashes => this.m_fileHashes;
public List<string> FileLocations => this.m_fileLocations;
public X509Logo(
X509LogoType logoType,
string mediaType,
Dictionary<Oid, byte[]> hashes,
List<string> fileLocations)
{
this.m_logoType = logoType;
this.m_mediaType = mediaType;
this.m_fileHashes = hashes;
this.m_fileLocations = fileLocations;
}
public override string ToString() => base.ToString();
protected virtual void OnSerialize(BinaryWriter writer)
{
}
public void Serialize(BinaryWriter writer)
{
writer.Write((byte) this.LogoType);
Utility.SerializeString(writer, this.MediaType);
writer.Write(this.Hashes.Count);
foreach (Oid key in this.Hashes.Keys)
{
Utility.SerializeString(writer, key.Value);
Utility.SerializeBytes(writer, this.m_fileHashes[key]);
}
writer.Write(this.FileLocations.Count);
foreach (string fileLocation in this.FileLocations)
Utility.SerializeString(writer, fileLocation);
this.OnSerialize(writer);
}
}
}