deobfuscation - getconstantpool fix

This commit is contained in:
Jindra Petk
2013-07-06 15:41:16 +02:00
parent f614f6c1ac
commit a188de262f
2 changed files with 10 additions and 5 deletions

View File

@@ -548,7 +548,10 @@ public class SWFInputStream extends InputStream {
}
GraphSourceItem ins = code.get(ip);
if (ins.isIgnored()) {
ip++;
if(ins.isExit()){
break;
}
ip++;
continue;
}
@@ -601,10 +604,7 @@ public class SWFInputStream extends InputStream {
if (ins instanceof ActionJump) {
add += " change:" + (((ActionJump) ins).getJumpOffset());
}
System.err.println("getConstantPool ip " + ip + ", addr " + Helper.formatAddress(((Action) ins).getAddress()) + ": " + ((Action) ins).getASMSource(new ArrayList<GraphSourceItem>(), new ArrayList<Long>(), cpool.constants, version, false) + add + " stack:" + Helper.stackToString(stack, Helper.toList(cpool)));
if (ip == 116) {
System.err.println("kok");
}
System.err.println("getConstantPool ip " + ip + ", addr " + Helper.formatAddress(((Action) ins).getAddress()) + ": " + ((Action) ins).getASMSource(new ArrayList<GraphSourceItem>(), new ArrayList<Long>(), cpool==null?null:cpool.constants, version, false) + add + " stack:" + Helper.stackToString(stack, Helper.toList(cpool)));
}
if (ins instanceof ActionConstantPool) {
constantPools.add(new ConstantPool(((ActionConstantPool) ins).constantPool));

View File

@@ -34,6 +34,11 @@ public class ActionEnd extends Action {
return "End";
}
@Override
public boolean isExit() {
return true;
}
@Override
public void translate(Stack<com.jpexs.decompiler.flash.graph.GraphTargetItem> stack, List<com.jpexs.decompiler.flash.graph.GraphTargetItem> output, java.util.HashMap<Integer, String> regNames, HashMap<String, GraphTargetItem> variables, HashMap<String, GraphTargetItem> functions) {
//output.add(new SimpleActionTreeItem(this, "end()"));