about summary refs log tree commit diff stats
path: root/example/unpack_upx.py
diff options
context:
space:
mode:
Diffstat (limited to 'example/unpack_upx.py')
-rw-r--r--example/unpack_upx.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/example/unpack_upx.py b/example/unpack_upx.py
index e7ea4b77..4d66be58 100644
--- a/example/unpack_upx.py
+++ b/example/unpack_upx.py
@@ -156,7 +156,8 @@ from miasm.tools import win_api
 dyn_func = {}

 dyn_func[dll_dyn_funcs['kernel32_LoadLibraryA']] = myloadlibexa

 dyn_func[dll_dyn_funcs['kernel32_GetProcAddress']] = mygetproc

-dyn_func[dll_dyn_funcs['kernel32_VirtualProtect']] = win_api.kernel32_VirtualProtect

+if 'kernel32_VirtualProtect' in dll_dyn_funcs:

+    dyn_func[dll_dyn_funcs['kernel32_VirtualProtect']] = win_api.kernel32_VirtualProtect