MalwareSourceCode/MSIL/Virus/Win32/E/Virus.Win32.Expiro.w-f8f9f26e940480624825f6bddbea86e70fc4aa746c4dd8efa7d98dcb477000ed/Microsoft/InfoCards/X509Logo.cs
2022-08-18 06:28:56 -05:00

63 lines
1.9 KiB
C#

// Decompiled with JetBrains decompiler
// Type: Microsoft.InfoCards.X509Logo
// Assembly: infocard, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// MVID: 1D4D5564-A025-490C-AF1D-DF4FBB709D1F
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00001-msil\Virus.Win32.Expiro.w-f8f9f26e940480624825f6bddbea86e70fc4aa746c4dd8efa7d98dcb477000ed.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);
}
}
}