mirror of
https://github.com/vxunderground/MalwareSourceCode.git
synced 2024-12-21 02:46:10 +00:00
73 lines
3.1 KiB
C#
73 lines
3.1 KiB
C#
|
// Decompiled with JetBrains decompiler
|
|||
|
// Type: Microsoft.InfoCards.IssuerInformation
|
|||
|
// Assembly: infocard, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
|
|||
|
// MVID: ADE0A079-11DB-4A46-8BDE-D2A592CA8DEA
|
|||
|
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00000-msil\Virus.Win32.Expiro.w-67b630ead60119692b9abbdfd8717c96904ef041127c2cae033c86b718eaa61e.exe
|
|||
|
|
|||
|
using Microsoft.InfoCards.Diagnostics;
|
|||
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.IO;
|
|||
|
using System.Text;
|
|||
|
using System.Xml;
|
|||
|
|
|||
|
namespace Microsoft.InfoCards
|
|||
|
{
|
|||
|
internal class IssuerInformation
|
|||
|
{
|
|||
|
private List<IssuerInformationEntry> m_informationEntries;
|
|||
|
|
|||
|
public IssuerInformation() => this.m_informationEntries = new List<IssuerInformationEntry>();
|
|||
|
|
|||
|
public void Serialize(Stream stream)
|
|||
|
{
|
|||
|
BinaryWriter writer = new BinaryWriter(stream, Encoding.Unicode);
|
|||
|
writer.Write(this.m_informationEntries.Count);
|
|||
|
if (this.m_informationEntries.Count <= 0)
|
|||
|
return;
|
|||
|
foreach (IssuerInformationEntry informationEntry in this.m_informationEntries)
|
|||
|
{
|
|||
|
Utility.SerializeString(writer, informationEntry.Name);
|
|||
|
Utility.SerializeString(writer, informationEntry.Value);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public void ReadIssuerInformation(XmlReader reader)
|
|||
|
{
|
|||
|
if (!reader.IsStartElement(nameof (IssuerInformation), "http://schemas.xmlsoap.org/ws/2007/01/identity"))
|
|||
|
throw InfoCardTrace.ThrowHelperError((Exception) new XmlException(SR.GetString("UnexpectedElement")));
|
|||
|
while (reader.Read())
|
|||
|
{
|
|||
|
if ("IssuerInformationEntry" == reader.LocalName && "http://schemas.xmlsoap.org/ws/2007/01/identity" == reader.NamespaceURI)
|
|||
|
this.ReadIssuerInformationEntry(reader);
|
|||
|
if (nameof (IssuerInformation) == reader.LocalName && "http://schemas.xmlsoap.org/ws/2007/01/identity" == reader.NamespaceURI && XmlNodeType.EndElement == reader.NodeType)
|
|||
|
break;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public void ReadIssuerInformationEntry(XmlReader reader)
|
|||
|
{
|
|||
|
if (!reader.IsStartElement("IssuerInformationEntry", "http://schemas.xmlsoap.org/ws/2007/01/identity"))
|
|||
|
throw InfoCardTrace.ThrowHelperError((Exception) new XmlException(SR.GetString("UnexpectedElement")));
|
|||
|
string name = string.Empty;
|
|||
|
string str = string.Empty;
|
|||
|
while (reader.Read())
|
|||
|
{
|
|||
|
if ("IssuerInformationEntry" == reader.LocalName && "http://schemas.xmlsoap.org/ws/2007/01/identity" == reader.NamespaceURI && XmlNodeType.EndElement == reader.NodeType)
|
|||
|
{
|
|||
|
this.m_informationEntries.Add(new IssuerInformationEntry(name, str));
|
|||
|
break;
|
|||
|
}
|
|||
|
if ("EntryName" == reader.LocalName && "http://schemas.xmlsoap.org/ws/2007/01/identity" == reader.NamespaceURI)
|
|||
|
{
|
|||
|
name = reader.ReadString();
|
|||
|
if (string.IsNullOrEmpty(name))
|
|||
|
throw InfoCardTrace.ThrowHelperError((Exception) new InvalidCardException());
|
|||
|
}
|
|||
|
if ("EntryValue" == reader.LocalName && "http://schemas.xmlsoap.org/ws/2007/01/identity" == reader.NamespaceURI)
|
|||
|
str = reader.ReadString();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|