miasm
Reverse engineering framework
miasm.ir.symbexec.MemSparse Class Reference
Inheritance diagram for miasm.ir.symbexec.MemSparse:
Collaboration diagram for miasm.ir.symbexec.MemSparse:

Public Member Functions

def __init__ (self, addrsize, expr_simp=expr_simp_explicit)
 
def __contains__ (self, expr)
 
def contains_partial (self, expr)
 
def clear (self)
 
def copy (self)
 
def __delitem__ (self, expr)
 
def delete_partial (self, expr)
 
def read (self, ptr, size)
 
def write (self, ptr, expr)
 
def iteritems (self)
 
def items (self)
 
def dump (self)
 
def __repr__ (self)
 

Public Attributes

 addrsize
 
 expr_simp
 
 base_to_memarray
 

Detailed Description

Link a symbolic memory pointer to its MemArray.

For each symbolic memory object, this object will extract the memory pointer
*ptr*. It then splits *ptr* into a symbolic and an integer part. For
example, the memory @[ESP+4] will give ESP+4 for *ptr*. *ptr* is then split
into its base ESP and its offset 4. Each symbolic base address uses a
different MemArray.

Example:
- @32[EAX+EBX]
- @8[EAX+EBX+0x100]
Will be stored in the same MemArray with a EAX+EBX base

Constructor & Destructor Documentation

◆ __init__()

def miasm.ir.symbexec.MemSparse.__init__ (   self,
  addrsize,
  expr_simp = expr_simp_explicit 
)
@addrsize: size (in bits) of the addresses manipulated by the MemSparse
@expr_simp: an ExpressionSimplifier instance

Member Function Documentation

◆ __contains__()

def miasm.ir.symbexec.MemSparse.__contains__ (   self,
  expr 
)
Return True if the whole @expr is present
For partial check, use 'contains_partial'
Here is the call graph for this function:

◆ __delitem__()

def miasm.ir.symbexec.MemSparse.__delitem__ (   self,
  expr 
)
Delete a value @expr *fully* present in memory
For partial delete, use delete_partial
Here is the call graph for this function:

◆ __repr__()

def miasm.ir.symbexec.MemSparse.__repr__ (   self)

◆ clear()

def miasm.ir.symbexec.MemSparse.clear (   self)
Reset the current object content

◆ contains_partial()

def miasm.ir.symbexec.MemSparse.contains_partial (   self,
  expr 
)
Return True if a part of @expr is present in memory
Here is the call graph for this function:

◆ copy()

def miasm.ir.symbexec.MemSparse.copy (   self)
Copy the current object instance

◆ delete_partial()

def miasm.ir.symbexec.MemSparse.delete_partial (   self,
  expr 
)
Delete @expr from memory. Skip parts of @expr which are not present in
memory.
Here is the call graph for this function:

◆ dump()

def miasm.ir.symbexec.MemSparse.dump (   self)
Display MemSparse content
Here is the caller graph for this function:

◆ items()

def miasm.ir.symbexec.MemSparse.items (   self)
Return stored memory variables and their values.
Here is the call graph for this function:

◆ iteritems()

def miasm.ir.symbexec.MemSparse.iteritems (   self)
Iterate on stored memory variables and their values.
Here is the caller graph for this function:

◆ read()

def miasm.ir.symbexec.MemSparse.read (   self,
  ptr,
  size 
)
Return the value associated with the Expr at address @ptr
@ptr: Expr representing the memory address
@size: memory size (in bits), byte aligned
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write()

def miasm.ir.symbexec.MemSparse.write (   self,
  ptr,
  expr 
)
Update the corresponding Expr @expr at address @ptr
@ptr: Expr representing the memory address
@expr: Expr instance
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ addrsize

miasm.ir.symbexec.MemSparse.addrsize

◆ base_to_memarray

miasm.ir.symbexec.MemSparse.base_to_memarray

◆ expr_simp

miasm.ir.symbexec.MemSparse.expr_simp

The documentation for this class was generated from the following file: