Update version numbers

This commit is contained in:
de4dot 2012-08-08 18:34:24 +02:00
parent 5e2572a201
commit 4ca36a4250

View File

@ -47,9 +47,9 @@ namespace de4dot.code.deobfuscators.Confuser {
v18_r75367_normal, v18_r75367_normal,
v18_r75367_dynamic, v18_r75367_dynamic,
v18_r75367_native, v18_r75367_native,
vXX_normal, v18_r75369_normal,
vXX_dynamic, v18_r75369_dynamic,
vXX_native, v18_r75369_native,
} }
public class DecrypterInfo { public class DecrypterInfo {
@ -102,9 +102,9 @@ namespace de4dot.code.deobfuscators.Confuser {
case ConfuserVersion.v18_r75367_dynamic: case ConfuserVersion.v18_r75367_dynamic:
case ConfuserVersion.v18_r75367_native: case ConfuserVersion.v18_r75367_native:
return hash1(key0l ^ magic); return hash1(key0l ^ magic);
case ConfuserVersion.vXX_normal: case ConfuserVersion.v18_r75369_normal:
case ConfuserVersion.vXX_dynamic: case ConfuserVersion.v18_r75369_dynamic:
case ConfuserVersion.vXX_native: case ConfuserVersion.v18_r75369_native:
return hash1(key0l * magic); return hash1(key0l * magic);
default: default:
throw new ApplicationException("Invalid version"); throw new ApplicationException("Invalid version");
@ -189,8 +189,8 @@ namespace de4dot.code.deobfuscators.Confuser {
var info = new DecrypterInfo(this, method, ConfuserVersion.Unknown); var info = new DecrypterInfo(this, method, ConfuserVersion.Unknown);
if (findKeys_v18_r75367(info)) if (findKeys_v18_r75367(info))
initVersion(cctor, ConfuserVersion.v18_r75367_normal, ConfuserVersion.v18_r75367_dynamic, ConfuserVersion.v18_r75367_native); initVersion(cctor, ConfuserVersion.v18_r75367_normal, ConfuserVersion.v18_r75367_dynamic, ConfuserVersion.v18_r75367_native);
else if (findKeys_vXX(info)) else if (findKeys_v18_r75369(info))
initVersion(cctor, ConfuserVersion.vXX_normal, ConfuserVersion.vXX_dynamic, ConfuserVersion.vXX_native); initVersion(cctor, ConfuserVersion.v18_r75369_normal, ConfuserVersion.v18_r75369_dynamic, ConfuserVersion.v18_r75369_native);
else else
return; return;
@ -374,10 +374,10 @@ namespace de4dot.code.deobfuscators.Confuser {
case ConfuserVersion.v18_r75367_dynamic: case ConfuserVersion.v18_r75367_dynamic:
case ConfuserVersion.v18_r75367_native: case ConfuserVersion.v18_r75367_native:
return findKeys_v18_r75367(info); return findKeys_v18_r75367(info);
case ConfuserVersion.vXX_normal: case ConfuserVersion.v18_r75369_normal:
case ConfuserVersion.vXX_dynamic: case ConfuserVersion.v18_r75369_dynamic:
case ConfuserVersion.vXX_native: case ConfuserVersion.v18_r75369_native:
return findKeys_vXX(info); return findKeys_v18_r75369(info);
default: default:
throw new ApplicationException("Invalid version"); throw new ApplicationException("Invalid version");
} }
@ -393,10 +393,10 @@ namespace de4dot.code.deobfuscators.Confuser {
return true; return true;
} }
static bool findKeys_vXX(DecrypterInfo info) { static bool findKeys_v18_r75369(DecrypterInfo info) {
if (!findLKeys_vXX(info)) if (!findLKeys_v18_r75369(info))
return false; return false;
if (!findKey0_vXX(info)) if (!findKey0_v18_r75369(info))
return false; return false;
if (!findKey0d_v18_r75367(info)) if (!findKey0d_v18_r75367(info))
return false; return false;
@ -484,7 +484,7 @@ namespace de4dot.code.deobfuscators.Confuser {
return false; return false;
} }
static bool findLKeys_vXX(DecrypterInfo info) { static bool findLKeys_v18_r75369(DecrypterInfo info) {
var instrs = info.method.Body.Instructions; var instrs = info.method.Body.Instructions;
for (int i = 0; i < instrs.Count - 8; i++) { for (int i = 0; i < instrs.Count - 8; i++) {
var ldci8_1 = instrs[i]; var ldci8_1 = instrs[i];
@ -517,7 +517,7 @@ namespace de4dot.code.deobfuscators.Confuser {
return false; return false;
} }
static bool findKey0_vXX(DecrypterInfo info) { static bool findKey0_v18_r75369(DecrypterInfo info) {
var instrs = info.method.Body.Instructions; var instrs = info.method.Body.Instructions;
for (int i = 0; i < instrs.Count - 4; i++) { for (int i = 0; i < instrs.Count - 4; i++) {
if (!DotNetUtils.isLdloc(instrs[i])) if (!DotNetUtils.isLdloc(instrs[i]))
@ -541,15 +541,15 @@ namespace de4dot.code.deobfuscators.Confuser {
byte[] decryptResource(byte[] encrypted) { byte[] decryptResource(byte[] encrypted) {
switch (version) { switch (version) {
case ConfuserVersion.v18_r75367_normal: case ConfuserVersion.v18_r75367_normal:
case ConfuserVersion.vXX_normal: case ConfuserVersion.v18_r75369_normal:
return decryptResource_v18_r75367_normal(encrypted); return decryptResource_v18_r75367_normal(encrypted);
case ConfuserVersion.v18_r75367_dynamic: case ConfuserVersion.v18_r75367_dynamic:
case ConfuserVersion.vXX_dynamic: case ConfuserVersion.v18_r75369_dynamic:
return decryptResource_v18_r75367_dynamic(encrypted); return decryptResource_v18_r75367_dynamic(encrypted);
case ConfuserVersion.v18_r75367_native: case ConfuserVersion.v18_r75367_native:
case ConfuserVersion.vXX_native: case ConfuserVersion.v18_r75369_native:
return decryptResource_v18_r75367_native(encrypted); return decryptResource_v18_r75367_native(encrypted);
default: default: