diff options
| author | serpilliere <devnull@localhost> | 2012-08-03 13:22:40 +0200 |
|---|---|---|
| committer | serpilliere <devnull@localhost> | 2012-08-03 13:22:40 +0200 |
| commit | bd9a5ab16ef35ad89a4a1b4335f66dc6dea0e081 (patch) | |
| tree | cbc035a837af5be61bbe02f352ed28dea0a6cd78 | |
| parent | ae66cd9178f210bd6d5e198e8fc20698d0feb924 (diff) | |
| download | miasm-bd9a5ab16ef35ad89a4a1b4335f66dc6dea0e081.tar.gz miasm-bd9a5ab16ef35ad89a4a1b4335f66dc6dea0e081.zip | |
to_c_helper: add stack size opt
| -rw-r--r-- | miasm/tools/to_c_helper.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/miasm/tools/to_c_helper.py b/miasm/tools/to_c_helper.py index 37bf5324..901e3179 100644 --- a/miasm/tools/to_c_helper.py +++ b/miasm/tools/to_c_helper.py @@ -1211,8 +1211,12 @@ def load_pe_in_vm(fname_in, options, all_imp_dll = None, **kargs): win_api.winobjs.module_path = seh_helper.main_pe_name+"\x00" win_api.winobjs.hcurmodule = e.NThdr.ImageBase + stack_size = 0x10000 + if 'stack_size' in kargs: + stack_size = kargs['stack_size'] + stack_base_ad = kargs.get('stack_base_ad', 0x1230000) - stack_size = kargs.get('stack_size', 0x10000) + stack_size = kargs.get('stack_size', stack_size) vm_add_memory_page(stack_base_ad, codenat.PAGE_READ|codenat.PAGE_WRITE, "\x00"*stack_size) |