From 48c7d40fb696824554409ff8e1c315e76c94831a Mon Sep 17 00:00:00 2001 From: de4dot Date: Sat, 17 Mar 2012 11:19:03 +0100 Subject: [PATCH] Inline method --- .../Eazfuscator_NET/StringDecrypter.cs | 34 ++++++++----------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/de4dot.code/deobfuscators/Eazfuscator_NET/StringDecrypter.cs b/de4dot.code/deobfuscators/Eazfuscator_NET/StringDecrypter.cs index 2465d35c..66c17af5 100644 --- a/de4dot.code/deobfuscators/Eazfuscator_NET/StringDecrypter.cs +++ b/de4dot.code/deobfuscators/Eazfuscator_NET/StringDecrypter.cs @@ -497,30 +497,26 @@ namespace de4dot.code.deobfuscators.Eazfuscator_NET { return true; } - // 3.2 (Silverlight) - if (findIntsSilverlight(method, ref initializedAll)) + // 3.2+ (Silverlight) + index = DeobUtils.indexOfLdci4Instruction(method, 268435314); + if (index >= 0) { + index--; + index = EfUtils.indexOfPreviousLdci4Instruction(method, index); + if (index < 0) + return false; + + i1 = 0; + if (!EfUtils.getNextInt32(method, ref index, out i2)) + return false; + + // 3.2: true, 3.3+: false + initializedAll = method.Body.Instructions[index].OpCode.Code == Code.Stsfld; return true; + } return false; } - bool findIntsSilverlight(MethodDefinition method, ref bool initializedAll) { - int index = DeobUtils.indexOfLdci4Instruction(method, 268435314); - if (index < 0) - return false; - index--; - index = EfUtils.indexOfPreviousLdci4Instruction(method, index); - if (index < 0) - return false; - - i1 = 0; - if (!EfUtils.getNextInt32(method, ref index, out i2)) - return false; - - initializedAll = method.Body.Instructions[index].OpCode.Code == Code.Stsfld; - return true; - } - bool findIntsCctor(MethodDefinition cctor) { int index = 0; if (!findCallGetFrame(cctor, ref index))