mirror of
https://github.com/vxunderground/MalwareSourceCode.git
synced 2024-12-19 09:56:10 +00:00
117 lines
3.3 KiB
C#
117 lines
3.3 KiB
C#
|
// Decompiled with JetBrains decompiler
|
|||
|
// Type: Microsoft.InfoCards.DataRow
|
|||
|
// Assembly: infocard, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
|
|||
|
// MVID: 516D8B44-4448-4D2C-8B8E-FFBB3FFE472B
|
|||
|
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00000-msil\Virus.Win32.Expiro.w-69bb73081eac86b8cf86f45e33515d0095855636967076e2b593d7a30cd80a07.exe
|
|||
|
|
|||
|
using Microsoft.InfoCards.Diagnostics;
|
|||
|
|
|||
|
namespace Microsoft.InfoCards
|
|||
|
{
|
|||
|
internal class DataRow
|
|||
|
{
|
|||
|
private string m_instanceId;
|
|||
|
private string m_sourceId;
|
|||
|
private int m_localId;
|
|||
|
private int m_objectType;
|
|||
|
private long m_lastChange;
|
|||
|
private int m_objectSize;
|
|||
|
private GlobalId m_globalId;
|
|||
|
private byte[] m_buffer;
|
|||
|
private DataRowIndexBuffer m_indexBuffer;
|
|||
|
|
|||
|
public DataRow()
|
|||
|
: this((string) null, (string) null)
|
|||
|
{
|
|||
|
}
|
|||
|
|
|||
|
private DataRow(string instanceId, string sourceId)
|
|||
|
{
|
|||
|
this.m_instanceId = instanceId;
|
|||
|
this.m_sourceId = sourceId;
|
|||
|
this.m_indexBuffer = new DataRowIndexBuffer();
|
|||
|
}
|
|||
|
|
|||
|
public GlobalId GlobalId
|
|||
|
{
|
|||
|
get => this.m_globalId;
|
|||
|
set
|
|||
|
{
|
|||
|
this.m_globalId = !(GlobalId.Empty == value) ? value : throw InfoCardTrace.ThrowHelperArgumentNull(nameof (value));
|
|||
|
this.SetIndexValue("ix_globalid", (object) value);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public string InstanceId
|
|||
|
{
|
|||
|
get => this.m_instanceId;
|
|||
|
internal set => this.m_instanceId = value;
|
|||
|
}
|
|||
|
|
|||
|
public string SourceId
|
|||
|
{
|
|||
|
get => this.m_sourceId;
|
|||
|
internal set => this.m_sourceId = value;
|
|||
|
}
|
|||
|
|
|||
|
public long LastChange
|
|||
|
{
|
|||
|
get => this.m_lastChange;
|
|||
|
internal set => this.m_lastChange = value;
|
|||
|
}
|
|||
|
|
|||
|
public int LocalId
|
|||
|
{
|
|||
|
get => this.m_localId;
|
|||
|
internal set => this.m_localId = value;
|
|||
|
}
|
|||
|
|
|||
|
public int ObjectType
|
|||
|
{
|
|||
|
get => this.m_objectType;
|
|||
|
set
|
|||
|
{
|
|||
|
this.m_objectType = value;
|
|||
|
this.SetIndexValue("ix_objecttype", (object) value);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
internal DataRowIndexBuffer IndexBuffer => this.m_indexBuffer;
|
|||
|
|
|||
|
public void SetDataField(byte[] buffer) => this.SetDataField(buffer, buffer.Length);
|
|||
|
|
|||
|
public void SetDataField(byte[] buffer, int size)
|
|||
|
{
|
|||
|
this.m_buffer = buffer;
|
|||
|
this.m_objectSize = size;
|
|||
|
}
|
|||
|
|
|||
|
public byte[] GetDataField() => this.m_buffer;
|
|||
|
|
|||
|
public void SetMultiIndexValue(string name, params object[][] multiValues)
|
|||
|
{
|
|||
|
IndexObject[] indexObjects = new IndexObject[multiValues.Length];
|
|||
|
for (int index = 0; index < multiValues.Length; ++index)
|
|||
|
indexObjects[index] = new IndexObject(multiValues[index]);
|
|||
|
this.m_indexBuffer.SetIndexValues(name, indexObjects);
|
|||
|
}
|
|||
|
|
|||
|
public void SetIndexValue(string name, params object[] values)
|
|||
|
{
|
|||
|
object[][] objArray = new object[values.Length][];
|
|||
|
for (int index = 0; index < objArray.Length; ++index)
|
|||
|
objArray[index] = new object[1]{ values[index] };
|
|||
|
this.SetMultiIndexValue(name, objArray);
|
|||
|
}
|
|||
|
|
|||
|
internal static unsafe DataRow Create(EncryptedObjectHeader* pHeader, DataSource source) => new DataRow(source.InstanceId, source.SourceId)
|
|||
|
{
|
|||
|
LastChange = pHeader->LastChange,
|
|||
|
ObjectType = pHeader->ObjectType,
|
|||
|
LocalId = pHeader->LocalId,
|
|||
|
GlobalId = pHeader->GlobalId,
|
|||
|
m_objectSize = pHeader->DataSize
|
|||
|
};
|
|||
|
}
|
|||
|
}
|