From 65e6887fbc1de480c92feb8d704996f587fb213c Mon Sep 17 00:00:00 2001 From: de4dot Date: Fri, 2 Nov 2012 08:23:20 +0100 Subject: [PATCH] Port more code; remove cecil refs --- .gitmodules | 3 - blocks/DotNetUtils.cs | 95 ++- blocks/MemberRefInstance.cs | 3 + blocks/MemberReferenceHelper.cs | 2 + blocks/TypeReferenceUpdaterBase.cs | 2 + blocks/blocks.csproj | 4 - cecil | 1 - de4dot.code/AssemblyModule.cs | 2 +- de4dot.code/AssemblyResolver.cs | 4 +- de4dot.code/ExternalAssemblies.cs | 6 +- de4dot.code/MethodPrinter.cs | 4 +- de4dot.code/ObfuscatedFile.cs | 4 +- de4dot.code/de4dot.code.csproj | 4 - de4dot.code/deobfuscators/TypesRestorer.cs | 6 +- de4dot.code/resources/ResourceDataCreator.cs | 2 +- de4dot.cui/CommandLineParser.cs | 2 +- de4dot.cui/FilesDeobfuscator.cs | 22 +- de4dot.cui/de4dot.cui.csproj | 8 +- de4dot.sln | 834 ------------------- dot10 | 2 +- 20 files changed, 136 insertions(+), 874 deletions(-) delete mode 160000 cecil diff --git a/.gitmodules b/.gitmodules index 625f21bd..2be6a574 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "cecil"] - path = cecil - url = git@github.com:0xd4d/cecil.git [submodule "dot10"] path = dot10 url = e:/work/dot10.git diff --git a/blocks/DotNetUtils.cs b/blocks/DotNetUtils.cs index d2aad77c..0ef39eed 100644 --- a/blocks/DotNetUtils.cs +++ b/blocks/DotNetUtils.cs @@ -19,9 +19,11 @@ using System; using System.Collections.Generic; +#if PORT using Mono.Cecil; using Mono.Cecil.Cil; using Mono.Cecil.Metadata; +#endif //TODO: Remove these using DN = dot10.DotNet; @@ -38,6 +40,7 @@ namespace de4dot.blocks { Zune, } +#if PORT class TypeCache { ModuleDefinition module; de4dot.blocks.OLD_REMOVE.TypeDefinitionDict typeRefToDef = new de4dot.blocks.OLD_REMOVE.TypeDefinitionDict(); @@ -56,7 +59,9 @@ namespace de4dot.blocks { return typeRefToDef.find(typeReference); } } +#endif +#if PORT public class TypeCaches { Dictionary typeCaches = new Dictionary(); @@ -82,7 +87,9 @@ namespace de4dot.blocks { return typeCache.lookup(typeReference); } } +#endif +#if PORT public class CallCounter { Dictionary calls = new Dictionary(); @@ -111,7 +118,9 @@ namespace de4dot.blocks { return method; } } +#endif +#if PORT public class MethodCalls { Dictionary methodCalls = new Dictionary(StringComparer.Ordinal); @@ -142,9 +151,12 @@ namespace de4dot.blocks { return count(methodFullName) != 0; } } +#endif public static class DotNetUtils { +#if PORT public static readonly TypeCaches typeCaches = new TypeCaches(); +#endif public static DN.TypeDef getModuleType(DN.ModuleDef module) { return module.GlobalType; @@ -176,6 +188,7 @@ namespace de4dot.blocks { return true; } +#if PORT public static FieldDefinition findFieldType(TypeDefinition typeDefinition, string typeName, bool isStatic) { if (typeDefinition == null) return null; @@ -208,6 +221,7 @@ namespace de4dot.blocks { next: ; } } +#endif public static bool isDelegate(DN.IType type) { if (type == null) @@ -220,6 +234,7 @@ namespace de4dot.blocks { return type != null && isDelegate(type.BaseType); } +#if PORT public static bool isSameAssembly(TypeReference type, string assembly) { return MemberReferenceHelper.getCanonicalizedScopeName(type.Scope) == assembly.ToLowerInvariant(); } @@ -227,11 +242,13 @@ namespace de4dot.blocks { public static bool isMethod(MethodReference method, string returnType, string parameters) { return method != null && method.FullName == returnType + " " + method.DeclaringType.FullName + "::" + method.Name + parameters; } +#endif public static bool isMethod(DN.IMethod method, string returnType, string parameters) { return method != null && method.FullName == returnType + " " + method.DeclaringType.FullName + "::" + method.Name + parameters; } +#if PORT public static bool hasPinvokeMethod(TypeDefinition type, string methodName) { return getPInvokeMethod(type, methodName) != null; } @@ -319,6 +336,7 @@ namespace de4dot.blocks { } return null; } +#endif public static DN.MethodDef getMethod2(DN.ModuleDef module, DN.IMethod method) { if (method == null) @@ -354,6 +372,7 @@ namespace de4dot.blocks { return type.FindMethod(methodRef.Name, methodRef.MethodSig); } +#if PORT public static IEnumerable getNormalMethods(TypeDefinition type) { foreach (var method in type.Methods) { if (method.HasPInvokeInfo) @@ -451,6 +470,7 @@ namespace de4dot.blocks { } return strings; } +#endif public static IList getCodeStrings(DN.MethodDef method) { var strings = new List(); @@ -493,6 +513,7 @@ namespace de4dot.blocks { return s.Substring(0, index); } +#if PORT // Copies most things but not everything public static MethodDefinition clone(MethodDefinition method) { var newMethod = new MethodDefinition(method.Name, method.Attributes, method.MethodReturnType.ReturnType); @@ -511,12 +532,14 @@ namespace de4dot.blocks { copyBodyFromTo(method, newMethod); return newMethod; } +#endif // Copies most things but not everything public static DN.MethodDef clone(DN.MethodDef method) { return null; //TODO: } +#if PORT public static Instruction clone(Instruction instr) { return new Instruction { Offset = instr.Offset, @@ -573,7 +596,57 @@ namespace de4dot.blocks { return null; return instructions[instructionToIndex[instruction]]; } +#endif + public static void copyBody(DN.MethodDef method, out IList instructions, out IList exceptionHandlers) { + if (method == null || !method.HasCilBody) { + instructions = new List(); + exceptionHandlers = new List(); + return; + } + + var oldInstrs = method.CilBody.Instructions; + var oldExHandlers = method.CilBody.ExceptionHandlers; + instructions = new List(oldInstrs.Count); + exceptionHandlers = new List(oldExHandlers.Count); + var oldToIndex = Utils.createObjectToIndexDictionary(oldInstrs); + + foreach (var oldInstr in oldInstrs) + instructions.Add(oldInstr.Clone()); + + foreach (var newInstr in instructions) { + var operand = newInstr.Operand; + if (operand is DNE.Instruction) + newInstr.Operand = instructions[oldToIndex[(DNE.Instruction)operand]]; + else if (operand is IList) { + var oldArray = (IList)operand; + var newArray = new DNE.Instruction[oldArray.Count]; + for (int i = 0; i < oldArray.Count; i++) + newArray[i] = instructions[oldToIndex[oldArray[i]]]; + newInstr.Operand = newArray; + } + } + + foreach (var oldEx in oldExHandlers) { + var newEx = new DNE.ExceptionHandler(oldEx.HandlerType) { + TryStart = getInstruction(instructions, oldToIndex, oldEx.TryStart), + TryEnd = getInstruction(instructions, oldToIndex, oldEx.TryEnd), + FilterStart = getInstruction(instructions, oldToIndex, oldEx.FilterStart), + HandlerStart = getInstruction(instructions, oldToIndex, oldEx.HandlerStart), + HandlerEnd = getInstruction(instructions, oldToIndex, oldEx.HandlerEnd), + CatchType = oldEx.CatchType, + }; + exceptionHandlers.Add(newEx); + } + } + + static DNE.Instruction getInstruction(IList instructions, IDictionary instructionToIndex, DNE.Instruction instruction) { + if (instruction == null) + return null; + return instructions[instructionToIndex[instruction]]; + } + +#if PORT public static void restoreBody(MethodDefinition method, IEnumerable instructions, IEnumerable exceptionHandlers) { if (method == null || !method.HasBody) return; @@ -588,7 +661,7 @@ namespace de4dot.blocks { foreach (var eh in exceptionHandlers) bodyExceptionHandlers.Add(eh); } - +#endif public static void restoreBody(DN.MethodDef method, IEnumerable instructions, IEnumerable exceptionHandlers) { if (method == null || method.CilBody == null) @@ -605,6 +678,7 @@ namespace de4dot.blocks { bodyExceptionHandlers.Add(eh); } +#if PORT public static void copyBodyFromTo(MethodDefinition fromMethod, MethodDefinition toMethod) { if (fromMethod == toMethod) return; @@ -712,6 +786,7 @@ namespace de4dot.blocks { type = ((TypeSpecification)type).ElementType; return type.EType != ElementType.Void; } +#endif public static bool hasReturnValue(DN.IMethod method) { if (method == null || method.MethodSig == null) @@ -720,6 +795,7 @@ namespace de4dot.blocks { return method.MethodSig.RetType.ElementType != DN.ElementType.Void; } +#if PORT public static void updateStack(Instruction instr, ref int stack, bool methodHasReturnValue) { int pushes, pops; calculateStackUsage(instr, methodHasReturnValue, out pushes, out pops); @@ -930,6 +1006,7 @@ namespace de4dot.blocks { return parameters[index]; return null; } +#endif public static DN.Parameter getParameter(IList parameters, int index) { if (0 <= index && index < parameters.Count) @@ -937,6 +1014,13 @@ namespace de4dot.blocks { return null; } + public static DN.TypeSig getArg(IList args, int index) { + if (0 <= index && index < args.Count) + return args[index]; + return null; + } + +#if PORT public static List getArgs(MethodReference method) { var args = new List(method.Parameters.Count + 1); if (method.HasImplicitThis) @@ -945,6 +1029,7 @@ namespace de4dot.blocks { args.Add(arg.ParameterType); return args; } +#endif public static List getArgs(DN.IMethod method) { var sig = method.MethodSig; @@ -956,6 +1041,7 @@ namespace de4dot.blocks { return args; } +#if PORT public static TypeReference getArgType(MethodReference method, Instruction instr) { return getArgType(getArgs(method), instr); } @@ -976,6 +1062,7 @@ namespace de4dot.blocks { count++; return count; } +#endif public static int getArgsCount(DN.IMethod method) { var sig = method.MethodSig; @@ -987,6 +1074,7 @@ namespace de4dot.blocks { return count; } +#if PORT // Doesn't fix everything (eg. T[] aren't replaced with eg. int[], but T -> int will be fixed) public static IList replaceGenericParameters(GenericInstanceType typeOwner, GenericInstanceMethod methodOwner, IList types) { //TODO: You should use MemberRefInstance.cs @@ -1027,6 +1115,7 @@ namespace de4dot.blocks { } return null; } +#endif public static DNE.Instruction getInstruction(IList instructions, ref int index) { for (int i = 0; i < 10; i++) { @@ -1047,6 +1136,7 @@ namespace de4dot.blocks { return null; } +#if PORT public static PropertyDefinition createPropertyDefinition(string name, TypeReference propType, MethodDefinition getter, MethodDefinition setter) { return new PropertyDefinition(name, PropertyAttributes.None, propType) { MetadataToken = nextPropertyToken(), @@ -1115,6 +1205,7 @@ namespace de4dot.blocks { typeRef.IsValueType = isValueType; return typeRef; } +#endif public static DN.TypeDefOrRefSig findOrCreateTypeReference(DN.ModuleDef module, DN.AssemblyRef asmRef, string ns, string name, bool isValueType) { var typeRef = module.UpdateRowId(new DN.TypeRefUser(module, ns, name, asmRef)); @@ -1124,6 +1215,7 @@ namespace de4dot.blocks { return new DN.ClassSig(typeRef); } +#if PORT public static FrameworkType getFrameworkType(ModuleDefinition module) { foreach (var modRef in module.AssemblyReferences) { if (modRef.Name != "mscorlib") @@ -1244,5 +1336,6 @@ namespace de4dot.blocks { module.ModuleReferences.Add(newModRef); return newModRef; } +#endif } } diff --git a/blocks/MemberRefInstance.cs b/blocks/MemberRefInstance.cs index 751ff272..add812e4 100644 --- a/blocks/MemberRefInstance.cs +++ b/blocks/MemberRefInstance.cs @@ -17,6 +17,8 @@ along with de4dot. If not, see . */ +#if PORT + // Create a new type, method, etc, where all generic parameters have been replaced with the // corresponding generic argument. @@ -226,3 +228,4 @@ namespace de4dot.blocks { } } } +#endif diff --git a/blocks/MemberReferenceHelper.cs b/blocks/MemberReferenceHelper.cs index 12ebd98c..88e433bf 100644 --- a/blocks/MemberReferenceHelper.cs +++ b/blocks/MemberReferenceHelper.cs @@ -17,6 +17,7 @@ along with de4dot. If not, see . */ +#if PORT using System; using System.Collections.Generic; using Mono.Cecil; @@ -858,3 +859,4 @@ namespace de4dot.blocks { } } } +#endif diff --git a/blocks/TypeReferenceUpdaterBase.cs b/blocks/TypeReferenceUpdaterBase.cs index 2327eade..03e8babd 100644 --- a/blocks/TypeReferenceUpdaterBase.cs +++ b/blocks/TypeReferenceUpdaterBase.cs @@ -17,6 +17,7 @@ along with de4dot. If not, see . */ +#if PORT using System; using Mono.Cecil; @@ -88,3 +89,4 @@ namespace de4dot.blocks { } } } +#endif diff --git a/blocks/blocks.csproj b/blocks/blocks.csproj index 4cd1f791..15253c4d 100644 --- a/blocks/blocks.csproj +++ b/blocks/blocks.csproj @@ -98,10 +98,6 @@ - - {D68133BD-1E63-496E-9EDE-4FBDBF77B486} - Mono.Cecil - {FDFC1237-143F-4919-8318-4926901F4639} dot10 diff --git a/cecil b/cecil deleted file mode 160000 index 119a3d40..00000000 --- a/cecil +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 119a3d404ab12a8a19a249e97c1e5f6ca0850b6a diff --git a/de4dot.code/AssemblyModule.cs b/de4dot.code/AssemblyModule.cs index 71ccde41..27f9e2a0 100644 --- a/de4dot.code/AssemblyModule.cs +++ b/de4dot.code/AssemblyModule.cs @@ -42,7 +42,7 @@ namespace de4dot.code { ModuleDefMD setModule(ModuleDefMD newModule) { module = newModule; - AssemblyResolver.Instance.addModule(module); + TheAssemblyResolver.Instance.addModule(module); module.Location = filename; return module; } diff --git a/de4dot.code/AssemblyResolver.cs b/de4dot.code/AssemblyResolver.cs index 4f026c64..566ded03 100644 --- a/de4dot.code/AssemblyResolver.cs +++ b/de4dot.code/AssemblyResolver.cs @@ -20,8 +20,8 @@ using dot10.DotNet; namespace de4dot.code { - public class AssemblyResolver : dot10.DotNet.AssemblyResolver { - public static readonly AssemblyResolver Instance = new AssemblyResolver(); + public class TheAssemblyResolver : dot10.DotNet.AssemblyResolver { + public static readonly TheAssemblyResolver Instance = new TheAssemblyResolver(); public void addSearchDirectory(string dir) { if (!PostSearchPaths.Contains(dir)) diff --git a/de4dot.code/ExternalAssemblies.cs b/de4dot.code/ExternalAssemblies.cs index 2dd0307f..3171f513 100644 --- a/de4dot.code/ExternalAssemblies.cs +++ b/de4dot.code/ExternalAssemblies.cs @@ -43,9 +43,9 @@ namespace de4dot.code { public void unload(string asmFullName) { foreach (var module in asmDef.Modules) { //TODO: DotNetUtils.typeCaches.invalidate(module); - AssemblyResolver.Instance.removeModule(module); + TheAssemblyResolver.Instance.removeModule(module); } - AssemblyResolver.Instance.removeModule(asmFullName); + TheAssemblyResolver.Instance.removeModule(asmFullName); } } @@ -62,7 +62,7 @@ namespace de4dot.code { if (assemblies.TryGetValue(asmFullName, out asm)) return asm; - var asmDef = AssemblyResolver.Instance.Resolve(type.DefinitionAssembly, type.OwnerModule); + var asmDef = TheAssemblyResolver.Instance.Resolve(type.DefinitionAssembly, type.OwnerModule); if (asmDef == null) { if (!failedLoads.ContainsKey(asmFullName)) Log.w("Could not load assembly {0}", asmFullName); diff --git a/de4dot.code/MethodPrinter.cs b/de4dot.code/MethodPrinter.cs index cb981c18..fed2a040 100644 --- a/de4dot.code/MethodPrinter.cs +++ b/de4dot.code/MethodPrinter.cs @@ -162,13 +162,13 @@ namespace de4dot.code { return Utils.toCsharpString((string)instr.Operand); else if (instr.Operand is Parameter) { var arg = (Parameter)instr.Operand; - var s = instr.GetOperandString(); + var s = InstructionPrinter.GetOperandString(instr); if (s != "") return s; return string.Format("", arg.Index); } else - return instr.GetOperandString(); + return InstructionPrinter.GetOperandString(instr); } void printExInfo(ExInfo exInfo) { diff --git a/de4dot.code/ObfuscatedFile.cs b/de4dot.code/ObfuscatedFile.cs index 97a23719..a927fbee 100644 --- a/de4dot.code/ObfuscatedFile.cs +++ b/de4dot.code/ObfuscatedFile.cs @@ -165,8 +165,8 @@ namespace de4dot.code { public void load(IEnumerable deobfuscators) { loadModule(deobfuscators); - AssemblyResolver.Instance.addSearchDirectory(Utils.getDirName(Filename)); - AssemblyResolver.Instance.addSearchDirectory(Utils.getDirName(NewFilename)); + TheAssemblyResolver.Instance.addSearchDirectory(Utils.getDirName(Filename)); + TheAssemblyResolver.Instance.addSearchDirectory(Utils.getDirName(NewFilename)); detectObfuscator(deobfuscators); if (deob == null) throw new ApplicationException("Could not detect obfuscator!"); diff --git a/de4dot.code/de4dot.code.csproj b/de4dot.code/de4dot.code.csproj index ca247b7e..a59afab3 100644 --- a/de4dot.code/de4dot.code.csproj +++ b/de4dot.code/de4dot.code.csproj @@ -332,10 +332,6 @@ {045B96F2-AF80-4C4C-8D27-E38635AC705E} blocks - - {D68133BD-1E63-496E-9EDE-4FBDBF77B486} - Mono.Cecil - {5C93C5E2-196F-4877-BF65-96FEBFCEFCA1} de4dot.mdecrypt diff --git a/de4dot.code/deobfuscators/TypesRestorer.cs b/de4dot.code/deobfuscators/TypesRestorer.cs index e45c3a72..51ddcdb8 100644 --- a/de4dot.code/deobfuscators/TypesRestorer.cs +++ b/de4dot.code/deobfuscators/TypesRestorer.cs @@ -292,7 +292,7 @@ namespace de4dot.code.deobfuscators { var calledMethod = instr.Operand as IMethod; if (calledMethod == null) break; - var calledMethodParams = DotNetUtils.getParameters(calledMethod); + var calledMethodParams = DotNetUtils.getArgs(calledMethod); for (int j = 0; j < pushedArgs.NumValidArgs; j++) { int calledMethodParamIndex = calledMethodParams.Count - j - 1; var ldInstr = pushedArgs.getEnd(j); @@ -303,7 +303,7 @@ namespace de4dot.code.deobfuscators { case Code.Ldarg_1: case Code.Ldarg_2: case Code.Ldarg_3: - addMethodArgType(method, getParameter(methodParams, ldInstr), DotNetUtils.getParameter(calledMethodParams, calledMethodParamIndex)); + addMethodArgType(method, getParameter(methodParams, ldInstr), DotNetUtils.getArg(calledMethodParams, calledMethodParamIndex)); break; default: @@ -505,7 +505,9 @@ namespace de4dot.code.deobfuscators { if (calledMethod == null) continue; IList calledMethodArgs = DotNetUtils.getArgs(calledMethod); +#if PORT calledMethodArgs = DotNetUtils.replaceGenericParameters(calledMethod.DeclaringType as GenericInstanceType, calledMethod as GenericInstanceMethod, calledMethodArgs); +#endif for (int j = 0; j < pushedArgs.NumValidArgs; j++) { var pushInstr = pushedArgs.getEnd(j); if (pushInstr.OpCode.Code != Code.Ldfld && pushInstr.OpCode.Code != Code.Ldsfld) diff --git a/de4dot.code/resources/ResourceDataCreator.cs b/de4dot.code/resources/ResourceDataCreator.cs index 4701714c..1c58d898 100644 --- a/de4dot.code/resources/ResourceDataCreator.cs +++ b/de4dot.code/resources/ResourceDataCreator.cs @@ -217,7 +217,7 @@ namespace de4dot.code.resources { return asmRef.FullName; } - var asm = AssemblyResolver.Instance.Resolve(new AssemblyNameInfo(simpleName), module); + var asm = TheAssemblyResolver.Instance.Resolve(new AssemblyNameInfo(simpleName), module); return asm == null ? null : asm.FullName; } diff --git a/de4dot.cui/CommandLineParser.cs b/de4dot.cui/CommandLineParser.cs index 028e65ca..81dc59f1 100644 --- a/de4dot.cui/CommandLineParser.cs +++ b/de4dot.cui/CommandLineParser.cs @@ -114,7 +114,7 @@ namespace de4dot.cui { filesOptions.DetectObfuscators = true; })); miscOptions.Add(new OneArgOption(null, "asm-path", "Add an assembly search path", "path", (val) => { - AssemblyResolver.Instance.addSearchDirectory(val); + TheAssemblyResolver.Instance.addSearchDirectory(val); })); miscOptions.Add(new NoArgOption(null, "dont-rename", "Don't rename classes, methods, etc.", () => { filesOptions.RenameSymbols = false; diff --git a/de4dot.cui/FilesDeobfuscator.cs b/de4dot.cui/FilesDeobfuscator.cs index 29077397..893014de 100644 --- a/de4dot.cui/FilesDeobfuscator.cs +++ b/de4dot.cui/FilesDeobfuscator.cs @@ -20,10 +20,12 @@ using System; using System.IO; using System.Collections.Generic; -using Mono.Cecil; +using dot10.DotNet; using de4dot.blocks; using de4dot.code; +#if PORT using de4dot.code.renamer; +#endif using de4dot.code.deobfuscators; using de4dot.code.AssemblyClient; @@ -76,14 +78,16 @@ namespace de4dot.cui { deobfuscateAll(); } - static void removeModule(ModuleDefinition module) { - AssemblyResolver.Instance.removeModule(module); + static void removeModule(ModuleDef module) { + TheAssemblyResolver.Instance.removeModule(module); +#if PORT DotNetUtils.typeCaches.invalidate(module); +#endif } void detectObfuscators() { foreach (var file in loadAllFiles(true)) { - removeModule(file.ModuleDefinition); + removeModule(file.ModuleDefMD); deobfuscatorContext.clear(); } } @@ -98,8 +102,8 @@ namespace de4dot.cui { rename(new List { file }); file.save(); - removeModule(file.ModuleDefinition); - AssemblyResolver.Instance.clearAll(); + removeModule(file.ModuleDefMD); + TheAssemblyResolver.Instance.clearAll(); deobfuscatorContext.clear(); } catch (Exception ex) { @@ -211,7 +215,7 @@ namespace de4dot.cui { var deob = file.Deobfuscator; if (skipUnknownObfuscator && deob.Type == "un") { Log.v("Skipping unknown obfuscator: {0}", file.Filename); - removeModule(file.ModuleDefinition); + removeModule(file.ModuleDefMD); return false; } else { @@ -245,7 +249,7 @@ namespace de4dot.cui { IEnumerable recursiveAdd(SearchDir searchDir, IEnumerable fileSystemInfos) { foreach (var fsi in fileSystemInfos) { - if ((int)(fsi.Attributes & FileAttributes.Directory) != 0) { + if ((int)(fsi.Attributes & System.IO.FileAttributes.Directory) != 0) { foreach (var filename in doDirectoryInfo(searchDir, (DirectoryInfo)fsi)) yield return filename; } @@ -355,11 +359,13 @@ namespace de4dot.cui { void rename(IEnumerable theFiles) { if (!options.RenameSymbols) return; +#if PORT var renamer = new Renamer(deobfuscatorContext, theFiles) { RestorePropertiesFromNames = options.RestorePropsEvents, RestoreEventsFromNames = options.RestorePropsEvents, }; renamer.rename(); +#endif } } } diff --git a/de4dot.cui/de4dot.cui.csproj b/de4dot.cui/de4dot.cui.csproj index f10e18e5..5a8eb7e9 100644 --- a/de4dot.cui/de4dot.cui.csproj +++ b/de4dot.cui/de4dot.cui.csproj @@ -47,14 +47,14 @@ {045B96F2-AF80-4C4C-8D27-E38635AC705E} blocks - - {D68133BD-1E63-496E-9EDE-4FBDBF77B486} - Mono.Cecil - {4D10B9EB-3BF1-4D61-A389-CB019E8C9622} de4dot.code + + {FDFC1237-143F-4919-8318-4926901F4639} + dot10 +