Remove ConfusedByAttribute type

This commit is contained in:
de4dot 2012-07-27 08:50:53 +02:00
parent 872b4f61a2
commit 16e6a986c7

View File

@ -169,6 +169,8 @@ namespace de4dot.code.deobfuscators.Confuser {
public override void deobfuscateBegin() {
base.deobfuscateBegin();
removeObfuscatorAttribute();
if (jitMethodsDecrypter != null) {
addModuleCctorInitCallToBeRemoved(jitMethodsDecrypter.InitMethod);
addTypeToBeRemoved(jitMethodsDecrypter.Type, "Method decrypter (JIT) type");
@ -187,6 +189,13 @@ namespace de4dot.code.deobfuscators.Confuser {
proxyCallFixer.find();
}
void removeObfuscatorAttribute() {
foreach (var type in module.Types) {
if (type.FullName == "ConfusedByAttribute")
addAttributeToBeRemoved(type, "Obfuscator attribute");
}
}
public override void deobfuscateMethodEnd(Blocks blocks) {
proxyCallFixer.deobfuscate(blocks);
base.deobfuscateMethodEnd(blocks);