From 3582b773caaf1c0ca087d27a7050383135438b6b Mon Sep 17 00:00:00 2001 From: de4dot Date: Mon, 4 Jun 2012 04:20:43 +0200 Subject: [PATCH] Support ILP --- de4dot.code/de4dot.code.csproj | 4 + .../deobfuscators/ILProtector/Deobfuscator.cs | 124 +++++++++ .../deobfuscators/ILProtector/MainType.cs | 107 +++++++ .../deobfuscators/ILProtector/MethodReader.cs | 220 +++++++++++++++ .../ILProtector/MethodsDecrypter.cs | 263 ++++++++++++++++++ de4dot.cui/Program.cs | 1 + 6 files changed, 719 insertions(+) create mode 100644 de4dot.code/deobfuscators/ILProtector/Deobfuscator.cs create mode 100644 de4dot.code/deobfuscators/ILProtector/MainType.cs create mode 100644 de4dot.code/deobfuscators/ILProtector/MethodReader.cs create mode 100644 de4dot.code/deobfuscators/ILProtector/MethodsDecrypter.cs diff --git a/de4dot.code/de4dot.code.csproj b/de4dot.code/de4dot.code.csproj index f1f330ca..770269c1 100644 --- a/de4dot.code/de4dot.code.csproj +++ b/de4dot.code/de4dot.code.csproj @@ -67,6 +67,8 @@ + + @@ -167,6 +169,8 @@ + + diff --git a/de4dot.code/deobfuscators/ILProtector/Deobfuscator.cs b/de4dot.code/deobfuscators/ILProtector/Deobfuscator.cs new file mode 100644 index 00000000..1712e339 --- /dev/null +++ b/de4dot.code/deobfuscators/ILProtector/Deobfuscator.cs @@ -0,0 +1,124 @@ +/* + Copyright (C) 2011-2012 de4dot@gmail.com + + This file is part of de4dot. + + de4dot is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + de4dot is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with de4dot. If not, see . +*/ + +using System; +using System.Collections.Generic; +using Mono.Cecil; +using de4dot.blocks; + +namespace de4dot.code.deobfuscators.ILProtector { + public class DeobfuscatorInfo : DeobfuscatorInfoBase { + public const string THE_NAME = "ILProtector"; + public const string THE_TYPE = "il"; + + public DeobfuscatorInfo() + : base() { + } + + public override string Name { + get { return THE_NAME; } + } + + public override string Type { + get { return THE_TYPE; } + } + + public override IDeobfuscator createDeobfuscator() { + return new Deobfuscator(new Deobfuscator.Options { + ValidNameRegex = validNameRegex.get(), + }); + } + + protected override IEnumerable