More execution stuff

This commit is contained in:
Adam
2014-12-02 12:02:29 -05:00
parent 4a24560be5
commit 37dac95ee0
69 changed files with 1563 additions and 110 deletions

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
import java.io.IOException;
public class AConstNull extends Instruction
{
public AConstNull(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
stack.push(null);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.IOException;
public class ALoad_0 extends Instruction
{
public ALoad_0(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Object obj = frame.getVariables().get(0);
assert obj != null;
frame.getStack().push(obj);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.IOException;
public class ALoad_1 extends Instruction
{
public ALoad_1(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Object obj = frame.getVariables().get(1);
assert obj != null;
frame.getStack().push(obj);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.IOException;
public class ALoad_2 extends Instruction
{
public ALoad_2(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Object obj = frame.getVariables().get(2);
assert obj != null;
frame.getStack().push(obj);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.IOException;
public class ALoad_3 extends Instruction
{
public ALoad_3(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Object obj = frame.getVariables().get(3);
assert obj != null;
frame.getStack().push(obj);
}
}

View File

@@ -3,6 +3,7 @@ package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.DataInputStream;
import java.io.IOException;
@@ -20,4 +21,11 @@ public class AStore extends Instruction
length += 1;
}
@Override
public void execute(Frame frame)
{
Object obj = frame.getStack().pop();
assert obj != null;
frame.getVariables().set(index, obj);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.IOException;
public class AStore_0 extends Instruction
{
public AStore_0(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Object obj = frame.getStack().pop();
assert obj != null;
frame.getVariables().set(0, obj);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.IOException;
public class AStore_1 extends Instruction
{
public AStore_1(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Object obj = frame.getStack().pop();
assert obj != null;
frame.getVariables().set(1, obj);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.IOException;
public class AStore_2 extends Instruction
{
public AStore_2(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Object obj = frame.getStack().pop();
assert obj != null;
frame.getVariables().set(2, obj);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.IOException;
public class AStore_3 extends Instruction
{
public AStore_3(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Object obj = frame.getStack().pop();
assert obj != null;
frame.getVariables().set(3, obj);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
import java.io.IOException;
public class DConst_0 extends Instruction
{
public DConst_0(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
stack.push(0d);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
import java.io.IOException;
public class DConst_1 extends Instruction
{
public DConst_1(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
stack.push(1d);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.IOException;
public class DLoad_0 extends Instruction
{
public DLoad_0(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Object obj = frame.getVariables().get(0);
assert obj instanceof Double;
frame.getStack().push(obj);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.IOException;
public class DLoad_1 extends Instruction
{
public DLoad_1(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Object obj = frame.getVariables().get(1);
assert obj instanceof Double;
frame.getStack().push(obj);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.IOException;
public class DLoad_2 extends Instruction
{
public DLoad_2(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Object obj = frame.getVariables().get(2);
assert obj instanceof Double;
frame.getStack().push(obj);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.IOException;
public class DLoad_3 extends Instruction
{
public DLoad_3(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Object obj = frame.getVariables().get(3);
assert obj instanceof Double;
frame.getStack().push(obj);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.IOException;
public class DStore_0 extends Instruction
{
public DStore_0(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Object obj = frame.getStack().pop();
assert obj instanceof Double;
frame.getVariables().set(0, obj);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.IOException;
public class DStore_1 extends Instruction
{
public DStore_1(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Object obj = frame.getStack().pop();
assert obj instanceof Double;
frame.getVariables().set(1, obj);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.IOException;
public class DStore_2 extends Instruction
{
public DStore_2(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Object obj = frame.getStack().pop();
assert obj instanceof Double;
frame.getVariables().set(2, obj);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.IOException;
public class DStore_3 extends Instruction
{
public DStore_3(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Object obj = frame.getStack().pop();
assert obj instanceof Double;
frame.getVariables().set(3, obj);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
import java.io.IOException;
public class FConst_0 extends Instruction
{
public FConst_0(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
stack.push(0f);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
import java.io.IOException;
public class FConst_1 extends Instruction
{
public FConst_1(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
stack.push(1f);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
import java.io.IOException;
public class FConst_2 extends Instruction
{
public FConst_2(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
stack.push(2f);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.IOException;
public class FLoad_0 extends Instruction
{
public FLoad_0(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Object obj = frame.getVariables().get(0);
assert obj instanceof Float;
frame.getStack().push(obj);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.IOException;
public class FLoad_1 extends Instruction
{
public FLoad_1(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Object obj = frame.getVariables().get(1);
assert obj instanceof Float;
frame.getStack().push(obj);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.IOException;
public class FLoad_2 extends Instruction
{
public FLoad_2(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Object obj = frame.getVariables().get(2);
assert obj instanceof Float;
frame.getStack().push(obj);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.IOException;
public class FLoad_3 extends Instruction
{
public FLoad_3(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Object obj = frame.getVariables().get(3);
assert obj instanceof Float;
frame.getStack().push(obj);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.IOException;
public class FStore_0 extends Instruction
{
public FStore_0(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Object obj = frame.getStack().pop();
assert obj instanceof Float;
frame.getVariables().set(0, obj);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.IOException;
public class FStore_1 extends Instruction
{
public FStore_1(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Object obj = frame.getStack().pop();
assert obj instanceof Float;
frame.getVariables().set(1, obj);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.IOException;
public class FStore_2 extends Instruction
{
public FStore_2(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Object obj = frame.getStack().pop();
assert obj instanceof Float;
frame.getVariables().set(2, obj);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.IOException;
public class FStore_3 extends Instruction
{
public FStore_3(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Object obj = frame.getStack().pop();
assert obj instanceof Float;
frame.getVariables().set(3, obj);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
import java.io.IOException;
public class IConst_0 extends Instruction
{
public IConst_0(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
stack.push(0);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
import java.io.IOException;
public class IConst_1 extends Instruction
{
public IConst_1(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
stack.push(1);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
import java.io.IOException;
public class IConst_2 extends Instruction
{
public IConst_2(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
stack.push(2);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
import java.io.IOException;
public class IConst_3 extends Instruction
{
public IConst_3(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
stack.push(3);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
import java.io.IOException;
public class IConst_4 extends Instruction
{
public IConst_4(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
stack.push(4);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
import java.io.IOException;
public class IConst_5 extends Instruction
{
public IConst_5(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
stack.push(5);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
import java.io.IOException;
public class IConst_M1 extends Instruction
{
public IConst_M1(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
stack.push(-1);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.IOException;
public class ILoad_0 extends Instruction
{
public ILoad_0(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Object obj = frame.getVariables().get(0);
assert obj instanceof Integer;
frame.getStack().push(obj);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.IOException;
public class ILoad_1 extends Instruction
{
public ILoad_1(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Object obj = frame.getVariables().get(1);
assert obj instanceof Integer;
frame.getStack().push(obj);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.IOException;
public class ILoad_2 extends Instruction
{
public ILoad_2(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Object obj = frame.getVariables().get(2);
assert obj instanceof Integer;
frame.getStack().push(obj);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.IOException;
public class ILoad_3 extends Instruction
{
public ILoad_3(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Object obj = frame.getVariables().get(3);
assert obj instanceof Integer;
frame.getStack().push(obj);
}
}

View File

@@ -0,0 +1,22 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
public class IMul extends Instruction
{
public IMul(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Integer one = (Integer) frame.getStack().pop(), two = (Integer) frame.getStack().pop();
int result = one.intValue() * two.intValue();
frame.getStack().push(result);
}
}

View File

@@ -3,6 +3,7 @@ package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.DataInputStream;
import java.io.IOException;
@@ -20,4 +21,11 @@ public class IStore extends Instruction
length += 1;
}
@Override
public void execute(Frame frame)
{
Object obj = frame.getStack().pop();
assert obj instanceof Integer;
frame.getVariables().set(index, obj);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.IOException;
public class IStore_0 extends Instruction
{
public IStore_0(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Object obj = frame.getStack().pop();
assert obj instanceof Integer;
frame.getVariables().set(0, obj);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.IOException;
public class IStore_1 extends Instruction
{
public IStore_1(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Object obj = frame.getStack().pop();
assert obj instanceof Integer;
frame.getVariables().set(1, obj);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.IOException;
public class IStore_2 extends Instruction
{
public IStore_2(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Object obj = frame.getStack().pop();
assert obj instanceof Integer;
frame.getVariables().set(2, obj);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.IOException;
public class IStore_3 extends Instruction
{
public IStore_3(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Object obj = frame.getStack().pop();
assert obj instanceof Integer;
frame.getVariables().set(3, obj);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
import java.io.IOException;
public class LConst_0 extends Instruction
{
public LConst_0(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
stack.push(0L);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
import java.io.IOException;
public class LConst_1 extends Instruction
{
public LConst_1(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
stack.push(1L);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.IOException;
public class LLoad_0 extends Instruction
{
public LLoad_0(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Object obj = frame.getVariables().get(1);
assert obj instanceof Long;
frame.getStack().push(obj);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.IOException;
public class LLoad_1 extends Instruction
{
public LLoad_1(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Object obj = frame.getVariables().get(1);
assert obj instanceof Long;
frame.getStack().push(obj);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.IOException;
public class LLoad_2 extends Instruction
{
public LLoad_2(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Object obj = frame.getVariables().get(2);
assert obj instanceof Long;
frame.getStack().push(obj);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.IOException;
public class LLoad_3 extends Instruction
{
public LLoad_3(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Object obj = frame.getVariables().get(3);
assert obj instanceof Long;
frame.getStack().push(obj);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.IOException;
public class LStore_0 extends Instruction
{
public LStore_0(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Object obj = frame.getStack().pop();
assert obj instanceof Long;
frame.getVariables().set(0, obj);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.IOException;
public class LStore_1 extends Instruction
{
public LStore_1(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Object obj = frame.getStack().pop();
assert obj instanceof Long;
frame.getVariables().set(1, obj);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.IOException;
public class LStore_2 extends Instruction
{
public LStore_2(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Object obj = frame.getStack().pop();
assert obj instanceof Long;
frame.getVariables().set(2, obj);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.IOException;
public class LStore_3 extends Instruction
{
public LStore_3(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Object obj = frame.getStack().pop();
assert obj instanceof Long;
frame.getVariables().set(3, obj);
}
}

View File

@@ -0,0 +1,21 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.IOException;
public class NOP extends Instruction
{
public NOP(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
}
}

View File

@@ -0,0 +1,22 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.IOException;
public class Pop extends Instruction
{
public Pop(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
frame.getStack().pop();
}
}

View File

@@ -0,0 +1,25 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import java.io.IOException;
public class Pop2 extends Instruction
{
public Pop2(Instructions instructions, InstructionType type, int pc) throws IOException
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Object obj = frame.getStack().pop();
if (obj instanceof Double || obj instanceof Long)
return;
frame.getStack().pop();
}
}