From ab57733ae4de403202f587a0db83a404784b2122 Mon Sep 17 00:00:00 2001 From: de4dot Date: Sun, 5 Aug 2012 12:46:54 +0200 Subject: [PATCH] Detect Confuser 1.7 r74708 proxy method handlers --- .../Confuser/ProxyCallFixerV10.cs | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/de4dot.code/deobfuscators/Confuser/ProxyCallFixerV10.cs b/de4dot.code/deobfuscators/Confuser/ProxyCallFixerV10.cs index 57078c49..31111de4 100644 --- a/de4dot.code/deobfuscators/Confuser/ProxyCallFixerV10.cs +++ b/de4dot.code/deobfuscators/Confuser/ProxyCallFixerV10.cs @@ -43,6 +43,8 @@ namespace de4dot.code.deobfuscators.Confuser { v14_r58857, v17_r73740_normal, v17_r73740_native, + v17_r74708_normal, + v17_r74708_native, } enum ProxyCreatorType { @@ -195,10 +197,12 @@ namespace de4dot.code.deobfuscators.Confuser { break; case ConfuserVersion.v17_r73740_normal: + case ConfuserVersion.v17_r74708_normal: getCallInfo_v17_r73740_normal(info, creatorInfo, out calledMethod, out callOpcode); break; case ConfuserVersion.v17_r73740_native: + case ConfuserVersion.v17_r74708_native: getCallInfo_v17_r73740_native(info, creatorInfo, out calledMethod, out callOpcode); break; @@ -435,12 +439,22 @@ namespace de4dot.code.deobfuscators.Confuser { theVersion = ConfuserVersion.v14_r58857; } else if (is_v17_r73740(method)) { - if ((nativeMethod = findNativeMethod_v17_r73740(method)) != null) - theVersion = ConfuserVersion.v17_r73740_native; - else if (findMagic_v17_r73740(method, out magic)) - theVersion = ConfuserVersion.v17_r73740_normal; - else - continue; + if (DotNetUtils.callsMethod(method, "System.Boolean System.Type::get_IsArray()")) { + if ((nativeMethod = findNativeMethod_v17_r73740(method)) != null) + theVersion = ConfuserVersion.v17_r74708_native; + else if (findMagic_v17_r73740(method, out magic)) + theVersion = ConfuserVersion.v17_r74708_normal; + else + continue; + } + else { + if ((nativeMethod = findNativeMethod_v17_r73740(method)) != null) + theVersion = ConfuserVersion.v17_r73740_native; + else if (findMagic_v17_r73740(method, out magic)) + theVersion = ConfuserVersion.v17_r73740_normal; + else + continue; + } } setDelegateCreatorMethod(method);