// Decompiled with JetBrains decompiler
// Type: .
// Assembly: syncuiLoader, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: F112AE9C-7564-463C-8834-3BB2BC4FBE1B
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00001-msil\Trojan.Win32.Llac.aamy-d1153c91831872cfeacf510426d9b4752eab5933102816559dcd2628b12a7253.exe
using \u0004;
using \u0005;
using Microsoft.Win32;
using SmartAssembly.SmartExceptionsCore;
using System;
using System.Collections;
using System.Diagnostics;
using System.IO;
using System.Net;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
using System.Text;
using System.Threading;
using System.Web.Services.Protocols;
using System.Windows.Forms;
using System.Xml;
namespace \u0003
{
internal abstract class \u0003
{
private static string \u0001 = "1";
internal static bool \u0001 = false;
private IWebProxy \u0001;
private char[] \u0001 = new char[0];
private static \u0003.\u0003 \u0001 = (\u0003.\u0003) null;
private Exception \u0001;
private Hashtable \u0001;
private Hashtable \u0002;
private XmlTextWriter \u0001;
private ArrayList \u0001 = new ArrayList();
private ArrayList \u0002 = new ArrayList();
private Hashtable \u0003 = new Hashtable();
private ArrayList \u0003 = new ArrayList();
private Hashtable \u0004 = new Hashtable();
private EventHandler \u0001;
private \u0003.\u0005 \u0001;
[SpecialName]
[MethodImpl(MethodImplOptions.Synchronized)]
public void \u0003([In] EventHandler obj0) => this.\u0001 += obj0;
[SpecialName]
[MethodImpl(MethodImplOptions.Synchronized)]
public void \u0003([In] \u0003.\u0005 obj0) => this.\u0001 += obj0;
protected abstract void \u0003([In] \u0001 obj0);
protected abstract void \u0003([In] \u0004.\u0003 obj0);
protected abstract void \u0003([In] \u0004.\u0002 obj0);
[SecurityPermission(SecurityAction.Demand, UnmanagedCode = true)]
public static void \u0003([In] \u0003.\u0003 obj0)
{
if (obj0 == null)
return;
\u0003.\u0003.\u0001 = obj0;
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(obj0.\u0003);
Application.ThreadException += new ThreadExceptionEventHandler(obj0.\u0003);
}
[SpecialName]
public char[] \u0003()
{
if (this.\u0001.Length == 0)
{
switch ("UNICODE".ToUpper())
{
case "ASCII":
this.\u0001 = new char[62]
{
'a',
'b',
'c',
'd',
'e',
'f',
'g',
'h',
'i',
'j',
'k',
'l',
'm',
'n',
'o',
'p',
'q',
'r',
's',
't',
'u',
'v',
'w',
'x',
'y',
'z',
'A',
'B',
'C',
'D',
'E',
'F',
'G',
'H',
'I',
'J',
'K',
'L',
'M',
'N',
'O',
'P',
'Q',
'R',
'S',
'T',
'U',
'V',
'W',
'X',
'Y',
'Z',
'0',
'1',
'2',
'3',
'4',
'5',
'6',
'7',
'8',
'9'
};
break;
case "UNICODE":
this.\u0001 = new char[58]
{
'\u0001',
'\u0002',
'\u0003',
'\u0004',
'\u0005',
'\u0006',
'\a',
'\b',
'\u000E',
'\u000F',
'\u0010',
'\u0011',
'\u0012',
'\u0013',
'\u0014',
'\u0015',
'\u0016',
'\u0017',
'\u0018',
'\u0019',
'\u001A',
'\u001B',
'\u001C',
'\u001D',
'\u001E',
'\u001F',
'\u007F',
'\u0080',
'\u0081',
'\u0082',
'\u0083',
'\u0084',
'\u0086',
'\u0087',
'\u0088',
'\u0089',
'\u008A',
'\u008B',
'\u008C',
'\u008D',
'\u008E',
'\u008F',
'\u0090',
'\u0091',
'\u0092',
'\u0093',
'\u0094',
'\u0095',
'\u0096',
'\u0097',
'\u0098',
'\u0099',
'\u009A',
'\u009B',
'\u009C',
'\u009D',
'\u009E',
'\u009F'
};
break;
}
}
return this.\u0001;
}
public static void \u0003([In] Exception obj0, [In] object[] obj1)
{
try
{
if (obj0 != null && obj0 is SecurityException && \u0003.\u0003.\u0001 == "1" && \u0003.\u0003.\u0001.\u0003((SecurityException) obj0))
return;
\u0003.\u0003.\u0001.\u0003(UnhandledException.\u0003(obj0, obj1), false);
}
catch
{
Application.Exit();
}
}
public static Exception \u0003([In] Exception obj0, [In] object[] obj1)
{
\u0003.\u0003.\u0004(obj0, obj1);
return (Exception) new SoapException(obj0.Message, SoapException.ServerFaultCode);
}
public static void \u0004([In] Exception obj0, [In] object[] obj1)
{
try
{
if (\u0003.\u0003.\u0001 == null)
goto label_10;
label_8:
if (\u0003.\u0003.\u0001 == null)
return;
\u0003.\u0003.\u0001.\u0003(UnhandledException.\u0003(obj0, obj1), true);
return;
label_10:
foreach (System.Type type in Assembly.GetExecutingAssembly().GetTypes())
{
if ((object) type != null && (object) type.BaseType != null)
{
if ((object) type.BaseType == (object) typeof (\u0003.\u0003))
{
try
{
\u0003.\u0003.\u0001 = (\u0003.\u0003) Activator.CreateInstance(type, true);
if (\u0003.\u0003.\u0001 != null)
break;
}
catch
{
}
}
}
}
goto label_8;
}
catch
{
}
}
private void \u0003([In] object obj0, [In] ThreadExceptionEventArgs obj1)
{
try
{
if (obj1.Exception is SecurityException && \u0003.\u0003.\u0001 == "1" && this.\u0003(obj1.Exception as SecurityException))
return;
this.\u0003(obj1.Exception, true);
}
catch
{
}
}
private void \u0003([In] object obj0, [In] UnhandledExceptionEventArgs obj1)
{
try
{
if (obj1.ExceptionObject is SecurityException && \u0003.\u0003.\u0001 == "1" && this.\u0003(obj1.ExceptionObject as SecurityException) || !(obj1.ExceptionObject is Exception))
return;
this.\u0003((Exception) obj1.ExceptionObject, !obj1.IsTerminating);
}
catch
{
}
}
private string \u0003([In] object obj0)
{
try
{
if (obj0 == null)
return string.Empty;
if (obj0 is int num1)
return num1.ToString("x");
switch (obj0)
{
case long num2:
return num2.ToString("x");
case short num3:
return num3.ToString("x");
case uint num4:
return num4.ToString("x");
case ulong num5:
return num5.ToString("x");
case ushort num6:
return num6.ToString("x");
case byte num7:
return num7.ToString("x");
case sbyte num8:
return num8.ToString("x");
case IntPtr num9:
return num9.ToInt64().ToString("x");
case UIntPtr num10:
return num10.ToUInt64().ToString("x");
}
}
catch
{
}
return string.Empty;
}
private string \u0003([In] string obj0) => obj0.StartsWith("\"") && obj0.EndsWith("\"") ? "*** Information not reported for security reasons ***" : obj0;
private void \u0003([In] object obj0, [In] FieldInfo obj1)
{
string str1 = (object) obj1 == null ? (string) null : obj1.Name;
string localName = (object) obj1 == null ? "Object" : "Field";
if (obj0 == null)
{
this.\u0001.WriteStartElement(localName);
if ((object) obj1 != null)
{
if (obj1.IsStatic)
this.\u0001.WriteAttributeString("Static", "1");
System.Type fieldType = obj1.FieldType;
if ((object) fieldType != null && fieldType.HasElementType)
{
this.\u0003(fieldType.GetElementType());
if (fieldType.IsByRef)
this.\u0001.WriteAttributeString("ByRef", "1");
if (fieldType.IsPointer)
this.\u0001.WriteAttributeString("Pointer", "1");
if (fieldType.IsArray)
this.\u0001.WriteAttributeString("Rank", fieldType.GetArrayRank().ToString());
}
else
this.\u0003(fieldType);
}
if (str1 != null)
this.\u0003(str1);
this.\u0001.WriteAttributeString("Null", "1");
this.\u0001.WriteEndElement();
}
else
{
System.Type type = obj0.GetType();
string str2 = (string) null;
string str3 = (string) null;
if (obj0 is string)
str2 = "System.String";
if (str2 == null)
{
if (type.IsPrimitive || obj0 is IntPtr || obj0 is UIntPtr)
{
str2 = type.FullName;
if (obj0 is char ch)
{
int num = (int) ch;
StringBuilder stringBuilder = new StringBuilder();
if (num >= 32)
{
stringBuilder.Append('\'');
stringBuilder.Append((char) obj0);
stringBuilder.Append("' ");
}
stringBuilder.Append("(0x");
stringBuilder.Append(num.ToString("x"));
stringBuilder.Append(')');
str3 = stringBuilder.ToString();
}
if (obj0 is bool)
str3 = obj0.ToString().ToLower();
if (str3 == null)
{
string str4 = string.Empty;
try
{
str4 = this.\u0003(obj0);
}
catch
{
}
if (str4.Length > 0)
{
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.Append(obj0.ToString());
stringBuilder.Append(" (0x");
stringBuilder.Append(str4);
stringBuilder.Append(')');
str3 = stringBuilder.ToString();
}
else
str3 = obj0.ToString();
}
}
else if (type.IsValueType && (object) type.Module != (object) this.GetType().Module)
str2 = type.FullName;
}
if (str2 != null)
{
this.\u0001.WriteStartElement(localName);
if ((object) obj1 != null && obj1.IsStatic)
this.\u0001.WriteAttributeString("Static", "1");
this.\u0003(type);
if (str1 != null)
this.\u0003(str1);
if (type.IsEnum)
str3 = obj0.ToString();
if (obj0 is Guid)
str3 = "{" + obj0.ToString() + "}";
if (str3 == null)
str3 = "\"" + obj0.ToString() + "\"";
this.\u0001.WriteAttributeString("Value", this.\u0003(str3));
this.\u0001.WriteEndElement();
}
else
{
this.\u0001.WriteStartElement(localName);
if ((object) obj1 != null && obj1.IsStatic)
this.\u0001.WriteAttributeString("Static", "1");
int num = -1;
for (int index = 0; index < this.\u0001.Count; ++index)
{
try
{
if (this.\u0001[index].Equals(obj0))
{
num = index;
break;
}
}
catch
{
}
}
if (num == -1)
num = this.\u0001.Add(obj0);
this.\u0001.WriteAttributeString("ID", num.ToString());
if (str1 != null)
this.\u0003(str1);
this.\u0001.WriteEndElement();
}
}
}
private void \u0003([In] string obj0)
{
int num = this.\u0003(obj0);
if (num != -1)
this.\u0001.WriteAttributeString("NameID", num.ToString());
else
this.\u0001.WriteAttributeString("Name", obj0);
}
private \u0003.\u0003.\u0003 \u0003([In] System.Type obj0)
{
\u0003.\u0003.\u0003 obj = \u0003.\u0003.\u0003.\u0003();
if ((object) obj0 != null && (object) obj0.Assembly.GetType("SmartAssembly.Attributes.PoweredByAttribute") != null)
{
obj.\u0001 = ((obj0.MetadataToken & 16777215) - 1).ToString();
Assembly assembly = obj0.Assembly;
obj.\u0001 = new \u0003.\u0003.\u0002(assembly.ManifestModule.ModuleVersionId.ToString("B"), assembly.FullName);
}
return obj;
}
private int \u0003([In] \u0003.\u0003.\u0003 obj0)
{
string upper = obj0.\u0001.\u0001.ToUpper();
if (this.\u0004.ContainsKey((object) upper))
return (int) this.\u0004[(object) upper];
int num = this.\u0003.Add((object) obj0.\u0001);
this.\u0004.Add((object) upper, (object) num);
return num;
}
private void \u0003([In] System.Type obj0)
{
if ((object) obj0 == null)
return;
try
{
\u0003.\u0003.\u0003 obj = this.\u0003(obj0);
if (!obj.\u0003())
{
this.\u0001.WriteAttributeString("TypeDefID", obj.\u0001);
int num = this.\u0003(obj);
if (num <= 0)
return;
this.\u0001.WriteAttributeString("Assembly", num.ToString());
}
else
{
string fullName = obj0.FullName;
int num1;
if (this.\u0003.ContainsKey((object) fullName))
{
num1 = (int) this.\u0003[(object) fullName];
}
else
{
StringBuilder stringBuilder = new StringBuilder();
string name = obj0.Assembly.GetName().Name;
if (name.Length > 0 && name != "mscorlib")
{
stringBuilder.Append('[');
stringBuilder.Append(name);
stringBuilder.Append(']');
}
string str1 = obj0.Namespace;
if (str1.Length > 0)
{
stringBuilder.Append(str1);
stringBuilder.Append('.');
}
if (obj0.HasElementType)
obj0 = obj0.GetElementType();
int num2 = fullName.LastIndexOf("+");
if (num2 > 0)
{
string str2 = fullName.Substring(str1.Length + 1, num2 - str1.Length).Replace("+", "/");
stringBuilder.Append(str2);
}
stringBuilder.Append(obj0.Name);
num1 = this.\u0002.Add((object) stringBuilder.ToString());
this.\u0003.Add((object) fullName, (object) num1);
}
this.\u0001.WriteAttributeString("TypeName", num1.ToString());
}
}
catch
{
}
}
private int \u0003([In] string obj0)
{
try
{
bool flag1 = this.\u0003()[0] == '\u0001';
switch (obj0)
{
case "":
case null:
return -1;
default:
if ((!flag1 || obj0.Length <= 4) && (flag1 || obj0[0] == '#'))
{
int num = 0;
for (int index1 = obj0.Length - 1; index1 >= 0 && (flag1 || index1 != 0); --index1)
{
char ch = obj0[index1];
bool flag2 = false;
for (int index2 = 0; index2 < this.\u0003().Length; ++index2)
{
if ((int) this.\u0003()[index2] == (int) ch)
{
num = num * this.\u0003().Length + index2;
flag2 = true;
break;
}
}
if (!flag2)
return -1;
}
return num;
}
goto case "";
}
}
catch
{
return -1;
}
}
protected virtual Guid \u0003() => Guid.Empty;
private string \u0003()
{
try
{
return Application.ExecutablePath;
}
catch
{
return "N/A";
}
}
private Assembly[] \u0003()
{
try
{
return AppDomain.CurrentDomain.GetAssemblies();
}
catch
{
return new Assembly[1]{ this.\u0003() };
}
}
private Assembly \u0003()
{
try
{
return Assembly.GetExecutingAssembly();
}
catch
{
return (Assembly) null;
}
}
private byte[] \u0003([In] string obj0)
{
MemoryStream w = new MemoryStream();
this.\u0001 = new XmlTextWriter((Stream) w, (Encoding) new UTF8Encoding(false));
this.\u0001.WriteStartDocument();
this.\u0001.WriteStartElement("UnhandledExceptionReport");
this.\u0001.WriteAttributeString("AssemblyID", "{F112AE9C-7564-463C-8834-3BB2BC4FBE1B}".ToUpper());
this.\u0001.WriteAttributeString("DateTime", DateTime.Now.ToString("s"));
this.\u0001.WriteAttributeString("Path", this.\u0003());
Guid guid = this.\u0003();
if (guid != Guid.Empty)
this.\u0001.WriteAttributeString("UserID", guid.ToString("B"));
if (obj0.Length > 0)
this.\u0001.WriteAttributeString("ReportID", obj0);
if (this.\u0003.Count > 0)
this.\u0003.Clear();
this.\u0003.Add((object) new \u0003.\u0003.\u0002("{F112AE9C-7564-463C-8834-3BB2BC4FBE1B}", string.Empty));
if (this.\u0004.Count > 0)
this.\u0004.Clear();
this.\u0004.Add((object) "{F112AE9C-7564-463C-8834-3BB2BC4FBE1B}", (object) 0);
this.\u0001.WriteStartElement("Assemblies");
Assembly assembly1 = this.\u0003();
foreach (Assembly assembly2 in this.\u0003())
{
if ((object) assembly2 != null)
{
this.\u0001.WriteStartElement("Assembly");
try
{
this.\u0001.WriteAttributeString("Name", assembly2.FullName);
this.\u0001.WriteAttributeString("CodeBase", assembly2.CodeBase);
if ((object) assembly2 == (object) assembly1)
this.\u0001.WriteAttributeString("This", "1");
}
catch
{
}
this.\u0001.WriteEndElement();
}
}
this.\u0001.WriteEndElement();
this.\u0001.WriteStartElement("CustomProperties");
if (this.\u0001 != null && this.\u0001.Count > 0)
{
foreach (string key in (IEnumerable) this.\u0001.Keys)
{
this.\u0001.WriteStartElement("CustomProperty");
this.\u0001.WriteAttributeString("Name", key);
string str = (string) this.\u0001[(object) key];
if (str == null)
this.\u0001.WriteAttributeString("Null", "1");
else
this.\u0001.WriteAttributeString("Value", "\"" + str + "\"");
this.\u0001.WriteEndElement();
}
}
this.\u0001.WriteEndElement();
if (this.\u0002 != null && this.\u0002.Count > 0)
{
this.\u0001.WriteStartElement("AttachedFiles");
foreach (string key in (IEnumerable) this.\u0002.Keys)
{
this.\u0001.WriteStartElement("AttachedFile");
this.\u0001.WriteAttributeString("Key", key);
\u0003.\u0003.\u0001 obj = (\u0003.\u0003.\u0001) this.\u0002[(object) key];
this.\u0001.WriteAttributeString("FileName", obj.\u0001);
this.\u0001.WriteAttributeString("Length", obj.\u0001.ToString());
if (obj.\u0003.Length > 0)
this.\u0001.WriteAttributeString("Error", obj.\u0003);
else
this.\u0001.WriteAttributeString("Data", obj.\u0002);
this.\u0001.WriteEndElement();
}
this.\u0001.WriteEndElement();
}
this.\u0001.WriteStartElement("SystemInformation");
try
{
this.\u0001.WriteElementString("OSVersion", Environment.OSVersion.Version.ToString());
this.\u0001.WriteElementString("OSPlatformID", Environment.OSVersion.Platform.ToString());
this.\u0001.WriteElementString("ServicePack", \u0005.\u0002.\u0003());
}
catch
{
}
this.\u0001.WriteEndElement();
ArrayList arrayList = new ArrayList();
for (Exception innerException = this.\u0001; innerException != null; innerException = innerException.InnerException)
{
System.Type type = innerException.GetType();
if (type.Name == "UnhandledException" && type.Namespace == "SmartAssembly.SmartExceptionsCore")
arrayList.Add((object) innerException);
else
arrayList.Insert(0, (object) innerException);
}
this.\u0001.WriteStartElement("StackTrace");
int count1 = arrayList.Count;
int num1 = 0;
foreach (Exception exception in arrayList)
{
++num1;
if (num1 > 100 && num1 == count1 - 100)
{
this.\u0001.WriteStartElement("RemovedFrames");
this.\u0001.WriteAttributeString("TotalFramesCount", count1.ToString());
this.\u0001.WriteEndElement();
}
else if (num1 <= 100 || num1 > count1 - 100)
{
System.Type type = exception.GetType();
if (type.Name == "UnhandledException" && type.Namespace == "SmartAssembly.SmartExceptionsCore")
{
int num2 = 0;
int num3 = -1;
object[] objArray = (object[]) null;
\u0003.\u0003.\u0003 obj1 = \u0003.\u0003.\u0003.\u0003();
bool flag = true;
try
{
num2 = (int) type.GetField("MethodID").GetValue((object) exception);
num3 = (int) type.GetField("ILOffset").GetValue((object) exception);
objArray = (object[]) type.GetField("Objects").GetValue((object) exception);
obj1 = this.\u0003(type);
}
catch
{
flag = false;
}
if (flag && !obj1.\u0003())
{
this.\u0001.WriteStartElement("StackFrame");
this.\u0001.WriteAttributeString("MethodID", num2.ToString());
int num4 = this.\u0003(obj1);
if (num4 > 0)
this.\u0001.WriteAttributeString("Assembly", num4.ToString());
if (num3 != -1)
this.\u0001.WriteAttributeString("ILOffset", num3.ToString());
foreach (object obj2 in objArray)
{
try
{
this.\u0003(obj2, (FieldInfo) null);
}
catch
{
}
}
this.\u0001.WriteEndElement();
}
}
else
{
this.\u0001.WriteStartElement("Exception");
try
{
this.\u0003(exception.GetType());
string str1 = "N/A";
try
{
str1 = exception.Message;
}
catch
{
}
this.\u0001.WriteAttributeString("Message", str1);
string str2 = exception.StackTrace.Trim();
this.\u0001.WriteAttributeString("ExceptionStackTrace", str2);
int num5 = str2.IndexOf(' ');
string str3 = str2.Substring(num5 + 1);
int length = str3.IndexOf("\r\n");
if (length != -1)
str3 = str3.Substring(0, length);
this.\u0001.WriteAttributeString("Method", str3);
}
catch
{
}
this.\u0001.WriteEndElement();
}
}
}
this.\u0001.WriteEndElement();
this.\u0001.WriteStartElement("Objects");
int count2 = this.\u0001.Count;
for (int index1 = 0; index1 < this.\u0001.Count; ++index1)
{
object obj3 = this.\u0001[index1];
System.Type enumType = obj3.GetType();
this.\u0001.WriteStartElement("ObjectDef");
this.\u0001.WriteAttributeString("ID", index1.ToString());
string str = (string) null;
try
{
str = obj3.ToString();
str = !(str == enumType.FullName) ? (!enumType.IsEnum ? (!(obj3 is Guid) ? "\"" + str + "\"" : "{" + str + "}") : System.Enum.Format(enumType, obj3, "d")) : (string) null;
}
catch
{
}
if (str != null)
this.\u0001.WriteAttributeString("Value", this.\u0003(str));
if (enumType.HasElementType)
{
this.\u0003(enumType.GetElementType());
if (enumType.IsByRef)
this.\u0001.WriteAttributeString("ByRef", "1");
if (enumType.IsPointer)
this.\u0001.WriteAttributeString("Pointer", "1");
if (enumType.IsArray)
{
Array array = (Array) obj3;
this.\u0001.WriteAttributeString("Rank", array.Rank.ToString());
StringBuilder stringBuilder = new StringBuilder();
for (int dimension = 0; dimension < array.Rank; ++dimension)
{
if (dimension > 0)
stringBuilder.Append(',');
stringBuilder.Append(array.GetLength(dimension));
}
this.\u0001.WriteAttributeString("Length", stringBuilder.ToString());
if (array.Rank == 1)
{
int length = array.Length;
for (int index2 = 0; index2 < length; ++index2)
{
if (index2 == 10)
{
if (length > 16)
index2 = length - 5;
}
try
{
this.\u0003(array.GetValue(index2), (FieldInfo) null);
}
catch
{
}
}
}
}
}
else
{
this.\u0003(enumType);
if (index1 < count2)
{
if (obj3 is IEnumerable)
{
this.\u0001.WriteStartElement("IEnumerable");
try
{
int num6 = 0;
foreach (object obj4 in (IEnumerable) obj3)
{
if (num6 > 20)
{
this.\u0001.WriteElementString("More", string.Empty);
break;
}
this.\u0003(obj4, (FieldInfo) null);
++num6;
}
}
catch
{
}
this.\u0001.WriteEndElement();
}
bool flag = true;
while ((object) enumType != null)
{
if (!flag)
{
this.\u0001.WriteStartElement("BaseTypeDef");
this.\u0003(enumType);
this.\u0001.WriteEndElement();
}
FieldInfo[] fields = enumType.GetFields(BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
if (fields.Length > 0)
{
for (int index3 = 0; index3 < fields.Length; ++index3)
{
try
{
if (!fields[index3].IsLiteral)
{
if (fields[index3].IsStatic)
{
if (fields[index3].IsInitOnly)
continue;
}
this.\u0003(fields[index3].GetValue(obj3), fields[index3]);
}
}
catch
{
}
}
}
enumType = enumType.BaseType;
flag = false;
if (this.\u0003(enumType).\u0003())
break;
}
}
}
this.\u0001.WriteEndElement();
}
this.\u0001.WriteEndElement();
this.\u0001.WriteStartElement("TypeNames");
this.\u0001.WriteAttributeString("Count", this.\u0002.Count.ToString());
for (int index = 0; index < this.\u0002.Count; ++index)
{
string empty = string.Empty;
string str;
try
{
str = this.\u0002[index].ToString();
}
catch (Exception ex)
{
str = '"'.ToString() + ex.Message + (object) '"';
}
this.\u0001.WriteElementString("TypeName", str);
}
this.\u0001.WriteEndElement();
this.\u0001.WriteStartElement("AssemblyIDs");
this.\u0001.WriteAttributeString("Count", this.\u0003.Count.ToString());
for (int index = 0; index < this.\u0003.Count; ++index)
{
this.\u0001.WriteStartElement("AssemblyID");
\u0003.\u0003.\u0002 obj = (\u0003.\u0003.\u0002) this.\u0003[index];
this.\u0001.WriteAttributeString("ID", obj.\u0001);
if (obj.\u0002.Length > 0)
this.\u0001.WriteAttributeString("FullName", obj.\u0002);
this.\u0001.WriteEndElement();
}
this.\u0001.WriteEndElement();
this.\u0001.WriteEndElement();
this.\u0001.WriteEndDocument();
this.\u0001.Flush();
w.Flush();
return w.ToArray();
}
internal bool \u0003([In] string obj0)
{
try
{
byte[] numArray = this.\u0003(Guid.NewGuid().ToString("B"));
FileStream fileStream = System.IO.File.OpenWrite(obj0);
byte[] buffer = \u0003.\u0002.\u0003(\u0002.\u0002.\u0004(numArray), "oHzMSL5DSJZF6miTSXG9wRRlP36zQu6V65yQ9u/tdPrNJ8xflS1ocfwKF2c4FfUmdvnzk+bGB/1AiNOrSa0bSPpm9kS6LyF1a01fkzQclSVLIOhoQcPv9EMFshZ88C/Sllhvz1+P3amwWn1eGX42WWIFJ6PjgnolcRlt7XP8ZEc=AQAB");
byte[] bytes = Encoding.ASCII.GetBytes("{F112AE9C-7564-463C-8834-3BB2BC4FBE1B}");
fileStream.Write(bytes, 0, bytes.Length);
fileStream.Write(buffer, 0, buffer.Length);
fileStream.Close();
return true;
}
catch (ThreadAbortException ex)
{
return false;
}
catch (Exception ex)
{
return false;
}
}
internal void \u0003()
{
try
{
string tempFileName = Path.GetTempFileName();
this.\u0003(tempFileName);
string str = this.\u0004("Path");
if (str.Length > 0 && !str.EndsWith("\\"))
str += "\\";
Process.Start(str + "{smartassembly}.exe", "/AddExceptionReport \"" + tempFileName + "\"");
if (this.\u0001 == null)
return;
this.\u0001((object) this, EventArgs.Empty);
}
catch (ThreadAbortException ex)
{
}
catch (Exception ex)
{
this.\u0003(new \u0004.\u0003(ex));
}
}
internal bool \u0003()
{
try
{
if (this.\u0001 != null)
goto label_35;
label_1:
byte[] numArray1;
try
{
numArray1 = this.\u0003(string.Empty);
}
catch (Exception ex)
{
int num = -1;
try
{
StackTrace stackTrace = new StackTrace(ex);
if (stackTrace.FrameCount > 0)
num = stackTrace.GetFrame(stackTrace.FrameCount - 1).GetILOffset();
}
catch
{
}
if (this.\u0001 != null)
this.\u0001((object) this, new \u0001(\u0002.\u0004.\u0001, string.Format("ERR 2006: {0} @ 0x{1:x4}", (object) ex.Message, (object) num)));
return false;
}
byte[] numArray2 = \u0002.\u0002.\u0004(numArray1);
if (numArray2 == null)
{
if (this.\u0001 != null)
this.\u0001((object) this, new \u0001(\u0002.\u0004.\u0001, \u0002.\u0002.\u0001));
return false;
}
byte[] sourceArray = \u0003.\u0002.\u0003(numArray2, "oHzMSL5DSJZF6miTSXG9wRRlP36zQu6V65yQ9u/tdPrNJ8xflS1ocfwKF2c4FfUmdvnzk+bGB/1AiNOrSa0bSPpm9kS6LyF1a01fkzQclSVLIOhoQcPv9EMFshZ88C/Sllhvz1+P3amwWn1eGX42WWIFJ6PjgnolcRlt7XP8ZEc=AQAB");
if (sourceArray == null)
{
if (this.\u0001 != null)
this.\u0001((object) this, new \u0001(\u0002.\u0004.\u0001, \u0003.\u0002.\u0001));
return false;
}
if (this.\u0001 != null)
this.\u0001((object) this, new \u0001(\u0002.\u0004.\u0002));
\u0004.\u0004 obj = new \u0004.\u0004("{5b0a2f90-ba8d-4684-b47e-10b0542e6cf4}");
if (this.\u0001 != null)
obj.\u0003(this.\u0001);
string str1 = obj.\u0003();
if (str1 == "OK")
{
if (this.\u0001 != null)
this.\u0001((object) this, new \u0001(\u0002.\u0004.\u0003));
byte[] bytes = Encoding.ASCII.GetBytes("{F112AE9C-7564-463C-8834-3BB2BC4FBE1B}");
byte[] destinationArray = new byte[bytes.Length + sourceArray.Length];
Array.Copy((Array) bytes, (Array) destinationArray, bytes.Length);
Array.Copy((Array) sourceArray, 0, (Array) destinationArray, bytes.Length, sourceArray.Length);
string str2 = obj.\u0003(destinationArray);
if (str2.StartsWith("ERR"))
{
if (this.\u0001 != null)
this.\u0001((object) this, new \u0001(\u0002.\u0004.\u0003, str2));
return false;
}
if (this.\u0001 != null)
{
\u0001 e = new \u0001(\u0002.\u0004.\u0004);
e.\u0003(str2);
this.\u0001((object) this, e);
}
return true;
}
string str3 = str1;
if (this.\u0001 != null)
this.\u0001((object) this, new \u0001(\u0002.\u0004.\u0002, str3));
return false;
label_35:
this.\u0001((object) this, new \u0001(\u0002.\u0004.\u0001));
goto label_1;
}
catch (ThreadAbortException ex)
{
return false;
}
catch (Exception ex)
{
this.\u0003(new \u0004.\u0003(ex));
return false;
}
}
private string \u0004([In] string obj0)
{
try
{
RegistryKey registryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\\{smartassembly}") ?? Registry.LocalMachine.OpenSubKey("SOFTWARE\\Wow6432Node\\{smartassembly}");
if (registryKey == null)
return string.Empty;
string str = (string) registryKey.GetValue(obj0, (object) string.Empty);
registryKey.Close();
return str;
}
catch
{
return string.Empty;
}
}
internal bool \u0003([In] SecurityException obj0)
{
\u0004.\u0002 obj = new \u0004.\u0002(obj0);
this.\u0003(obj);
if (obj.\u0005())
return false;
if (!obj.\u0004())
Application.Exit();
return true;
}
internal string \u0004()
{
string attribute = Guid.Empty.ToString("B");
try
{
string str1 = this.\u0004("Path");
if (str1.Length > 0 && !str1.EndsWith("\\"))
str1 += "\\";
string str2 = str1 + "{smartassembly}.license.xml";
if (System.IO.File.Exists(str2))
{
XmlTextReader xmlTextReader = new XmlTextReader(str2);
if (xmlTextReader.Read())
attribute = xmlTextReader.GetAttribute("LicenseID");
xmlTextReader.Close();
}
}
catch
{
}
return attribute;
}
internal void \u0003([In] Exception obj0, [In] bool obj1)
{
if (obj0 == null || obj0 is ThreadAbortException)
return;
\u0003.\u0003.\u0001 = true;
bool flag = true;
try
{
this.\u0001 = obj0;
this.\u0001 = (Hashtable) null;
this.\u0002 = (Hashtable) null;
\u0001 obj = new \u0001(this, obj0);
if ("{5b0a2f90-ba8d-4684-b47e-10b0542e6cf4}".ToLower() == this.\u0004().ToLower())
obj.\u0003();
if ("{5b0a2f90-ba8d-4684-b47e-10b0542e6cf4}".ToLower() == Guid.Empty.ToString("B").ToLower())
obj.\u0004();
if (!obj1)
obj.\u0005();
this.\u0003(obj);
flag = !obj.\u0006();
}
catch (ThreadAbortException ex)
{
}
catch (Exception ex)
{
this.\u0003(new \u0004.\u0003(ex));
}
this.\u0001 = (Exception) null;
this.\u0001 = (Hashtable) null;
this.\u0002 = (Hashtable) null;
\u0003.\u0003.\u0001 = false;
if (!flag)
return;
foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
{
try
{
string fullName = assembly.FullName;
if (fullName.EndsWith("31bf3856ad364e35"))
{
if (fullName.StartsWith("PresentationFramework,"))
{
object obj = assembly.GetType("System.Windows.Application").GetProperty("Current").GetGetMethod().Invoke((object) null, (object[]) null);
obj.GetType().GetMethod("Shutdown", new System.Type[0]).Invoke(obj, (object[]) null);
}
}
}
catch
{
}
}
Application.Exit();
try
{
Environment.Exit(0);
}
catch
{
}
}
private struct \u0001
{
public string \u0001;
public string \u0002;
public string \u0003;
public int \u0001;
}
private struct \u0002
{
public string \u0001;
public string \u0002;
public \u0002([In] string obj0, [In] string obj1)
{
this.\u0001 = obj0;
this.\u0002 = obj1;
}
}
private struct \u0003
{
public string \u0001;
public \u0003.\u0003.\u0002 \u0001;
[SpecialName]
public bool \u0003() => this.\u0001.Length == 0;
[SpecialName]
public static \u0003.\u0003.\u0003 \u0003() => new \u0003.\u0003.\u0003(string.Empty, string.Empty, string.Empty);
public \u0003([In] string obj0, [In] string obj1, [In] string obj2)
{
this.\u0001 = obj0;
this.\u0001 = new \u0003.\u0003.\u0002(obj1, obj2);
}
}
}
}