about summary refs log tree commit diff stats
path: root/miasm/tools/win_api.py
diff options
context:
space:
mode:
authorserpilliere <devnull@localhost>2011-08-08 14:05:27 +0200
committerserpilliere <devnull@localhost>2011-08-08 14:05:27 +0200
commitc9c9bc8300270fa97fc1a49e996b06ecdaf5291b (patch)
tree7e990d17b86d15780355fcd22a8bd2b672b516bc /miasm/tools/win_api.py
parent7f8c548bb8123d2fb20461a8e161258c8fa372d2 (diff)
downloadfocaccia-miasm-c9c9bc8300270fa97fc1a49e996b06ecdaf5291b.tar.gz
focaccia-miasm-c9c9bc8300270fa97fc1a49e996b06ecdaf5291b.zip
fix tipo
Diffstat (limited to 'miasm/tools/win_api.py')
-rw-r--r--miasm/tools/win_api.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/miasm/tools/win_api.py b/miasm/tools/win_api.py
index 80abb523..5a4d1edc 100644
--- a/miasm/tools/win_api.py
+++ b/miasm/tools/win_api.py
@@ -61,6 +61,7 @@ module_cur_hwnd = 0x88800
 
 module_file_nul = 0x999000
 runtime_dll = None
+current_pe = None
 
 """
 typedef struct tagPROCESSENTRY32 {
@@ -856,7 +857,7 @@ def kernel32_GetModuleHandleA():
         print libname
         eax = runtime_dll.lib_get_add_base(libname)
     else:
-        eax = e.Opthdr.Opthdr.ImageBase
+        eax = current_pe.NThdr.ImageBase
         print "default img base" , hex(eax)
     regs = vm_get_gpreg()
     regs['eip'] = ret_ad