├── Unity3DObfuscator.sln └── Unity3DObfuscator ├── AntiILDasmClass.cs ├── AntiTamperingClass.cs ├── App.config ├── ExcludeStringsForm.Designer.cs ├── ExcludeStringsForm.cs ├── ExcludeStringsForm.resx ├── ExcludeTypesForm.Designer.cs ├── ExcludeTypesForm.cs ├── ExcludeTypesForm.resx ├── Exclusion.cs ├── GlobalStrings.cs ├── HelpForm.Designer.cs ├── HelpForm.cs ├── HelpForm.resx ├── InjectHelper.cs ├── MainClass.cs ├── MainForm.Designer.cs ├── MainForm.cs ├── MainForm.resx ├── ObfuscationSettings.cs ├── ObfuscatorHelp.cs ├── Program.cs ├── Properties ├── AssemblyInfo.cs ├── Resources.Designer.cs ├── Resources.resx ├── Settings.Designer.cs └── Settings.settings ├── RenamingClass.cs ├── StringDecryptionHelper.cs ├── StringEncoding.cs ├── StringEncryptionClass.cs ├── Unity3DObfuscator.csproj ├── Watermarking.cs ├── bin └── Debug │ ├── Unity3DObfuscator.exe │ ├── Unity3DObfuscator.exe.config │ ├── Unity3DObfuscator.pdb │ └── dnlib.dll ├── clsNeoBuxTheme.cs ├── dnlib.dll └── obj └── Debug ├── CoreCompileInputs.cache ├── DesignTimeResolveAssemblyReferences.cache ├── DesignTimeResolveAssemblyReferencesInput.cache ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs ├── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs ├── Unity3DObfuscator.ExcludeStringsForm.resources ├── Unity3DObfuscator.ExcludeTypesForm.resources ├── Unity3DObfuscator.HelpForm.resources ├── Unity3DObfuscator.MainForm.resources ├── Unity3DObfuscator.Properties.Resources.resources ├── Unity3DObfuscator.csproj.FileListAbsolute.txt ├── Unity3DObfuscator.csproj.GenerateResource.Cache ├── Unity3DObfuscator.csprojResolveAssemblyReference.cache ├── Unity3DObfuscator.exe └── Unity3DObfuscator.pdb /Unity3DObfuscator.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.26228.9 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Unity3DObfuscator", "Unity3DObfuscator\Unity3DObfuscator.csproj", "{65485E2B-FA14-4F59-BDE7-F4F3E7909321}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {65485E2B-FA14-4F59-BDE7-F4F3E7909321}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {65485E2B-FA14-4F59-BDE7-F4F3E7909321}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {65485E2B-FA14-4F59-BDE7-F4F3E7909321}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {65485E2B-FA14-4F59-BDE7-F4F3E7909321}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /Unity3DObfuscator/AntiILDasmClass.cs: -------------------------------------------------------------------------------- 1 | using dnlib.DotNet; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace Unity3DObfuscator 9 | { 10 | public class AntiILDasmClass 11 | { 12 | // AntiILDasm class. 13 | // Credit: The original function is from the ConfuserEx project. 14 | public void Execute() 15 | { 16 | if(!MainClass.Settings.AntiILDasm) 17 | { 18 | return; 19 | } 20 | TypeRef tRef = MainClass.MainModule.CorLibTypes.GetTypeRef("System.Runtime.CompilerServices", "SuppressIldasmAttribute"); 21 | MemberRefUser ctor = new MemberRefUser(MainClass.MainModule, ".ctor", MethodSig.CreateInstance(MainClass.MainModule.CorLibTypes.Void), tRef); 22 | CustomAttribute attribute = new CustomAttribute(ctor); 23 | if(MainClass.MainModule.CustomAttributes.Contains(attribute)) 24 | { 25 | return; 26 | } 27 | MainClass.MainModule.CustomAttributes.Add(attribute); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Unity3DObfuscator/AntiTamperingClass.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Unity3DObfuscator 8 | { 9 | public class AntiTamperingClass 10 | { 11 | //Anti tampering class. 12 | public void ExecuteAntiTampering() 13 | { 14 | if(!MainClass.Settings.AntiTampering) 15 | { 16 | return; 17 | } 18 | string typeName = "╬.☻♥♦♣♠•◘○"; 19 | string value = GlobalStrings.RandomString; 20 | Watermarking.AddCustomAttributeToAssembly(string.Empty, typeName, value); 21 | Watermarking.RemoveAttributeType(typeName); 22 | //The way the anti tampering works is by adding a custom attribute and removing its type directly from the assembly instead of deleting the attribute from the assembly first. 23 | //WARNING! Anti tampering may not work in some assemblies. 24 | //I figured this method by accident, lol! 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Unity3DObfuscator/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Unity3DObfuscator/ExcludeStringsForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace Unity3DObfuscator 2 | { 3 | partial class ExcludeStringsForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.StringsList = new System.Windows.Forms.ListBox(); 32 | this.MainTheme = new FormSkin.clsNeoBuxTheme(); 33 | this.label4 = new System.Windows.Forms.Label(); 34 | this.label3 = new System.Windows.Forms.Label(); 35 | this.SearchExcludedStringsTxt = new System.Windows.Forms.TextBox(); 36 | this.label2 = new System.Windows.Forms.Label(); 37 | this.ExcludedStringsList = new System.Windows.Forms.ListBox(); 38 | this.SearchStringsTxt = new System.Windows.Forms.TextBox(); 39 | this.label1 = new System.Windows.Forms.Label(); 40 | this.CloseBtn = new FormSkin.clsButtonPurple(); 41 | this.RemoveBtn = new FormSkin.clsButtonOrange(); 42 | this.AddBtn = new FormSkin.clsButtonGreen(); 43 | this.MainTheme.SuspendLayout(); 44 | this.SuspendLayout(); 45 | // 46 | // StringsList 47 | // 48 | this.StringsList.FormattingEnabled = true; 49 | this.StringsList.ItemHeight = 15; 50 | this.StringsList.Location = new System.Drawing.Point(3, 65); 51 | this.StringsList.Name = "StringsList"; 52 | this.StringsList.Size = new System.Drawing.Size(370, 334); 53 | this.StringsList.TabIndex = 5; 54 | // 55 | // MainTheme 56 | // 57 | this.MainTheme.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(239)))), ((int)(((byte)(239)))), ((int)(((byte)(242))))); 58 | this.MainTheme.BorderStyle = System.Windows.Forms.FormBorderStyle.None; 59 | this.MainTheme.Controls.Add(this.label4); 60 | this.MainTheme.Controls.Add(this.label3); 61 | this.MainTheme.Controls.Add(this.SearchExcludedStringsTxt); 62 | this.MainTheme.Controls.Add(this.label2); 63 | this.MainTheme.Controls.Add(this.ExcludedStringsList); 64 | this.MainTheme.Controls.Add(this.SearchStringsTxt); 65 | this.MainTheme.Controls.Add(this.label1); 66 | this.MainTheme.Controls.Add(this.StringsList); 67 | this.MainTheme.Controls.Add(this.CloseBtn); 68 | this.MainTheme.Controls.Add(this.RemoveBtn); 69 | this.MainTheme.Controls.Add(this.AddBtn); 70 | this.MainTheme.Customization = "AAAA/w=="; 71 | this.MainTheme.Dock = System.Windows.Forms.DockStyle.Fill; 72 | this.MainTheme.Font = new System.Drawing.Font("Segoe UI", 9F); 73 | this.MainTheme.Image = null; 74 | this.MainTheme.Location = new System.Drawing.Point(0, 0); 75 | this.MainTheme.Movable = true; 76 | this.MainTheme.Name = "MainTheme"; 77 | this.MainTheme.NoRounding = false; 78 | this.MainTheme.Sizable = false; 79 | this.MainTheme.Size = new System.Drawing.Size(754, 478); 80 | this.MainTheme.SmartBounds = true; 81 | this.MainTheme.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 82 | this.MainTheme.TabIndex = 1; 83 | this.MainTheme.Text = "Exclude Strings"; 84 | this.MainTheme.TransparencyKey = System.Drawing.Color.Fuchsia; 85 | this.MainTheme.Transparent = false; 86 | // 87 | // label4 88 | // 89 | this.label4.AutoSize = true; 90 | this.label4.Location = new System.Drawing.Point(379, 49); 91 | this.label4.Name = "label4"; 92 | this.label4.Size = new System.Drawing.Size(96, 15); 93 | this.label4.TabIndex = 12; 94 | this.label4.Text = "Excluded Strings:"; 95 | // 96 | // label3 97 | // 98 | this.label3.AutoSize = true; 99 | this.label3.Location = new System.Drawing.Point(3, 47); 100 | this.label3.Name = "label3"; 101 | this.label3.Size = new System.Drawing.Size(46, 15); 102 | this.label3.TabIndex = 11; 103 | this.label3.Text = "Strings:"; 104 | // 105 | // SearchExcludedStringsTxt 106 | // 107 | this.SearchExcludedStringsTxt.Location = new System.Drawing.Point(607, 41); 108 | this.SearchExcludedStringsTxt.Name = "SearchExcludedStringsTxt"; 109 | this.SearchExcludedStringsTxt.Size = new System.Drawing.Size(144, 23); 110 | this.SearchExcludedStringsTxt.TabIndex = 10; 111 | this.SearchExcludedStringsTxt.TextChanged += new System.EventHandler(this.SearchExcludedStringsTxt_TextChanged); 112 | // 113 | // label2 114 | // 115 | this.label2.AutoSize = true; 116 | this.label2.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 117 | this.label2.Location = new System.Drawing.Point(545, 42); 118 | this.label2.Name = "label2"; 119 | this.label2.Size = new System.Drawing.Size(60, 21); 120 | this.label2.TabIndex = 9; 121 | this.label2.Text = "Search:"; 122 | // 123 | // ExcludedStringsList 124 | // 125 | this.ExcludedStringsList.FormattingEnabled = true; 126 | this.ExcludedStringsList.ItemHeight = 15; 127 | this.ExcludedStringsList.Location = new System.Drawing.Point(381, 65); 128 | this.ExcludedStringsList.Name = "ExcludedStringsList"; 129 | this.ExcludedStringsList.Size = new System.Drawing.Size(370, 334); 130 | this.ExcludedStringsList.TabIndex = 8; 131 | // 132 | // SearchStringsTxt 133 | // 134 | this.SearchStringsTxt.Location = new System.Drawing.Point(229, 41); 135 | this.SearchStringsTxt.Name = "SearchStringsTxt"; 136 | this.SearchStringsTxt.Size = new System.Drawing.Size(144, 23); 137 | this.SearchStringsTxt.TabIndex = 7; 138 | this.SearchStringsTxt.TextChanged += new System.EventHandler(this.SearchStringsTxt_TextChanged); 139 | // 140 | // label1 141 | // 142 | this.label1.AutoSize = true; 143 | this.label1.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 144 | this.label1.Location = new System.Drawing.Point(167, 42); 145 | this.label1.Name = "label1"; 146 | this.label1.Size = new System.Drawing.Size(60, 21); 147 | this.label1.TabIndex = 6; 148 | this.label1.Text = "Search:"; 149 | // 150 | // CloseBtn 151 | // 152 | this.CloseBtn.Customization = "9fX1/6mpqf8="; 153 | this.CloseBtn.Font = new System.Drawing.Font("Verdana", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 154 | this.CloseBtn.Image = null; 155 | this.CloseBtn.Location = new System.Drawing.Point(3, 443); 156 | this.CloseBtn.Name = "CloseBtn"; 157 | this.CloseBtn.NoRounding = false; 158 | this.CloseBtn.Size = new System.Drawing.Size(747, 31); 159 | this.CloseBtn.TabIndex = 4; 160 | this.CloseBtn.Text = "Close"; 161 | this.CloseBtn.Transparent = false; 162 | this.CloseBtn.Click += new System.EventHandler(this.CloseBtn_Click); 163 | // 164 | // RemoveBtn 165 | // 166 | this.RemoveBtn.Customization = "9fX1/6mpqf8="; 167 | this.RemoveBtn.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 168 | this.RemoveBtn.Image = null; 169 | this.RemoveBtn.Location = new System.Drawing.Point(381, 405); 170 | this.RemoveBtn.Name = "RemoveBtn"; 171 | this.RemoveBtn.NoRounding = false; 172 | this.RemoveBtn.Size = new System.Drawing.Size(369, 32); 173 | this.RemoveBtn.TabIndex = 2; 174 | this.RemoveBtn.Text = "Remove"; 175 | this.RemoveBtn.Transparent = false; 176 | this.RemoveBtn.Click += new System.EventHandler(this.RemoveBtn_Click); 177 | // 178 | // AddBtn 179 | // 180 | this.AddBtn.Customization = "9fX1/6mpqf8="; 181 | this.AddBtn.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 182 | this.AddBtn.Image = null; 183 | this.AddBtn.Location = new System.Drawing.Point(3, 405); 184 | this.AddBtn.Name = "AddBtn"; 185 | this.AddBtn.NoRounding = false; 186 | this.AddBtn.Size = new System.Drawing.Size(370, 32); 187 | this.AddBtn.TabIndex = 1; 188 | this.AddBtn.Text = "Add"; 189 | this.AddBtn.Transparent = false; 190 | this.AddBtn.Click += new System.EventHandler(this.AddBtn_Click); 191 | // 192 | // ExcludeStringsForm 193 | // 194 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 195 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 196 | this.ClientSize = new System.Drawing.Size(754, 478); 197 | this.Controls.Add(this.MainTheme); 198 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; 199 | this.Name = "ExcludeStringsForm"; 200 | this.ShowInTaskbar = false; 201 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 202 | this.Text = "Exclude Strings"; 203 | this.TransparencyKey = System.Drawing.Color.Fuchsia; 204 | this.MainTheme.ResumeLayout(false); 205 | this.MainTheme.PerformLayout(); 206 | this.ResumeLayout(false); 207 | 208 | } 209 | 210 | #endregion 211 | 212 | private System.Windows.Forms.ListBox StringsList; 213 | private FormSkin.clsNeoBuxTheme MainTheme; 214 | private System.Windows.Forms.Label label4; 215 | private System.Windows.Forms.Label label3; 216 | private System.Windows.Forms.TextBox SearchExcludedStringsTxt; 217 | private System.Windows.Forms.Label label2; 218 | private System.Windows.Forms.ListBox ExcludedStringsList; 219 | private System.Windows.Forms.TextBox SearchStringsTxt; 220 | private System.Windows.Forms.Label label1; 221 | private FormSkin.clsButtonPurple CloseBtn; 222 | private FormSkin.clsButtonOrange RemoveBtn; 223 | private FormSkin.clsButtonGreen AddBtn; 224 | } 225 | } -------------------------------------------------------------------------------- /Unity3DObfuscator/ExcludeStringsForm.cs: -------------------------------------------------------------------------------- 1 | using dnlib.DotNet; 2 | using dnlib.DotNet.Emit; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.ComponentModel; 6 | using System.Data; 7 | using System.Drawing; 8 | using System.Linq; 9 | using System.Text; 10 | using System.Threading.Tasks; 11 | using System.Windows.Forms; 12 | 13 | namespace Unity3DObfuscator 14 | { 15 | public partial class ExcludeStringsForm : Form 16 | { 17 | public ExcludeStringsForm() 18 | { 19 | InitializeComponent(); 20 | StringsList.Items.Clear(); 21 | ExcludedStringsList.Items.Clear(); 22 | try 23 | { 24 | UpdateStrings(); 25 | UpdateExludedStrings(); 26 | } 27 | catch 28 | { 29 | 30 | } 31 | StringsList.ScrollAlwaysVisible = true; //Sets the vertical scroll bar to be visible. 32 | StringsList.HorizontalScrollbar = true; // Sets the horizontal scroll bar to be visible. 33 | ExcludedStringsList.ScrollAlwaysVisible = true; //... 34 | ExcludedStringsList.HorizontalScrollbar = true; //... 35 | } 36 | 37 | void UpdateStrings() //Updates the strings on the current assembly. 38 | { 39 | if (MainClass.MainModule == null) 40 | { 41 | return; 42 | } 43 | if (!MainClass.MainModule.HasTypes) 44 | { 45 | return; 46 | } 47 | StringsList.Sorted = true; 48 | foreach (TypeDef type in MainClass.MainModule.GetTypes()) 49 | { 50 | foreach (MethodDef method in type.Methods) 51 | { 52 | if (!method.HasBody) continue; 53 | var instr = method.Body.Instructions; 54 | for (int i = 0; i < instr.Count; i++) 55 | { 56 | if (instr[i].OpCode == OpCodes.Ldstr) 57 | { 58 | var originalStr = instr[i].Operand as string; 59 | if (Exclusion.ExcludedStrings.Contains(originalStr) || Exclusion.ExcludedStrings.Contains(originalStr)) 60 | { 61 | StringsList.Items.Remove(originalStr); 62 | } 63 | if (!Exclusion.ExcludedStrings.Contains(originalStr)) 64 | { 65 | if (!StringsList.Items.Contains(originalStr)) 66 | { 67 | if (!Exclusion.Strings.Contains(originalStr)) 68 | { 69 | Exclusion.Strings.Add(originalStr); 70 | } 71 | } 72 | } 73 | } 74 | } 75 | } 76 | } 77 | foreach (string str in Exclusion.Strings) 78 | { 79 | if (!StringsList.Items.Contains(str)) 80 | { 81 | StringsList.Items.Add(str); 82 | } 83 | } 84 | } 85 | void ShowSearchedMatchStrings() //Shows only the strings that the user searches for. 86 | { 87 | foreach (TypeDef type in MainClass.MainModule.GetTypes()) 88 | { 89 | foreach (MethodDef method in type.Methods) 90 | { 91 | if (!method.HasBody) continue; 92 | var instr = method.Body.Instructions; 93 | for (int i = 0; i < instr.Count - 3; i++) 94 | { 95 | if (instr[i].OpCode == OpCodes.Ldstr) 96 | { 97 | var originalStr = instr[i].Operand as string; 98 | if (Exclusion.ExcludedStrings.Contains(originalStr)) 99 | { 100 | StringsList.Items.Remove(originalStr); 101 | } 102 | if (!StringsList.Items.Contains(originalStr)) 103 | { 104 | if (!Exclusion.ExcludedStrings.Contains(originalStr)) 105 | { 106 | if (originalStr.ToLower().Contains(SearchStringsTxt.Text.ToLower()) || originalStr.ToLower().Contains(SearchStringsTxt.Text.ToLower())) 107 | { 108 | StringsList.Items.Add(originalStr); 109 | } 110 | } 111 | } 112 | } 113 | } 114 | } 115 | } 116 | } 117 | void UpdateExludedStrings() //Updates the excluded strings that are currently on the exclusion list. 118 | { 119 | if (MainClass.MainModule == null) 120 | { 121 | return; 122 | } 123 | if (Exclusion.ExcludedStrings.Count <= 0) 124 | { 125 | return; 126 | } 127 | ExcludedStringsList.Sorted = true; 128 | foreach (string str in Exclusion.ExcludedStrings) 129 | { 130 | if (!ExcludedStringsList.Items.Contains(str)) 131 | { 132 | if (Exclusion.ExcludedStrings.Contains(str)) 133 | { 134 | ExcludedStringsList.Items.Add(str); 135 | } 136 | else 137 | { 138 | ExcludedStringsList.Items.Remove(str); 139 | } 140 | } 141 | } 142 | } 143 | void ShowSearchedMatchExcludedStings() ////Shows only the excluded strings that the user searches for. 144 | { 145 | foreach (string type in Exclusion.ExcludedStrings) 146 | { 147 | if (!ExcludedStringsList.Items.Contains(type)) 148 | { 149 | if (type.ToLower().Contains(SearchExcludedStringsTxt.Text.ToLower())) 150 | { 151 | ExcludedStringsList.Items.Add(type); 152 | } 153 | } 154 | } 155 | } 156 | private void CloseBtn_Click(object sender, EventArgs e) //Closes the form. 157 | { 158 | Close(); 159 | } 160 | 161 | private void AddBtn_Click(object sender, EventArgs e) //Adds the selected type to the exclusion list. 162 | { 163 | if (StringsList.SelectedIndex < 0) 164 | { 165 | return; 166 | } 167 | string item = StringsList.SelectedItem.ToString(); 168 | if (!Exclusion.ExcludedStrings.Contains(item)) 169 | { 170 | Exclusion.ExcludedStrings.Add(item); 171 | 172 | } 173 | if (!ExcludedStringsList.Items.Contains(item)) 174 | { 175 | ExcludedStringsList.Items.Add(item); 176 | } 177 | if (ExcludedStringsList.Items.Contains(item)) 178 | { 179 | Exclusion.Strings.Remove(item); 180 | UpdateStrings(); 181 | StringsList.Items.Remove(item); 182 | } 183 | } 184 | 185 | private void SearchStringsTxt_TextChanged(object sender, EventArgs e) //The function when the 'search string' text box changes text. 186 | { 187 | if (SearchStringsTxt.Text == string.Empty) 188 | { 189 | StringsList.Items.Clear(); 190 | try 191 | { 192 | UpdateStrings(); 193 | } 194 | catch 195 | { 196 | } 197 | } 198 | else 199 | { 200 | StringsList.Items.Clear(); 201 | try 202 | { 203 | ShowSearchedMatchStrings(); 204 | } 205 | catch 206 | { 207 | } 208 | } 209 | } 210 | 211 | private void RemoveBtn_Click(object sender, EventArgs e) //Removes the selected type from the exclusion list. 212 | { 213 | if (ExcludedStringsList.SelectedIndex < 0) 214 | { 215 | return; 216 | } 217 | string item = ExcludedStringsList.SelectedItem.ToString(); 218 | if (Exclusion.ExcludedStrings.Contains(item)) 219 | { 220 | Exclusion.ExcludedStrings.Remove(item); 221 | } 222 | StringsList.Items.Add(item); 223 | if (ExcludedStringsList.Items.Contains(item)) 224 | { 225 | ExcludedStringsList.Items.Remove(item); 226 | } 227 | Exclusion.Strings.Add(item); 228 | StringsList.Items.Clear(); 229 | UpdateStrings(); 230 | } 231 | 232 | private void SearchExcludedStringsTxt_TextChanged(object sender, EventArgs e) //The function when the 'search excluded string' text box changes text. 233 | { 234 | if (SearchExcludedStringsTxt.Text == string.Empty) 235 | { 236 | ExcludedStringsList.Items.Clear(); 237 | try 238 | { 239 | UpdateExludedStrings(); 240 | } 241 | catch { } 242 | } 243 | else 244 | { 245 | ExcludedStringsList.Items.Clear(); 246 | try 247 | { 248 | ShowSearchedMatchExcludedStings(); 249 | } 250 | catch { } 251 | } 252 | } 253 | } 254 | } 255 | -------------------------------------------------------------------------------- /Unity3DObfuscator/ExcludeStringsForm.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /Unity3DObfuscator/ExcludeTypesForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace Unity3DObfuscator 2 | { 3 | partial class ExcludeTypesForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.MainTheme = new FormSkin.clsNeoBuxTheme(); 32 | this.label4 = new System.Windows.Forms.Label(); 33 | this.label3 = new System.Windows.Forms.Label(); 34 | this.SearchExcludedTypes = new System.Windows.Forms.TextBox(); 35 | this.label2 = new System.Windows.Forms.Label(); 36 | this.ExcludedTypesList = new System.Windows.Forms.ListBox(); 37 | this.SearchTypesTxt = new System.Windows.Forms.TextBox(); 38 | this.label1 = new System.Windows.Forms.Label(); 39 | this.TypesList = new System.Windows.Forms.ListBox(); 40 | this.CloseBtn = new FormSkin.clsButtonPurple(); 41 | this.RemoveBtn = new FormSkin.clsButtonOrange(); 42 | this.AddBtn = new FormSkin.clsButtonGreen(); 43 | this.MainTheme.SuspendLayout(); 44 | this.SuspendLayout(); 45 | // 46 | // MainTheme 47 | // 48 | this.MainTheme.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(239)))), ((int)(((byte)(239)))), ((int)(((byte)(242))))); 49 | this.MainTheme.BorderStyle = System.Windows.Forms.FormBorderStyle.None; 50 | this.MainTheme.Controls.Add(this.label4); 51 | this.MainTheme.Controls.Add(this.label3); 52 | this.MainTheme.Controls.Add(this.SearchExcludedTypes); 53 | this.MainTheme.Controls.Add(this.label2); 54 | this.MainTheme.Controls.Add(this.ExcludedTypesList); 55 | this.MainTheme.Controls.Add(this.SearchTypesTxt); 56 | this.MainTheme.Controls.Add(this.label1); 57 | this.MainTheme.Controls.Add(this.TypesList); 58 | this.MainTheme.Controls.Add(this.CloseBtn); 59 | this.MainTheme.Controls.Add(this.RemoveBtn); 60 | this.MainTheme.Controls.Add(this.AddBtn); 61 | this.MainTheme.Customization = "AAAA/w=="; 62 | this.MainTheme.Dock = System.Windows.Forms.DockStyle.Fill; 63 | this.MainTheme.Font = new System.Drawing.Font("Segoe UI", 9F); 64 | this.MainTheme.Image = null; 65 | this.MainTheme.Location = new System.Drawing.Point(0, 0); 66 | this.MainTheme.Movable = true; 67 | this.MainTheme.Name = "MainTheme"; 68 | this.MainTheme.NoRounding = false; 69 | this.MainTheme.Sizable = false; 70 | this.MainTheme.Size = new System.Drawing.Size(755, 478); 71 | this.MainTheme.SmartBounds = true; 72 | this.MainTheme.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 73 | this.MainTheme.TabIndex = 0; 74 | this.MainTheme.Text = "Exlude Types"; 75 | this.MainTheme.TransparencyKey = System.Drawing.Color.Fuchsia; 76 | this.MainTheme.Transparent = false; 77 | // 78 | // label4 79 | // 80 | this.label4.AutoSize = true; 81 | this.label4.Location = new System.Drawing.Point(379, 49); 82 | this.label4.Name = "label4"; 83 | this.label4.Size = new System.Drawing.Size(90, 15); 84 | this.label4.TabIndex = 12; 85 | this.label4.Text = "Excluded Types:"; 86 | // 87 | // label3 88 | // 89 | this.label3.AutoSize = true; 90 | this.label3.Location = new System.Drawing.Point(3, 47); 91 | this.label3.Name = "label3"; 92 | this.label3.Size = new System.Drawing.Size(40, 15); 93 | this.label3.TabIndex = 11; 94 | this.label3.Text = "Types:"; 95 | // 96 | // SearchExcludedTypes 97 | // 98 | this.SearchExcludedTypes.Location = new System.Drawing.Point(607, 41); 99 | this.SearchExcludedTypes.Name = "SearchExcludedTypes"; 100 | this.SearchExcludedTypes.Size = new System.Drawing.Size(144, 23); 101 | this.SearchExcludedTypes.TabIndex = 10; 102 | this.SearchExcludedTypes.TextChanged += new System.EventHandler(this.SearchExcludedTypes_TextChanged); 103 | // 104 | // label2 105 | // 106 | this.label2.AutoSize = true; 107 | this.label2.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 108 | this.label2.Location = new System.Drawing.Point(545, 42); 109 | this.label2.Name = "label2"; 110 | this.label2.Size = new System.Drawing.Size(60, 21); 111 | this.label2.TabIndex = 9; 112 | this.label2.Text = "Search:"; 113 | // 114 | // ExcludedTypesList 115 | // 116 | this.ExcludedTypesList.FormattingEnabled = true; 117 | this.ExcludedTypesList.ItemHeight = 15; 118 | this.ExcludedTypesList.Location = new System.Drawing.Point(381, 65); 119 | this.ExcludedTypesList.Name = "ExcludedTypesList"; 120 | this.ExcludedTypesList.Size = new System.Drawing.Size(370, 334); 121 | this.ExcludedTypesList.TabIndex = 8; 122 | // 123 | // SearchTypesTxt 124 | // 125 | this.SearchTypesTxt.Location = new System.Drawing.Point(229, 41); 126 | this.SearchTypesTxt.Name = "SearchTypesTxt"; 127 | this.SearchTypesTxt.Size = new System.Drawing.Size(144, 23); 128 | this.SearchTypesTxt.TabIndex = 7; 129 | this.SearchTypesTxt.TextChanged += new System.EventHandler(this.SearchTypesTxt_TextChanged); 130 | // 131 | // label1 132 | // 133 | this.label1.AutoSize = true; 134 | this.label1.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 135 | this.label1.Location = new System.Drawing.Point(167, 42); 136 | this.label1.Name = "label1"; 137 | this.label1.Size = new System.Drawing.Size(60, 21); 138 | this.label1.TabIndex = 6; 139 | this.label1.Text = "Search:"; 140 | // 141 | // TypesList 142 | // 143 | this.TypesList.FormattingEnabled = true; 144 | this.TypesList.ItemHeight = 15; 145 | this.TypesList.Location = new System.Drawing.Point(3, 65); 146 | this.TypesList.Name = "TypesList"; 147 | this.TypesList.Size = new System.Drawing.Size(370, 334); 148 | this.TypesList.TabIndex = 5; 149 | this.TypesList.SelectedIndexChanged += new System.EventHandler(this.TypesList_SelectedIndexChanged); 150 | // 151 | // CloseBtn 152 | // 153 | this.CloseBtn.Customization = "9fX1/6mpqf8="; 154 | this.CloseBtn.Font = new System.Drawing.Font("Verdana", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 155 | this.CloseBtn.Image = null; 156 | this.CloseBtn.Location = new System.Drawing.Point(3, 443); 157 | this.CloseBtn.Name = "CloseBtn"; 158 | this.CloseBtn.NoRounding = false; 159 | this.CloseBtn.Size = new System.Drawing.Size(747, 31); 160 | this.CloseBtn.TabIndex = 4; 161 | this.CloseBtn.Text = "Close"; 162 | this.CloseBtn.Transparent = false; 163 | this.CloseBtn.Click += new System.EventHandler(this.CloseBtn_Click); 164 | // 165 | // RemoveBtn 166 | // 167 | this.RemoveBtn.Customization = "9fX1/6mpqf8="; 168 | this.RemoveBtn.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 169 | this.RemoveBtn.Image = null; 170 | this.RemoveBtn.Location = new System.Drawing.Point(381, 405); 171 | this.RemoveBtn.Name = "RemoveBtn"; 172 | this.RemoveBtn.NoRounding = false; 173 | this.RemoveBtn.Size = new System.Drawing.Size(369, 32); 174 | this.RemoveBtn.TabIndex = 2; 175 | this.RemoveBtn.Text = "Remove"; 176 | this.RemoveBtn.Transparent = false; 177 | this.RemoveBtn.Click += new System.EventHandler(this.RemoveBtn_Click); 178 | // 179 | // AddBtn 180 | // 181 | this.AddBtn.Customization = "9fX1/6mpqf8="; 182 | this.AddBtn.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 183 | this.AddBtn.Image = null; 184 | this.AddBtn.Location = new System.Drawing.Point(3, 405); 185 | this.AddBtn.Name = "AddBtn"; 186 | this.AddBtn.NoRounding = false; 187 | this.AddBtn.Size = new System.Drawing.Size(370, 32); 188 | this.AddBtn.TabIndex = 1; 189 | this.AddBtn.Text = "Add"; 190 | this.AddBtn.Transparent = false; 191 | this.AddBtn.Click += new System.EventHandler(this.AddBtn_Click); 192 | // 193 | // ExcludeTypesForm 194 | // 195 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 196 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 197 | this.ClientSize = new System.Drawing.Size(755, 478); 198 | this.Controls.Add(this.MainTheme); 199 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; 200 | this.Name = "ExcludeTypesForm"; 201 | this.ShowIcon = false; 202 | this.ShowInTaskbar = false; 203 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 204 | this.Text = "Exclude Types"; 205 | this.TransparencyKey = System.Drawing.Color.Fuchsia; 206 | this.MainTheme.ResumeLayout(false); 207 | this.MainTheme.PerformLayout(); 208 | this.ResumeLayout(false); 209 | 210 | } 211 | 212 | #endregion 213 | 214 | private FormSkin.clsNeoBuxTheme MainTheme; 215 | private FormSkin.clsButtonPurple CloseBtn; 216 | private FormSkin.clsButtonOrange RemoveBtn; 217 | private FormSkin.clsButtonGreen AddBtn; 218 | private System.Windows.Forms.ListBox TypesList; 219 | private System.Windows.Forms.TextBox SearchTypesTxt; 220 | private System.Windows.Forms.Label label1; 221 | private System.Windows.Forms.TextBox SearchExcludedTypes; 222 | private System.Windows.Forms.Label label2; 223 | private System.Windows.Forms.ListBox ExcludedTypesList; 224 | private System.Windows.Forms.Label label4; 225 | private System.Windows.Forms.Label label3; 226 | } 227 | } -------------------------------------------------------------------------------- /Unity3DObfuscator/ExcludeTypesForm.cs: -------------------------------------------------------------------------------- 1 | using dnlib.DotNet; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.ComponentModel; 5 | using System.Data; 6 | using System.Drawing; 7 | using System.Linq; 8 | using System.Text; 9 | using System.Threading.Tasks; 10 | using System.Windows.Forms; 11 | 12 | namespace Unity3DObfuscator 13 | { 14 | public partial class ExcludeTypesForm : Form 15 | { 16 | public ExcludeTypesForm() 17 | { 18 | InitializeComponent(); 19 | TypesList.Items.Clear(); 20 | ExcludedTypesList.Items.Clear(); 21 | try 22 | { 23 | UpdateTypes(); 24 | UpdateExcludedTypes(); 25 | } 26 | catch 27 | { 28 | 29 | } 30 | TypesList.ScrollAlwaysVisible = true; //Sets the vertical scroll bar to be visible. 31 | ExcludedTypesList.ScrollAlwaysVisible = true; //... 32 | TypesList.HorizontalScrollbar = true; // Sets the horizontal scroll bar to be visible. 33 | ExcludedTypesList.HorizontalScrollbar = true; //... 34 | } 35 | void UpdateTypes() //Updates the types on the current assembly. 36 | { 37 | if (MainClass.MainModule == null) 38 | { 39 | return; 40 | } 41 | if (!MainClass.MainModule.HasTypes) 42 | { 43 | return; 44 | } 45 | TypesList.Sorted = true; 46 | foreach (TypeDef type in MainClass.MainModule.Types) 47 | { 48 | if (Exclusion.ExludedTypes.Contains(type.FullName)) 49 | { 50 | TypesList.Items.Remove(type.FullName); 51 | } 52 | if (!Exclusion.ExludedTypes.Contains(type.FullName)) 53 | { 54 | if (!TypesList.Items.Contains(type.FullName)) 55 | { 56 | if (!type.Name.StartsWith("<") && !type.Name.EndsWith(">")) 57 | { 58 | if (!Exclusion.Types.Contains(type.FullName)) 59 | { 60 | Exclusion.Types.Add(type.FullName); 61 | } 62 | } 63 | } 64 | } 65 | } 66 | foreach (string type in Exclusion.Types) 67 | { 68 | if (!TypesList.Items.Contains(type)) 69 | { 70 | TypesList.Items.Add(type); 71 | } 72 | } 73 | } 74 | void ShowSearchedMatchTypes() //Shows only the types that the user searches for. 75 | { 76 | foreach (TypeDef type in MainClass.MainModule.Types) 77 | { 78 | if (Exclusion.ExludedTypes.Contains(type.FullName)) 79 | { 80 | TypesList.Items.Remove(type.FullName); 81 | } 82 | if (!TypesList.Items.Contains(type.FullName)) 83 | { 84 | if (!Exclusion.ExludedTypes.Contains(type.FullName)) 85 | { 86 | if (!type.Name.StartsWith("<") && !type.Name.EndsWith(">")) 87 | { 88 | if (type.Name.ToLower().Contains(SearchTypesTxt.Text.ToLower()) || type.FullName.ToLower().Contains(SearchTypesTxt.Text.ToLower())) 89 | { 90 | TypesList.Items.Add(type.FullName); 91 | } 92 | } 93 | } 94 | } 95 | } 96 | } 97 | void UpdateExcludedTypes() //Updates the excluded types that are currently on the exclusion list. 98 | { 99 | if (MainClass.MainModule == null) 100 | { 101 | return; 102 | } 103 | if (Exclusion.ExludedTypes.Count <= 0) 104 | { 105 | return; 106 | } 107 | ExcludedTypesList.Sorted = true; 108 | foreach (string type in Exclusion.ExludedTypes) 109 | { 110 | if (!ExcludedTypesList.Items.Contains(type)) 111 | { 112 | if (Exclusion.ExludedTypes.Contains(type)) 113 | { 114 | ExcludedTypesList.Items.Add(type); 115 | } 116 | else 117 | { 118 | ExcludedTypesList.Items.Remove(type); 119 | } 120 | } 121 | } 122 | } 123 | void ShowSearchedMatchExcludedTypes() //Shows only the excluded types that the user searches for. 124 | { 125 | foreach (string type in Exclusion.ExludedTypes) 126 | { 127 | if (!ExcludedTypesList.Items.Contains(type)) 128 | { 129 | if (type.ToLower().Contains(SearchExcludedTypes.Text.ToLower())) 130 | { 131 | ExcludedTypesList.Items.Add(type); 132 | } 133 | } 134 | } 135 | } 136 | private void SearchTypesTxt_TextChanged(object sender, EventArgs e) //The function when the 'search type' text box changes text. 137 | { 138 | if (SearchTypesTxt.Text == string.Empty) 139 | { 140 | TypesList.Items.Clear(); 141 | try 142 | { 143 | UpdateTypes(); 144 | } 145 | catch 146 | { 147 | } 148 | } 149 | else 150 | { 151 | TypesList.Items.Clear(); 152 | try 153 | { 154 | ShowSearchedMatchTypes(); 155 | } 156 | catch 157 | { 158 | } 159 | } 160 | } 161 | private void SearchExcludedTypes_TextChanged(object sender, EventArgs e) //The function when the 'search excluded type' text box changes text. 162 | { 163 | if (SearchExcludedTypes.Text == string.Empty) 164 | { 165 | ExcludedTypesList.Items.Clear(); 166 | try 167 | { 168 | UpdateExcludedTypes(); 169 | } 170 | catch 171 | { 172 | } 173 | } 174 | else 175 | { 176 | ExcludedTypesList.Items.Clear(); 177 | try 178 | { 179 | ShowSearchedMatchExcludedTypes(); 180 | } 181 | catch 182 | { 183 | } 184 | } 185 | } 186 | private void TypesList_SelectedIndexChanged(object sender, EventArgs e) //Ignore this. 187 | { 188 | 189 | } 190 | private void AddBtn_Click(object sender, EventArgs e) //Adds the selected type to the exclusion list. 191 | { 192 | if (TypesList.SelectedIndex < 0) 193 | { 194 | return; 195 | } 196 | string item = TypesList.SelectedItem.ToString(); 197 | if (!Exclusion.ExludedTypes.Contains(item)) 198 | { 199 | Exclusion.ExludedTypes.Add(item); 200 | 201 | } 202 | if (!ExcludedTypesList.Items.Contains(item)) 203 | { 204 | ExcludedTypesList.Items.Add(item); 205 | } 206 | if (ExcludedTypesList.Items.Contains(item)) 207 | { 208 | Exclusion.Types.Remove(item); 209 | UpdateTypes(); 210 | TypesList.Items.Remove(item); 211 | } 212 | } 213 | 214 | private void RemoveBtn_Click(object sender, EventArgs e) //Removes the selected type from the exclusion list. 215 | { 216 | if (ExcludedTypesList.SelectedIndex < 0) 217 | { 218 | return; 219 | } 220 | string item = ExcludedTypesList.SelectedItem.ToString(); 221 | if (Exclusion.ExludedTypes.Contains(item)) 222 | { 223 | Exclusion.ExludedTypes.Remove(item); 224 | } 225 | TypesList.Items.Add(item); 226 | if (ExcludedTypesList.Items.Contains(item)) 227 | { 228 | ExcludedTypesList.Items.Remove(item); 229 | } 230 | Exclusion.Types.Add(item); 231 | TypesList.Items.Clear(); 232 | UpdateTypes(); 233 | } 234 | 235 | private void CloseBtn_Click(object sender, EventArgs e) //Closes the form. 236 | { 237 | Close(); 238 | } 239 | } 240 | } 241 | -------------------------------------------------------------------------------- /Unity3DObfuscator/ExcludeTypesForm.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /Unity3DObfuscator/Exclusion.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Unity3DObfuscator 8 | { 9 | public class Exclusion 10 | { 11 | //Execution Order of Event Functions in Unity. Feel free to add functions that you think they are missing. 12 | private static readonly List unityFunctions = new List(new string[] { "Awake", "OnEnable", "OnDisable", "OnLevelWasLoaded", "OnApplicationPause", "Start", "Update", "FixedUpdate", "LateUpdate", "OnPreCull", "OnBecameVisible", "OnBecameInvisible", "OnWillRenderObject", "OnPreRender", "OnRenderObject", "OnPostRender", "OnRenderImage", "OnGUI", "OnDrawGizmos", "OnDestroy", "OnApplicationQuit", "OnTriggerEnter", "OnTriggerExit", "OnCollisionEnter", "OnCollisionExit", "OnMouseClick", "OnMouseDown", "OnMouseUp" }); 13 | 14 | private static readonly List types = new List(new string[0]); 15 | 16 | //Excluded types. 17 | private static readonly List exludedTypes = new List(new string[0]); 18 | 19 | //Excluded strings. 20 | private static readonly List excludedStrings = new List(new string[0]); 21 | 22 | //List of strings in the assembly 23 | private static readonly List strings = new List(new string[0]); 24 | 25 | //The properties are just return functions of every list. 26 | public static List UnityFunctions => unityFunctions; 27 | 28 | public static List Types => types; 29 | 30 | public static List ExludedTypes => exludedTypes; 31 | 32 | public static List ExcludedStrings => excludedStrings; 33 | 34 | public static List Strings => strings; 35 | } 36 | } -------------------------------------------------------------------------------- /Unity3DObfuscator/GlobalStrings.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Unity3DObfuscator 8 | { 9 | //The strings for the renaming function. 10 | public struct GlobalStrings 11 | { 12 | private static Random random = new Random(); 13 | 14 | public static string RenamingString => GetRenamingString(); 15 | public static string RandomString => GetRandomString(); 16 | private static string GetRandomString() //Generates a radmom string. 17 | { 18 | var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; 19 | var stringChars = new char[19]; 20 | for (int i = 0; i < stringChars.Length; i++) 21 | { 22 | stringChars[i] = chars[random.Next(chars.Length)]; 23 | } 24 | var finalString = new String(stringChars); 25 | return string.Concat("=", finalString); 26 | } 27 | private static string GetEmpty() //Returns an empty string. 28 | { 29 | return string.Empty; 30 | } 31 | private static string GetRenamingString() //Gets the renaming type of the 'Renaming Obfuscation'. Radmm name or empty. 32 | { 33 | if (MainClass.Settings.RandomName && !MainClass.Settings.EmptyName) 34 | { 35 | return GetRandomString(); 36 | } 37 | if (MainClass.Settings.EmptyName && !MainClass.Settings.RandomName) 38 | { 39 | return GetEmpty(); 40 | } 41 | return "xxx"; 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Unity3DObfuscator/HelpForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace Unity3DObfuscator 2 | { 3 | partial class HelpForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.MainTheme = new FormSkin.clsNeoBuxTheme(); 32 | this.HelpTabControl = new System.Windows.Forms.TabControl(); 33 | this.RenamingPage = new System.Windows.Forms.TabPage(); 34 | this.StringEncryptionPage = new System.Windows.Forms.TabPage(); 35 | this.AntiTamperingPage = new System.Windows.Forms.TabPage(); 36 | this.textBox1 = new System.Windows.Forms.TextBox(); 37 | this.StringEncryptionTxt = new System.Windows.Forms.TextBox(); 38 | this.AntiTamperingTxt = new System.Windows.Forms.TextBox(); 39 | this.RenamingTxt = new System.Windows.Forms.TextBox(); 40 | this.CloseBtn = new FormSkin.clsButtonBlue(); 41 | this.MainTheme.SuspendLayout(); 42 | this.HelpTabControl.SuspendLayout(); 43 | this.RenamingPage.SuspendLayout(); 44 | this.StringEncryptionPage.SuspendLayout(); 45 | this.AntiTamperingPage.SuspendLayout(); 46 | this.SuspendLayout(); 47 | // 48 | // MainTheme 49 | // 50 | this.MainTheme.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(239)))), ((int)(((byte)(239)))), ((int)(((byte)(242))))); 51 | this.MainTheme.BorderStyle = System.Windows.Forms.FormBorderStyle.None; 52 | this.MainTheme.Controls.Add(this.CloseBtn); 53 | this.MainTheme.Controls.Add(this.HelpTabControl); 54 | this.MainTheme.Customization = "AAAA/w=="; 55 | this.MainTheme.Dock = System.Windows.Forms.DockStyle.Fill; 56 | this.MainTheme.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 57 | this.MainTheme.Image = null; 58 | this.MainTheme.Location = new System.Drawing.Point(0, 0); 59 | this.MainTheme.Movable = false; 60 | this.MainTheme.Name = "MainTheme"; 61 | this.MainTheme.NoRounding = false; 62 | this.MainTheme.Sizable = false; 63 | this.MainTheme.Size = new System.Drawing.Size(346, 518); 64 | this.MainTheme.SmartBounds = true; 65 | this.MainTheme.StartPosition = System.Windows.Forms.FormStartPosition.WindowsDefaultLocation; 66 | this.MainTheme.TabIndex = 0; 67 | this.MainTheme.Text = "Help"; 68 | this.MainTheme.TransparencyKey = System.Drawing.Color.Fuchsia; 69 | this.MainTheme.Transparent = false; 70 | // 71 | // HelpTabControl 72 | // 73 | this.HelpTabControl.Controls.Add(this.RenamingPage); 74 | this.HelpTabControl.Controls.Add(this.StringEncryptionPage); 75 | this.HelpTabControl.Controls.Add(this.AntiTamperingPage); 76 | this.HelpTabControl.Location = new System.Drawing.Point(3, 40); 77 | this.HelpTabControl.Name = "HelpTabControl"; 78 | this.HelpTabControl.SelectedIndex = 0; 79 | this.HelpTabControl.Size = new System.Drawing.Size(341, 431); 80 | this.HelpTabControl.TabIndex = 0; 81 | // 82 | // RenamingPage 83 | // 84 | this.RenamingPage.Controls.Add(this.RenamingTxt); 85 | this.RenamingPage.ForeColor = System.Drawing.Color.Blue; 86 | this.RenamingPage.Location = new System.Drawing.Point(4, 30); 87 | this.RenamingPage.Name = "RenamingPage"; 88 | this.RenamingPage.Padding = new System.Windows.Forms.Padding(3); 89 | this.RenamingPage.Size = new System.Drawing.Size(333, 397); 90 | this.RenamingPage.TabIndex = 0; 91 | this.RenamingPage.Text = "Renaming"; 92 | this.RenamingPage.UseVisualStyleBackColor = true; 93 | // 94 | // StringEncryptionPage 95 | // 96 | this.StringEncryptionPage.Controls.Add(this.StringEncryptionTxt); 97 | this.StringEncryptionPage.Controls.Add(this.textBox1); 98 | this.StringEncryptionPage.ForeColor = System.Drawing.Color.Blue; 99 | this.StringEncryptionPage.Location = new System.Drawing.Point(4, 30); 100 | this.StringEncryptionPage.Name = "StringEncryptionPage"; 101 | this.StringEncryptionPage.Padding = new System.Windows.Forms.Padding(3); 102 | this.StringEncryptionPage.Size = new System.Drawing.Size(333, 397); 103 | this.StringEncryptionPage.TabIndex = 1; 104 | this.StringEncryptionPage.Text = "String Encryption"; 105 | this.StringEncryptionPage.UseVisualStyleBackColor = true; 106 | // 107 | // AntiTamperingPage 108 | // 109 | this.AntiTamperingPage.Controls.Add(this.AntiTamperingTxt); 110 | this.AntiTamperingPage.ForeColor = System.Drawing.Color.Blue; 111 | this.AntiTamperingPage.Location = new System.Drawing.Point(4, 30); 112 | this.AntiTamperingPage.Name = "AntiTamperingPage"; 113 | this.AntiTamperingPage.Size = new System.Drawing.Size(333, 397); 114 | this.AntiTamperingPage.TabIndex = 2; 115 | this.AntiTamperingPage.Text = "Anti Tampering"; 116 | this.AntiTamperingPage.UseVisualStyleBackColor = true; 117 | // 118 | // textBox1 119 | // 120 | this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; 121 | this.textBox1.Font = new System.Drawing.Font("Segoe UI", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 122 | this.textBox1.ForeColor = System.Drawing.Color.Blue; 123 | this.textBox1.Location = new System.Drawing.Point(-6, -2); 124 | this.textBox1.Multiline = true; 125 | this.textBox1.Name = "textBox1"; 126 | this.textBox1.Size = new System.Drawing.Size(344, 368); 127 | this.textBox1.TabIndex = 1; 128 | // 129 | // StringEncryptionTxt 130 | // 131 | this.StringEncryptionTxt.BorderStyle = System.Windows.Forms.BorderStyle.None; 132 | this.StringEncryptionTxt.Font = new System.Drawing.Font("Segoe UI", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 133 | this.StringEncryptionTxt.ForeColor = System.Drawing.Color.Blue; 134 | this.StringEncryptionTxt.Location = new System.Drawing.Point(-4, 0); 135 | this.StringEncryptionTxt.Multiline = true; 136 | this.StringEncryptionTxt.Name = "StringEncryptionTxt"; 137 | this.StringEncryptionTxt.ReadOnly = true; 138 | this.StringEncryptionTxt.Size = new System.Drawing.Size(344, 401); 139 | this.StringEncryptionTxt.TabIndex = 2; 140 | // 141 | // AntiTamperingTxt 142 | // 143 | this.AntiTamperingTxt.BorderStyle = System.Windows.Forms.BorderStyle.None; 144 | this.AntiTamperingTxt.Font = new System.Drawing.Font("Segoe UI", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 145 | this.AntiTamperingTxt.ForeColor = System.Drawing.Color.Blue; 146 | this.AntiTamperingTxt.Location = new System.Drawing.Point(-6, -2); 147 | this.AntiTamperingTxt.Multiline = true; 148 | this.AntiTamperingTxt.Name = "AntiTamperingTxt"; 149 | this.AntiTamperingTxt.ReadOnly = true; 150 | this.AntiTamperingTxt.Size = new System.Drawing.Size(344, 403); 151 | this.AntiTamperingTxt.TabIndex = 1; 152 | // 153 | // RenamingTxt 154 | // 155 | this.RenamingTxt.BorderStyle = System.Windows.Forms.BorderStyle.None; 156 | this.RenamingTxt.Font = new System.Drawing.Font("Segoe UI", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 157 | this.RenamingTxt.ForeColor = System.Drawing.Color.Blue; 158 | this.RenamingTxt.ImeMode = System.Windows.Forms.ImeMode.NoControl; 159 | this.RenamingTxt.Location = new System.Drawing.Point(-7, 0); 160 | this.RenamingTxt.Multiline = true; 161 | this.RenamingTxt.Name = "RenamingTxt"; 162 | this.RenamingTxt.ReadOnly = true; 163 | this.RenamingTxt.Size = new System.Drawing.Size(344, 401); 164 | this.RenamingTxt.TabIndex = 0; 165 | // 166 | // CloseBtn 167 | // 168 | this.CloseBtn.Customization = "9fX1/6mpqf8="; 169 | this.CloseBtn.Font = new System.Drawing.Font("Verdana", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 170 | this.CloseBtn.Image = null; 171 | this.CloseBtn.Location = new System.Drawing.Point(4, 473); 172 | this.CloseBtn.Name = "CloseBtn"; 173 | this.CloseBtn.NoRounding = false; 174 | this.CloseBtn.Size = new System.Drawing.Size(337, 42); 175 | this.CloseBtn.TabIndex = 1; 176 | this.CloseBtn.Text = "Close"; 177 | this.CloseBtn.Transparent = false; 178 | this.CloseBtn.Click += new System.EventHandler(this.CloseBtn_Click); 179 | // 180 | // HelpForm 181 | // 182 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 183 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 184 | this.ClientSize = new System.Drawing.Size(346, 518); 185 | this.Controls.Add(this.MainTheme); 186 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; 187 | this.Name = "HelpForm"; 188 | this.ShowInTaskbar = false; 189 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 190 | this.Text = "Help"; 191 | this.TransparencyKey = System.Drawing.Color.Fuchsia; 192 | this.MainTheme.ResumeLayout(false); 193 | this.HelpTabControl.ResumeLayout(false); 194 | this.RenamingPage.ResumeLayout(false); 195 | this.RenamingPage.PerformLayout(); 196 | this.StringEncryptionPage.ResumeLayout(false); 197 | this.StringEncryptionPage.PerformLayout(); 198 | this.AntiTamperingPage.ResumeLayout(false); 199 | this.AntiTamperingPage.PerformLayout(); 200 | this.ResumeLayout(false); 201 | 202 | } 203 | 204 | #endregion 205 | 206 | private FormSkin.clsNeoBuxTheme MainTheme; 207 | private System.Windows.Forms.TabControl HelpTabControl; 208 | private System.Windows.Forms.TabPage RenamingPage; 209 | private System.Windows.Forms.TabPage StringEncryptionPage; 210 | private System.Windows.Forms.TabPage AntiTamperingPage; 211 | private System.Windows.Forms.TextBox StringEncryptionTxt; 212 | private System.Windows.Forms.TextBox textBox1; 213 | private System.Windows.Forms.TextBox AntiTamperingTxt; 214 | private System.Windows.Forms.TextBox RenamingTxt; 215 | private FormSkin.clsButtonBlue CloseBtn; 216 | } 217 | } -------------------------------------------------------------------------------- /Unity3DObfuscator/HelpForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | 11 | namespace Unity3DObfuscator 12 | { 13 | public partial class HelpForm : Form 14 | { 15 | public HelpForm() 16 | { 17 | InitializeComponent(); 18 | RenamingTxt.Text = ObfuscatorHelp.Renaming; 19 | StringEncryptionTxt.Text = ObfuscatorHelp.StringEncryption; 20 | AntiTamperingTxt.Text = ObfuscatorHelp.AntiTampering; 21 | } 22 | 23 | private void CloseBtn_Click(object sender, EventArgs e) 24 | { 25 | Close(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Unity3DObfuscator/HelpForm.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /Unity3DObfuscator/InjectHelper.cs: -------------------------------------------------------------------------------- 1 | using dnlib.DotNet; 2 | using dnlib.DotNet.Emit; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | 6 | namespace Unity3DObfuscator 7 | { 8 | // Credit: The original InjectHelper class is from the ConfuserEx project. 9 | 10 | /// 11 | /// Provides methods to inject a into another module. 12 | /// 13 | public static class InjectHelper 14 | { 15 | /// 16 | /// Clones the specified origin TypeDef. 17 | /// 18 | /// The origin TypeDef. 19 | /// The cloned TypeDef. 20 | private static TypeDefUser Clone(TypeDef origin) 21 | { 22 | var ret = new TypeDefUser(origin.Namespace, origin.Name) {Attributes = origin.Attributes}; 23 | 24 | if (origin.ClassLayout != null) 25 | ret.ClassLayout = new ClassLayoutUser(origin.ClassLayout.PackingSize, origin.ClassSize); 26 | 27 | foreach (GenericParam genericParam in origin.GenericParameters) 28 | ret.GenericParameters.Add(new GenericParamUser(genericParam.Number, genericParam.Flags, "-")); 29 | 30 | return ret; 31 | } 32 | 33 | /// 34 | /// Clones the specified origin MethodDef. 35 | /// 36 | /// The origin MethodDef. 37 | /// The cloned MethodDef. 38 | static MethodDefUser Clone(MethodDef origin) 39 | { 40 | var ret = new MethodDefUser(origin.Name, null, origin.ImplAttributes, origin.Attributes); 41 | 42 | foreach (GenericParam genericParam in origin.GenericParameters) 43 | ret.GenericParameters.Add(new GenericParamUser(genericParam.Number, genericParam.Flags, "-")); 44 | 45 | return ret; 46 | } 47 | 48 | /// 49 | /// Clones the specified origin FieldDef. 50 | /// 51 | /// The origin FieldDef. 52 | /// The cloned FieldDef. 53 | private static FieldDefUser Clone(FieldDef origin) 54 | { 55 | var ret = new FieldDefUser(origin.Name, null, origin.Attributes); 56 | return ret; 57 | } 58 | 59 | /// 60 | /// Populates the context mappings. 61 | /// 62 | /// The origin TypeDef. 63 | /// The injection context. 64 | /// The new TypeDef. 65 | private static TypeDef PopulateContext(TypeDef typeDef, InjectContext ctx) 66 | { 67 | TypeDef ret; 68 | IDnlibDef existing; 69 | if (!ctx.Map.TryGetValue(typeDef, out existing)) 70 | { 71 | ret = Clone(typeDef); 72 | ctx.Map[typeDef] = ret; 73 | } 74 | else 75 | ret = (TypeDef)existing; 76 | 77 | foreach (TypeDef nestedType in typeDef.NestedTypes) 78 | ret.NestedTypes.Add(PopulateContext(nestedType, ctx)); 79 | 80 | foreach (MethodDef method in typeDef.Methods) 81 | ret.Methods.Add((MethodDef)(ctx.Map[method] = Clone(method))); 82 | 83 | foreach (FieldDef field in typeDef.Fields) 84 | ret.Fields.Add((FieldDef)(ctx.Map[field] = Clone(field))); 85 | 86 | return ret; 87 | } 88 | 89 | /// 90 | /// Copies the information from the origin type to injected type. 91 | /// 92 | /// The origin TypeDef. 93 | /// The injection context. 94 | private static void CopyTypeDef(TypeDef typeDef, InjectContext ctx) 95 | { 96 | var newTypeDef = (TypeDef)ctx.Map[typeDef]; 97 | 98 | newTypeDef.BaseType = (ITypeDefOrRef)ctx.Importer.Import(typeDef.BaseType); 99 | 100 | foreach (InterfaceImpl iface in typeDef.Interfaces) 101 | newTypeDef.Interfaces.Add(new InterfaceImplUser((ITypeDefOrRef)ctx.Importer.Import(iface.Interface))); 102 | } 103 | 104 | /// 105 | /// Copies the information from the origin method to injected method. 106 | /// 107 | /// The origin MethodDef. 108 | /// The injection context. 109 | private static void CopyMethodDef(MethodDef methodDef, InjectContext ctx) 110 | { 111 | var newMethodDef = (MethodDef)ctx.Map[methodDef]; 112 | 113 | newMethodDef.Signature = ctx.Importer.Import(methodDef.Signature); 114 | newMethodDef.Parameters.UpdateParameterTypes(); 115 | 116 | if (methodDef.ImplMap != null) 117 | newMethodDef.ImplMap = new ImplMapUser(new ModuleRefUser(ctx.TargetModule, methodDef.ImplMap.Module.Name), methodDef.ImplMap.Name, methodDef.ImplMap.Attributes); 118 | 119 | foreach (CustomAttribute ca in methodDef.CustomAttributes) 120 | newMethodDef.CustomAttributes.Add(new CustomAttribute((ICustomAttributeType)ctx.Importer.Import(ca.Constructor))); 121 | 122 | if (!methodDef.HasBody) return; 123 | newMethodDef.Body = new CilBody(methodDef.Body.InitLocals, new List(), new List(), new List()); 124 | newMethodDef.Body.MaxStack = methodDef.Body.MaxStack; 125 | 126 | var bodyMap = new Dictionary(); 127 | 128 | foreach (Local local in methodDef.Body.Variables) 129 | { 130 | var newLocal = new Local(ctx.Importer.Import(local.Type)); 131 | newMethodDef.Body.Variables.Add(newLocal); 132 | newLocal.Name = local.Name; 133 | newLocal.PdbAttributes = local.PdbAttributes; 134 | 135 | bodyMap[local] = newLocal; 136 | } 137 | 138 | foreach (Instruction instr in methodDef.Body.Instructions) 139 | { 140 | var newInstr = new Instruction(instr.OpCode, instr.Operand) {SequencePoint = instr.SequencePoint}; 141 | 142 | if (newInstr.Operand is IType) 143 | newInstr.Operand = ctx.Importer.Import((IType)newInstr.Operand); 144 | 145 | else if (newInstr.Operand is IMethod) 146 | newInstr.Operand = ctx.Importer.Import((IMethod)newInstr.Operand); 147 | 148 | else if (newInstr.Operand is IField) 149 | newInstr.Operand = ctx.Importer.Import((IField)newInstr.Operand); 150 | 151 | newMethodDef.Body.Instructions.Add(newInstr); 152 | bodyMap[instr] = newInstr; 153 | } 154 | 155 | foreach (Instruction instr in newMethodDef.Body.Instructions) 156 | { 157 | if (instr.Operand != null && bodyMap.ContainsKey(instr.Operand)) 158 | instr.Operand = bodyMap[instr.Operand]; 159 | 160 | else if (instr.Operand is Instruction[]) 161 | instr.Operand = ((Instruction[])instr.Operand).Select(target => (Instruction)bodyMap[target]).ToArray(); 162 | } 163 | 164 | foreach (ExceptionHandler eh in methodDef.Body.ExceptionHandlers) 165 | newMethodDef.Body.ExceptionHandlers.Add(new ExceptionHandler(eh.HandlerType) 166 | { 167 | CatchType = eh.CatchType == null ? null : (ITypeDefOrRef)ctx.Importer.Import(eh.CatchType), 168 | TryStart = (Instruction)bodyMap[eh.TryStart], 169 | TryEnd = (Instruction)bodyMap[eh.TryEnd], 170 | HandlerStart = (Instruction)bodyMap[eh.HandlerStart], 171 | HandlerEnd = (Instruction)bodyMap[eh.HandlerEnd], 172 | FilterStart = eh.FilterStart == null ? null : (Instruction)bodyMap[eh.FilterStart] 173 | }); 174 | 175 | newMethodDef.Body.SimplifyMacros(newMethodDef.Parameters); 176 | } 177 | 178 | /// 179 | /// Copies the information from the origin field to injected field. 180 | /// 181 | /// The origin FieldDef. 182 | /// The injection context. 183 | private static void CopyFieldDef(FieldDef fieldDef, InjectContext ctx) 184 | { 185 | var newFieldDef = (FieldDef)ctx.Map[fieldDef]; 186 | 187 | newFieldDef.Signature = ctx.Importer.Import(fieldDef.Signature); 188 | } 189 | 190 | /// 191 | /// Copies the information to the injected definitions. 192 | /// 193 | /// The origin TypeDef. 194 | /// The injection context. 195 | /// if set to true, copy information of . 196 | private static void Copy(TypeDef typeDef, InjectContext ctx, bool copySelf) 197 | { 198 | if (copySelf) 199 | CopyTypeDef(typeDef, ctx); 200 | 201 | foreach (TypeDef nestedType in typeDef.NestedTypes) 202 | Copy(nestedType, ctx, true); 203 | 204 | foreach (MethodDef method in typeDef.Methods) 205 | CopyMethodDef(method, ctx); 206 | 207 | foreach (FieldDef field in typeDef.Fields) 208 | CopyFieldDef(field, ctx); 209 | } 210 | 211 | /// 212 | /// Injects the specified TypeDef to another module. 213 | /// 214 | /// The source TypeDef. 215 | /// The target module. 216 | /// The injected TypeDef. 217 | public static TypeDef Inject(TypeDef typeDef, ModuleDef target) 218 | { 219 | var ctx = new InjectContext(typeDef.Module, target); 220 | PopulateContext(typeDef, ctx); 221 | Copy(typeDef, ctx, true); 222 | return (TypeDef)ctx.Map[typeDef]; 223 | } 224 | 225 | /// 226 | /// Injects the specified MethodDef to another module. 227 | /// 228 | /// The source MethodDef. 229 | /// The target module. 230 | /// The injected MethodDef. 231 | public static MethodDef Inject(MethodDef methodDef, ModuleDef target) 232 | { 233 | var ctx = new InjectContext(methodDef.Module, target); 234 | ctx.Map[methodDef] = Clone(methodDef); 235 | CopyMethodDef(methodDef, ctx); 236 | return (MethodDef)ctx.Map[methodDef]; 237 | } 238 | 239 | /// 240 | /// Injects the members of specified TypeDef to another module. 241 | /// 242 | /// The source TypeDef. 243 | /// The new type. 244 | /// The target module. 245 | /// Injected members. 246 | public static IEnumerable Inject(TypeDef typeDef, TypeDef newType, ModuleDef target) 247 | { 248 | var ctx = new InjectContext(typeDef.Module, target); 249 | ctx.Map[typeDef] = newType; 250 | PopulateContext(typeDef, ctx); 251 | Copy(typeDef, ctx, false); 252 | return ctx.Map.Values.Except(new[] { newType }); 253 | } 254 | 255 | /// 256 | /// Context of the injection process. 257 | /// 258 | private class InjectContext : ImportResolver 259 | { 260 | /// 261 | /// The mapping of origin definitions to injected definitions. 262 | /// 263 | public readonly Dictionary Map = new Dictionary(); 264 | 265 | /// 266 | /// The module which source type originated from. 267 | /// 268 | public readonly ModuleDef OriginModule; 269 | 270 | /// 271 | /// The module which source type is being injected to. 272 | /// 273 | public readonly ModuleDef TargetModule; 274 | 275 | /// 276 | /// The importer. 277 | /// 278 | readonly Importer importer; 279 | 280 | /// 281 | /// Initializes a new instance of the class. 282 | /// 283 | /// The origin module. 284 | /// The target module. 285 | public InjectContext(ModuleDef module, ModuleDef target) 286 | { 287 | OriginModule = module; 288 | TargetModule = target; 289 | importer = new Importer(target, ImporterOptions.TryToUseTypeDefs); 290 | importer.Resolver = this; 291 | } 292 | 293 | /// 294 | /// Gets the importer. 295 | /// 296 | /// The importer. 297 | public Importer Importer 298 | { 299 | get { return importer; } 300 | } 301 | 302 | /// 303 | public override TypeDef Resolve(TypeDef typeDef) 304 | { 305 | if (Map.ContainsKey(typeDef)) 306 | return (TypeDef)Map[typeDef]; 307 | return null; 308 | } 309 | 310 | /// 311 | public override MethodDef Resolve(MethodDef methodDef) 312 | { 313 | if (Map.ContainsKey(methodDef)) 314 | return (MethodDef)Map[methodDef]; 315 | return null; 316 | } 317 | 318 | /// 319 | public override FieldDef Resolve(FieldDef fieldDef) 320 | { 321 | if (Map.ContainsKey(fieldDef)) 322 | return (FieldDef)Map[fieldDef]; 323 | return null; 324 | } 325 | } 326 | } 327 | } 328 | -------------------------------------------------------------------------------- /Unity3DObfuscator/MainClass.cs: -------------------------------------------------------------------------------- 1 | using dnlib.DotNet; 2 | using System.Threading; 3 | 4 | namespace Unity3DObfuscator 5 | { 6 | public class MainClass 7 | { 8 | // I just made this class for various instances. 9 | private static readonly ObfuscationSettings settings = new ObfuscationSettings(); 10 | private static readonly RenamingClass renaming = new RenamingClass(); 11 | private static readonly AntiILDasmClass antiILDasm = new AntiILDasmClass(); 12 | private static readonly StringEncryptionClass stringEcnryption = new StringEncryptionClass(); 13 | private static readonly AntiTamperingClass antiTampering = new AntiTamperingClass(); 14 | private static ModuleDefMD mainModule = null; 15 | private static Thread obfuscationThread = null; 16 | 17 | public static ObfuscationSettings Settings => settings; 18 | public static AntiILDasmClass AntiILDasm => antiILDasm; 19 | public static RenamingClass Renaming => renaming; 20 | public static StringEncryptionClass StringEcnryption => stringEcnryption; 21 | public static AntiTamperingClass AntiTampering => antiTampering; 22 | public static ModuleDefMD MainModule { get => mainModule; set => mainModule = value; } 23 | public static Thread ObfuscationThread { get => obfuscationThread; set => obfuscationThread = value; } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Unity3DObfuscator/MainForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace Unity3DObfuscator 2 | { 3 | partial class MainForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.MainTheme = new FormSkin.clsNeoBuxTheme(); 32 | this.ExitBtn = new FormSkin.clsButtonGrey(); 33 | this.CancelBtn = new System.Windows.Forms.Button(); 34 | this.HelpBtn = new FormSkin.clsButtonOrange(); 35 | this.sLabel = new System.Windows.Forms.Label(); 36 | this.StatusLbl = new System.Windows.Forms.Label(); 37 | this.ResetBtn = new FormSkin.clsButtonPurple(); 38 | this.AboutBtn = new FormSkin.clsButtonBlue(); 39 | this.clsControlMenu1 = new FormSkin.clsControlMenu(); 40 | this.RestartBtn_ = new FormSkin.clsButtonOrange(); 41 | this.ChooseBtn = new FormSkin.clsButtonGrey(); 42 | this.PathTxt = new System.Windows.Forms.TextBox(); 43 | this.label1 = new System.Windows.Forms.Label(); 44 | this.ProtectBtn = new FormSkin.clsButtonGreen(); 45 | this.SettingsBox = new System.Windows.Forms.GroupBox(); 46 | this.ExcludeStringsBtn = new FormSkin.clsButtonGrey(); 47 | this.label2 = new System.Windows.Forms.Label(); 48 | this.StringEncnryptionCB = new System.Windows.Forms.CheckBox(); 49 | this.AntiILDasmCB = new System.Windows.Forms.CheckBox(); 50 | this.RandomNameRB = new System.Windows.Forms.RadioButton(); 51 | this.EmptyNameRB = new System.Windows.Forms.RadioButton(); 52 | this.OpenFolderBtn = new FormSkin.clsButtonGrey(); 53 | this.AntiTamperingCB = new System.Windows.Forms.CheckBox(); 54 | this.ExcludeTypesBtn = new FormSkin.clsButtonGrey(); 55 | this.RenameFieldsCB = new System.Windows.Forms.CheckBox(); 56 | this.RenameTypesCB = new System.Windows.Forms.CheckBox(); 57 | this.RenamePropertiesCB = new System.Windows.Forms.CheckBox(); 58 | this.RenameMethodsCB = new System.Windows.Forms.CheckBox(); 59 | this.RenameNamespacesCB = new System.Windows.Forms.CheckBox(); 60 | this.bottomTxt = new System.Windows.Forms.TextBox(); 61 | this.label3 = new System.Windows.Forms.Label(); 62 | this.StringEncrypyionTypeCB = new System.Windows.Forms.ComboBox(); 63 | this.MainTheme.SuspendLayout(); 64 | this.SettingsBox.SuspendLayout(); 65 | this.SuspendLayout(); 66 | // 67 | // MainTheme 68 | // 69 | this.MainTheme.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(239)))), ((int)(((byte)(239)))), ((int)(((byte)(242))))); 70 | this.MainTheme.BorderStyle = System.Windows.Forms.FormBorderStyle.None; 71 | this.MainTheme.Controls.Add(this.ExitBtn); 72 | this.MainTheme.Controls.Add(this.CancelBtn); 73 | this.MainTheme.Controls.Add(this.HelpBtn); 74 | this.MainTheme.Controls.Add(this.sLabel); 75 | this.MainTheme.Controls.Add(this.StatusLbl); 76 | this.MainTheme.Controls.Add(this.ResetBtn); 77 | this.MainTheme.Controls.Add(this.AboutBtn); 78 | this.MainTheme.Controls.Add(this.clsControlMenu1); 79 | this.MainTheme.Controls.Add(this.RestartBtn_); 80 | this.MainTheme.Controls.Add(this.ChooseBtn); 81 | this.MainTheme.Controls.Add(this.PathTxt); 82 | this.MainTheme.Controls.Add(this.label1); 83 | this.MainTheme.Controls.Add(this.ProtectBtn); 84 | this.MainTheme.Controls.Add(this.SettingsBox); 85 | this.MainTheme.Controls.Add(this.bottomTxt); 86 | this.MainTheme.Customization = "AAAA/w=="; 87 | this.MainTheme.Dock = System.Windows.Forms.DockStyle.Fill; 88 | this.MainTheme.Font = new System.Drawing.Font("Segoe UI", 9F); 89 | this.MainTheme.Image = null; 90 | this.MainTheme.Location = new System.Drawing.Point(0, 0); 91 | this.MainTheme.Movable = true; 92 | this.MainTheme.Name = "MainTheme"; 93 | this.MainTheme.NoRounding = false; 94 | this.MainTheme.Sizable = false; 95 | this.MainTheme.Size = new System.Drawing.Size(364, 350); 96 | this.MainTheme.SmartBounds = true; 97 | this.MainTheme.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 98 | this.MainTheme.TabIndex = 0; 99 | this.MainTheme.Text = "Unity3D Obfuscator"; 100 | this.MainTheme.TransparencyKey = System.Drawing.Color.Fuchsia; 101 | this.MainTheme.Transparent = false; 102 | this.MainTheme.Click += new System.EventHandler(this.MainTheme_Click); 103 | // 104 | // ExitBtn 105 | // 106 | this.ExitBtn.Customization = "9fX1/6mpqf8="; 107 | this.ExitBtn.Font = new System.Drawing.Font("Verdana", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 108 | this.ExitBtn.Image = null; 109 | this.ExitBtn.Location = new System.Drawing.Point(272, 268); 110 | this.ExitBtn.Name = "ExitBtn"; 111 | this.ExitBtn.NoRounding = false; 112 | this.ExitBtn.Size = new System.Drawing.Size(87, 28); 113 | this.ExitBtn.TabIndex = 17; 114 | this.ExitBtn.Text = "Exit"; 115 | this.ExitBtn.Transparent = false; 116 | this.ExitBtn.Click += new System.EventHandler(this.ExitBtn_Click); 117 | // 118 | // CancelBtn 119 | // 120 | this.CancelBtn.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 121 | this.CancelBtn.ForeColor = System.Drawing.Color.Red; 122 | this.CancelBtn.Location = new System.Drawing.Point(235, 313); 123 | this.CancelBtn.Name = "CancelBtn"; 124 | this.CancelBtn.Size = new System.Drawing.Size(129, 34); 125 | this.CancelBtn.TabIndex = 19; 126 | this.CancelBtn.Text = "Cancel"; 127 | this.CancelBtn.UseVisualStyleBackColor = true; 128 | this.CancelBtn.Visible = false; 129 | this.CancelBtn.Click += new System.EventHandler(this.CancelBtn_Click); 130 | // 131 | // HelpBtn 132 | // 133 | this.HelpBtn.Customization = "9fX1/6mpqf8="; 134 | this.HelpBtn.Font = new System.Drawing.Font("Verdana", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 135 | this.HelpBtn.Image = null; 136 | this.HelpBtn.Location = new System.Drawing.Point(271, 133); 137 | this.HelpBtn.Name = "HelpBtn"; 138 | this.HelpBtn.NoRounding = false; 139 | this.HelpBtn.Size = new System.Drawing.Size(87, 28); 140 | this.HelpBtn.TabIndex = 18; 141 | this.HelpBtn.Text = "Help"; 142 | this.HelpBtn.Transparent = false; 143 | this.HelpBtn.Click += new System.EventHandler(this.HelpBtn_Click); 144 | // 145 | // sLabel 146 | // 147 | this.sLabel.AutoSize = true; 148 | this.sLabel.BackColor = System.Drawing.Color.Gray; 149 | this.sLabel.Font = new System.Drawing.Font("Segoe UI Semibold", 13F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); 150 | this.sLabel.Location = new System.Drawing.Point(4, 319); 151 | this.sLabel.Name = "sLabel"; 152 | this.sLabel.Size = new System.Drawing.Size(65, 25); 153 | this.sLabel.TabIndex = 1; 154 | this.sLabel.Text = "Status:"; 155 | // 156 | // StatusLbl 157 | // 158 | this.StatusLbl.AutoSize = true; 159 | this.StatusLbl.BackColor = System.Drawing.Color.Gray; 160 | this.StatusLbl.Font = new System.Drawing.Font("Segoe UI Semibold", 13F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); 161 | this.StatusLbl.Location = new System.Drawing.Point(64, 319); 162 | this.StatusLbl.Name = "StatusLbl"; 163 | this.StatusLbl.Size = new System.Drawing.Size(41, 25); 164 | this.StatusLbl.TabIndex = 13; 165 | this.StatusLbl.Text = "Idle"; 166 | // 167 | // ResetBtn 168 | // 169 | this.ResetBtn.Customization = "9fX1/6mpqf8="; 170 | this.ResetBtn.Font = new System.Drawing.Font("Verdana", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 171 | this.ResetBtn.Image = null; 172 | this.ResetBtn.Location = new System.Drawing.Point(271, 201); 173 | this.ResetBtn.Name = "ResetBtn"; 174 | this.ResetBtn.NoRounding = false; 175 | this.ResetBtn.Size = new System.Drawing.Size(87, 28); 176 | this.ResetBtn.TabIndex = 12; 177 | this.ResetBtn.Text = "Reset"; 178 | this.ResetBtn.Transparent = false; 179 | this.ResetBtn.Click += new System.EventHandler(this.ResetBtn_Click); 180 | // 181 | // AboutBtn 182 | // 183 | this.AboutBtn.Customization = "9fX1/6mpqf8="; 184 | this.AboutBtn.Font = new System.Drawing.Font("Verdana", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 185 | this.AboutBtn.Image = null; 186 | this.AboutBtn.Location = new System.Drawing.Point(271, 104); 187 | this.AboutBtn.Name = "AboutBtn"; 188 | this.AboutBtn.NoRounding = false; 189 | this.AboutBtn.Size = new System.Drawing.Size(87, 23); 190 | this.AboutBtn.TabIndex = 11; 191 | this.AboutBtn.Text = "About"; 192 | this.AboutBtn.Transparent = false; 193 | this.AboutBtn.Click += new System.EventHandler(this.AboutBtn_Click); 194 | // 195 | // clsControlMenu1 196 | // 197 | this.clsControlMenu1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 198 | this.clsControlMenu1.Customization = "8u/v/////wD///8A"; 199 | this.clsControlMenu1.Font = new System.Drawing.Font("Verdana", 8F); 200 | this.clsControlMenu1.Image = null; 201 | this.clsControlMenu1.Location = new System.Drawing.Point(292, 1); 202 | this.clsControlMenu1.Name = "clsControlMenu1"; 203 | this.clsControlMenu1.NoRounding = false; 204 | this.clsControlMenu1.Size = new System.Drawing.Size(71, 19); 205 | this.clsControlMenu1.TabIndex = 10; 206 | this.clsControlMenu1.Text = "CtrlMenu"; 207 | this.clsControlMenu1.Transparent = false; 208 | // 209 | // RestartBtn_ 210 | // 211 | this.RestartBtn_.Customization = "9fX1/6mpqf8="; 212 | this.RestartBtn_.Font = new System.Drawing.Font("Verdana", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 213 | this.RestartBtn_.Image = null; 214 | this.RestartBtn_.Location = new System.Drawing.Point(272, 235); 215 | this.RestartBtn_.Name = "RestartBtn_"; 216 | this.RestartBtn_.NoRounding = false; 217 | this.RestartBtn_.Size = new System.Drawing.Size(87, 28); 218 | this.RestartBtn_.TabIndex = 8; 219 | this.RestartBtn_.Text = "Restart"; 220 | this.RestartBtn_.Transparent = false; 221 | this.RestartBtn_.Click += new System.EventHandler(this.RestartBtn); 222 | // 223 | // ChooseBtn 224 | // 225 | this.ChooseBtn.Customization = "9fX1/6mpqf8="; 226 | this.ChooseBtn.Font = new System.Drawing.Font("Verdana", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 227 | this.ChooseBtn.Image = null; 228 | this.ChooseBtn.Location = new System.Drawing.Point(325, 59); 229 | this.ChooseBtn.Name = "ChooseBtn"; 230 | this.ChooseBtn.NoRounding = false; 231 | this.ChooseBtn.Size = new System.Drawing.Size(34, 23); 232 | this.ChooseBtn.TabIndex = 7; 233 | this.ChooseBtn.Text = "..."; 234 | this.ChooseBtn.Transparent = false; 235 | this.ChooseBtn.Click += new System.EventHandler(this.ChooseBtn_Click); 236 | // 237 | // PathTxt 238 | // 239 | this.PathTxt.AllowDrop = true; 240 | this.PathTxt.Location = new System.Drawing.Point(7, 59); 241 | this.PathTxt.Name = "PathTxt"; 242 | this.PathTxt.Size = new System.Drawing.Size(312, 23); 243 | this.PathTxt.TabIndex = 6; 244 | this.PathTxt.TextChanged += new System.EventHandler(this.PathTxt_TextChanged); 245 | this.PathTxt.DragDrop += new System.Windows.Forms.DragEventHandler(this.PathTxt_DragDrop); 246 | this.PathTxt.DragEnter += new System.Windows.Forms.DragEventHandler(this.PathTxt_DragEnter); 247 | // 248 | // label1 249 | // 250 | this.label1.AutoSize = true; 251 | this.label1.Location = new System.Drawing.Point(3, 41); 252 | this.label1.Name = "label1"; 253 | this.label1.Size = new System.Drawing.Size(104, 15); 254 | this.label1.TabIndex = 5; 255 | this.label1.Text = "Choose Assembly:"; 256 | // 257 | // ProtectBtn 258 | // 259 | this.ProtectBtn.Customization = "9fX1/6mpqf8="; 260 | this.ProtectBtn.Font = new System.Drawing.Font("Verdana", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 261 | this.ProtectBtn.Image = null; 262 | this.ProtectBtn.Location = new System.Drawing.Point(271, 166); 263 | this.ProtectBtn.Name = "ProtectBtn"; 264 | this.ProtectBtn.NoRounding = false; 265 | this.ProtectBtn.Size = new System.Drawing.Size(87, 28); 266 | this.ProtectBtn.TabIndex = 4; 267 | this.ProtectBtn.Text = "Protect!"; 268 | this.ProtectBtn.Transparent = false; 269 | this.ProtectBtn.Click += new System.EventHandler(this.ProtectBtn_Click); 270 | // 271 | // SettingsBox 272 | // 273 | this.SettingsBox.Controls.Add(this.StringEncrypyionTypeCB); 274 | this.SettingsBox.Controls.Add(this.label3); 275 | this.SettingsBox.Controls.Add(this.ExcludeStringsBtn); 276 | this.SettingsBox.Controls.Add(this.label2); 277 | this.SettingsBox.Controls.Add(this.StringEncnryptionCB); 278 | this.SettingsBox.Controls.Add(this.AntiILDasmCB); 279 | this.SettingsBox.Controls.Add(this.RandomNameRB); 280 | this.SettingsBox.Controls.Add(this.EmptyNameRB); 281 | this.SettingsBox.Controls.Add(this.OpenFolderBtn); 282 | this.SettingsBox.Controls.Add(this.AntiTamperingCB); 283 | this.SettingsBox.Controls.Add(this.ExcludeTypesBtn); 284 | this.SettingsBox.Controls.Add(this.RenameFieldsCB); 285 | this.SettingsBox.Controls.Add(this.RenameTypesCB); 286 | this.SettingsBox.Controls.Add(this.RenamePropertiesCB); 287 | this.SettingsBox.Controls.Add(this.RenameMethodsCB); 288 | this.SettingsBox.Controls.Add(this.RenameNamespacesCB); 289 | this.SettingsBox.Location = new System.Drawing.Point(3, 80); 290 | this.SettingsBox.Name = "SettingsBox"; 291 | this.SettingsBox.Size = new System.Drawing.Size(262, 233); 292 | this.SettingsBox.TabIndex = 3; 293 | this.SettingsBox.TabStop = false; 294 | this.SettingsBox.Text = "Settings"; 295 | // 296 | // ExcludeStringsBtn 297 | // 298 | this.ExcludeStringsBtn.Customization = "9fX1/6mpqf8="; 299 | this.ExcludeStringsBtn.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 300 | this.ExcludeStringsBtn.Image = null; 301 | this.ExcludeStringsBtn.Location = new System.Drawing.Point(112, 142); 302 | this.ExcludeStringsBtn.Name = "ExcludeStringsBtn"; 303 | this.ExcludeStringsBtn.NoRounding = false; 304 | this.ExcludeStringsBtn.Size = new System.Drawing.Size(148, 24); 305 | this.ExcludeStringsBtn.TabIndex = 19; 306 | this.ExcludeStringsBtn.Text = "Exclude Strings"; 307 | this.ExcludeStringsBtn.Transparent = false; 308 | this.ExcludeStringsBtn.Click += new System.EventHandler(this.ExcludeStringsBtn_Click); 309 | // 310 | // label2 311 | // 312 | this.label2.AutoSize = true; 313 | this.label2.Location = new System.Drawing.Point(-3, 126); 314 | this.label2.Name = "label2"; 315 | this.label2.Size = new System.Drawing.Size(92, 15); 316 | this.label2.TabIndex = 18; 317 | this.label2.Text = "Renaming Type:"; 318 | // 319 | // StringEncnryptionCB 320 | // 321 | this.StringEncnryptionCB.AutoSize = true; 322 | this.StringEncnryptionCB.Location = new System.Drawing.Point(3, 93); 323 | this.StringEncnryptionCB.Name = "StringEncnryptionCB"; 324 | this.StringEncnryptionCB.Size = new System.Drawing.Size(117, 19); 325 | this.StringEncnryptionCB.TabIndex = 11; 326 | this.StringEncnryptionCB.Text = "String Encryption"; 327 | this.StringEncnryptionCB.UseVisualStyleBackColor = true; 328 | this.StringEncnryptionCB.CheckedChanged += new System.EventHandler(this.StringEcnryptionCB_CheckedChanged); 329 | // 330 | // AntiILDasmCB 331 | // 332 | this.AntiILDasmCB.AutoSize = true; 333 | this.AntiILDasmCB.Location = new System.Drawing.Point(3, 17); 334 | this.AntiILDasmCB.Name = "AntiILDasmCB"; 335 | this.AntiILDasmCB.Size = new System.Drawing.Size(93, 19); 336 | this.AntiILDasmCB.TabIndex = 10; 337 | this.AntiILDasmCB.Text = "Anti ILDASM"; 338 | this.AntiILDasmCB.UseVisualStyleBackColor = true; 339 | this.AntiILDasmCB.CheckedChanged += new System.EventHandler(this.AntiILDasmCB_CheckedChanged); 340 | // 341 | // RandomNameRB 342 | // 343 | this.RandomNameRB.AutoSize = true; 344 | this.RandomNameRB.BackColor = System.Drawing.Color.Transparent; 345 | this.RandomNameRB.Checked = true; 346 | this.RandomNameRB.Location = new System.Drawing.Point(-1, 166); 347 | this.RandomNameRB.Name = "RandomNameRB"; 348 | this.RandomNameRB.Size = new System.Drawing.Size(105, 19); 349 | this.RandomNameRB.TabIndex = 9; 350 | this.RandomNameRB.TabStop = true; 351 | this.RandomNameRB.Text = "Random Name"; 352 | this.RandomNameRB.UseVisualStyleBackColor = false; 353 | this.RandomNameRB.CheckedChanged += new System.EventHandler(this.RandomNameRB_CheckedChanged); 354 | // 355 | // EmptyNameRB 356 | // 357 | this.EmptyNameRB.AutoSize = true; 358 | this.EmptyNameRB.Location = new System.Drawing.Point(-1, 144); 359 | this.EmptyNameRB.Name = "EmptyNameRB"; 360 | this.EmptyNameRB.Size = new System.Drawing.Size(94, 19); 361 | this.EmptyNameRB.TabIndex = 8; 362 | this.EmptyNameRB.Text = "Empty Name"; 363 | this.EmptyNameRB.UseVisualStyleBackColor = true; 364 | this.EmptyNameRB.CheckedChanged += new System.EventHandler(this.EmptyNameRB_CheckedChanged); 365 | // 366 | // OpenFolderBtn 367 | // 368 | this.OpenFolderBtn.Customization = "9fX1/6mpqf8="; 369 | this.OpenFolderBtn.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 370 | this.OpenFolderBtn.Image = null; 371 | this.OpenFolderBtn.Location = new System.Drawing.Point(112, 172); 372 | this.OpenFolderBtn.Name = "OpenFolderBtn"; 373 | this.OpenFolderBtn.NoRounding = false; 374 | this.OpenFolderBtn.Size = new System.Drawing.Size(148, 24); 375 | this.OpenFolderBtn.TabIndex = 7; 376 | this.OpenFolderBtn.Text = "Open Containg Folder"; 377 | this.OpenFolderBtn.Transparent = false; 378 | this.OpenFolderBtn.Click += new System.EventHandler(this.OpenFolderBtn_Click); 379 | // 380 | // AntiTamperingCB 381 | // 382 | this.AntiTamperingCB.AutoSize = true; 383 | this.AntiTamperingCB.Location = new System.Drawing.Point(126, 93); 384 | this.AntiTamperingCB.Name = "AntiTamperingCB"; 385 | this.AntiTamperingCB.Size = new System.Drawing.Size(108, 19); 386 | this.AntiTamperingCB.TabIndex = 6; 387 | this.AntiTamperingCB.Text = "Anti Tampering"; 388 | this.AntiTamperingCB.UseVisualStyleBackColor = true; 389 | this.AntiTamperingCB.CheckedChanged += new System.EventHandler(this.AntiTamperingCB_CheckedChanged); 390 | // 391 | // ExcludeTypesBtn 392 | // 393 | this.ExcludeTypesBtn.Customization = "9fX1/6mpqf8="; 394 | this.ExcludeTypesBtn.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 395 | this.ExcludeTypesBtn.Image = null; 396 | this.ExcludeTypesBtn.Location = new System.Drawing.Point(112, 113); 397 | this.ExcludeTypesBtn.Name = "ExcludeTypesBtn"; 398 | this.ExcludeTypesBtn.NoRounding = false; 399 | this.ExcludeTypesBtn.Size = new System.Drawing.Size(150, 24); 400 | this.ExcludeTypesBtn.TabIndex = 5; 401 | this.ExcludeTypesBtn.Text = "Exclude Types"; 402 | this.ExcludeTypesBtn.Transparent = false; 403 | this.ExcludeTypesBtn.Click += new System.EventHandler(this.ExcludeTypesBtn_Click); 404 | // 405 | // RenameFieldsCB 406 | // 407 | this.RenameFieldsCB.AutoSize = true; 408 | this.RenameFieldsCB.Location = new System.Drawing.Point(125, 68); 409 | this.RenameFieldsCB.Name = "RenameFieldsCB"; 410 | this.RenameFieldsCB.Size = new System.Drawing.Size(102, 19); 411 | this.RenameFieldsCB.TabIndex = 4; 412 | this.RenameFieldsCB.Text = "Rename Fields"; 413 | this.RenameFieldsCB.UseVisualStyleBackColor = true; 414 | this.RenameFieldsCB.CheckedChanged += new System.EventHandler(this.RenameFieldsCB_CheckedChanged); 415 | // 416 | // RenameTypesCB 417 | // 418 | this.RenameTypesCB.AutoSize = true; 419 | this.RenameTypesCB.Location = new System.Drawing.Point(3, 42); 420 | this.RenameTypesCB.Name = "RenameTypesCB"; 421 | this.RenameTypesCB.Size = new System.Drawing.Size(102, 19); 422 | this.RenameTypesCB.TabIndex = 3; 423 | this.RenameTypesCB.Text = "Rename Types"; 424 | this.RenameTypesCB.UseVisualStyleBackColor = true; 425 | this.RenameTypesCB.CheckedChanged += new System.EventHandler(this.RenameTypesCB_CheckedChanged); 426 | // 427 | // RenamePropertiesCB 428 | // 429 | this.RenamePropertiesCB.AutoSize = true; 430 | this.RenamePropertiesCB.Location = new System.Drawing.Point(3, 67); 431 | this.RenamePropertiesCB.Name = "RenamePropertiesCB"; 432 | this.RenamePropertiesCB.Size = new System.Drawing.Size(125, 19); 433 | this.RenamePropertiesCB.TabIndex = 2; 434 | this.RenamePropertiesCB.Text = "Rename Properties"; 435 | this.RenamePropertiesCB.UseVisualStyleBackColor = true; 436 | this.RenamePropertiesCB.CheckedChanged += new System.EventHandler(this.RenamePropertiesCB_CheckedChanged); 437 | // 438 | // RenameMethodsCB 439 | // 440 | this.RenameMethodsCB.AutoSize = true; 441 | this.RenameMethodsCB.Location = new System.Drawing.Point(125, 43); 442 | this.RenameMethodsCB.Name = "RenameMethodsCB"; 443 | this.RenameMethodsCB.Size = new System.Drawing.Size(119, 19); 444 | this.RenameMethodsCB.TabIndex = 1; 445 | this.RenameMethodsCB.Text = "Rename Methods"; 446 | this.RenameMethodsCB.UseVisualStyleBackColor = true; 447 | this.RenameMethodsCB.CheckedChanged += new System.EventHandler(this.RenameMethodsCB_CheckedChanged); 448 | // 449 | // RenameNamespacesCB 450 | // 451 | this.RenameNamespacesCB.AutoSize = true; 452 | this.RenameNamespacesCB.Location = new System.Drawing.Point(125, 17); 453 | this.RenameNamespacesCB.Name = "RenameNamespacesCB"; 454 | this.RenameNamespacesCB.Size = new System.Drawing.Size(139, 19); 455 | this.RenameNamespacesCB.TabIndex = 0; 456 | this.RenameNamespacesCB.Text = "Rename Namespaces"; 457 | this.RenameNamespacesCB.UseVisualStyleBackColor = true; 458 | this.RenameNamespacesCB.CheckedChanged += new System.EventHandler(this.RenameNamespacesCB_CheckedChanged); 459 | // 460 | // bottomTxt 461 | // 462 | this.bottomTxt.BackColor = System.Drawing.Color.Gray; 463 | this.bottomTxt.BorderStyle = System.Windows.Forms.BorderStyle.None; 464 | this.bottomTxt.Enabled = false; 465 | this.bottomTxt.Location = new System.Drawing.Point(0, 313); 466 | this.bottomTxt.Multiline = true; 467 | this.bottomTxt.Name = "bottomTxt"; 468 | this.bottomTxt.ReadOnly = true; 469 | this.bottomTxt.Size = new System.Drawing.Size(364, 35); 470 | this.bottomTxt.TabIndex = 14; 471 | // 472 | // label3 473 | // 474 | this.label3.AutoSize = true; 475 | this.label3.Location = new System.Drawing.Point(1, 209); 476 | this.label3.Name = "label3"; 477 | this.label3.Size = new System.Drawing.Size(129, 15); 478 | this.label3.TabIndex = 20; 479 | this.label3.Text = "String Encryption Type:"; 480 | // 481 | // StringEncrypyionTypeCB 482 | // 483 | this.StringEncrypyionTypeCB.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 484 | this.StringEncrypyionTypeCB.FormattingEnabled = true; 485 | this.StringEncrypyionTypeCB.Items.AddRange(new object[] { 486 | "Weak", 487 | "Normal", 488 | "Strong"}); 489 | this.StringEncrypyionTypeCB.Location = new System.Drawing.Point(136, 205); 490 | this.StringEncrypyionTypeCB.Name = "StringEncrypyionTypeCB"; 491 | this.StringEncrypyionTypeCB.Size = new System.Drawing.Size(120, 23); 492 | this.StringEncrypyionTypeCB.TabIndex = 20; 493 | this.StringEncrypyionTypeCB.SelectedIndexChanged += new System.EventHandler(this.StringEncrypyionTypeCB_SelectedIndexChanged); 494 | // 495 | // MainForm 496 | // 497 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 498 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 499 | this.ClientSize = new System.Drawing.Size(364, 350); 500 | this.Controls.Add(this.MainTheme); 501 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; 502 | this.Name = "MainForm"; 503 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 504 | this.Text = "Unity3D Obfuscator"; 505 | this.TransparencyKey = System.Drawing.Color.Fuchsia; 506 | this.MainTheme.ResumeLayout(false); 507 | this.MainTheme.PerformLayout(); 508 | this.SettingsBox.ResumeLayout(false); 509 | this.SettingsBox.PerformLayout(); 510 | this.ResumeLayout(false); 511 | 512 | } 513 | 514 | #endregion 515 | 516 | private FormSkin.clsNeoBuxTheme MainTheme; 517 | private FormSkin.clsButtonGrey ChooseBtn; 518 | private System.Windows.Forms.TextBox PathTxt; 519 | private System.Windows.Forms.Label label1; 520 | private FormSkin.clsButtonGreen ProtectBtn; 521 | private System.Windows.Forms.GroupBox SettingsBox; 522 | private FormSkin.clsButtonOrange RestartBtn_; 523 | private System.Windows.Forms.CheckBox RenameFieldsCB; 524 | private System.Windows.Forms.CheckBox RenameTypesCB; 525 | private System.Windows.Forms.CheckBox RenamePropertiesCB; 526 | private System.Windows.Forms.CheckBox RenameMethodsCB; 527 | private System.Windows.Forms.CheckBox RenameNamespacesCB; 528 | private FormSkin.clsControlMenu clsControlMenu1; 529 | private FormSkin.clsButtonBlue AboutBtn; 530 | private FormSkin.clsButtonGrey ExcludeTypesBtn; 531 | private System.Windows.Forms.CheckBox AntiTamperingCB; 532 | private FormSkin.clsButtonPurple ResetBtn; 533 | private System.Windows.Forms.Label StatusLbl; 534 | private System.Windows.Forms.Label sLabel; 535 | private System.Windows.Forms.TextBox bottomTxt; 536 | private FormSkin.clsButtonGrey OpenFolderBtn; 537 | private FormSkin.clsButtonGrey ExitBtn; 538 | private System.Windows.Forms.RadioButton RandomNameRB; 539 | private System.Windows.Forms.RadioButton EmptyNameRB; 540 | private System.Windows.Forms.CheckBox AntiILDasmCB; 541 | private System.Windows.Forms.CheckBox StringEncnryptionCB; 542 | private System.Windows.Forms.Label label2; 543 | private FormSkin.clsButtonGrey ExcludeStringsBtn; 544 | private FormSkin.clsButtonOrange HelpBtn; 545 | private System.Windows.Forms.Button CancelBtn; 546 | private System.Windows.Forms.ComboBox StringEncrypyionTypeCB; 547 | private System.Windows.Forms.Label label3; 548 | } 549 | } 550 | 551 | -------------------------------------------------------------------------------- /Unity3DObfuscator/MainForm.cs: -------------------------------------------------------------------------------- 1 | using dnlib.DotNet; 2 | using dnlib.DotNet.MD; 3 | using dnlib.DotNet.Writer; 4 | using System; 5 | using System.IO; 6 | using System.Media; 7 | using System.Drawing; 8 | using System.Threading; 9 | using System.Windows.Forms; 10 | using System.Runtime.InteropServices; 11 | using System.Diagnostics; 12 | using FormSkin; 13 | using System.Collections.Generic; 14 | 15 | namespace Unity3DObfuscator 16 | { 17 | public partial class MainForm : Form 18 | { 19 | [DllImport("user32.dll")] 20 | static extern IntPtr GetForegroundWindow(); 21 | public MainForm() 22 | { 23 | InitializeComponent(); 24 | StringEncrypyionTypeCB.SelectedIndex = 1; 25 | } 26 | private void Protect() //The 'protect' function. 27 | { 28 | Invoke((MethodInvoker)(() => StatusLbl.Text = "Obfuscating...")); 29 | Invoke((MethodInvoker)(() => StatusLbl.ForeColor = Color.Yellow)); 30 | Invoke((MethodInvoker)(() => SetControls(false))); 31 | try 32 | { 33 | MainClass.MainModule = ModuleDefMD.Load(File.ReadAllBytes(MainClass.Settings.AssemblyPath)); 34 | MainClass.AntiILDasm.Execute(); 35 | MainClass.Renaming.RenameNamespaces(); 36 | MainClass.Renaming.RenameTypes(); 37 | MainClass.Renaming.RenameMethods(); 38 | MainClass.Renaming.RenameFields(); 39 | MainClass.Renaming.RenameProperties(); 40 | MainClass.StringEcnryption.Encrypt(); 41 | //This part is very important. If the anti tampering is enabled then the type of the custom attribute will be with a radnom namespace and type name. 42 | //Making it harder for a deobfuscator to detect it. Or else it will have its normal namespace and type name. 43 | if (!MainClass.Settings.AntiTampering) 44 | { 45 | Watermarking.Watermark("UnityObfuscator.Attributes", "ObfuscatedByAttribute", "Unity3D Obfuscator by AkyrosXD"); 46 | } 47 | else 48 | { 49 | Watermarking.Watermark(string.Concat(GlobalStrings.RandomString, ".", GlobalStrings.RandomString), string.Concat(GlobalStrings.RandomString, "Attribute"), "Obfuscated by [Unity3D Obfuscator by AkyrosXD]"); 50 | } 51 | MainClass.AntiTampering.ExecuteAntiTampering(); 52 | SaveProtectedAssembly(); 53 | Invoke((MethodInvoker)(() => StatusLbl.Text = "Obfuscation Completed!")); 54 | Invoke((MethodInvoker)(() => StatusLbl.ForeColor = Color.LimeGreen)); 55 | Invoke((MethodInvoker)(() => SetControls(true))); 56 | MainClass.ObfuscationThread = null; 57 | } 58 | catch (Exception ex) 59 | { 60 | if(ex.Message.Equals("Thread was being aborted.")) 61 | { 62 | Invoke((MethodInvoker)(() => CancelBtn.Visible = false)); 63 | MainClass.ObfuscationThread = null; 64 | Invoke((MethodInvoker)(() => SetControls(true))); 65 | return; 66 | } 67 | Invoke((MethodInvoker)(() => StatusLbl.Text = "Obfuscation Failed!")); 68 | Invoke((MethodInvoker)(() => StatusLbl.ForeColor = Color.Red)); 69 | Invoke((MethodInvoker)(() => SetControls(true))); 70 | NativeWindow nativeWindow = new NativeWindow(); 71 | nativeWindow.AssignHandle(GetForegroundWindow()); 72 | MessageBox.Show(nativeWindow, "An error occurred!\nException:\n" + ex.Message, string.Empty, MessageBoxButtons.OK, MessageBoxIcon.Error); 73 | MainClass.ObfuscationThread = null; 74 | 75 | } 76 | } 77 | private void SaveProtectedAssembly() //Saves the protected assembly to disk. 78 | { 79 | string file = Path.Combine(Path.GetDirectoryName(MainClass.Settings.AssemblyPath), Path.GetFileNameWithoutExtension(MainClass.Settings.AssemblyPath) + "_protected" + ".dll"); 80 | if (File.Exists(file)) 81 | { 82 | File.Delete(file); 83 | } 84 | ModuleWriter w = new ModuleWriter(MainClass.MainModule, new ModuleWriterOptions(MainClass.MainModule, DummyModuleWriterListener.Instance)); 85 | w.Options.ModuleKind = ModuleKind.Dll; 86 | w.Options.Logger = DummyLogger.NoThrowInstance; 87 | MainClass.MainModule.Write(file, w.Options); 88 | } 89 | private void SetControls(bool enabled) //Set the controls to enabled / disabled or visible while the obfuscation is in progress or not. 90 | { 91 | foreach (Control c in MainTheme.Controls) 92 | { 93 | if (c != bottomTxt && c != sLabel && c != StatusLbl && c != CancelBtn) 94 | { 95 | c.Enabled = enabled; 96 | 97 | } 98 | } 99 | ProtectBtn.Visible = enabled; 100 | CancelBtn.Visible = !enabled; 101 | } 102 | private void ChooseBtn_Click(object sender, EventArgs e) //Show file dialog. 103 | { 104 | OpenFileDialog dialog = new OpenFileDialog 105 | { 106 | Multiselect = false, 107 | Filter = ".DLL|*.dll; *.Dll" 108 | }; 109 | if (dialog.ShowDialog(this) == DialogResult.OK) 110 | { 111 | if((MainClass.Settings.AssemblyPath == string.Empty || MainClass.Settings.ContainingFolder == string.Empty) || MainClass.Settings.AssemblyPath != dialog.FileName) 112 | { 113 | StatusLbl.Text = "Idle"; 114 | StatusLbl.ForeColor = Color.Black; 115 | Exclusion.Types.Clear(); 116 | Exclusion.ExludedTypes.Clear(); 117 | } 118 | MainClass.Settings.AssemblyPath = dialog.FileName; 119 | MainClass.Settings.ContainingFolder = Path.GetDirectoryName(MainClass.Settings.AssemblyPath); 120 | PathTxt.Text = dialog.FileName; 121 | try 122 | { 123 | MainClass.MainModule = ModuleDefMD.Load(File.ReadAllBytes(MainClass.Settings.AssemblyPath)); 124 | } 125 | catch 126 | { 127 | MainClass.MainModule = null; 128 | } 129 | } 130 | } 131 | private void PathTxt_DragDrop(object sender, DragEventArgs e) //Ignore this. 132 | { 133 | 134 | } 135 | private void PathTxt_DragEnter(object sender, DragEventArgs e) //You can also drag your assembly directly to the text box instead of browsing it with the file dialog. 136 | { 137 | string[] files = (string[])e.Data.GetData(DataFormats.FileDrop); 138 | if (files != null && files.Length != 0) 139 | { 140 | string file = files[0]; 141 | if (file.EndsWith(".dll")) 142 | { 143 | if ((MainClass.Settings.AssemblyPath == string.Empty || MainClass.Settings.ContainingFolder == string.Empty) || MainClass.Settings.AssemblyPath != file) 144 | { 145 | StatusLbl.Text = "Idle"; 146 | StatusLbl.ForeColor = Color.Black; 147 | Exclusion.Types.Clear(); 148 | Exclusion.ExludedTypes.Clear(); 149 | e.Effect = DragDropEffects.Copy; 150 | PathTxt.Text = file; 151 | MainClass.Settings.AssemblyPath = file; 152 | } 153 | } 154 | } 155 | } 156 | private void PathTxt_TextChanged(object sender, EventArgs e) //Updates the main module when the path of the assembly changes. 157 | { 158 | MainClass.Settings.AssemblyPath = PathTxt.Text; 159 | try 160 | { 161 | MainClass.MainModule = ModuleDefMD.Load(File.ReadAllBytes(MainClass.Settings.AssemblyPath)); 162 | } 163 | catch 164 | { 165 | } 166 | } 167 | /* The rest are just functions of what happens when the checkboxes are checked / unchecked. */ 168 | private void AntiILDasmCB_CheckedChanged(object sender, EventArgs e) 169 | { 170 | MainClass.Settings.AntiILDasm = AntiILDasmCB.Checked; 171 | SystemSounds.Asterisk.Play(); 172 | } 173 | private void RenameNamespacesCB_CheckedChanged(object sender, EventArgs e) 174 | { 175 | MainClass.Settings.RenameNamespaces = RenameNamespacesCB.Checked; 176 | SystemSounds.Asterisk.Play(); 177 | } 178 | 179 | private void RenameTypesCB_CheckedChanged(object sender, EventArgs e) 180 | { 181 | MainClass.Settings.RenameTypes = RenameTypesCB.Checked; 182 | SystemSounds.Asterisk.Play(); 183 | } 184 | 185 | private void RenameMethodsCB_CheckedChanged(object sender, EventArgs e) 186 | { 187 | MainClass.Settings.RenameMethods = RenameMethodsCB.Checked; 188 | SystemSounds.Asterisk.Play(); 189 | } 190 | 191 | private void RenameFieldsCB_CheckedChanged(object sender, EventArgs e) 192 | { 193 | MainClass.Settings.RenameFields = RenameFieldsCB.Checked; 194 | SystemSounds.Asterisk.Play(); 195 | } 196 | 197 | private void RenamePropertiesCB_CheckedChanged(object sender, EventArgs e) 198 | { 199 | MainClass.Settings.RenameProperties = RenamePropertiesCB.Checked; 200 | SystemSounds.Asterisk.Play(); 201 | } 202 | private void AntiTamperingCB_CheckedChanged(object sender, EventArgs e) 203 | { 204 | MainClass.Settings.AntiTampering = AntiTamperingCB.Checked; 205 | SystemSounds.Asterisk.Play(); 206 | } 207 | private void RandomNameRB_CheckedChanged(object sender, EventArgs e) 208 | { 209 | MainClass.Settings.RandomName = true; 210 | MainClass.Settings.EmptyName = false; 211 | SystemSounds.Asterisk.Play(); 212 | } 213 | private void StringEcnryptionCB_CheckedChanged(object sender, EventArgs e) 214 | { 215 | MainClass.Settings.StringEcnryption = StringEncnryptionCB.Checked; 216 | SystemSounds.Asterisk.Play(); 217 | } 218 | private void EmptyNameRB_CheckedChanged(object sender, EventArgs e) 219 | { 220 | MainClass.Settings.RandomName = false; 221 | MainClass.Settings.EmptyName = true; 222 | SystemSounds.Asterisk.Play(); 223 | } 224 | 225 | private void ExcludeTypesBtn_Click(object sender, EventArgs e) //Shows the 'Exclude Types' form. 226 | { 227 | try 228 | { 229 | MainClass.MainModule = ModuleDefMD.Load(File.ReadAllBytes(MainClass.Settings.AssemblyPath)); 230 | } 231 | catch 232 | { 233 | MainClass.MainModule = null; 234 | } 235 | new ExcludeTypesForm().ShowDialog(); 236 | } 237 | private void OpenFolderBtn_Click(object sender, EventArgs e) //Opens the containing folder. 238 | { 239 | if(MainClass.Settings.ContainingFolder == string.Empty || !Directory.Exists(MainClass.Settings.ContainingFolder)) 240 | { 241 | return; 242 | } 243 | Process.Start(MainClass.Settings.ContainingFolder); 244 | } 245 | private void ProtectBtn_Click(object sender, EventArgs e) //Protects the assembly. 246 | { 247 | if (!MainClass.Settings.AssemblyExists) 248 | { 249 | MessageBox.Show("DLL not found!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 250 | return; 251 | } 252 | else if (!MainClass.Settings.IsAssemblyDotNet) 253 | { 254 | MessageBox.Show("The selected assebly is not a .NET module!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 255 | return; 256 | } 257 | else 258 | { 259 | if (MainClass.Settings.Check()) 260 | { 261 | MainClass.ObfuscationThread = new Thread(Protect); 262 | MainClass.ObfuscationThread.Start(); 263 | 264 | } 265 | } 266 | } 267 | 268 | private void AboutBtn_Click(object sender, EventArgs e) //Just an "About" dialog. 269 | { 270 | MessageBox.Show("Coded by AkyrosXD", "About", MessageBoxButtons.OK, MessageBoxIcon.Information); 271 | } 272 | 273 | private void ResetBtn_Click(object sender, EventArgs e) //Resets all the settings. 274 | { 275 | foreach (Control c in SettingsBox.Controls) 276 | { 277 | if (c is CheckBox cb) 278 | { 279 | if (cb.Checked) 280 | { 281 | DialogResult r = MessageBox.Show("All the settings will be reseted!\nAre you sure you want to continue?", "Question", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); 282 | if(r == DialogResult.OK) 283 | { 284 | MainClass.Settings.Reset(SettingsBox.Controls); 285 | } 286 | else 287 | { 288 | break; 289 | } 290 | } 291 | } 292 | } 293 | } 294 | private void RestartBtn(object sender, EventArgs e) //Restarts the form. 295 | { 296 | MainClass.Settings.Restart(this); 297 | } 298 | private void ExitBtn_Click(object sender, EventArgs e) 299 | { 300 | Close(); 301 | } 302 | 303 | private void ExcludeStringsBtn_Click(object sender, EventArgs e) //Shows the 'Exlude Strings' form. 304 | { 305 | try 306 | { 307 | MainClass.MainModule = ModuleDefMD.Load(File.ReadAllBytes(MainClass.Settings.AssemblyPath)); 308 | } 309 | catch 310 | { 311 | MainClass.MainModule = null; 312 | } 313 | new ExcludeStringsForm().ShowDialog(); 314 | } 315 | 316 | private void HelpBtn_Click(object sender, EventArgs e) //Shows the 'Help' form. For more info if someone needs help. 317 | { 318 | new HelpForm().ShowDialog(); 319 | } 320 | 321 | private void CancelBtn_Click(object sender, EventArgs e) //Cancels the obfuscation task if it's still in progress. 322 | { 323 | if(MainClass.ObfuscationThread != null) 324 | { 325 | MainClass.ObfuscationThread.Abort(); 326 | StatusLbl.Text = "Canceled!"; 327 | StatusLbl.ForeColor = Color.Red; 328 | } 329 | } 330 | 331 | private void MainTheme_Click(object sender, EventArgs e) //Ignore this. 332 | { 333 | 334 | } 335 | 336 | private void StringEncrypyionTypeCB_SelectedIndexChanged(object sender, EventArgs e) //Changes the string encryption level when the index of the combo box changes. 337 | { 338 | MainClass.Settings.StringEncryptionLevel = StringEncrypyionTypeCB.SelectedIndex; 339 | } 340 | } 341 | } -------------------------------------------------------------------------------- /Unity3DObfuscator/MainForm.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /Unity3DObfuscator/ObfuscationSettings.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.IO; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | using System.Windows.Forms; 9 | 10 | namespace Unity3DObfuscator 11 | { 12 | //All the obfuscation settings. 13 | public class ObfuscationSettings 14 | { 15 | private string assemblyPath = string.Empty; 16 | private string containingFolder = string.Empty; 17 | private bool antiILDasm = false; 18 | private bool renameNamespaces = false; 19 | private bool renameTypes = false; 20 | private bool renameMethods = false; 21 | private bool renameFields = false; 22 | private bool renameProperties = false; 23 | private bool stringEcnryption = false; 24 | private bool antiTampering = false; 25 | private bool randomName = true; 26 | private bool emptyName = false; 27 | private int stringEncryptionLevel = 1; 28 | public bool IsAssemblyDotNet => GetIsAssemblyDotNet(); 29 | public bool AssemblyExists => GetAssemblyExists(); 30 | public string AssemblyPath { get => assemblyPath; set => assemblyPath = value; } 31 | public string ContainingFolder { get => containingFolder; set => containingFolder = value; } 32 | public bool AntiILDasm { get => antiILDasm; set => antiILDasm = value; } 33 | public bool RenameNamespaces { get => renameNamespaces; set => renameNamespaces = value; } 34 | public bool RenameTypes { get => renameTypes; set => renameTypes = value; } 35 | public bool RenameMethods { get => renameMethods; set => renameMethods = value; } 36 | public bool RenameFields { get => renameFields; set => renameFields = value; } 37 | public bool RenameProperties { get => renameProperties; set => renameProperties = value; } 38 | public bool StringEcnryption { get => stringEcnryption; set => stringEcnryption = value; } 39 | public bool AntiTampering { get => antiTampering; set => antiTampering = value; } 40 | public bool RandomName { get => randomName; set => randomName = value; } 41 | public bool EmptyName { get => emptyName; set => emptyName = value; } 42 | public int StringEncryptionLevel { get => stringEncryptionLevel; set => stringEncryptionLevel = value; } 43 | 44 | public void Restart(Form currentForm) //Restats the application. 45 | { 46 | Process.Start(Application.ExecutablePath); 47 | currentForm.Close(); 48 | } 49 | public void Reset(Control.ControlCollection settingsControls) //Resets all the settings. 50 | { 51 | foreach (Control c in settingsControls) 52 | { 53 | if (c is CheckBox cb) 54 | { 55 | cb.Checked = false; 56 | } 57 | } 58 | } 59 | public bool Check() //Checks if one of the checkboxes is checked. 60 | { 61 | return (antiILDasm || renameNamespaces || renameTypes || renameMethods || renameFields || renameProperties || antiTampering || stringEcnryption); 62 | } 63 | private bool GetIsAssemblyDotNet() //Checks if the selected assembly is a .NET module. Source: https://stackoverflow.com/questions/1366503/best-way-to-check-if-a-dll-file-is-a-clr-assembly-in-c-sharp/1366517#1366517 64 | { 65 | Stream fs = new FileStream(assemblyPath, FileMode.Open, FileAccess.Read); 66 | BinaryReader reader = new BinaryReader(fs); 67 | fs.Position = 60; 68 | var peHeader = reader.ReadUInt32(); 69 | fs.Position = peHeader; 70 | uint[] dataDictionaryRva = new uint[16]; 71 | uint[] dataDictionarySize = new uint[16]; 72 | var peHeaderSignature = reader.ReadUInt32(); 73 | var machine = reader.ReadUInt16(); 74 | var sections = reader.ReadUInt16(); 75 | var timestamp = reader.ReadUInt32(); 76 | var pSymbolTable = reader.ReadUInt32(); 77 | var noOfSymbol = reader.ReadUInt32(); 78 | var optionalHeaderSize = reader.ReadUInt16(); 79 | var characteristics = reader.ReadUInt16(); 80 | var dataDictionaryStart = Convert.ToUInt16(Convert.ToUInt16(fs.Position) + 96); 81 | fs.Position = dataDictionaryStart; 82 | for (int i = 0; i < 15; i++) 83 | { 84 | dataDictionaryRva[i] = reader.ReadUInt32(); 85 | dataDictionarySize[i] = reader.ReadUInt32(); 86 | } 87 | if (dataDictionaryRva[14] == 0) 88 | { 89 | fs.Close(); 90 | return false; 91 | } 92 | fs.Close(); 93 | return true; 94 | } 95 | private bool GetAssemblyExists() 96 | { 97 | return (File.Exists(assemblyPath)); 98 | } 99 | public Type GetStringDencryptionType() //Get the string dencryption type. 100 | { 101 | switch (stringEncryptionLevel) 102 | { 103 | case 1: 104 | return typeof(StringDecryptionHelpers.Normal); 105 | 106 | case 2: 107 | return typeof(StringDecryptionHelpers.Strong); 108 | } 109 | return typeof(StringDecryptionHelpers.Weak); 110 | } 111 | public string GetStringDencryptionMethod() //Gets the method that decrypts the string. 112 | { 113 | switch (stringEncryptionLevel) 114 | { 115 | case 1: 116 | return "c"; 117 | 118 | case 2: 119 | return "d"; 120 | } 121 | return "b"; 122 | } 123 | } 124 | } -------------------------------------------------------------------------------- /Unity3DObfuscator/ObfuscatorHelp.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Unity3DObfuscator 8 | { 9 | //The help tabs. 10 | public struct ObfuscatorHelp 11 | { 12 | public static string Renaming => GetRenaming(); 13 | public static string StringEncryption => GetStringEcryption(); 14 | public static string AntiTampering => GetAntiTampering(); 15 | 16 | private static string GetRenaming() 17 | { 18 | return "Renaming obfuscation protects your assembly by renaming classes, methods, fields and properties with random letters or an empty text. You can also exclude the types that you don't wanna be renamed, that also includes its methods, fields and other.. Classes that have 'MonoBehaviour' as Base Type, will not be renamed. This obfuscation will make it harder for a person to understand what some classes and other things do."; 19 | } 20 | private static string GetStringEcryption() 21 | { 22 | return "String encryption encrypts all the strings in the assembly. Which means it will be harder for a person to read a string / text by encoding it. This function is very usefull if you want to hide a license key or something similar."; 23 | } 24 | private static string GetAntiTampering() 25 | { 26 | return "Anti tampering is a protection that prevents your assembly to be modified. If someone tries to modify your assembly, None of the code on the assembly will work when the hacker tries to open the game with the modified version of the assembly."; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Unity3DObfuscator/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Windows.Forms; 6 | 7 | namespace Unity3DObfuscator 8 | { 9 | static class Program 10 | { 11 | /// 12 | /// The main entry point for the application. 13 | /// 14 | [STAThread] 15 | static void Main() 16 | { 17 | Application.EnableVisualStyles(); 18 | Application.SetCompatibleTextRenderingDefault(false); 19 | Application.Run(new MainForm()); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Unity3DObfuscator/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Unity3D Obfuscator")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("AkyrosXD")] 12 | [assembly: AssemblyProduct("Unity3D Obfuscator")] 13 | [assembly: AssemblyCopyright("Copyright © Pussy 2018")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(true)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("65485e2b-fa14-4f59-bde7-f4f3e7909321")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Unity3DObfuscator/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Unity3DObfuscator.Properties 12 | { 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources 26 | { 27 | 28 | private static global::System.Resources.ResourceManager resourceMan; 29 | 30 | private static global::System.Globalization.CultureInfo resourceCulture; 31 | 32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 33 | internal Resources() 34 | { 35 | } 36 | 37 | /// 38 | /// Returns the cached ResourceManager instance used by this class. 39 | /// 40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 41 | internal static global::System.Resources.ResourceManager ResourceManager 42 | { 43 | get 44 | { 45 | if ((resourceMan == null)) 46 | { 47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Unity3DObfuscator.Properties.Resources", typeof(Resources).Assembly); 48 | resourceMan = temp; 49 | } 50 | return resourceMan; 51 | } 52 | } 53 | 54 | /// 55 | /// Overrides the current thread's CurrentUICulture property for all 56 | /// resource lookups using this strongly typed resource class. 57 | /// 58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 59 | internal static global::System.Globalization.CultureInfo Culture 60 | { 61 | get 62 | { 63 | return resourceCulture; 64 | } 65 | set 66 | { 67 | resourceCulture = value; 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /Unity3DObfuscator/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /Unity3DObfuscator/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Unity3DObfuscator.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Unity3DObfuscator/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Unity3DObfuscator/RenamingClass.cs: -------------------------------------------------------------------------------- 1 | using dnlib.DotNet; 2 | using System.Collections.Generic; 3 | 4 | namespace Unity3DObfuscator 5 | { 6 | //The renaming class. 7 | public class RenamingClass 8 | { 9 | public void RenameNamespaces() //Renames the namespaces. It doesn't rename a namespace of a type if the type is excluded. 10 | { 11 | if (!MainClass.Settings.RenameNamespaces) 12 | { 13 | return; 14 | } 15 | foreach (TypeDef type in MainClass.MainModule.Types) 16 | { 17 | if (TypeExists(type)) 18 | { 19 | if (!Exclusion.ExludedTypes.Contains(type.FullName)) 20 | { 21 | if (IsMonoType(type)) 22 | { 23 | continue; 24 | } 25 | else 26 | { 27 | type.Namespace = GlobalStrings.RandomString; 28 | } 29 | } 30 | } 31 | } 32 | } 33 | public void RenameTypes() //Renames the types. It doesn't rename the types that are excluded or have 'MonoBehaviour' as BaseType. 34 | { 35 | if (!MainClass.Settings.RenameTypes) 36 | { 37 | return; 38 | } 39 | foreach (TypeDef type in MainClass.MainModule.Types) 40 | { 41 | if (TypeExists(type)) 42 | { 43 | if (!Exclusion.ExludedTypes.Contains(type.FullName)) 44 | { 45 | if(IsMonoType(type)) 46 | { 47 | continue; 48 | } 49 | else 50 | { 51 | type.Name = GlobalStrings.RenamingString; 52 | } 53 | foreach (TypeDef nestedType in type.NestedTypes) 54 | { 55 | if (TypeExists(nestedType)) 56 | { 57 | nestedType.Name = GlobalStrings.RenamingString; 58 | } 59 | } 60 | } 61 | } 62 | } 63 | } 64 | public void RenameMethods() //Renames the methods. It doesn't rename the methods that their type is excluded or are execution functions in Unity. Example: Start, Update, OnGUI, etc... 65 | { 66 | if (!MainClass.Settings.RenameMethods) 67 | { 68 | return; 69 | } 70 | foreach (TypeDef type in MainClass.MainModule.Types) 71 | { 72 | if (TypeExists(type)) 73 | { 74 | if (!Exclusion.ExludedTypes.Contains(type.FullName)) 75 | { 76 | foreach (MethodDef method in type.Methods) 77 | { 78 | if (MethodExists(type, method)) 79 | { 80 | if (method.Name != ".ctor" && method.Name != ".cctor") 81 | { 82 | if (IsMonoType(type)) 83 | { 84 | if (!Exclusion.UnityFunctions.Contains(method.Name)) 85 | { 86 | method.Name = GlobalStrings.RenamingString; 87 | } 88 | } 89 | else 90 | { 91 | method.Name = GlobalStrings.RenamingString; 92 | } 93 | if (method.HasParamDefs) 94 | { 95 | foreach (ParamDef pr in method.ParamDefs) 96 | { 97 | if (pr == null) 98 | { 99 | return; 100 | } 101 | pr.Name = GlobalStrings.RandomString; 102 | } 103 | } 104 | } 105 | } 106 | KeepOldMaxStack(method); //Keeps the old MaxStack. 107 | } 108 | } 109 | } 110 | } 111 | } 112 | public void RenameFields() //Renames the fields. It doesn't rename the fields that their type is excluded. 113 | { 114 | if (!MainClass.Settings.RenameFields) 115 | { 116 | return; 117 | } 118 | foreach (TypeDef type in MainClass.MainModule.Types) 119 | { 120 | if (TypeExists(type)) 121 | { 122 | if (!Exclusion.ExludedTypes.Contains(type.FullName)) 123 | { 124 | foreach (FieldDef field in type.Fields) 125 | { 126 | if (FieldExists(type, field)) 127 | { 128 | field.Name = GlobalStrings.RenamingString; 129 | } 130 | } 131 | foreach (TypeDef nestedType in type.NestedTypes) 132 | { 133 | if (TypeExists(nestedType)) 134 | { 135 | foreach (FieldDef field in nestedType.Fields) 136 | { 137 | if (FieldExists(nestedType, field)) 138 | { 139 | field.Name = GlobalStrings.RenamingString; 140 | } 141 | } 142 | } 143 | } 144 | } 145 | } 146 | } 147 | } 148 | public void RenameProperties() //Renames the properties. It doesn't rename the properties that their type is excluded. 149 | { 150 | if (!MainClass.Settings.RenameProperties) 151 | { 152 | return; 153 | } 154 | foreach (TypeDef type in MainClass.MainModule.Types) 155 | { 156 | if (TypeExists(type)) 157 | { 158 | if (!Exclusion.ExludedTypes.Contains(type.FullName)) 159 | { 160 | foreach (PropertyDef property in type.Properties) 161 | { 162 | if (PropertyExists(type, property)) 163 | { 164 | property.Name = GlobalStrings.RenamingString; 165 | } 166 | } 167 | foreach (TypeDef nestedType in type.NestedTypes) 168 | { 169 | if (TypeExists(nestedType)) 170 | { 171 | foreach (PropertyDef property in nestedType.Properties) 172 | { 173 | if (PropertyExists(nestedType, property)) 174 | { 175 | property.Name = GlobalStrings.RenamingString; 176 | } 177 | } 178 | } 179 | } 180 | } 181 | } 182 | } 183 | } 184 | private void KeepOldMaxStack(MethodDef method) //Keeps the old MaxStack of every method. 185 | { 186 | if (method != null) 187 | { 188 | if (method.HasBody) 189 | { 190 | if (!method.Body.KeepOldMaxStack) 191 | { 192 | method.Body.KeepOldMaxStack = true; 193 | } 194 | } 195 | } 196 | } 197 | private TypeDef FindType(string typeName) //I made this functions that finds the Type by their name. 198 | { 199 | foreach (TypeDef type in MainClass.MainModule.Types) 200 | { 201 | if (type.Name == typeName) 202 | { 203 | return type; 204 | } 205 | } 206 | return null; 207 | } 208 | private bool TypeExists(TypeDef type) //Checks if the type exists. 209 | { 210 | return (type != null && MainClass.MainModule.HasTypes && !type.IsGlobalModuleType && (!type.Name.StartsWith("<") && !type.Name.EndsWith(">"))); 211 | } 212 | private bool MethodExists(TypeDef type, MethodDef method) //Checks if the method exists. 213 | { 214 | return (method != null && !type.IsGlobalModuleType && (!type.Name.StartsWith("<") && !type.Name.EndsWith(">")) && type.HasMethods && method != null && method.HasBody && !method.IsVirtual); 215 | } 216 | private bool FieldExists(TypeDef type, FieldDef field) //Checks if the field exists. 217 | { 218 | return (type != null && !type.IsGlobalModuleType && (!type.Name.StartsWith("<") && !type.Name.EndsWith(">")) && type.HasFields && field != null); 219 | } 220 | private bool PropertyExists(TypeDef type, PropertyDef property) //Checks if the property exists. 221 | { 222 | return (type != null && !type.IsGlobalModuleType && (!type.Name.StartsWith("<") && !type.Name.EndsWith(">")) && type.HasProperties && property != null); 223 | } 224 | private bool IsMonoType(TypeDef type) //Checks if the type is a 'MonoBehaviour' type. which most of the time a 'MonoBehaviour' type is a script of the game and it won't work if the type gets renamed. 225 | { 226 | List monoTypes = new List(new TypeDef[0]); 227 | if (type.BaseType != null && type.BaseType.TypeName == "MonoBehaviour") 228 | { 229 | if (!monoTypes.Contains(type)) 230 | { 231 | monoTypes.Add(type); 232 | } 233 | } 234 | TypeDef bType2 = null; 235 | TypeDef bType3 = null; 236 | TypeDef bType4 = null; 237 | TypeDef bType5 = null; 238 | if (type.BaseType != null) 239 | { 240 | bType2 = FindType(type.BaseType.TypeName); 241 | } 242 | if (bType2 != null && bType2.BaseType != null) 243 | { 244 | bType3 = FindType(bType2.BaseType.TypeName); 245 | } 246 | if (bType3 != null && bType3.BaseType != null) 247 | { 248 | bType4 = FindType(bType2.BaseType.TypeName); 249 | } 250 | if (bType4 != null && bType4.BaseType != null) 251 | { 252 | bType5 = FindType(bType2.BaseType.TypeName); 253 | } 254 | return ((type.BaseType != null && type.BaseType.TypeName == "MonoBehaviour") || (monoTypes.Contains(type)) || (FindType(type.BaseType.TypeName) != null && monoTypes.Contains(FindType(type.BaseType.TypeName))) || (type.BaseType != null && type.BaseType.TypeName == "MonoBehaviour") || ((bType2 != null && bType2.BaseType.TypeName == "MonoBehaviour") || (bType3 != null && bType3.BaseType.TypeName == "MonoBehaviour") || (bType4 != null && bType4.BaseType.TypeName == "MonoBehaviour") || (bType5 != null && bType5.BaseType.TypeName == "MonoBehaviour"))); 255 | } 256 | } 257 | } -------------------------------------------------------------------------------- /Unity3DObfuscator/StringDecryptionHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Security.Cryptography; 7 | using System.IO; 8 | 9 | namespace Unity3DObfuscator 10 | { 11 | //String Decryption Helper class. 12 | public class StringDecryptionHelpers 13 | { 14 | internal class Weak 15 | { 16 | internal static string a(string text) 17 | { 18 | return Encoding.ASCII.GetString(Convert.FromBase64String(text)); 19 | } 20 | internal static string b(string text) 21 | { 22 | return a(a(a(a(a(text))))); 23 | } 24 | } 25 | internal class Normal 26 | { 27 | internal static string a(string text) 28 | { 29 | return Encoding.ASCII.GetString(Convert.FromBase64String(text)); 30 | } 31 | internal static string b(string text) 32 | { 33 | return a(a(a(a(a(text))))); 34 | } 35 | internal static string c(string text) 36 | { 37 | return b(b(text)); 38 | } 39 | } 40 | internal class Strong 41 | { 42 | internal static string a(string text) 43 | { 44 | return Encoding.ASCII.GetString(Convert.FromBase64String(text)); 45 | } 46 | internal static string b(string text) 47 | { 48 | return a(a(a(a(a(text))))); 49 | } 50 | internal static string c(string text) 51 | { 52 | return b(b(text)); 53 | } 54 | internal static string d(string text) 55 | { 56 | return a(b(text)); 57 | } 58 | } 59 | } 60 | } -------------------------------------------------------------------------------- /Unity3DObfuscator/StringEncoding.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Unity3DObfuscator 8 | { 9 | public struct StringEncoding 10 | { 11 | private static string a(string text) //encoding 12 | { 13 | return Convert.ToBase64String(Encoding.UTF8.GetBytes(text)); 14 | } 15 | private static string b(string text) //weak 16 | { 17 | return a(a(a(a(a(text))))); 18 | } 19 | private static string c(string text) //normal 20 | { 21 | return b(b(text)); 22 | } 23 | private static string d(string text) //strong 24 | { 25 | return a(b(text)); 26 | } 27 | public static string EncryptString(string text) 28 | { 29 | switch (MainClass.Settings.StringEncryptionLevel) 30 | { 31 | case 1: 32 | return c(text); 33 | 34 | case 2: 35 | return d(text); 36 | } 37 | return b(text); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Unity3DObfuscator/StringEncryptionClass.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using dnlib.DotNet; 6 | using System.Security.Cryptography; 7 | using System.IO; 8 | using dnlib.DotNet.Emit; 9 | 10 | namespace Unity3DObfuscator 11 | { 12 | //String Encryption class. 13 | public class StringEncryptionClass 14 | { 15 | public void Encrypt() 16 | { 17 | if (!MainClass.Settings.StringEcnryption) 18 | { 19 | return; 20 | } 21 | Protect(MainClass.MainModule); 22 | } 23 | private static MethodDef _injectedMethodDef; 24 | 25 | private void Protect(ModuleDefMD module) //module equals the loaded file 26 | { 27 | InjectClass(module); 28 | ProtectStrings(module); 29 | } 30 | private void ProtectStrings(ModuleDefMD module) //Encodes all the strings. 31 | { 32 | foreach (TypeDef type in module.GetTypes()) 33 | { 34 | foreach (MethodDef method in type.Methods) 35 | { 36 | if (!method.HasBody) continue; 37 | var instr = method.Body.Instructions; 38 | for (int i = 0; i < instr.Count; i++) 39 | { 40 | if (instr[i].OpCode == OpCodes.Ldstr) 41 | { 42 | var originalStr = instr[i].Operand as string; 43 | if (Exclusion.ExcludedStrings.Contains(originalStr)) 44 | { 45 | continue; 46 | } 47 | var encodedStr = StringEncoding.EncryptString(originalStr); 48 | instr[i].Operand = encodedStr; 49 | instr.Insert(i + 1, Instruction.Create(OpCodes.Call, _injectedMethodDef)); 50 | method.Body.SimplifyBranches(); 51 | method.Body.OptimizeBranches(); 52 | } 53 | } 54 | } 55 | } 56 | } 57 | private static void InjectClass(ModuleDef module) //Injects the StringDecryptionHelper functions in to the assembly. 58 | { 59 | Type type = MainClass.Settings.GetStringDencryptionType(); 60 | ModuleDefMD typeModule = ModuleDefMD.Load(type.Module); 61 | TypeDef typeDef = typeModule.ResolveTypeDef(MDToken.ToRID(type.MetadataToken)); 62 | IEnumerable members = InjectHelper.Inject(typeDef, module.GlobalType, module); 63 | _injectedMethodDef = (MethodDef)members.Single(method => method.Name == MainClass.Settings.GetStringDencryptionMethod()); 64 | foreach (MethodDef md in module.GlobalType.Methods) 65 | { 66 | if (md.Name == ".ctor") 67 | { 68 | module.GlobalType.Remove(md); 69 | break; 70 | } 71 | } 72 | } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /Unity3DObfuscator/Unity3DObfuscator.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {65485E2B-FA14-4F59-BDE7-F4F3E7909321} 8 | WinExe 9 | Unity3DObfuscator 10 | Unity3DObfuscator 11 | v4.5.2 12 | 512 13 | true 14 | 15 | 16 | AnyCPU 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | AnyCPU 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | False 37 | .\dnlib.dll 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | Component 56 | 57 | 58 | Form 59 | 60 | 61 | ExcludeStringsForm.cs 62 | 63 | 64 | Form 65 | 66 | 67 | ExcludeTypesForm.cs 68 | 69 | 70 | 71 | Form 72 | 73 | 74 | HelpForm.cs 75 | 76 | 77 | 78 | 79 | Form 80 | 81 | 82 | MainForm.cs 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | ExcludeStringsForm.cs 96 | 97 | 98 | ExcludeTypesForm.cs 99 | 100 | 101 | HelpForm.cs 102 | 103 | 104 | MainForm.cs 105 | 106 | 107 | ResXFileCodeGenerator 108 | Resources.Designer.cs 109 | Designer 110 | 111 | 112 | True 113 | Resources.resx 114 | 115 | 116 | SettingsSingleFileGenerator 117 | Settings.Designer.cs 118 | 119 | 120 | True 121 | Settings.settings 122 | True 123 | 124 | 125 | 126 | 127 | 128 | 129 | -------------------------------------------------------------------------------- /Unity3DObfuscator/Watermarking.cs: -------------------------------------------------------------------------------- 1 | using dnlib.DotNet; 2 | using dnlib.DotNet.Emit; 3 | using System; 4 | 5 | namespace Unity3DObfuscator 6 | { 7 | //Watermarking class. 8 | //Credit: The original custom attribute functions are from the ConfuserEx project. 9 | public class Watermarking 10 | { 11 | public static void AddCustomAttributeToAssembly(string Namespace, string AttributeName, string Value) //Adds a custom attribute to the assembly. 12 | { 13 | TypeRef attrRef = MainClass.MainModule.CorLibTypes.GetTypeRef("System", "Attribute"); 14 | TypeDefUser attrType = new TypeDefUser(Namespace, AttributeName, attrRef); 15 | MainClass.MainModule.Types.Add(attrType); 16 | MethodDefUser ctor = new MethodDefUser(".ctor", MethodSig.CreateInstance(MainClass.MainModule.CorLibTypes.Void, MainClass.MainModule.CorLibTypes.String), MethodImplAttributes.IL, MethodAttributes.FamANDAssem | MethodAttributes.Family | MethodAttributes.Public | MethodAttributes.HideBySig | MethodAttributes.SpecialName | MethodAttributes.RTSpecialName) 17 | { 18 | Body = new CilBody() 19 | { 20 | MaxStack = 1 21 | } 22 | }; 23 | ctor.Body.Instructions.Add(OpCodes.Ldarg_0.ToInstruction()); 24 | ctor.Body.Instructions.Add(OpCodes.Call.ToInstruction(new MemberRefUser(MainClass.MainModule, ".ctor", MethodSig.CreateInstance(MainClass.MainModule.CorLibTypes.Void), attrRef))); 25 | ctor.Body.Instructions.Add(OpCodes.Ret.ToInstruction()); 26 | attrType.Methods.Add(ctor); 27 | CustomAttribute attr = new CustomAttribute(ctor); 28 | attr.ConstructorArguments.Add(new CAArgument(MainClass.MainModule.CorLibTypes.String, Value)); 29 | MainClass.MainModule.Assembly.CustomAttributes.Add(attr); 30 | } 31 | private static void AddCustomAttributeToModule(string Namespace, string AttributeName, string Value) //Adds a custom attribute to the module. 32 | { 33 | TypeRef attrRef = MainClass.MainModule.CorLibTypes.GetTypeRef("System", "Attribute"); 34 | TypeDefUser attrType = new TypeDefUser(Namespace, AttributeName, attrRef); 35 | MainClass.MainModule.Types.Add(attrType); 36 | MethodDefUser ctor = new MethodDefUser(".ctor", MethodSig.CreateInstance(MainClass.MainModule.CorLibTypes.Void, MainClass.MainModule.CorLibTypes.String), MethodImplAttributes.IL, MethodAttributes.FamANDAssem | MethodAttributes.Family | MethodAttributes.Public | MethodAttributes.HideBySig | MethodAttributes.SpecialName | MethodAttributes.RTSpecialName) 37 | { 38 | Body = new CilBody() 39 | { 40 | MaxStack = 1 41 | } 42 | }; 43 | ctor.Body.Instructions.Add(OpCodes.Ldarg_0.ToInstruction()); 44 | ctor.Body.Instructions.Add(OpCodes.Call.ToInstruction(new MemberRefUser(MainClass.MainModule, ".ctor", MethodSig.CreateInstance(MainClass.MainModule.CorLibTypes.Void), attrRef))); 45 | ctor.Body.Instructions.Add(OpCodes.Ret.ToInstruction()); 46 | attrType.Methods.Add(ctor); 47 | CustomAttribute attr = new CustomAttribute(ctor); 48 | attr.ConstructorArguments.Add(new CAArgument(MainClass.MainModule.CorLibTypes.String, Value)); 49 | MainClass.MainModule.CustomAttributes.Add(attr); 50 | } 51 | public static void Watermark(string Namespace, string AttributeName, string Value) //Watermaking function. 52 | { 53 | AddCustomAttributeToAssembly(Namespace, AttributeName, Value); 54 | AddCustomAttributeToModule(Namespace, AttributeName, Value); 55 | } 56 | public static void RemoveAttributeType(string typeFullName) //Removes a custom attribute. (A part of the Anti Tampering class) 57 | { 58 | try 59 | { 60 | TypeDef bType = null; 61 | MethodDef bMethod = null; 62 | foreach (TypeDef type in MainClass.MainModule.Types) 63 | { 64 | if (type.FullName == typeFullName) 65 | { 66 | bType = type; 67 | foreach(MethodDef method in type.Methods) 68 | { 69 | bMethod = method; 70 | } 71 | } 72 | } 73 | if(bMethod != null) 74 | { 75 | bType.Remove(bMethod); 76 | } 77 | if(bType != null) 78 | { 79 | MainClass.MainModule.Types.Remove(bType); 80 | } 81 | } 82 | catch 83 | { 84 | 85 | } 86 | } 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /Unity3DObfuscator/bin/Debug/Unity3DObfuscator.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bmjoy/Unity3D_Obfuscator/c848ea715d50c033b4004d12cf22a1cac5b816b8/Unity3DObfuscator/bin/Debug/Unity3DObfuscator.exe -------------------------------------------------------------------------------- /Unity3DObfuscator/bin/Debug/Unity3DObfuscator.exe.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Unity3DObfuscator/bin/Debug/Unity3DObfuscator.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bmjoy/Unity3D_Obfuscator/c848ea715d50c033b4004d12cf22a1cac5b816b8/Unity3DObfuscator/bin/Debug/Unity3DObfuscator.pdb -------------------------------------------------------------------------------- /Unity3DObfuscator/bin/Debug/dnlib.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bmjoy/Unity3D_Obfuscator/c848ea715d50c033b4004d12cf22a1cac5b816b8/Unity3DObfuscator/bin/Debug/dnlib.dll -------------------------------------------------------------------------------- /Unity3DObfuscator/dnlib.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bmjoy/Unity3D_Obfuscator/c848ea715d50c033b4004d12cf22a1cac5b816b8/Unity3DObfuscator/dnlib.dll -------------------------------------------------------------------------------- /Unity3DObfuscator/obj/Debug/CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | 4caec689fda36a48dc066fdc55407e37e3fb8494 2 | -------------------------------------------------------------------------------- /Unity3DObfuscator/obj/Debug/DesignTimeResolveAssemblyReferences.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bmjoy/Unity3D_Obfuscator/c848ea715d50c033b4004d12cf22a1cac5b816b8/Unity3DObfuscator/obj/Debug/DesignTimeResolveAssemblyReferences.cache -------------------------------------------------------------------------------- /Unity3DObfuscator/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bmjoy/Unity3D_Obfuscator/c848ea715d50c033b4004d12cf22a1cac5b816b8/Unity3DObfuscator/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /Unity3DObfuscator/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bmjoy/Unity3D_Obfuscator/c848ea715d50c033b4004d12cf22a1cac5b816b8/Unity3DObfuscator/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs -------------------------------------------------------------------------------- /Unity3DObfuscator/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bmjoy/Unity3D_Obfuscator/c848ea715d50c033b4004d12cf22a1cac5b816b8/Unity3DObfuscator/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs -------------------------------------------------------------------------------- /Unity3DObfuscator/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bmjoy/Unity3D_Obfuscator/c848ea715d50c033b4004d12cf22a1cac5b816b8/Unity3DObfuscator/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs -------------------------------------------------------------------------------- /Unity3DObfuscator/obj/Debug/Unity3DObfuscator.ExcludeStringsForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bmjoy/Unity3D_Obfuscator/c848ea715d50c033b4004d12cf22a1cac5b816b8/Unity3DObfuscator/obj/Debug/Unity3DObfuscator.ExcludeStringsForm.resources -------------------------------------------------------------------------------- /Unity3DObfuscator/obj/Debug/Unity3DObfuscator.ExcludeTypesForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bmjoy/Unity3D_Obfuscator/c848ea715d50c033b4004d12cf22a1cac5b816b8/Unity3DObfuscator/obj/Debug/Unity3DObfuscator.ExcludeTypesForm.resources -------------------------------------------------------------------------------- /Unity3DObfuscator/obj/Debug/Unity3DObfuscator.HelpForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bmjoy/Unity3D_Obfuscator/c848ea715d50c033b4004d12cf22a1cac5b816b8/Unity3DObfuscator/obj/Debug/Unity3DObfuscator.HelpForm.resources -------------------------------------------------------------------------------- /Unity3DObfuscator/obj/Debug/Unity3DObfuscator.MainForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bmjoy/Unity3D_Obfuscator/c848ea715d50c033b4004d12cf22a1cac5b816b8/Unity3DObfuscator/obj/Debug/Unity3DObfuscator.MainForm.resources -------------------------------------------------------------------------------- /Unity3DObfuscator/obj/Debug/Unity3DObfuscator.Properties.Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bmjoy/Unity3D_Obfuscator/c848ea715d50c033b4004d12cf22a1cac5b816b8/Unity3DObfuscator/obj/Debug/Unity3DObfuscator.Properties.Resources.resources -------------------------------------------------------------------------------- /Unity3DObfuscator/obj/Debug/Unity3DObfuscator.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | c:\users\vasilis\documents\visual studio 2017\Projects\Unity3DObfuscator\Unity3DObfuscator\bin\Debug\Unity3DObfuscator.exe.config 2 | c:\users\vasilis\documents\visual studio 2017\Projects\Unity3DObfuscator\Unity3DObfuscator\bin\Debug\Unity3DObfuscator.exe 3 | c:\users\vasilis\documents\visual studio 2017\Projects\Unity3DObfuscator\Unity3DObfuscator\bin\Debug\Unity3DObfuscator.pdb 4 | c:\users\vasilis\documents\visual studio 2017\Projects\Unity3DObfuscator\Unity3DObfuscator\obj\Debug\Unity3DObfuscator.csprojResolveAssemblyReference.cache 5 | c:\users\vasilis\documents\visual studio 2017\Projects\Unity3DObfuscator\Unity3DObfuscator\obj\Debug\Unity3DObfuscator.Properties.Resources.resources 6 | c:\users\vasilis\documents\visual studio 2017\Projects\Unity3DObfuscator\Unity3DObfuscator\obj\Debug\Unity3DObfuscator.csproj.GenerateResource.Cache 7 | c:\users\vasilis\documents\visual studio 2017\Projects\Unity3DObfuscator\Unity3DObfuscator\obj\Debug\Unity3DObfuscator.exe 8 | c:\users\vasilis\documents\visual studio 2017\Projects\Unity3DObfuscator\Unity3DObfuscator\obj\Debug\Unity3DObfuscator.pdb 9 | c:\users\vasilis\documents\visual studio 2017\Projects\Unity3DObfuscator\Unity3DObfuscator\obj\Debug\Unity3DObfuscator.MainForm.resources 10 | c:\users\vasilis\documents\visual studio 2017\Projects\Unity3DObfuscator\Unity3DObfuscator\bin\Debug\dnlib.dll 11 | C:\Users\Vasilis\Documents\Visual Studio 2017\Projects\Unity3DObfuscator\Unity3DObfuscator\obj\Debug\Unity3DObfuscator.ExcludeTypesForm.resources 12 | C:\Users\Vasilis\documents\visual studio 2017\Projects\Unity3DObfuscator\Unity3DObfuscator\obj\Debug\Unity3DObfuscator.ExcludeStringsForm.resources 13 | C:\Users\Vasilis\documents\visual studio 2017\Projects\Unity3DObfuscator\Unity3DObfuscator\obj\Debug\Unity3DObfuscator.HelpForm.resources 14 | -------------------------------------------------------------------------------- /Unity3DObfuscator/obj/Debug/Unity3DObfuscator.csproj.GenerateResource.Cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bmjoy/Unity3D_Obfuscator/c848ea715d50c033b4004d12cf22a1cac5b816b8/Unity3DObfuscator/obj/Debug/Unity3DObfuscator.csproj.GenerateResource.Cache -------------------------------------------------------------------------------- /Unity3DObfuscator/obj/Debug/Unity3DObfuscator.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bmjoy/Unity3D_Obfuscator/c848ea715d50c033b4004d12cf22a1cac5b816b8/Unity3DObfuscator/obj/Debug/Unity3DObfuscator.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /Unity3DObfuscator/obj/Debug/Unity3DObfuscator.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bmjoy/Unity3D_Obfuscator/c848ea715d50c033b4004d12cf22a1cac5b816b8/Unity3DObfuscator/obj/Debug/Unity3DObfuscator.exe -------------------------------------------------------------------------------- /Unity3DObfuscator/obj/Debug/Unity3DObfuscator.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bmjoy/Unity3D_Obfuscator/c848ea715d50c033b4004d12cf22a1cac5b816b8/Unity3DObfuscator/obj/Debug/Unity3DObfuscator.pdb --------------------------------------------------------------------------------