From dd88737414b304faab6f1f1d78a4bccc30e60dde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Moln=C3=A1r?= Date: Thu, 4 May 2006 17:16:53 +0000 Subject: [PATCH] it works on wince now (only with dlls) committer: ml1050 1146763013 +0000 --- src/stub/util/armpe/armpe_tester.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/stub/util/armpe/armpe_tester.c b/src/stub/util/armpe/armpe_tester.c index 4830613c..72529586 100644 --- a/src/stub/util/armpe/armpe_tester.c +++ b/src/stub/util/armpe/armpe_tester.c @@ -219,15 +219,10 @@ static int read(void) if (((int) vaddr) == -1) return print("mmap() failed: %d\n", errno); #else - for (ic = 0x10000; ic < 0x80000; ic += 0x10000) - { - if ((vaddr = VirtualAlloc((void *) ic, 0x10000, - MEM_COMMIT, PAGE_EXECUTE_READWRITE)) == 0) - return print("VirtualAlloc() %x failed\n", ic); - print("VirtualAlloc() & memset ok %x\n", ic); - print("%p %p %p\n", &ic, read, &out); - } - vaddr = (void *) UPX_MMAP_ADDRESS; + if ((vaddr = VirtualAlloc(0, ih.imagesize, + MEM_COMMIT, PAGE_EXECUTE_READWRITE)) == 0) + return print("VirtualAlloc() failed\n"); + print("VirtualAlloc() ok %x\n", vaddr); #endif for (ic = 1; ic <= 2; ic++) @@ -334,13 +329,13 @@ static int main2(int argc, char **argv) return 2; if (read()) return 3; - dump('o'); + dump('0'); if (import()) return 4; - dump('i'); + dump('1'); if (reloc()) return 5; - dump('r'); + dump('2'); call(); print("ok.\n");