Add option to disable method inlining
This commit is contained in:
parent
ce8e53976e
commit
2fcd13000b
|
@ -18,6 +18,7 @@
|
|||
*/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using Mono.Cecil;
|
||||
using Mono.Cecil.Cil;
|
||||
|
||||
namespace de4dot.blocks.cflow {
|
||||
|
@ -31,6 +32,8 @@ namespace de4dot.blocks.cflow {
|
|||
StLdlocFixer stLdlocFixer = new StLdlocFixer();
|
||||
MethodCallInliner methodCallInliner = new MethodCallInliner();
|
||||
|
||||
public bool InlineMethods { get; set; }
|
||||
|
||||
public void init(Blocks blocks) {
|
||||
this.blocks = blocks;
|
||||
}
|
||||
|
@ -49,9 +52,11 @@ namespace de4dot.blocks.cflow {
|
|||
if (iterations == 0)
|
||||
changed |= fixDotfuscatorLoop();
|
||||
|
||||
foreach (var block in allBlocks) {
|
||||
methodCallInliner.init(blocks, block);
|
||||
changed |= methodCallInliner.deobfuscate();
|
||||
if (InlineMethods) {
|
||||
foreach (var block in allBlocks) {
|
||||
methodCallInliner.init(blocks, block);
|
||||
changed |= methodCallInliner.deobfuscate();
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var block in allBlocks) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user