about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorFabrice Desclaux <fabrice.desclaux@cea.fr>2015-11-23 12:50:58 +0100
committerFabrice Desclaux <fabrice.desclaux@cea.fr>2015-12-04 15:10:10 +0100
commit443a8450d26979ddcaa88306e36be0b5846b9e83 (patch)
treebde3fe1c17ef96ed0778589b62bc9cda70b7c135
parent6cfdd9b886ee589b0f812b84f81077315cc25b5b (diff)
downloadmiasm-443a8450d26979ddcaa88306e36be0b5846b9e83.tar.gz
miasm-443a8450d26979ddcaa88306e36be0b5846b9e83.zip
Sandbox: default support hcurmodule
Diffstat (limited to '')
-rw-r--r--miasm2/analysis/sandbox.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/miasm2/analysis/sandbox.py b/miasm2/analysis/sandbox.py
index 96a48c44..078663fe 100644
--- a/miasm2/analysis/sandbox.py
+++ b/miasm2/analysis/sandbox.py
@@ -3,7 +3,6 @@ import logging
 from argparse import ArgumentParser
 
 from miasm2.analysis.machine import Machine
-from miasm2.os_dep import win_api_x86_32_seh
 from miasm2.jitter.csts import PAGE_READ, PAGE_WRITE
 from miasm2.analysis import debugging
 from miasm2.jitter.jitload import log_func
@@ -169,7 +168,7 @@ class OS_Win(OS):
     def __init__(self, custom_methods, *args, **kwargs):
         from miasm2.jitter.loader.pe import vm_load_pe, vm_load_pe_libs,\
             preload_pe, libimp_pe, vm_load_pe_and_dependencies
-        from miasm2.os_dep import win_api_x86_32
+        from miasm2.os_dep import win_api_x86_32, win_api_x86_32_seh
         methods = win_api_x86_32.__dict__
         methods.update(custom_methods)
 
@@ -222,6 +221,7 @@ class OS_Win(OS):
         if self.options.use_seh:
             win_api_x86_32_seh.main_pe_name = fname_basename
             win_api_x86_32_seh.main_pe = self.pe
+            win_api_x86_32.winobjs.hcurmodule = self.pe.NThdr.ImageBase
             win_api_x86_32_seh.name2module = self.name2module
             win_api_x86_32_seh.init_seh(self.jitter)
             win_api_x86_32_seh.set_win_fs_0(self.jitter)