0xd4d/de4dot — Issue #24: Member declared in another module and needs to be imported
Author: nubzilo
Created: 2012-02-20 22:21:22+00:00
State: open

I am using version v1.6.0.3405 (latest today).
I get this exception when deobfuscating DF and then BL. If use --keep-type -p bl in decompile file nothing change, also de4dot detect Babel in cleaned file.
Stack trace without param

C:\de4dot-1.6.0>de4dot test-cleaned.exe -p bl

de4dot v1.6.0.3405 Copyright (C) 2011-2012 de4dot@gmail.com
Latest version and source code: https://github.com/0xd4d/de4dot

Detected Babel .NET 3.5.0.0 (C:\de4dot-1.6.0\test-cleaned.exe)
Cleaning C:\de4dot-1.6.0\test-cleaned.exe
Renaming all obfuscated symbols
Saving C:\de4dot-1.6.0\test-cleaned-cleaned.exe

------------------------------------------------------------------------------
Stack trace:
Ð² Mono.Cecil.MetadataBuilder.LookupToken(IMetadataTokenProvider provider) Ð²
E:\work\de4dot\cecil\Mono.Cecil\AssemblyWriter.cs:ÑÑ‚Ñ€Ð¾ÐºÐ° 2008
Ð² Mono.Cecil.Cil.CodeWriter.WriteOperand(Instruction instruction) Ð² E:\work
\de4dot\cecil\Mono.Cecil.Cil\CodeWriter.cs:ÑÑ‚Ñ€Ð¾ÐºÐ° 308
Ð² Mono.Cecil.Cil.CodeWriter.WriteInstructions() Ð² E:\work\de4dot\cecil\Mono
.Cecil.Cil\CodeWriter.cs:ÑÑ‚Ñ€Ð¾ÐºÐ° 182
Ð² Mono.Cecil.Cil.CodeWriter.WriteResolvedMethodBody(MethodDefinition method)
Ð² E:\work\de4dot\cecil\Mono.Cecil.Cil\CodeWriter.cs:ÑÑ‚Ñ€Ð¾ÐºÐ° 144
Ð² Mono.Cecil.Cil.CodeWriter.WriteMethodBody(MethodDefinition method) Ð² E:\w
ork\de4dot\cecil\Mono.Cecil.Cil\CodeWriter.cs:ÑÑ‚Ñ€Ð¾ÐºÐ° 86
Ð² Mono.Cecil.MetadataBuilder.AddMethod(MethodDefinition method) Ð² E:\work\d
e4dot\cecil\Mono.Cecil\AssemblyWriter.cs:ÑÑ‚Ñ€Ð¾ÐºÐ° 1441
Ð² Mono.Cecil.MetadataBuilder.AddMethods(TypeDefinition type) Ð² E:\work\de4d
ot\cecil\Mono.Cecil\AssemblyWriter.cs:ÑÑ‚Ñ€Ð¾ÐºÐ° 1435
Ð² Mono.Cecil.MetadataBuilder.AddType(TypeDefinition type) Ð² E:\work\de4dot\
cecil\Mono.Cecil\AssemblyWriter.cs:ÑÑ‚Ñ€Ð¾ÐºÐ° 1275
Ð² Mono.Cecil.MetadataBuilder.AddTypeDefs() Ð² E:\work\de4dot\cecil\Mono.Ceci
l\AssemblyWriter.cs:ÑÑ‚Ñ€Ð¾ÐºÐ° 1245
Ð² Mono.Cecil.MetadataBuilder.BuildTypes() Ð² E:\work\de4dot\cecil\Mono.Cecil
\AssemblyWriter.cs:ÑÑ‚Ñ€Ð¾ÐºÐ° 1086
Ð² Mono.Cecil.MetadataBuilder.BuildModule() Ð² E:\work\de4dot\cecil\Mono.Ceci
l\AssemblyWriter.cs:ÑÑ‚Ñ€Ð¾ÐºÐ° 862
Ð² Mono.Cecil.ModuleWriter.b__0(MetadataBuilder builder, Metad
ataReader _) Ð² E:\work\de4dot\cecil\Mono.Cecil\AssemblyWriter.cs:ÑÑ‚Ñ€Ð¾ÐºÐ° 1
36
Ð² Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TItem item, Func`3 read) Ð² E
:\work\de4dot\cecil\Mono.Cecil\ModuleDefinition.cs:ÑÑ‚Ñ€Ð¾ÐºÐ° 824
Ð² Mono.Cecil.ModuleWriter.BuildMetadata(ModuleDefinition module, MetadataBui
lder metadata) Ð² E:\work\de4dot\cecil\Mono.Cecil\AssemblyWriter.cs:ÑÑ‚Ñ€Ð¾ÐºÐ°
135
Ð² Mono.Cecil.ModuleWriter.WriteModuleTo(ModuleDefinition module, Stream stre
am, WriterParameters parameters) Ð² E:\work\de4dot\cecil\Mono.Cecil\AssemblyWrit
er.cs:ÑÑ‚Ñ€Ð¾ÐºÐ° 111
Ð² Mono.Cecil.ModuleDefinition.Write(Stream stream, WriterParameters paramete
rs) Ð² E:\work\de4dot\cecil\Mono.Cecil\ModuleDefinition.cs:ÑÑ‚Ñ€Ð¾ÐºÐ° 987
Ð² Mono.Cecil.ModuleDefinition.Write(String fileName, WriterParameters parame
ters) Ð² E:\work\de4dot\cecil\Mono.Cecil\ModuleDefinition.cs:ÑÑ‚Ñ€Ð¾ÐºÐ° 976
Ð² de4dot.code.AssemblyModule.save(String newFilename, Boolean updateMaxStack
, IWriterListener writerListener) Ð² E:\work\de4dot\de4dot.code\AssemblyModule.c
s:ÑÑ‚Ñ€Ð¾ÐºÐ° 62
Ð² de4dot.code.ObfuscatedFile.save() Ð² E:\work\de4dot\de4dot.code\Obfuscated
File.cs:ÑÑ‚Ñ€Ð¾ÐºÐ° 319
Ð² de4dot.cui.FilesDeobfuscator.saveAllFiles(IEnumerable`1 allFiles) Ð² E:\wo
rk\de4dot\de4dot.cui\FilesDeobfuscator.cs:ÑÑ‚Ñ€Ð¾ÐºÐ° 334
Ð² de4dot.cui.FilesDeobfuscator.deobfuscateAll() Ð² E:\work\de4dot\de4dot.cui
\FilesDeobfuscator.cs:ÑÑ‚Ñ€Ð¾ÐºÐ° 116
Ð² de4dot.cui.FilesDeobfuscator.doIt() Ð² E:\work\de4dot\de4dot.cui\FilesDeob
fuscator.cs:ÑÑ‚Ñ€Ð¾ÐºÐ° 75
Ð² de4dot.cui.Program.main(String[] args) Ð² E:\work\de4dot\de4dot.cui\Progra
m.cs:ÑÑ‚Ñ€Ð¾ÐºÐ° 62

ERROR: Caught an exception:

------------------------------------------------------------------------------
Message:
Member 'System.String Class2::smethod_0(System.String,System.Int32)' is declar
ed in another module and needs to be imported
Type:
System.ArgumentException