Rename proxy method class

This commit is contained in:
de4dot 2012-08-08 17:40:24 +02:00
parent a2798908b0
commit 876c13c08a
3 changed files with 14 additions and 15 deletions

View File

@ -90,7 +90,6 @@
<Compile Include="deobfuscators\Confuser\MemoryMethodsDecrypter.cs" /> <Compile Include="deobfuscators\Confuser\MemoryMethodsDecrypter.cs" />
<Compile Include="deobfuscators\Confuser\MethodsDecrypterBase.cs" /> <Compile Include="deobfuscators\Confuser\MethodsDecrypterBase.cs" />
<Compile Include="deobfuscators\Confuser\ProxyCallFixer.cs" /> <Compile Include="deobfuscators\Confuser\ProxyCallFixer.cs" />
<Compile Include="deobfuscators\Confuser\ProxyCallFixerV10.cs" />
<Compile Include="deobfuscators\Confuser\ResourceDecrypter.cs" /> <Compile Include="deobfuscators\Confuser\ResourceDecrypter.cs" />
<Compile Include="deobfuscators\Confuser\StringDecrypter.cs" /> <Compile Include="deobfuscators\Confuser\StringDecrypter.cs" />
<Compile Include="deobfuscators\Confuser\Unpacker.cs" /> <Compile Include="deobfuscators\Confuser\Unpacker.cs" />

View File

@ -73,7 +73,7 @@ namespace de4dot.code.deobfuscators.Confuser {
List<EmbeddedAssemblyInfo> embeddedAssemblyInfos = new List<EmbeddedAssemblyInfo>(); List<EmbeddedAssemblyInfo> embeddedAssemblyInfos = new List<EmbeddedAssemblyInfo>();
JitMethodsDecrypter jitMethodsDecrypter; JitMethodsDecrypter jitMethodsDecrypter;
MemoryMethodsDecrypter memoryMethodsDecrypter; MemoryMethodsDecrypter memoryMethodsDecrypter;
ProxyCallFixerV10 proxyCallFixerV10; ProxyCallFixer proxyCallFixer;
AntiDebugger antiDebugger; AntiDebugger antiDebugger;
AntiDumping antiDumping; AntiDumping antiDumping;
ResourceDecrypter resourceDecrypter; ResourceDecrypter resourceDecrypter;
@ -133,7 +133,7 @@ namespace de4dot.code.deobfuscators.Confuser {
int sum = toInt32(jitMethodsDecrypter != null ? jitMethodsDecrypter.Detected : false) + int sum = toInt32(jitMethodsDecrypter != null ? jitMethodsDecrypter.Detected : false) +
toInt32(memoryMethodsDecrypter != null ? memoryMethodsDecrypter.Detected : false) + toInt32(memoryMethodsDecrypter != null ? memoryMethodsDecrypter.Detected : false) +
toInt32(proxyCallFixerV10 != null ? proxyCallFixerV10.Detected : false) + toInt32(proxyCallFixer != null ? proxyCallFixer.Detected : false) +
toInt32(antiDebugger != null ? antiDebugger.Detected : false) + toInt32(antiDebugger != null ? antiDebugger.Detected : false) +
toInt32(antiDumping != null ? antiDumping.Detected : false) + toInt32(antiDumping != null ? antiDumping.Detected : false) +
toInt32(resourceDecrypter != null ? resourceDecrypter.Detected : false) + toInt32(resourceDecrypter != null ? resourceDecrypter.Detected : false) +
@ -189,8 +189,8 @@ namespace de4dot.code.deobfuscators.Confuser {
} }
} while (false); } while (false);
proxyCallFixerV10 = new ProxyCallFixerV10(module, getFileData()); proxyCallFixer = new ProxyCallFixer(module, getFileData());
proxyCallFixerV10.findDelegateCreator(DeobfuscatedFile); proxyCallFixer.findDelegateCreator(DeobfuscatedFile);
antiDebugger = new AntiDebugger(module); antiDebugger = new AntiDebugger(module);
antiDebugger.find(); antiDebugger.find();
antiDumping = new AntiDumping(module); antiDumping = new AntiDumping(module);
@ -340,8 +340,8 @@ namespace de4dot.code.deobfuscators.Confuser {
addTypeToBeRemoved(antiDumping.Type, "Anti dumping type"); addTypeToBeRemoved(antiDumping.Type, "Anti dumping type");
} }
if (proxyCallFixerV10 != null) if (proxyCallFixer != null)
proxyCallFixerV10.find(); proxyCallFixer.find();
removeInvalidResources(); removeInvalidResources();
removeInvalidAssemblyReferences(); removeInvalidAssemblyReferences();
@ -495,8 +495,8 @@ namespace de4dot.code.deobfuscators.Confuser {
} }
public override void deobfuscateMethodEnd(Blocks blocks) { public override void deobfuscateMethodEnd(Blocks blocks) {
if (proxyCallFixerV10 != null) if (proxyCallFixer != null)
proxyCallFixerV10.deobfuscate(blocks); proxyCallFixer.deobfuscate(blocks);
resourceDecrypter.deobfuscate(blocks); resourceDecrypter.deobfuscate(blocks);
unpacker.deobfuscate(blocks); unpacker.deobfuscate(blocks);
if (int32ValueInliner != null) { if (int32ValueInliner != null) {
@ -509,10 +509,10 @@ namespace de4dot.code.deobfuscators.Confuser {
} }
public override void deobfuscateEnd() { public override void deobfuscateEnd() {
if (proxyCallFixerV10 != null) { if (proxyCallFixer != null) {
if (removeProxyDelegates(proxyCallFixerV10)) if (removeProxyDelegates(proxyCallFixer))
addFieldsToBeRemoved(proxyCallFixerV10.Fields, "Proxy delegate instance field"); addFieldsToBeRemoved(proxyCallFixer.Fields, "Proxy delegate instance field");
proxyCallFixerV10.cleanUp(); proxyCallFixer.cleanUp();
} }
constantsDecrypterV18.cleanUp(); constantsDecrypterV18.cleanUp();

View File

@ -27,7 +27,7 @@ using de4dot.blocks;
using de4dot.PE; using de4dot.PE;
namespace de4dot.code.deobfuscators.Confuser { namespace de4dot.code.deobfuscators.Confuser {
class ProxyCallFixerV10 : ProxyCallFixer2 { class ProxyCallFixer : ProxyCallFixer2 {
MethodDefinitionAndDeclaringTypeDict<ProxyCreatorInfo> methodToInfo = new MethodDefinitionAndDeclaringTypeDict<ProxyCreatorInfo>(); MethodDefinitionAndDeclaringTypeDict<ProxyCreatorInfo> methodToInfo = new MethodDefinitionAndDeclaringTypeDict<ProxyCreatorInfo>();
FieldDefinitionAndDeclaringTypeDict<List<MethodDefinition>> fieldToMethods = new FieldDefinitionAndDeclaringTypeDict<List<MethodDefinition>>(); FieldDefinitionAndDeclaringTypeDict<List<MethodDefinition>> fieldToMethods = new FieldDefinitionAndDeclaringTypeDict<List<MethodDefinition>>();
string ourAsm; string ourAsm;
@ -135,7 +135,7 @@ namespace de4dot.code.deobfuscators.Confuser {
} }
} }
public ProxyCallFixerV10(ModuleDefinition module, byte[] fileData) public ProxyCallFixer(ModuleDefinition module, byte[] fileData)
: base(module) { : base(module) {
this.fileData = fileData; this.fileData = fileData;
if (module.Assembly == null || module.Assembly.Name == null) if (module.Assembly == null || module.Assembly.Name == null)