BMTune V1.99.9

This commit is contained in:
Bouletmarc 2022-11-04 09:02:19 -04:00
parent 2151bdb77b
commit 2ff07c1f4a
1605 changed files with 56124 additions and 0 deletions

Binary file not shown.

View File

@ -0,0 +1,95 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{15E3FE49-6A77-4D5C-927E-CA72304ABFB0}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>AppCryptor</RootNamespace>
<AssemblyName>AppCryptor</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>lock_3x_XqK_icon.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup>
<StartupObject>AppCryptor.Program</StartupObject>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Class_CreateFiles.cs" />
<Compile Include="Class_Crypter.cs" />
<Compile Include="Class_FileRenamer.cs" />
<Compile Include="Class_StringCrypter.cs" />
<Compile Include="Class_Text.cs" />
<Compile Include="Class_Variables.cs" />
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="alert2.wav" />
<Content Include="lock_3x_XqK_icon.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

25
AppCryptor/AppCryptor.sln Normal file
View File

@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.28803.352
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppCryptor", "AppCryptor.csproj", "{15E3FE49-6A77-4D5C-927E-CA72304ABFB0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{15E3FE49-6A77-4D5C-927E-CA72304ABFB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{15E3FE49-6A77-4D5C-927E-CA72304ABFB0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{15E3FE49-6A77-4D5C-927E-CA72304ABFB0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{15E3FE49-6A77-4D5C-927E-CA72304ABFB0}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {CCB088A9-1DF3-4FF5-88A9-C07E1A36F264}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,161 @@
using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Windows.Forms;
namespace AppCryptor
{
public class Class_CreateFiles
{
Form1 form1_0;
public Class_CreateFiles(ref Form1 Form1_1)
{
form1_0 = Form1_1;
}
public void RemoveFiles()
{
form1_0.ClearLogs();
form1_0.LogThis("----------------------------------------------");
form1_0.LogThis("Removing files at encrypted location...");
form1_0.Class_Text_0.ClearRemake();
int currenn = 0;
var matches = Directory.GetFiles(form1_0.ProjectLocationCrypted, "*", SearchOption.AllDirectories);
foreach (string file in matches)
{
form1_0.progressBar1.Value = (currenn * 100) / matches.Count<string>();
if (!file.Contains("BMTune_Installer")
&& !file.Contains("BMTune_Licenser")
&& !file.Contains("BMTune_Server")
&& !file.Contains("BMTune_Starter")
&& !file.Contains("BMTune_Uploader")
&& !file.Contains("BMTune_Encrypter")
&& !file.Contains("BMFuscator")
&& !file.Contains("BMTune_Packer")
&& !file.Contains("AppCryptor")
//&& !file.Contains(@"\bin\")
//&& !file.Contains(@"\Debug\")
//&& !file.Contains(@"\obj\")
&& (Path.GetExtension(file) == ".cs"
|| Path.GetExtension(file) == ".resx"
|| Path.GetExtension(file) == ".resources"
|| Path.GetExtension(file) == ".csproj"
|| Path.GetExtension(file) == ".zip"))
{
File.Delete(file);
if (form1_0.checkBox1.Checked) form1_0.LogThis("Removed: " + Path.GetFileName(file));
}
currenn++;
}
form1_0.progressBar1.Value = 0;
}
public void MakeFiles()
{
form1_0.LogThis("----------------------------------------------");
form1_0.LogThis("Copying files to encrypted location...");
int currenn = 0;
string AllFilesListSave = "";
var matches = Directory.GetFiles(form1_0.ProjectLocation, "*", SearchOption.AllDirectories);
foreach (string file in matches)
{
form1_0.progressBar1.Value = (currenn * 100) / matches.Count<string>();
if (!file.Contains("BMTune_Installer")
&& !file.Contains("BMTune_Licenser")
&& !file.Contains("BMTune_Server")
&& !file.Contains("BMTune_Starter")
&& !file.Contains("BMTune_Uploader")
&& !file.Contains("BMTune_Encrypter")
&& !file.Contains("BMFuscator")
&& !file.Contains("BMTune_Packer")
&& !file.Contains("AppCryptor")
//&& !file.Contains(@"\bin\")
//&& !file.Contains(@"\Debug\")
&& !file.Contains(@"\obj\")
&& (Path.GetExtension(file) == ".cs"
|| Path.GetExtension(file) == ".resx"
|| Path.GetExtension(file) == ".resources"
|| Path.GetExtension(file) == ".csproj"
|| Path.GetExtension(file) == ".zip"))
{
bool IsSaved = false;
while (!IsSaved)
{
string newfile = file.Replace(@"\BMTune2", @"\BMTune2_Crypted");
try
{
File.Create(newfile).Dispose();
File.WriteAllBytes(newfile, File.ReadAllBytes(file));
IsSaved = true;
if (form1_0.checkBox1.Checked) form1_0.LogThis("Created: " + Path.GetFileName(newfile));
AllFilesListSave += Path.GetFileName(newfile) + Environment.NewLine;
if (Path.GetExtension(file) == ".cs")
{
string CheckNamee = Path.GetFileName(file).Substring(0, Path.GetFileName(file).Length - 3);
form1_0.Class_Text_0.AddToNotEncrypt(CheckNamee);
form1_0.Class_Text_0.AddToNotEncryptClass(CheckNamee[0].ToString().ToLower() + CheckNamee.Substring(1) + "_0", form1_0.Class_Text_0.CreateCryptedText());
form1_0.Class_Text_0.AddToNotEncryptClass(CheckNamee[0].ToString().ToLower() + CheckNamee.Substring(1) + "_1", form1_0.Class_Text_0.CreateCryptedText());
form1_0.Class_Text_0.AddToNotEncryptClass(CheckNamee[0].ToString().ToUpper() + CheckNamee.Substring(1) + "_0", form1_0.Class_Text_0.CreateCryptedText());
form1_0.Class_Text_0.AddToNotEncryptClass(CheckNamee[0].ToString().ToUpper() + CheckNamee.Substring(1) + "_1", form1_0.Class_Text_0.CreateCryptedText());
if (CheckNamee.Contains("_"))
{
string TestCheck1 = CheckNamee.Split('_')[0];
CheckAndAddNotEncrypt(TestCheck1[0].ToString().ToLower() + CheckNamee.Substring(1) + "_0");
CheckAndAddNotEncrypt(TestCheck1[0].ToString().ToLower() + CheckNamee.Substring(1) + "_1");
CheckAndAddNotEncrypt(TestCheck1[0].ToString().ToUpper() + CheckNamee.Substring(1) + "_0");
CheckAndAddNotEncrypt(TestCheck1[0].ToString().ToUpper() + CheckNamee.Substring(1) + "_1");
}
}
}
catch (Exception mess)
{
form1_0.LogThis("CANT SAVE " + Path.GetFileName(file) + Environment.NewLine + mess);
Thread.Sleep(2000);
}
}
}
currenn++;
}
File.Create(Application.StartupPath + @"\FilesInfos.txt").Dispose();
File.WriteAllText(Application.StartupPath + @"\FilesInfos.txt", AllFilesListSave);
form1_0.progressBar1.Value = 0;
}
private void CheckAndAddNotEncrypt(string ThisCheck)
{
bool FoundIt = false;
for (int i = 0; i < form1_0.Class_Text_0.NotCryptedClassList.Count; i++)
{
if (form1_0.Class_Text_0.NotCryptedClassList[i] == ThisCheck) FoundIt = true;
}
if (!FoundIt) form1_0.Class_Text_0.AddToNotEncryptClass(ThisCheck, form1_0.Class_Text_0.CreateCryptedText());
}
}
}

722
AppCryptor/Class_Crypter.cs Normal file
View File

@ -0,0 +1,722 @@
using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Text.RegularExpressions;
namespace AppCryptor
{
public class Class_Crypter
{
Form1 form1_0;
public List<string> AllMethodsPublicAlreadyDone = new List<string>();
public List<string> AllMethodsPublicAlreadyDoneCrypted = new List<string>();
public List<string> AllClassSaved = new List<string>();
public List<string> AllClassRelocation = new List<string>();
public List<string> AllClassRelocationArray = new List<string>();
bool InDataFolder = false;
bool PublicFound = false;
public Class_Crypter(ref Form1 Form1_1)
{
form1_0 = Form1_1;
}
public void EncryptThisFile(string ThisssClass, bool InDataFolder1)
{
InDataFolder = InDataFolder1;
PublicFound = false;
if (AllMethodsPublicAlreadyDone != null) AllMethodsPublicAlreadyDone.Clear();
AllMethodsPublicAlreadyDone = new List<string>();
if (AllMethodsPublicAlreadyDoneCrypted != null) AllMethodsPublicAlreadyDoneCrypted.Clear();
AllMethodsPublicAlreadyDoneCrypted = new List<string>();
if (AllClassRelocation != null) AllClassRelocation.Clear();
AllClassRelocation = new List<string>();
if (AllClassRelocationArray != null) AllClassRelocationArray.Clear();
AllClassRelocationArray = new List<string>();
form1_0.ClearLogs();
form1_0.LogThis("----------------------------------------------");
form1_0.LogThis("Encrypting file " + ThisssClass + "...");
form1_0.label6.Text = "Doing: " + ThisssClass + " (2/5)";
form1_0.Refresh();
string pattern = @"\.cs$";
var matches = Directory.GetFiles(form1_0.ProjectLocationCrypted, "*", SearchOption.AllDirectories).Where(path => Regex.Match(path, pattern).Success);
//check in all '*.cs' files
foreach (string file in matches)
{
if (Path.GetFileName(file) == ThisssClass)
{
form1_0.AllCurrentClassLines = File.ReadAllLines(file);
form1_0.CurrentFile = file;
form1_0.CurrentClassName = Path.GetFileName(file).Substring(0, Path.GetFileName(file).Length - 3);
//if (form1_0.checkBox1.Checked) form1_0.LogThis("Encrypting " + Path.GetFileName(form1_0.CurrentFile));
DoAllThisFile();
DoAllPublicAtOnce();
//RelocateMethodInFile();
if (PublicFound) RedoAllFileForCurrentClassMethod();
}
}
}
public void DoAllThisFile()
{
int currenn = 0;
for (int i = 0; i < form1_0.AllCurrentClassLines.Length; i++)
{
form1_0.progressBar1.Value = (currenn * 100) / form1_0.AllCurrentClassLines.Length;
for (int i2 = 0; i2 < form1_0.Class_Variables_0.AllMethods.Count; i2++)
{
if (form1_0.Class_Variables_0.AllMethodsSource[i2] == Path.GetFileName(form1_0.CurrentFile) && form1_0.AllCurrentClassLines[i].Contains(form1_0.Class_Variables_0.AllMethods[i2]))
{
//LogThis("Testing (" + AllMethods[i2] + ") in " + CurrentClassName + ".cs" + " Line:" + (i + 1));
string LineStart = form1_0.AllCurrentClassLines[i];
form1_0.AllCurrentClassLines[i] = SearchAndReplace(form1_0.AllCurrentClassLines[i], form1_0.Class_Variables_0.AllMethods[i2], form1_0.Class_Variables_0.AllMethodsCrypted[i2], form1_0.Class_Variables_0.AllMethodsPublic[i2]);
if (form1_0.checkBox4.Checked) if (LineStart != form1_0.AllCurrentClassLines[i]) form1_0.LogThis("Replaced (" + form1_0.Class_Variables_0.AllMethods[i2] + ") in " + form1_0.CurrentClassName + ".cs" + " Line:" + (i + 1));
}
}
currenn++;
}
form1_0.progressBar1.Value = 0;
if (InDataFolder)
{
File.Create(form1_0.ProjectLocationCrypted + @"\Data\" + form1_0.CurrentClassName + ".cs").Dispose();
File.WriteAllLines(form1_0.ProjectLocationCrypted + @"\Data\" + form1_0.CurrentClassName + ".cs", form1_0.AllCurrentClassLines);
}
else
{
File.Create(form1_0.ProjectLocationCrypted + @"\" + form1_0.CurrentClassName + ".cs").Dispose();
File.WriteAllLines(form1_0.ProjectLocationCrypted + @"\" + form1_0.CurrentClassName + ".cs", form1_0.AllCurrentClassLines);
}
}
public string SearchAndReplace(string ThisLine, string StrFrom, string StrTo, bool IsPublic)
{
string StartLine = ThisLine;
//ThisLine = ThisLine.Replace(StrFrom, StrTo);
ThisLine = ThisLine.Replace(" " + StrFrom + " ", " " + StrTo + " ");
ThisLine = ThisLine.Replace(" " + StrFrom + ".", " " + StrTo + ".");
ThisLine = ThisLine.Replace(" " + StrFrom + "[", " " + StrTo + "[");
ThisLine = ThisLine.Replace(" " + StrFrom + "]", " " + StrTo + "]");
ThisLine = ThisLine.Replace(" " + StrFrom + "(", " " + StrTo + "(");
ThisLine = ThisLine.Replace(" " + StrFrom + ")", " " + StrTo + ")");
ThisLine = ThisLine.Replace(" " + StrFrom + ";", " " + StrTo + ";");
ThisLine = ThisLine.Replace(" " + StrFrom + ",", " " + StrTo + ",");
ThisLine = ThisLine.Replace(" " + StrFrom + "-", " " + StrTo + "-");
ThisLine = ThisLine.Replace(" " + StrFrom + "+", " " + StrTo + "+");
ThisLine = ThisLine.Replace("\t" + StrFrom + " ", "\t" + StrTo + " ");
ThisLine = ThisLine.Replace("\t" + StrFrom + ".", "\t" + StrTo + ".");
ThisLine = ThisLine.Replace("\t" + StrFrom + "[", "\t" + StrTo + "[");
ThisLine = ThisLine.Replace("\t" + StrFrom + "]", "\t" + StrTo + "]");
ThisLine = ThisLine.Replace("\t" + StrFrom + "(", "\t" + StrTo + "(");
ThisLine = ThisLine.Replace("\t" + StrFrom + ")", "\t" + StrTo + ")");
ThisLine = ThisLine.Replace("\t" + StrFrom + ";", "\t" + StrTo + ";");
ThisLine = ThisLine.Replace("\t" + StrFrom + ",", "\t" + StrTo + ",");
ThisLine = ThisLine.Replace("\t" + StrFrom + "-", "\t" + StrTo + "-");
ThisLine = ThisLine.Replace("\t" + StrFrom + "+", "\t" + StrTo + "+");
ThisLine = ThisLine.Replace("this." + StrFrom + " ", "this." + StrTo + " ");
ThisLine = ThisLine.Replace("this." + StrFrom + ".", "this." + StrTo + ".");
ThisLine = ThisLine.Replace("this." + StrFrom + "[", "this." + StrTo + "[");
ThisLine = ThisLine.Replace("this." + StrFrom + "]", "this." + StrTo + "]");
ThisLine = ThisLine.Replace("this." + StrFrom + "(", "this." + StrTo + "(");
ThisLine = ThisLine.Replace("this." + StrFrom + ")", "this." + StrTo + ")");
ThisLine = ThisLine.Replace("this." + StrFrom + ";", "this." + StrTo + ";");
ThisLine = ThisLine.Replace("this." + StrFrom + ",", "this." + StrTo + ",");
ThisLine = ThisLine.Replace("this." + StrFrom + "-", "this." + StrTo + "-");
ThisLine = ThisLine.Replace("this." + StrFrom + "+", "this." + StrTo + "+");
ThisLine = ThisLine.Replace("(" + StrFrom + " ", "(" + StrTo + " ");
ThisLine = ThisLine.Replace("(" + StrFrom + ".", "(" + StrTo + ".");
ThisLine = ThisLine.Replace("(" + StrFrom + "[", "(" + StrTo + "[");
ThisLine = ThisLine.Replace("(" + StrFrom + "]", "(" + StrTo + "]");
ThisLine = ThisLine.Replace("(" + StrFrom + "(", "(" + StrTo + "(");
ThisLine = ThisLine.Replace("(" + StrFrom + ")", "(" + StrTo + ")");
ThisLine = ThisLine.Replace("(" + StrFrom + ";", "(" + StrTo + ";");
ThisLine = ThisLine.Replace("(" + StrFrom + ",", "(" + StrTo + ",");
ThisLine = ThisLine.Replace("(" + StrFrom + "-", "(" + StrTo + "-");
ThisLine = ThisLine.Replace("(" + StrFrom + "+", "(" + StrTo + "+");
ThisLine = ThisLine.Replace("!" + StrFrom + " ", "!" + StrTo + " ");
ThisLine = ThisLine.Replace("!" + StrFrom + ".", "!" + StrTo + ".");
ThisLine = ThisLine.Replace("!" + StrFrom + "[", "!" + StrTo + "[");
ThisLine = ThisLine.Replace("!" + StrFrom + "]", "!" + StrTo + "]");
ThisLine = ThisLine.Replace("!" + StrFrom + "(", "!" + StrTo + "(");
ThisLine = ThisLine.Replace("!" + StrFrom + ")", "!" + StrTo + ")");
ThisLine = ThisLine.Replace("!" + StrFrom + ";", "!" + StrTo + ";");
ThisLine = ThisLine.Replace("!" + StrFrom + ",", "!" + StrTo + ",");
ThisLine = ThisLine.Replace("!" + StrFrom + "-", "!" + StrTo + "-");
ThisLine = ThisLine.Replace("!" + StrFrom + "+", "!" + StrTo + "+");
ThisLine = ThisLine.Replace("{" + StrFrom + " ", "{" + StrTo + " ");
ThisLine = ThisLine.Replace("{" + StrFrom + ".", "{" + StrTo + ".");
ThisLine = ThisLine.Replace("{" + StrFrom + "[", "{" + StrTo + "[");
ThisLine = ThisLine.Replace("{" + StrFrom + "]", "{" + StrTo + "]");
ThisLine = ThisLine.Replace("{" + StrFrom + "(", "{" + StrTo + "(");
ThisLine = ThisLine.Replace("{" + StrFrom + ")", "{" + StrTo + ")");
ThisLine = ThisLine.Replace("{" + StrFrom + ";", "{" + StrTo + ";");
ThisLine = ThisLine.Replace("{" + StrFrom + ",", "{" + StrTo + ",");
ThisLine = ThisLine.Replace("{" + StrFrom + "-", "{" + StrTo + "-");
ThisLine = ThisLine.Replace("{" + StrFrom + "+", "{" + StrTo + "+");
ThisLine = ThisLine.Replace("[" + StrFrom + " ", "[" + StrTo + " ");
ThisLine = ThisLine.Replace("[" + StrFrom + ".", "[" + StrTo + ".");
ThisLine = ThisLine.Replace("[" + StrFrom + "[", "[" + StrTo + "[");
ThisLine = ThisLine.Replace("[" + StrFrom + "]", "[" + StrTo + "]");
ThisLine = ThisLine.Replace("[" + StrFrom + "(", "[" + StrTo + "(");
ThisLine = ThisLine.Replace("[" + StrFrom + ")", "[" + StrTo + ")");
ThisLine = ThisLine.Replace("[" + StrFrom + ";", "[" + StrTo + ";");
ThisLine = ThisLine.Replace("[" + StrFrom + ",", "[" + StrTo + ",");
ThisLine = ThisLine.Replace("[" + StrFrom + "-", "[" + StrTo + "-");
ThisLine = ThisLine.Replace("[" + StrFrom + "+", "[" + StrTo + "+");
ThisLine = ThisLine.Replace(")" + StrFrom + " ", ")" + StrTo + " ");
ThisLine = ThisLine.Replace(")" + StrFrom + ".", ")" + StrTo + ".");
ThisLine = ThisLine.Replace(")" + StrFrom + "[", ")" + StrTo + "[");
ThisLine = ThisLine.Replace(")" + StrFrom + "]", ")" + StrTo + "]");
ThisLine = ThisLine.Replace(")" + StrFrom + "(", ")" + StrTo + "(");
ThisLine = ThisLine.Replace(")" + StrFrom + ")", ")" + StrTo + ")");
ThisLine = ThisLine.Replace(")" + StrFrom + ";", ")" + StrTo + ";");
ThisLine = ThisLine.Replace(")" + StrFrom + ",", ")" + StrTo + ",");
ThisLine = ThisLine.Replace(")" + StrFrom + "-", ")" + StrTo + "-");
ThisLine = ThisLine.Replace(")" + StrFrom + "+", ")" + StrTo + "+");
ThisLine = ThisLine.Replace("-" + StrFrom + " ", "-" + StrTo + " ");
ThisLine = ThisLine.Replace("-" + StrFrom + ".", "-" + StrTo + ".");
ThisLine = ThisLine.Replace("-" + StrFrom + "[", "-" + StrTo + "[");
ThisLine = ThisLine.Replace("-" + StrFrom + "]", "-" + StrTo + "]");
ThisLine = ThisLine.Replace("-" + StrFrom + "(", "-" + StrTo + "(");
ThisLine = ThisLine.Replace("-" + StrFrom + ")", "-" + StrTo + ")");
ThisLine = ThisLine.Replace("-" + StrFrom + ";", "-" + StrTo + ";");
ThisLine = ThisLine.Replace("-" + StrFrom + ",", "-" + StrTo + ",");
ThisLine = ThisLine.Replace("-" + StrFrom + "-", "-" + StrTo + "-");
ThisLine = ThisLine.Replace("-" + StrFrom + "+", "-" + StrTo + "+");
if (ThisLine == StartLine && InDataFolder && ThisLine.Contains(StrFrom))
{
ThisLine = ThisLine.Replace(StrFrom, StrTo);
}
//check already done
bool AllreadyDoneThisOne = false;
for (int i = 0; i < AllMethodsPublicAlreadyDone.Count; i++) if (AllMethodsPublicAlreadyDone[i] == StrFrom) AllreadyDoneThisOne = true;
if (AllreadyDoneThisOne) IsPublic = false;
//the reference is public then change within all files
if (IsPublic)
{
AllMethodsPublicAlreadyDone.Add(StrFrom);
AllMethodsPublicAlreadyDoneCrypted.Add(StrTo);
}
return ThisLine;
}
private void DoAllPublicAtOnce()
{
form1_0.ClearLogs();
form1_0.LogThis("----------------------------------------------");
form1_0.LogThis("Encrypting public variables from " + form1_0.CurrentClassName + ".cs...");
form1_0.label6.Text = "Doing: " + form1_0.CurrentClassName + ".cs (3/5)";
form1_0.Refresh();
int currenn = 0;
string pattern = @"\.cs$";
var matches = Directory.GetFiles(form1_0.ProjectLocationCrypted, "*", SearchOption.AllDirectories).Where(path => Regex.Match(path, pattern).Success);
//check in all '*.cs' files
foreach (string file in matches)
{
form1_0.progressBar1.Value = (currenn * 100) / matches.Count<string>();
//dont check in class13 since this is where we declare long variable
if (Path.GetFileName(file) != form1_0.CurrentClassName + ".cs")
{
string[] ClassLines = File.ReadAllLines(file);
bool Changed = false;
int CurlyCount = 0;
int CurlyLine = 0;
for (int i = 0; i < ClassLines.Length; i++)
{
string TestCheck1 = "ImpossibleStringMatch98124";
string TestCheck2 = "ImpossibleStringMatch98124";
if (form1_0.CurrentClassName.Contains("_"))
{
TestCheck1 = form1_0.CurrentClassName.Split('_')[0];
TestCheck2 = TestCheck1[0].ToString().ToLower() + TestCheck1.Substring(1);
}
if (ClassLines[i].Contains(form1_0.CurrentClassName)
|| ClassLines[i].Contains(form1_0.CurrentClassName[0].ToString().ToLower() + form1_0.CurrentClassName.Substring(1))
|| ClassLines[i].Contains(form1_0.CurrentClassName[0].ToString().ToUpper() + form1_0.CurrentClassName.Substring(1))
|| ClassLines[i].Contains(TestCheck1)
|| ClassLines[i].Contains(TestCheck2)
|| (ClassLines[i].Contains("new " + form1_0.CurrentClassName) && (ClassLines[i].Contains("{") || ClassLines[i + 1].Contains("{")))
|| CurlyCount > 0)
{
for (int i2 = 0; i2 < AllMethodsPublicAlreadyDone.Count; i2++)
{
string StrFrom = AllMethodsPublicAlreadyDone[i2];
string StrTo = AllMethodsPublicAlreadyDoneCrypted[i2];
string LineStart = ClassLines[i];
//exemple (this is doing array): new class { xval1, xval2, xval3, ... }
if (ClassLines[i].Contains("new " + form1_0.CurrentClassName) && (ClassLines[i].Contains("{") || ClassLines[i + 1].Contains("{")))
{
CurlyCount = 1;
CurlyLine = i;
if (!ClassLines[i].Contains("{") && ClassLines[i + 1].Contains("{")) CurlyLine++;
}
if (CurlyCount > 0)
{
//Console.WriteLine("searching in:" + Path.GetFileName(file) + " Line:" + (i + 1));
if (ClassLines[i].Contains(StrFrom))
{
ClassLines[i] = ClassLines[i].Replace(" " + StrFrom + " ", " " + StrTo + " ");
ClassLines[i] = ClassLines[i].Replace("\t" + StrFrom + " ", "\t" + StrTo + " ");
ClassLines[i] = ClassLines[i].Replace(" " + StrFrom + ";", " " + StrTo + ";");
ClassLines[i] = ClassLines[i].Replace("\t" + StrFrom + ";", "\t" + StrTo + ";");
ClassLines[i] = ClassLines[i].Replace(" " + StrFrom + ",", " " + StrTo + ",");
ClassLines[i] = ClassLines[i].Replace("\t" + StrFrom + ",", "\t" + StrTo + ",");
ClassLines[i] = ClassLines[i].Replace("." + StrFrom + ";", "." + StrTo + ";");
ClassLines[i] = ClassLines[i].Replace("." + StrFrom + ";", "." + StrTo + ";");
ClassLines[i] = ClassLines[i].Replace("." + StrFrom + ",", "." + StrTo + ",");
ClassLines[i] = ClassLines[i].Replace("." + StrFrom + ",", "." + StrTo + ",");
ClassLines[i] = ClassLines[i].Replace("." + StrFrom + " ", "." + StrTo + " ");
ClassLines[i] = ClassLines[i].Replace("." + StrFrom + " ", "." + StrTo + " ");
//aray (exemple class20_0[i].Int1)
/*if ((ClassLines[i].Contains(CurrentClassName + "_0[") && ClassLines[i].Contains("]." + StrFrom))
|| (ClassLines[i].Contains(CurrentClassName + "_1[") && ClassLines[i].Contains("]." + StrFrom)))
{
ClassLines[i] = ClassLines[i].Replace("]." + StrFrom, "]." + StrTo);
}*/
}
if (i != CurlyLine && CurlyCount > 0 && ClassLines[i].Contains("{")) CurlyCount++;
if (CurlyCount > 0 && ClassLines[i].Contains("}")) CurlyCount--;
}
string bufCName = form1_0.CurrentClassName;
ClassLines[i] = ReplaceThisLine(ClassLines[i], StrFrom, StrTo);
form1_0.CurrentClassName = form1_0.CurrentClassName[0].ToString().ToLower() + form1_0.CurrentClassName.Substring(1);
ClassLines[i] = ReplaceThisLine(ClassLines[i], StrFrom, StrTo);
form1_0.CurrentClassName = form1_0.CurrentClassName[0].ToString().ToUpper() + form1_0.CurrentClassName.Substring(1);
ClassLines[i] = ReplaceThisLine(ClassLines[i], StrFrom, StrTo);
if (form1_0.CurrentClassName.Contains("_"))
{
string[] splitttt = form1_0.CurrentClassName.Split('_');
form1_0.CurrentClassName = splitttt[0];
ClassLines[i] = ReplaceThisLine(ClassLines[i], StrFrom, StrTo);
form1_0.CurrentClassName = form1_0.CurrentClassName[0].ToString().ToLower() + form1_0.CurrentClassName.Substring(1);
ClassLines[i] = ReplaceThisLine(ClassLines[i], StrFrom, StrTo);
}
if (LineStart != ClassLines[i])
{
Changed = true;
if (form1_0.checkBox4.Checked) form1_0.LogThis("Replaced (" + StrFrom + ") in " + Path.GetFileName(file) + " Line:" + (i + 1));
}
form1_0.CurrentClassName = bufCName;
}
}
}
if (Changed)
{
PublicFound = true;
bool IsSaved = false;
while (!IsSaved)
{
try
{
File.Create(file).Dispose();
File.WriteAllLines(file, ClassLines);
IsSaved = true;
}
catch
{
form1_0.LogThis("CANT SAVE " + Path.GetFileName(file));
Thread.Sleep(500);
}
}
bool AlreadySaved = false;
for (int i = 0; i < AllClassSaved.Count; i++) if (Path.GetFileName(file) == AllClassSaved[i]) AlreadySaved = true;
if (!AlreadySaved) AllClassSaved.Add(Path.GetFileName(file));
}
}
currenn++;
}
form1_0.progressBar1.Value = 0;
}
private string ReplaceThisLine(string ClassLines, string StrFrom, string StrTo)
{
if (StrFrom.Contains("Delegate") || StrFrom.Contains("delegate"))
{
ClassLines = testreplace(ClassLines, form1_0.CurrentClassName + "." + StrFrom, form1_0.CurrentClassName + "." + StrTo);
}
else
{
ClassLines = testreplace(ClassLines, form1_0.CurrentClassName + "_0." + StrFrom, form1_0.CurrentClassName + "_0." + StrTo);
ClassLines = testreplace(ClassLines, form1_0.CurrentClassName + "_1." + StrFrom, form1_0.CurrentClassName + "_1." + StrTo);
ClassLines = testreplace(ClassLines, form1_0.CurrentClassName + "_2." + StrFrom, form1_0.CurrentClassName + "_2." + StrTo);
if (InDataFolder) ClassLines = testreplace(ClassLines, form1_0.CurrentClassName + "." + StrFrom, form1_0.CurrentClassName + "." + StrTo);
//class7_u_0[i, j].method_10(
//aray (exemple class20_0[i].Int1)
if ((ClassLines.Contains(form1_0.CurrentClassName + "_0[") && ClassLines.Contains("]." + StrFrom))
|| (ClassLines.Contains(form1_0.CurrentClassName + "_1[") && ClassLines.Contains("]." + StrFrom))
|| (ClassLines.Contains(form1_0.CurrentClassName + "_2[") && ClassLines.Contains("]." + StrFrom)))
{
if (IsCorrectAfter(ClassLines.Substring(ClassLines.LastIndexOf("]." + StrFrom) + ("]." + StrFrom).Length)))
{
string bufTest = ClassLines;
ClassLines = testreplace(ClassLines, "]." + StrFrom, "]." + StrTo);
if (ClassLines == bufTest) ClassLines = ClassLines.Replace("]." + StrFrom, "]." + StrTo);
}
}
//stack
if (ClassLines.Contains(form1_0.CurrentClassName + "_0.Peek()." + StrFrom)
|| ClassLines.Contains(form1_0.CurrentClassName + "_1.Peek()." + StrFrom)
|| ClassLines.Contains(form1_0.CurrentClassName + "_2.Peek()." + StrFrom))
{
ClassLines = testreplace(ClassLines, ")." + StrFrom, ")." + StrTo);
}
}
return ClassLines;
}
private void RelocateMethodInFile()
{
int currenn = 0;
string[] RemadeLines = new string[form1_0.AllCurrentClassLines.Length];
int CurrentLine = 0;
int CurlyCount = 0;
bool HasFoundClassName = false;
for (int i = 0; i < form1_0.AllCurrentClassLines.Length; i++)
{
form1_0.progressBar1.Value = (currenn * 100) / form1_0.AllCurrentClassLines.Length;
if (!HasFoundClassName)
{
if (form1_0.AllCurrentClassLines[i] != string.Empty)
{
RemadeLines[CurrentLine] = form1_0.AllCurrentClassLines[i];
CurrentLine++;
if (form1_0.AllCurrentClassLines[i].Contains("{"))
{
CurlyCount++;
HasFoundClassName = true;
}
}
}
else
{
//if (form1_0.AllCurrentClassLines[i].Contains("{")) CurlyCount++;
if (form1_0.AllCurrentClassLines[i].Contains("public ")
|| form1_0.AllCurrentClassLines[i].Contains("private ")
|| form1_0.AllCurrentClassLines[i].Contains("internal ")
|| form1_0.AllCurrentClassLines[i].Contains("void ")
|| form1_0.AllCurrentClassLines[i].Contains("string ")
|| form1_0.AllCurrentClassLines[i].Contains("byte ")
|| form1_0.AllCurrentClassLines[i].Contains("bool ")
|| form1_0.AllCurrentClassLines[i].Contains("double ")
|| form1_0.AllCurrentClassLines[i].Contains("int ")
|| form1_0.AllCurrentClassLines[i].Contains("long ")
|| form1_0.AllCurrentClassLines[i].Contains("long ")
|| form1_0.AllCurrentClassLines[i].Contains("DateTime "))
{
if (form1_0.AllCurrentClassLines[i].Contains("{") || form1_0.AllCurrentClassLines[i + 1].Contains("{"))
{
if (form1_0.AllCurrentClassLines[i].Contains("{"))
{
//Console.WriteLine("add:" + form1_0.AllCurrentClassLines[i]);
AllClassRelocationArray.Add(form1_0.AllCurrentClassLines[i] + "­~");
CurlyCount++;
i++;
}
else if (form1_0.AllCurrentClassLines[i + 1].Contains("{"))
{
//Console.WriteLine("add:" + form1_0.AllCurrentClassLines[i]);
//Console.WriteLine("add:" + form1_0.AllCurrentClassLines[i + 1]);
AllClassRelocationArray.Add(form1_0.AllCurrentClassLines[i] + "­~");
AllClassRelocationArray.Add(form1_0.AllCurrentClassLines[i + 1] + "­~");
CurlyCount++;
i++;
i++;
}
int StartCount = CurlyCount;
while (CurlyCount >= StartCount)
{
if (form1_0.AllCurrentClassLines[i] != string.Empty)
{
//Console.WriteLine("add:" + form1_0.AllCurrentClassLines[i]);
AllClassRelocationArray.Add(form1_0.AllCurrentClassLines[i] + "­~");
}
if (form1_0.AllCurrentClassLines[i].Contains("{")) CurlyCount++;
if (form1_0.AllCurrentClassLines[i].Contains("}")) CurlyCount--;
i++;
}
//Console.WriteLine("add:" + form1_0.AllCurrentClassLines[i]);
//Console.WriteLine("------------------------------------------------------");
//AllClassRelocationArray.Add(form1_0.AllCurrentClassLines[i]);
}
else
{
//Console.WriteLine("add:" + form1_0.AllCurrentClassLines[i]);
AllClassRelocation.Add(form1_0.AllCurrentClassLines[i]);
}
}
else
{
if (form1_0.AllCurrentClassLines[i] != string.Empty)
{
RemadeLines[CurrentLine] = form1_0.AllCurrentClassLines[i];
CurrentLine++;
}
}
if (CurlyCount > 0 && form1_0.AllCurrentClassLines[i].Contains("}"))
{
CurlyCount--;
if (CurlyCount == 0)
{
//CurrentLine--;
string LastLine = RemadeLines[CurrentLine];
Console.WriteLine(LastLine);
for (int i2 = 0; i2 < AllClassRelocation.Count; i2++)
{
RemadeLines[CurrentLine] = AllClassRelocation[i2];
//Console.WriteLine("test1:" + AllClassRelocation[i2]);
CurrentLine++;
}
for (int i2 = 0; i2 < AllClassRelocationArray.Count; i2++)
{
string[] SplitArray = AllClassRelocationArray[i2].Split('~');
for (int i3 = 0; i3 < SplitArray.Length; i3++)
{
if (SplitArray[i3] != string.Empty)
{
RemadeLines[CurrentLine] = SplitArray[i3];
Console.WriteLine("test1:" + SplitArray[i3]);
CurrentLine++;
}
}
}
RemadeLines[CurrentLine] = LastLine;
CurrentLine++;
}
}
}
currenn++;
}
string[] Remade2 = new string[RemadeLines.Length];
for (int i = 0; i < RemadeLines.Length; i++) Remade2[i] = RemadeLines[i];
form1_0.progressBar1.Value = 0;
if (InDataFolder)
{
File.Create(form1_0.ProjectLocationCrypted + @"\Data\" + form1_0.CurrentClassName + ".cs").Dispose();
File.WriteAllLines(form1_0.ProjectLocationCrypted + @"\Data\" + form1_0.CurrentClassName + ".cs", Remade2);
}
else
{
File.Create(form1_0.ProjectLocationCrypted + @"\" + form1_0.CurrentClassName + ".cs").Dispose();
File.WriteAllLines(form1_0.ProjectLocationCrypted + @"\" + form1_0.CurrentClassName + ".cs", Remade2);
}
}
private bool IsCorrectAfter(string ClassLines)
{
bool Correct = true;
if (ClassLines.Length > 0)
{
//Console.WriteLine(ClassLines);
if (ClassLines[0] == '0') Correct = false;
if (ClassLines[0] == '1') Correct = false;
if (ClassLines[0] == '2') Correct = false;
if (ClassLines[0] == '3') Correct = false;
if (ClassLines[0] == '4') Correct = false;
if (ClassLines[0] == '5') Correct = false;
if (ClassLines[0] == '6') Correct = false;
if (ClassLines[0] == '7') Correct = false;
if (ClassLines[0] == '8') Correct = false;
if (ClassLines[0] == '9') Correct = false;
if (ClassLines[0] == '_') Correct = false;
}
//else Correct = false;
return Correct;
}
private string testreplace(string ClassLines, string StrFrom, string StrTo)
{
ClassLines = ClassLines.Replace(StrFrom + " ", StrTo + " ");
ClassLines = ClassLines.Replace(StrFrom + ".", StrTo + ".");
ClassLines = ClassLines.Replace(StrFrom + "[", StrTo + "[");
ClassLines = ClassLines.Replace(StrFrom + "]", StrTo + "]");
ClassLines = ClassLines.Replace(StrFrom + "(", StrTo + "(");
ClassLines = ClassLines.Replace(StrFrom + ")", StrTo + ")");
ClassLines = ClassLines.Replace(StrFrom + ";", StrTo + ";");
ClassLines = ClassLines.Replace(StrFrom + ",", StrTo + ",");
ClassLines = ClassLines.Replace(StrFrom + "{", StrTo + "{");
ClassLines = ClassLines.Replace(StrFrom + "}", StrTo + "}");
ClassLines = ClassLines.Replace(StrFrom + "!", StrTo + "!");
ClassLines = ClassLines.Replace(StrFrom + ":", StrTo + ":");
return ClassLines;
}
public void RedoAllFileForCurrentClassMethod()
{
//form1_0.ClearLogs();
//form1_0.LogThis("----------------------------------------------");
//form1_0.LogThis("Encrypting Filename variables from " + form1_0.CurrentClassName + ".cs...");
int currenn = 0;
bool Changed = false;
form1_0.label6.Text = "Doing: " + form1_0.CurrentClassName + ".cs (4/5)";
form1_0.Refresh();
string pattern = @"\.cs$";
var matches = Directory.GetFiles(form1_0.ProjectLocationCrypted, "*", SearchOption.AllDirectories).Where(path => Regex.Match(path, pattern).Success);
//check in all '*.cs' files
foreach (string file in matches)
{
form1_0.progressBar1.Value = (currenn * 100) / matches.Count<string>();
string[] ClassLines = File.ReadAllLines(file);
string TestCheck1 = "ImpossibleStringMatch98124";
string TestCheck2 = "ImpossibleStringMatch98124";
if (form1_0.CurrentClassName.Contains("_"))
{
TestCheck1 = form1_0.CurrentClassName.Split('_')[0];
TestCheck2 = TestCheck1[0].ToString().ToLower() + TestCheck1.Substring(1);
}
for (int i = 0; i < ClassLines.Length; i++)
{
string LineStart = ClassLines[i];
if (ClassLines[i].Contains(form1_0.CurrentClassName)
|| ClassLines[i].Contains(form1_0.CurrentClassName[0].ToString().ToLower() + form1_0.CurrentClassName.Substring(1))
|| ClassLines[i].Contains(form1_0.CurrentClassName[0].ToString().ToUpper() + form1_0.CurrentClassName.Substring(1))
|| ClassLines[i].Contains(TestCheck1)
|| ClassLines[i].Contains(TestCheck2))
{
for (int i2 = 0; i2 < form1_0.Class_Text_0.NotCryptedClassList.Count; i2++)
{
if (form1_0.Class_Text_0.NotCryptedClassList[i2].Contains(form1_0.CurrentClassName)
|| form1_0.Class_Text_0.NotCryptedClassList[i2].Contains(form1_0.CurrentClassName[0].ToString().ToLower() + form1_0.CurrentClassName.Substring(1))
|| form1_0.Class_Text_0.NotCryptedClassList[i2].Contains(form1_0.CurrentClassName[0].ToString().ToUpper() + form1_0.CurrentClassName.Substring(1)))
{
ClassLines[i] = ClassLines[i].Replace(form1_0.Class_Text_0.NotCryptedClassList[i2], form1_0.Class_Text_0.NotCryptedClassListCrypted[i2]);
if (LineStart != ClassLines[i])
{
Changed = true;
if (form1_0.checkBox4.Checked) form1_0.LogThis("Replaced (" + form1_0.Class_Text_0.NotCryptedClassList[i2] + ") in " + Path.GetFileName(file) + " Line:" + (i + 1));
}
}
}
}
}
if (Changed)
{
bool IsSaved = false;
while (!IsSaved)
{
try
{
File.Create(file).Dispose();
File.WriteAllLines(file, ClassLines);
IsSaved = true;
}
catch
{
form1_0.LogThis("CANT SAVE " + Path.GetFileName(file));
Thread.Sleep(500);
}
}
}
currenn++;
}
form1_0.progressBar1.Value = 0;
}
}
}

View File

@ -0,0 +1,259 @@
using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Text.RegularExpressions;
namespace AppCryptor
{
public class Class_FileRenamer
{
Form1 form1_0;
public List<string> AllFilenameDone = new List<string>();
public List<string> AllFilenameDoneCrypted = new List<string>();
public string ClassStarterDefault = "Class22_startup";
public string ClassStarter = "";
public Class_FileRenamer(ref Form1 Form1_1)
{
form1_0 = Form1_1;
}
public void RemadeAllFilenames()
{
form1_0.ClearLogs();
form1_0.LogThis("----------------------------------------------");
form1_0.LogThis("Renaming Files names...");
if (AllFilenameDone != null) AllFilenameDone.Clear();
AllFilenameDone = new List<string>();
if (AllFilenameDoneCrypted != null) AllFilenameDoneCrypted.Clear();
AllFilenameDoneCrypted = new List<string>();
int currenn = 0;
string pattern = @"\.cs$";
var matches = Directory.GetFiles(form1_0.ProjectLocationCrypted, "*", SearchOption.AllDirectories).Where(path => Regex.Match(path, pattern).Success);
//check in all '*.cs' files
foreach (string file in matches)
{
form1_0.progressBar1.Value = (currenn * 100) / matches.Count<string>();
if (!file.Contains("BMTune_Installer")
&& !file.Contains("BMTune_Licenser")
&& !file.Contains("BMTune_Server")
&& !file.Contains("BMTune_Starter")
&& !file.Contains("BMTune_Uploader")
&& !file.Contains("BMTune_Encrypter")
&& !file.Contains("BMFuscator")
&& !file.Contains("BMTune_Packer")
&& !file.Contains("AppCryptor")
&& !file.Contains("Resources.Designer.cs")
&& !file.Contains("AssemblyInfo.cs")
&& !file.Contains("DoNotObfuscate.cs")
&& !file.Contains("WebClient.cs")
&& !file.Contains(@"\bin\")
&& !file.Contains(@"\Debug\")
&& !file.Contains(@"\obj\")
&& !file.Contains(@".zip"))
{
string PreviousFName = Path.GetFileNameWithoutExtension(file);
string NewFName = form1_0.Class_Text_0.CreateCryptedTextNumber(4, 5);
if (file.Contains(ClassStarterDefault)) ClassStarter = NewFName;
while (HasThisFileName(NewFName))
{
NewFName = form1_0.Class_Text_0.CreateCryptedTextNumber(4, 5);
}
form1_0.AllCurrentClassLines = File.ReadAllLines(file);
form1_0.CurrentClassName = Path.GetFileName(file).Substring(0, Path.GetFileName(file).Length - 3);
if (form1_0.checkBox1.Checked) form1_0.LogThis("Renaming File: " + Path.GetFileName(file));
for (int i = 0; i < form1_0.AllCurrentClassLines.Length; i++)
{
form1_0.AllCurrentClassLines[i] = form1_0.AllCurrentClassLines[i].Replace(" " + PreviousFName, " " + NewFName);
}
string Dirrr = new DirectoryInfo(Path.GetDirectoryName(file)).Name;
if (Dirrr == "BMTune2_Crypted") Dirrr = "";
string FilenameSave = form1_0.ProjectLocationCrypted + @"\" + NewFName;
if (Dirrr != "") FilenameSave = form1_0.ProjectLocationCrypted + @"\" + Dirrr + @"\" + NewFName;
if (Dirrr == "Settings") FilenameSave = form1_0.ProjectLocationCrypted + @"\Dal\" + Dirrr + @"\" + NewFName;
string FilenameOldSave = form1_0.ProjectLocationCrypted + @"\" + PreviousFName;
if (Dirrr != "") FilenameOldSave = form1_0.ProjectLocationCrypted + @"\" + Dirrr + @"\" + PreviousFName;
if (Dirrr == "Settings") FilenameOldSave = form1_0.ProjectLocationCrypted + @"\Dal\" + Dirrr + @"\" + PreviousFName;
File.Create(FilenameSave + ".cs").Dispose();
File.WriteAllLines(FilenameSave + ".cs", form1_0.AllCurrentClassLines);
if (File.Exists(FilenameOldSave + ".resx"))
{
File.Create(FilenameSave + ".resx").Dispose();
File.WriteAllBytes(FilenameSave + ".resx", File.ReadAllBytes(FilenameOldSave + ".resx"));
File.Delete(FilenameOldSave + ".resx");
}
if (File.Exists(FilenameOldSave + ".cs")) File.Delete(FilenameOldSave + ".cs");
/*PreviousFName2 = PreviousFName;
NewFName2 = NewFName;
BackgroundWorker buffworker = new BackgroundWorker();
buffworker.WorkerSupportsCancellation = false;
buffworker.WorkerReportsProgress = false;
buffworker.DoWork += new DoWorkEventHandler(this.backgroundWorker_0_DoWork);
buffworker.RunWorkerAsync();*/
AllFilenameDone.Add(PreviousFName);
AllFilenameDoneCrypted.Add(NewFName);
this.form1_0.Class_Variables_0.AllMethods.Add(PreviousFName);
this.form1_0.Class_Variables_0.AllMethodsCrypted.Add(NewFName);
//RenameInAllFiles(" " + PreviousFName, " " + NewFName);
//RenameIncsproj(PreviousFName, NewFName);
}
currenn++;
}
form1_0.progressBar1.Value = 0;
RenameInAllFiles();
RenameIncsproj();
}
public bool HasThisFileName(string ThisM)
{
for (int i = 0; i < AllFilenameDone.Count; i++) if (AllFilenameDone[i] == ThisM) return true;
return false;
}
//private void RenameInAllFiles(string OldStr, string NewStr)
private void RenameInAllFiles()
{
int currenn = 0;
string pattern = @"\.cs$";
var matches = Directory.GetFiles(form1_0.ProjectLocationCrypted, "*", SearchOption.AllDirectories).Where(path => Regex.Match(path, pattern).Success);
//check in all '*.cs' files
foreach (string file in matches)
{
form1_0.progressBar1.Value = (currenn * 100) / matches.Count<string>();
if (!file.Contains("BMTune_Installer")
&& !file.Contains("BMTune_Licenser")
&& !file.Contains("BMTune_Server")
&& !file.Contains("BMTune_Starter")
&& !file.Contains("BMTune_Uploader")
&& !file.Contains("BMTune_Encrypter")
&& !file.Contains("BMFuscator")
&& !file.Contains("BMTune_Packer")
&& !file.Contains("AppCryptor")
&& !file.Contains(@"\bin\")
&& !file.Contains(@"\Debug\")
&& !file.Contains(@"\obj\")
&& !file.Contains(@".zip"))
{
//try
if (Path.GetFileName(file) != form1_0.CurrentClassName + ".cs")
{
form1_0.AllCurrentClassLines = File.ReadAllLines(file);
for (int i = 0; i < form1_0.AllCurrentClassLines.Length; i++)
{
if (form1_0.AllCurrentClassLines[i] != string.Empty
|| form1_0.AllCurrentClassLines[i].Replace("\t", "") != string.Empty
|| form1_0.AllCurrentClassLines[i].Replace("\t", "") != "{"
|| form1_0.AllCurrentClassLines[i].Replace("\t", "") != "}"
|| form1_0.AllCurrentClassLines[i].Replace(" ", "") != string.Empty)
{
for (int i2 = 0; i2 < AllFilenameDone.Count; i2++)
{
string StartLine = form1_0.AllCurrentClassLines[i];
string OldStr = AllFilenameDone[i2];
string NewStr = AllFilenameDoneCrypted[i2];
form1_0.AllCurrentClassLines[i] = form1_0.AllCurrentClassLines[i].Replace(OldStr, NewStr);
if (form1_0.AllCurrentClassLines[i] != StartLine) if (form1_0.checkBox4.Checked) form1_0.LogThis("Changed Filename: " + OldStr);
}
}
}
File.Create(file).Dispose();
File.WriteAllLines(file, form1_0.AllCurrentClassLines);
}
//catch { }
}
currenn++;
}
form1_0.progressBar1.Value = 0;
}
//private void RenameIncsproj(string OldStr, string NewStr)
private void RenameIncsproj()
{
string pattern = @"\.csproj$";
var matches = Directory.GetFiles(form1_0.ProjectLocationCrypted, "*", SearchOption.AllDirectories).Where(path => Regex.Match(path, pattern).Success);
//check in all '*.cs' files
foreach (string file in matches)
{
if (!file.Contains("BMTune_Installer")
&& !file.Contains("BMTune_Licenser")
&& !file.Contains("BMTune_Server")
&& !file.Contains("BMTune_Starter")
&& !file.Contains("BMTune_Uploader")
&& !file.Contains("BMTune_Encrypter")
&& !file.Contains("BMFuscator")
&& !file.Contains("BMTune_Packer")
&& !file.Contains("AppCryptor")
&& !file.Contains(@"\bin\")
&& !file.Contains(@"\Debug\")
&& !file.Contains(@"\obj\")
&& !file.Contains(@".zip"))
{
form1_0.AllCurrentClassLines = File.ReadAllLines(file);
for (int i = 0; i < form1_0.AllCurrentClassLines.Length; i++)
{
if (form1_0.AllCurrentClassLines[i] != string.Empty
|| form1_0.AllCurrentClassLines[i].Replace("\t", "") != string.Empty
|| form1_0.AllCurrentClassLines[i].Replace("\t", "") != "{"
|| form1_0.AllCurrentClassLines[i].Replace("\t", "") != "}"
|| form1_0.AllCurrentClassLines[i].Replace(" ", "") != string.Empty)
{
for (int i2 = 0; i2 < AllFilenameDone.Count; i2++)
{
string OldStr = AllFilenameDone[i2];
string NewStr = AllFilenameDoneCrypted[i2];
form1_0.AllCurrentClassLines[i] = form1_0.AllCurrentClassLines[i].Replace(OldStr + ".cs", NewStr + ".cs");
form1_0.AllCurrentClassLines[i] = form1_0.AllCurrentClassLines[i].Replace(OldStr + ".resx", NewStr + ".resx");
}
form1_0.AllCurrentClassLines[i] = form1_0.AllCurrentClassLines[i].Replace("<StartupObject>" + ClassStarterDefault, "<StartupObject>" + ClassStarter);
}
}
File.Create(file).Dispose();
File.WriteAllLines(file, form1_0.AllCurrentClassLines);
}
}
}
}
}

View File

@ -0,0 +1,295 @@
using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Text.RegularExpressions;
namespace AppCryptor
{
public class Class_StringCrypter
{
Form1 form1_0;
bool HasFoundString = false;
bool IsStaticClass = false;
Random rnd = new Random();
int CryptedStringNumber = 0;
int CryptedStringNumber2 = 0;
public Class_StringCrypter(ref Form1 Form1_1)
{
form1_0 = Form1_1;
}
public void EncryptStringInFile(string ThisssClass, bool InDataFolder)
{
form1_0.ClearLogs();
form1_0.LogThis("----------------------------------------------");
form1_0.LogThis("Encrypting string in file " + ThisssClass + "...");
CryptedStringNumber = rnd.Next(15, 189);
CryptedStringNumber2 = rnd.Next(15, 189);
form1_0.label6.Text = "Doing: " + ThisssClass + ".cs (5/5)";
form1_0.Refresh();
HasFoundString = false;
IsStaticClass = false;
form1_0.listBox2.Items.Clear();
string pattern = @"\.cs$";
var matches = Directory.GetFiles(form1_0.ProjectLocationCrypted, "*", SearchOption.AllDirectories).Where(path => Regex.Match(path, pattern).Success);
//check in all '*.cs' files
foreach (string file in matches)
{
if (!file.Contains("BMTune_Installer")
&& !file.Contains("BMTune_Licenser")
&& !file.Contains("BMTune_Server")
&& !file.Contains("BMTune_Starter")
&& !file.Contains("BMTune_Uploader")
&& !file.Contains("BMTune_Encrypter")
&& !file.Contains("BMFuscator")
&& !file.Contains("BMTune_Packer")
&& !file.Contains("AppCryptor")
&& !file.Contains("Resources.Designer.cs")
&& Path.GetFileName(file) == ThisssClass
&& ((InDataFolder && file.Contains(@"\Data\")) || (!InDataFolder))
&& !file.Contains(@"\bin\")
&& !file.Contains(@"\Debug\")
&& !file.Contains(@"\obj\"))
{
form1_0.AllCurrentClassLines = File.ReadAllLines(file);
form1_0.CurrentClassName = Path.GetFileName(file).Substring(0, Path.GetFileName(file).Length - 3);
for (int i = 0; i < form1_0.AllCurrentClassLines.Length; i++)
{
if (form1_0.AllCurrentClassLines[i].Contains("internal static class " + form1_0.CurrentClassName)) IsStaticClass = true;
form1_0.progressBar1.Value = (i * 100) / form1_0.AllCurrentClassLines.Length;
form1_0.AllCurrentClassLines[i] = ConvertStringToCrypting(form1_0.AllCurrentClassLines[i]);
}
form1_0.progressBar1.Value = 0;
if (HasFoundString) CreateCryptingStringMethod();
if (InDataFolder)
{
File.Create(form1_0.ProjectLocationCrypted + @"\Data\" + form1_0.CurrentClassName + ".cs").Dispose();
File.WriteAllLines(form1_0.ProjectLocationCrypted + @"\Data\" + form1_0.CurrentClassName + ".cs", form1_0.AllCurrentClassLines);
}
else
{
File.Create(form1_0.ProjectLocationCrypted + @"\" + form1_0.CurrentClassName + ".cs").Dispose();
File.WriteAllLines(form1_0.ProjectLocationCrypted + @"\" + form1_0.CurrentClassName + ".cs", form1_0.AllCurrentClassLines);
}
}
}
form1_0.Refresh();
}
private string ConvertStringToCrypting(string ThisLine)
{
if (ThisLine.Contains(@""""))
{
string[] splitcmdds = ThisLine.Split('"');
//1,3,5,7... = entry
for (int i = 1; i < splitcmdds.Length; i += 2)
{
string checkbefore = splitcmdds[i - 1];
string CurrentCheck = splitcmdds[i];
bool CanGo = true;
if (checkbefore.Length > 0) if (checkbefore[checkbefore.Length - 1] == '@') CanGo = false;
if (ThisLine.Contains("ManagementObject(")) CanGo = false;
if (ThisLine.Contains("@echo off")) CanGo = false;
if (HasUndesiredChar(CurrentCheck)) CanGo = false;
if (CurrentCheck == "") CanGo = false;
if (CurrentCheck.Length > 1)
{
if (CurrentCheck[0] == '\\' && CurrentCheck[1] == 'n' && CurrentCheck.Length == 2) ThisLine = ThisLine.Replace(@"""" + CurrentCheck + @"""", "Environment.NewLine");
//if (CurrentCheck[0] == '\\' && CurrentCheck[1] == 'n') CanGo = false; // \n
//if (CurrentCheck[0] == '\\' && CurrentCheck[1] == 'r') CanGo = false; // \r
}
/*if (CurrentCheck.Length > 3)
{
if (CurrentCheck[0] == '\\' && CurrentCheck[1] == 'r' && CurrentCheck[3] == '\\' && CurrentCheck[4] == 'n') CanGo = false; // \r\n
if (CurrentCheck[0] == '\\' && CurrentCheck[1] == 'n' && CurrentCheck[3] == '\\' && CurrentCheck[4] == 'r') CanGo = false; // \n\r
}*/
if (CanGo)
{
string OnlyCrypted = GetString(CurrentCheck);
string Encrypted = "";
for (int i2 = 0; i2 < OnlyCrypted.Length - 1; i2++)
{
string DoNowww = OnlyCrypted[i2].ToString() + OnlyCrypted[i2 + 1].ToString();
if (i2 != 0) Encrypted += " + ";
Encrypted += @"Thatteee(""" + DoNowww + @""")";
i2++;
}
ThisLine = ThisLine.Replace(@"""" + CurrentCheck + @"""", Encrypted);
form1_0.listBox2.Items.Add(CurrentCheck);
HasFoundString = true;
}
}
}
return ThisLine;
}
public bool HasUndesiredChar(string str)
{
char LastChar = ' ';
bool Undesired = false;
foreach (char c in str)
{
if (LastChar == '\\' && c == 'n') Undesired = true;
if (LastChar == '\\' && c == 't') Undesired = true;
if (LastChar == '\\' && c == 'r') Undesired = true;
LastChar = c;
}
return Undesired;
}
public string GetString(string ThisString)
{
//ThisString = GetString2(ThisString);
int[] ThisArray = new int[ThisString.Length];
for (int i = 0; i < ThisArray.Length; i++)
{
//ThisArray[i] = (Int32)ThisString[i];
ThisArray[i] = CryptedStringNumber2;
//ThisArray[i] = (Int32)ThisString[i] + CryptedStringNumber2;
if (ThisArray[i] > 255) ThisArray[i] -= 256;
ThisArray[i] += (Int32)ThisString[i];
if (ThisArray[i] > 255) ThisArray[i] -= 256;
ThisArray[i] += CryptedStringNumber;
if (ThisArray[i] > 255) ThisArray[i] -= 256;
}
string ReturnText = "";
for (int i = 0; i < ThisArray.Length; i++)
{
ReturnText += ThisArray[i].ToString("X2");
}
return ReturnText;
}
/*public string GetString2(string ThisString)
{
int[] ThisArray = new int[ThisString.Length];
for (int i = 0; i < ThisArray.Length; i++)
{
ThisArray[i] = (Int32)ThisString[i];
ThisArray[i] -= CryptedStringNumber2;
if (ThisArray[i] < 0) ThisArray[i] += 256;
}
string ReturnText = "";
for (int i = 0; i < ThisArray.Length; i++)
{
ReturnText += ThisArray[i].ToString("X2");
}
return ReturnText;
}*/
private void RepackWithEncryptedString()
{
string CrypteddString1 = form1_0.Class_Text_0.CreateCryptedText();
string CrypteddString2 = form1_0.Class_Text_0.CreateCryptedText();
string CrypteddString3 = form1_0.Class_Text_0.CreateCryptedText();
string CrypteddString4 = form1_0.Class_Text_0.CreateCryptedText();
//string CrypteddString5 = form1_0.Class_Text_0.CreateCryptedText();
//string CrypteddString6 = form1_0.Class_Text_0.CreateCryptedText();
for (int i = 0; i < form1_0.AllCurrentClassLines.Length; i++)
{
form1_0.AllCurrentClassLines[i] = form1_0.Class_Crypter_0.SearchAndReplace(form1_0.AllCurrentClassLines[i], "Thatteee", CrypteddString1, false);
form1_0.AllCurrentClassLines[i] = form1_0.Class_Crypter_0.SearchAndReplace(form1_0.AllCurrentClassLines[i], "Returningere", CrypteddString2, false);
form1_0.AllCurrentClassLines[i] = form1_0.Class_Crypter_0.SearchAndReplace(form1_0.AllCurrentClassLines[i], "Thistere", CrypteddString3, false);
form1_0.AllCurrentClassLines[i] = form1_0.Class_Crypter_0.SearchAndReplace(form1_0.AllCurrentClassLines[i], "Hexefsfe", CrypteddString4, false);
//form1_0.AllCurrentClassLines[i] = form1_0.Class_Crypter_0.SearchAndReplace(form1_0.AllCurrentClassLines[i], "Thatnertee", CrypteddString5, false);
//form1_0.AllCurrentClassLines[i] = form1_0.Class_Crypter_0.SearchAndReplace(form1_0.AllCurrentClassLines[i], "Henrdfe", CrypteddString6, false);
}
}
private void CreateCryptingStringMethod()
{
List<string> RemadeAllLines = new List<string>();
for (int i = 0; i < form1_0.AllCurrentClassLines.Length; i++)
{
RemadeAllLines.Add(form1_0.AllCurrentClassLines[i]);
if (i == form1_0.AllCurrentClassLines.Length - 3)
{
RemadeAllLines.Add("");
if (!IsStaticClass) RemadeAllLines.Add(" private string Thatteee(string Hexefsfe)");
else RemadeAllLines.Add(" private static string Thatteee(string Hexefsfe)");
RemadeAllLines.Add(" {");
RemadeAllLines.Add(@" string Returningere = """";");
RemadeAllLines.Add(@" while (Hexefsfe != """")");
RemadeAllLines.Add(" {");
RemadeAllLines.Add(" try");
RemadeAllLines.Add(" {");
RemadeAllLines.Add(" int Thistere = Int32.Parse(Hexefsfe.Substring(0, 2), System.Globalization.NumberStyles.AllowHexSpecifier) - " + CryptedStringNumber + ";");
RemadeAllLines.Add(" if (Thistere < 0) Thistere = 256 + Thistere;");
RemadeAllLines.Add(" Thistere -= " + CryptedStringNumber2 + ";");
RemadeAllLines.Add(" if (Thistere < 0) Thistere = 256 + Thistere;");
RemadeAllLines.Add(" Returningere += Convert.ToChar(Thistere).ToString();");
RemadeAllLines.Add(" Hexefsfe = Hexefsfe.Substring(2);");
RemadeAllLines.Add(" }");
RemadeAllLines.Add(@" catch { Hexefsfe = """"; }");
RemadeAllLines.Add(" }");
RemadeAllLines.Add(" return Returningere;");
//RemadeAllLines.Add(" return Thatnertee(Returningere);");
RemadeAllLines.Add(" }");
/*if (!IsStaticClass) RemadeAllLines.Add(" private string Thatnertee(string Henrdfe)");
else RemadeAllLines.Add(" private static string Thatnertee(string Henrdfe)");
RemadeAllLines.Add(" {");
RemadeAllLines.Add(@" string Returningere = """";");
RemadeAllLines.Add(@" while (Henrdfe != """")");
RemadeAllLines.Add(" {");
RemadeAllLines.Add(" try");
RemadeAllLines.Add(" {");
RemadeAllLines.Add(" int Thistere = Int32.Parse(Henrdfe.Substring(0, 2), System.Globalization.NumberStyles.AllowHexSpecifier) + " + CryptedStringNumber2 + ";");
RemadeAllLines.Add(" if (Thistere > 255) Thistere = 0;");
RemadeAllLines.Add(" Returningere += Convert.ToChar(Thistere).ToString();");
RemadeAllLines.Add(" Henrdfe = Henrdfe.Substring(2);");
RemadeAllLines.Add(" }");
RemadeAllLines.Add(@" catch { Henrdfe = """"; }");
RemadeAllLines.Add(" }");
RemadeAllLines.Add(" return Returningere;");
RemadeAllLines.Add(" }");*/
}
}
form1_0.AllCurrentClassLines = new string[RemadeAllLines.Count];
for (int i = 0; i < RemadeAllLines.Count; i++) form1_0.AllCurrentClassLines[i] = RemadeAllLines[i];
RepackWithEncryptedString();
}
}
}

437
AppCryptor/Class_Text.cs Normal file
View File

@ -0,0 +1,437 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace AppCryptor
{
public class Class_Text
{
public List<string> CryptedTextStr;
public List<string> CryptedTextStrUpper;
public List<string> CryptedTextStrNumber;
public List<string> NotCryptedText;
public List<string> NotCryptedClassList;
public List<string> NotCryptedClassListCrypted;
public List<string> CryptedTextAllString;
public List<string> CryptedTextAllNumber;
Random rnd = new Random();
Form1 form1_0;
public Class_Text(ref Form1 Form1_1)
{
form1_0 = Form1_1;
}
public void CreateList()
{
if (NotCryptedClassList != null) NotCryptedClassList.Clear();
NotCryptedClassList = new List<string>();
if (NotCryptedClassListCrypted != null) NotCryptedClassListCrypted.Clear();
NotCryptedClassListCrypted = new List<string>();
if (CryptedTextAllString != null) CryptedTextAllString.Clear();
CryptedTextAllString = new List<string>();
if (CryptedTextAllNumber != null) CryptedTextAllNumber.Clear();
CryptedTextAllNumber = new List<string>();
if (NotCryptedText != null) NotCryptedText.Clear();
NotCryptedText = new List<string>();
NotCryptedText.Add("private");
NotCryptedText.Add("public");
NotCryptedText.Add("internal");
NotCryptedText.Add("ref");
NotCryptedText.Add("class");
NotCryptedText.Add("InitializeComponent");
NotCryptedText.Add("this");
NotCryptedText.Add("This");
NotCryptedText.Add("LogThis");
//NotCryptedText.Add("Files");
NotCryptedText.Add("");
NotCryptedText.Add("for");
NotCryptedText.Add("BackgroundWorker");
NotCryptedText.Add("DateTime");
NotCryptedText.Add("IntPtr");
NotCryptedText.Add("float");
NotCryptedText.Add("float[]");
NotCryptedText.Add("float[,]");
NotCryptedText.Add("string");
NotCryptedText.Add("string[]");
NotCryptedText.Add("string[,]");
NotCryptedText.Add("bool");
NotCryptedText.Add("bool[]");
NotCryptedText.Add("bool[,]");
NotCryptedText.Add("int");
NotCryptedText.Add("int[]");
NotCryptedText.Add("int[,]");
NotCryptedText.Add("long");
NotCryptedText.Add("long[]");
NotCryptedText.Add("long[,]");
NotCryptedText.Add("byte");
NotCryptedText.Add("byte[]");
NotCryptedText.Add("byte[,]");
NotCryptedText.Add("double");
NotCryptedText.Add("double[]");
NotCryptedText.Add("double[,]");
NotCryptedText.Add("List<string>");
NotCryptedText.Add("List<bool>");
NotCryptedText.Add("List<int>");
NotCryptedText.Add("List<long>");
NotCryptedText.Add("List<byte>");
NotCryptedText.Add("List<double>");
NotCryptedText.Add("List<string[]>");
NotCryptedText.Add("List<bool[]>");
NotCryptedText.Add("List<int[]>");
NotCryptedText.Add("List<long[]>");
NotCryptedText.Add("List<byte[]>");
NotCryptedText.Add("List<double[]>");
NotCryptedText.Add("void");
NotCryptedText.Add("ProcessStartInfo");
NotCryptedText.Add("WindowsIdentity");
NotCryptedText.Add("WindowsPrincipal");
NotCryptedText.Add("MD5CryptoServiceProvider");
NotCryptedText.Add("Process");
NotCryptedText.Add("RegistryPermission");
NotCryptedText.Add("var");
NotCryptedText.Add("StreamReader");
NotCryptedText.Add("StreamWriter");
NotCryptedText.Add("ManagementClass");
NotCryptedText.Add("ManagementObjectCollection");
NotCryptedText.Add("ManagementObject");
NotCryptedText.Add("DialogResult");
NotCryptedText.Add("ToolStripMenuItem");
NotCryptedText.Add("IContainer");
NotCryptedText.Add("MenuStrip");
NotCryptedText.Add("ToolStripPanel");
NotCryptedText.Add("ToolStripSeparator");
NotCryptedText.Add("ToolTip");
NotCryptedText.Add("TrackBar");
NotCryptedText.Add("System.Windows.Forms.Timer");
NotCryptedText.Add("FormWindowState");
NotCryptedText.Add("SplitContainer");
NotCryptedText.Add("TabControl");
NotCryptedText.Add("TabPage");
NotCryptedText.Add("PageSetupDialog");
NotCryptedText.Add("StatusStrip");
NotCryptedText.Add("ToolStripProgressBar");
NotCryptedText.Add("ToolStripStatusLabel");
NotCryptedText.Add("ToolStripButton");
NotCryptedText.Add("ToolStrip");
NotCryptedText.Add("ToolStripDropDownButton");
NotCryptedText.Add("ToolStripSplitButton");
NotCryptedText.Add("Button");
NotCryptedText.Add("CheckBox");
NotCryptedText.Add("ComboBox");
NotCryptedText.Add("ColorDialog");
NotCryptedText.Add("ErrorProvider");
NotCryptedText.Add("FontDialog");
NotCryptedText.Add("GroupBox");
NotCryptedText.Add("Label");
NotCryptedText.Add("RadioButton");
NotCryptedText.Add("TextBox");
NotCryptedText.Add("DataGridView");
NotCryptedText.Add("DataGridViewTextBoxColumn");
NotCryptedText.Add("Color");
NotCryptedText.Add("PictureBox");
NotCryptedText.Add("OpenFileDialog");
NotCryptedText.Add("SaveFileDialog");
NotCryptedText.Add("NumericUpDown");
NotCryptedText.Add("delegate");
NotCryptedText.Add("Delegate");
NotCryptedText.Add("Main");
NotCryptedText.Add("=");
NotCryptedText.Add("FileInfo");
NotCryptedText.Add("new");
NotCryptedText.Add("Path");
NotCryptedText.Add("DirectoryInfo");
NotCryptedText.Add("DirectoryInfo[]");
NotCryptedText.Add("Directory");
NotCryptedText.Add("enum");
NotCryptedText.Add("DoNotObfuscate");
NotCryptedText.Add("Attribute");
NotCryptedText.Add(":");
NotCryptedText.Add("Form");
NotCryptedText.Add("namespace");
NotCryptedText.Add("Serializable");
NotCryptedText.Add("using");
NotCryptedText.Add("Settings");
NotCryptedText.Add("Enum");
NotCryptedText.Add("Enum0");
NotCryptedText.Add("Enum1");
NotCryptedText.Add("Enum2");
NotCryptedText.Add("Enum3");
NotCryptedText.Add("Enum4");
NotCryptedText.Add("Enum5");
NotCryptedText.Add("Enum6");
NotCryptedText.Add("Enum7");
NotCryptedText.Add("Enum8");
NotCryptedText.Add("Enum9");
NotCryptedText.Add("Enum10");
NotCryptedText.Add("buffer");
NotCryptedText.Add("Buffer");
NotCryptedText.Add("Index");
NotCryptedText.Add("Array");
NotCryptedText.Add("to");
//NotCryptedText.Add("To");
NotCryptedText.Add("from");
NotCryptedText.Add("Version");
NotCryptedText.Add("convertion");
//NotCryptedText.Add("convertion!");
//NotCryptedText.Add(@"convertion!""");
NotCryptedText.Add("and");
NotCryptedText.Add("convert");
NotCryptedText.Add("Convert");
NotCryptedText.Add("lower");
NotCryptedText.Add("the");
NotCryptedText.Add("if");
NotCryptedText.Add("long_0");
NotCryptedText.Add("long_1");
NotCryptedText.Add("StructLayout(LayoutKind.Sequential)");
NotCryptedText.Add("struct");
NotCryptedText.Add("ushort");
NotCryptedText.Add("demon");
NotCryptedText.Add("ostrich");
NotCryptedText.Add("try");
NotCryptedText.Add("catch");
NotCryptedText.Add("static");
NotCryptedText.Add("STAThread");
NotCryptedText.Add("RegistryKey");
NotCryptedText.Add("Text");
NotCryptedText.Add("Enabled");
NotCryptedText.Add("Visible");
NotCryptedText.Add("Application");
NotCryptedText.Add("EnableVisualStyles");
NotCryptedText.Add("Run");
NotCryptedText.Add("MessageBox");
NotCryptedText.Add("Show");
NotCryptedText.Add("ShowDialog");
NotCryptedText.Add("DialogResult");
NotCryptedText.Add("Environment");
NotCryptedText.Add("Newline");
NotCryptedText.Add("GetEnvironmentVariable");
NotCryptedText.Add("Exit");
NotCryptedText.Add("Quit");
NotCryptedText.Add("Clear");
NotCryptedText.Add("BMTune");
NotCryptedText.Add("WebClient");
NotCryptedText.Add("Dev");
NotCryptedText.Add("Tuner");
NotCryptedText.Add("datalogger");
NotCryptedText.Add("Tuner");
NotCryptedText.Add("Free");
/*NotCryptedText.Add("0");
NotCryptedText.Add("1");
NotCryptedText.Add("2");
NotCryptedText.Add("3");
NotCryptedText.Add("4");
NotCryptedText.Add("5");
NotCryptedText.Add("6");
NotCryptedText.Add("7");
NotCryptedText.Add("8");
NotCryptedText.Add("9");*/
//NotCryptedText.Add("");
if (CryptedTextStr != null) CryptedTextStr.Clear();
CryptedTextStr = new List<string>();
//CryptedTextStr.Add("a");
//CryptedTextStr.Add("ā͆ͣ̚͘͜");
CryptedTextStr.Add("b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ");
CryptedTextStr.Add("c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅ");
CryptedTextStr.Add("d̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟");
CryptedTextStr.Add("e̛̒͂͌̓ͣͬ͗̉ͣͬ͆̃̒͂");
CryptedTextStr.Add("f̸̡͈͍̳̯̖̣̱͊͊͋̂̚̚");
CryptedTextStr.Add("ǧ̴̵̡̼͎̻̝̲̹̲̖͂̐̿̆ͪ̎̍͒̿̓̂͘͟");
CryptedTextStr.Add("ẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡");
CryptedTextStr.Add("i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜");
CryptedTextStr.Add("j̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠");
CryptedTextStr.Add("k̶̼̰̘̲̪͎̲̟͇̰̪̪̗̅́ͤ͐͗͑͑͐̓̊͑ͯ̒̊̎ͮ̆̚̕");
CryptedTextStr.Add("l̴͚͎̙̻͎̟̩͓͕̜̀̉̓̀͛̿ͣ̆̿̊̃ͨ̄̇̔̀ͣ̒ͣ");
CryptedTextStr.Add("m̨̫͈̣̦̼̱̦͓͈̲͙̫͈͔̞̟͙̠̲͑͑ͦͦ͛ͧ̓̕͝");
CryptedTextStr.Add("n̑̆͑͋͆̏̊ͭͫ̾ͭ̇ͩ̒̒ͩ̏̚̕");
CryptedTextStr.Add("o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅ");
CryptedTextStr.Add("p̷̨̧͇̗̩͉̲̱̙̬̖̜̝̤̻̱̝̮͕̯͑̒̍͋ͦ̊͘");
CryptedTextStr.Add("q́͐ͤ̄̃͌͗̔ͯ̈́̀̀͏͈͕͍̲͓̜̳̲̤̪̱̞̣̼͙̩̯̘");
//CryptedTextStr.Add("r");
//CryptedTextStr.Add("r̶̵̲̗̥̘̠̭̳̭͓̫̜̹͓̝̟͙̋͑̒ͪ̌ͮ̐ͧ̈ͤ͠");
CryptedTextStr.Add("s̶̡̺̙̪̣͎̟͉̟̥̜͈̯̳̪̀̑͐́̇ͩͥ̑ͪ̔ͪ͂ͤ̐̾̈́͑̄͘̕͡");
CryptedTextStr.Add("ţ̶̝͖͓̟̝̳̻̱͖̟͙̜̬̳̯̤ͨ̓̂́ͯ̾͒ͫ̿̇͐ͪͩ͐͋ͬ͑̄̚͢͞");
CryptedTextStr.Add("u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅ");
CryptedTextStr.Add("v̸́͛̓͛͌̅ͯ͌ͮ̆͊ͦ̂̇ͯͪͫ͏̷̙̻̖");
CryptedTextStr.Add("ẅ̴̶̷̡͎̭̺͙͚̤͒͑͆ͣͥͫ͊ͯ̈̒͛̚͟");
CryptedTextStr.Add("x̗̟̬͔̤̻̟̎ͥ̀̅͑ͨͥ͌ͣ̍̑̽ͤ̇̿̈́̈́ͬ͘͝ͅ");
CryptedTextStr.Add("y͍͔̬̫͙̝̼͎̭͔̥̻̩̺͎̤̻̤̑ͫ̃ͫ̀̍̿̎̄͐͌͌͢");
CryptedTextStr.Add("z̴͓͍̗̥̤͌ͬ̑̓̈́͋̏̽̐̋͌͛̾ͮ̾̕͢͝");
if (CryptedTextStrUpper != null) CryptedTextStrUpper.Clear();
CryptedTextStrUpper = new List<string>();
CryptedTextStrUpper.Add("Å̷̢̰̺̻̟͕̫̱̯͔̫̯͕̪̘͉̬ͯ̄ͭ̄ͫ̀ͯ");
CryptedTextStrUpper.Add("B̴̩͇̫͙͆ͭͣ͌͑̂ͬͮ̈̄̔ͨ̏̑ͨ͊͆͂́͝");
CryptedTextStrUpper.Add("Ç̧̻̠͈͈͕̞̥̭̦̳̯͈̤̲̈́͗͐̆́͊̍̀̑̾̇ͤͭ̍ͫ̽͘");
CryptedTextStrUpper.Add("Ḏ̛̥̘̟͎̹͍͖̩̳̾̽ͮ̾ͫ̿̓͆́ͨͮͦͩ͌̀̚");
CryptedTextStrUpper.Add("E̺̳̭͚̣̠̳̹̩̝̹̝̺̳̬̙̥̙̹ͭ̽͛̉ͭ͋̊̚͢");
CryptedTextStrUpper.Add("F̡̝̭̪̣͓̼͍̩̩̲̪̲͒ͨ̈ͦ̋͒͑͐͐͂͊̾̊ͪ̕͢͠͠ͅͅ");
CryptedTextStrUpper.Add("G̛͌̈̄ͬ̾͒̎ͦ͂ͣ̓͟");
CryptedTextStrUpper.Add("Ḣ̵̳̪̦͖̥̭͚̼͐̔ͨͬ̇͋̑ͥ͐̀́͘͜");
CryptedTextStrUpper.Add("I̽̀̀̉̇̋̈̊͒͋͛̓͛̋̑");
CryptedTextStrUpper.Add("J͛ͪ̌͆̽ͯͨ̈̄ͦ͜͡͏̲͇̞̝͚̻̗̬͕̞̞̩̭̕͡");
CryptedTextStrUpper.Add("K͋ͭ̄́̽͌̏̂̉͛");
CryptedTextStrUpper.Add("Ļ̴̥̟̩̟̪͚̟͖̟̫̺̤͎̮̜͙ͯͩ̃͆͋ͤ̓̎ͣ̆̓ͭ͝");
CryptedTextStrUpper.Add("M̰͎͍͇̞͖͓ͣͤ̾̂ͭ̂́͒̌ͩ͘͜͡͠");
CryptedTextStrUpper.Add("Ņ̨͈͚͔̭̲͎̗̤̫̣͓͙̟ͨͪͮ̈́̎͐̾ͭͩ̈́̄̎͋̊ͣ̄́ͧ͋͘͜");
CryptedTextStrUpper.Add("O̵ͯ̑̎̓͒̐̔̋̈́͌̄̿͋̋̈͐͏");
CryptedTextStrUpper.Add("P̷̸̢̨̼̗̬̬̥͕̪̲̗̰̞̫̖̙̯̭͖͊̉ͭ̊̀̈́̕");
CryptedTextStrUpper.Add("Q̞̝͔͌̇ͬͨ̔ͮ̉͒̔ͭ̎͌͝͡͡");
CryptedTextStrUpper.Add("R̰̺̟̺͈͂̏͛ͭ́̀͡͡͝");
CryptedTextStrUpper.Add("S̴̸͚͖̫͉̙̹̭̯̱̺̠͎̻̻̳̮͍̓́ͬ̈̃̎ͤ̄ͫͤͦͫ̚͟͠͡ͅ");
CryptedTextStrUpper.Add("T̛̮̗͚̖̬̺͔̮̝͈͇̦̐̓̇́̒ͫ̀͢͟");
CryptedTextStrUpper.Add("U͉͈͍̖̫̳̙̥̼̹̘͍̔̈́͑̐͛ͥ̿ͧ̔ͩ̚͠͞");
CryptedTextStrUpper.Add("V̸̒̔̒ͧͭ̎̆͗ͥͥͩ̈́ͬ̔ͦ́̔̚̚");
CryptedTextStrUpper.Add("Ŵ͊̈́͛̆ͤ͛͗̈́̆̾̀͛͋ͥ̊̐ͪ");
CryptedTextStrUpper.Add("X̨̛͈̻̮̗̙͔̠̼͖̫͙̼͉̓ͣ̊̄͒͆͒̀ͯͩ̇̓̌ͨ̍ͣ̃ͮ͠");
CryptedTextStrUpper.Add("Y̒̄̔͆́̑͊̈̿̒͂ͪ̂ͨ̃ͬ͘");
CryptedTextStrUpper.Add("Z̨̡͍͈̖̳̹͔͕̝̘̠͐͆͆̄͢ͅ");
if (CryptedTextStrNumber != null) CryptedTextStrNumber.Clear();
CryptedTextStrNumber = new List<string>();
CryptedTextStrNumber.Add("0̶̢̖͇̠̣͈̪ͩͯ̄̅ͣͫͫ̾ͣ̾͡");
CryptedTextStrNumber.Add("1̢̡͔̯̦̠̦̻̲͕̝̤͎̘̥͇̬̠̗͍́̃̏̇͊̍̀́͟");
CryptedTextStrNumber.Add("2̴̫̞̰̲̼̭̣̠͔̐̂̽̃̎ͨ̐ͣ̽ͭͭ̆");
CryptedTextStrNumber.Add("3̛̓ͬ̑̅̐̓̌́̚҉̢̘̭͎̣͚̱͘");
CryptedTextStrNumber.Add("4̴̡̧̘̻̯̳̆̈ͨͭ̇");
CryptedTextStrNumber.Add("5̦̺̱̤͖̘̦̙̪̘̜͕͇̋̿͛̂͋̕͠");
CryptedTextStrNumber.Add("6̛̹͉̜̻͓͈̳ͥ͂̎̓̎͐͗͘͟");
CryptedTextStrNumber.Add("7̛̯͔̩̻̮͖̰̟͍̭̝̓͋̎̓̆̀̿͋̑͆ͥ̃̓̓͌̋̂̌̚͡͝");
CryptedTextStrNumber.Add("8̷̖̼͎͈̻͚̬͖̣̦͕̤ͥͯ͋ͮͬ͋̓͗ͧ̀̚͘͡ͅͅͅ");
CryptedTextStrNumber.Add("9̛͉̰͙͕̦̭̜̬͇̥̦͓ͭ͛̍ͯ̍̍̔̋ͣ̐̍͜ͅͅ");
//RegenerateCrypted();
/*for (int i = 0; i < 0x1800; i++)
{
string unicodee = char.ConvertFromUtf32(int.Parse(i.ToString("X4"), System.Globalization.NumberStyles.HexNumber));
Console.WriteLine("u" + i.ToString("X4") + ":" + unicodee);
}
for (int i = 0x1800; i < 0x3500; i++)
{
string unicodee = char.ConvertFromUtf32(int.Parse(i.ToString("X4"), System.Globalization.NumberStyles.HexNumber));
Console.WriteLine("u" + i.ToString("X4") + ":" + unicodee);
}*/
}
public void AddToNotEncrypt(string AddThis)
{
NotCryptedText.Add(AddThis);
}
public void AddToNotEncryptClass(string AddThis, string ThisCrypted)
{
NotCryptedClassList.Add(AddThis);
NotCryptedClassListCrypted.Add(ThisCrypted);
}
public void ClearRemake()
{
NotCryptedText.Clear();
NotCryptedClassList.Clear();
NotCryptedClassListCrypted.Clear();
CreateList();
}
/*private void RegenerateCrypted()
{
if (ToEncryptTextEncrypted != null) ToEncryptTextEncrypted.Clear();
ToEncryptTextEncrypted = new List<string>();
for (int i = 0; i < ToEncryptText.Count; i++)
{
ToEncryptTextEncrypted.Add(CreateCryptedText());
//Console.WriteLine(ToEncryptText[i] + "=" + ToEncryptTextEncrypted[ToEncryptTextEncrypted.Count - 1]);
}
}*/
public const string Hell2 = "\u00A0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u3000";
public string CreateCryptedText()
{
//Console.WriteLine(Hell2);
// ­????????? ????????
string CryptedGenerated = "";
CryptedGenerated += CryptedTextStrUpper[rnd.Next(0, CryptedTextStrUpper.Count)];
//for (int i = 0; i < rnd.Next(form1_0.CryptedMinLenght, form1_0.CryptedMaxLenght) - 1; i++)
//{
int Modeee = rnd.Next(0, 1);
//int Modeee = rnd.Next(0, 2);
if (Modeee == 0) CryptedGenerated += CryptedTextStr[rnd.Next(0, CryptedTextStr.Count)];
else if (Modeee == 1) CryptedGenerated += CryptedTextStrUpper[rnd.Next(0, CryptedTextStrUpper.Count)];
//else if (Modeee == 2) CryptedGenerated += CryptedTextStrNumber[rnd.Next(0, CryptedTextStrNumber.Count)];
//}
if (CryptedTextAllString.Count > 0)
{
bool Exist = false;
for (int i = 0; i < CryptedTextAllString.Count; i++) if (CryptedTextAllString[i] == CryptedGenerated) Exist = true;
while (Exist)
{
//regenerate
Modeee = rnd.Next(0, 1);
if (Modeee == 0) CryptedGenerated += CryptedTextStr[rnd.Next(0, CryptedTextStr.Count)];
else if (Modeee == 1) CryptedGenerated += CryptedTextStrUpper[rnd.Next(0, CryptedTextStrUpper.Count)];
//recheck
Exist = false;
for (int i = 0; i < CryptedTextAllString.Count; i++) if (CryptedTextAllString[i] == CryptedGenerated) Exist = true;
}
}
//Add to list
CryptedTextAllString.Add(CryptedGenerated);
return CryptedGenerated;
}
public string CreateCryptedTextNumber(int MinNumber, int MaxNumber)
{
string CryptedGenerated = "";
CryptedGenerated += CryptedTextStrUpper[rnd.Next(0, CryptedTextStrUpper.Count)];
//for (int i = 0; i < rnd.Next(MinNumber, MaxNumber) - 1; i++)
//{
int Modeee = rnd.Next(0, 1);
//int Modeee = rnd.Next(0, 2);
if (Modeee == 0) CryptedGenerated += CryptedTextStr[rnd.Next(0, CryptedTextStr.Count)];
else if (Modeee == 1) CryptedGenerated += CryptedTextStrUpper[rnd.Next(0, CryptedTextStrUpper.Count)];
//else if (Modeee == 2) CryptedGenerated += CryptedTextStrNumber[rnd.Next(0, CryptedTextStrNumber.Count)];
//}
if (CryptedTextAllNumber.Count > 0)
{
bool Exist = false;
for (int i = 0; i < CryptedTextAllNumber.Count; i++) if (CryptedTextAllNumber[i] == CryptedGenerated) Exist = true;
while (Exist)
{
//regenerate
Modeee = rnd.Next(0, 1);
if (Modeee == 0) CryptedGenerated += CryptedTextStr[rnd.Next(0, CryptedTextStr.Count)];
else if (Modeee == 1) CryptedGenerated += CryptedTextStrUpper[rnd.Next(0, CryptedTextStrUpper.Count)];
//recheck
Exist = false;
for (int i = 0; i < CryptedTextAllNumber.Count; i++) if (CryptedTextAllNumber[i] == CryptedGenerated) Exist = true;
}
}
//Add to list
CryptedTextAllNumber.Add(CryptedGenerated);
return CryptedGenerated;
}
}
}

View File

@ -0,0 +1,370 @@
using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
namespace AppCryptor
{
public class Class_Variables
{
Form1 form1_0;
public List<string> AllMethods = new List<string>();
public List<string> AllMethodsCrypted = new List<string>();
public List<bool> AllMethodsPublic = new List<bool>();
public List<string> AllMethodsSource = new List<string>();
private bool DoingEnum = false;
private int CurlyCount = 0;
public Class_Variables(ref Form1 Form1_1)
{
form1_0 = Form1_1;
}
//public void GetVariables()
public void GetVariables(string ThisssClass, bool InDataFolder)
{
form1_0.ClearLogs();
form1_0.LogThis("----------------------------------------------");
form1_0.LogThis("Getting variables in " + ThisssClass + "...");
DoingEnum = false;
CurlyCount = 0;
form1_0.label6.Text = "Doing: " + ThisssClass + " (1/5)";
form1_0.Refresh();
if (AllMethods != null) AllMethods.Clear();
AllMethods = new List<string>();
if (AllMethodsPublic != null) AllMethodsPublic.Clear();
AllMethodsPublic = new List<bool>();
if (AllMethodsCrypted != null) AllMethodsCrypted.Clear();
AllMethodsCrypted = new List<string>();
if (AllMethodsSource != null) AllMethodsSource.Clear();
AllMethodsSource = new List<string>();
string pattern = @"\.cs$";
var matches = Directory.GetFiles(form1_0.ProjectLocation, "*", SearchOption.AllDirectories).Where(path => Regex.Match(path, pattern).Success);
//check in all '*.cs' files
int currenn = 0;
foreach (string file in matches)
{
form1_0.progressBar1.Value = (currenn * 100) / matches.Count<string>();
if (!file.Contains("BMTune_Installer")
&& !file.Contains("BMTune_Licenser")
&& !file.Contains("BMTune_Server")
&& !file.Contains("BMTune_Starter")
&& !file.Contains("BMTune_Uploader")
&& !file.Contains("BMTune_Encrypter")
&& !file.Contains("BMFuscator")
&& !file.Contains("BMTune_Packer")
&& !file.Contains("AppCryptor")
&& !file.Contains("Resources.Designer.cs")
&& !file.Contains(@"\bin\")
&& !file.Contains(@"\Debug\")
&& ((InDataFolder && file.Contains(@"\Data\")) || (!InDataFolder))
&& !file.Contains(@"\obj\")
&& Path.GetFileName(file) == ThisssClass
//&& (file.Contains("Class15.cs")
//|| file.Contains("Class18_file.cs")
//|| file.Contains("FrmMain.cs")
//|| file.Contains("Class31.cs"))
)
{
form1_0.AllCurrentClassLines = File.ReadAllLines(file);
form1_0.CurrentFile = file; //Path.GetFileName(file);
//if (form1_0.checkBox1.Checked) form1_0.LogThis2("Checking " + Path.GetFileName(form1_0.CurrentFile));
for (int i = 0; i < form1_0.AllCurrentClassLines.Length; i++)
{
if (InDataFolder)
{
if (form1_0.AllCurrentClassLines[i].Contains("public enum ")) DoingEnum = true;
if (form1_0.AllCurrentClassLines[i].Contains("internal enum ")) DoingEnum = true;
if (form1_0.AllCurrentClassLines[i].Contains("public static enum ")) DoingEnum = true;
if (form1_0.AllCurrentClassLines[i].Contains("internal static enum ")) DoingEnum = true;
if (DoingEnum && form1_0.AllCurrentClassLines[i].Contains("{")) CurlyCount++;
if (DoingEnum && CurlyCount > 0 && form1_0.AllCurrentClassLines[i].Contains("}")) CurlyCount--;
}
if (form1_0.AllCurrentClassLines[i].Contains("public ") || form1_0.AllCurrentClassLines[i].Contains("public static "))
{
if (!form1_0.AllCurrentClassLines[i].Contains("static ")) CheckPublicPrivate("public ", form1_0.AllCurrentClassLines[i].Substring(form1_0.AllCurrentClassLines[i].LastIndexOf("public ")));
else CheckPublicPrivate("public static ", form1_0.AllCurrentClassLines[i].Substring(form1_0.AllCurrentClassLines[i].LastIndexOf("public static ")));
}
else if (form1_0.AllCurrentClassLines[i].Contains("private ") || form1_0.AllCurrentClassLines[i].Contains("private static "))
{
if (!form1_0.AllCurrentClassLines[i].Contains("static ")) CheckPublicPrivate("private ", form1_0.AllCurrentClassLines[i].Substring(form1_0.AllCurrentClassLines[i].LastIndexOf("private ")));
else CheckPublicPrivate("private static ", form1_0.AllCurrentClassLines[i].Substring(form1_0.AllCurrentClassLines[i].LastIndexOf("private static ")));
}
else if (form1_0.AllCurrentClassLines[i].Contains("internal ") || form1_0.AllCurrentClassLines[i].Contains("internal static "))
{
if (!form1_0.AllCurrentClassLines[i].Contains("static ")) CheckPublicPrivate("internal ", form1_0.AllCurrentClassLines[i].Substring(form1_0.AllCurrentClassLines[i].LastIndexOf("internal ")));
else CheckPublicPrivate("internal static ", form1_0.AllCurrentClassLines[i].Substring(form1_0.AllCurrentClassLines[i].LastIndexOf("internal static ")));
}
else
{
CheckOthersVariables(form1_0.AllCurrentClassLines[i]);
}
}
}
currenn++;
}
//GetAllPublicVariables();
//StartWaitProcess();
form1_0.progressBar1.Value = 0;
}
public void CheckOthersVariables(string VLine)
{
if (DoingEnum)
{
VLine = VLine.Replace("\t", "");
VLine = VLine.Replace(" ", "");
if (VLine.Contains(","))
{
string[] VLinSpl = VLine.Split(',');
for (int i = 0; i < VLinSpl.Length; i++)
{
string EndStringVariable = VLinSpl[i];
if (VLinSpl[i].Contains("="))
{
string[] VLinSplBuf = VLinSpl[i].Split('=');
EndStringVariable = VLinSplBuf[0];
}
AddThisVariable(EndStringVariable, "Enum", true);
}
}
else if (CurlyCount > 0)
{
if (VLine != string.Empty)
{
string EndStringVariable = VLine;
if (VLine.Contains("="))
{
string[] VLinSplBuf = VLine.Split('=');
EndStringVariable = VLinSplBuf[0];
}
AddThisVariable(EndStringVariable, "Enum", true);
}
}
}
else
{
if (VLine.Contains("(") && !VLine.Contains("for")) VLine = VLine.Substring(0, VLine.IndexOf("("));
if (VLine.Contains(";")) VLine = VLine.Substring(0, VLine.IndexOf(";"));
if (VLine.Contains("=")) VLine = VLine.Substring(0, VLine.IndexOf("="));
if (VLine.Contains('\"')) VLine = VLine.Substring(0, VLine.IndexOf('\"'));
if (VLine.Contains(" "))
{
string[] VLinSpl = VLine.Split(' ');
for (int i = 0; i < VLinSpl.Length; i++)
{
if (IsParam(VLinSpl[i]) && VLinSpl.Length > i + 2)
{
AddThisVariable(VLinSpl[i + 1], "infile", false);
}
}
}
}
}
public void AddThisVariable(string ThisVariable, string StyleMode, bool IsPublic)
{
if (ThisVariable.Length > 0)
{
if (ThisVariable[0] == '(') ThisVariable = ThisVariable.Substring(1);
if (!IsDigitsOnly(ThisVariable))
{
if (IsCorrectName(ThisVariable) && IsCorrectMethod(ThisVariable))
{
if (!HadMethod(ThisVariable, Path.GetFileName(form1_0.CurrentFile)))
{
AllMethods.Add(ThisVariable);
AllMethodsPublic.Add(IsPublic);
AllMethodsSource.Add(Path.GetFileName(form1_0.CurrentFile));
AllMethodsCrypted.Add(form1_0.Class_Text_0.CreateCryptedText());
if (form1_0.checkBox1.Checked) form1_0.LogThis("Created " + StyleMode + " " + ThisVariable + " (" + Path.GetFileName(form1_0.CurrentFile) + ")");
//Console.WriteLine("Created " + StyleMode + " " + EndStringVariable + " (" + Path.GetFileName(form1_0.CurrentFile) + ")");
}
}
}
}
}
public bool IsDigitsOnly(string str)
{
bool IsDigitOnly = true;
if (str.Length > 0)
{
if (str[0] == '-') return true;
foreach (char c in str)
{
if (c < '0' || c > '9') IsDigitOnly = false;
}
}
return IsDigitOnly;
}
public bool IsCorrectName(string ThisM)
{
if (ThisM == "{") return false;
if (ThisM == "}") return false;
if (ThisM == "[") return false;
if (ThisM == "]") return false;
if (ThisM == " ") return false;
if (ThisM == ")") return false;
if (ThisM == "(") return false;
if (ThisM == ";") return false;
if (ThisM == ":") return false;
if (ThisM == ",") return false;
if (ThisM == ".") return false;
if (ThisM == "<") return false;
if (ThisM == ">") return false;
if (ThisM == "=") return false;
if (ThisM == "!") return false;
if (ThisM == "-") return false;
return true;
}
public bool IsParam(string ThisM)
{
bool InListss = false;
for (int i = 0; i < form1_0.Class_Text_0.NotCryptedText.Count; i++)
{
if (form1_0.Class_Text_0.NotCryptedText[i] == "")
{
InListss = true;
i++;
}
if (InListss &&
(form1_0.Class_Text_0.NotCryptedText[i] == ThisM
|| "(" + form1_0.Class_Text_0.NotCryptedText[i] == ThisM
|| "." + form1_0.Class_Text_0.NotCryptedText[i] == ThisM)) return true;
}
return false;
}
public void CheckPublicPrivate(string ThisCheck, string VLine)
{
//private string[] GetAllLinesFromBytes(byte[] AllBytesArr)
//string[] GetAllLinesFromBytes(byte[] AllBytesArr)
string VLineEnd = "";
if (VLine.Contains("("))
{
VLineEnd = VLine.Substring(VLine.IndexOf("("));
VLine = VLine.Substring(0, VLine.IndexOf("("));
}
if (VLine.Contains(" ") || VLineEnd.Contains(" "))
{
if (VLineEnd != "")
{
string[] VLinSplEnd = VLineEnd.Split(' ');
for (int i = 0; i < VLinSplEnd.Length; i++)
{
if (IsParam(VLinSplEnd[i]) && VLinSplEnd.Length > i + 1)
{
VLinSplEnd[i + 1] = VLinSplEnd[i + 1].Replace(",", "");
VLinSplEnd[i + 1] = VLinSplEnd[i + 1].Replace(")", "");
AddThisVariable(VLinSplEnd[i + 1], "infile", false);
}
}
}
string[] VLinSpl = VLine.Split(' ');
if (VLinSpl.Length >= 3)
{
//Console.WriteLine(Path.GetFileName(CurrentFile) + "\t|" + ThisCheck + "|" + VLinSpl[2]);
VLinSpl[2] = VLinSpl[2].Replace(";", "");
if (!HadMethod(VLinSpl[2], Path.GetFileName(form1_0.CurrentFile)))
{
if (IsCorrectMethod(VLinSpl[2]))
{
bool IsPublic = false;
if (ThisCheck == "public " || ThisCheck == "internal ") IsPublic = true;
AddThisVariable(VLinSpl[2], ThisCheck.Replace(" ", ""), IsPublic);
}
else
{
if (VLinSpl.Length >= 4)
{
bool IsPublic = false;
if (ThisCheck == "public " || ThisCheck == "internal ") IsPublic = true;
AddThisVariable(VLinSpl[3], ThisCheck.Replace(" ", ""), IsPublic);
}
else
{
//if (VLinSpl[2] != Path.GetFileName(CurrentFile).Substring(0, Path.GetFileName(CurrentFile).Length - 3)) Console.WriteLine(Path.GetFileName(CurrentFile) + "\t|" + "*" + ThisCheck + "|" + VLinSpl[2]);
}
}
}
}
else if (VLinSpl.Length == 2)
{
//if (VLinSpl[1] != Path.GetFileName(CurrentFile).Substring(0, Path.GetFileName(CurrentFile).Length - 3)) Console.WriteLine(Path.GetFileName(CurrentFile) + "\t|" + "***" + ThisCheck + "|" + VLine);
}
else
{
//if (VLinSpl[0] != Path.GetFileName(CurrentFile).Substring(0, Path.GetFileName(CurrentFile).Length - 3)) Console.WriteLine(Path.GetFileName(CurrentFile) + "\t|" + "******" + ThisCheck + "|" + VLine);
}
}
else
{
//if (VLine != Path.GetFileName(CurrentFile).Substring(0, Path.GetFileName(CurrentFile).Length - 3)) Console.WriteLine(Path.GetFileName(CurrentFile) + "\t|" + "*********" + ThisCheck + "|" + VLine);
}
}
public bool IsCorrectMethod(string ThisM)
{
for (int i = 0; i < form1_0.Class_Text_0.NotCryptedText.Count; i++) if (form1_0.Class_Text_0.NotCryptedText[i] == ThisM) return false;
for (int i = 0; i < form1_0.Class_Text_0.NotCryptedClassList.Count; i++) if (form1_0.Class_Text_0.NotCryptedClassList[i] == ThisM) return false;
//same method name as the file name
if (ThisM == Path.GetFileName(form1_0.CurrentFile).Substring(0, Path.GetFileName(form1_0.CurrentFile).Length - 3)) return false;
return true;
}
public bool HadMethod(string ThisM, string ThisS)
{
for (int i = 0; i < AllMethods.Count; i++) if (AllMethods[i] == ThisM && AllMethodsSource[i] == ThisS) return true;
return false;
}
}
}

331
AppCryptor/Form1.Designer.cs generated Normal file
View File

@ -0,0 +1,331 @@
namespace AppCryptor
{
partial class Form1
{
/// <summary>
/// Variable nécessaire au concepteur.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Nettoyage des ressources utilisées.
/// </summary>
/// <param name="disposing">true si les ressources managées doivent être supprimées ; sinon, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Code généré par le Concepteur Windows Form
/// <summary>
/// Méthode requise pour la prise en charge du concepteur - ne modifiez pas
/// le contenu de cette méthode avec l'éditeur de code.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
this.label1 = new System.Windows.Forms.Label();
this.txt_ProjectLocation = new System.Windows.Forms.TextBox();
this.txt_CryptedLocation = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.textBox3 = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.textBox2 = new System.Windows.Forms.TextBox();
this.textBox4 = new System.Windows.Forms.TextBox();
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.checkBox2 = new System.Windows.Forms.CheckBox();
this.checkBox3 = new System.Windows.Forms.CheckBox();
this.checkBox4 = new System.Windows.Forms.CheckBox();
this.listBox1 = new System.Windows.Forms.ListBox();
this.checkBox5 = new System.Windows.Forms.CheckBox();
this.listBox2 = new System.Windows.Forms.ListBox();
this.button2 = new System.Windows.Forms.Button();
this.progressBar1 = new System.Windows.Forms.ProgressBar();
this.label6 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(17, 42);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(87, 13);
this.label1.TabIndex = 0;
this.label1.Text = "Project Location:";
//
// txt_ProjectLocation
//
this.txt_ProjectLocation.Location = new System.Drawing.Point(128, 38);
this.txt_ProjectLocation.Name = "txt_ProjectLocation";
this.txt_ProjectLocation.Size = new System.Drawing.Size(419, 20);
this.txt_ProjectLocation.TabIndex = 1;
//
// txt_CryptedLocation
//
this.txt_CryptedLocation.Location = new System.Drawing.Point(103, -1);
this.txt_CryptedLocation.Name = "txt_CryptedLocation";
this.txt_CryptedLocation.Size = new System.Drawing.Size(34, 20);
this.txt_CryptedLocation.TabIndex = 3;
this.txt_CryptedLocation.Visible = false;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(7, 2);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(90, 13);
this.label2.TabIndex = 2;
this.label2.Text = "Crypted Location:";
this.label2.Visible = false;
//
// button1
//
this.button1.Location = new System.Drawing.Point(606, 38);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(111, 23);
this.button1.TabIndex = 4;
this.button1.Text = "Encrypt";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.Button1_Click);
//
// textBox3
//
this.textBox3.Location = new System.Drawing.Point(8, 128);
this.textBox3.Multiline = true;
this.textBox3.Name = "textBox3";
this.textBox3.ReadOnly = true;
this.textBox3.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.textBox3.Size = new System.Drawing.Size(446, 408);
this.textBox3.TabIndex = 5;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label3.Location = new System.Drawing.Point(343, 9);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(99, 20);
this.label3.TabIndex = 6;
this.label3.Text = "AppCryptor";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(17, 64);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(102, 13);
this.label4.TabIndex = 9;
this.label4.Text = "Crypted Min Lenght:";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(17, 84);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(105, 13);
this.label5.TabIndex = 10;
this.label5.Text = "Crypted Max Lenght:";
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(128, 61);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(37, 20);
this.textBox2.TabIndex = 11;
this.textBox2.Text = "8";
this.textBox2.Validated += new System.EventHandler(this.TextBox2_Validated);
//
// textBox4
//
this.textBox4.Location = new System.Drawing.Point(128, 84);
this.textBox4.Name = "textBox4";
this.textBox4.Size = new System.Drawing.Size(37, 20);
this.textBox4.TabIndex = 12;
this.textBox4.Text = "15";
this.textBox4.Validated += new System.EventHandler(this.TextBox4_Validated);
//
// checkBox1
//
this.checkBox1.AutoSize = true;
this.checkBox1.Checked = true;
this.checkBox1.CheckState = System.Windows.Forms.CheckState.Checked;
this.checkBox1.Location = new System.Drawing.Point(376, 63);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(101, 17);
this.checkBox1.TabIndex = 13;
this.checkBox1.Text = "Advanced Logs";
this.checkBox1.UseVisualStyleBackColor = true;
//
// checkBox2
//
this.checkBox2.AutoSize = true;
this.checkBox2.Checked = true;
this.checkBox2.CheckState = System.Windows.Forms.CheckState.Checked;
this.checkBox2.Location = new System.Drawing.Point(188, 63);
this.checkBox2.Name = "checkBox2";
this.checkBox2.Size = new System.Drawing.Size(160, 17);
this.checkBox2.TabIndex = 14;
this.checkBox2.Text = "Copy Files before Encryption";
this.checkBox2.UseVisualStyleBackColor = true;
//
// checkBox3
//
this.checkBox3.AutoSize = true;
this.checkBox3.Checked = true;
this.checkBox3.CheckState = System.Windows.Forms.CheckState.Checked;
this.checkBox3.Location = new System.Drawing.Point(188, 86);
this.checkBox3.Name = "checkBox3";
this.checkBox3.Size = new System.Drawing.Size(86, 17);
this.checkBox3.TabIndex = 15;
this.checkBox3.Text = "Encrypt Files";
this.checkBox3.UseVisualStyleBackColor = true;
//
// checkBox4
//
this.checkBox4.AutoSize = true;
this.checkBox4.Checked = true;
this.checkBox4.CheckState = System.Windows.Forms.CheckState.Checked;
this.checkBox4.Location = new System.Drawing.Point(376, 83);
this.checkBox4.Name = "checkBox4";
this.checkBox4.Size = new System.Drawing.Size(107, 17);
this.checkBox4.TabIndex = 16;
this.checkBox4.Text = "Advanced Logs2";
this.checkBox4.UseVisualStyleBackColor = true;
//
// listBox1
//
this.listBox1.FormattingEnabled = true;
this.listBox1.Location = new System.Drawing.Point(460, 129);
this.listBox1.Name = "listBox1";
this.listBox1.Size = new System.Drawing.Size(257, 407);
this.listBox1.TabIndex = 18;
this.listBox1.SelectedIndexChanged += new System.EventHandler(this.ListBox1_SelectedIndexChanged);
//
// checkBox5
//
this.checkBox5.AutoSize = true;
this.checkBox5.Checked = true;
this.checkBox5.CheckState = System.Windows.Forms.CheckState.Checked;
this.checkBox5.Location = new System.Drawing.Point(188, 107);
this.checkBox5.Name = "checkBox5";
this.checkBox5.Size = new System.Drawing.Size(92, 17);
this.checkBox5.TabIndex = 19;
this.checkBox5.Text = "Encrypt String";
this.checkBox5.UseVisualStyleBackColor = true;
//
// listBox2
//
this.listBox2.FormattingEnabled = true;
this.listBox2.Location = new System.Drawing.Point(723, 12);
this.listBox2.Name = "listBox2";
this.listBox2.Size = new System.Drawing.Size(376, 524);
this.listBox2.TabIndex = 20;
//
// button2
//
this.button2.Location = new System.Drawing.Point(606, 64);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(111, 23);
this.button2.TabIndex = 21;
this.button2.Text = "Rename Files";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.Button2_Click);
//
// progressBar1
//
this.progressBar1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.progressBar1.Location = new System.Drawing.Point(0, 542);
this.progressBar1.Name = "progressBar1";
this.progressBar1.Size = new System.Drawing.Size(1105, 10);
this.progressBar1.TabIndex = 22;
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(490, 14);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(35, 13);
this.label6.TabIndex = 23;
this.label6.Text = "label6";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(668, 14);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(35, 13);
this.label7.TabIndex = 24;
this.label7.Text = "label7";
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1105, 552);
this.Controls.Add(this.label7);
this.Controls.Add(this.label6);
this.Controls.Add(this.progressBar1);
this.Controls.Add(this.button2);
this.Controls.Add(this.listBox2);
this.Controls.Add(this.checkBox5);
this.Controls.Add(this.listBox1);
this.Controls.Add(this.checkBox4);
this.Controls.Add(this.checkBox3);
this.Controls.Add(this.checkBox2);
this.Controls.Add(this.checkBox1);
this.Controls.Add(this.textBox4);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.label5);
this.Controls.Add(this.label4);
this.Controls.Add(this.label3);
this.Controls.Add(this.textBox3);
this.Controls.Add(this.button1);
this.Controls.Add(this.txt_CryptedLocation);
this.Controls.Add(this.label2);
this.Controls.Add(this.txt_ProjectLocation);
this.Controls.Add(this.label1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "Form1";
this.Text = "AppCryptor";
this.Load += new System.EventHandler(this.Form1_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.Label label3;
public System.Windows.Forms.TextBox txt_ProjectLocation;
public System.Windows.Forms.TextBox txt_CryptedLocation;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
public System.Windows.Forms.TextBox textBox2;
public System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.CheckBox checkBox2;
private System.Windows.Forms.CheckBox checkBox3;
private System.Windows.Forms.CheckBox checkBox5;
private System.Windows.Forms.Button button2;
public System.Windows.Forms.ProgressBar progressBar1;
public System.Windows.Forms.CheckBox checkBox1;
public System.Windows.Forms.CheckBox checkBox4;
public System.Windows.Forms.ListBox listBox1;
public System.Windows.Forms.ListBox listBox2;
public System.Windows.Forms.Label label6;
public System.Windows.Forms.Label label7;
}
}

400
AppCryptor/Form1.cs Normal file
View File

@ -0,0 +1,400 @@
using System;
using System.IO;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Reflection;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Windows.Forms;
using System.Text.RegularExpressions;
namespace AppCryptor
{
public partial class Form1 : Form
{
public int CryptedMinLenght = 8;
public int CryptedMaxLenght = 15;
//public int CryptedStringNumber = 99;
bool RUN_FULL_LOOP = true;
//########################################
public Class_Text Class_Text_0;
public Class_CreateFiles Class_CreateFiles_0;
public Class_Variables Class_Variables_0;
public Class_Crypter Class_Crypter_0;
public Class_StringCrypter Class_StringCrypter_0;
public Class_FileRenamer Class_FileRenamer_0;
public string ProjectLocation = "";
public string ProjectLocationCrypted = "";
public string[] AllCurrentClassLines = new string[] { };
public string CurrentClassName = "";
public string CurrentFile = "";
private System.Windows.Forms.Timer LoopTimer = new System.Windows.Forms.Timer();
//private BackgroundWorker backgroundWorker_0 = new BackgroundWorker();
DateTime StartTime = DateTime.Now;
Form1 form1_0;
public Form1()
{
InitializeComponent();
form1_0 = this;
txt_ProjectLocation.Text = @"C:\Users\boule\Documents\Visual Studio 2019\Projects\BMTune2";
txt_CryptedLocation.Text = txt_ProjectLocation.Text + "_Crypted";
label6.Text = "";
label7.Text = "";
if (Class_Text_0 != null) Class_Text_0 = null;
Class_Text_0 = new Class_Text(ref form1_0);
Class_Text_0.CreateList();
if (Class_CreateFiles_0 != null) Class_CreateFiles_0 = null;
Class_CreateFiles_0 = new Class_CreateFiles(ref form1_0);
if (Class_Variables_0 != null) Class_Variables_0 = null;
Class_Variables_0 = new Class_Variables(ref form1_0);
if (Class_Crypter_0 != null) Class_Crypter_0 = null;
Class_Crypter_0 = new Class_Crypter(ref form1_0);
if (Class_StringCrypter_0 != null) Class_StringCrypter_0 = null;
Class_StringCrypter_0 = new Class_StringCrypter(ref form1_0);
if (Class_FileRenamer_0 != null) Class_FileRenamer_0 = null;
Class_FileRenamer_0 = new Class_FileRenamer(ref form1_0);
LoopTimer.Interval = 5000;
if (RUN_FULL_LOOP) LoopTimer.Interval = 10;
LoopTimer.Tick += DoThisAllTheTime;
LoopTimer.Start();
if (RUN_FULL_LOOP)
{
this.checkBox1.Checked = false;
this.checkBox4.Checked = false;
//this.Visible = false;
//this.Hide();
}
//this.backgroundWorker_0.WorkerSupportsCancellation = false;
//this.backgroundWorker_0.WorkerReportsProgress = false;
//this.backgroundWorker_0.DoWork += new DoWorkEventHandler(this.backgroundWorker_0_DoWork);
//this.backgroundWorker_0.RunWorkerAsync();
}
/*private void backgroundWorker_0_DoWork(object sender, DoWorkEventArgs e)
{
}*/
void DoThisAllTheTime(object sender, EventArgs e)
{
if (RUN_FULL_LOOP)
{
//this.Visible = false;
//this.Hide();
StartTime = DateTime.Now;
LoopTimer.Stop();
RunFullLoop();
//Encrypt();
//EncryptAllInData();
if (RUN_FULL_LOOP) Application.Exit();
}
LoopTimer.Stop();
}
public void RunFullLoop()
{
Encrypt();
DoSingleClass("Class15.cs", false);
DoSingleClass("Class22_startup.cs", false);
DoSingleClass("Class31.cs", false);
DoSingleClass("Enum4.cs", false);
DoSingleClass("Enum6.cs", false);
EncryptAllInData();
Class_FileRenamer_0.RemadeAllFilenames();
CreateFileInfos();
progressBar1.Value = 0;
label6.Text = "";
label7.Text = "";
LogThis("Done");
}
public void DoSingleClass(string ClassFileName, bool InDataFolder)
{
label6.Text = "Doing: " + ClassFileName;
this.Refresh();
Class_Variables_0.GetVariables(ClassFileName, InDataFolder);
Class_Crypter_0.EncryptThisFile(ClassFileName, InDataFolder);
if (checkBox5.Checked) Class_StringCrypter_0.EncryptStringInFile(ClassFileName, InDataFolder);
System.Media.SoundPlayer snd = new System.Media.SoundPlayer(Properties.Resources.alert2);
snd.Play();
}
public void EncryptAllInData()
{
form1_0.ClearLogs();
form1_0.LogThis("----------------------------------------------");
form1_0.LogThis("Encrypting all Data files...");
form1_0.listBox2.Items.Clear();
int currenn = 0;
int currenn2 = 0;
string pattern = @"\.cs$";
var matches = Directory.GetFiles(form1_0.ProjectLocationCrypted, "*", SearchOption.AllDirectories).Where(path => Regex.Match(path, pattern).Success);
//check in all '*.cs' files
foreach (string file in matches)
{
form1_0.progressBar1.Value = (currenn * 100) / matches.Count<string>();
if (!file.Contains("BMTune_Installer")
&& !file.Contains("BMTune_Licenser")
&& !file.Contains("BMTune_Server")
&& !file.Contains("BMTune_Starter")
&& !file.Contains("BMTune_Uploader")
&& !file.Contains("BMTune_Encrypter")
&& !file.Contains("AppCryptor")
&& !file.Contains("Resources.Designer.cs")
&& !file.Contains("ChartSetup.cs")
&& !file.Contains("ChartTemplate.cs")
&& !file.Contains("ChartCollection.cs")
&& !file.Contains("DoNotObfuscate.cs")
&& !file.Contains("MapSensorUnits.cs")
&& !file.Contains("MapSensorUnits.cs")
&& !file.Contains("TemperatureUnits.cs")
&& !file.Contains("VoltUnits.cs")
&& !file.Contains("VssUnits.cs")
&& !file.Contains("EmulatorVendorOstrich.cs")
&& !file.Contains("EmulatorVendorDemon.cs")
&& !file.Contains("DatalogLedTypes.cs")
&& !file.Contains("DatalogDisplayTypes.cs")
&& !file.Contains("DatalogButtonsTypes.cs")
&& !file.Contains("CorrectionUnits.cs")
&& !file.Contains("AirFuelUnits.cs")
&& !file.Contains("DatalogLedTypes.cs")
&& file.Contains("BMTuneVersions.cs") //################
&& !file.Contains("ArduinoModel.cs")
&& !file.Contains("SensorsX.cs")
&& !file.Contains(@"\bin\")
&& !file.Contains(@"\Debug\")
&& !file.Contains(@"\obj\")
&& file.Contains(@"\Data\"))
{
label7.Text = (currenn2 + 1) + "/" + 34;
form1_0.label6.Text = "Doing: " + Path.GetFileName(file);
form1_0.Refresh();
DoSingleClass(Path.GetFileName(file), true);
currenn2++;
//if (!RUN_FULL_LOOP && currenn >= 1) break;
}
currenn++;
}
label6.Text = "";
label7.Text = "";
form1_0.progressBar1.Value = 0;
form1_0.Refresh();
}
public void ClearLogs()
{
textBox3.Text = "";
this.Refresh();
}
public void LogThis(string ThisStr)
{
textBox3.AppendText(ThisStr + " - " + GetTimeString() + Environment.NewLine);
}
public string GetTimeString()
{
string MinuteTime = (DateTime.Now - StartTime).TotalMinutes.ToString("00.00");
string[] SplitTime = MinuteTime.Split(',');
int Minutes = int.Parse(SplitTime[0]);
int Seconds = map(int.Parse(SplitTime[1]), 0, 100, 0, 60);
return Minutes + ":" + Seconds.ToString("00");
}
int map(int x, int in_min, int in_max, int out_min, int out_max)
{
return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
}
public void Encrypt()
{
ProjectLocation = txt_ProjectLocation.Text;
//ProjectLocationCrypted = txt_CryptedLocation.Text;
ProjectLocationCrypted = ProjectLocation;
ProjectLocationCrypted = ProjectLocationCrypted.Replace(@"\BMTune2", @"\BMTune2_Crypted");
Class_Crypter_0.AllClassSaved = new List<string>();
if (!Directory.Exists(ProjectLocationCrypted)) Directory.CreateDirectory(ProjectLocationCrypted);
if (checkBox2.Checked)
{
Class_CreateFiles_0.RemoveFiles();
Class_CreateFiles_0.MakeFiles();
}
GenerateAllClassFilename();
/*if (checkBox3.Checked)
{
GetVariables();
DoAllClass();
CreateFileInfos();
}*/
progressBar1.Value = 0;
label6.Text = "";
label7.Text = "";
LogThis("Done");
}
public void GenerateAllClassFilename()
{
listBox1.Items.Clear();
string pattern = @"\.cs$";
var matches = Directory.GetFiles(ProjectLocation, "*", SearchOption.AllDirectories).Where(path => Regex.Match(path, pattern).Success);
//check in all '*.cs' files
foreach (string file in matches)
{
if (!file.Contains("BMTune_Installer")
&& !file.Contains("BMTune_Licenser")
&& !file.Contains("BMTune_Server")
&& !file.Contains("BMTune_Starter")
&& !file.Contains("BMTune_Uploader")
&& !file.Contains("BMTune_Encrypter")
&& !file.Contains("AppCryptor")
&& !file.Contains(@"\bin\")
&& !file.Contains(@"\Debug\")
&& !file.Contains(@"\obj\")
&& !file.Contains("Resources.Designer.cs")
//&& (file.Contains("Class15.cs")
//|| file.Contains("Class18_file.cs")
//|| file.Contains("FrmMain.cs")
//|| file.Contains("Class31.cs"))
)
{
listBox1.Items.Add(Path.GetFileName(file));
this.Class_Text_0.NotCryptedText.Add(Path.GetFileNameWithoutExtension(file));
}
}
//this.Invalidate(true);
this.Refresh();
}
private void Button1_Click(object sender, EventArgs e)
{
StartTime = DateTime.Now;
Encrypt();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void TextBox4_Validated(object sender, EventArgs e)
{
try
{
CryptedMaxLenght = int.Parse(textBox4.Text);
}
catch { }
}
private void TextBox2_Validated(object sender, EventArgs e)
{
try
{
CryptedMinLenght = int.Parse(textBox2.Text);
}
catch { }
}
private void ListBox1_SelectedIndexChanged(object sender, EventArgs e)
{
bool Seeef = false;
if (listBox1.SelectedIndex >= 0)
{
Seeef = true;
Class_Variables_0.GetVariables(listBox1.Items[listBox1.SelectedIndex].ToString(), false);
Class_Crypter_0.EncryptThisFile(listBox1.Items[listBox1.SelectedIndex].ToString(), false);
if (checkBox5.Checked) Class_StringCrypter_0.EncryptStringInFile(listBox1.Items[listBox1.SelectedIndex].ToString(), false);
CreateFileInfos();
}
if (Seeef)
{
CreateFileInfos();
progressBar1.Value = 0;
label6.Text = "";
label7.Text = "";
LogThis("Done");
}
}
private void CreateFileInfos()
{
string SaveStr = "";
for (int i = 0; i < Class_Variables_0.AllMethods.Count; i++) SaveStr += Class_Variables_0.AllMethods[i] + "=" + Class_Variables_0.AllMethodsCrypted[i] + Environment.NewLine;
File.Create(Application.StartupPath + @"\LocationsInfos.txt").Dispose();
File.WriteAllText(Application.StartupPath + @"\LocationsInfos.txt", SaveStr);
}
private void Button2_Click(object sender, EventArgs e)
{
StartTime = DateTime.Now;
Class_FileRenamer_0.RemadeAllFilenames();
}
}
}

3125
AppCryptor/Form1.resx Normal file

File diff suppressed because it is too large Load Diff

21
AppCryptor/Program.cs Normal file
View File

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace AppCryptor
{
static class Program
{
/// <summary>
/// Point d'entrée principal de l'application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// Les informations générales relatives à un assembly dépendent de
// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations
// associées à un assembly.
[assembly: AssemblyTitle("AppCryptor")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("AppCryptor")]
[assembly: AssemblyCopyright("Copyright © 2019")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly
// aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de
// COM, affectez la valeur true à l'attribut ComVisible sur ce type.
[assembly: ComVisible(false)]
// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM
[assembly: Guid("15e3fe49-6a77-4d5c-927e-ca72304abfb0")]
// Les informations de version pour un assembly se composent des quatre valeurs suivantes :
//
// Version principale
// Version secondaire
// Numéro de build
// Révision
//
// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut
// en utilisant '*', comme indiqué ci-dessous :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -0,0 +1,72 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Ce code a été généré par un outil.
// Version du runtime :4.0.30319.42000
//
// Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si
// le code est régénéré.
// </auto-generated>
//------------------------------------------------------------------------------
namespace AppCryptor.Properties {
using System;
/// <summary>
/// Une classe de ressource fortement typée destinée, entre autres, à la consultation des chaînes localisées.
/// </summary>
// Cette classe a été générée automatiquement par la classe StronglyTypedResourceBuilder
// à l'aide d'un outil, tel que ResGen ou Visual Studio.
// Pour ajouter ou supprimer un membre, modifiez votre fichier .ResX, puis réexécutez ResGen
// avec l'option /str ou régénérez votre projet VS.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Retourne l'instance ResourceManager mise en cache utilisée par cette classe.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AppCryptor.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Remplace la propriété CurrentUICulture du thread actuel pour toutes
/// les recherches de ressources à l'aide de cette classe de ressource fortement typée.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Recherche une ressource localisée de type System.IO.UnmanagedMemoryStream semblable à System.IO.MemoryStream.
/// </summary>
internal static System.IO.UnmanagedMemoryStream alert2 {
get {
return ResourceManager.GetStream("alert2", resourceCulture);
}
}
}
}

View File

@ -0,0 +1,124 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="alert2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\alert2.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>

View File

@ -0,0 +1,30 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace AppCryptor.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}

View File

@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

BIN
AppCryptor/alert2.wav Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,9 @@
C:\Users\boule\Documents\Visual Studio 2019\Projects\AppCryptor\bin\Debug\AppCryptorX.exe
C:\Users\boule\Documents\Visual
Studio
2019\Projects\BMTune2_Crypted
13
16
------------------------------
C:\Users\boule\Documents\Visual Studio 2019\Projects\BMTune2_Crypted

View File

@ -0,0 +1,340 @@
AssemblyInfo.cs
Binary_Files.cs
BMTune.csproj
Class10_settings.cs
Class11_u.cs
Class12_afrT.cs
Class13_u.cs
Class15.cs
Class16_u.cs
Class17.cs
Class18.cs
Class1_u.cs
Class1_Version.cs
Class20_u.cs
Class21_snap.cs
Class22_startup.cs
Class24_u.cs
Class25.cs
Class27_EmuProgress.cs
Class28_Shortcuts.cs
Class29_Dyno.cs
Class2_serialWB.cs
Class30_OBD2.cs
Class32_Locations.cs
Class33_Sensors.cs
Class34_Zip.cs
Class5_burn.cs
Class7_u.cs
Class8_u.cs
Class8_v.cs
Class9_baserom.cs
ctrlAdvGraph.cs
ctrlAdvTable.cs
ctrlAdvTable.resx
ctrlBatteryOffset.cs
ctrlBatteryOffset.resx
CtrlGrid.cs
CtrlGrid.resx
CtrlInputSelector.cs
CtrlInputSelector.resx
ctrlMapGraph.cs
ctrlMapGraph.resx
CtrlOutputSelector.cs
CtrlOutputSelector.resx
CtrlSensorGrid.cs
CtrlSensorGrid.resx
DisplayItemsStripped.cs
Enum4.cs
Enum6.cs
frmAboutBox.cs
frmAboutBox.resx
frmAccelTimeSetting.cs
frmAccelTimeSetting.resx
frmActiveDatalog.cs
frmActiveDatalog.resx
frmAdvancedGraph.cs
frmAdvancedGraph.resx
frmAdvTableAdd.cs
frmAdvTableAdd.resx
frmBaseMap.cs
frmBaseMap.resx
frmBaseromConvert.cs
frmBaseromConvert.resx
frmBinTool.cs
frmBinTool.resx
frmBluetooth.cs
frmBluetooth.designer.cs
frmBluetooth.resx
frmBoostTableSetup.cs
frmBoostTableSetup.resx
frmBurner.cs
frmBurner.resx
frmChangelog.cs
frmChangelog.resx
frmChartTemplates.cs
frmChartTemplates.resx
frmConsole.cs
frmConsole.resx
frmConvert.cs
frmConvert.resx
frmCopyMaps.cs
frmCopyMaps.resx
frmCopyright.cs
frmCopyright.resx
frmCPUBench.cs
frmCPUBench.Designer.cs
frmCPUBench.resx
FrmDataDisplay.cs
FrmDataDisplay.resx
frmDataGrid.cs
frmDataGrid.resx
frmDatalogGraphs.cs
frmDatalogGraphs.resx
frmDebug.cs
frmDebug.resx
frmDownloadBaserom.cs
frmDownloadBaserom.resx
frmDownloadFile.cs
frmDownloadFile.resx
frmDownloadUpdate.cs
frmDownloadUpdate.resx
frmDynoControl.cs
frmDynoSetup.cs
frmDynoSetup.resx
frmEbcDutyErrorInput.cs
frmErrorCodes.cs
frmErrorCodes.resx
frmGaugesEditor.cs
frmGaugesEditor.resx
frmGearLearn.cs
frmGearLearn.resx
FrmGridChart.cs
FrmGridChart.resx
frmGridSelectionAdj.cs
frmGridSelectionAdj.resx
frmHC05.cs
frmHC05.resx
frmHints.cs
frmHints.resx
frmIgnCutModWarning.cs
frmIgnCutModWarning.resx
frmIgnitionSync.cs
frmIgnitionSync.resx
frmInjectorOverallCalc.cs
frmInjectorOverallCalc.resx
frmLivePlot.cs
frmLivePlot.resx
frmLivePSetting.cs
frmLivePSetting.resx
frmLoading.cs
frmLoading.resx
FrmMain.cs
FrmMain.resx
frmMapScalar.cs
frmMapScalar.resx
frmOnboard.cs
frmOnboard.resx
frmOstrichInfo.cs
frmOstrichInfo.resx
frmParameters.cs
frmParameters.resx
frmPassword.cs
frmPassword.resx
frmProtocolInfos.cs
frmProtocolInfos.resx
frmQuickAdjust.cs
frmQuickAdjust.resx
frmQuickSaveDesc.cs
frmQuickSaveDesc.resx
frmQuickSaveMain.cs
frmQuickSaveMain.resx
frmReset.cs
frmReset.resx
frmSelectMode.cs
frmSelectMode.resx
frmSensorSetup.cs
frmSensorSetup.resx
frmSettings.cs
frmSettings.resx
frmShortKeys.cs
frmShortKeys.resx
frmUnZIP.cs
frmUnZIP.resx
frmUploadBaserom.cs
frmUploadBaserom.resx
frmWaiting.cs
frmWaiting.resx
InjectorsLoading.cs
Mtss.cs
Packages.zip
parmAc.cs
parmAc.resx
parmAntiStart.cs
parmAntiStart.resx
parmBoostCut.cs
parmBoostCut.resx
parmBoostMapSensor.cs
parmBoostMapSensor.resx
parmBstManual.cs
parmBstManual.resx
parmBurnOut.cs
parmBurnOut.resx
parmCloseLoop.cs
parmCloseLoop.resx
parmComments.cs
parmComments.resx
parmCPR.cs
parmCPR.resx
parmCrankFuel.cs
parmCrankFuel.resx
parmCylCorr.cs
parmCylCorr.resx
parmDualMap.cs
parmDualMap.resx
parmDwell.cs
parmDwell.resx
parmEbcCloseloop.cs
parmEbcCloseloop.resx
parmEbcCompensation.cs
parmEbcCompensation.resx
parmEbcDutyLook.cs
parmEbcDutyLook.resx
parmEbcSettings.cs
parmEbcSettings.resx
parmEctCorr.cs
parmEctCorr.resx
parmEctProtection.cs
parmEctProtection.resx
parmFanControl.cs
parmFanControl.resx
parmFileProtection.cs
parmFileProtection.resx
parmFlexFuel.cs
parmFlexFuel.resx
parmFtl.cs
parmFtl.resx
parmFts.cs
parmFts.resx
parmFuelCut.cs
parmFuelCut.resx
parmGearCorr.cs
parmGearCorr.resx
parmGPO1_a.cs
parmGPO1_a.resx
parmGPO1_if.cs
parmGPO1_if.resx
parmGPO2_a.cs
parmGPO2_a.resx
parmGPO2_if.cs
parmGPO2_if.resx
parmGPO3_a.cs
parmGPO3_a.resx
parmGPO3_if.cs
parmGPO3_if.resx
parmIAB.cs
parmIAB.resx
parmIATcorr.cs
parmIATcorr.resx
parmIdleIgnCorr.cs
parmIdleIgnCorr.resx
parmIdleMain.cs
parmIdleMain.resx
parmInjector.cs
parmInjector.resx
parmKnockProtection.cs
parmKnockProtection.resx
parmLeanProtection.cs
parmLeanProtection.resx
parmMap.cs
parmMap.resx
parmMilShift.cs
parmMilShift.resx
parmOBL.cs
parmOBL.resx
parmPopcorn.cs
parmPopcorn.resx
parmRevLimit.cs
parmRevLimit.resx
parmRomOptions.cs
parmRomOptions.resx
parmSCC.cs
parmSCC.resx
parmTipInOut.cs
parmTipInOut.resx
parmTpsRetard.cs
parmTpsRetard.resx
parmTpsSensor.cs
parmTpsSensor.resx
parmTransmission.cs
parmTransmission.resx
parmVtec.cs
parmVtec.resx
Struct12.cs
Struct15.cs
Struct16.cs
Struct17.cs
Struct18.cs
Struct19.cs
Struct20.cs
Struct22.cs
Struct23.cs
Struct24.cs
CtrlDisplayItemText.cs
CtrlDisplayItemText.resx
ctrlLogGraph.cs
ctrlLogGraph.resx
ctrlMapSensor.cs
ctrlMapSensor.resx
ctrlMapValue.cs
ctrlMapValue.resx
ctrlPlotGraph.cs
ctrlPlotGraph.resx
TunerAnalogGrid.cs
SettingsFile.cs
SettingsFormatException.cs
SettingsKey.cs
AdvTableType.cs
AirFuelUnits.cs
AnalogInputs.cs
ArduinoModel.cs
BMTuneVersions.cs
ChartCollection.cs
ChartSetup.cs
ChartTemplate.cs
CorrectionUnits.cs
DatalogButtonsTypes.cs
DatalogDisplayTypes.cs
DataloggingMode.cs
DataloggingState.cs
DataloggingTable.cs
DatalogLedTypes.cs
DoNotObfuscate.cs
EmulatorMoatesType.cs
EmulatorMode.cs
EmulatorState.cs
EmulatorVendorDemon.cs
EmulatorVendorOstrich.cs
FuelDisplayMode.cs
MapGraphSelect.cs
MapGraphType.cs
MapSensorUnits.cs
OverlayDisplaySelected.cs
QuickSaveItem.cs
QuickSaveListObjects.cs
SelectedTable.cs
SensorsX.cs
TableOverlay.cs
TemperatureUnits.cs
TunerAfrGrid.cs
TunerSmartTrack.cs
VoltUnits.cs
VssUnits.cs
WBinput.cs
Wideband_Serial.cs
frmHelp.cs
frmHelp.resx
parmHelpNew.cs
parmHelpNew.resx
Resources.Designer.cs
Resources.resx

View File

@ -0,0 +1,214 @@
Pro_Demon=X̨̛͈̻̮̗̙͔̠̼͖̫͙̼͉̓ͣ̊̄͒͆͒̀ͯͩ̇̓̌ͨ̍ͣ̃ͮ͠ţ̶̝͖͓̟̝̳̻̱͖̟͙̜̬̳̯̤ͨ̓̂́ͯ̾͒ͫ̿̇͐ͪͩ͐͋ͬ͑̄̚͢͞ẅ̴̶̷̡͎̭̺͙͚̤͒͑͆ͣͥͫ͊ͯ̈̒͛̚͟
P=T̛̮̗͚̖̬̺͔̮̝͈͇̦̐̓̇́̒ͫ̀͢͟j̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠q́͐ͤ̄̃͌͗̔ͯ̈́̀̀͏͈͕͍̲͓̜̳̲̤̪̱̞̣̼͙̩̯̘
Binary_Files=Å̷̢̰̺̻̟͕̫̱̯͔̫̯͕̪̘͉̬ͯ̄ͭ̄ͫ̀ͯl̴͚͎̙̻͎̟̩͓͕̜̀̉̓̀͛̿ͣ̆̿̊̃ͨ̄̇̔̀ͣ̒ͣ
Class10_settings=R̰̺̟̺͈͂̏͛ͭ́̀͡͡͝l̴͚͎̙̻͎̟̩͓͕̜̀̉̓̀͛̿ͣ̆̿̊̃ͨ̄̇̔̀ͣ̒ͣ
Class11_u=B̴̩͇̫͙͆ͭͣ͌͑̂ͬͮ̈̄̔ͨ̏̑ͨ͊͆͂́͝ẅ̴̶̷̡͎̭̺͙͚̤͒͑͆ͣͥͫ͊ͯ̈̒͛̚͟
Class12_afrT=K͋ͭ̄́̽͌̏̂̉͛q́͐ͤ̄̃͌͗̔ͯ̈́̀̀͏͈͕͍̲͓̜̳̲̤̪̱̞̣̼͙̩̯̘
Class13_u=Ḣ̵̳̪̦͖̥̭͚̼͐̔ͨͬ̇͋̑ͥ͐̀́͘͜u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅ
Class15=E̺̳̭͚̣̠̳̹̩̝̹̝̺̳̬̙̥̙̹ͭ̽͛̉ͭ͋̊̚͢ţ̶̝͖͓̟̝̳̻̱͖̟͙̜̬̳̯̤ͨ̓̂́ͯ̾͒ͫ̿̇͐ͪͩ͐͋ͬ͑̄̚͢͞
Class16_u=B̴̩͇̫͙͆ͭͣ͌͑̂ͬͮ̈̄̔ͨ̏̑ͨ͊͆͂́͝b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ
Class17=K͋ͭ̄́̽͌̏̂̉͛l̴͚͎̙̻͎̟̩͓͕̜̀̉̓̀͛̿ͣ̆̿̊̃ͨ̄̇̔̀ͣ̒ͣ
Class18=Q̞̝͔͌̇ͬͨ̔ͮ̉͒̔ͭ̎͌͝͡͡x̗̟̬͔̤̻̟̎ͥ̀̅͑ͨͥ͌ͣ̍̑̽ͤ̇̿̈́̈́ͬ͘͝ͅ
Class1_u=F̡̝̭̪̣͓̼͍̩̩̲̪̲͒ͨ̈ͦ̋͒͑͐͐͂͊̾̊ͪ̕͢͠͠ͅͅo̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅ
Class1_Version=Ḣ̵̳̪̦͖̥̭͚̼͐̔ͨͬ̇͋̑ͥ͐̀́͘͜z̴͓͍̗̥̤͌ͬ̑̓̈́͋̏̽̐̋͌͛̾ͮ̾̕͢͝
Class20_u=U͉͈͍̖̫̳̙̥̼̹̘͍̔̈́͑̐͛ͥ̿ͧ̔ͩ̚͠͞ẅ̴̶̷̡͎̭̺͙͚̤͒͑͆ͣͥͫ͊ͯ̈̒͛̚͟
Class21_snap=S̴̸͚͖̫͉̙̹̭̯̱̺̠͎̻̻̳̮͍̓́ͬ̈̃̎ͤ̄ͫͤͦͫ̚͟͠͡ͅq́͐ͤ̄̃͌͗̔ͯ̈́̀̀͏͈͕͍̲͓̜̳̲̤̪̱̞̣̼͙̩̯̘
Class22_startup=J͛ͪ̌͆̽ͯͨ̈̄ͦ͜͡͏̲͇̞̝͚̻̗̬͕̞̞̩̭̕͡j̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠
Class24_u=U͉͈͍̖̫̳̙̥̼̹̘͍̔̈́͑̐͛ͥ̿ͧ̔ͩ̚͠͞p̷̨̧͇̗̩͉̲̱̙̬̖̜̝̤̻̱̝̮͕̯͑̒̍͋ͦ̊͘
Class25=G̛͌̈̄ͬ̾͒̎ͦ͂ͣ̓͟b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ
Class27_EmuProgress=K͋ͭ̄́̽͌̏̂̉͛k̶̼̰̘̲̪͎̲̟͇̰̪̪̗̅́ͤ͐͗͑͑͐̓̊͑ͯ̒̊̎ͮ̆̚̕
Class28_Shortcuts=B̴̩͇̫͙͆ͭͣ͌͑̂ͬͮ̈̄̔ͨ̏̑ͨ͊͆͂́͝m̨̫͈̣̦̼̱̦͓͈̲͙̫͈͔̞̟͙̠̲͑͑ͦͦ͛ͧ̓̕͝
Class29_Dyno=Q̞̝͔͌̇ͬͨ̔ͮ̉͒̔ͭ̎͌͝͡͡c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅ
Class2_serialWB=Z̨̡͍͈̖̳̹͔͕̝̘̠͐͆͆̄͢ͅi̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜
Class30_OBD2=O̵ͯ̑̎̓͒̐̔̋̈́͌̄̿͋̋̈͐͏ǧ̴̵̡̼͎̻̝̲̹̲̖͂̐̿̆ͪ̎̍͒̿̓̂͘͟
Class32_Locations=Ḣ̵̳̪̦͖̥̭͚̼͐̔ͨͬ̇͋̑ͥ͐̀́͘͜p̷̨̧͇̗̩͉̲̱̙̬̖̜̝̤̻̱̝̮͕̯͑̒̍͋ͦ̊͘
Class33_Sensors=Q̞̝͔͌̇ͬͨ̔ͮ̉͒̔ͭ̎͌͝͡͡z̴͓͍̗̥̤͌ͬ̑̓̈́͋̏̽̐̋͌͛̾ͮ̾̕͢͝
Class34_Zip=X̨̛͈̻̮̗̙͔̠̼͖̫͙̼͉̓ͣ̊̄͒͆͒̀ͯͩ̇̓̌ͨ̍ͣ̃ͮ͠e̛̒͂͌̓ͣͬ͗̉ͣͬ͆̃̒͂
Class5_burn=Ç̧̻̠͈͈͕̞̥̭̦̳̯͈̤̲̈́͗͐̆́͊̍̀̑̾̇ͤͭ̍ͫ̽͘ẅ̴̶̷̡͎̭̺͙͚̤͒͑͆ͣͥͫ͊ͯ̈̒͛̚͟
Class7_u=R̰̺̟̺͈͂̏͛ͭ́̀͡͡͝c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅ
Class8_u=V̸̒̔̒ͧͭ̎̆͗ͥͥͩ̈́ͬ̔ͦ́̔̚̚v̸́͛̓͛͌̅ͯ͌ͮ̆͊ͦ̂̇ͯͪͫ͏̷̙̻̖
Class8_v=Ŵ͊̈́͛̆ͤ͛͗̈́̆̾̀͛͋ͥ̊̐ͪp̷̨̧͇̗̩͉̲̱̙̬̖̜̝̤̻̱̝̮͕̯͑̒̍͋ͦ̊͘
Class9_baserom=E̺̳̭͚̣̠̳̹̩̝̹̝̺̳̬̙̥̙̹ͭ̽͛̉ͭ͋̊̚͢e̛̒͂͌̓ͣͬ͗̉ͣͬ͆̃̒͂
ctrlAdvGraph=Ņ̨͈͚͔̭̲͎̗̤̫̣͓͙̟ͨͪͮ̈́̎͐̾ͭͩ̈́̄̎͋̊ͣ̄́ͧ͋͘͜d̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟
ctrlAdvTable=U͉͈͍̖̫̳̙̥̼̹̘͍̔̈́͑̐͛ͥ̿ͧ̔ͩ̚͠͞f̸̡͈͍̳̯̖̣̱͊͊͋̂̚̚
ctrlBatteryOffset=J͛ͪ̌͆̽ͯͨ̈̄ͦ͜͡͏̲͇̞̝͚̻̗̬͕̞̞̩̭̕͡u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅ
CtrlGrid=Ç̧̻̠͈͈͕̞̥̭̦̳̯͈̤̲̈́͗͐̆́͊̍̀̑̾̇ͤͭ̍ͫ̽͘y͍͔̬̫͙̝̼͎̭͔̥̻̩̺͎̤̻̤̑ͫ̃ͫ̀̍̿̎̄͐͌͌͢
CtrlInputSelector=Å̷̢̰̺̻̟͕̫̱̯͔̫̯͕̪̘͉̬ͯ̄ͭ̄ͫ̀ͯy͍͔̬̫͙̝̼͎̭͔̥̻̩̺͎̤̻̤̑ͫ̃ͫ̀̍̿̎̄͐͌͌͢
ctrlMapGraph=B̴̩͇̫͙͆ͭͣ͌͑̂ͬͮ̈̄̔ͨ̏̑ͨ͊͆͂́͝ǧ̴̵̡̼͎̻̝̲̹̲̖͂̐̿̆ͪ̎̍͒̿̓̂͘͟
CtrlOutputSelector=G̛͌̈̄ͬ̾͒̎ͦ͂ͣ̓͟o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅ
CtrlSensorGrid=Q̞̝͔͌̇ͬͨ̔ͮ̉͒̔ͭ̎͌͝͡͡b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ
DisplayItemsStripped=Å̷̢̰̺̻̟͕̫̱̯͔̫̯͕̪̘͉̬ͯ̄ͭ̄ͫ̀ͯq́͐ͤ̄̃͌͗̔ͯ̈́̀̀͏͈͕͍̲͓̜̳̲̤̪̱̞̣̼͙̩̯̘
Enum4=Ņ̨͈͚͔̭̲͎̗̤̫̣͓͙̟ͨͪͮ̈́̎͐̾ͭͩ̈́̄̎͋̊ͣ̄́ͧ͋͘͜b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ
Enum6=Q̞̝͔͌̇ͬͨ̔ͮ̉͒̔ͭ̎͌͝͡͡ẅ̴̶̷̡͎̭̺͙͚̤͒͑͆ͣͥͫ͊ͯ̈̒͛̚͟
frmAboutBox=Ļ̴̥̟̩̟̪͚̟͖̟̫̺̤͎̮̜͙ͯͩ̃͆͋ͤ̓̎ͣ̆̓ͭ͝i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜
frmAccelTimeSetting=Ŵ͊̈́͛̆ͤ͛͗̈́̆̾̀͛͋ͥ̊̐ͪţ̶̝͖͓̟̝̳̻̱͖̟͙̜̬̳̯̤ͨ̓̂́ͯ̾͒ͫ̿̇͐ͪͩ͐͋ͬ͑̄̚͢͞
frmActiveDatalog=Z̨̡͍͈̖̳̹͔͕̝̘̠͐͆͆̄͢ͅx̗̟̬͔̤̻̟̎ͥ̀̅͑ͨͥ͌ͣ̍̑̽ͤ̇̿̈́̈́ͬ͘͝ͅ
frmAdvancedGraph=B̴̩͇̫͙͆ͭͣ͌͑̂ͬͮ̈̄̔ͨ̏̑ͨ͊͆͂́͝c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅ
frmAdvTableAdd=Ḏ̛̥̘̟͎̹͍͖̩̳̾̽ͮ̾ͫ̿̓͆́ͨͮͦͩ͌̀̚u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅ
frmBaseMap=X̨̛͈̻̮̗̙͔̠̼͖̫͙̼͉̓ͣ̊̄͒͆͒̀ͯͩ̇̓̌ͨ̍ͣ̃ͮ͠ẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡
frmBaseromConvert=J͛ͪ̌͆̽ͯͨ̈̄ͦ͜͡͏̲͇̞̝͚̻̗̬͕̞̞̩̭̕͡ǧ̴̵̡̼͎̻̝̲̹̲̖͂̐̿̆ͪ̎̍͒̿̓̂͘͟
frmBinTool=O̵ͯ̑̎̓͒̐̔̋̈́͌̄̿͋̋̈͐͏ẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡
frmBluetooth=Ç̧̻̠͈͈͕̞̥̭̦̳̯͈̤̲̈́͗͐̆́͊̍̀̑̾̇ͤͭ̍ͫ̽͘n̑̆͑͋͆̏̊ͭͫ̾ͭ̇ͩ̒̒ͩ̏̚̕
frmBluetooth.designer=Ņ̨͈͚͔̭̲͎̗̤̫̣͓͙̟ͨͪͮ̈́̎͐̾ͭͩ̈́̄̎͋̊ͣ̄́ͧ͋͘͜c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅ
frmBoostTableSetup=T̛̮̗͚̖̬̺͔̮̝͈͇̦̐̓̇́̒ͫ̀͢͟l̴͚͎̙̻͎̟̩͓͕̜̀̉̓̀͛̿ͣ̆̿̊̃ͨ̄̇̔̀ͣ̒ͣ
frmBurner=B̴̩͇̫͙͆ͭͣ͌͑̂ͬͮ̈̄̔ͨ̏̑ͨ͊͆͂́͝m̨̫͈̣̦̼̱̦͓͈̲͙̫͈͔̞̟͙̠̲͑͑ͦͦ͛ͧ̓̕͝f̸̡͈͍̳̯̖̣̱͊͊͋̂̚̚
frmChangelog=K͋ͭ̄́̽͌̏̂̉͛ẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡
frmChartTemplates=G̛͌̈̄ͬ̾͒̎ͦ͂ͣ̓͟o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅz̴͓͍̗̥̤͌ͬ̑̓̈́͋̏̽̐̋͌͛̾ͮ̾̕͢͝
frmConsole=X̨̛͈̻̮̗̙͔̠̼͖̫͙̼͉̓ͣ̊̄͒͆͒̀ͯͩ̇̓̌ͨ̍ͣ̃ͮ͠x̗̟̬͔̤̻̟̎ͥ̀̅͑ͨͥ͌ͣ̍̑̽ͤ̇̿̈́̈́ͬ͘͝ͅ
frmConvert=Q̞̝͔͌̇ͬͨ̔ͮ̉͒̔ͭ̎͌͝͡͡u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅ
frmCopyMaps=G̛͌̈̄ͬ̾͒̎ͦ͂ͣ̓͟q́͐ͤ̄̃͌͗̔ͯ̈́̀̀͏͈͕͍̲͓̜̳̲̤̪̱̞̣̼͙̩̯̘
frmCopyright=Ŵ͊̈́͛̆ͤ͛͗̈́̆̾̀͛͋ͥ̊̐ͪc̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅ
frmCPUBench=T̛̮̗͚̖̬̺͔̮̝͈͇̦̐̓̇́̒ͫ̀͢͟f̸̡͈͍̳̯̖̣̱͊͊͋̂̚̚
frmCPUBench.Designer=Ļ̴̥̟̩̟̪͚̟͖̟̫̺̤͎̮̜͙ͯͩ̃͆͋ͤ̓̎ͣ̆̓ͭ͝ẅ̴̶̷̡͎̭̺͙͚̤͒͑͆ͣͥͫ͊ͯ̈̒͛̚͟
FrmDataDisplay=I̽̀̀̉̇̋̈̊͒͋͛̓͛̋̑q́͐ͤ̄̃͌͗̔ͯ̈́̀̀͏͈͕͍̲͓̜̳̲̤̪̱̞̣̼͙̩̯̘
frmDataGrid=Ç̧̻̠͈͈͕̞̥̭̦̳̯͈̤̲̈́͗͐̆́͊̍̀̑̾̇ͤͭ̍ͫ̽͘i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜
frmDatalogGraphs=G̛͌̈̄ͬ̾͒̎ͦ͂ͣ̓͟ẅ̴̶̷̡͎̭̺͙͚̤͒͑͆ͣͥͫ͊ͯ̈̒͛̚͟
frmDebug=X̨̛͈̻̮̗̙͔̠̼͖̫͙̼͉̓ͣ̊̄͒͆͒̀ͯͩ̇̓̌ͨ̍ͣ̃ͮ͠z̴͓͍̗̥̤͌ͬ̑̓̈́͋̏̽̐̋͌͛̾ͮ̾̕͢͝
frmDownloadBaserom=X̨̛͈̻̮̗̙͔̠̼͖̫͙̼͉̓ͣ̊̄͒͆͒̀ͯͩ̇̓̌ͨ̍ͣ̃ͮ͠x̗̟̬͔̤̻̟̎ͥ̀̅͑ͨͥ͌ͣ̍̑̽ͤ̇̿̈́̈́ͬ͘͝ͅẅ̴̶̷̡͎̭̺͙͚̤͒͑͆ͣͥͫ͊ͯ̈̒͛̚͟
frmDownloadFile=E̺̳̭͚̣̠̳̹̩̝̹̝̺̳̬̙̥̙̹ͭ̽͛̉ͭ͋̊̚͢ǧ̴̵̡̼͎̻̝̲̹̲̖͂̐̿̆ͪ̎̍͒̿̓̂͘͟
frmDownloadUpdate=E̺̳̭͚̣̠̳̹̩̝̹̝̺̳̬̙̥̙̹ͭ̽͛̉ͭ͋̊̚͢ǧ̴̵̡̼͎̻̝̲̹̲̖͂̐̿̆ͪ̎̍͒̿̓̂͘͟k̶̼̰̘̲̪͎̲̟͇̰̪̪̗̅́ͤ͐͗͑͑͐̓̊͑ͯ̒̊̎ͮ̆̚̕
frmDynoControl=R̰̺̟̺͈͂̏͛ͭ́̀͡͡͝p̷̨̧͇̗̩͉̲̱̙̬̖̜̝̤̻̱̝̮͕̯͑̒̍͋ͦ̊͘
frmDynoSetup=Ļ̴̥̟̩̟̪͚̟͖̟̫̺̤͎̮̜͙ͯͩ̃͆͋ͤ̓̎ͣ̆̓ͭ͝i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜j̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠
frmEbcDutyErrorInput=V̸̒̔̒ͧͭ̎̆͗ͥͥͩ̈́ͬ̔ͦ́̔̚̚ẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡
frmErrorCodes=I̽̀̀̉̇̋̈̊͒͋͛̓͛̋̑e̛̒͂͌̓ͣͬ͗̉ͣͬ͆̃̒͂
frmGaugesEditor=P̷̸̢̨̼̗̬̬̥͕̪̲̗̰̞̫̖̙̯̭͖͊̉ͭ̊̀̈́̕ẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡
frmGearLearn=X̨̛͈̻̮̗̙͔̠̼͖̫͙̼͉̓ͣ̊̄͒͆͒̀ͯͩ̇̓̌ͨ̍ͣ̃ͮ͠n̑̆͑͋͆̏̊ͭͫ̾ͭ̇ͩ̒̒ͩ̏̚̕
FrmGridChart=R̰̺̟̺͈͂̏͛ͭ́̀͡͡͝y͍͔̬̫͙̝̼͎̭͔̥̻̩̺͎̤̻̤̑ͫ̃ͫ̀̍̿̎̄͐͌͌͢
frmGridSelectionAdj=Ḏ̛̥̘̟͎̹͍͖̩̳̾̽ͮ̾ͫ̿̓͆́ͨͮͦͩ͌̀̚n̑̆͑͋͆̏̊ͭͫ̾ͭ̇ͩ̒̒ͩ̏̚̕
frmHC05=Å̷̢̰̺̻̟͕̫̱̯͔̫̯͕̪̘͉̬ͯ̄ͭ̄ͫ̀ͯs̶̡̺̙̪̣͎̟͉̟̥̜͈̯̳̪̀̑͐́̇ͩͥ̑ͪ̔ͪ͂ͤ̐̾̈́͑̄͘̕͡
frmHints=Q̞̝͔͌̇ͬͨ̔ͮ̉͒̔ͭ̎͌͝͡͡ẅ̴̶̷̡͎̭̺͙͚̤͒͑͆ͣͥͫ͊ͯ̈̒͛̚͟s̶̡̺̙̪̣͎̟͉̟̥̜͈̯̳̪̀̑͐́̇ͩͥ̑ͪ̔ͪ͂ͤ̐̾̈́͑̄͘̕͡
frmIgnCutModWarning=O̵ͯ̑̎̓͒̐̔̋̈́͌̄̿͋̋̈͐͏s̶̡̺̙̪̣͎̟͉̟̥̜͈̯̳̪̀̑͐́̇ͩͥ̑ͪ̔ͪ͂ͤ̐̾̈́͑̄͘̕͡
frmIgnitionSync=E̺̳̭͚̣̠̳̹̩̝̹̝̺̳̬̙̥̙̹ͭ̽͛̉ͭ͋̊̚͢p̷̨̧͇̗̩͉̲̱̙̬̖̜̝̤̻̱̝̮͕̯͑̒̍͋ͦ̊͘
frmInjectorOverallCalc=V̸̒̔̒ͧͭ̎̆͗ͥͥͩ̈́ͬ̔ͦ́̔̚̚c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅ
frmLivePlot=B̴̩͇̫͙͆ͭͣ͌͑̂ͬͮ̈̄̔ͨ̏̑ͨ͊͆͂́͝v̸́͛̓͛͌̅ͯ͌ͮ̆͊ͦ̂̇ͯͪͫ͏̷̙̻̖
frmLivePSetting=B̴̩͇̫͙͆ͭͣ͌͑̂ͬͮ̈̄̔ͨ̏̑ͨ͊͆͂́͝c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅx̗̟̬͔̤̻̟̎ͥ̀̅͑ͨͥ͌ͣ̍̑̽ͤ̇̿̈́̈́ͬ͘͝ͅ
frmLoading=B̴̩͇̫͙͆ͭͣ͌͑̂ͬͮ̈̄̔ͨ̏̑ͨ͊͆͂́͝ţ̶̝͖͓̟̝̳̻̱͖̟͙̜̬̳̯̤ͨ̓̂́ͯ̾͒ͫ̿̇͐ͪͩ͐͋ͬ͑̄̚͢͞
FrmMain=T̛̮̗͚̖̬̺͔̮̝͈͇̦̐̓̇́̒ͫ̀͢͟ẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡
frmMapScalar=Ļ̴̥̟̩̟̪͚̟͖̟̫̺̤͎̮̜͙ͯͩ̃͆͋ͤ̓̎ͣ̆̓ͭ͝o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅ
frmOnboard=G̛͌̈̄ͬ̾͒̎ͦ͂ͣ̓͟s̶̡̺̙̪̣͎̟͉̟̥̜͈̯̳̪̀̑͐́̇ͩͥ̑ͪ̔ͪ͂ͤ̐̾̈́͑̄͘̕͡
frmOstrichInfo=E̺̳̭͚̣̠̳̹̩̝̹̝̺̳̬̙̥̙̹ͭ̽͛̉ͭ͋̊̚͢k̶̼̰̘̲̪͎̲̟͇̰̪̪̗̅́ͤ͐͗͑͑͐̓̊͑ͯ̒̊̎ͮ̆̚̕
frmParameters=Y̒̄̔͆́̑͊̈̿̒͂ͪ̂ͨ̃ͬ͘o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅ
frmPassword=M̰͎͍͇̞͖͓ͣͤ̾̂ͭ̂́͒̌ͩ͘͜͡͠d̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟
frmProtocolInfos=Ḏ̛̥̘̟͎̹͍͖̩̳̾̽ͮ̾ͫ̿̓͆́ͨͮͦͩ͌̀̚ţ̶̝͖͓̟̝̳̻̱͖̟͙̜̬̳̯̤ͨ̓̂́ͯ̾͒ͫ̿̇͐ͪͩ͐͋ͬ͑̄̚͢͞
frmQuickAdjust=B̴̩͇̫͙͆ͭͣ͌͑̂ͬͮ̈̄̔ͨ̏̑ͨ͊͆͂́͝ẅ̴̶̷̡͎̭̺͙͚̤͒͑͆ͣͥͫ͊ͯ̈̒͛̚͟v̸́͛̓͛͌̅ͯ͌ͮ̆͊ͦ̂̇ͯͪͫ͏̷̙̻̖
frmQuickSaveDesc=Ļ̴̥̟̩̟̪͚̟͖̟̫̺̤͎̮̜͙ͯͩ̃͆͋ͤ̓̎ͣ̆̓ͭ͝ţ̶̝͖͓̟̝̳̻̱͖̟͙̜̬̳̯̤ͨ̓̂́ͯ̾͒ͫ̿̇͐ͪͩ͐͋ͬ͑̄̚͢͞
frmQuickSaveMain=U͉͈͍̖̫̳̙̥̼̹̘͍̔̈́͑̐͛ͥ̿ͧ̔ͩ̚͠͞i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜
frmReset=Z̨̡͍͈̖̳̹͔͕̝̘̠͐͆͆̄͢ͅy͍͔̬̫͙̝̼͎̭͔̥̻̩̺͎̤̻̤̑ͫ̃ͫ̀̍̿̎̄͐͌͌͢
frmSelectMode=V̸̒̔̒ͧͭ̎̆͗ͥͥͩ̈́ͬ̔ͦ́̔̚̚ǧ̴̵̡̼͎̻̝̲̹̲̖͂̐̿̆ͪ̎̍͒̿̓̂͘͟
frmSensorSetup=I̽̀̀̉̇̋̈̊͒͋͛̓͛̋̑j̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠
frmSettings=T̛̮̗͚̖̬̺͔̮̝͈͇̦̐̓̇́̒ͫ̀͢͟x̗̟̬͔̤̻̟̎ͥ̀̅͑ͨͥ͌ͣ̍̑̽ͤ̇̿̈́̈́ͬ͘͝ͅ
frmShortKeys=F̡̝̭̪̣͓̼͍̩̩̲̪̲͒ͨ̈ͦ̋͒͑͐͐͂͊̾̊ͪ̕͢͠͠ͅͅẅ̴̶̷̡͎̭̺͙͚̤͒͑͆ͣͥͫ͊ͯ̈̒͛̚͟
frmUnZIP=X̨̛͈̻̮̗̙͔̠̼͖̫͙̼͉̓ͣ̊̄͒͆͒̀ͯͩ̇̓̌ͨ̍ͣ̃ͮ͠o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅ
frmUploadBaserom=E̺̳̭͚̣̠̳̹̩̝̹̝̺̳̬̙̥̙̹ͭ̽͛̉ͭ͋̊̚͢y͍͔̬̫͙̝̼͎̭͔̥̻̩̺͎̤̻̤̑ͫ̃ͫ̀̍̿̎̄͐͌͌͢
frmWaiting=Ḏ̛̥̘̟͎̹͍͖̩̳̾̽ͮ̾ͫ̿̓͆́ͨͮͦͩ͌̀̚s̶̡̺̙̪̣͎̟͉̟̥̜͈̯̳̪̀̑͐́̇ͩͥ̑ͪ̔ͪ͂ͤ̐̾̈́͑̄͘̕͡
InjectorsLoading=V̸̒̔̒ͧͭ̎̆͗ͥͥͩ̈́ͬ̔ͦ́̔̚̚y͍͔̬̫͙̝̼͎̭͔̥̻̩̺͎̤̻̤̑ͫ̃ͫ̀̍̿̎̄͐͌͌͢
Mtss=Å̷̢̰̺̻̟͕̫̱̯͔̫̯͕̪̘͉̬ͯ̄ͭ̄ͫ̀ͯẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡
parmAc=I̽̀̀̉̇̋̈̊͒͋͛̓͛̋̑l̴͚͎̙̻͎̟̩͓͕̜̀̉̓̀͛̿ͣ̆̿̊̃ͨ̄̇̔̀ͣ̒ͣ
parmAntiStart=O̵ͯ̑̎̓͒̐̔̋̈́͌̄̿͋̋̈͐͏i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜
parmBoostCut=F̡̝̭̪̣͓̼͍̩̩̲̪̲͒ͨ̈ͦ̋͒͑͐͐͂͊̾̊ͪ̕͢͠͠ͅͅs̶̡̺̙̪̣͎̟͉̟̥̜͈̯̳̪̀̑͐́̇ͩͥ̑ͪ̔ͪ͂ͤ̐̾̈́͑̄͘̕͡
parmBoostMapSensor=Ļ̴̥̟̩̟̪͚̟͖̟̫̺̤͎̮̜͙ͯͩ̃͆͋ͤ̓̎ͣ̆̓ͭ͝x̗̟̬͔̤̻̟̎ͥ̀̅͑ͨͥ͌ͣ̍̑̽ͤ̇̿̈́̈́ͬ͘͝ͅ
parmBstManual=K͋ͭ̄́̽͌̏̂̉͛e̛̒͂͌̓ͣͬ͗̉ͣͬ͆̃̒͂
parmBurnOut=Å̷̢̰̺̻̟͕̫̱̯͔̫̯͕̪̘͉̬ͯ̄ͭ̄ͫ̀ͯẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅ
parmCloseLoop=O̵ͯ̑̎̓͒̐̔̋̈́͌̄̿͋̋̈͐͏p̷̨̧͇̗̩͉̲̱̙̬̖̜̝̤̻̱̝̮͕̯͑̒̍͋ͦ̊͘
parmComments=Y̒̄̔͆́̑͊̈̿̒͂ͪ̂ͨ̃ͬ͘ẅ̴̶̷̡͎̭̺͙͚̤͒͑͆ͣͥͫ͊ͯ̈̒͛̚͟
parmCPR=Q̞̝͔͌̇ͬͨ̔ͮ̉͒̔ͭ̎͌͝͡͡b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭi̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜
parmCrankFuel=Ḣ̵̳̪̦͖̥̭͚̼͐̔ͨͬ̇͋̑ͥ͐̀́͘͜c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅ
parmCylCorr=Ļ̴̥̟̩̟̪͚̟͖̟̫̺̤͎̮̜͙ͯͩ̃͆͋ͤ̓̎ͣ̆̓ͭ͝l̴͚͎̙̻͎̟̩͓͕̜̀̉̓̀͛̿ͣ̆̿̊̃ͨ̄̇̔̀ͣ̒ͣ
parmDualMap=Q̞̝͔͌̇ͬͨ̔ͮ̉͒̔ͭ̎͌͝͡͡n̑̆͑͋͆̏̊ͭͫ̾ͭ̇ͩ̒̒ͩ̏̚̕
parmDwell=S̴̸͚͖̫͉̙̹̭̯̱̺̠͎̻̻̳̮͍̓́ͬ̈̃̎ͤ̄ͫͤͦͫ̚͟͠͡ͅx̗̟̬͔̤̻̟̎ͥ̀̅͑ͨͥ͌ͣ̍̑̽ͤ̇̿̈́̈́ͬ͘͝ͅ
parmEbcCloseloop=T̛̮̗͚̖̬̺͔̮̝͈͇̦̐̓̇́̒ͫ̀͢͟b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ
parmEbcCompensation=S̴̸͚͖̫͉̙̹̭̯̱̺̠͎̻̻̳̮͍̓́ͬ̈̃̎ͤ̄ͫͤͦͫ̚͟͠͡ͅo̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅ
parmEbcDutyLook=V̸̒̔̒ͧͭ̎̆͗ͥͥͩ̈́ͬ̔ͦ́̔̚̚q́͐ͤ̄̃͌͗̔ͯ̈́̀̀͏͈͕͍̲͓̜̳̲̤̪̱̞̣̼͙̩̯̘
parmEbcSettings=Ç̧̻̠͈͈͕̞̥̭̦̳̯͈̤̲̈́͗͐̆́͊̍̀̑̾̇ͤͭ̍ͫ̽͘ţ̶̝͖͓̟̝̳̻̱͖̟͙̜̬̳̯̤ͨ̓̂́ͯ̾͒ͫ̿̇͐ͪͩ͐͋ͬ͑̄̚͢͞
parmEctCorr=Ḏ̛̥̘̟͎̹͍͖̩̳̾̽ͮ̾ͫ̿̓͆́ͨͮͦͩ͌̀̚m̨̫͈̣̦̼̱̦͓͈̲͙̫͈͔̞̟͙̠̲͑͑ͦͦ͛ͧ̓̕͝
parmEctProtection=E̺̳̭͚̣̠̳̹̩̝̹̝̺̳̬̙̥̙̹ͭ̽͛̉ͭ͋̊̚͢s̶̡̺̙̪̣͎̟͉̟̥̜͈̯̳̪̀̑͐́̇ͩͥ̑ͪ̔ͪ͂ͤ̐̾̈́͑̄͘̕͡
parmFanControl=Z̨̡͍͈̖̳̹͔͕̝̘̠͐͆͆̄͢ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡
parmFileProtection=Ḏ̛̥̘̟͎̹͍͖̩̳̾̽ͮ̾ͫ̿̓͆́ͨͮͦͩ͌̀̚u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅm̨̫͈̣̦̼̱̦͓͈̲͙̫͈͔̞̟͙̠̲͑͑ͦͦ͛ͧ̓̕͝
parmFlexFuel=E̺̳̭͚̣̠̳̹̩̝̹̝̺̳̬̙̥̙̹ͭ̽͛̉ͭ͋̊̚͢b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ
parmFtl=M̰͎͍͇̞͖͓ͣͤ̾̂ͭ̂́͒̌ͩ͘͜͡͠ẅ̴̶̷̡͎̭̺͙͚̤͒͑͆ͣͥͫ͊ͯ̈̒͛̚͟
parmFts=V̸̒̔̒ͧͭ̎̆͗ͥͥͩ̈́ͬ̔ͦ́̔̚̚ẅ̴̶̷̡͎̭̺͙͚̤͒͑͆ͣͥͫ͊ͯ̈̒͛̚͟
parmFuelCut=Y̒̄̔͆́̑͊̈̿̒͂ͪ̂ͨ̃ͬ͘e̛̒͂͌̓ͣͬ͗̉ͣͬ͆̃̒͂
parmGearCorr=O̵ͯ̑̎̓͒̐̔̋̈́͌̄̿͋̋̈͐͏f̸̡͈͍̳̯̖̣̱͊͊͋̂̚̚
parmGPO1_a=R̰̺̟̺͈͂̏͛ͭ́̀͡͡͝f̸̡͈͍̳̯̖̣̱͊͊͋̂̚̚
parmGPO1_if=P̷̸̢̨̼̗̬̬̥͕̪̲̗̰̞̫̖̙̯̭͖͊̉ͭ̊̀̈́̕i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜
parmGPO2_a=S̴̸͚͖̫͉̙̹̭̯̱̺̠͎̻̻̳̮͍̓́ͬ̈̃̎ͤ̄ͫͤͦͫ̚͟͠͡ͅl̴͚͎̙̻͎̟̩͓͕̜̀̉̓̀͛̿ͣ̆̿̊̃ͨ̄̇̔̀ͣ̒ͣ
parmGPO2_if=G̛͌̈̄ͬ̾͒̎ͦ͂ͣ̓͟ţ̶̝͖͓̟̝̳̻̱͖̟͙̜̬̳̯̤ͨ̓̂́ͯ̾͒ͫ̿̇͐ͪͩ͐͋ͬ͑̄̚͢͞
parmGPO3_a=Å̷̢̰̺̻̟͕̫̱̯͔̫̯͕̪̘͉̬ͯ̄ͭ̄ͫ̀ͯq́͐ͤ̄̃͌͗̔ͯ̈́̀̀͏͈͕͍̲͓̜̳̲̤̪̱̞̣̼͙̩̯̘ǧ̴̵̡̼͎̻̝̲̹̲̖͂̐̿̆ͪ̎̍͒̿̓̂͘͟
parmGPO3_if=K͋ͭ̄́̽͌̏̂̉͛k̶̼̰̘̲̪͎̲̟͇̰̪̪̗̅́ͤ͐͗͑͑͐̓̊͑ͯ̒̊̎ͮ̆̚̕s̶̡̺̙̪̣͎̟͉̟̥̜͈̯̳̪̀̑͐́̇ͩͥ̑ͪ̔ͪ͂ͤ̐̾̈́͑̄͘̕͡
parmIAB=E̺̳̭͚̣̠̳̹̩̝̹̝̺̳̬̙̥̙̹ͭ̽͛̉ͭ͋̊̚͢ţ̶̝͖͓̟̝̳̻̱͖̟͙̜̬̳̯̤ͨ̓̂́ͯ̾͒ͫ̿̇͐ͪͩ͐͋ͬ͑̄̚͢͞x̗̟̬͔̤̻̟̎ͥ̀̅͑ͨͥ͌ͣ̍̑̽ͤ̇̿̈́̈́ͬ͘͝ͅ
parmIATcorr=Ļ̴̥̟̩̟̪͚̟͖̟̫̺̤͎̮̜͙ͯͩ̃͆͋ͤ̓̎ͣ̆̓ͭ͝v̸́͛̓͛͌̅ͯ͌ͮ̆͊ͦ̂̇ͯͪͫ͏̷̙̻̖
parmIdleIgnCorr=K͋ͭ̄́̽͌̏̂̉͛ẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡p̷̨̧͇̗̩͉̲̱̙̬̖̜̝̤̻̱̝̮͕̯͑̒̍͋ͦ̊͘
parmIdleMain=Ļ̴̥̟̩̟̪͚̟͖̟̫̺̤͎̮̜͙ͯͩ̃͆͋ͤ̓̎ͣ̆̓ͭ͝f̸̡͈͍̳̯̖̣̱͊͊͋̂̚̚
parmInjector=Z̨̡͍͈̖̳̹͔͕̝̘̠͐͆͆̄͢ͅm̨̫͈̣̦̼̱̦͓͈̲͙̫͈͔̞̟͙̠̲͑͑ͦͦ͛ͧ̓̕͝
parmKnockProtection=Q̞̝͔͌̇ͬͨ̔ͮ̉͒̔ͭ̎͌͝͡͡ǧ̴̵̡̼͎̻̝̲̹̲̖͂̐̿̆ͪ̎̍͒̿̓̂͘͟
parmLeanProtection=O̵ͯ̑̎̓͒̐̔̋̈́͌̄̿͋̋̈͐͏v̸́͛̓͛͌̅ͯ͌ͮ̆͊ͦ̂̇ͯͪͫ͏̷̙̻̖
parmMap=Q̞̝͔͌̇ͬͨ̔ͮ̉͒̔ͭ̎͌͝͡͡m̨̫͈̣̦̼̱̦͓͈̲͙̫͈͔̞̟͙̠̲͑͑ͦͦ͛ͧ̓̕͝
parmMilShift=Ḏ̛̥̘̟͎̹͍͖̩̳̾̽ͮ̾ͫ̿̓͆́ͨͮͦͩ͌̀̚z̴͓͍̗̥̤͌ͬ̑̓̈́͋̏̽̐̋͌͛̾ͮ̾̕͢͝
parmOBL=I̽̀̀̉̇̋̈̊͒͋͛̓͛̋̑z̴͓͍̗̥̤͌ͬ̑̓̈́͋̏̽̐̋͌͛̾ͮ̾̕͢͝
parmPopcorn=Ņ̨͈͚͔̭̲͎̗̤̫̣͓͙̟ͨͪͮ̈́̎͐̾ͭͩ̈́̄̎͋̊ͣ̄́ͧ͋͘͜ẅ̴̶̷̡͎̭̺͙͚̤͒͑͆ͣͥͫ͊ͯ̈̒͛̚͟
parmRevLimit=Ļ̴̥̟̩̟̪͚̟͖̟̫̺̤͎̮̜͙ͯͩ̃͆͋ͤ̓̎ͣ̆̓ͭ͝ẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡
parmRomOptions=K͋ͭ̄́̽͌̏̂̉͛ẅ̴̶̷̡͎̭̺͙͚̤͒͑͆ͣͥͫ͊ͯ̈̒͛̚͟
parmSCC=R̰̺̟̺͈͂̏͛ͭ́̀͡͡͝m̨̫͈̣̦̼̱̦͓͈̲͙̫͈͔̞̟͙̠̲͑͑ͦͦ͛ͧ̓̕͝
parmTipInOut=Å̷̢̰̺̻̟͕̫̱̯͔̫̯͕̪̘͉̬ͯ̄ͭ̄ͫ̀ͯe̛̒͂͌̓ͣͬ͗̉ͣͬ͆̃̒͂
parmTpsRetard=Å̷̢̰̺̻̟͕̫̱̯͔̫̯͕̪̘͉̬ͯ̄ͭ̄ͫ̀ͯk̶̼̰̘̲̪͎̲̟͇̰̪̪̗̅́ͤ͐͗͑͑͐̓̊͑ͯ̒̊̎ͮ̆̚̕
parmTpsSensor=X̨̛͈̻̮̗̙͔̠̼͖̫͙̼͉̓ͣ̊̄͒͆͒̀ͯͩ̇̓̌ͨ̍ͣ̃ͮ͠d̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟
parmTransmission=Y̒̄̔͆́̑͊̈̿̒͂ͪ̂ͨ̃ͬ͘p̷̨̧͇̗̩͉̲̱̙̬̖̜̝̤̻̱̝̮͕̯͑̒̍͋ͦ̊͘
parmVtec=Ç̧̻̠͈͈͕̞̥̭̦̳̯͈̤̲̈́͗͐̆́͊̍̀̑̾̇ͤͭ̍ͫ̽͘f̸̡͈͍̳̯̖̣̱͊͊͋̂̚̚
Struct12=B̴̩͇̫͙͆ͭͣ͌͑̂ͬͮ̈̄̔ͨ̏̑ͨ͊͆͂́͝s̶̡̺̙̪̣͎̟͉̟̥̜͈̯̳̪̀̑͐́̇ͩͥ̑ͪ̔ͪ͂ͤ̐̾̈́͑̄͘̕͡
Struct15=E̺̳̭͚̣̠̳̹̩̝̹̝̺̳̬̙̥̙̹ͭ̽͛̉ͭ͋̊̚͢q́͐ͤ̄̃͌͗̔ͯ̈́̀̀͏͈͕͍̲͓̜̳̲̤̪̱̞̣̼͙̩̯̘
Struct16=Q̞̝͔͌̇ͬͨ̔ͮ̉͒̔ͭ̎͌͝͡͡v̸́͛̓͛͌̅ͯ͌ͮ̆͊ͦ̂̇ͯͪͫ͏̷̙̻̖
Struct17=I̽̀̀̉̇̋̈̊͒͋͛̓͛̋̑u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅ
Struct18=F̡̝̭̪̣͓̼͍̩̩̲̪̲͒ͨ̈ͦ̋͒͑͐͐͂͊̾̊ͪ̕͢͠͠ͅͅy͍͔̬̫͙̝̼͎̭͔̥̻̩̺͎̤̻̤̑ͫ̃ͫ̀̍̿̎̄͐͌͌͢
Struct19=J͛ͪ̌͆̽ͯͨ̈̄ͦ͜͡͏̲͇̞̝͚̻̗̬͕̞̞̩̭̕͡q́͐ͤ̄̃͌͗̔ͯ̈́̀̀͏͈͕͍̲͓̜̳̲̤̪̱̞̣̼͙̩̯̘
Struct20=J͛ͪ̌͆̽ͯͨ̈̄ͦ͜͡͏̲͇̞̝͚̻̗̬͕̞̞̩̭̕͡b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ
Struct22=I̽̀̀̉̇̋̈̊͒͋͛̓͛̋̑j̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠k̶̼̰̘̲̪͎̲̟͇̰̪̪̗̅́ͤ͐͗͑͑͐̓̊͑ͯ̒̊̎ͮ̆̚̕
Struct23=G̛͌̈̄ͬ̾͒̎ͦ͂ͣ̓͟o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡
Struct24=I̽̀̀̉̇̋̈̊͒͋͛̓͛̋̑c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅ
CtrlDisplayItemText=I̽̀̀̉̇̋̈̊͒͋͛̓͛̋̑e̛̒͂͌̓ͣͬ͗̉ͣͬ͆̃̒͂m̨̫͈̣̦̼̱̦͓͈̲͙̫͈͔̞̟͙̠̲͑͑ͦͦ͛ͧ̓̕͝
ctrlLogGraph=V̸̒̔̒ͧͭ̎̆͗ͥͥͩ̈́ͬ̔ͦ́̔̚̚ẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡s̶̡̺̙̪̣͎̟͉̟̥̜͈̯̳̪̀̑͐́̇ͩͥ̑ͪ̔ͪ͂ͤ̐̾̈́͑̄͘̕͡
ctrlMapSensor=X̨̛͈̻̮̗̙͔̠̼͖̫͙̼͉̓ͣ̊̄͒͆͒̀ͯͩ̇̓̌ͨ̍ͣ̃ͮ͠s̶̡̺̙̪̣͎̟͉̟̥̜͈̯̳̪̀̑͐́̇ͩͥ̑ͪ̔ͪ͂ͤ̐̾̈́͑̄͘̕͡
ctrlMapValue=Ļ̴̥̟̩̟̪͚̟͖̟̫̺̤͎̮̜͙ͯͩ̃͆͋ͤ̓̎ͣ̆̓ͭ͝o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅy͍͔̬̫͙̝̼͎̭͔̥̻̩̺͎̤̻̤̑ͫ̃ͫ̀̍̿̎̄͐͌͌͢
ctrlPlotGraph=T̛̮̗͚̖̬̺͔̮̝͈͇̦̐̓̇́̒ͫ̀͢͟e̛̒͂͌̓ͣͬ͗̉ͣͬ͆̃̒͂
TunerAnalogGrid=S̴̸͚͖̫͉̙̹̭̯̱̺̠͎̻̻̳̮͍̓́ͬ̈̃̎ͤ̄ͫͤͦͫ̚͟͠͡ͅj̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠
SettingsFile=P̷̸̢̨̼̗̬̬̥͕̪̲̗̰̞̫̖̙̯̭͖͊̉ͭ̊̀̈́̕k̶̼̰̘̲̪͎̲̟͇̰̪̪̗̅́ͤ͐͗͑͑͐̓̊͑ͯ̒̊̎ͮ̆̚̕
SettingsFormatException=T̛̮̗͚̖̬̺͔̮̝͈͇̦̐̓̇́̒ͫ̀͢͟k̶̼̰̘̲̪͎̲̟͇̰̪̪̗̅́ͤ͐͗͑͑͐̓̊͑ͯ̒̊̎ͮ̆̚̕
SettingsKey=B̴̩͇̫͙͆ͭͣ͌͑̂ͬͮ̈̄̔ͨ̏̑ͨ͊͆͂́͝p̷̨̧͇̗̩͉̲̱̙̬̖̜̝̤̻̱̝̮͕̯͑̒̍͋ͦ̊͘
AdvTableType=Ḏ̛̥̘̟͎̹͍͖̩̳̾̽ͮ̾ͫ̿̓͆́ͨͮͦͩ͌̀̚z̴͓͍̗̥̤͌ͬ̑̓̈́͋̏̽̐̋͌͛̾ͮ̾̕͢͝k̶̼̰̘̲̪͎̲̟͇̰̪̪̗̅́ͤ͐͗͑͑͐̓̊͑ͯ̒̊̎ͮ̆̚̕
AirFuelUnits=E̺̳̭͚̣̠̳̹̩̝̹̝̺̳̬̙̥̙̹ͭ̽͛̉ͭ͋̊̚͢ǧ̴̵̡̼͎̻̝̲̹̲̖͂̐̿̆ͪ̎̍͒̿̓̂͘͟z̴͓͍̗̥̤͌ͬ̑̓̈́͋̏̽̐̋͌͛̾ͮ̾̕͢͝
AnalogInputs=K͋ͭ̄́̽͌̏̂̉͛y͍͔̬̫͙̝̼͎̭͔̥̻̩̺͎̤̻̤̑ͫ̃ͫ̀̍̿̎̄͐͌͌͢
ArduinoModel=S̴̸͚͖̫͉̙̹̭̯̱̺̠͎̻̻̳̮͍̓́ͬ̈̃̎ͤ̄ͫͤͦͫ̚͟͠͡ͅţ̶̝͖͓̟̝̳̻̱͖̟͙̜̬̳̯̤ͨ̓̂́ͯ̾͒ͫ̿̇͐ͪͩ͐͋ͬ͑̄̚͢͞
BMTuneVersions=Z̨̡͍͈̖̳̹͔͕̝̘̠͐͆͆̄͢ͅi̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅ
ChartCollection=X̨̛͈̻̮̗̙͔̠̼͖̫͙̼͉̓ͣ̊̄͒͆͒̀ͯͩ̇̓̌ͨ̍ͣ̃ͮ͠l̴͚͎̙̻͎̟̩͓͕̜̀̉̓̀͛̿ͣ̆̿̊̃ͨ̄̇̔̀ͣ̒ͣ
ChartSetup=V̸̒̔̒ͧͭ̎̆͗ͥͥͩ̈́ͬ̔ͦ́̔̚̚x̗̟̬͔̤̻̟̎ͥ̀̅͑ͨͥ͌ͣ̍̑̽ͤ̇̿̈́̈́ͬ͘͝ͅ
ChartTemplate=Ļ̴̥̟̩̟̪͚̟͖̟̫̺̤͎̮̜͙ͯͩ̃͆͋ͤ̓̎ͣ̆̓ͭ͝y͍͔̬̫͙̝̼͎̭͔̥̻̩̺͎̤̻̤̑ͫ̃ͫ̀̍̿̎̄͐͌͌͢
CorrectionUnits=Y̒̄̔͆́̑͊̈̿̒͂ͪ̂ͨ̃ͬ͘s̶̡̺̙̪̣͎̟͉̟̥̜͈̯̳̪̀̑͐́̇ͩͥ̑ͪ̔ͪ͂ͤ̐̾̈́͑̄͘̕͡
DatalogButtonsTypes=B̴̩͇̫͙͆ͭͣ͌͑̂ͬͮ̈̄̔ͨ̏̑ͨ͊͆͂́͝o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅ
DatalogDisplayTypes=E̺̳̭͚̣̠̳̹̩̝̹̝̺̳̬̙̥̙̹ͭ̽͛̉ͭ͋̊̚͢ẅ̴̶̷̡͎̭̺͙͚̤͒͑͆ͣͥͫ͊ͯ̈̒͛̚͟
DataloggingMode=U͉͈͍̖̫̳̙̥̼̹̘͍̔̈́͑̐͛ͥ̿ͧ̔ͩ̚͠͞k̶̼̰̘̲̪͎̲̟͇̰̪̪̗̅́ͤ͐͗͑͑͐̓̊͑ͯ̒̊̎ͮ̆̚̕
DataloggingState=K͋ͭ̄́̽͌̏̂̉͛e̛̒͂͌̓ͣͬ͗̉ͣͬ͆̃̒͂q́͐ͤ̄̃͌͗̔ͯ̈́̀̀͏͈͕͍̲͓̜̳̲̤̪̱̞̣̼͙̩̯̘
DataloggingTable=Ŵ͊̈́͛̆ͤ͛͗̈́̆̾̀͛͋ͥ̊̐ͪz̴͓͍̗̥̤͌ͬ̑̓̈́͋̏̽̐̋͌͛̾ͮ̾̕͢͝
DatalogLedTypes=J͛ͪ̌͆̽ͯͨ̈̄ͦ͜͡͏̲͇̞̝͚̻̗̬͕̞̞̩̭̕͡u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅb̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ
EmulatorMoatesType=G̛͌̈̄ͬ̾͒̎ͦ͂ͣ̓͟n̑̆͑͋͆̏̊ͭͫ̾ͭ̇ͩ̒̒ͩ̏̚̕
EmulatorMode=K͋ͭ̄́̽͌̏̂̉͛i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜
EmulatorState=B̴̩͇̫͙͆ͭͣ͌͑̂ͬͮ̈̄̔ͨ̏̑ͨ͊͆͂́͝v̸́͛̓͛͌̅ͯ͌ͮ̆͊ͦ̂̇ͯͪͫ͏̷̙̻̖u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅ
EmulatorVendorDemon=T̛̮̗͚̖̬̺͔̮̝͈͇̦̐̓̇́̒ͫ̀͢͟e̛̒͂͌̓ͣͬ͗̉ͣͬ͆̃̒͂o̭͖̘͙̹͎̦̮̪̠̓ͦ̅̒ͣ̑ͬ̓ͪ̊ͫͤͭ̕͜͠ͅ
EmulatorVendorOstrich=Q̞̝͔͌̇ͬͨ̔ͮ̉͒̔ͭ̎͌͝͡͡n̑̆͑͋͆̏̊ͭͫ̾ͭ̇ͩ̒̒ͩ̏̚̕e̛̒͂͌̓ͣͬ͗̉ͣͬ͆̃̒͂
FuelDisplayMode=M̰͎͍͇̞͖͓ͣͤ̾̂ͭ̂́͒̌ͩ͘͜͡͠i̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜
MapGraphSelect=Y̒̄̔͆́̑͊̈̿̒͂ͪ̂ͨ̃ͬ͘b̸̵̝̘͍̪̫̘̩̙̺̜͓̺̈́̌̒̈ͭ
MapGraphType=X̨̛͈̻̮̗̙͔̠̼͖̫͙̼͉̓ͣ̊̄͒͆͒̀ͯͩ̇̓̌ͨ̍ͣ̃ͮ͠p̷̨̧͇̗̩͉̲̱̙̬̖̜̝̤̻̱̝̮͕̯͑̒̍͋ͦ̊͘
MapSensorUnits=T̛̮̗͚̖̬̺͔̮̝͈͇̦̐̓̇́̒ͫ̀͢͟d̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟
OverlayDisplaySelected=Å̷̢̰̺̻̟͕̫̱̯͔̫̯͕̪̘͉̬ͯ̄ͭ̄ͫ̀ͯi̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜
QuickSaveItem=Q̞̝͔͌̇ͬͨ̔ͮ̉͒̔ͭ̎͌͝͡͡j̧̡͕̮̘͕̞̹̤̾̇ͤ͂͐͊ͦͮ͟͠
QuickSaveListObjects=M̰͎͍͇̞͖͓ͣͤ̾̂ͭ̂́͒̌ͩ͘͜͡͠ẅ̴̶̷̡͎̭̺͙͚̤͒͑͆ͣͥͫ͊ͯ̈̒͛̚͟s̶̡̺̙̪̣͎̟͉̟̥̜͈̯̳̪̀̑͐́̇ͩͥ̑ͪ̔ͪ͂ͤ̐̾̈́͑̄͘̕͡
SelectedTable=I̽̀̀̉̇̋̈̊͒͋͛̓͛̋̑u̶̠̘̗̻̼͓̤͓̦̯̝̹̳̺̹͗̽̑̇͌ͯ͐͌̿ͤ͢ͅi̶̸̧̪͙͓̯̠̱̝̤͇̅̆͑ͮͭͮ̽͢͜
SensorsX=Ļ̴̥̟̩̟̪͚̟͖̟̫̺̤͎̮̜͙ͯͩ̃͆͋ͤ̓̎ͣ̆̓ͭ͝ẅ̴̶̷̡͎̭̺͙͚̤͒͑͆ͣͥͫ͊ͯ̈̒͛̚͟ǧ̴̵̡̼͎̻̝̲̹̲̖͂̐̿̆ͪ̎̍͒̿̓̂͘͟
TableOverlay=X̨̛͈̻̮̗̙͔̠̼͖̫͙̼͉̓ͣ̊̄͒͆͒̀ͯͩ̇̓̌ͨ̍ͣ̃ͮ͠k̶̼̰̘̲̪͎̲̟͇̰̪̪̗̅́ͤ͐͗͑͑͐̓̊͑ͯ̒̊̎ͮ̆̚̕
TemperatureUnits=F̡̝̭̪̣͓̼͍̩̩̲̪̲͒ͨ̈ͦ̋͒͑͐͐͂͊̾̊ͪ̕͢͠͠ͅͅǧ̴̵̡̼͎̻̝̲̹̲̖͂̐̿̆ͪ̎̍͒̿̓̂͘͟
TunerAfrGrid=Ḣ̵̳̪̦͖̥̭͚̼͐̔ͨͬ̇͋̑ͥ͐̀́͘͜x̗̟̬͔̤̻̟̎ͥ̀̅͑ͨͥ͌ͣ̍̑̽ͤ̇̿̈́̈́ͬ͘͝ͅ
TunerSmartTrack=F̡̝̭̪̣͓̼͍̩̩̲̪̲͒ͨ̈ͦ̋͒͑͐͐͂͊̾̊ͪ̕͢͠͠ͅͅy͍͔̬̫͙̝̼͎̭͔̥̻̩̺͎̤̻̤̑ͫ̃ͫ̀̍̿̎̄͐͌͌͢x̗̟̬͔̤̻̟̎ͥ̀̅͑ͨͥ͌ͣ̍̑̽ͤ̇̿̈́̈́ͬ͘͝ͅ
VoltUnits=Ŵ͊̈́͛̆ͤ͛͗̈́̆̾̀͛͋ͥ̊̐ͪy͍͔̬̫͙̝̼͎̭͔̥̻̩̺͎̤̻̤̑ͫ̃ͫ̀̍̿̎̄͐͌͌͢
VssUnits=R̰̺̟̺͈͂̏͛ͭ́̀͡͡͝c̨̛̥͈̞̺͔̞̼ͧ͆̈̾̐͋̎̚͜͝ͅẖ̸̵̢̢̝̥̬̯̯̼͊̏̋ͩͨͫͪ̆̍ͦ̒̾͋̐̉̈ͥ̏ͥ͡
WBinput=Ŵ͊̈́͛̆ͤ͛͗̈́̆̾̀͛͋ͥ̊̐ͪz̴͓͍̗̥̤͌ͬ̑̓̈́͋̏̽̐̋͌͛̾ͮ̾̕͢͝m̨̫͈̣̦̼̱̦͓͈̲͙̫͈͔̞̟͙̠̲͑͑ͦͦ͛ͧ̓̕͝
Wideband_Serial=I̽̀̀̉̇̋̈̊͒͋͛̓͛̋̑ǧ̴̵̡̼͎̻̝̲̹̲̖͂̐̿̆ͪ̎̍͒̿̓̂͘͟
frmHelp=Ŵ͊̈́͛̆ͤ͛͗̈́̆̾̀͛͋ͥ̊̐ͪp̷̨̧͇̗̩͉̲̱̙̬̖̜̝̤̻̱̝̮͕̯͑̒̍͋ͦ̊͘d̷̢͈̣͇͙̤̦̟̱̺̩̦͎̞̬̤̪̖̿ͨͪ̈́̓̏ͫͫ̌͆̎̌ͦ̄̈̔̚̚͟
parmHelpNew=Ņ̨͈͚͔̭̲͎̗̤̫̣͓͙̟ͨͪͮ̈́̎͐̾ͭͩ̈́̄̎͋̊ͣ̄́ͧ͋͘͜k̶̼̰̘̲̪͎̲̟͇̰̪̪̗̅́ͤ͐͗͑͑͐̓̊͑ͯ̒̊̎ͮ̆̚̕

BIN
AppCryptor/lock@3x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB

Binary file not shown.

View File

@ -0,0 +1,26 @@
C:\Users\boule\Documents\Visual Studio 2019\Projects\AppCryptor\bin\Debug\AppCryptor.exe
C:\Users\boule\Documents\Visual Studio 2019\Projects\AppCryptor\bin\Debug\AppCryptor.pdb
C:\Users\boule\Documents\Visual Studio 2019\Projects\AppCryptor\obj\Debug\AppCryptor.csprojAssemblyReference.cache
C:\Users\boule\Documents\Visual Studio 2019\Projects\AppCryptor\obj\Debug\AppCryptor.Properties.Resources.resources
C:\Users\boule\Documents\Visual Studio 2019\Projects\AppCryptor\obj\Debug\AppCryptor.csproj.GenerateResource.cache
C:\Users\boule\Documents\Visual Studio 2019\Projects\AppCryptor\obj\Debug\AppCryptor.csproj.CoreCompileInputs.cache
C:\Users\boule\Documents\Visual Studio 2019\Projects\AppCryptor\obj\Debug\AppCryptor.exe
C:\Users\boule\Documents\Visual Studio 2019\Projects\AppCryptor\obj\Debug\AppCryptor.pdb
C:\Users\boule\Documents\Visual Studio 2019\Projects\AppCryptor\obj\Debug\AppCryptor.Form1.resources
C:\Users\boule\Documents\Visual Studio 2019\Projects\BMTune\AppCryptor\bin\Debug\AppCryptor.exe
C:\Users\boule\Documents\Visual Studio 2019\Projects\BMTune\AppCryptor\bin\Debug\AppCryptor.pdb
C:\Users\boule\Documents\Visual Studio 2019\Projects\BMTune\AppCryptor\obj\Debug\AppCryptor.csprojAssemblyReference.cache
C:\Users\boule\Documents\Visual Studio 2019\Projects\BMTune\AppCryptor\obj\Debug\AppCryptor.Form1.resources
C:\Users\boule\Documents\Visual Studio 2019\Projects\BMTune\AppCryptor\obj\Debug\AppCryptor.Properties.Resources.resources
C:\Users\boule\Documents\Visual Studio 2019\Projects\BMTune\AppCryptor\obj\Debug\AppCryptor.csproj.GenerateResource.cache
C:\Users\boule\Documents\Visual Studio 2019\Projects\BMTune\AppCryptor\obj\Debug\AppCryptor.csproj.CoreCompileInputs.cache
C:\Users\boule\Documents\Visual Studio 2019\Projects\BMTune\AppCryptor\obj\Debug\AppCryptor.exe
C:\Users\boule\Documents\Visual Studio 2019\Projects\BMTune\AppCryptor\obj\Debug\AppCryptor.pdb
C:\Users\boule\Documents\Visual Studio 2019\Projects\BMTune2\AppCryptor\bin\Debug\AppCryptor.exe
C:\Users\boule\Documents\Visual Studio 2019\Projects\BMTune2\AppCryptor\bin\Debug\AppCryptor.pdb
C:\Users\boule\Documents\Visual Studio 2019\Projects\BMTune2\AppCryptor\obj\Debug\AppCryptor.csprojAssemblyReference.cache
C:\Users\boule\Documents\Visual Studio 2019\Projects\BMTune2\AppCryptor\obj\Debug\AppCryptor.Form1.resources
C:\Users\boule\Documents\Visual Studio 2019\Projects\BMTune2\AppCryptor\obj\Debug\AppCryptor.Properties.Resources.resources
C:\Users\boule\Documents\Visual Studio 2019\Projects\BMTune2\AppCryptor\obj\Debug\AppCryptor.csproj.GenerateResource.cache
C:\Users\boule\Documents\Visual Studio 2019\Projects\BMTune2\AppCryptor\obj\Debug\AppCryptor.exe
C:\Users\boule\Documents\Visual Studio 2019\Projects\BMTune2\AppCryptor\obj\Debug\AppCryptor.pdb

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

6
BMFuscator/App.config Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
</configuration>

View File

@ -0,0 +1,102 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{0FE687CD-6631-428E-A054-8039A20E6F6E}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>BMDevs</RootNamespace>
<AssemblyName>BMFuscator</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>lock_3x_XqK_icon.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup>
<StartupObject>BMDevs.Program</StartupObject>
</PropertyGroup>
<ItemGroup>
<Reference Include="dnlib, Version=1.5.0.1500, Culture=neutral, PublicKeyToken=50e96378b6e77999, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>libs\dnlib.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Protections\AntiDbg.cs" />
<Compile Include="Protections\AntiDe4dotProtection.cs" />
<Compile Include="Mutations\BoolsToModuleReference.cs" />
<Compile Include="Mutations\BytesToModuleReference.cs" />
<Compile Include="Protections\AntiILDasmProtection.cs" />
<Compile Include="Protections\ConstantsEncoding.cs" />
<Compile Include="Protections\ControlFlow\Block.cs" />
<Compile Include="Protections\ControlFlow\BlockParser.cs" />
<Compile Include="Protections\ControlFlow\ControlFlowObfuscation.cs" />
<Compile Include="Extensions.cs" />
<Compile Include="Helpers\ReferenceProxyHelper.cs" />
<Compile Include="IObfuscation.cs" />
<Compile Include="Logger.cs" />
<Compile Include="Protections\JunkProtection.cs" />
<Compile Include="Protections\ModuleRenaming.cs" />
<Compile Include="Mutations\Funcs.cs" />
<Compile Include="Mutations\iMutation.cs" />
<Compile Include="Mutations\MutationObf.cs" />
<Compile Include="Mutations\NumbersToModuleReference.cs" />
<Compile Include="OwnRandom.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Protections\HiddenNamespace.cs" />
<Compile Include="Protections\ReferenceProxy.cs" />
<Compile Include="Protections\RenameObfuscation.cs" />
<Compile Include="Runtime\BoolsToModule.cs" />
<Compile Include="Runtime\Constants.cs" />
<Compile Include="Runtime\FuncMutation.cs" />
<Compile Include="Runtime\BytesToModule.cs" />
<Compile Include="Runtime\NumbersToModule.cs" />
<Compile Include="Runtime\RefProxy.cs" />
<Compile Include="Runtime\Renamer.cs" />
<Compile Include="Runtime\RuntimeHelper.cs" />
<Compile Include="Utils.cs" />
<Compile Include="Worker.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<Content Include="FilesInfos.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="lock_3x_XqK_icon.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

18
BMFuscator/Extensions.cs Normal file
View File

@ -0,0 +1,18 @@
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BMDevs
{
public static class Extensions
{
public static string Base64Representation(this string str)
{
return Convert.ToBase64String(Encoding.Default.GetBytes(str));
}
}
}

245
BMFuscator/FilesInfos.txt Normal file
View File

@ -0,0 +1,245 @@
Binary_Files.cs
Binary_File_FREE.cs
Binary_File_PLAYGAME.cs
Class10.cs
Class11.cs
Class12.cs
Class13.cs
Class15.cs
Class16.cs
Class17.cs
Class18.cs
Class1.cs
Class3.cs
Class20.cs
Class21.cs
Class22.cs
Class24.cs
Class25.cs
Class27.cs
Class28.cs
Class29.cs
Class2.cs
Class30.cs
Class31.cs
Class32.cs
Class33.cs
Class5.cs
Class7.cs
Class8.cs
Class8.cs
Class9.cs
Class9.cs
ctrlAdvGraph.cs
ctrlAdvTable.cs
ctrlBatteryOffset.cs
CtrlGrid.cs
CtrlInputSelector.cs
CtrlLedDisplay.cs
ctrlMapGraph.cs
CtrlMapGraph3D.cs
CtrlOutputSelector.cs
ctrlOvrlSensor.cs
CtrlSensorGrid.cs
ctrlSpecialSensor.cs
DASM_Bytes.cs
DisplayItemsStripped.cs
Enum4.cs
Enum6.cs
frmAboutBox.cs
frmAccelTimeSetting.cs
frmActiveDatalog.cs
frmAdvancedGraph.cs
frmAdvTableAdd.cs
frmBaseMap.cs
frmBaseromConvert.cs
frmBinTool.cs
frmBluetooth.cs
frmBoostTableSetup.cs
frmBurner.cs
frmChangelog.cs
frmChartTemplates.cs
frmConsole.cs
frmConvert.cs
frmCopyMaps.cs
frmCopyright.cs
FrmDataDisplay.cs
frmDataGrid.cs
frmDatalogGraphs.cs
frmDatalogMenu.cs
frmDebug.cs
frmDownloadBaserom.cs
frmDownloadUpdate.cs
frmDynoControl.cs
frmDynoSetup.cs
frmEbcDutyErrorInput.cs
frmErrorCodes.cs
frmGaugesEditor.cs
frmGearLearn.cs
FrmGridChart.cs
frmGridSelectionAdj.cs
frmHC05.cs
frmIgnCutModWarning.cs
frmIgnitionSync.cs
frmInjectorOverallCalc.cs
frmLivePlot.cs
frmLivePSetting.cs
frmLoading.cs
FrmMain.cs
frmMapScalar.cs
frmOBD2Scan.cs
frmOnboard.cs
frmOstrichInfo.cs
frmParameters.cs
frmPassword.cs
frmQuickAdjust.cs
frmQuickSaveDesc.cs
frmQuickSaveMain.cs
frmReg.cs
frmReset.cs
frmSensorSetup.cs
frmSettings.cs
frmShortKeys.cs
frmUploadBaserom.cs
InjectorsLoading.cs
Mtss.cs
parmAc.cs
parmAntiLag.cs
parmAntiStart.cs
parmBoostCut.cs
parmBoostMapSensor.cs
parmBoostSettings.cs
parmBstManual.cs
parmBurnOut.cs
parmCloseLoop.cs
parmComments.cs
parmCrankFuel.cs
parmCylCorr.cs
parmDualMap.cs
parmDwell.cs
parmEbcCloseloop.cs
parmEbcCompensation.cs
parmEbcDutyLook.cs
parmEbcSettings.cs
parmEctCorr.cs
parmEctProtection.cs
parmFanControl.cs
parmFileProtection.cs
parmFlexFuel.cs
parmFtl.cs
parmFts.cs
parmFuelCut.cs
parmGearCorr.cs
parmGPO1_a.cs
parmGPO1_a.resx
parmGPO1_if.cs
parmGPO1_if.resx
parmGPO2_a.cs
parmGPO2_a.resx
parmGPO2_if.cs
parmGPO2_if.resx
parmGPO3_a.cs
parmGPO3_a.resx
parmGPO3_if.cs
parmGPO3_if.resx
parmIAB.cs
parmIAB.resx
parmIATcorr.cs
parmIATcorr.resx
parmIdleIgnCorr.cs
parmIdleIgnCorr.resx
parmIdleMain.cs
parmIdleMain.resx
parmInjector.cs
parmInjector.resx
parmLeanProtection.cs
parmLeanProtection.resx
parmMap.cs
parmMap.resx
parmMilShift.cs
parmMilShift.resx
parmPopcorn.cs
parmPopcorn.resx
parmRevLimit.cs
parmRevLimit.resx
parmRomOptions.cs
parmRomOptions.resx
parmSCC.cs
parmSCC.resx
parmTipInOut.cs
parmTipInOut.resx
parmTpsRetard.cs
parmTpsRetard.resx
parmTpsSensor.cs
parmTpsSensor.resx
parmTransmission.cs
parmTransmission.resx
parmVtec.cs
parmVtec.resx
Struct12.cs
Struct15.cs
Struct16.cs
Struct17.cs
Struct18.cs
Struct19.cs
Struct20.cs
Struct22.cs
Struct23.cs
Struct24.cs
CtrlDisplayItemText.cs
CtrlDisplayItemText.resx
ctrlLogGraph.cs
ctrlLogGraph.resx
ctrlMapSensor.cs
ctrlMapSensor.resx
ctrlMapValue.cs
ctrlMapValue.resx
ctrlPlotGraph.cs
ctrlPlotGraph.resx
TunerAnalogGrid.cs
SettingsFile.cs
SettingsFormatException.cs
SettingsKey.cs
AdvTableType.cs
AirFuelUnits.cs
AnalogInputs.cs
BMTuneVersions.cs
ChartCollection.cs
ChartSetup.cs
ChartTemplate.cs
CorrectionUnits.cs
DatalogButtonsTypes.cs
DatalogDisplayTypes.cs
DataloggingMode.cs
DataloggingState.cs
DataloggingTable.cs
DatalogLedTypes.cs
DoNotObfuscate.cs
EmulatorMoatesType.cs
EmulatorMode.cs
EmulatorState.cs
EmulatorVendorDemon.cs
EmulatorVendorOstrich.cs
FuelDisplayMode.cs
MapGraphSelect.cs
MapGraphType.cs
MapSensorUnits.cs
OverlayDisplaySelected.cs
QuickSaveItem.cs
QuickSaveListObjects.cs
SelectedTable.cs
SensorsX.cs
TableOverlay.cs
TemperatureUnits.cs
TunerAfrGrid.cs
TunerSmartTrack.cs
VoltUnits.cs
VssUnits.cs
WBinput.cs
Wideband_Serial.cs
frmHelp.cs
frmHelp.resx
parmHelpNew.cs
parmHelpNew.resx
Resources.Designer.cs
Resources.resx

View File

@ -0,0 +1,55 @@
using dnlib.DotNet;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static BMDevs.Renamer;
namespace BMDevs.Helpers
{
public class ReferenceProxyHelper
{
public static TypeDef CreateDelegateType(MethodSig sig, ModuleDef target, MethodDef original)
{
TypeDef ret = new TypeDefUser("BMDevs", Renamer.GetEndName(RenameMode.Base64, 3, 20), target.CorLibTypes.GetTypeRef("System", "MulticastDelegate"));
ret.Attributes = original.DeclaringType.Attributes;
var ctor = new MethodDefUser(".ctor", MethodSig.CreateInstance(target.CorLibTypes.Void, target.CorLibTypes.Object, target.CorLibTypes.IntPtr));
ctor.Attributes = MethodAttributes.Assembly | MethodAttributes.HideBySig | MethodAttributes.RTSpecialName | MethodAttributes.SpecialName;
ctor.ImplAttributes = MethodImplAttributes.Runtime;
ret.Methods.Add(ctor);
var clone = sig.Clone();
var invoke = new MethodDefUser("Invoke", clone);
invoke.MethodSig.HasThis = true;
invoke.Attributes = MethodAttributes.Assembly | MethodAttributes.HideBySig | MethodAttributes.Virtual | MethodAttributes.NewSlot | MethodAttributes.Public;
invoke.ImplAttributes = MethodImplAttributes.Runtime;
ret.Methods.Add(invoke);
target.Types.Add(ret);
return ret;
}
public static MethodSig CreateProxySignature(IMethod method, ModuleDef target)
{
List<TypeSig> paramTypes = method.MethodSig.Params.ToList();
if (method.MethodSig.HasThis && !method.MethodSig.ExplicitThis)
{
TypeDef declType = method.DeclaringType.ResolveTypeDefThrow();
paramTypes.Insert(0, Import(target, declType).ToTypeSig());
}
TypeSig retType = method.MethodSig.RetType;
if (retType.IsClassSig)
retType = target.CorLibTypes.Object;
return MethodSig.CreateStatic(retType, paramTypes.ToArray());
}
public static ITypeDefOrRef Import(ModuleDef module, TypeDef typeDef)
{
ITypeDefOrRef retTypeRef = new Importer(module, ImporterOptions.TryToUseTypeDefs).Import(typeDef);
return retTypeRef;
}
}
}

View File

@ -0,0 +1,14 @@
using dnlib.DotNet;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BMDevs
{
public interface IObfuscation
{
void Execute(ModuleDefMD md);
}
}

19
BMFuscator/Logger.cs Normal file
View File

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BMDevs
{
public class Logger
{
public static void LogMessage(string pre, string past, ConsoleColor PastColor)
{
Console.Write(pre);
Console.ForegroundColor = PastColor;
Console.WriteLine(past);
Console.ForegroundColor = ConsoleColor.White;
}
}
}

View File

@ -0,0 +1,69 @@
using BMDevs.Runtime;
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using dnlib.PE;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BMDevs.Mutations
{
public class BoolsToModuleReference : IObfuscation
{
public ModuleDef Module { get; set; }
public Dictionary<bool, FieldDef> Numbers { get; set; }
public void Execute(ModuleDefMD md)
{
Numbers = new Dictionary<bool, FieldDef>();
Module = md;
foreach (var type in md.Types.Where(x => x != md.GlobalType))
foreach (var method in type.Methods.Where(x => !x.IsConstructor && x.HasBody && x.Body.HasInstructions))
ExecuteMethod(method);
}
public FieldDef AddNumberField(int num)
{
var cstype = RuntimeHelper.GetRuntimeType("BMDevs.Runtime.BoolsToModule");
FieldDef field = cstype.FindField("val");
Renamer.Rename(field, Renamer.RenameMode.Invalid2, 2);
//Renamer.Rename(field, Renamer.RenameMode.Base64, 2);
field.DeclaringType = null;
Module.GlobalType.Fields.Add(field);
var method = Module.GlobalType.FindOrCreateStaticConstructor();
method.Body.Instructions.Insert(0, new Instruction(OpCodes.Ldc_I4, num));
method.Body.Instructions.Insert(1, new Instruction(OpCodes.Stsfld, field));
return field;
}
//thanks to mighty
public void ExecuteMethod(MethodDef method)
{
for (int i = 0; i < method.Body.Instructions.Count; i++)
{
var instr = method.Body.Instructions[i];
if (instr.IsLdcI4())
{
if (Module.GlobalType.Fields.Count < 65000)
{
var val = instr.GetLdcI4Value();
FieldDef fld;
bool bufbool = false;
if (val == 1) bufbool = true;
if (!Numbers.TryGetValue(bufbool, out fld))
{
fld = AddNumberField(val);
Numbers.Add(bufbool, fld);
}
instr.OpCode = OpCodes.Ldsfld;
instr.Operand = fld;
}
}
}
}
}
}

View File

@ -0,0 +1,74 @@
using BMDevs.Runtime;
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using dnlib.PE;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BMDevs.Mutations
{
public class BytesToModuleReference : IObfuscation
{
public ModuleDef Module { get; set; }
public Dictionary<long, FieldDef> Numbers { get; set; }
public void Execute(ModuleDefMD md)
{
Numbers = new Dictionary<long, FieldDef>();
Module = md;
foreach (var type in md.Types.Where(x => x != md.GlobalType))
foreach (var method in type.Methods.Where(x => !x.IsConstructor && x.HasBody && x.Body.HasInstructions))
ExecuteMethod(method);
}
public FieldDef AddNumberField(long num)
{
var cstype = RuntimeHelper.GetRuntimeType("BMDevs.Runtime.BytesToModule");
FieldDef field = cstype.FindField("val");
Renamer.Rename(field, Renamer.RenameMode.Invalid2, 2);
//Renamer.Rename(field, Renamer.RenameMode.Base64, 2);
field.DeclaringType = null;
Module.GlobalType.Fields.Add(field);
var method = Module.GlobalType.FindOrCreateStaticConstructor();
method.Body.Instructions.Insert(0, new Instruction(OpCodes.Ldc_I4, num));
method.Body.Instructions.Insert(1, new Instruction(OpCodes.Stsfld, field));
return field;
}
//thanks to mighty
public void ExecuteMethod(MethodDef method)
{
for (int i = 0; i < method.Body.Instructions.Count; i++)
{
var instr = method.Body.Instructions[i];
//if (instr.IsLdloc())
//{
if (Module.GlobalType.Fields.Count < 65000)
{
var val = instr.GetLdcI4Value();
if (val != -1)
{
if (val.GetType() == typeof(long))
{
FieldDef fld;
if (!Numbers.TryGetValue((long)val, out fld))
{
fld = AddNumberField((long)val);
Numbers.Add((long)val, fld);
Console.WriteLine("ByteModule: " + val);
}
instr.OpCode = OpCodes.Ldsfld;
instr.Operand = fld;
}
}
}
//}
}
}
}
}

View File

@ -0,0 +1,386 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BMDevs.Runtime;
using dnlib.DotNet;
using dnlib.DotNet.Emit;
namespace BMDevs.Mutations
{
public class Add : iMutation
{
public void Prepare(TypeDef type) { }
public void Process(MethodDef method, ref int index)
{
var defvalue = method.Body.Instructions[index].GetLdcI4Value();
var inda = RuntimeHelper.Random.Next((int)((double)defvalue / 1.5));
method.Body.Instructions[index].OpCode = OpCodes.Ldc_I4;
method.Body.Instructions[index].Operand = defvalue - inda;
method.Body.Instructions.Insert(++index, new Instruction(OpCodes.Ldc_I4, inda));
method.Body.Instructions.Insert(++index, new Instruction(OpCodes.Add));
}
public bool Supported(Instruction instr)
{
return Utils.CheckArithmetic(instr);
}
}
public class Sub : iMutation
{
public void Prepare(TypeDef type) { }
public void Process(MethodDef method, ref int index)
{
var defvalue = method.Body.Instructions[index].GetLdcI4Value();
var two = RuntimeHelper.Random.Next((int)((double)defvalue / 1.5));
method.Body.Instructions[index].OpCode = OpCodes.Ldc_I4;
method.Body.Instructions[index].Operand = defvalue + two;
method.Body.Instructions.Insert(++index, new Instruction(OpCodes.Ldc_I4, two));
method.Body.Instructions.Insert(++index, new Instruction(OpCodes.Sub));
}
public bool Supported(Instruction instr)
{
return Utils.CheckArithmetic(instr);
}
}
public class Mul : iMutation
{
public void Prepare(TypeDef type) { }
public void Process(MethodDef method, ref int index)
{
var defvalue = method.Body.Instructions[index].GetLdcI4Value();
var two = RuntimeHelper.Random.Next(1, (int)((double)defvalue / 1.5));
var one = defvalue / two;
//ERROR HERE DONT USE THIS WHILE LOOP
while (two * one != defvalue)
{
two = RuntimeHelper.Random.Next(1, (int)((double)defvalue / 1.5));
one = defvalue / two;
}
method.Body.Instructions[index].OpCode = OpCodes.Ldc_I4;
method.Body.Instructions[index].Operand = one;
method.Body.Instructions.Insert(++index, new Instruction(OpCodes.Ldc_I4, two));
method.Body.Instructions.Insert(++index, new Instruction(OpCodes.Mul));
index += 1;
}
public bool Supported(Instruction instr)
{
return Utils.CheckArithmetic(instr);
}
}
public class Div : iMutation
{
public void Prepare(TypeDef type) { }
public void Process(MethodDef method, ref int index)
{
var defvalue = method.Body.Instructions[index].GetLdcI4Value();
var two = RuntimeHelper.Random.Next(1, 5);
method.Body.Instructions[index].OpCode = OpCodes.Ldc_I4;
method.Body.Instructions[index].Operand = defvalue * two;
method.Body.Instructions.Insert(++index, new Instruction(OpCodes.Ldc_I4, two));
method.Body.Instructions.Insert(++index, new Instruction(OpCodes.Div));
}
public bool Supported(Instruction instr)
{
return Utils.CheckArithmetic(instr);
}
}
public class Abs : iMutation
{
public void Prepare(TypeDef type) { }
public void Process(MethodDef method, ref int index)
{
method.Body.Instructions.Insert(++index, new Instruction(OpCodes.Call, method.Module.Import(typeof(Math).GetMethod("Abs", new Type[] { typeof(int) }))));
}
public bool Supported(Instruction instr)
{
return Utils.CheckArithmetic(instr);
}
}
public class StringLen : iMutation
{
public void Prepare(TypeDef type) { }
public void Process(MethodDef method, ref int index)
{
if (method.DeclaringType == method.Module.GlobalType)
{
index--;
return;
}
int defval = method.Body.Instructions[index].GetLdcI4Value();
int needed = RuntimeHelper.Random.Next(4, 15);
//string ch = Renamer.GetFuckedString(needed);
string ch = Renamer.GetFuckedString2(needed);
method.Body.Instructions[index].OpCode = OpCodes.Ldc_I4;
method.Body.Instructions[index].Operand = defval - needed;
method.Body.Instructions.Insert(++index, new Instruction(OpCodes.Ldstr, ch));
method.Body.Instructions.Insert(++index, new Instruction(OpCodes.Call, method.Module.Import(typeof(string).GetMethod("get_Length"))));
method.Body.Instructions.Insert(++index, new Instruction(OpCodes.Add));
}
public bool Supported(Instruction instr)
{
return Utils.CheckArithmetic(instr);
}
}
public class Func : iMutation
{
public FieldDef Decryptor { get; set; }
public void Process(MethodDef method, ref int index)
{
int nde = method.Body.Instructions[index].GetLdcI4Value();
method.Body.Instructions[index].OpCode = OpCodes.Ldsfld;
method.Body.Instructions[index].Operand = Decryptor;
method.Body.Instructions.Insert(++index, new Instruction(OpCodes.Ldc_I4, nde));
method.Body.Instructions.Insert(++index, new Instruction(OpCodes.Callvirt, method.Module.Import(typeof(Func<int, int>).GetMethod("Invoke"))));
index -= 2;
}
public FieldDef CreateProperField(TypeDef type)
{
var cotype = RuntimeHelper.GetRuntimeType("BMDevs.Runtime.FuncMutation");
FieldDef field = cotype.Fields.FirstOrDefault(x => x.Name == "prao");
Renamer.Rename(field, Renamer.RenameMode.Base64, 3);
field.DeclaringType = null;
type.Fields.Add(field);
MethodDef funcmethod = cotype.FindMethod("RET");
funcmethod.DeclaringType = null;
Renamer.Rename(funcmethod, Renamer.RenameMode.Base64, 3);
type.Methods.Add(funcmethod);
var cctor = type.FindOrCreateStaticConstructor();
cctor.Body.Instructions.Insert(0, new Instruction(OpCodes.Ldnull));
cctor.Body.Instructions.Insert(1, new Instruction(OpCodes.Ldftn, funcmethod));
cctor.Body.Instructions.Insert(2, new Instruction(OpCodes.Newobj, type.Module.Import(typeof(Func<int, int>).GetConstructors().First())));
cctor.Body.Instructions.Insert(3, new Instruction(OpCodes.Stsfld, field));
cctor.Body.Instructions.Insert(4, new Instruction(OpCodes.Nop));
return field;
}
public void Prepare(TypeDef type)
{
Decryptor = CreateProperField(type);
}
public bool Supported(Instruction instr)
{
return Utils.CheckArithmetic(instr);
}
}
//thanks to TheProxy#5615 for explanation
public class CharMutations : iMutation
{
public MethodDef Converter { get; set; }
public void Prepare(TypeDef type)
{
var cotype = RuntimeHelper.GetRuntimeType("BMDevs.Runtime.FuncMutation");
MethodDef todef = cotype.FindMethod("CharToInt");
todef.Name = Renamer.GetRandomName().Base64Representation();
todef.DeclaringType = null;
type.Methods.Add(todef);
Converter = todef;
}
public void Process(MethodDef method, ref int index)
{
method.Body.Instructions.Insert(++index, new Instruction(OpCodes.Call, Converter));
}
public bool Supported(Instruction instr)
{
return Utils.CheckArithmetic(instr);
}
}
public class VariableMutation : iMutation
{
public void Prepare(TypeDef type) { }
public void Process(MethodDef method, ref int index)
{
var value = method.Body.Instructions[index].GetLdcI4Value();
Local lcl = new Local(method.Module.CorLibTypes.Int32);
method.Body.Variables.Add(lcl);
method.Body.Instructions.Insert(0, new Instruction(OpCodes.Stloc, lcl));
method.Body.Instructions.Insert(0, new Instruction(OpCodes.Ldc_I4, value));
index += 2;
method.Body.Instructions[index] = new Instruction(OpCodes.Ldloc, lcl);
}
public bool Supported(Instruction instr)
{
return Utils.CheckArithmetic(instr);
}
}
public class ComparerMutation : iMutation
{
public void Prepare(TypeDef type)
{
if (type != type.Module.GlobalType)
for (int i = 0; i < type.Methods.Count; i++)
{
var mDef = type.Methods[i];
if (!mDef.HasBody || mDef.IsConstructor) continue;
mDef.Body.SimplifyBranches();
for (int x = 0; x < mDef.Body.Instructions.Count; x++)
{
if (Utils.CheckArithmetic(mDef.Body.Instructions[x]))
{
Execute(mDef, ref x);
}
}
}
}
public void Execute(MethodDef method, ref int index)
{
if (method.Body.Instructions[index].OpCode != OpCodes.Call)
{
var value = method.Body.Instructions[index].GetLdcI4Value();
Local lcl = new Local(method.Module.CorLibTypes.Int32);
Local lcl2 = new Local(method.Module.CorLibTypes.Int32);
method.Body.Variables.Add(lcl);
method.Body.Variables.Add(lcl2);
var initial = RuntimeHelper.Random.Next();
var ifstate = RuntimeHelper.Random.Next();
int initial2;
bool shouldBeEqual = Convert.ToBoolean(RuntimeHelper.Random.Next(2));
if (shouldBeEqual)
initial2 = ifstate - initial;
else
{
initial2 = RuntimeHelper.Random.Next();
while (initial2 + initial == ifstate)
initial2 = RuntimeHelper.Random.Next();
}
method.Body.Instructions[index] = Instruction.CreateLdcI4(initial);
method.Body.Instructions.Insert(++index, new Instruction(OpCodes.Stloc, lcl));
method.Body.Instructions.Insert(++index, Instruction.CreateLdcI4(initial2));
method.Body.Instructions.Insert(++index, new Instruction(OpCodes.Stloc, lcl2));
method.Body.Instructions.Insert(++index, new Instruction(OpCodes.Ldloc, lcl));
method.Body.Instructions.Insert(++index, new Instruction(OpCodes.Ldloc, lcl2));
method.Body.Instructions.Insert(++index, new Instruction(OpCodes.Add));
method.Body.Instructions.Insert(++index, new Instruction(OpCodes.Ldc_I4, ifstate));
method.Body.Instructions.Insert(++index, new Instruction(OpCodes.Ceq));
Instruction nop = OpCodes.Nop.ToInstruction();
method.Body.Instructions.Insert(++index, new Instruction(shouldBeEqual ? OpCodes.Brfalse : OpCodes.Brtrue, nop));
method.Body.Instructions.Insert(++index, new Instruction(OpCodes.Nop));
method.Body.Instructions.Insert(++index, new Instruction(OpCodes.Ldc_I4, value));
method.Body.Instructions.Insert(++index, new Instruction(OpCodes.Stloc, lcl));
method.Body.Instructions.Insert(++index, new Instruction(OpCodes.Nop));
Instruction ldloc = OpCodes.Ldloc_S.ToInstruction(lcl);
method.Body.Instructions.Insert(++index, new Instruction(OpCodes.Br, ldloc));
method.Body.Instructions.Insert(++index, nop);
method.Body.Instructions.Insert(++index, new Instruction(OpCodes.Ldc_I4, RuntimeHelper.Random.Next()));
method.Body.Instructions.Insert(++index, new Instruction(OpCodes.Stloc, lcl));
method.Body.Instructions.Insert(++index, new Instruction(OpCodes.Nop));
method.Body.Instructions.Insert(++index, ldloc);
}
}
public void Process(MethodDef method, ref int index) { }
public static void InsertInstructions(IList<Instruction> instructions, Dictionary<Instruction, int> keyValuePairs)
{
foreach (KeyValuePair<Instruction, int> kv in keyValuePairs)
{
Instruction instruction = kv.Key;
int index = kv.Value;
instructions.Insert(index, instruction);
}
}
public bool Supported(Instruction instr)
{
return Utils.CheckArithmetic(instr);
}
}
public class MulToShift : iMutation
{
public void Prepare(TypeDef type) { }
//this shit converts expressions like num * 5 into num + num << 1 + num << 2
public void Process(MethodDef method, ref int index)
{
if (method.Body.Instructions[index - 1].IsLdcI4() && method.Body.Instructions[index - 2].IsLdcI4())
{
var wl = method.Body.Instructions[index - 2].GetLdcI4Value();
var val = method.Body.Instructions[index - 1].GetLdcI4Value();
if (val >= 3)
{
Local lcl = new Local(method.Module.CorLibTypes.Int32);
method.Body.Variables.Add(lcl);
method.Body.Instructions.Insert(0, new Instruction(OpCodes.Stloc, lcl));
method.Body.Instructions.Insert(0, new Instruction(OpCodes.Ldc_I4, wl));
index += 2;
method.Body.Instructions[index - 2].OpCode = OpCodes.Ldloc;
method.Body.Instructions[index - 2].Operand = lcl;
//now we have lcl * val
method.Body.Instructions[index - 1].OpCode = OpCodes.Nop;
method.Body.Instructions[index].OpCode = OpCodes.Nop;
int count = 0;
int curval = val;
while (curval > 0)
{
// check for set bit and left
// shift n, count times
if ((curval & 1) == 1)
{
if (count != 0)
{
method.Body.Instructions.Insert(++index, new Instruction(OpCodes.Ldloc, lcl));
method.Body.Instructions.Insert(++index, new Instruction(OpCodes.Ldc_I4, count));
method.Body.Instructions.Insert(++index, new Instruction(OpCodes.Shl));
method.Body.Instructions.Insert(++index, new Instruction(OpCodes.Add));
}
}
count++;
curval = curval >> 1;
}
if ((val & 1) == 0)
{
method.Body.Instructions.Insert(++index, new Instruction(OpCodes.Ldloc, lcl));
method.Body.Instructions.Insert(++index, new Instruction(OpCodes.Sub));
}
}
}
}
public bool Supported(Instruction instr)
{
return instr.OpCode == OpCodes.Mul;
}
}
}

View File

@ -0,0 +1,58 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BMDevs.Runtime;
using dnlib.DotNet;
using dnlib.DotNet.Emit;
namespace BMDevs.Mutations
{
public class MutationObf : IObfuscation
{
public ModuleDef Module { get; set; }
List<iMutation> Tasks = new List<iMutation>()
{
//new Add(),
//new Sub(),
//new Div(),
//Issue: Mul mutation takes a lot of time because of `While` loop. Funcs.cs#61
//new Mul(),
new StringLen(),
//new Abs(),
//new Func(),
//new CharMutations(),
//new VariableMutation(),
//new ComparerMutation(),
//new MulToShift()
};
public void Execute(ModuleDefMD md)
{
Module = md;
foreach (TypeDef tDef in md.Types)
{
foreach (var mutation in Tasks)
mutation.Prepare(tDef);
for (int i = 0; i < tDef.Methods.Count; i++)
{
var mDef = tDef.Methods[i];
if (!mDef.HasBody || mDef.IsConstructor) continue;
mDef.Body.SimplifyBranches();
for (int x = 0; x < mDef.Body.Instructions.Count; x++)
{
var rndshit = Tasks[RuntimeHelper.Random.Next(Tasks.Count)];
if (rndshit.Supported(mDef.Body.Instructions[x]))
{
rndshit.Process(mDef, ref x);
}
}
}
}
}
}
}

View File

@ -0,0 +1,68 @@
using BMDevs.Runtime;
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using dnlib.PE;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BMDevs.Mutations
{
public class NumbersToModuleReference : IObfuscation
{
public ModuleDef Module { get; set; }
public Dictionary<int, FieldDef> Numbers { get; set; }
public void Execute(ModuleDefMD md)
{
Numbers = new Dictionary<int, FieldDef>();
Module = md;
foreach (var type in md.Types.Where(x => x != md.GlobalType))
foreach (var method in type.Methods.Where(x => !x.IsConstructor && x.HasBody && x.Body.HasInstructions))
ExecuteMethod(method);
}
public FieldDef AddNumberField(int num)
{
var cstype = RuntimeHelper.GetRuntimeType("BMDevs.Runtime.NumbersToModule");
FieldDef field = cstype.FindField("val");
Renamer.Rename(field, Renamer.RenameMode.Invalid2, 2);
//Renamer.Rename(field, Renamer.RenameMode.Base64, 2);
field.DeclaringType = null;
Module.GlobalType.Fields.Add(field);
var method = Module.GlobalType.FindOrCreateStaticConstructor();
method.Body.Instructions.Insert(0, new Instruction(OpCodes.Ldc_I4, num));
method.Body.Instructions.Insert(1, new Instruction(OpCodes.Stsfld, field));
return field;
}
//thanks to mighty
public void ExecuteMethod(MethodDef method)
{
for (int i = 0; i < method.Body.Instructions.Count; i++)
{
var instr = method.Body.Instructions[i];
if (instr.IsLdcI4())
{
if (Module.GlobalType.Fields.Count < 65000)
{
var val = instr.GetLdcI4Value();
FieldDef fld;
if (!Numbers.TryGetValue(val, out fld))
{
fld = AddNumberField(val);
Numbers.Add(val, fld);
//Console.WriteLine("NumberModule: " + val);
}
instr.OpCode = OpCodes.Ldsfld;
instr.Operand = fld;
}
}
}
}
}
}

View File

@ -0,0 +1,13 @@
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using System.Collections.Generic;
namespace BMDevs.Mutations
{
public interface iMutation
{
void Process(MethodDef method, ref int index);
void Prepare(TypeDef type);
bool Supported(Instruction instr);
}
}

67
BMFuscator/OwnRandom.cs Normal file
View File

@ -0,0 +1,67 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
namespace BMDevs
{
public class OwnRandom : RandomNumberGenerator
{
private static RandomNumberGenerator r;
public OwnRandom()
{
r = RandomNumberGenerator.Create();
}
public override void GetBytes(byte[] buffer)
{
r.GetBytes(buffer);
}
public double NextDouble()
{
byte[] b = new byte[4];
r.GetBytes(b);
return (double)BitConverter.ToUInt32(b, 0) / UInt32.MaxValue;
}
public int Next(int minValue, int maxValue)
{
return (int)Math.Floor(NextDouble() * (maxValue - minValue)) + minValue;
}
public int Next()
{
return Next(0, Int32.MaxValue);
}
public int Next(int maxValue)
{
return Next(0, maxValue);
}
public byte NextByte()
{
return (Byte)Next(Byte.MaxValue);
}
public uint NextUInt32()
{
return (uint)Next() * 2;
}
public void Shuffle<T>(IList<T> list)
{
for (int i = list.Count - 1; i > 1; i--)
{
int k = Next(i + 1);
T tmp = list[k];
list[k] = list[i];
list[i] = tmp;
}
}
}
}

140
BMFuscator/Program.cs Normal file
View File

@ -0,0 +1,140 @@
using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BMDevs
{
class Program
{
public static Worker Worker { get; set; }
public static string path = "";
public static void Main(string[] args)
{
FileInfo info;
//path = @"C:\Users\boule\Documents\Visual Studio 2019\Projects\BMTune2\BMTune_Encrypter\bin\Debug\BMTune.exe";
//path = @"C:\Users\boule\Documents\Visual Studio 2019\Projects\BMTune2\bin\Debug\BMTune.exe";
//path = @"C:\Users\boule\Documents\Visual Studio 2019\Projects\BMTune2_Crypted\bin\Debug\BMTune.exe";
//if (path != "") DoLoop();
for (int i = 0; i < args.Length; i++)
{
//Console.WriteLine(args[i]);
info = new FileInfo(args[i]);
if (((info.Extension == ".exe")) && info.Exists)
{
path = args[i];
DoLoop();
}
}
if (path == "")
{
bool TestReload = true;
int ObCount = 0;
while (TestReload)
{
Console.WriteLine("BMDevs Obfuscator.");
if (path == "")
{
Console.Write("Input an assembly: ");
path = Console.ReadLine();
}
Worker = new Worker(path);
Console.WriteLine("Choose options to obfuscate: ");
for (int i = 0; i < Worker.Obfuscations.Count; i++) Console.WriteLine(i + 1 + ") " + Worker.Obfuscations[i]);
string opts = Console.ReadLine();
Worker.ExecuteObfuscations(opts);
//Worker.Save();
//Console.ReadLine();
ObCount++;
Console.WriteLine("Do you want to reload: y\\n?");
string CommandContinu = Console.ReadLine();
if (CommandContinu == "n") TestReload = false;
}
Worker.Save();
}
//Console.ReadLine();
}
public static void RemakeNameToOriginal()
{
if (File.Exists(path))
{
if (!path.Contains("_BMFuscator")) path = path.Substring(0, path.Length - 4) + "_BMFuscator.exe";
string TFile = path;
string Name = path.Substring(0, path.Length - 15) + ".exe";
File.Create(Name).Dispose();
File.WriteAllBytes(Name, File.ReadAllBytes(TFile));
File.Delete(TFile);
}
}
public static void DoLoop()
{
Worker = new Worker(path);
DoSingle("ControlFlowObfuscation");
//DoSingle("JunkProtection");
//DoSingle("BoolsToModuleReference"); //Little Slow
//DoSingle("BytesToModuleReference"); //Little Slow
//DoSingle("NumbersToModuleReference"); //Little Slow
//DoSingle("ConstantsEncoding"); //Create very big delay
DoSingle("MutationObf");
//DoSingle("ReferenceProxy"); //app doesnt start
//DoSingle("HiddenNamespace");
DoSingle("RenameObfuscation");
//DoSingle("ModuleRenaming");
DoSingle("NumbersToModuleReference"); //Little Slow
//DoSingle("AntiDe4dotProtection");
//DoSingle("AntiILDasmProtection");
Worker.Save();
Worker = null;
//RemakeNameToOriginal();
}
public static void DoSingle(string opts)
{
/*1) ConstantsEncoding
2) ModuleRenaming
3) HiddenNamespace
4) ReferenceProxy
5) RenameObfuscation
6) MutationObf
7) NumbersToModuleReference
8) JunkProtection
9) ControlFlowObfuscation*/
Worker.ExecuteObfuscations(opts);
/*int retrunr = 0;
if (opts == "ConstantsEncoding") retrunr = 1;
if (opts == "ModuleRenaming") retrunr = 2;
if (opts == "HiddenNamespace") retrunr = 3;
if (opts == "ReferenceProxy") retrunr = 4;
if (opts == "RenameObfuscation") retrunr = 5;
if (opts == "MutationObf") retrunr = 6;
if (opts == "NumbersToModuleReference") retrunr = 7;
if (opts == "JunkProtection") retrunr = 8;
if (opts == "ControlFlowObfuscation") retrunr = 9;
if (opts == "BoolsToModuleReference") retrunr = 10;
if (opts == "BytesToModuleReference") retrunr = 11;
Worker.ExecuteObfuscations(retrunr.ToString());*/
}
}
}

View File

View File

@ -0,0 +1,32 @@

/*using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using dnlib;
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using Krawk.Helpers;
namespace Krawk_Protector.Protections
{
class AntiDbg : IObfuscation
{
public void Execute(ModuleDefMD ManifestModule)
{
ModuleDefMD typeModule = ModuleDefMD.Load(typeof(Krawk.Runtime.AntiDebug).Module);
TypeDef typeDef = typeModule.ResolveTypeDef(MDToken.ToRID(typeof(Krawk.Runtime.AntiDebug).MetadataToken));
IEnumerable<IDnlibDef> members = InjectHelper.Inject(typeDef, krawk.GlobalType, krawk.ManifestModule);
decryptmethod = (MethodDef)members.Single(method => method.Name == "StartAntiDebug");
}
public void ProtectionPhase(Context krawk)
{
int cctorbdycount = krawk.cctor.Body.Instructions.Count;
krawk.cctor.Body.Instructions.Insert(cctorbdycount - 1, Instruction.Create(OpCodes.Call, decryptmethod));
}
}
}*/

View File

@ -0,0 +1,65 @@
using dnlib.DotNet;
namespace BMDevs.Protections
{
class AntiDe4dotProtection : IObfuscation
{
public void Execute(ModuleDefMD md)
{
InterfaceImpl interfaceM = new InterfaceImplUser(md.GlobalType);
TypeDef typeDef1 = new TypeDefUser("", "Form", md.CorLibTypes.GetTypeRef("System", "Attribute"));
InterfaceImpl item1 = new InterfaceImplUser(typeDef1);
md.Types.Add(typeDef1);
typeDef1.Interfaces.Add(item1);
TypeDef typeDef2 = new TypeDefUser("", "Program", md.CorLibTypes.GetTypeRef("System", "Attribute"));
InterfaceImpl item2 = new InterfaceImplUser(typeDef2);
md.Types.Add(typeDef2);
typeDef2.Interfaces.Add(item2);
for (int i = 1; i < 55; i++)
{
typeDef1 = new TypeDefUser("", "Form" + i.ToString(), md.CorLibTypes.GetTypeRef("System", "Attribute"));
item1 = new InterfaceImplUser(typeDef1);
md.Types.Add(typeDef1);
typeDef1.Interfaces.Add(item1);
}
for (int i = 1; i < 34; i++)
{
typeDef1 = new TypeDefUser("", "class" + i.ToString(), md.CorLibTypes.GetTypeRef("System", "Attribute"));
item1 = new InterfaceImplUser(typeDef1);
md.Types.Add(typeDef1);
typeDef1.Interfaces.Add(item1);
}
for (int i = 1; i < 70; i++)
{
typeDef1 = new TypeDefUser("", "parm" + i.ToString(), md.CorLibTypes.GetTypeRef("System", "Attribute"));
item1 = new InterfaceImplUser(typeDef1);
md.Types.Add(typeDef1);
typeDef1.Interfaces.Add(item1);
}
for (int i = 1; i < 10; i++)
{
typeDef1 = new TypeDefUser("", "struct" + i.ToString(), md.CorLibTypes.GetTypeRef("System", "Attribute"));
item1 = new InterfaceImplUser(typeDef1);
md.Types.Add(typeDef1);
typeDef1.Interfaces.Add(item1);
}
for (int i = 1; i < 20; i++)
{
typeDef1 = new TypeDefUser("", "ctrl" + i.ToString(), md.CorLibTypes.GetTypeRef("System", "Attribute"));
item1 = new InterfaceImplUser(typeDef1);
md.Types.Add(typeDef1);
typeDef1.Interfaces.Add(item1);
}
for (int i = 1; i < 40; i++)
{
typeDef1 = new TypeDefUser("", "Data" + i.ToString(), md.CorLibTypes.GetTypeRef("System", "Attribute"));
item1 = new InterfaceImplUser(typeDef1);
md.Types.Add(typeDef1);
typeDef1.Interfaces.Add(item1);
}
}
}
}

View File

@ -0,0 +1,45 @@
using dnlib.DotNet;
namespace BMDevs.Protections
{
class AntiILDasmProtection : IObfuscation
{
public void Execute(ModuleDefMD ManifestModule)
{
TypeRef supressref = ManifestModule.CorLibTypes.GetTypeRef("System.Runtime.CompilerServices", "SuppressIldasmAttribute");
var ctorRef = new MemberRefUser(ManifestModule, ".ctor", MethodSig.CreateInstance(ManifestModule.CorLibTypes.Void), supressref);
var supressattribute = new CustomAttribute(ctorRef);
ManifestModule.CustomAttributes.Add(supressattribute);
TypeRef supressref2 = ManifestModule.CorLibTypes.GetTypeRef("System.Runtime.CompilerServices", "UnsafeValueTypeAttribute");
var ctorRef2 = new MemberRefUser(ManifestModule, ".ctor", MethodSig.CreateInstance(ManifestModule.CorLibTypes.Void), supressref2);
var supressattribute2 = new CustomAttribute(ctorRef2);
ManifestModule.CustomAttributes.Add(supressattribute2);
TypeRef supressref3 = ManifestModule.CorLibTypes.GetTypeRef("System.Runtime.CompilerServices", "RuntimeWrappedException");
var ctorRef3 = new MemberRefUser(ManifestModule, ".ctor", MethodSig.CreateInstance(ManifestModule.CorLibTypes.Void), supressref3);
var supressattribute3 = new CustomAttribute(ctorRef3);
ManifestModule.CustomAttributes.Add(supressattribute3);
TypeRef supressref4 = ManifestModule.CorLibTypes.GetTypeRef("System.Runtime.CompilerServices", "UnverifiableCodeAttribute");
var ctorRef4 = new MemberRefUser(ManifestModule, ".ctor", MethodSig.CreateInstance(ManifestModule.CorLibTypes.Void), supressref4);
var supressattribute4 = new CustomAttribute(ctorRef4);
ManifestModule.CustomAttributes.Add(supressattribute4);
TypeRef supressref5 = ManifestModule.CorLibTypes.GetTypeRef("System.Runtime.CompilerServices", "SuppressUnmanagedCodeSecurity");
var ctorRef5 = new MemberRefUser(ManifestModule, ".ctor", MethodSig.CreateInstance(ManifestModule.CorLibTypes.Void), supressref5);
var supressattribute5 = new CustomAttribute(ctorRef5);
ManifestModule.CustomAttributes.Add(supressattribute5);
TypeRef supressref6 = ManifestModule.CorLibTypes.GetTypeRef("System.Runtime.CompilerServices", "ProtectedByBMDevs");
var ctorRef6 = new MemberRefUser(ManifestModule, ".ctor", MethodSig.CreateInstance(ManifestModule.CorLibTypes.Void), supressref6);
var supressattribute6 = new CustomAttribute(ctorRef6);
ManifestModule.CustomAttributes.Add(supressattribute6);
/*TypeRef supressref7 = ManifestModule.CorLibTypes.GetTypeRef("System.Runtime.CompilerServices", "BMDevsProperties");
var ctorRef7 = new MemberRefUser(ManifestModule, ".ctor", MethodSig.CreateInstance(ManifestModule.CorLibTypes.Void), supressref7);
var supressattribute7 = new CustomAttribute(ctorRef7);
ManifestModule.CustomAttributes.Add(supressattribute7);*/
}
}
}

View File

@ -0,0 +1,124 @@
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using Krawk_Protector.Utils;
using Krawk.Runtime;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Krawk.Helpers;
namespace Krawk_Protector.Protections
{
class CalliProtection : IProtector
{
string IProtector.Name => "CalliProtection";
private MethodDef decryptionmethod;
void IProtector.InjectPhase(Context krawk) {
ModuleDefMD typeModule = ModuleDefMD.Load(typeof(CalliRuntime).Module);
TypeDef typeDef = typeModule.ResolveTypeDef(MDToken.ToRID(typeof(CalliRuntime).MetadataToken));
IEnumerable<IDnlibDef> members = InjectHelper.Inject(typeDef, krawk.GlobalType, krawk.ManifestModule);
decryptionmethod = (MethodDef)members.Single(method => method.Name == "ResolveToken");
}
public static int token2 = 0;
public static List<MemberRef> listmember = new List<MemberRef>();
public static List<int> listtoken = new List<int>();
void IProtector.ProtectionPhase(Context krawk)
{
var module = krawk.ManifestModule;
foreach (TypeDef type in module.Types.ToArray())
{
if (type.Namespace.Contains(".My")) continue;
foreach (MethodDef method in type.Methods.ToArray())
{
if (method.Equals(decryptionmethod))
{
}
else
{
if (type.IsGlobalModuleType) continue;
if (method.ToString().Contains("Program")) continue;
if (method.HasBody)
{
if (method.Body.HasInstructions)
{
for (int i = 0; i < method.Body.Instructions.Count - 1; i++)
{
try
{
if (method.Body.Instructions[i].OpCode == OpCodes.Call || method.Body.Instructions[i].OpCode == OpCodes.Callvirt || method.Body.Instructions[i].OpCode == OpCodes.Ldloc_S)
{
try
{
MemberRef membertocalli = (MemberRef)method.Body.Instructions[i].Operand;
token2 = membertocalli.MDToken.ToInt32();
if (!membertocalli.ToString().Contains("ResolveToken"))
{
if (!membertocalli.HasThis)
{
if (listmember.Contains(membertocalli))
{
method.Body.Instructions[i].OpCode = OpCodes.Calli;
method.Body.Instructions[i].Operand = listmember[listmember.IndexOf(membertocalli)].MethodSig;
method.Body.Instructions.Insert(i, Instruction.Create(OpCodes.Call, decryptionmethod));
method.Body.Instructions.Insert(i, Instruction.Create(OpCodes.Ldc_I8, (long)(listtoken[listmember.IndexOf(membertocalli)])));
}
else
{
MethodSig MethodSign = membertocalli.MethodSig;
method.Body.Instructions[i].OpCode = OpCodes.Calli;
method.Body.Instructions[i].Operand = MethodSign;
method.Body.Instructions.Insert(i, Instruction.Create(OpCodes.Call, decryptionmethod));
method.Body.Instructions.Insert(i, Instruction.Create(OpCodes.Ldc_I8,(long)token2));
listmember.Add(membertocalli);
listtoken.Add(token2);
}
}
}
}
catch (Exception ex)
{
string str = ex.Message;
}
}
}
catch
{
}
}
}
else
{
}
}
}
}
foreach (MethodDef md in module.GlobalType.Methods)
{
if (md.Name == ".ctor")
{
module.GlobalType.Remove(md);
break;
}
}
}
}
}
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,83 @@
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using Krawk_Protector.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
namespace Krawk_Protector.Protections.Constants
{
class ConstantsMelt : IProtector
{
string IProtector.Name => "ConstantsMelt";
private CilBody body;
void IProtector.InjectPhase(Context krawk) { }
void IProtector.ProtectionPhase(Context krawk)
{
foreach (ModuleDef module in krawk.Assembly.Modules)
{
foreach (TypeDef type in module.Types)
{
foreach (MethodDef method in type.Methods)
{
if (!method.HasBody) continue;
if (method.HasBody) if (!method.Body.HasInstructions) continue;
body = method.Body;
for (int i = 0; i < body.Instructions.Count; i++)
{
if (method.Body.Instructions[i].OpCode == OpCodes.Ldstr)
{
Mutate(krawk, method, i, "String");
i += 2;
}
if(method.Body.Instructions[i].IsLdcI4())
{
Mutate(krawk, method, i, "Int");
}
}
body.SimplifyBranches();
body.OptimizeBranches();
}
}
}
}
private void Mutate(Context krawk, MethodDef method, int i, string type)
{
{
//faltou umas local!
Local local = null;
if (type == "String")
{
local = new Local(krawk.ManifestModule.CorLibTypes.String);
}
else if (type == "Int")
{
local = new Local(krawk.ManifestModule.CorLibTypes.Int32);
}
method.Body.Variables.Add(local);
method.Body.Instructions.Insert(i + 1, Instruction.Create(OpCodes.Stloc_S, local));
method.Body.Instructions.Insert(i + 2, Instruction.Create(OpCodes.Ldloc_S, local));
//Inicio
//
}
}
}
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,65 @@
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using Krawk_Protector.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Krawk_Protector.Protections.Constants
{
class NumbersMutation : IProtector
{
string IProtector.Name => "NumbersMutation";
private CilBody body;
void IProtector.InjectPhase(Context krawk) { }
void IProtector.ProtectionPhase(Context krawk)
{
foreach (ModuleDef module in krawk.Assembly.Modules)
{
foreach (TypeDef type in module.Types)
{
if (type.Namespace.Contains(".My")) continue;
foreach (MethodDef method in type.Methods)
{
if (!method.HasBody) continue;
if (method.Name.Contains("Krawk_Protector_N")) continue;
if (method.HasBody) if (!method.Body.HasInstructions) continue;
body = method.Body;
for (int i = 0; i < body.Instructions.Count; i++)
{
if (body.Instructions[i].OpCode == OpCodes.Ldc_I4)
{
Mutate(krawk, method, i);
i += 2;
}
}
body.SimplifyBranches();
body.OptimizeBranches();
}
}
}
}
private void Mutate(Context krawk, MethodDef method, int i)
{
body = method.Body;
int rndkey = Utils.Generator.RandomInt(0, int.MaxValue);
int newoperand = body.Instructions[i].GetLdcI4Value() + rndkey;
body.Instructions[i] = Instruction.CreateLdcI4(newoperand);
body.Instructions.Insert(i + 1, Instruction.CreateLdcI4(rndkey));
body.Instructions.Insert(i + 2, OpCodes.Sub.ToInstruction());
}
}
}

View File

@ -0,0 +1,154 @@
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using Krawk_Protector.Utils;
using System;
namespace Krawk_Protector.Protections.Constants
{
class SizeofProtection : IProtector
{
string IProtector.Name => "SizeofProtection";
private CilBody body;
private static Random rndx = new Random();
void IProtector.InjectPhase(Context krawk) { }
void IProtector.ProtectionPhase(Context krawk)
{
foreach (ModuleDef module in krawk.Assembly.Modules)
{
foreach (TypeDef type in module.Types)
{
if (type.Namespace.Contains(".My")) continue;
foreach (MethodDef method in type.Methods)
{
if (method.HasBody && method.Body.HasInstructions)
{
if (method.Name.Contains("Krawk_Protector_N")) continue;
for (int i = 0; i < method.Body.Instructions.Count; i++)
{
if (method.Body.Instructions[i].OpCode == OpCodes.Ldc_I4)
{
body = method.Body;
int atual = body.Instructions[i].GetLdcI4Value();
int sub = rndx.Next(1, 3);
int calculado = atual - sub;
body.Instructions[i].Operand = calculado;
Start(i, sub, calculado, krawk, method);
}
}
}
}
}
}
}
private void Start(int i, int sub, int calculado, Context krawk, MethodDef method)
{
switch (sub)
{
case 1:
//CORRECT
Local local_1 = new Local(krawk.ManifestModule.CorLibTypes.Object);
Local local_2 = new Local(krawk.ManifestModule.CorLibTypes.Object);
Local local_3 = new Local(krawk.ManifestModule.CorLibTypes.Object);
Local local_4 = new Local(krawk.ManifestModule.CorLibTypes.Object);
method.Body.Variables.Add(local_1);
method.Body.Variables.Add(local_2);
method.Body.Variables.Add(local_3);
method.Body.Variables.Add(local_4);
body.Instructions.Insert(i + 1, new Instruction(OpCodes.Sizeof, krawk.ManifestModule.Import(typeof(GCNotificationStatus))));
body.Instructions.Insert(i + 2, new Instruction(OpCodes.Stloc_S, local_1));
body.Instructions.Insert(i + 3, new Instruction(OpCodes.Ldloc_S, local_1));
body.Instructions.Insert(i + 4, OpCodes.Add.ToInstruction());
body.Instructions.Insert(i + 5, new Instruction(OpCodes.Sizeof, krawk.ManifestModule.Import(typeof(SByte))));
body.Instructions.Insert(i + 6, new Instruction(OpCodes.Stloc_S, local_2));
body.Instructions.Insert(i + 7, new Instruction(OpCodes.Ldloc_S, local_2));
body.Instructions.Insert(i + 8, OpCodes.Sub.ToInstruction());
body.Instructions.Insert(i + 9, new Instruction(OpCodes.Sizeof, krawk.ManifestModule.Import(typeof(SByte))));
body.Instructions.Insert(i + 10, new Instruction(OpCodes.Stloc_S, local_3));
body.Instructions.Insert(i + 11, new Instruction(OpCodes.Ldloc_S, local_3));
body.Instructions.Insert(i + 12, OpCodes.Sub.ToInstruction());
body.Instructions.Insert(i + 13, new Instruction(OpCodes.Sizeof, krawk.ManifestModule.Import(typeof(SByte))));
body.Instructions.Insert(i + 14, new Instruction(OpCodes.Stloc_S, local_4));
body.Instructions.Insert(i + 15, new Instruction(OpCodes.Ldloc_S, local_4));
body.Instructions.Insert(i + 16, OpCodes.Sub.ToInstruction());
break;
case 2:
//CORRECT
local_1 = new Local(krawk.ManifestModule.CorLibTypes.Object);
method.Body.Variables.Add(local_1);
body.Instructions.Insert(i +1, new Instruction(OpCodes.Sizeof, krawk.ManifestModule.Import(typeof(char))));
body.Instructions.Insert(i +2, new Instruction(OpCodes.Stloc_S, local_1));
body.Instructions.Insert(i + 3, new Instruction(OpCodes.Ldloc_S, local_1));
body.Instructions.Insert(i + 4, OpCodes.Add.ToInstruction());
break;
case 3:
local_1 = new Local(krawk.ManifestModule.CorLibTypes.Object);
local_2 = new Local(krawk.ManifestModule.CorLibTypes.Object);
method.Body.Variables.Add(local_1);
method.Body.Variables.Add(local_2);
body.Instructions.Insert(i + 1, Instruction.Create(OpCodes.Sizeof, krawk.ManifestModule.Import(typeof(System.Int32))));
body.Instructions.Insert(i + 2, new Instruction(OpCodes.Stloc_S, local_1));
body.Instructions.Insert(i + 3, new Instruction(OpCodes.Ldloc_S, local_1));
body.Instructions.Insert(i + 4, Instruction.Create(OpCodes.Sizeof, krawk.ManifestModule.Import(typeof(byte))));
body.Instructions.Insert(i + 5, new Instruction(OpCodes.Stloc_S, local_2));
body.Instructions.Insert(i + 6, new Instruction(OpCodes.Ldloc_S, local_2));
body.Instructions.Insert(i + 7, Instruction.Create(OpCodes.Sub));
body.Instructions.Insert(i + 8, Instruction.Create(OpCodes.Add));
break;
case 4:
local_1 = new Local(krawk.ManifestModule.CorLibTypes.Object);
local_2 = new Local(krawk.ManifestModule.CorLibTypes.Object);
local_3 = new Local(krawk.ManifestModule.CorLibTypes.Object);
local_4 = new Local(krawk.ManifestModule.CorLibTypes.Object);
method.Body.Variables.Add(local_1);
method.Body.Variables.Add(local_2);
method.Body.Variables.Add(local_3);
method.Body.Variables.Add(local_4);
body.Instructions.Insert(i + 1, Instruction.Create(OpCodes.Add));
body.Instructions.Insert(i + 2, Instruction.Create(OpCodes.Sizeof, krawk.ManifestModule.Import(typeof(System.Decimal))));
body.Instructions.Insert(i + 3, new Instruction(OpCodes.Stloc_S, local_1));
body.Instructions.Insert(i + 4, new Instruction(OpCodes.Ldloc_S, local_1));
body.Instructions.Insert(i + 5, Instruction.Create(OpCodes.Sizeof, krawk.ManifestModule.Import(typeof(System.GCCollectionMode))));
body.Instructions.Insert(i + 6, new Instruction(OpCodes.Stloc_S, local_2));
body.Instructions.Insert(i + 7, new Instruction(OpCodes.Ldloc_S, local_2));
body.Instructions.Insert(i + 8, Instruction.Create(OpCodes.Sub));
body.Instructions.Insert(i + 9, Instruction.Create(OpCodes.Sizeof, krawk.ManifestModule.Import(typeof(System.Int32))));
body.Instructions.Insert(i + 10, new Instruction(OpCodes.Stloc_S, local_3));
body.Instructions.Insert(i + 11, new Instruction(OpCodes.Ldloc_S, local_3));
body.Instructions.Insert(i + 12, Instruction.Create(OpCodes.Sizeof, krawk.ManifestModule.Import(typeof(byte))));
body.Instructions.Insert(i + 13, new Instruction(OpCodes.Stloc_S, local_4));
body.Instructions.Insert(i + 14, new Instruction(OpCodes.Ldloc_S, local_4));
body.Instructions.Insert(i + 15, Instruction.Create(OpCodes.Sizeof, krawk.ManifestModule.Import(typeof(byte))));
body.Instructions.Insert(i + 16, new Instruction(OpCodes.Stloc_S, local_1));
body.Instructions.Insert(i + 17, new Instruction(OpCodes.Ldloc_S, local_1));
body.Instructions.Insert(i + 18, Instruction.Create(OpCodes.Sub));
body.Instructions.Insert(i + 19, Instruction.Create(OpCodes.Sizeof, krawk.ManifestModule.Import(typeof(byte))));
body.Instructions.Insert(i + 20, new Instruction(OpCodes.Stloc_S, local_2));
body.Instructions.Insert(i + 21, new Instruction(OpCodes.Ldloc_S, local_2));
body.Instructions.Insert(i + 22, Instruction.Create(OpCodes.Sizeof, krawk.ManifestModule.Import(typeof(byte))));
body.Instructions.Insert(i + 23, new Instruction(OpCodes.Stloc_S, local_2));
body.Instructions.Insert(i + 24, new Instruction(OpCodes.Ldloc_S, local_2));
body.Instructions.Insert(i + 25, Instruction.Create(OpCodes.Add));
break;
case 5:
local_1 = new Local(krawk.ManifestModule.CorLibTypes.Object);
local_2 = new Local(krawk.ManifestModule.CorLibTypes.Object);
method.Body.Variables.Add(local_1);
method.Body.Variables.Add(local_2);
body.Instructions.Insert(i + 1, new Instruction(OpCodes.Sizeof, krawk.ManifestModule.Import(typeof(System.EnvironmentVariableTarget))));
body.Instructions.Insert(i + 2, Instruction.Create(OpCodes.Stloc_S, local_1));
body.Instructions.Insert(i + 3, Instruction.Create(OpCodes.Ldloc_S, local_1));
body.Instructions.Insert(i + 4, OpCodes.Add.ToInstruction());
body.Instructions.Insert(i + 5, new Instruction(OpCodes.Sizeof, krawk.ManifestModule.Import(typeof(SByte))));
body.Instructions.Insert(i + 6, Instruction.Create(OpCodes.Stloc_S, local_2));
body.Instructions.Insert(i + 7, Instruction.Create(OpCodes.Ldloc_S, local_2));
body.Instructions.Insert(i + 9, OpCodes.Add.ToInstruction());
break;
}
}
}
}

View File

@ -0,0 +1,33 @@
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using Microsoft.VisualBasic;
using Krawk.Helpers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
using Microsoft.VisualBasic.CompilerServices;
using Microsoft.VisualBasic;
using Krawk_Protector.Utils;
namespace Krawk_Protector.Protections.Constants
{
class StringProtection : IProtector
{
string IProtector.Name => "StringProtection";
public void InjectPhase(Context Krawk)
{
}
public void ProtectionPhase(Context Krawk)
{
}
}
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,176 @@
using BMDevs.Runtime;
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using dnlib.PE;
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using System.Text;
namespace BMDevs
{
public class ConstantsEncoding : IObfuscation
{
public int CurrentIndex { get; set; } = 0;
public MethodDef Decryptor { get; set; }
public List<byte> array = new List<byte>();
public Dictionary<RVA, List<Tuple<int, int, int>>> Keys = new Dictionary<RVA, List<Tuple<int, int, int>>>();
public void Execute(ModuleDefMD md)
{
var consttype = RuntimeHelper.GetRuntimeType("BMDevs.Runtime.Constants");
//var consttype = RuntimeHelper.GetRuntimeType("AsStrongAsFuck.Runtime.Constants");
FieldDef field = consttype.FindField("array");
Renamer.Rename(field, Renamer.RenameMode.Invalid2, 2);
//Renamer.Rename(field, Renamer.RenameMode.Base64, 2);
field.DeclaringType = null;
foreach (TypeDef type in md.Types)
foreach (MethodDef method in type.Methods)
if (method.HasBody && method.Body.HasInstructions)
ExtractStrings(method);
md.GlobalType.Fields.Add(field);
MethodDef todef = consttype.FindMethod("Get");
todef.DeclaringType = null;
todef.Body.Instructions[59].Operand = field;
Renamer.Rename(todef, Renamer.RenameMode.Invalid2);
//Renamer.Rename(todef, Renamer.RenameMode.Logical);
md.GlobalType.Methods.Add(todef);
MethodDef init = consttype.FindMethod("Initialize");
MethodDef add = consttype.FindMethod("Set");
init.DeclaringType = null;
init.Body.Instructions[3].Operand = field;
List<Instruction> insts = new List<Instruction>(add.Body.Instructions);
insts[1].Operand = field;
insts[insts.Count - 1].OpCode = OpCodes.Nop;
insts.RemoveAt(0);
insts[1].OpCode = OpCodes.Ldc_I4;
insts[2].OpCode = OpCodes.Ldc_I4;
var compressed = Compress(array.ToArray());
for (int i = 0; i < compressed.Length; i++)
{
insts[1].Operand = i;
insts[2].Operand = Convert.ToInt32(compressed[i]);
for (int x = insts.Count - 1; x >= 0; x--)
{
init.Body.Instructions.Insert(4, new Instruction(insts[x].OpCode, insts[x].Operand));
}
}
init.Body.Instructions[init.Body.Instructions.Count - 1 - 1].Operand = field;
init.Body.Instructions[init.Body.Instructions.Count - 1 - 99].Operand = field;
Renamer.Rename(init, Renamer.RenameMode.Invalid2, 2);
//Renamer.Rename(init, Renamer.RenameMode.Base64, 2);
md.GlobalType.Methods.Add(init);
Decryptor = todef;
MethodDef cctor = md.GlobalType.FindOrCreateStaticConstructor();
cctor.Body = new CilBody();
cctor.Body.Instructions.Add(new Instruction(OpCodes.Ldc_I4, compressed.Length));
cctor.Body.Instructions.Add(new Instruction(OpCodes.Call, init));
cctor.Body.Instructions.Add(new Instruction(OpCodes.Ret));
foreach (TypeDef type2 in md.Types)
foreach (MethodDef method2 in type2.Methods)
if (method2.HasBody && method2.Body.HasInstructions)
ReferenceReplace(method2);
}
public void ReferenceReplace(MethodDef method)
{
method.Body.SimplifyBranches();
if (Keys.ContainsKey(method.RVA))
{
List<Tuple<int, int, int>> keys = Keys[method.RVA];
keys.Reverse();
foreach (Tuple<int, int, int> v in keys)
{
method.Body.Instructions[v.Item1].Operand = "BMDevs Protected Property";
//method.Body.Instructions[v.Item1].Operand = "AsStrongAsFuck - Obfuscator by Charter (vk.com/violent_0)";
method.Body.Instructions.Insert(v.Item1 + 1, new Instruction(OpCodes.Ldc_I4, v.Item2));
method.Body.Instructions.Insert(v.Item1 + 2, new Instruction(OpCodes.Ldc_I4, v.Item3));
method.Body.Instructions.Insert(v.Item1 + 3, new Instruction(OpCodes.Call, Decryptor));
}
}
method.Body.OptimizeBranches();
}
public void ExtractStrings(MethodDef method)
{
List<Tuple<int, int, int>> shit = new List<Tuple<int, int, int>>();
foreach (Instruction instr in method.Body.Instructions)
{
bool flag = instr.OpCode == OpCodes.Ldstr;
if (flag)
{
string code = (string)instr.Operand;
byte[] bytes = Encoding.UTF8.GetBytes(code);
foreach (byte v in bytes)
{
array.Add(v);
}
var curname = Encoding.Default.GetBytes(method.Name);
const int p = 16777619;
int hash = -2128831035;
for (int i = 0; i < curname.Length; i++)
hash = (hash ^ curname[i]) * p;
hash += hash << 13;
hash ^= hash >> 7;
shit.Add(new Tuple<int, int, int>(method.Body.Instructions.IndexOf(instr), CurrentIndex - hash, bytes.Length));
CurrentIndex += bytes.Length;
}
}
if (!Keys.ContainsKey(method.RVA))
Keys.Add(method.RVA, shit);
}
public static byte[] Compress(byte[] data)
{
MemoryStream ms = new MemoryStream();
DeflateStream ds = new DeflateStream(ms, CompressionMode.Compress);
ds.Write(data, 0, data.Length);
ds.Flush();
ds.Close();
return ms.ToArray();
}
public static byte[] Decompress(byte[] data)
{
const int BUFFER_SIZE = 256;
byte[] tempArray = new byte[BUFFER_SIZE];
List<byte[]> tempList = new List<byte[]>();
int count = 0, length = 0;
MemoryStream ms = new MemoryStream(data);
DeflateStream ds = new DeflateStream(ms, CompressionMode.Decompress);
while ((count = ds.Read(tempArray, 0, BUFFER_SIZE)) > 0)
{
if (count == BUFFER_SIZE)
{
tempList.Add(tempArray);
tempArray = new byte[BUFFER_SIZE];
}
else
{
byte[] temp = new byte[count];
Array.Copy(tempArray, 0, temp, 0, count);
tempList.Add(temp);
}
length += count;
}
byte[] retVal = new byte[length];
count = 0;
foreach (byte[] temp in tempList)
{
Array.Copy(temp, 0, retVal, count, temp.Length);
count += temp.Length;
}
return retVal;
}
}
}

View File

@ -0,0 +1,21 @@
using dnlib.DotNet.Emit;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BMDevs.ControlFlow
{
public class Block
{
public Block()
{
Instructions = new List<Instruction>();
}
public List<Instruction> Instructions { get; set; }
public int Number { get; set; }
public int Next { get; set; }
}
}

View File

@ -0,0 +1,62 @@
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BMDevs.ControlFlow
{
public class BlockParser
{
public static List<Block> ParseMethod(MethodDef method)
{
List<Block> blocks = new List<Block>();
List<Instruction> body = new List<Instruction>(method.Body.Instructions);
//splitting into blocks (Thanks to CodeOfDark#6320)
Block block = new Block();
int Id = 0;
int usage = 0;
block.Number = Id;
block.Instructions.Add(Instruction.Create(OpCodes.Nop));
blocks.Add(block);
block = new Block();
Stack<ExceptionHandler> handlers = new Stack<ExceptionHandler>();
foreach (Instruction instruction in method.Body.Instructions)
{
foreach (var eh in method.Body.ExceptionHandlers)
{
if (eh.HandlerStart == instruction || eh.TryStart == instruction || eh.FilterStart == instruction)
handlers.Push(eh);
}
foreach (var eh in method.Body.ExceptionHandlers)
{
if (eh.HandlerEnd == instruction || eh.TryEnd == instruction)
handlers.Pop();
}
int stacks, pops;
instruction.CalculateStackUsage(out stacks, out pops);
block.Instructions.Add(instruction);
usage += stacks - pops;
if (stacks == 0)
{
if (instruction.OpCode != OpCodes.Nop)
{
if ((usage == 0 || instruction.OpCode == OpCodes.Ret) && handlers.Count == 0)
{
block.Number = ++Id;
blocks.Add(block);
block = new Block();
}
}
}
}
return blocks;
}
}
}

View File

@ -0,0 +1,35 @@
using dnlib.DotNet.Emit;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Krawk_Protector.Protections.ControlFlow
{
public class Block
{
public int ID = 0;
public int nextBlock = 0;
public List<Instruction> instructions = new List<Instruction>();
}
public class Blocks
{
public List<Block> blocks = new List<Block>();
private static Random generator = new Random();
public Block getBlock(int id)
{
return blocks.Single(block => block.ID == id);
}
public void Scramble(out Blocks incGroups)
{
Blocks groups = new Blocks();
foreach (var group in blocks)
groups.blocks.Insert(generator.Next(0, groups.blocks.Count), group);
incGroups = groups;
}
}
}

View File

@ -0,0 +1,75 @@
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
namespace Krawk_Protector.Protections.ControlFlow
{
public class CFHelper
{
private static Random generator = new Random();
public bool HasUnsafeInstructions(MethodDef methodDef)
{
if (methodDef.HasBody)
{
if (methodDef.Body.HasVariables)
return methodDef.Body.Variables.Any(x => x.Type.IsPointer);
}
return false;
}
public Blocks GetBlocks(MethodDef method)
{
Blocks blocks = new Blocks();
Block block = new Block();
int Id = 0;
int usage = 0;
block.ID = Id;
Id++;
block.nextBlock = block.ID + 1;
block.instructions.Add(Instruction.Create(OpCodes.Nop));
blocks.blocks.Add(block);
block = new Block();
foreach (Instruction instruction in method.Body.Instructions)
{
int pops = 0;
int stacks;
instruction.CalculateStackUsage(out stacks, out pops);
block.instructions.Add(instruction);
usage += stacks - pops;
if (stacks == 0)
{
if (instruction.OpCode != OpCodes.Nop)
{
if (usage == 0 || instruction.OpCode == OpCodes.Ret)
{
block.ID = Id;
Id++;
block.nextBlock = block.ID + 1;
blocks.blocks.Add(block);
block = new Block();
}
}
}
}
return blocks;
}
public List<Instruction> Calc(int value)
{
List<Instruction> instructions = new List<Instruction>();
int num = generator.Next(0,10000);
bool once = Convert.ToBoolean(generator.Next(10000));
int num1 = generator.Next(10000);
instructions.Add(Instruction.Create(OpCodes.Ldc_I4, value - num + (once ? (0 - num1) : num1)));
instructions.Add(Instruction.Create(OpCodes.Ldc_I4, num));
instructions.Add(Instruction.Create(OpCodes.Add));
instructions.Add(Instruction.Create(OpCodes.Ldc_I4, num1));
instructions.Add(Instruction.Create(once ? OpCodes.Add : OpCodes.Sub));
return instructions;
}
}
}

View File

@ -0,0 +1,195 @@
using Krawk_Protector.Utils;
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Krawk_Protector.Utils;
namespace Krawk_Protector.Protections.ControlFlow
{
public class ControlFlow : IProtector
{
string IProtector.Name => "ControlFlow";
void IProtector.InjectPhase(Context krawk) { }
void IProtector.ProtectionPhase(Context mode)
{
Executer(mode, mode);
}
void Executer(Context mode, Context krawk)
{
CFHelper cFHelper = new CFHelper();
foreach (TypeDef type in krawk.ManifestModule.Types)
{
if (type.IsGlobalModuleType) continue;
foreach (MethodDef method in type.Methods)
{
if (method.HasBody && method.Body.Instructions.Count > 0 && !method.IsConstructor)
{
if (!cFHelper.HasUnsafeInstructions(method))
{
if (DnlibUtils.Simplify(method))
{
Blocks blocks = cFHelper.GetBlocks(method);
if (blocks.blocks.Count != 1)
{
toDoBody(cFHelper, method, blocks, krawk);
}
}
DnlibUtils.Optimize(method);
}
}
}
}
}
void toDoBody(CFHelper cFHelper, MethodDef method, Blocks blocks, Context pandaContext)
{
blocks.Scramble(out blocks);
method.Body.Instructions.Clear();
Local local = new Local(pandaContext.ManifestModule.CorLibTypes.Int32);
method.Body.Variables.Add(local);
Instruction target = Instruction.Create(OpCodes.Nop);
Instruction instr = Instruction.Create(OpCodes.Br, target);
foreach (Instruction instruction in cFHelper.Calc(0))
method.Body.Instructions.Add(instruction);
method.Body.Instructions.Add(Instruction.Create(OpCodes.Stloc, local));
method.Body.Instructions.Add(Instruction.Create(OpCodes.Br, instr));
method.Body.Instructions.Add(target);
foreach (Block block in blocks.blocks)
{
if (block != blocks.getBlock((blocks.blocks.Count - 1)))
{
method.Body.Instructions.Add(Instruction.Create(OpCodes.Ldloc, local));
foreach (Instruction instruction in cFHelper.Calc(block.ID))
method.Body.Instructions.Add(instruction);
method.Body.Instructions.Add(Instruction.Create(OpCodes.Ceq));
Instruction instruction4 = Instruction.Create(OpCodes.Nop);
method.Body.Instructions.Add(Instruction.Create(OpCodes.Brfalse, instruction4));
foreach (Instruction instruction in block.instructions)
method.Body.Instructions.Add(instruction);
foreach (Instruction instruction in cFHelper.Calc(block.nextBlock))
method.Body.Instructions.Add(instruction);
method.Body.Instructions.Add(Instruction.Create(OpCodes.Stloc, local));
method.Body.Instructions.Add(instruction4);
}
}
method.Body.Instructions.Add(Instruction.Create(OpCodes.Ldloc, local));
foreach (Instruction instruction in cFHelper.Calc(blocks.blocks.Count - 1))
method.Body.Instructions.Add(instruction);
method.Body.Instructions.Add(Instruction.Create(OpCodes.Ceq));
method.Body.Instructions.Add(Instruction.Create(OpCodes.Brfalse, instr));
method.Body.Instructions.Add(Instruction.Create(OpCodes.Br, blocks.getBlock((blocks.blocks.Count - 1)).instructions[0]));
method.Body.Instructions.Add(instr);
foreach (Instruction lastBlock in blocks.getBlock((blocks.blocks.Count - 1)).instructions)
method.Body.Instructions.Add(lastBlock);
}
}
public class ObfuscationMethodUtil
{
public static bool canObfuscate(MethodDef methodDef)
{
if (!methodDef.HasBody)
return false;
if (!methodDef.Body.HasInstructions)
return false;
if (methodDef.DeclaringType.IsGlobalModuleType)
return false;
return true;
}
}
class DnlibUtils
{
public static IEnumerable<IDnlibDef> FindDefinitions(ModuleDef module)
{
yield return module;
foreach (TypeDef type in module.GetTypes())
{
yield return type;
foreach (MethodDef method in type.Methods)
yield return method;
foreach (FieldDef field in type.Fields)
yield return field;
foreach (PropertyDef prop in type.Properties)
yield return prop;
foreach (EventDef evt in type.Events)
yield return evt;
}
}
public static IEnumerable<IDnlibDef> FindDefinitions(TypeDef typeDef)
{
yield return typeDef;
foreach (TypeDef nestedType in typeDef.NestedTypes)
yield return nestedType;
foreach (MethodDef method in typeDef.Methods)
yield return method;
foreach (FieldDef field in typeDef.Fields)
yield return field;
foreach (PropertyDef prop in typeDef.Properties)
yield return prop;
foreach (EventDef evt in typeDef.Events)
yield return evt;
}
public static bool IsDelegate(TypeDef type)
{
if (type.BaseType == null)
return false;
string fullName = type.BaseType.FullName;
return fullName == "System.Delegate" || fullName == "System.MulticastDelegate";
}
public static bool HasInstructions(MethodDef method)
{
if (method == null)
new ArgumentNullException("method is null");
if (method.Body.HasInstructions)
return true;
else
return false;
}
public static bool HasVariables(MethodDef method)
{
if (method == null)
new ArgumentNullException("method is null");
if (method.Body.HasVariables)
return true;
else
return false;
}
public static bool Simplify(MethodDef methodDef)
{
if (methodDef.Parameters == null)
return false;
methodDef.Body.SimplifyMacros(methodDef.Parameters);
return true;
}
public static bool Optimize(MethodDef methodDef)
{
if (methodDef.Body == null)
return false;
methodDef.Body.OptimizeMacros();
methodDef.Body.OptimizeBranches();
return true;
}
public static bool hasExceptionHandlers(MethodDef methodDef)
{
if (methodDef.Body.HasExceptionHandlers)
return true;
return false;
}
}
}

View File

@ -0,0 +1,99 @@
using BMDevs.Runtime;
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using System.Collections.Generic;
using System.Linq;
namespace BMDevs.ControlFlow
{
public class ControlFlowObfuscation : IObfuscation
{
public ModuleDef Module { get; set; }
public void Execute(ModuleDefMD md)
{
Module = md;
for (int x = 0; x < md.Types.Count; x++)
{
var tDef = md.Types[x];
if (tDef != md.GlobalType)
for (int i = 0; i < tDef.Methods.Count; i++)
{
var mDef = tDef.Methods[i];
if (!mDef.Name.StartsWith("get_") && !mDef.Name.StartsWith("set_"))
{
if (!mDef.HasBody || mDef.IsConstructor) continue;
mDef.Body.SimplifyBranches();
ExecuteMethod(mDef);
}
}
}
}
public void ExecuteMethod(MethodDef method)
{
method.Body.SimplifyMacros(method.Parameters);
List<Block> blocks = BlockParser.ParseMethod(method);
blocks = Randomize(blocks);
method.Body.Instructions.Clear();
Local local = new Local(Module.CorLibTypes.Int32);
method.Body.Variables.Add(local);
Instruction target = Instruction.Create(OpCodes.Nop);
Instruction instr = Instruction.Create(OpCodes.Br, target);
foreach (Instruction instruction in Calc(0))
method.Body.Instructions.Add(instruction);
method.Body.Instructions.Add(Instruction.Create(OpCodes.Stloc, local));
method.Body.Instructions.Add(Instruction.Create(OpCodes.Br, instr));
method.Body.Instructions.Add(target);
foreach (Block block in blocks)
{
if (block != blocks.Single(x => x.Number == blocks.Count - 1))
{
method.Body.Instructions.Add(Instruction.Create(OpCodes.Ldloc, local));
foreach (Instruction instruction in Calc(block.Number))
method.Body.Instructions.Add(instruction);
method.Body.Instructions.Add(Instruction.Create(OpCodes.Ceq));
Instruction instruction4 = Instruction.Create(OpCodes.Nop);
method.Body.Instructions.Add(Instruction.Create(OpCodes.Brfalse, instruction4));
foreach (Instruction instruction in block.Instructions)
method.Body.Instructions.Add(instruction);
foreach (Instruction instruction in Calc(block.Number + 1))
method.Body.Instructions.Add(instruction);
method.Body.Instructions.Add(Instruction.Create(OpCodes.Stloc, local));
method.Body.Instructions.Add(instruction4);
}
}
method.Body.Instructions.Add(Instruction.Create(OpCodes.Ldloc, local));
foreach (Instruction instruction in Calc(blocks.Count - 1))
method.Body.Instructions.Add(instruction);
method.Body.Instructions.Add(Instruction.Create(OpCodes.Ceq));
method.Body.Instructions.Add(Instruction.Create(OpCodes.Brfalse, instr));
method.Body.Instructions.Add(Instruction.Create(OpCodes.Br, blocks.Single(x => x.Number == blocks.Count - 1).Instructions[0]));
method.Body.Instructions.Add(instr);
foreach (Instruction lastBlock in blocks.Single(x => x.Number == blocks.Count - 1).Instructions)
method.Body.Instructions.Add(lastBlock);
}
public List<Block> Randomize(List<Block> input)
{
List<Block> ret = new List<Block>();
foreach (var group in input)
ret.Insert(RuntimeHelper.Random.Next(0, ret.Count), group);
return ret;
}
public List<Instruction> Calc(int value)
{
List<Instruction> instructions = new List<Instruction>();
instructions.Add(Instruction.Create(OpCodes.Ldc_I4, value));
return instructions;
}
public void AddJump(IList<Instruction> instrs, Instruction target)
{
instrs.Add(Instruction.Create(OpCodes.Br, target));
}
}
}

View File

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using dnlib.DotNet;
namespace BMDevs
{
public class HiddenNamespace : IObfuscation
{
public void Execute(ModuleDefMD md)
{
foreach (var type in md.Types)
{
type.Namespace = "";
}
}
}
}

View File

@ -0,0 +1,72 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BMDevs.Runtime;
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using static BMDevs.Renamer;
namespace BMDevs.Protections
{
public class JunkProtection : IObfuscation
{
public void Execute(ModuleDefMD md)
{
List<uint> junkclasses = new List<uint>();
int classnumber = RuntimeHelper.Random.Next(30, 100);
for (int i = 0; i < classnumber; i++)
{
TypeDefUser newtype = new TypeDefUser(Renamer.GetEndName(RenameMode.Invalid2, 3), Renamer.GetEndName(RenameMode.Invalid2, 3));
//TypeDefUser newtype = new TypeDefUser(Renamer.GetEndName(RenameMode.Base64, 3), Renamer.GetEndName(RenameMode.Base64, 3));
md.Types.Add(newtype);
int methodcount = RuntimeHelper.Random.Next(10, 30);
for (int x = 0; x < methodcount; x++)
{
MethodDefUser newmethod = new MethodDefUser(Renamer.GetEndName(RenameMode.Invalid2, 3), new MethodSig(CallingConvention.Default, 0, md.CorLibTypes.Void), MethodAttributes.Public | MethodAttributes.Static);
//MethodDefUser newmethod = new MethodDefUser(Renamer.GetEndName(RenameMode.Base64, 3), new MethodSig(CallingConvention.Default, 0, md.CorLibTypes.Void), MethodAttributes.Public | MethodAttributes.Static);
newtype.Methods.Add(newmethod);
newmethod.Body = new CilBody();
int localcount = RuntimeHelper.Random.Next(5, 15);
for (int j = 0; j < localcount; j++)
{
Local lcl = new Local(md.CorLibTypes.Int32);
newmethod.Body.Variables.Add(lcl);
//newmethod.Body.Instructions.Add(new Instruction(OpCodes.Ldc_I4, Renamer.GetEndName(RenameMode.Invalid2, 3)));
newmethod.Body.Instructions.Add(new Instruction(OpCodes.Ldc_I4, RuntimeHelper.Random.Next()));
newmethod.Body.Instructions.Add(new Instruction(OpCodes.Stloc, lcl));
}
newmethod.Body.Instructions.Add(new Instruction(OpCodes.Ret));
}
junkclasses.Add(newtype.Rid);
}
Console.WriteLine($"Added {classnumber} junk classes.");
foreach (var type in md.Types)
{
if (!junkclasses.Contains(type.Rid))
{
int methodcount = RuntimeHelper.Random.Next(10, 30);
for (int x = 0; x < methodcount; x++)
{
MethodDefUser newmethod = new MethodDefUser(Renamer.GetEndName(RenameMode.Invalid2, 3), new MethodSig(CallingConvention.Default, 0, md.CorLibTypes.Void), MethodAttributes.Public | MethodAttributes.Static);
//MethodDefUser newmethod = new MethodDefUser(Renamer.GetEndName(RenameMode.Base64, 3), new MethodSig(CallingConvention.Default, 0, md.CorLibTypes.Void), MethodAttributes.Public | MethodAttributes.Static);
type.Methods.Add(newmethod);
newmethod.Body = new CilBody();
int localcount = RuntimeHelper.Random.Next(5, 15);
for (int j = 0; j < localcount; j++)
{
Local lcl = new Local(md.CorLibTypes.Int32);
newmethod.Body.Variables.Add(lcl);
newmethod.Body.Instructions.Add(new Instruction(OpCodes.Ldc_I4, RuntimeHelper.Random.Next()));
newmethod.Body.Instructions.Add(new Instruction(OpCodes.Stloc, lcl));
}
newmethod.Body.Instructions.Add(new Instruction(OpCodes.Ret));
}
}
}
}
}
}

View File

@ -0,0 +1,118 @@
using Krawk_Protector.Protections.Math.Functions;
using Krawk_Protector.Protections.Math.Utils;
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Krawk_Protector.Utils;
namespace Krawk_Protector.Protections.Math
{
public class MathProtection : IProtector
{
string IProtector.Name => "MathProtection";
void IProtector.InjectPhase(Context krawk) { }
void IProtector.ProtectionPhase(Context krawk)
{
Generator.Generator generator = new Generator.Generator();
foreach (TypeDef tDef in krawk.ManifestModule.Types)
{
foreach (MethodDef mDef in tDef.Methods)
{
if (!mDef.HasBody) continue;
for (int i = 0; i < mDef.Body.Instructions.Count; i++)
{
if (ArithmeticUtils.CheckArithmetic(mDef.Body.Instructions[i]))
{
if (mDef.Body.Instructions[i].GetLdcI4Value() < 0)
{
iFunction iFunction = Tasks[generator.Next(5)];
List<Instruction> lstInstr = GenerateBody(iFunction.Arithmetic(mDef.Body.Instructions[i], krawk.ManifestModule), krawk);
if (lstInstr == null) continue;
mDef.Body.Instructions[i].OpCode = OpCodes.Nop;
foreach (Instruction instr in lstInstr)
{
mDef.Body.Instructions.Insert(i + 1, instr);
i++;
}
}
else
{
iFunction iFunction = Tasks[generator.Next(Tasks.Count)];
List<Instruction> lstInstr = GenerateBody(iFunction.Arithmetic(mDef.Body.Instructions[i], krawk.ManifestModule),krawk);
if (lstInstr == null) continue;
mDef.Body.Instructions[i].OpCode = OpCodes.Nop;
foreach (Instruction instr in lstInstr)
{
mDef.Body.Instructions.Insert(i + 1, instr);
i++;
}
}
}
}
}
}
}
private static List<iFunction> Tasks = new List<iFunction>()
{
new Add(),
new Sub(),
new Div(),
new Mul(),
new Xor(),
new Functions.Maths.Abs(),
new Functions.Maths.Log(),
new Functions.Maths.Log10(),
new Functions.Maths.Sin(),
new Functions.Maths.Cos(),
new Functions.Maths.Floor(),
new Functions.Maths.Round(),
new Functions.Maths.Tan(),
new Functions.Maths.Tanh(),
new Functions.Maths.Sqrt(),
new Functions.Maths.Ceiling(),
new Functions.Maths.Truncate()
};
private static List<Instruction> GenerateBody(ArithmeticVT arithmeticVTs, Context Krawk)
{
List<Instruction> instructions = new List<Instruction>();
if (IsArithmetic(arithmeticVTs.GetArithmetic()))
{
instructions.Add(new Instruction(OpCodes.Ldc_R8, arithmeticVTs.GetValue().GetX()));
instructions.Add(new Instruction(OpCodes.Ldc_R8, arithmeticVTs.GetValue().GetY()));
if (arithmeticVTs.GetToken().GetOperand() != null)
{
instructions.Add(new Instruction(OpCodes.Call, arithmeticVTs.GetToken().GetOperand()));
}
instructions.Add(new Instruction(arithmeticVTs.GetToken().GetOpCode()));
instructions.Add(new Instruction(OpCodes.Call, Krawk.ManifestModule.Import(typeof(Convert).GetMethod("ToInt32", new Type[] { typeof(double) }))));
//instructions.Add(new Instruction(OpCodes.Conv_I4));
}
else if (IsXor(arithmeticVTs.GetArithmetic()))
{
instructions.Add(new Instruction(OpCodes.Ldc_I4, (int)arithmeticVTs.GetValue().GetX()));
instructions.Add(new Instruction(OpCodes.Ldc_I4, (int)arithmeticVTs.GetValue().GetY()));
instructions.Add(new Instruction(arithmeticVTs.GetToken().GetOpCode()));
instructions.Add(new Instruction(OpCodes.Conv_I4));
}
return instructions;
}
private static bool IsArithmetic(ArithmeticTypes arithmetic)
{
return arithmetic == ArithmeticTypes.Add || arithmetic == ArithmeticTypes.Sub || arithmetic == ArithmeticTypes.Div || arithmetic == ArithmeticTypes.Mul ||
arithmetic == ArithmeticTypes.Abs || arithmetic == ArithmeticTypes.Log || arithmetic == ArithmeticTypes.Log10 || arithmetic == ArithmeticTypes.Truncate ||
arithmetic == ArithmeticTypes.Sin || arithmetic == ArithmeticTypes.Cos || arithmetic == ArithmeticTypes.Floor || arithmetic == ArithmeticTypes.Round ||
arithmetic == ArithmeticTypes.Tan || arithmetic == ArithmeticTypes.Tanh || arithmetic == ArithmeticTypes.Sqrt || arithmetic == ArithmeticTypes.Ceiling;
}
private static bool IsXor(ArithmeticTypes arithmetic)
{
return arithmetic == ArithmeticTypes.Xor;
}
}
}

View File

@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Krawk_Protector.Protections.Math.Utils;
using dnlib.DotNet;
using dnlib.DotNet.Emit;
namespace Krawk_Protector.Protections.Math.Functions
{
public class Add : iFunction
{
public override ArithmeticTypes ArithmeticTypes => ArithmeticTypes.Add;
public override ArithmeticVT Arithmetic(Instruction instruction, ModuleDef module)
{
Generator.Generator generator = new Generator.Generator();
if (!ArithmeticUtils.CheckArithmetic(instruction)) return null;
ArithmeticEmulator arithmeticEmulator = new ArithmeticEmulator(instruction.GetLdcI4Value(), ArithmeticUtils.GetY(instruction.GetLdcI4Value()), ArithmeticTypes);
return (new ArithmeticVT(new Value(arithmeticEmulator.GetValue(), arithmeticEmulator.GetY()), new Token(OpCodes.Add), ArithmeticTypes));
}
}
}

View File

@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Krawk_Protector.Protections.Math.Utils;
using dnlib.DotNet;
using dnlib.DotNet.Emit;
namespace Krawk_Protector.Protections.Math.Functions
{
public class Div : iFunction
{
public override ArithmeticTypes ArithmeticTypes => ArithmeticTypes.Div;
public override ArithmeticVT Arithmetic(Instruction instruction, ModuleDef module)
{
Generator.Generator generator = new Generator.Generator();
if (!ArithmeticUtils.CheckArithmetic(instruction)) return null;
ArithmeticEmulator arithmeticEmulator = new ArithmeticEmulator(instruction.GetLdcI4Value(), ArithmeticUtils.GetY(instruction.GetLdcI4Value()), ArithmeticTypes);
return (new ArithmeticVT(new Value(arithmeticEmulator.GetValue(), arithmeticEmulator.GetY()), new Token(OpCodes.Div), ArithmeticTypes));
}
}
}

View File

@ -0,0 +1,24 @@
using Krawk_Protector.Protections.Math.Utils;
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Krawk_Protector.Protections.Math.Functions.Maths
{
public class Abs : iFunction
{
public override ArithmeticTypes ArithmeticTypes => ArithmeticTypes.Abs;
public override ArithmeticVT Arithmetic(Instruction instruction, ModuleDef module)
{
Generator.Generator generator = new Generator.Generator();
if (!ArithmeticUtils.CheckArithmetic(instruction)) return null;
List<ArithmeticTypes> arithmeticTypes = new List<ArithmeticTypes>() { ArithmeticTypes.Add, ArithmeticTypes.Sub };
ArithmeticEmulator arithmeticEmulator = new ArithmeticEmulator(instruction.GetLdcI4Value(), ArithmeticUtils.GetY(instruction.GetLdcI4Value()), ArithmeticTypes);
return (new ArithmeticVT(new Value(arithmeticEmulator.GetValue(arithmeticTypes), arithmeticEmulator.GetY()), new Token(ArithmeticUtils.GetOpCode(arithmeticEmulator.GetType), module.Import(ArithmeticUtils.GetMethod(ArithmeticTypes))), ArithmeticTypes));
}
}
}

View File

@ -0,0 +1,24 @@
using Krawk_Protector.Protections.Math.Utils;
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Krawk_Protector.Protections.Math.Functions.Maths
{
public class Ceiling : iFunction
{
public override ArithmeticTypes ArithmeticTypes => ArithmeticTypes.Ceiling;
public override ArithmeticVT Arithmetic(Instruction instruction, ModuleDef module)
{
Generator.Generator generator = new Generator.Generator();
if (!ArithmeticUtils.CheckArithmetic(instruction)) return null;
List<ArithmeticTypes> arithmeticTypes = new List<ArithmeticTypes>() { ArithmeticTypes.Add, ArithmeticTypes.Sub };
ArithmeticEmulator arithmeticEmulator = new ArithmeticEmulator(instruction.GetLdcI4Value(), ArithmeticUtils.GetY(instruction.GetLdcI4Value()), ArithmeticTypes);
return (new ArithmeticVT(new Value(arithmeticEmulator.GetValue(arithmeticTypes), arithmeticEmulator.GetY()), new Token(ArithmeticUtils.GetOpCode(arithmeticEmulator.GetType), module.Import(ArithmeticUtils.GetMethod(ArithmeticTypes))), ArithmeticTypes));
}
}
}

View File

@ -0,0 +1,24 @@
using Krawk_Protector.Protections.Math.Utils;
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Krawk_Protector.Protections.Math.Functions.Maths
{
public class Cos : iFunction
{
public override ArithmeticTypes ArithmeticTypes => ArithmeticTypes.Cos;
public override ArithmeticVT Arithmetic(Instruction instruction, ModuleDef module)
{
Generator.Generator generator = new Generator.Generator();
if (!ArithmeticUtils.CheckArithmetic(instruction)) return null;
List<ArithmeticTypes> arithmeticTypes = new List<ArithmeticTypes>() { ArithmeticTypes.Add, ArithmeticTypes.Sub };
ArithmeticEmulator arithmeticEmulator = new ArithmeticEmulator(instruction.GetLdcI4Value(), ArithmeticUtils.GetY(instruction.GetLdcI4Value()), ArithmeticTypes);
return (new ArithmeticVT(new Value(arithmeticEmulator.GetValue(arithmeticTypes), arithmeticEmulator.GetY()), new Token(ArithmeticUtils.GetOpCode(arithmeticEmulator.GetType), module.Import(ArithmeticUtils.GetMethod(ArithmeticTypes))), ArithmeticTypes));
}
}
}

View File

@ -0,0 +1,24 @@
using Krawk_Protector.Protections.Math.Utils;
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Krawk_Protector.Protections.Math.Functions.Maths
{
public class Floor : iFunction
{
public override ArithmeticTypes ArithmeticTypes => ArithmeticTypes.Floor;
public override ArithmeticVT Arithmetic(Instruction instruction, ModuleDef module)
{
Generator.Generator generator = new Generator.Generator();
if (!ArithmeticUtils.CheckArithmetic(instruction)) return null;
List<ArithmeticTypes> arithmeticTypes = new List<ArithmeticTypes>() { ArithmeticTypes.Add, ArithmeticTypes.Sub };
ArithmeticEmulator arithmeticEmulator = new ArithmeticEmulator(instruction.GetLdcI4Value(), ArithmeticUtils.GetY(instruction.GetLdcI4Value()), ArithmeticTypes);
return (new ArithmeticVT(new Value(arithmeticEmulator.GetValue(arithmeticTypes), arithmeticEmulator.GetY()), new Token(ArithmeticUtils.GetOpCode(arithmeticEmulator.GetType), module.Import(ArithmeticUtils.GetMethod(ArithmeticTypes))), ArithmeticTypes));
}
}
}

View File

@ -0,0 +1,24 @@
using Krawk_Protector.Protections.Math.Utils;
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Krawk_Protector.Protections.Math.Functions.Maths
{
public class Log : iFunction
{
public override ArithmeticTypes ArithmeticTypes => ArithmeticTypes.Log;
public override ArithmeticVT Arithmetic(Instruction instruction, ModuleDef module)
{
Generator.Generator generator = new Generator.Generator();
if (!ArithmeticUtils.CheckArithmetic(instruction)) return null;
List<ArithmeticTypes> arithmeticTypes = new List<ArithmeticTypes>() { ArithmeticTypes.Add, ArithmeticTypes.Sub };
ArithmeticEmulator arithmeticEmulator = new ArithmeticEmulator(instruction.GetLdcI4Value(), ArithmeticUtils.GetY(instruction.GetLdcI4Value()), ArithmeticTypes);
return (new ArithmeticVT(new Value(arithmeticEmulator.GetValue(arithmeticTypes), arithmeticEmulator.GetY()), new Token(ArithmeticUtils.GetOpCode(arithmeticEmulator.GetType), module.Import(ArithmeticUtils.GetMethod(ArithmeticTypes))), ArithmeticTypes));
}
}
}

View File

@ -0,0 +1,24 @@
using Krawk_Protector.Protections.Math.Utils;
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Krawk_Protector.Protections.Math.Functions.Maths
{
public class Log10 : iFunction
{
public override ArithmeticTypes ArithmeticTypes => ArithmeticTypes.Log10;
public override ArithmeticVT Arithmetic(Instruction instruction, ModuleDef module)
{
Generator.Generator generator = new Generator.Generator();
if (!ArithmeticUtils.CheckArithmetic(instruction)) return null;
List<ArithmeticTypes> arithmeticTypes = new List<ArithmeticTypes>() { ArithmeticTypes.Add, ArithmeticTypes.Sub };
ArithmeticEmulator arithmeticEmulator = new ArithmeticEmulator(instruction.GetLdcI4Value(), ArithmeticUtils.GetY(instruction.GetLdcI4Value()), ArithmeticTypes);
return (new ArithmeticVT(new Value(arithmeticEmulator.GetValue(arithmeticTypes), arithmeticEmulator.GetY()), new Token(ArithmeticUtils.GetOpCode(arithmeticEmulator.GetType), module.Import(ArithmeticUtils.GetMethod(ArithmeticTypes))), ArithmeticTypes));
}
}
}

View File

@ -0,0 +1,24 @@
using Krawk_Protector.Protections.Math.Utils;
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Krawk_Protector.Protections.Math.Functions.Maths
{
public class Round : iFunction
{
public override ArithmeticTypes ArithmeticTypes => ArithmeticTypes.Round;
public override ArithmeticVT Arithmetic(Instruction instruction, ModuleDef module)
{
Generator.Generator generator = new Generator.Generator();
if (!ArithmeticUtils.CheckArithmetic(instruction)) return null;
List<ArithmeticTypes> arithmeticTypes = new List<ArithmeticTypes>() { ArithmeticTypes.Add, ArithmeticTypes.Sub };
ArithmeticEmulator arithmeticEmulator = new ArithmeticEmulator(instruction.GetLdcI4Value(), ArithmeticUtils.GetY(instruction.GetLdcI4Value()), ArithmeticTypes);
return (new ArithmeticVT(new Value(arithmeticEmulator.GetValue(arithmeticTypes), arithmeticEmulator.GetY()), new Token(ArithmeticUtils.GetOpCode(arithmeticEmulator.GetType), module.Import(ArithmeticUtils.GetMethod(ArithmeticTypes))), ArithmeticTypes));
}
}
}

View File

@ -0,0 +1,24 @@
using Krawk_Protector.Protections.Math.Utils;
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Krawk_Protector.Protections.Math.Functions.Maths
{
public class Sin : iFunction
{
public override ArithmeticTypes ArithmeticTypes => ArithmeticTypes.Sin;
public override ArithmeticVT Arithmetic(Instruction instruction, ModuleDef module)
{
Generator.Generator generator = new Generator.Generator();
if (!ArithmeticUtils.CheckArithmetic(instruction)) return null;
List<ArithmeticTypes> arithmeticTypes = new List<ArithmeticTypes>() { ArithmeticTypes.Add, ArithmeticTypes.Sub };
ArithmeticEmulator arithmeticEmulator = new ArithmeticEmulator(instruction.GetLdcI4Value(), ArithmeticUtils.GetY(instruction.GetLdcI4Value()), ArithmeticTypes);
return (new ArithmeticVT(new Value(arithmeticEmulator.GetValue(arithmeticTypes), arithmeticEmulator.GetY()), new Token(ArithmeticUtils.GetOpCode(arithmeticEmulator.GetType), module.Import(ArithmeticUtils.GetMethod(ArithmeticTypes))), ArithmeticTypes));
}
}
}

View File

@ -0,0 +1,24 @@
using Krawk_Protector.Protections.Math.Utils;
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Krawk_Protector.Protections.Math.Functions.Maths
{
public class Sqrt : iFunction
{
public override ArithmeticTypes ArithmeticTypes => ArithmeticTypes.Sqrt;
public override ArithmeticVT Arithmetic(Instruction instruction, ModuleDef module)
{
Generator.Generator generator = new Generator.Generator();
if (!ArithmeticUtils.CheckArithmetic(instruction)) return null;
List<ArithmeticTypes> arithmeticTypes = new List<ArithmeticTypes>() { ArithmeticTypes.Add, ArithmeticTypes.Sub };
ArithmeticEmulator arithmeticEmulator = new ArithmeticEmulator(instruction.GetLdcI4Value(), ArithmeticUtils.GetY(instruction.GetLdcI4Value()), ArithmeticTypes);
return (new ArithmeticVT(new Value(arithmeticEmulator.GetValue(arithmeticTypes), arithmeticEmulator.GetY()), new Token(ArithmeticUtils.GetOpCode(arithmeticEmulator.GetType), module.Import(ArithmeticUtils.GetMethod(ArithmeticTypes))), ArithmeticTypes));
}
}
}

View File

@ -0,0 +1,24 @@
using Krawk_Protector.Protections.Math.Utils;
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Krawk_Protector.Protections.Math.Functions.Maths
{
public class Tan : iFunction
{
public override ArithmeticTypes ArithmeticTypes => ArithmeticTypes.Tan;
public override ArithmeticVT Arithmetic(Instruction instruction, ModuleDef module)
{
Generator.Generator generator = new Generator.Generator();
if (!ArithmeticUtils.CheckArithmetic(instruction)) return null;
List<ArithmeticTypes> arithmeticTypes = new List<ArithmeticTypes>() { ArithmeticTypes.Add, ArithmeticTypes.Sub };
ArithmeticEmulator arithmeticEmulator = new ArithmeticEmulator(instruction.GetLdcI4Value(), ArithmeticUtils.GetY(instruction.GetLdcI4Value()), ArithmeticTypes);
return (new ArithmeticVT(new Value(arithmeticEmulator.GetValue(arithmeticTypes), arithmeticEmulator.GetY()), new Token(ArithmeticUtils.GetOpCode(arithmeticEmulator.GetType), module.Import(ArithmeticUtils.GetMethod(ArithmeticTypes))), ArithmeticTypes));
}
}
}

View File

@ -0,0 +1,24 @@
using Krawk_Protector.Protections.Math.Utils;
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Krawk_Protector.Protections.Math.Functions.Maths
{
public class Tanh : iFunction
{
public override ArithmeticTypes ArithmeticTypes => ArithmeticTypes.Tanh;
public override ArithmeticVT Arithmetic(Instruction instruction, ModuleDef module)
{
Generator.Generator generator = new Generator.Generator();
if (!ArithmeticUtils.CheckArithmetic(instruction)) return null;
List<ArithmeticTypes> arithmeticTypes = new List<ArithmeticTypes>() { ArithmeticTypes.Add, ArithmeticTypes.Sub };
ArithmeticEmulator arithmeticEmulator = new ArithmeticEmulator(instruction.GetLdcI4Value(), ArithmeticUtils.GetY(instruction.GetLdcI4Value()), ArithmeticTypes);
return (new ArithmeticVT(new Value(arithmeticEmulator.GetValue(arithmeticTypes), arithmeticEmulator.GetY()), new Token(ArithmeticUtils.GetOpCode(arithmeticEmulator.GetType), module.Import(ArithmeticUtils.GetMethod(ArithmeticTypes))), ArithmeticTypes));
}
}
}

View File

@ -0,0 +1,24 @@
using Krawk_Protector.Protections.Math.Utils;
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Krawk_Protector.Protections.Math.Functions.Maths
{
public class Truncate : iFunction
{
public override ArithmeticTypes ArithmeticTypes => ArithmeticTypes.Truncate;
public override ArithmeticVT Arithmetic(Instruction instruction, ModuleDef module)
{
Generator.Generator generator = new Generator.Generator();
if (!ArithmeticUtils.CheckArithmetic(instruction)) return null;
List<ArithmeticTypes> arithmeticTypes = new List<ArithmeticTypes>() { ArithmeticTypes.Add, ArithmeticTypes.Sub };
ArithmeticEmulator arithmeticEmulator = new ArithmeticEmulator(instruction.GetLdcI4Value(), ArithmeticUtils.GetY(instruction.GetLdcI4Value()), ArithmeticTypes);
return (new ArithmeticVT(new Value(arithmeticEmulator.GetValue(arithmeticTypes), arithmeticEmulator.GetY()), new Token(ArithmeticUtils.GetOpCode(arithmeticEmulator.GetType), module.Import(ArithmeticUtils.GetMethod(ArithmeticTypes))), ArithmeticTypes));
}
}
}

View File

@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Krawk_Protector.Protections.Math.Utils;
using dnlib.DotNet;
using dnlib.DotNet.Emit;
namespace Krawk_Protector.Protections.Math.Functions
{
public class Mul : iFunction
{
public override ArithmeticTypes ArithmeticTypes => ArithmeticTypes.Mul;
public override ArithmeticVT Arithmetic(Instruction instruction, ModuleDef module)
{
Generator.Generator generator = new Generator.Generator();
if (!ArithmeticUtils.CheckArithmetic(instruction)) return null;
ArithmeticEmulator arithmeticEmulator = new ArithmeticEmulator(instruction.GetLdcI4Value(), ArithmeticUtils.GetY(instruction.GetLdcI4Value()), ArithmeticTypes);
return (new ArithmeticVT(new Value(arithmeticEmulator.GetValue(), arithmeticEmulator.GetY()), new Token(OpCodes.Mul), ArithmeticTypes));
}
}
}

View File

@ -0,0 +1,23 @@
using Krawk_Protector.Protections.Math.Utils;
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Krawk_Protector.Protections.Math.Functions
{
public class Sub : iFunction
{
public override ArithmeticTypes ArithmeticTypes => ArithmeticTypes.Sub;
public override ArithmeticVT Arithmetic(Instruction instruction, ModuleDef module)
{
Generator.Generator generator = new Generator.Generator();
if (!ArithmeticUtils.CheckArithmetic(instruction)) return null;
ArithmeticEmulator arithmeticEmulator = new ArithmeticEmulator(instruction.GetLdcI4Value(), ArithmeticUtils.GetY(instruction.GetLdcI4Value()), ArithmeticTypes);
return (new ArithmeticVT(new Value(arithmeticEmulator.GetValue(), arithmeticEmulator.GetY()), new Token(OpCodes.Sub), ArithmeticTypes));
}
}
}

View File

@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Krawk_Protector.Protections.Math.Utils;
using dnlib.DotNet;
using dnlib.DotNet.Emit;
namespace Krawk_Protector.Protections.Math.Functions
{
public class Xor : iFunction
{
public override ArithmeticTypes ArithmeticTypes => ArithmeticTypes.Xor;
public override ArithmeticVT Arithmetic(Instruction instruction, ModuleDef module)
{
Generator.Generator generator = new Generator.Generator();
if (!ArithmeticUtils.CheckArithmetic(instruction)) return null;
ArithmeticEmulator arithmeticEmulator = new ArithmeticEmulator(instruction.GetLdcI4Value(), generator.Next(), ArithmeticTypes);
return (new ArithmeticVT(new Value(arithmeticEmulator.GetValue(), arithmeticEmulator.GetY()), new Token(OpCodes.Xor), ArithmeticTypes));
}
}
}

View File

@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Krawk_Protector.Protections.Math.Generator
{
public class Generator
{
private Random random;
public Generator()
{
random = new Random(Guid.NewGuid().GetHashCode());
}
public int Next()
{
return random.Next(int.MaxValue);
}
public int Next(int value)
{
return random.Next(value);
}
public int Next(int min, int max)
{
return random.Next(min, max);
}
}
}

View File

@ -0,0 +1,231 @@
using dnlib.DotNet;
using dnlib.DotNet.Emit;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Krawk_Protector.Protections.Math
{
public class ArithmeticEmulator
{
private double x;
private double y;
private ArithmeticTypes ArithmeticTypes;
public ArithmeticTypes GetType { get; private set; }
public ArithmeticEmulator(double x, double y, ArithmeticTypes ArithmeticTypes)
{
this.x = x;
this.y = y;
this.ArithmeticTypes = ArithmeticTypes;
}
public double GetValue()
{
switch (ArithmeticTypes)
{
case ArithmeticTypes.Add:
return x - y;
case ArithmeticTypes.Sub:
return x + y;
case ArithmeticTypes.Div:
return x * y;
case ArithmeticTypes.Mul:
return x / y;
case ArithmeticTypes.Xor:
return ((int)x ^ (int)y);
}
return -1;
}
public double GetValue(List<ArithmeticTypes> arithmetics)
{
Generator.Generator generator = new Generator.Generator();
ArithmeticTypes arithmetic = arithmetics[generator.Next(arithmetics.Count)];
GetType = arithmetic;
switch (ArithmeticTypes)
{
case ArithmeticTypes.Abs:
switch (arithmetic)
{
case ArithmeticTypes.Add:
return x + (System.Math.Abs(y) * -1);
case ArithmeticTypes.Sub:
return x - (System.Math.Abs(y) * -1);
}
return -1;
case ArithmeticTypes.Log:
switch (arithmetic)
{
case ArithmeticTypes.Add:
return x - (System.Math.Log(y));
case ArithmeticTypes.Sub:
return x + (System.Math.Log(y));
}
return -1;
case ArithmeticTypes.Log10:
switch (arithmetic)
{
case ArithmeticTypes.Add:
return x - (System.Math.Log10(y));
case ArithmeticTypes.Sub:
return x + (System.Math.Log10(y));
}
return -1;
case ArithmeticTypes.Sin:
switch (arithmetic)
{
case ArithmeticTypes.Add:
return x - (System.Math.Sin(y));
case ArithmeticTypes.Sub:
return x + (System.Math.Sin(y));
}
return -1;
case ArithmeticTypes.Cos:
switch (arithmetic)
{
case ArithmeticTypes.Add:
return x - (System.Math.Cos(y));
case ArithmeticTypes.Sub:
return x + (System.Math.Cos(y));
}
return -1;
case ArithmeticTypes.Floor:
switch (arithmetic)
{
case ArithmeticTypes.Add:
return x - (System.Math.Floor(y));
case ArithmeticTypes.Sub:
return x + (System.Math.Floor(y));
}
return -1;
case ArithmeticTypes.Round:
switch (arithmetic)
{
case ArithmeticTypes.Add:
return x - (System.Math.Round(y));
case ArithmeticTypes.Sub:
return x + (System.Math.Round(y));
}
return -1;
case ArithmeticTypes.Tan:
switch (arithmetic)
{
case ArithmeticTypes.Add:
return x - (System.Math.Tan(y));
case ArithmeticTypes.Sub:
return x + (System.Math.Tan(y));
}
return -1;
case ArithmeticTypes.Tanh:
switch (arithmetic)
{
case ArithmeticTypes.Add:
return x - (System.Math.Tanh(y));
case ArithmeticTypes.Sub:
return x + (System.Math.Tanh(y));
}
return -1;
case ArithmeticTypes.Sqrt:
switch (arithmetic)
{
case ArithmeticTypes.Add:
return x - (System.Math.Sqrt(y));
case ArithmeticTypes.Sub:
return x + (System.Math.Sqrt(y));
}
return -1;
case ArithmeticTypes.Ceiling:
switch (arithmetic)
{
case ArithmeticTypes.Add:
return x - (System.Math.Ceiling(y));
case ArithmeticTypes.Sub:
return x + (System.Math.Ceiling(y));
}
return -1;
case ArithmeticTypes.Truncate:
switch (arithmetic)
{
case ArithmeticTypes.Add:
return x - (System.Math.Truncate(y));
case ArithmeticTypes.Sub:
return x + (System.Math.Truncate(y));
}
return -1;
}
return -1;
}
public double GetX() => x;
public double GetY() => y;
}
public enum ArithmeticTypes
{
Add, // +
Sub, // -
Div, // /
Mul, // *
Xor, // ^
Abs, // -1
Log, //
Log10,
Sin,
Cos,
Round,
Sqrt,
Ceiling,
Floor,
Tan,
Tanh,
Truncate
}
public class ArithmeticVT
{
private Value value;
private Token token;
private ArithmeticTypes arithmeticTypes;
public ArithmeticVT(Value value, Token token, ArithmeticTypes arithmeticTypes)
{
this.value = value;
this.token = token;
this.arithmeticTypes = arithmeticTypes;
}
public Value GetValue() => value;
public Token GetToken() => token;
public ArithmeticTypes GetArithmetic() => arithmeticTypes;
}
public abstract class iFunction
{
public abstract ArithmeticTypes ArithmeticTypes { get; }
public abstract ArithmeticVT Arithmetic(Instruction instruction, ModuleDef module);
}
public class Value
{
private double x;
private double y;
public Value(double x, double y)
{
this.x = x;
this.y = y;
}
public double GetX() => x;
public double GetY() => y;
}
public class Token
{
private OpCode opCode;
private object Operand;
public Token(OpCode opCode, object Operand)
{
this.opCode = opCode;
this.Operand = Operand;
}
public Token(OpCode opCode)
{
this.opCode = opCode;
this.Operand = null;
}
public OpCode GetOpCode() => opCode;
public object GetOperand() => Operand;
}
}

Some files were not shown because too many files have changed in this diff Show More