public static int DecompileTest(bool R1, BaseInstruction Cur, StringBuilder Buf, Stub OwnerStub, int Index) { String CmpTarget = R1 ? "R1" : OwnerStub.DecompileInstruction_A(Cur); bool TestVal = Cur.C != 0; BaseInstruction BI = OwnerStub.Instructions[Index + 1]; Buf.Append(String.Format("R1\t\t= {0}\n", CmpTarget)); if (BI.GetFullName().Contains("_JMP")) { if (TestVal) { Buf.Append(String.Format("if ({0}) goto {1}", CmpTarget, Index + BI.B + 1 + 1)); } else { Buf.Append(String.Format("if (not ({0})) goto {1}", CmpTarget, Index + BI.B + 1 + 1)); } Index++; return(Index); } if (TestVal) { Buf.Append(String.Format("if (not({0})) goto {1}", CmpTarget, Index + 2)); } else { Buf.Append(String.Format("if ({0}) goto {1}", CmpTarget, Index + 2)); } return(Index); }
public override void Decompile(StringBuilder Buf, Stub OwnerStub, ref int Index) { Buf.Append(String.Format("{0}\t= {1}", OwnerStub.DecompileInstruction_A(this), B == 0 ? "False" : "True")); if (this.C != 0) { Buf.Append(String.Format("\ngoto {0}", Index + 2)); } }
public override void Decompile(StringBuilder Buf, Stub OwnerStub, ref int Index) { Buf.Append(String.Format("{0}\t= {1} * {2}", OwnerStub.DecompileInstruction_A(this), OwnerStub.DecompileInstruction_B(this), OwnerStub.DecompileInstruction_C(this))); }
public override void Decompile(StringBuilder Buf, Stub OwnerStub, ref int Index) { Buf.Append(String.Format("var_{0}\t= {1}\n", A + 1, OwnerStub.DecompileInstruction_B(this)) + String.Format("{0}\t= {1}[{2}]\n", OwnerStub.DecompileInstruction_A(this), OwnerStub.DecompileInstruction_B(this), OwnerStub.DecompileInstruction_C(this)) + String.Format("R1\t\t= {0}", OwnerStub.DecompileInstruction_A(this))); }