miasm
Reverse engineering framework
|
Functions | |
def | smt2_eq (a, b) |
def | smt2_implies (a, b) |
def | smt2_and (*args) |
def | smt2_or (*args) |
def | smt2_ite (cond, a, b) |
def | smt2_distinct (*args) |
def | smt2_assert (expr) |
def | declare_bv (bv, size) |
def | declare_array (a, bv1, bv2) |
def | bit_vec_val (v, size) |
def | bit_vec (size) |
def | bvadd (a, b) |
def | bvsub (a, b) |
def | bvmul (a, b) |
def | bvand (a, b) |
def | bvor (a, b) |
def | bvxor (a, b) |
def | bvneg (bv) |
def | bvsdiv (a, b) |
def | bvudiv (a, b) |
def | bvsmod (a, b) |
def | bvurem (a, b) |
def | bvshl (a, b) |
def | bvlshr (a, b) |
def | bvashr (a, b) |
def | bv_rotate_left (a, b, size) |
def | bv_rotate_right (a, b, size) |
def | bv_extract (high, low, bv) |
def | bv_concat (a, b) |
def | array_select (array, index) |
def | array_store (array, index, value) |
def miasm.expression.smt2_helper.array_select | ( | array, | |
index | |||
) |
Reads from an SMT2 array at index @index :param array: SMT2 array :param index: SMT2 expression, index of the array
def miasm.expression.smt2_helper.array_store | ( | array, | |
index, | |||
value | |||
) |
Writes an value into an SMT2 array at address @index :param array: SMT array :param index: SMT2 expression, index of the array :param value: SMT2 expression, value to write
def miasm.expression.smt2_helper.bit_vec | ( | size | ) |
Returns a bit vector of size @size
def miasm.expression.smt2_helper.bit_vec_val | ( | v, | |
size | |||
) |
Declares a bit vector value :param v: int, value of the bit vector :param size: size of the bit vector
def miasm.expression.smt2_helper.bv_concat | ( | a, | |
b | |||
) |
Concatenation of two SMT2 expressions
def miasm.expression.smt2_helper.bv_extract | ( | high, | |
low, | |||
bv | |||
) |
Extracts bits from a bit vector :param high: end bit :param low: start bit :param bv: bit vector
def miasm.expression.smt2_helper.bv_rotate_left | ( | a, | |
b, | |||
size | |||
) |
Rotates bits of a to the left b times: a <<< b Since ((_ rotate_left b) a) does not support symbolic values for b, the implementation is based on a C implementation. Therefore, the rotation will be computed as a << (b & (size - 1))) | (a >> (size - (b & (size - 1)))) :param a: bit vector :param b: bit vector :param size: size of a
def miasm.expression.smt2_helper.bv_rotate_right | ( | a, | |
b, | |||
size | |||
) |
Rotates bits of a to the right b times: a >>> b Since ((_ rotate_right b) a) does not support symbolic values for b, the implementation is based on a C implementation. Therefore, the rotation will be computed as a >> (b & (size - 1))) | (a << (size - (b & (size - 1)))) :param a: bit vector :param b: bit vector :param size: size of a
def miasm.expression.smt2_helper.bvadd | ( | a, | |
b | |||
) |
Addition: a + b
def miasm.expression.smt2_helper.bvand | ( | a, | |
b | |||
) |
Bitwise AND: a & b
def miasm.expression.smt2_helper.bvashr | ( | a, | |
b | |||
) |
Arithmetic shift right: a a>> b
def miasm.expression.smt2_helper.bvlshr | ( | a, | |
b | |||
) |
Logical shift right: a >> b
def miasm.expression.smt2_helper.bvmul | ( | a, | |
b | |||
) |
Multiplication: a * b
def miasm.expression.smt2_helper.bvneg | ( | bv | ) |
Unary minus: - bv
def miasm.expression.smt2_helper.bvor | ( | a, | |
b | |||
) |
Bitwise OR: a | b
def miasm.expression.smt2_helper.bvsdiv | ( | a, | |
b | |||
) |
Signed division: a / b
def miasm.expression.smt2_helper.bvshl | ( | a, | |
b | |||
) |
Shift left: a << b
def miasm.expression.smt2_helper.bvsmod | ( | a, | |
b | |||
) |
Signed modulo: a mod b
def miasm.expression.smt2_helper.bvsub | ( | a, | |
b | |||
) |
Subtraction: a - b
def miasm.expression.smt2_helper.bvudiv | ( | a, | |
b | |||
) |
Unsigned division: a / b
def miasm.expression.smt2_helper.bvurem | ( | a, | |
b | |||
) |
Unsigned modulo: a mod b
def miasm.expression.smt2_helper.bvxor | ( | a, | |
b | |||
) |
Bitwise XOR: a ^ b
def miasm.expression.smt2_helper.declare_array | ( | a, | |
bv1, | |||
bv2 | |||
) |
Declares an SMT2 array represented as a map from a bit vector to another bit vector. :param a: array name :param bv1: SMT2 bit vector :param bv2: SMT2 bit vector
def miasm.expression.smt2_helper.declare_bv | ( | bv, | |
size | |||
) |
Declares an bit vector @bv of size @size
def miasm.expression.smt2_helper.smt2_and | ( | * | args | ) |
Conjunction: a and b and c ...
def miasm.expression.smt2_helper.smt2_assert | ( | expr | ) |
Assertion that @expr holds
def miasm.expression.smt2_helper.smt2_distinct | ( | * | args | ) |
Distinction: a != b != c != ...
def miasm.expression.smt2_helper.smt2_eq | ( | a, | |
b | |||
) |
Assignment: a = b
def miasm.expression.smt2_helper.smt2_implies | ( | a, | |
b | |||
) |
Implication: a => b
def miasm.expression.smt2_helper.smt2_ite | ( | cond, | |
a, | |||
b | |||
) |
If-then-else: cond ? a : b
def miasm.expression.smt2_helper.smt2_or | ( | * | args | ) |
Disjunction: a or b or c ...