Disable using unknown args by default

This commit is contained in:
de4dot 2012-04-30 12:18:47 +02:00
parent f307520e62
commit 1805e352c4
2 changed files with 8 additions and 1 deletions

View File

@ -146,6 +146,12 @@ namespace de4dot.code {
Blocks blocks;
VariableValues variableValues;
int errors = 0;
bool useUnknownArgs = false;
public bool UseUnknownArgs {
get { return useUnknownArgs; }
set { useUnknownArgs = value; }
}
protected class CallResult {
public Block block;
@ -331,7 +337,7 @@ namespace de4dot.code {
default:
int pushes, pops;
DotNetUtils.calculateStackUsage(instr.Instruction, false, out pushes, out pops);
if (pushes != 1) {
if (!useUnknownArgs || pushes != 1) {
Log.w("Could not find all arguments to method {0} ({1:X8}), instr: {2}",
Utils.removeNewlines(method),
method.MetadataToken.ToInt32(),

View File

@ -136,6 +136,7 @@ namespace de4dot.code.deobfuscators.DeepSea {
}
protected override void scanForObfuscator() {
staticStringInliner.UseUnknownArgs = true;
arrayBlockDeobfuscator = new ArrayBlockDeobfuscator(module);
arrayBlockDeobfuscator.init();
stringDecrypter = new StringDecrypter(module);