about summary refs log tree commit diff stats
path: root/miasm/jitter/emulatedsymbexec.py
diff options
context:
space:
mode:
Diffstat (limited to 'miasm/jitter/emulatedsymbexec.py')
-rw-r--r--miasm/jitter/emulatedsymbexec.py35
1 files changed, 32 insertions, 3 deletions
diff --git a/miasm/jitter/emulatedsymbexec.py b/miasm/jitter/emulatedsymbexec.py
index 4355c0b9..aacfba9f 100644
--- a/miasm/jitter/emulatedsymbexec.py
+++ b/miasm/jitter/emulatedsymbexec.py
@@ -19,6 +19,36 @@ class EmulatedSymbExec(SymbolicExecutionEngine):
             2: 0x00000209,
             3: 0x078bf9ff
         },
+        2: {
+            0: 0,
+            1: 0,
+            2: 0,
+            3: 0
+        },
+        4: {
+            0: 0,
+            1: 0,
+            2: 0,
+            3: 0
+        },
+        7: {
+            0: 0,
+            1: (1 << 0) | (1 << 3),
+            2: 0,
+            3: 0
+        },
+        0x80000000: {
+            0: 0x80000008,
+            1: 0,
+            2: 0,
+            3: 0
+        },
+        0x80000001: {
+            0: 0,
+            1: 0,
+            2: (1 << 0) | (1 << 8),
+            3: (1 << 11) | (1 << 29),
+        },
     }
 
     def __init__(self, cpu, vm, *args, **kwargs):
@@ -45,7 +75,7 @@ class EmulatedSymbExec(SymbolicExecutionEngine):
             return super(EmulatedSymbExec, self).mem_read(expr_mem)
         addr = int(addr)
         size = expr_mem.size // 8
-        value = self.cpu.get_mem(addr, size)
+        value = self.vm.get_mem(addr, size)
         if self.vm.is_little_endian():
             value = value[::-1]
         self.vm.add_mem_read(addr, size)
@@ -77,8 +107,7 @@ class EmulatedSymbExec(SymbolicExecutionEngine):
             content = content[::-1]
 
         # Write in VmMngr context
-        self.cpu.set_mem(addr, content)
-        self.vm.add_mem_write(addr, len(content))
+        self.vm.set_mem(addr, content)
 
     # Interaction symbexec <-> jitter
     def update_cpu_from_engine(self):