miasm
Reverse engineering framework
data_flow.py File Reference

Classes

class  data_flow.Regs
 
class  data_flow.Arch
 
class  data_flow.IRATest
 

Namespaces

 data_flow
 

Functions

def data_flow.gen_irblock (label, exprs_list)
 

Variables

 data_flow.loc_db = LocationDB()
 
 data_flow.a = ExprId("a", 32)
 
 data_flow.b = ExprId("b", 32)
 
 data_flow.c = ExprId("c", 32)
 
 data_flow.d = ExprId("d", 32)
 
 data_flow.r = ExprId("r", 32)
 
 data_flow.a_init = ExprId("a_init", 32)
 
 data_flow.b_init = ExprId("b_init", 32)
 
 data_flow.c_init = ExprId("c_init", 32)
 
 data_flow.d_init = ExprId("d_init", 32)
 
 data_flow.r_init = ExprId("r_init", 32)
 
 data_flow.pc = ExprId("pc", 32)
 
 data_flow.sp = ExprId("sp", 32)
 
 data_flow.CST1 = ExprInt(0x11, 32)
 
 data_flow.CST2 = ExprInt(0x12, 32)
 
 data_flow.CST3 = ExprInt(0x13, 32)
 
 data_flow.LBL0 = loc_db.add_location("lbl0", 0)
 
 data_flow.LBL1 = loc_db.add_location("lbl1", 1)
 
 data_flow.LBL2 = loc_db.add_location("lbl2", 2)
 
 data_flow.LBL3 = loc_db.add_location("lbl3", 3)
 
 data_flow.LBL4 = loc_db.add_location("lbl4", 4)
 
 data_flow.LBL5 = loc_db.add_location("lbl5", 5)
 
 data_flow.LBL6 = loc_db.add_location("lbl6", 6)
 
 data_flow.IRDst = ExprId('IRDst', 32)
 
 data_flow.dummy = ExprId('dummy', 32)
 
 data_flow.IRA = IRATest(loc_db)
 
 data_flow.deadrm = DeadRemoval(IRA)
 
 data_flow.G1_IRA = IRA.new_ircfg()
 
def data_flow.G1_IRB0 = gen_irblock(LBL0, [[ExprAssign(a, CST1)], [ExprAssign(b, CST2)]])
 
def data_flow.G1_IRB1 = gen_irblock(LBL1, [[ExprAssign(a, b)]])
 
def data_flow.G1_IRB2 = gen_irblock(LBL2, [[ExprAssign(r, a)]])
 
 data_flow.G1_EXP_IRA = IRA.new_ircfg()
 
def data_flow.G1_EXP_IRB0 = gen_irblock(LBL0, [[], [ExprAssign(b, CST2)]])
 
def data_flow.G1_EXP_IRB1 = gen_irblock(LBL1, [[ExprAssign(a, b)]])
 
def data_flow.G1_EXP_IRB2 = gen_irblock(LBL2, [[ExprAssign(r, a)]])
 
 data_flow.G2_IRA = IRA.new_ircfg()
 
def data_flow.G2_IRB0 = gen_irblock(LBL0, [[ExprAssign(a, CST1)], [ExprAssign(r, CST1)]])
 
def data_flow.G2_IRB1 = gen_irblock(LBL1, [[ExprAssign(a, a+CST1)]])
 
def data_flow.G2_IRB2 = gen_irblock(LBL2, [[ExprAssign(a, r)]])
 
 data_flow.G2_EXP_IRA = IRA.new_ircfg()
 
def data_flow.G2_EXP_IRB0 = gen_irblock(LBL0, [[], [ExprAssign(r, CST1)]])
 
def data_flow.G2_EXP_IRB1 = gen_irblock(LBL1, [[]])
 
def data_flow.G2_EXP_IRB2 = gen_irblock(LBL2, [[]])
 
 data_flow.G3_IRA = IRA.new_ircfg()
 
def data_flow.G3_IRB0 = gen_irblock(LBL0, [[ExprAssign(a, CST1)]])
 
def data_flow.G3_IRB1 = gen_irblock(LBL1, [[ExprAssign(a, a+CST1)]])
 
def data_flow.G3_IRB2 = gen_irblock(LBL2, [[ExprAssign(r, a)]])
 
 data_flow.G3_EXP_IRA = IRA.new_ircfg()
 
def data_flow.G3_EXP_IRB0 = gen_irblock(LBL0, [[ExprAssign(a, CST1)]])
 
def data_flow.G3_EXP_IRB1 = gen_irblock(LBL1, [[ExprAssign(a, a+CST1)]])
 
def data_flow.G3_EXP_IRB2 = gen_irblock(LBL2, [[ExprAssign(r, a)]])
 
 data_flow.G4_IRA = IRA.new_ircfg()
 
def data_flow.G4_IRB0 = gen_irblock(LBL0, [[ExprAssign(a, CST1)]])
 
def data_flow.G4_IRB1 = gen_irblock(LBL1, [[ExprAssign(a, a+CST1)]])
 
def data_flow.G4_IRB2 = gen_irblock(LBL2, [[ExprAssign(a, a+CST2)]])
 
def data_flow.G4_IRB3 = gen_irblock(LBL3, [[ExprAssign(a, CST3)], [ExprAssign(r, a)]])
 
 data_flow.G4_EXP_IRA = IRA.new_ircfg()
 
def data_flow.G4_EXP_IRB0 = gen_irblock(LBL0, [[]])
 
def data_flow.G4_EXP_IRB1 = gen_irblock(LBL1, [[]])
 
def data_flow.G4_EXP_IRB2 = gen_irblock(LBL2, [[]])
 
def data_flow.G4_EXP_IRB3 = gen_irblock(LBL3, [[ExprAssign(a, CST3)], [ExprAssign(r, a)]])
 
 data_flow.G5_IRA = IRA.new_ircfg()
 
def data_flow.G5_IRB0 = gen_irblock(LBL0, [[ExprAssign(a, CST1)]])
 
def data_flow.G5_IRB1 = gen_irblock(LBL1, [[ExprAssign(r, CST2)]])
 
def data_flow.G5_IRB2 = gen_irblock(LBL2, [[ExprAssign(a, a+CST2)]])
 
def data_flow.G5_IRB3 = gen_irblock(LBL3, [[ExprAssign(a, a+CST3)]])
 
def data_flow.G5_IRB4 = gen_irblock(LBL4, [[ExprAssign(a, a+CST1)]])
 
def data_flow.G5_IRB5 = gen_irblock(LBL5, [[ExprAssign(a, r)]])
 
 data_flow.G5_EXP_IRA = IRA.new_ircfg()
 
def data_flow.G5_EXP_IRB0 = gen_irblock(LBL0, [[]])
 
def data_flow.G5_EXP_IRB1 = gen_irblock(LBL1, [[ExprAssign(r, CST2)]])
 
def data_flow.G5_EXP_IRB2 = gen_irblock(LBL2, [[]])
 
def data_flow.G5_EXP_IRB3 = gen_irblock(LBL3, [[]])
 
def data_flow.G5_EXP_IRB4 = gen_irblock(LBL4, [[]])
 
def data_flow.G5_EXP_IRB5 = gen_irblock(LBL5, [[]])
 
 data_flow.G6_IRA = IRA.new_ircfg()
 
def data_flow.G6_IRB0 = gen_irblock(LBL0, [[ExprAssign(a, CST1)]])
 
def data_flow.G6_IRB1 = gen_irblock(LBL1, [[ExprAssign(b, a)]])
 
def data_flow.G6_IRB2 = gen_irblock(LBL2, [[ExprAssign(a, b)]])
 
def data_flow.G6_IRB3 = gen_irblock(LBL3, [[ExprAssign(r, CST2)]])
 
 data_flow.G6_EXP_IRA = IRA.new_ircfg()
 
def data_flow.G6_EXP_IRB0 = gen_irblock(LBL0, [[]])
 
def data_flow.G6_EXP_IRB1 = gen_irblock(LBL1, [[]])
 
def data_flow.G6_EXP_IRB2 = gen_irblock(LBL2, [[]])
 
def data_flow.G6_EXP_IRB3 = gen_irblock(LBL3, [[ExprAssign(r, CST2)]])
 
 data_flow.G7_IRA = IRA.new_ircfg()
 
def data_flow.G7_IRB0 = gen_irblock(LBL0, [[ExprAssign(a, CST1)], [ExprAssign(r, CST1)]])
 
def data_flow.G7_IRB1 = gen_irblock(LBL1, [[ExprAssign(a, a+CST1)]])
 
def data_flow.G7_IRB2 = gen_irblock(LBL2, [[ExprAssign(a, a+CST2)]])
 
def data_flow.G7_IRB3 = gen_irblock(LBL3, [[ExprAssign(a, r)]])
 
 data_flow.G7_EXP_IRA = IRA.new_ircfg()
 
def data_flow.G7_EXP_IRB0 = gen_irblock(LBL0, [[], [ExprAssign(r, CST1)]])
 
def data_flow.G7_EXP_IRB1 = gen_irblock(LBL1, [[]])
 
def data_flow.G7_EXP_IRB2 = gen_irblock(LBL2, [[]])
 
def data_flow.G7_EXP_IRB3 = gen_irblock(LBL3, [[]])
 
 data_flow.G8_IRA = IRA.new_ircfg()
 
def data_flow.G8_IRB0 = gen_irblock(LBL0, [[ExprAssign(a, CST1)], [ExprAssign(b, CST1)]])
 
def data_flow.G8_IRB1 = gen_irblock(LBL1, [[ExprAssign(a, a+CST1)]])
 
def data_flow.G8_IRB2 = gen_irblock(LBL2, [[ExprAssign(b, b+CST2)]])
 
def data_flow.G8_IRB3 = gen_irblock(LBL3, [[ExprAssign(a, b)]])
 
 data_flow.G8_EXP_IRA = IRA.new_ircfg()
 
def data_flow.G8_EXP_IRB0 = gen_irblock(LBL0, [[], []])
 
def data_flow.G8_EXP_IRB1 = gen_irblock(LBL1, [[]])
 
def data_flow.G8_EXP_IRB2 = gen_irblock(LBL2, [[]])
 
def data_flow.G8_EXP_IRB3 = gen_irblock(LBL3, [[]])
 
 data_flow.G9_IRA = IRA.new_ircfg()
 
def data_flow.G9_IRB0 = gen_irblock(LBL0, [[ExprAssign(a, CST1)], [ExprAssign(b, CST1)]])
 
def data_flow.G9_IRB1 = gen_irblock(LBL1, [[ExprAssign(a, a+CST1)], [ExprAssign(b, b+CST1)]])
 
def data_flow.G9_IRB2 = gen_irblock(LBL2, [[ExprAssign(a, a+CST2)], [ExprAssign(b, b+CST2)]])
 
def data_flow.G9_IRB3 = gen_irblock(LBL3, [[ExprAssign(a, b)]])
 
def data_flow.G9_IRB4 = gen_irblock(LBL4, [[ExprAssign(r, a)], [ExprAssign(r, b)]])
 
 data_flow.G9_EXP_IRA = IRA.new_ircfg()
 
def data_flow.G9_EXP_IRB0 = gen_irblock(LBL0, [[], [ExprAssign(b, CST1)]])
 
def data_flow.G9_EXP_IRB1 = gen_irblock(LBL1, [[], [ExprAssign(b, b+CST1)]])
 
def data_flow.G9_EXP_IRB2 = gen_irblock(LBL2, [[], [ExprAssign(b, b+CST2)]])
 
def data_flow.G9_EXP_IRB3 = gen_irblock(LBL3, [[]])
 
def data_flow.G9_EXP_IRB4 = gen_irblock(LBL4, [[], [ExprAssign(r, b)]])
 
 data_flow.G10_IRA = IRA.new_ircfg()
 
def data_flow.G10_IRB0 = gen_irblock(LBL0, [[ExprAssign(a, CST1)]])
 
def data_flow.G10_IRB1 = gen_irblock(LBL1, [[ExprAssign(b, a)]])
 
def data_flow.G10_IRB2 = gen_irblock(LBL2, [[ExprAssign(a, b)]])
 
def data_flow.G10_IRB3 = gen_irblock(LBL3, [[ExprAssign(r, CST1)]])
 
 data_flow.G10_EXP_IRA = IRA.new_ircfg()
 
def data_flow.G10_EXP_IRB0 = gen_irblock(LBL0, [[]])
 
def data_flow.G10_EXP_IRB1 = gen_irblock(LBL1, [[]])
 
def data_flow.G10_EXP_IRB2 = gen_irblock(LBL2, [[]])
 
def data_flow.G10_EXP_IRB3 = gen_irblock(LBL3, [[ExprAssign(r, CST1)]])
 
 data_flow.G11_IRA = IRA.new_ircfg()
 
def data_flow.G11_IRB0 = gen_irblock(LBL0, [[ExprAssign(a, b)]])
 
def data_flow.G11_IRB1 = gen_irblock(LBL1, [[ExprAssign(b, a)]])
 
def data_flow.G11_IRB2 = gen_irblock(LBL2, [[ExprAssign(r, a)]])
 
def data_flow.G11_IRB3 = gen_irblock(LBL3, [[ExprAssign(a, a+CST1)]])
 
def data_flow.G11_IRB4 = gen_irblock(LBL4, [[ExprAssign(b, b+CST1)]])
 
 data_flow.G11_EXP_IRA = IRA.new_ircfg()
 
def data_flow.G11_EXP_IRB0 = gen_irblock(LBL0, [[ExprAssign(a, b)]])
 
def data_flow.G11_EXP_IRB1 = gen_irblock(LBL1, [[ExprAssign(b, a)]])
 
def data_flow.G11_EXP_IRB2 = gen_irblock(LBL2, [[ExprAssign(r, a)]])
 
 data_flow.G12_IRA = IRA.new_ircfg()
 
def data_flow.G12_IRB0 = gen_irblock(LBL0, [[ExprAssign(r, CST1)], [ExprAssign(a, CST2)]])
 
def data_flow.G12_IRB1 = gen_irblock(LBL1, [[ExprAssign(r, CST2)]])
 
def data_flow.G12_IRB2 = gen_irblock(LBL2, [[ExprAssign(r, a)], [ExprAssign(b, CST3)]])
 
def data_flow.G12_IRB3 = gen_irblock(LBL3, [[ExprAssign(r, CST3)]])
 
def data_flow.G12_IRB4 = gen_irblock(LBL4, [[ExprAssign(r, CST2)]])
 
def data_flow.G12_IRB5 = gen_irblock(LBL5, [[ExprAssign(r, b)]])
 
 data_flow.G12_EXP_IRA = IRA.new_ircfg()
 
def data_flow.G12_EXP_IRB0 = gen_irblock(LBL0, [[], []])
 
def data_flow.G12_EXP_IRB1 = gen_irblock(LBL1, [[ExprAssign(r, CST2)]])
 
def data_flow.G12_EXP_IRB2 = gen_irblock(LBL2, [[], [ExprAssign(b, CST3)]])
 
def data_flow.G12_EXP_IRB3 = gen_irblock(LBL3, [[ExprAssign(r, CST3)]])
 
def data_flow.G12_EXP_IRB4 = gen_irblock(LBL4, [[]])
 
def data_flow.G12_EXP_IRB5 = gen_irblock(LBL5, [[ExprAssign(r, b)]])
 
 data_flow.G13_IRA = IRA.new_ircfg()
 
def data_flow.G13_IRB0 = gen_irblock(LBL0, [[ExprAssign(a, CST1)], [ExprAssign(b, CST2)]])
 
def data_flow.G13_IRB1 = gen_irblock(LBL1, [[ExprAssign(r, b)]])
 
def data_flow.G13_IRB2
 
def data_flow.G13_IRB3 = gen_irblock(LBL3, [[]])
 
def data_flow.G13_IRB4 = gen_irblock(LBL4, [[ExprAssign(b, CST2)]])
 
 data_flow.G13_EXP_IRA = IRA.new_ircfg()
 
def data_flow.G13_EXP_IRB0 = gen_irblock(LBL0, [[ExprAssign(a, CST1)], [ExprAssign(b, CST2)]])
 
def data_flow.G13_EXP_IRB1 = gen_irblock(LBL1, [[ExprAssign(r, b)]])
 
def data_flow.G13_EXP_IRB2
 
def data_flow.G13_EXP_IRB3 = gen_irblock(LBL3, [[]])
 
def data_flow.G13_EXP_IRB4 = gen_irblock(LBL4, [[ExprAssign(b, CST2)]])
 
 data_flow.G14_IRA = IRA.new_ircfg()
 
def data_flow.G14_IRB0
 
def data_flow.G14_IRB1 = gen_irblock(LBL1, [[ExprAssign(r, a+c)]])
 
 data_flow.G14_EXP_IRA = IRA.new_ircfg()
 
def data_flow.G14_EXP_IRB0
 
def data_flow.G14_EXP_IRB1 = gen_irblock(LBL1, [[ExprAssign(r, a+c)]])
 
 data_flow.G15_IRA = IRA.new_ircfg()
 
def data_flow.G15_IRB0
 
def data_flow.G15_IRB1 = gen_irblock(LBL1, [[ExprAssign(r, a)]])
 
 data_flow.G15_EXP_IRA = IRA.new_ircfg()
 
def data_flow.G15_EXP_IRB0 = gen_irblock(LBL0, [[], [ExprAssign(a, CST1)]])
 
def data_flow.G15_EXP_IRB1 = gen_irblock(LBL1, [[ExprAssign(r, a)]])
 
 data_flow.G16_IRA = IRA.new_ircfg()
 
def data_flow.G16_IRB0
 
def data_flow.G16_IRB1 = gen_irblock(LBL1, [[ExprAssign(r, a+b)], [ExprAssign(r, c+r)]])
 
def data_flow.G16_IRB2 = gen_irblock(LBL2, [[]])
 
 data_flow.G16_EXP_IRA = IRA.new_ircfg()
 
def data_flow.G16_EXP_IRB0
 
def data_flow.G16_EXP_IRB1 = gen_irblock(LBL1, [[ExprAssign(r, a+b)], [ExprAssign(r, c+r)]])
 
 data_flow.G17_IRA = IRA.new_ircfg()
 
def data_flow.G17_IRB0
 
 data_flow.G17_EXP_IRA = IRA.new_ircfg()
 
def data_flow.G17_EXP_IRB0
 
 data_flow.g_ira
 
 data_flow.g_exp_ira
 
 data_flow.reaching_defs = ReachingDefinitions(g_ira)
 
 data_flow.defuse = DiGraphDefUse(reaching_defs, deref_mem=True)
 
 data_flow.exp_irb = g_exp_ira.blocks[lbl]