mirror of
https://github.com/vxunderground/MalwareSourceCode.git
synced 2024-12-19 09:56:10 +00:00
f2ac1ece55
add
49 lines
2.1 KiB
C#
49 lines
2.1 KiB
C#
// Decompiled with JetBrains decompiler
|
|
// Type: Microsoft.InfoCards.IndexObject
|
|
// 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 Microsoft.InfoCards.Diagnostics;
|
|
using System;
|
|
|
|
namespace Microsoft.InfoCards
|
|
{
|
|
internal class IndexObject
|
|
{
|
|
private object[] m_objects;
|
|
private byte[] m_compiledForm;
|
|
|
|
public IndexObject(object[] objects) => this.m_objects = objects;
|
|
|
|
public IndexObject(byte[] compiledForm) => this.m_compiledForm = compiledForm;
|
|
|
|
public bool IsCompiled => null != this.m_compiledForm;
|
|
|
|
public bool CanCompile => null != this.m_objects;
|
|
|
|
public byte[] CompiledForm => this.m_compiledForm;
|
|
|
|
public object[] ObjectList => this.m_objects;
|
|
|
|
internal void Compile(SecondaryIndexDefinition indexDef)
|
|
{
|
|
if (!this.CanCompile)
|
|
throw InfoCardTrace.ThrowHelperError((Exception) new InvalidOperationException(SR.GetString("StoreIndexObjectCanNotBeCompiled")));
|
|
byte[] destinationArray = new byte[60];
|
|
int destinationIndex = 0;
|
|
for (int index = 0; index < this.m_objects.Length; ++index)
|
|
{
|
|
if (!indexDef.Canonicalizer.CanCanonicalize(this.m_objects[index]))
|
|
throw InfoCardTrace.ThrowHelperError((Exception) new InvalidOperationException(SR.GetString("StoreIndexObjectCanNotBeCanonicalized", (object) this.m_objects[index].GetType())));
|
|
byte[] sourceArray = indexDef.Canonicalizer.Canonicalize(this.m_objects[index]);
|
|
if (sourceArray.Length + destinationIndex > destinationArray.Length)
|
|
throw InfoCardTrace.ThrowHelperError((Exception) new InvalidOperationException(SR.GetString("StoreIndexObjectBufferOverflow", (object) indexDef.Name)));
|
|
Array.Copy((Array) sourceArray, 0, (Array) destinationArray, destinationIndex, sourceArray.Length);
|
|
destinationIndex += sourceArray.Length;
|
|
}
|
|
this.m_compiledForm = destinationArray;
|
|
}
|
|
}
|
|
}
|