mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-18 09:28:23 +00:00
- Setting of limit of executed instructions during AS1/2 deobfuscation
- Default limit of maximum executed instructions during AS1/2 deobfuscation raised to 10000
This commit is contained in:
@@ -76,6 +76,7 @@ import com.jpexs.decompiler.flash.action.swf5.ActionToString;
|
||||
import com.jpexs.decompiler.flash.action.swf5.ActionTypeOf;
|
||||
import com.jpexs.decompiler.flash.action.swf6.ActionGreater;
|
||||
import com.jpexs.decompiler.flash.action.swf6.ActionStringGreater;
|
||||
import com.jpexs.decompiler.flash.configuration.Configuration;
|
||||
import com.jpexs.decompiler.flash.ecma.EcmaScript;
|
||||
import com.jpexs.decompiler.flash.helpers.SWFDecompilerAdapter;
|
||||
import com.jpexs.decompiler.flash.helpers.collections.FixItemCounterStack;
|
||||
@@ -97,8 +98,6 @@ import java.util.Stack;
|
||||
*/
|
||||
public class ActionDeobfuscator extends SWFDecompilerAdapter {
|
||||
|
||||
private final int executionLimit = 5000;
|
||||
|
||||
@Override
|
||||
public void actionListParsed(ActionList actions, SWF swf) throws InterruptedException {
|
||||
FastActionList fastActions = new FastActionList(actions);
|
||||
@@ -447,6 +446,7 @@ public class ActionDeobfuscator extends SWFDecompilerAdapter {
|
||||
int skippedInstructions = 0;
|
||||
ActionConstantPool lastConstantPool = null;
|
||||
|
||||
int executionLimit = Configuration.as12DeobfuscatorExecutionLimit.get();
|
||||
boolean skippedInstructionsUnknown = false;
|
||||
boolean jumpedHere = true;
|
||||
boolean jumpFound = false;
|
||||
|
||||
@@ -206,6 +206,13 @@ public final class Configuration {
|
||||
@ConfigurationCategory("limit")
|
||||
public static final ConfigurationItem<Integer> decompilationTimeoutFile = null;
|
||||
|
||||
/**
|
||||
* AS1/2 deobfuscator execution limit (max number of instructions processed)
|
||||
*/
|
||||
@ConfigurationDefaultInt(10000)
|
||||
@ConfigurationCategory("limit")
|
||||
public static final ConfigurationItem<Integer> as12DeobfuscatorExecutionLimit = null;
|
||||
|
||||
/**
|
||||
* Using parameter names in decompiling may cause problems because official
|
||||
* programs like Flash CS 5.5 inserts wrong parameter names indices
|
||||
|
||||
Reference in New Issue
Block a user