Only call patcher if we need to patch it

This commit is contained in:
de4dot 2011-12-22 18:49:22 +01:00
parent 1b32fdd3b6
commit 1a1350410a

View File

@ -136,8 +136,12 @@ namespace de4dot.code.deobfuscators.dotNET_Reactor.v3 {
return data;
}
bool needsPatching() {
return decrypterType.LinkedResource != null || nativeLibSaver.Resource != null;
}
public override bool getDecryptedModule(ref byte[] newFileData, ref Dictionary<uint, DumpedMethod> dumpedMethods) {
if (!decrypterType.Detected)
if (!needsPatching())
return false;
var fileData = ModuleBytes ?? DeobUtils.readModule(module);