From 89b4292445562ae2d64f13947859e56d1fb6bb38 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:17:56 +0000 Subject: [PATCH] saved 2 bytes committer: ml1050 1146763076 +0000 --- src/stub/l_armpet.S | 5 +-- src/stub/l_armpet.h | 102 ++++++++++++++++++++++---------------------- 2 files changed, 53 insertions(+), 54 deletions(-) diff --git a/src/stub/l_armpet.S b/src/stub/l_armpet.S index f840adc4..22a96737 100644 --- a/src/stub/l_armpet.S +++ b/src/stub/l_armpet.S @@ -59,7 +59,7 @@ SECT(ExeStart): @ otherwise the THUMB mode stuff fails adr r3, SRC0 - ldmia r3, {r5, r6, r7, r9, r10, r11, ip} @ r5=src0, r7=dst0 + ldmia r3, {r5, r6, r7, r9, r10, r11, ip} @ r7=dst0 add r5, pc, #4096 @ r3=addr src0, r10=LoadLibraryW .L01: @ r11=GetProcAddressA, ip=CacheSync ldr r6, [r7] @@ -255,8 +255,7 @@ SECT(Imports): .Lhi_call_gpa: mov r0, dll bl GetProcAddressA - str r0, [iat] - add iat, #4 + stmia iat!, {r0} b .Lhi_gpa_loop .unreq iat diff --git a/src/stub/l_armpet.h b/src/stub/l_armpet.h index f5af45f6..867e85f5 100644 --- a/src/stub/l_armpet.h +++ b/src/stub/l_armpet.h @@ -1,4 +1,4 @@ -/* l_armpet.h -- created from l_armpet.bin, 1004 (0x3ec) bytes +/* l_armpet.h -- created from l_armpet.bin, 1000 (0x3e8) bytes This file is part of the UPX executable compressor. @@ -27,11 +27,11 @@ */ -#define NRV_LOADER_THUMB_SIZE 1004 -#define NRV_LOADER_THUMB_ADLER32 0xeb414d89 -#define NRV_LOADER_THUMB_CRC32 0xbbf6b423 +#define NRV_LOADER_THUMB_SIZE 1000 +#define NRV_LOADER_THUMB_ADLER32 0x0e284d57 +#define NRV_LOADER_THUMB_CRC32 0x14427d32 -unsigned char nrv_loader_thumb[1004] = { +unsigned char nrv_loader_thumb[1000] = { 1, 0, 81,227, 11, 0, 0, 26,255, 79, 45,233, 44, 48,143,226, /* 0x 0 */ 224, 30,147,232, 1, 90,143,226, 0, 96,151,229, 1,122,135,226, /* 0x 10 */ 5, 0, 87,225,251,255,255,154, 53, 64,143,226, 15,224,160,225, /* 0x 20 */ @@ -46,53 +46,53 @@ unsigned char nrv_loader_thumb[1004] = { 24,208,240, 43, 8,211, 15, 36, 28, 64, 67,120, 36, 2,228, 24, /* 0x b0 */ 3,120, 2, 48, 36, 2, 27, 25,201, 24, 0, 37, 75, 93, 36, 2, /* 0x c0 */ 228, 24, 1, 53, 4, 45,249,209,164, 24, 12, 96,229,231, 0, 0, /* 0x d0 */ - 66, 82, 69, 76,111, 70,255,176,255,176,255,176,255,176, 28, 76, /* 0x e0 */ - 32, 28, 0,240, 42,248, 55,208, 26, 73, 64, 24,105, 70, 2,120, /* 0x f0 */ - 1, 48, 10,128, 2, 49, 0, 42,249,209,104, 70, 0,240, 37,248, /* 0x 100 */ - 6, 28, 32, 29, 0,240, 25,248, 77, 70, 45, 24, 8, 52, 32,120, /* 0x 110 */ + 66, 82, 69, 76,111, 70,255,176,255,176,255,176,255,176, 27, 76, /* 0x e0 */ + 32, 28, 0,240, 41,248, 53,208, 25, 73, 64, 24,105, 70, 2,120, /* 0x f0 */ + 1, 48, 10,128, 2, 49, 0, 42,249,209,104, 70, 0,240, 36,248, /* 0x 100 */ + 6, 28, 32, 29, 0,240, 24,248, 77, 70, 45, 24, 8, 52, 32,120, /* 0x 110 */ 1, 52, 1, 40,228,212, 5,209, 33, 28, 32,120, 1, 52, 0, 40, /* 0x 120 */ 251,209, 4,224, 32,120, 97,120, 2, 52, 9, 2, 9, 24, 48, 28, /* 0x 130 */ - 0,240, 12,248, 40, 96, 4, 53,233,231, 3, 33, 67, 92, 18, 2, /* 0x 140 */ -210, 24, 1, 57,250,213, 16, 28,112, 71, 80, 71, 88, 71, 0, 0, /* 0x 150 */ - 66, 73, 77, 80, 79, 78, 65, 77,189, 70, 6,188, 4, 32,150, 70, /* 0x 160 */ - 8, 71, 0, 0, 1,192,143,226, 28,255, 47,225, 9, 24,254,181, /* 0x 170 */ - 1, 36,101, 66,228, 7, 13, 39, 63, 2, 15,224, 26,188, 64, 26, /* 0x 180 */ -210, 26, 34, 96,240,188, 2,188, 8, 71, 4,120,100, 65, 1, 48, /* 0x 190 */ - 36, 6,247, 70, 3,120, 1, 48, 19,112, 1, 50, 36, 25,254, 70, /* 0x 1a0 */ -243,208,247,210, 1, 33, 36, 25,254, 70,238,208, 73, 65, 36, 25, /* 0x 1b0 */ -254, 70,234,208,247,211,203, 30, 0, 33, 5,211, 27, 2, 5,120, /* 0x 1c0 */ - 1, 48, 29, 67,237, 67,217,208, 36, 25,254, 70,221,208, 73, 65, /* 0x 1d0 */ - 36, 25,254, 70,217,208, 73, 65, 9,209, 1, 33, 36, 25,254, 70, /* 0x 1e0 */ -211,208, 73, 65, 36, 25,254, 70,207,208,247,211, 2, 49, 1, 49, /* 0x 1f0 */ -253, 66, 0,210, 1, 49, 19,120, 83, 93, 19,112, 1, 50, 1, 57, /* 0x 200 */ -250,209,203,231, 0, 0, 0,248, 1,192,143,226, 28,255, 47,225, /* 0x 210 */ -252,181, 15, 24, 1, 36,101, 66,228, 7, 5, 38, 54, 2, 15,224, /* 0x 220 */ - 24,188,192, 27,210, 26, 34, 96,240,188, 2,188, 8, 71, 4,120, /* 0x 230 */ -100, 65, 1, 48, 36, 6,247, 70, 3,120, 1, 48, 19,112, 1, 50, /* 0x 240 */ - 36, 25,254, 70,243,208,247,210, 1, 33, 4,224, 1, 57, 36, 25, /* 0x 250 */ -254, 70,236,208, 73, 65, 36, 25,254, 70,232,208, 73, 65, 36, 25, /* 0x 260 */ -254, 70,228,208,242,211,203, 30, 0, 33, 8,211, 27, 2, 5,120, /* 0x 270 */ - 1, 48, 29, 67,237, 67,211,208,109, 16, 19,210, 3,224, 36, 25, /* 0x 280 */ -254, 70,212,208, 14,210, 1, 33, 36, 25,254, 70,207,208, 9,210, /* 0x 290 */ - 36, 25,254, 70,203,208, 73, 65, 36, 25,254, 70,199,208,247,211, /* 0x 2a0 */ - 4, 49, 4,224, 36, 25,254, 70,193,208, 73, 65, 2, 49,238, 66, /* 0x 2b0 */ - 0,210, 1, 49, 19,120, 83, 93, 19,112, 1, 50, 1, 57,250,209, /* 0x 2c0 */ -190,231, 0, 0, 0,248, 85, 80, 88, 33,161,216,208,213, 0, 0, /* 0x 2d0 */ + 0,240, 11,248, 1,197,234,231, 3, 33, 67, 92, 18, 2,210, 24, /* 0x 140 */ + 1, 57,250,213, 16, 28,112, 71, 80, 71, 88, 71, 66, 73, 77, 80, /* 0x 150 */ + 79, 78, 65, 77,189, 70, 6,188, 4, 32,150, 70, 8, 71, 0, 0, /* 0x 160 */ + 1,192,143,226, 28,255, 47,225, 9, 24,254,181, 1, 36,101, 66, /* 0x 170 */ +228, 7, 13, 39, 63, 2, 15,224, 26,188, 64, 26,210, 26, 34, 96, /* 0x 180 */ +240,188, 2,188, 8, 71, 4,120,100, 65, 1, 48, 36, 6,247, 70, /* 0x 190 */ + 3,120, 1, 48, 19,112, 1, 50, 36, 25,254, 70,243,208,247,210, /* 0x 1a0 */ + 1, 33, 36, 25,254, 70,238,208, 73, 65, 36, 25,254, 70,234,208, /* 0x 1b0 */ +247,211,203, 30, 0, 33, 5,211, 27, 2, 5,120, 1, 48, 29, 67, /* 0x 1c0 */ +237, 67,217,208, 36, 25,254, 70,221,208, 73, 65, 36, 25,254, 70, /* 0x 1d0 */ +217,208, 73, 65, 9,209, 1, 33, 36, 25,254, 70,211,208, 73, 65, /* 0x 1e0 */ + 36, 25,254, 70,207,208,247,211, 2, 49, 1, 49,253, 66, 0,210, /* 0x 1f0 */ + 1, 49, 19,120, 83, 93, 19,112, 1, 50, 1, 57,250,209,203,231, /* 0x 200 */ + 0, 0, 0,248, 1,192,143,226, 28,255, 47,225,252,181, 15, 24, /* 0x 210 */ + 1, 36,101, 66,228, 7, 5, 38, 54, 2, 15,224, 24,188,192, 27, /* 0x 220 */ +210, 26, 34, 96,240,188, 2,188, 8, 71, 4,120,100, 65, 1, 48, /* 0x 230 */ + 36, 6,247, 70, 3,120, 1, 48, 19,112, 1, 50, 36, 25,254, 70, /* 0x 240 */ +243,208,247,210, 1, 33, 4,224, 1, 57, 36, 25,254, 70,236,208, /* 0x 250 */ + 73, 65, 36, 25,254, 70,232,208, 73, 65, 36, 25,254, 70,228,208, /* 0x 260 */ +242,211,203, 30, 0, 33, 8,211, 27, 2, 5,120, 1, 48, 29, 67, /* 0x 270 */ +237, 67,211,208,109, 16, 19,210, 3,224, 36, 25,254, 70,212,208, /* 0x 280 */ + 14,210, 1, 33, 36, 25,254, 70,207,208, 9,210, 36, 25,254, 70, /* 0x 290 */ +203,208, 73, 65, 36, 25,254, 70,199,208,247,211, 4, 49, 4,224, /* 0x 2a0 */ + 36, 25,254, 70,193,208, 73, 65, 2, 49,238, 66, 0,210, 1, 49, /* 0x 2b0 */ + 19,120, 83, 93, 19,112, 1, 50, 1, 57,250,209,190,231, 0, 0, /* 0x 2c0 */ + 0,248, 85, 80, 88, 33,161,216,208,213, 0, 0, 0, 0, 0, 0, /* 0x 2d0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 2e0 */ - 0, 0, 0, 0, 0, 45, 0, 0, 68,108,108, 83,116, 97,114,116, /* 0x 2f0 */ - 0, 0, 0, 0, 0, 69,120,101, 83,116, 97,114,116, 0, 8, 0, /* 0x 300 */ - 0, 0, 85,110,102,105,108,116,101,114, 95, 48,120, 53, 48, 0, /* 0x 310 */ -108, 0, 0, 0, 82,101,108,111, 99,115, 0,164, 0, 0, 0, 73, /* 0x 320 */ -109,112,111,114,116,115, 0,228, 0, 0, 0, 80,114,111, 99,101, /* 0x 330 */ -115,115, 69,110,100, 0,106, 1, 0, 0,100,117,109,109,121, 48, /* 0x 340 */ - 0,114, 1, 0, 0,103,111, 95,116,104,117,109, 98, 95,110, 50, /* 0x 350 */ - 98, 0,124, 1, 0, 0, 67, 97,108,108, 50, 66, 0, 20, 2, 0, /* 0x 360 */ - 0, 0, 0, 0, 0, 23, 2, 0, 0,103,111, 95,116,104,117,109, /* 0x 370 */ - 98, 95,110, 50, 98, 0, 0, 0, 0, 0,100,117,109,109,121, 49, /* 0x 380 */ - 0, 24, 2, 0, 0,116,104,117,109, 98, 95,110,114,118, 50,101, /* 0x 390 */ - 95,100, 56, 0, 32, 2, 0, 0, 67, 97,108,108, 50, 69, 0,210, /* 0x 3a0 */ - 2, 0, 0, 0, 0, 0, 0,213, 2, 0, 0,116,104,117,109, 98, /* 0x 3b0 */ - 95,110,114,118, 50,101, 95,100, 56, 0, 0, 0, 0, 0, 85, 80, /* 0x 3c0 */ - 88, 49, 72, 69, 65, 68, 0,214, 2, 0, 0,101,111,102, 0,248, /* 0x 3d0 */ - 2, 0, 0,255,255,255,255,248, 2, 0, 0, 0 /* 0x 3e0 */ + 0, 45, 0, 0, 68,108,108, 83,116, 97,114,116, 0, 0, 0, 0, /* 0x 2f0 */ + 0, 69,120,101, 83,116, 97,114,116, 0, 8, 0, 0, 0, 85,110, /* 0x 300 */ +102,105,108,116,101,114, 95, 48,120, 53, 48, 0,108, 0, 0, 0, /* 0x 310 */ + 82,101,108,111, 99,115, 0,164, 0, 0, 0, 73,109,112,111,114, /* 0x 320 */ +116,115, 0,228, 0, 0, 0, 80,114,111, 99,101,115,115, 69,110, /* 0x 330 */ +100, 0,102, 1, 0, 0,100,117,109,109,121, 48, 0,110, 1, 0, /* 0x 340 */ + 0,103,111, 95,116,104,117,109, 98, 95,110, 50, 98, 0,120, 1, /* 0x 350 */ + 0, 0, 67, 97,108,108, 50, 66, 0, 16, 2, 0, 0, 0, 0, 0, /* 0x 360 */ + 0, 19, 2, 0, 0,103,111, 95,116,104,117,109, 98, 95,110, 50, /* 0x 370 */ + 98, 0, 0, 0, 0, 0,100,117,109,109,121, 49, 0, 20, 2, 0, /* 0x 380 */ + 0,116,104,117,109, 98, 95,110,114,118, 50,101, 95,100, 56, 0, /* 0x 390 */ + 28, 2, 0, 0, 67, 97,108,108, 50, 69, 0,206, 2, 0, 0, 0, /* 0x 3a0 */ + 0, 0, 0,209, 2, 0, 0,116,104,117,109, 98, 95,110,114,118, /* 0x 3b0 */ + 50,101, 95,100, 56, 0, 0, 0, 0, 0, 85, 80, 88, 49, 72, 69, /* 0x 3c0 */ + 65, 68, 0,210, 2, 0, 0,101,111,102, 0,244, 2, 0, 0,255, /* 0x 3d0 */ +255,255,255,244, 2, 0, 0, 0 /* 0x 3e0 */ };