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