actionif + action jump target calcualtion simplified 3

This commit is contained in:
honfika@gmail.com
2015-10-06 19:10:32 +02:00
parent 4abf8e98c8
commit 4b98a7fae7

View File

@@ -395,7 +395,7 @@ public class ActionDeobfuscator extends ActionDeobfuscatorSimple {
if (action instanceof ActionJump) {
ActionJump jump = (ActionJump) action;
long address = jump.getAddress() + jump.getTotalActionLength() + jump.getJumpOffset();
long address = jump.getTargetAddress();
idx = actions.getIndexByAddress(address);
if (idx == -1) {
throw new TranslateException("Jump target not found: " + address);
@@ -409,7 +409,7 @@ public class ActionDeobfuscator extends ActionDeobfuscatorSimple {
}
if (EcmaScript.toBoolean(stack.pop().getResult())) {
long address = aif.getAddress() + aif.getTotalActionLength() + aif.getJumpOffset();
long address = aif.getTargetAddress();
idx = actions.getIndexByAddress(address);
if (idx == -1) {
throw new TranslateException("If target not found: " + address);