From 596827a9121e41b50b6305c11d598ea6161b2b4b 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:20:09 +0000 Subject: [PATCH] remove obsolete files: l_armpe.asm l_armpe.h l_armpe_c.c l_armpe_s.S committer: ml1050 1146763209 +0000 --- src/stub/l_armpe.asm | 63 ------ src/stub/l_armpe.h | 292 --------------------------- src/stub/l_armpe_c.c | 144 -------------- src/stub/l_armpe_s.S | 463 ------------------------------------------- 4 files changed, 962 deletions(-) delete mode 100644 src/stub/l_armpe.asm delete mode 100644 src/stub/l_armpe.h delete mode 100644 src/stub/l_armpe_c.c delete mode 100644 src/stub/l_armpe_s.S diff --git a/src/stub/l_armpe.asm b/src/stub/l_armpe.asm deleted file mode 100644 index 242da09d..00000000 --- a/src/stub/l_armpe.asm +++ /dev/null @@ -1,63 +0,0 @@ -; l_armwce.asm -- loader & decompressor for the arm/wince/pe format -; -; This file is part of the UPX executable compressor. -; -; Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer -; Copyright (C) 1996-2004 Laszlo Molnar -; All Rights Reserved. -; -; UPX and the UCL library are free software; you can redistribute them -; and/or modify them under the terms of the GNU General Public License as -; published by the Free Software Foundation; either version 2 of -; the License, or (at your option) any later version. -; -; This program is distributed in the hope that it will be useful, -; but WITHOUT ANY WARRANTY; without even the implied warranty of -; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -; GNU General Public License for more details. -; -; You should have received a copy of the GNU General Public License -; along with this program; see the file COPYING. -; If not, write to the Free Software Foundation, Inc., -; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -; -; Markus F.X.J. Oberhumer Laszlo Molnar -; -; - - -%define jmps jmp short -%define jmpn jmp near -%include "macros.ash" - - BITS 32 - SECTION .text - ORG 0 - CPU 386 - -; ============= -; ============= ENTRY POINT -; ============= - -; __ARMPEAXE__ -%include "l_armpe_axe.ah" -; __ARMPEADE__ -%include "l_armpe_ade.ah" -; __ARMPETXE__ -%include "l_armpe_txe.ah" -; __ARMPETDE__ -%include "l_armpe_tde.ah" -; __ARMPETXB__ -%include "l_armpe_txb.ah" -; __ARMPETDB__ -%include "l_armpe_tdb.ah" -; __ARMPEHEAD__ -%include "header.ash" -eof: -; __ARMPEEOF__ - section .data - dd -1 - dw eof - - -; vi:ts=8:et:nowrap diff --git a/src/stub/l_armpe.h b/src/stub/l_armpe.h deleted file mode 100644 index b6b643fc..00000000 --- a/src/stub/l_armpe.h +++ /dev/null @@ -1,292 +0,0 @@ -/* l_armpe.h -- created from l_armpe.bin, 4112 (0x1010) bytes - - This file is part of the UPX executable compressor. - - Copyright (C) 1996-2006 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1996-2006 Laszlo Molnar - Copyright (C) 2000-2006 John F. Reiser - All Rights Reserved. - - UPX and the UCL library are free software; you can redistribute them - and/or modify them under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - Markus F.X.J. Oberhumer Laszlo Molnar - - */ - - -#define NRV_LOADER_SIZE 4112 -#define NRV_LOADER_ADLER32 0x78258e9b -#define NRV_LOADER_CRC32 0xa3de7215 - -unsigned char nrv_loader[4112] = { - 15, 64, 45,233,132, 0,143,226, 45, 0, 0,235, 15, 64,189,232, /* 0x 0 */ -152,240,159,229,144, 48,159,229, 0,240,147,229,132, 48,159,229, /* 0x 10 */ - 0,240,147,229,148, 48,159,229, 0,240,147,229,132, 0,159,229, /* 0x 20 */ - 0, 32,160,227,128,192,159,229, 12, 0, 80,225, 14,240,160, 1, /* 0x 30 */ - 3, 48,208,229, 15, 48, 3,226, 11, 0, 83,227, 5, 0, 0, 26, /* 0x 40 */ - 0, 48,144,229,255, 20, 3,226, 2, 48, 67,224,255, 52,195,227, /* 0x 50 */ - 1, 48,131,225, 0, 48,128,229, 4, 0,128,226, 1, 32,130,226, /* 0x 60 */ -240,255,255,234, 3, 32,160,227, 2, 48,208,231, 1, 32, 82,226, /* 0x 70 */ - 1, 20,131,224,251,255,255, 90, 1, 0,160,225, 14,240,160,225, /* 0x 80 */ - 83, 82, 67, 48, 83, 82, 67, 76, 68, 83, 84, 48, 68, 83, 84, 76, /* 0x 90 */ - 66, 73, 77, 80, 79, 78, 65, 77, 71, 69, 84, 80, 76, 79, 65, 68, /* 0x a0 */ - 69, 78, 84, 82, 66, 82, 69, 76, 70, 73, 66, 83, 70, 73, 66, 69, /* 0x b0 */ - 67, 83, 89, 78,240, 65, 45,233, 0,224,160,227,132,208, 77,226, /* 0x c0 */ - 8,112,144,229, 0,192,160,225, 3, 0,144,232, 0,224,141,229, /* 0x d0 */ - 7, 32,160,225, 13, 48,160,225, 16, 64,140,226, 16, 1,148,232, /* 0x e0 */ - 55, 0, 0,235,204,255,255,235, 4, 0,160,225,220,255,255,235, /* 0x f0 */ - 0, 80, 80,226, 46, 0, 0, 10, 4, 0,132,226,216,255,255,235, /* 0x 100 */ - 8, 80,133,224, 0, 48,213,229, 4, 16,141,226, 0, 0, 83,227, /* 0x 110 */ - 7, 96,128,224, 1, 32,160,225, 3, 0, 0, 10,178, 48,194,224, /* 0x 120 */ - 1, 48,245,229, 0, 0, 83,227,250,255,255,234, 0, 48,160,227, /* 0x 130 */ -176, 48,194,225, 1, 0,160,225,177,255,255,235, 8, 48,244,229, /* 0x 140 */ - 0, 80,160,225, 0, 0, 83,227, 23, 0, 0, 10,255, 48, 3,226, /* 0x 150 */ - 1, 0, 83,227, 1, 64,132,226, 2, 0, 0, 10,255, 0, 83,227, /* 0x 160 */ - 8, 0, 0, 10, 14, 0, 0,234, 5, 0,160,225, 4, 16,160,225, /* 0x 170 */ -165,255,255,235, 4, 0,134,228, 1, 48,212,228, 0, 0, 83,227, /* 0x 180 */ -252,255,255, 26, 6, 0, 0,234, 0, 48,212,229, 1, 16,212,229, /* 0x 190 */ - 5, 0,160,225, 1, 20,131,224,155,255,255,235, 2, 64,132,226, /* 0x 1a0 */ - 4, 0,134,228, 0, 48,212,229,229,255,255,234, 1, 64,132,226, /* 0x 1b0 */ -204,255,255,234, 4, 0,160,227,149,255,255,235,132,208,141,226, /* 0x 1c0 */ -240,129,189,232,252, 64, 45,233, 0,112,129,224, 0, 80,224,227, /* 0x 1d0 */ - 2, 65,160,227, 10, 0, 0,234, 24, 0,189,232, 7, 0, 64,224, /* 0x 1e0 */ - 3, 32, 66,224, 0, 32,132,229,240,128,189,232, 1, 64,208,228, /* 0x 1f0 */ - 4, 64,164,224, 4, 76,176,225, 14,240,160,225, 1, 48,208,228, /* 0x 200 */ - 1, 48,194,228, 4, 64,148,224,247,255,255, 11,250,255,255, 42, /* 0x 210 */ - 1, 16,160,227, 3, 0, 0,234, 1, 16, 65,226, 4, 64,148,224, /* 0x 220 */ -241,255,255, 11, 1, 16,161,224, 4, 64,148,224,238,255,255, 11, /* 0x 230 */ - 1, 16,161,224, 4, 64,148,224,235,255,255, 11,245,255,255, 58, /* 0x 240 */ - 3, 48, 81,226, 0, 16,160,227, 6, 0, 0, 58, 1, 80,208,228, /* 0x 250 */ - 3, 84,133,225, 5, 80,240,225,222,255,255, 10,197, 80,176,225, /* 0x 260 */ - 15, 0, 0, 42, 2, 0, 0,234, 4, 64,148,224,222,255,255, 11, /* 0x 270 */ - 11, 0, 0, 42, 1, 16,160,227, 4, 64,148,224,218,255,255, 11, /* 0x 280 */ - 7, 0, 0, 42, 4, 64,148,224,215,255,255, 11, 1, 16,161,224, /* 0x 290 */ - 4, 64,148,224,212,255,255, 11,249,255,255, 58, 4, 16,129,226, /* 0x 2a0 */ - 3, 0, 0,234, 4, 64,148,224,207,255,255, 11, 1, 16,161,224, /* 0x 2b0 */ - 2, 16,129,226, 5, 12,117,227, 0, 0, 0, 42, 1, 16,129,226, /* 0x 2c0 */ - 0, 48,210,229, 5, 48,210,231, 1, 48,194,228, 1, 16, 81,226, /* 0x 2d0 */ -251,255,255, 26,202,255,255,234, 1, 0, 81,227, 3, 0, 0, 26, /* 0x 2e0 */ - 15, 64, 45,233,228, 0,143,226, 69, 0, 0,235, 15, 64,189,232, /* 0x 2f0 */ -248,240,159,229,240, 48,159,229, 0,240,147,229,228, 48,159,229, /* 0x 300 */ - 0,240,147,229,244, 48,159,229, 0,240,147,229,228, 0,159,229, /* 0x 310 */ - 0, 32,160,227,224,192,159,229, 12, 0, 80,225, 14,240,160, 1, /* 0x 320 */ - 3, 48,208,229, 15, 48, 3,226, 11, 0, 83,227, 5, 0, 0, 26, /* 0x 330 */ - 0, 48,144,229,255, 20, 3,226, 2, 48, 67,224,255, 52,195,227, /* 0x 340 */ - 1, 48,131,225, 0, 48,128,229, 4, 0,128,226, 1, 32,130,226, /* 0x 350 */ -240,255,255,234, 3, 32,160,227, 2, 48,208,231, 1, 32, 82,226, /* 0x 360 */ - 1, 20,131,224,251,255,255, 90, 1, 0,160,225, 14,240,160,225, /* 0x 370 */ -124, 0,159,229, 92, 32,159,229, 4, 16, 66,226, 1, 48,208,228, /* 0x 380 */ - 0, 0, 83,227, 14,240,160, 1,240, 0, 83,227,240,192,195, 35, /* 0x 390 */ - 1, 48,208, 37, 12,196,131, 32, 2, 48,208, 36, 12, 52,131, 32, /* 0x 3a0 */ - 3, 16,129,224, 0, 48,209,229, 12,196,131,224, 1, 48,209,229, /* 0x 3b0 */ - 12,196,131,224, 2, 48,209,229, 12,196,131,224, 3, 48,209,229, /* 0x 3c0 */ - 12,196,131,224, 2,192,140,224, 0,192,129,229,234,255,255,234, /* 0x 3d0 */ - 83, 82, 67, 48, 83, 82, 67, 76, 68, 83, 84, 48, 68, 83, 84, 76, /* 0x 3e0 */ - 66, 73, 77, 80, 79, 78, 65, 77, 71, 69, 84, 80, 76, 79, 65, 68, /* 0x 3f0 */ - 69, 78, 84, 82, 66, 82, 69, 76, 70, 73, 66, 83, 70, 73, 66, 69, /* 0x 400 */ - 67, 83, 89, 78,240, 65, 45,233, 0,224,160,227,132,208, 77,226, /* 0x 410 */ - 8,112,144,229, 0,192,160,225, 3, 0,144,232, 0,224,141,229, /* 0x 420 */ - 7, 32,160,225, 13, 48,160,225, 16, 64,140,226, 16, 1,148,232, /* 0x 430 */ - 56, 0, 0,235,180,255,255,235, 4, 0,160,225,196,255,255,235, /* 0x 440 */ - 0, 80, 80,226, 46, 0, 0, 10, 4, 0,132,226,192,255,255,235, /* 0x 450 */ - 8, 80,133,224, 0, 48,213,229, 4, 16,141,226, 0, 0, 83,227, /* 0x 460 */ - 7, 96,128,224, 1, 32,160,225, 3, 0, 0, 10,178, 48,194,224, /* 0x 470 */ - 1, 48,245,229, 0, 0, 83,227,250,255,255,234, 0, 48,160,227, /* 0x 480 */ -176, 48,194,225, 1, 0,160,225,153,255,255,235, 8, 48,244,229, /* 0x 490 */ - 0, 80,160,225, 0, 0, 83,227, 23, 0, 0, 10,255, 48, 3,226, /* 0x 4a0 */ - 1, 0, 83,227, 1, 64,132,226, 2, 0, 0, 10,255, 0, 83,227, /* 0x 4b0 */ - 8, 0, 0, 10, 14, 0, 0,234, 5, 0,160,225, 4, 16,160,225, /* 0x 4c0 */ -141,255,255,235, 4, 0,134,228, 1, 48,212,228, 0, 0, 83,227, /* 0x 4d0 */ -252,255,255, 26, 6, 0, 0,234, 0, 48,212,229, 1, 16,212,229, /* 0x 4e0 */ - 5, 0,160,225, 1, 20,131,224,131,255,255,235, 2, 64,132,226, /* 0x 4f0 */ - 4, 0,134,228, 0, 48,212,229,229,255,255,234, 1, 64,132,226, /* 0x 500 */ -204,255,255,234,153,255,255,235, 4, 0,160,227,124,255,255,235, /* 0x 510 */ -132,208,141,226,240,129,189,232,252, 64, 45,233, 0,112,129,224, /* 0x 520 */ - 0, 80,224,227, 2, 65,160,227, 10, 0, 0,234, 24, 0,189,232, /* 0x 530 */ - 7, 0, 64,224, 3, 32, 66,224, 0, 32,132,229,240,128,189,232, /* 0x 540 */ - 1, 64,208,228, 4, 64,164,224, 4, 76,176,225, 14,240,160,225, /* 0x 550 */ - 1, 48,208,228, 1, 48,194,228, 4, 64,148,224,247,255,255, 11, /* 0x 560 */ -250,255,255, 42, 1, 16,160,227, 3, 0, 0,234, 1, 16, 65,226, /* 0x 570 */ - 4, 64,148,224,241,255,255, 11, 1, 16,161,224, 4, 64,148,224, /* 0x 580 */ -238,255,255, 11, 1, 16,161,224, 4, 64,148,224,235,255,255, 11, /* 0x 590 */ -245,255,255, 58, 3, 48, 81,226, 0, 16,160,227, 6, 0, 0, 58, /* 0x 5a0 */ - 1, 80,208,228, 3, 84,133,225, 5, 80,240,225,222,255,255, 10, /* 0x 5b0 */ -197, 80,176,225, 15, 0, 0, 42, 2, 0, 0,234, 4, 64,148,224, /* 0x 5c0 */ -222,255,255, 11, 11, 0, 0, 42, 1, 16,160,227, 4, 64,148,224, /* 0x 5d0 */ -218,255,255, 11, 7, 0, 0, 42, 4, 64,148,224,215,255,255, 11, /* 0x 5e0 */ - 1, 16,161,224, 4, 64,148,224,212,255,255, 11,249,255,255, 58, /* 0x 5f0 */ - 4, 16,129,226, 3, 0, 0,234, 4, 64,148,224,207,255,255, 11, /* 0x 600 */ - 1, 16,161,224, 2, 16,129,226, 5, 12,117,227, 0, 0, 0, 42, /* 0x 610 */ - 1, 16,129,226, 0, 48,210,229, 5, 48,210,231, 1, 48,194,228, /* 0x 620 */ - 1, 16, 81,226,251,255,255, 26,202,255,255,234, 15, 64, 45,233, /* 0x 630 */ -128, 0,143,226, 14, 0,144,232, 2, 16,129,224, 0, 32,147,229, /* 0x 640 */ - 1, 58,131,226, 1, 0, 83,225,251,255,255,154, 31,192,143,226, /* 0x 650 */ - 15,224,160,225, 28,255, 47,225, 15, 64,189,232,116,192,159,229, /* 0x 660 */ - 28,255, 47,225, 26, 75, 27,104, 24, 71, 26, 75,251,231, 30, 75, /* 0x 670 */ -249,231, 59,224,240,181, 26, 72, 0, 34, 26, 76, 15, 37,255, 38, /* 0x 680 */ - 54, 6,247, 67,160, 66, 13,208,195,120, 43, 64, 11, 43, 6,209, /* 0x 690 */ - 3,104, 25, 28, 49, 64,155, 26, 59, 64, 11, 67, 3, 96, 4, 48, /* 0x 6a0 */ - 1, 50,239,231,240,189, 3, 33, 67, 92, 18, 2,210, 24, 1, 57, /* 0x 6b0 */ -250,213, 16, 28,112, 71, 0, 0, 83, 82, 67, 48, 83, 82, 67, 76, /* 0x 6c0 */ - 68, 83, 84, 48, 68, 83, 84, 76, 66, 73, 77, 80, 79, 78, 65, 77, /* 0x 6d0 */ - 71, 69, 84, 80, 76, 79, 65, 68, 69, 78, 84, 82, 66, 82, 69, 76, /* 0x 6e0 */ - 70, 73, 66, 83, 70, 73, 66, 69, 67, 83, 89, 78,240,181,163,176, /* 0x 6f0 */ - 0, 34, 2,146,130,104, 1,146, 66,105, 3, 28, 4,105, 89,104, /* 0x 700 */ - 0,146, 2,171, 1,154, 0,104, 0,240, 82,248,255,247,178,255, /* 0x 710 */ - 37, 28, 40, 28,255,247,199,255, 4, 30, 61,208, 0,155, 40, 29, /* 0x 720 */ -228, 24,255,247,192,255, 1,154,134, 24, 3,168, 2, 28, 35,120, /* 0x 730 */ - 27, 6, 0, 43, 4,208, 27, 14, 19,128, 1, 52, 2, 50,246,231, /* 0x 740 */ - 0, 35, 19,128,255,247,145,255, 8, 53, 7, 28, 43,120, 27, 6, /* 0x 750 */ - 0, 43, 31,208, 27, 14, 1, 53, 1, 43, 2,208,255, 43, 13,208, /* 0x 760 */ -244,231, 56, 28, 41, 28,255,247,125,255, 52, 28, 32, 96, 4, 54, /* 0x 770 */ - 43,120, 27, 6, 1, 53, 0, 43,250,209,231,231,105,120, 43,120, /* 0x 780 */ - 9, 2, 56, 28, 89, 24,255,247,109,255, 52, 28, 2, 53, 4, 54, /* 0x 790 */ - 32, 96,219,231, 1, 53,188,231, 4, 32,255,247,104,255, 35,176, /* 0x 7a0 */ -240,188, 1,188, 0, 71,192, 70, 1,192,143,226, 28,255, 47,225, /* 0x 7b0 */ -252,181, 15, 24, 1, 36,101, 66,228, 7, 5, 38, 54, 2, 15,224, /* 0x 7c0 */ - 24,188,192, 27,210, 26, 34, 96,240,188, 2,188, 8, 71, 4,120, /* 0x 7d0 */ -100, 65, 1, 48, 36, 6,247, 70, 3,120, 1, 48, 19,112, 1, 50, /* 0x 7e0 */ - 36, 25,254, 70,243,208,247,210, 1, 33, 4,224, 1, 57, 36, 25, /* 0x 7f0 */ -254, 70,236,208, 73, 65, 36, 25,254, 70,232,208, 73, 65, 36, 25, /* 0x 800 */ -254, 70,228,208,242,211,203, 30, 0, 33, 8,211, 27, 2, 5,120, /* 0x 810 */ - 1, 48, 29, 67,237, 67,211,208,109, 16, 19,210, 3,224, 36, 25, /* 0x 820 */ -254, 70,212,208, 14,210, 1, 33, 36, 25,254, 70,207,208, 9,210, /* 0x 830 */ - 36, 25,254, 70,203,208, 73, 65, 36, 25,254, 70,199,208,247,211, /* 0x 840 */ - 4, 49, 4,224, 36, 25,254, 70,193,208, 73, 65, 2, 49,238, 66, /* 0x 850 */ - 0,210, 1, 49, 19,120, 83, 93, 19,112, 1, 50, 1, 57,250,209, /* 0x 860 */ -190,231, 0, 0, 1, 0, 81,227, 11, 0, 0, 26, 15, 64, 45,233, /* 0x 870 */ -188, 0,143,226, 14, 0,144,232, 2, 16,129,224, 0, 32,147,229, /* 0x 880 */ - 1, 58,131,226, 1, 0, 83,225,251,255,255,154, 31,192,143,226, /* 0x 890 */ - 15,224,160,225, 28,255, 47,225, 15, 64,189,232,176,192,159,229, /* 0x 8a0 */ - 28,255, 47,225, 41, 75, 27,104, 24, 71, 41, 75,251,231, 45, 75, /* 0x 8b0 */ -249,231, 89,224,240,181, 41, 72, 0, 34, 41, 76, 15, 37,255, 38, /* 0x 8c0 */ - 54, 6,247, 67,160, 66, 13,208,195,120, 43, 64, 11, 43, 6,209, /* 0x 8d0 */ - 3,104, 25, 28, 49, 64,155, 26, 59, 64, 11, 67, 3, 96, 4, 48, /* 0x 8e0 */ - 1, 50,239,231,240,189, 3, 33, 67, 92, 18, 2,210, 24, 1, 57, /* 0x 8f0 */ -250,213, 16, 28,112, 71, 48,181, 23, 72, 16, 74, 17, 31, 3,120, /* 0x 900 */ - 1, 48, 0, 43, 21,208,240, 43, 8,211, 15, 36, 28, 64, 67,120, /* 0x 910 */ - 36, 2,228, 24, 3,120, 2, 48, 36, 2, 27, 25,201, 24, 0, 37, /* 0x 920 */ - 75, 93, 36, 2,228, 24, 1, 53, 4, 45,249,209,164, 24, 12, 96, /* 0x 930 */ -229,231, 48,189, 83, 82, 67, 48, 83, 82, 67, 76, 68, 83, 84, 48, /* 0x 940 */ - 68, 83, 84, 76, 66, 73, 77, 80, 79, 78, 65, 77, 71, 69, 84, 80, /* 0x 950 */ - 76, 79, 65, 68, 69, 78, 84, 82, 66, 82, 69, 76, 70, 73, 66, 83, /* 0x 960 */ - 70, 73, 66, 69, 67, 83, 89, 78,240,181,163,176, 0, 34, 2,146, /* 0x 970 */ -130,104, 1,146, 66,105, 3, 28, 4,105, 89,104, 0,146, 2,171, /* 0x 980 */ - 1,154, 0,104, 0,240, 84,248,255,247,148,255, 37, 28, 40, 28, /* 0x 990 */ -255,247,169,255, 4, 30, 61,208, 0,155, 40, 29,228, 24,255,247, /* 0x 9a0 */ -162,255, 1,154,134, 24, 3,168, 2, 28, 35,120, 27, 6, 0, 43, /* 0x 9b0 */ - 4,208, 27, 14, 19,128, 1, 52, 2, 50,246,231, 0, 35, 19,128, /* 0x 9c0 */ -255,247,115,255, 8, 53, 7, 28, 43,120, 27, 6, 0, 43, 31,208, /* 0x 9d0 */ - 27, 14, 1, 53, 1, 43, 2,208,255, 43, 13,208,244,231, 56, 28, /* 0x 9e0 */ - 41, 28,255,247, 95,255, 52, 28, 32, 96, 4, 54, 43,120, 27, 6, /* 0x 9f0 */ - 1, 53, 0, 43,250,209,231,231,105,120, 43,120, 9, 2, 56, 28, /* 0x a00 */ - 89, 24,255,247, 79,255, 52, 28, 2, 53, 4, 54, 32, 96,219,231, /* 0x a10 */ - 1, 53,188,231,255,247,111,255, 4, 32,255,247, 72,255, 35,176, /* 0x a20 */ -240,188, 1,188, 0, 71,192, 70, 1,192,143,226, 28,255, 47,225, /* 0x a30 */ -252,181, 15, 24, 1, 36,101, 66,228, 7, 5, 38, 54, 2, 15,224, /* 0x a40 */ - 24,188,192, 27,210, 26, 34, 96,240,188, 2,188, 8, 71, 4,120, /* 0x a50 */ -100, 65, 1, 48, 36, 6,247, 70, 3,120, 1, 48, 19,112, 1, 50, /* 0x a60 */ - 36, 25,254, 70,243,208,247,210, 1, 33, 4,224, 1, 57, 36, 25, /* 0x a70 */ -254, 70,236,208, 73, 65, 36, 25,254, 70,232,208, 73, 65, 36, 25, /* 0x a80 */ -254, 70,228,208,242,211,203, 30, 0, 33, 8,211, 27, 2, 5,120, /* 0x a90 */ - 1, 48, 29, 67,237, 67,211,208,109, 16, 19,210, 3,224, 36, 25, /* 0x aa0 */ -254, 70,212,208, 14,210, 1, 33, 36, 25,254, 70,207,208, 9,210, /* 0x ab0 */ - 36, 25,254, 70,203,208, 73, 65, 36, 25,254, 70,199,208,247,211, /* 0x ac0 */ - 4, 49, 4,224, 36, 25,254, 70,193,208, 73, 65, 2, 49,238, 66, /* 0x ad0 */ - 0,210, 1, 49, 19,120, 83, 93, 19,112, 1, 50, 1, 57,250,209, /* 0x ae0 */ -190,231, 0, 0, 15, 64, 45,233,128, 0,143,226, 14, 0,144,232, /* 0x af0 */ - 2, 16,129,224, 0, 32,147,229, 1, 58,131,226, 1, 0, 83,225, /* 0x b00 */ -251,255,255,154, 31,192,143,226, 15,224,160,225, 28,255, 47,225, /* 0x b10 */ - 15, 64,189,232,116,192,159,229, 28,255, 47,225, 26, 75, 27,104, /* 0x b20 */ - 24, 71, 26, 75,251,231, 30, 75,249,231, 59,224,240,181, 26, 72, /* 0x b30 */ - 0, 34, 26, 76, 15, 37,255, 38, 54, 6,247, 67,160, 66, 13,208, /* 0x b40 */ -195,120, 43, 64, 11, 43, 6,209, 3,104, 25, 28, 49, 64,155, 26, /* 0x b50 */ - 59, 64, 11, 67, 3, 96, 4, 48, 1, 50,239,231,240,189, 3, 33, /* 0x b60 */ - 67, 92, 18, 2,210, 24, 1, 57,250,213, 16, 28,112, 71, 0, 0, /* 0x b70 */ - 83, 82, 67, 48, 83, 82, 67, 76, 68, 83, 84, 48, 68, 83, 84, 76, /* 0x b80 */ - 66, 73, 77, 80, 79, 78, 65, 77, 71, 69, 84, 80, 76, 79, 65, 68, /* 0x b90 */ - 69, 78, 84, 82, 66, 82, 69, 76, 70, 73, 66, 83, 70, 73, 66, 69, /* 0x ba0 */ - 67, 83, 89, 78,240,181,163,176, 0, 34, 2,146,130,104, 1,146, /* 0x bb0 */ - 66,105, 3, 28, 4,105, 89,104, 0,146, 2,171, 1,154, 0,104, /* 0x bc0 */ - 0,240, 82,248,255,247,178,255, 37, 28, 40, 28,255,247,199,255, /* 0x bd0 */ - 4, 30, 61,208, 0,155, 40, 29,228, 24,255,247,192,255, 1,154, /* 0x be0 */ -134, 24, 3,168, 2, 28, 35,120, 27, 6, 0, 43, 4,208, 27, 14, /* 0x bf0 */ - 19,128, 1, 52, 2, 50,246,231, 0, 35, 19,128,255,247,145,255, /* 0x c00 */ - 8, 53, 7, 28, 43,120, 27, 6, 0, 43, 31,208, 27, 14, 1, 53, /* 0x c10 */ - 1, 43, 2,208,255, 43, 13,208,244,231, 56, 28, 41, 28,255,247, /* 0x c20 */ -125,255, 52, 28, 32, 96, 4, 54, 43,120, 27, 6, 1, 53, 0, 43, /* 0x c30 */ -250,209,231,231,105,120, 43,120, 9, 2, 56, 28, 89, 24,255,247, /* 0x c40 */ -109,255, 52, 28, 2, 53, 4, 54, 32, 96,219,231, 1, 53,188,231, /* 0x c50 */ - 4, 32,255,247,104,255, 35,176,240,188, 1,188, 0, 71,192, 70, /* 0x c60 */ - 1,192,143,226, 28,255, 47,225, 9, 24,254,181, 1, 36,101, 66, /* 0x c70 */ -228, 7, 13, 39, 63, 2, 15,224, 26,188, 64, 26,210, 26, 34, 96, /* 0x c80 */ -240,188, 2,188, 8, 71, 4,120,100, 65, 1, 48, 36, 6,247, 70, /* 0x c90 */ - 3,120, 1, 48, 19,112, 1, 50, 36, 25,254, 70,243,208,247,210, /* 0x ca0 */ - 1, 33, 36, 25,254, 70,238,208, 73, 65, 36, 25,254, 70,234,208, /* 0x cb0 */ -247,211,203, 30, 0, 33, 5,211, 27, 2, 5,120, 1, 48, 29, 67, /* 0x cc0 */ -237, 67,217,208, 36, 25,254, 70,221,208, 73, 65, 36, 25,254, 70, /* 0x cd0 */ -217,208, 73, 65, 9,209, 1, 33, 36, 25,254, 70,211,208, 73, 65, /* 0x ce0 */ - 36, 25,254, 70,207,208,247,211, 2, 49, 1, 49,253, 66, 0,210, /* 0x cf0 */ - 1, 49, 19,120, 83, 93, 19,112, 1, 50, 1, 57,250,209,203,231, /* 0x d00 */ - 1, 0, 81,227, 11, 0, 0, 26, 15, 64, 45,233,188, 0,143,226, /* 0x d10 */ - 14, 0,144,232, 2, 16,129,224, 0, 32,147,229, 1, 58,131,226, /* 0x d20 */ - 1, 0, 83,225,251,255,255,154, 31,192,143,226, 15,224,160,225, /* 0x d30 */ - 28,255, 47,225, 15, 64,189,232,176,192,159,229, 28,255, 47,225, /* 0x d40 */ - 41, 75, 27,104, 24, 71, 41, 75,251,231, 45, 75,249,231, 89,224, /* 0x d50 */ -240,181, 41, 72, 0, 34, 41, 76, 15, 37,255, 38, 54, 6,247, 67, /* 0x d60 */ -160, 66, 13,208,195,120, 43, 64, 11, 43, 6,209, 3,104, 25, 28, /* 0x d70 */ - 49, 64,155, 26, 59, 64, 11, 67, 3, 96, 4, 48, 1, 50,239,231, /* 0x d80 */ -240,189, 3, 33, 67, 92, 18, 2,210, 24, 1, 57,250,213, 16, 28, /* 0x d90 */ -112, 71, 48,181, 23, 72, 16, 74, 17, 31, 3,120, 1, 48, 0, 43, /* 0x da0 */ - 21,208,240, 43, 8,211, 15, 36, 28, 64, 67,120, 36, 2,228, 24, /* 0x db0 */ - 3,120, 2, 48, 36, 2, 27, 25,201, 24, 0, 37, 75, 93, 36, 2, /* 0x dc0 */ -228, 24, 1, 53, 4, 45,249,209,164, 24, 12, 96,229,231, 48,189, /* 0x dd0 */ - 83, 82, 67, 48, 83, 82, 67, 76, 68, 83, 84, 48, 68, 83, 84, 76, /* 0x de0 */ - 66, 73, 77, 80, 79, 78, 65, 77, 71, 69, 84, 80, 76, 79, 65, 68, /* 0x df0 */ - 69, 78, 84, 82, 66, 82, 69, 76, 70, 73, 66, 83, 70, 73, 66, 69, /* 0x e00 */ - 67, 83, 89, 78,240,181,163,176, 0, 34, 2,146,130,104, 1,146, /* 0x e10 */ - 66,105, 3, 28, 4,105, 89,104, 0,146, 2,171, 1,154, 0,104, /* 0x e20 */ - 0,240, 84,248,255,247,148,255, 37, 28, 40, 28,255,247,169,255, /* 0x e30 */ - 4, 30, 61,208, 0,155, 40, 29,228, 24,255,247,162,255, 1,154, /* 0x e40 */ -134, 24, 3,168, 2, 28, 35,120, 27, 6, 0, 43, 4,208, 27, 14, /* 0x e50 */ - 19,128, 1, 52, 2, 50,246,231, 0, 35, 19,128,255,247,115,255, /* 0x e60 */ - 8, 53, 7, 28, 43,120, 27, 6, 0, 43, 31,208, 27, 14, 1, 53, /* 0x e70 */ - 1, 43, 2,208,255, 43, 13,208,244,231, 56, 28, 41, 28,255,247, /* 0x e80 */ - 95,255, 52, 28, 32, 96, 4, 54, 43,120, 27, 6, 1, 53, 0, 43, /* 0x e90 */ -250,209,231,231,105,120, 43,120, 9, 2, 56, 28, 89, 24,255,247, /* 0x ea0 */ - 79,255, 52, 28, 2, 53, 4, 54, 32, 96,219,231, 1, 53,188,231, /* 0x eb0 */ -255,247,111,255, 4, 32,255,247, 72,255, 35,176,240,188, 1,188, /* 0x ec0 */ - 0, 71,192, 70, 1,192,143,226, 28,255, 47,225, 9, 24,254,181, /* 0x ed0 */ - 1, 36,101, 66,228, 7, 13, 39, 63, 2, 15,224, 26,188, 64, 26, /* 0x ee0 */ -210, 26, 34, 96,240,188, 2,188, 8, 71, 4,120,100, 65, 1, 48, /* 0x ef0 */ - 36, 6,247, 70, 3,120, 1, 48, 19,112, 1, 50, 36, 25,254, 70, /* 0x f00 */ -243,208,247,210, 1, 33, 36, 25,254, 70,238,208, 73, 65, 36, 25, /* 0x f10 */ -254, 70,234,208,247,211,203, 30, 0, 33, 5,211, 27, 2, 5,120, /* 0x f20 */ - 1, 48, 29, 67,237, 67,217,208, 36, 25,254, 70,221,208, 73, 65, /* 0x f30 */ - 36, 25,254, 70,217,208, 73, 65, 9,209, 1, 33, 36, 25,254, 70, /* 0x f40 */ -211,208, 73, 65, 36, 25,254, 70,207,208,247,211, 2, 49, 1, 49, /* 0x f50 */ -253, 66, 0,210, 1, 49, 19,120, 83, 93, 19,112, 1, 50, 1, 57, /* 0x f60 */ -250,209,203,231, 85, 80, 88, 33,161,216,208,213, 0, 0, 0, 0, /* 0x f70 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x f80 */ - 0, 0, 0, 45, 65, 82, 77, 80, 69, 65, 88, 69, 0, 0, 0, 0, /* 0x f90 */ - 0, 65, 82, 77, 80, 69, 65, 68, 69, 0,232, 2, 0, 0, 65, 82, /* 0x fa0 */ - 77, 80, 69, 84, 88, 69, 0, 60, 6, 0, 0, 65, 82, 77, 80, 69, /* 0x fb0 */ - 84, 68, 69, 0,116, 8, 0, 0, 65, 82, 77, 80, 69, 84, 88, 66, /* 0x fc0 */ - 0,244, 10, 0, 0, 65, 82, 77, 80, 69, 84, 68, 66, 0, 16, 13, /* 0x fd0 */ - 0, 0, 65, 82, 77, 80, 69, 72, 69, 65, 68, 0,116, 15, 0, 0, /* 0x fe0 */ - 85, 80, 88, 49, 72, 69, 65, 68, 0,116, 15, 0, 0, 65, 82, 77, /* 0x ff0 */ - 80, 69, 69, 79, 70, 0,148, 15, 0, 0,255,255,255,255,148, 15 /* 0x1000 */ -}; diff --git a/src/stub/l_armpe_c.c b/src/stub/l_armpe_c.c deleted file mode 100644 index 2c5b0233..00000000 --- a/src/stub/l_armpe_c.c +++ /dev/null @@ -1,144 +0,0 @@ -/* l_armpe_c.c -- ARM/PE decompressor for NRV2E - - This file is part of the UPX executable compressor. - - Copyright (C) 1996-2006 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1996-2006 Laszlo Molnar - Copyright (C) 2000-2006 John F. Reiser - All Rights Reserved. - - UPX and the UCL library are free software; you can redistribute them - and/or modify them under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - Markus F.X.J. Oberhumer Laszlo Molnar - - - John F. Reiser - -*/ - -#ifndef UCL_DECOMPRESS -# error please define UCL_DECOMPRESS -#endif - -int UCL_DECOMPRESS(const unsigned char * src, unsigned src_len, - unsigned char * dst, unsigned * dst_len); - -void *LoadLibraryW(const unsigned short *); -void *GetProcAddressA(const void *, const void *); -void *get_le32(const void *); -void reloc_main(); -void Unfilter_0x50(); -void CacheSync(unsigned); - -static void handle_imports(const unsigned char *imp, unsigned name_offset, - unsigned iat_offset) -{ - unsigned short buf[64]; - while (1) - { - unsigned short *b; - //printf("name=%p iat=%p\n", get_le32(imp), get_le32(imp + 4)); - unsigned char *name = get_le32(imp); - if (name == 0) - break; - name += name_offset; - unsigned *iat = get_le32(imp + 4) + iat_offset; - //printf("name=%p iat=%p\n", name, iat); - for (b = buf; *name; name++, b++) - *b = *name; - *b = 0; - - void *dll = LoadLibraryW(buf); - imp += 8; - unsigned ord; - - while (*imp) - { - switch (*imp++) - { - case 1: - // by name - *iat++ = (unsigned) GetProcAddressA(dll, imp); - while (*imp++) - ; - break; - case 0xff: - // by ordinal - ord = ((unsigned) imp[0]) + imp[1] * 0x100; - imp += 2; - *iat++ = (unsigned) GetProcAddressA(dll, (void *) ord); - break; - default: - // *(int*) 1 = 0; - break; - } - } - imp++; - } -} - -// debugging stuff -int CFwrap(short *, int, int, int, int, int, int); -void WFwrap(int, const void *, int, int *, int); -void CHwrap(int); -#define WRITEFILE2(name0, buf, len) \ - do { short b[3]; b[0] = '\\'; b[1] = name0; b[2] = 0; \ - int h = CFwrap(b, 0x40000000L, 3, 0, 2, 0x80, 0);\ - int l; WFwrap(h, buf, len, &l, 0); \ - CHwrap(h); \ - } while (0) - -void upx_main(const unsigned *info) -{ - unsigned dlen = 0; -#if 0 - unsigned src0 = *info++; - unsigned srcl = *info++; - unsigned dst0 = *info++; - unsigned dstl = *info++; - unsigned bimp = *info++; - unsigned onam = *info++; - unsigned getp = *info++; - unsigned load = *info++; - unsigned entr = *info++; -#else - unsigned src0 = info[0]; - unsigned srcl = info[1]; - unsigned dst0 = info[2]; -// unsigned dstl = info[3]; - unsigned bimp = info[4]; - unsigned onam = info[5]; -// unsigned getp = info[6]; -// unsigned load = info[7]; -// unsigned entr = info[8]; -#endif - -#ifdef SAFE - dlen = info[3]; -#endif - //WRITEFILE2('l', (void*) dst0, info[7] + 256 - dst0); - UCL_DECOMPRESS((void *) src0, srcl, (void *) dst0, &dlen); -// WRITEFILE2('c', (void*) dst0, info[7] + 256 - dst0); - Unfilter_0x50(); - //WRITEFILE2('f', (void*) dst0, info[7] + 256 - dst0); - handle_imports((void *) bimp, onam, dst0); - //WRITEFILE2('i', (void*) dst0, info[7] + 256 - dst0); -#ifdef STUB_FOR_DLL - reloc_main(); - //WRITEFILE2('r', (void*) dst0, info[7] + 256 - dst0); -#endif - CacheSync(4); // CACHE_SYNC_WRITEBACK -} diff --git a/src/stub/l_armpe_s.S b/src/stub/l_armpe_s.S deleted file mode 100644 index 165c4e30..00000000 --- a/src/stub/l_armpe_s.S +++ /dev/null @@ -1,463 +0,0 @@ -/* l_armpe_s.S -- ARM/PE decompressor assembly startup - - This file is part of the UPX executable compressor. - - Copyright (C) 1996-2006 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1996-2006 Laszlo Molnar - Copyright (C) 2000-2006 John F. Reiser - All Rights Reserved. - - UPX and the UCL library are free software; you can redistribute them - and/or modify them under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - Markus F.X.J. Oberhumer Laszlo Molnar - - - John F. Reiser - -*/ - -#define DEBUG 0 - -#undef STUB_IN_THUMB_MODE -#if defined(__ARM_ARCH_4T__) || defined(__ARM_ARCH_5T__) -# define STUB_IN_THUMB_MODE -#endif - -#ifdef STUB_FOR_DLL -#define START _start: cmp r1, #1; bne .Lstart_orig -#else -#define START _start: -#endif - - - .text - .balign 0 - .globl upx_main - .globl _start - -#ifdef STUB_IN_THUMB_MODE - - START - stmfd sp!, {r0 - r3, lr} - - @ touch all pages in ARM mode - this seems to be required - @ otherwise the THUMB mode stuff fails - - adr r0, SRC0 - - ldmia r0, {r1, r2, r3} @ r1 - src, r2 - slen, r3 - dst - add r1, r1, r2 -.L01: - ldr r2, [r3] - add r3, r3, #4096 - cmp r3, r1 - bls .L01 - -# ifdef __ARM_ARCH_4T__ - adr ip, call_upxmain + 1 - mov lr, pc - bx ip - ldmfd sp!, {r0 - r3, lr} -.Lstart_orig: - ldr ip, ENTR - bx ip -# else - blx upx_main @ call thumb armv5t style - ldmfd sp!, {r0 - r3, lr} -.Lstart_orig: - ldr pc, ENTR @ original entry -# endif - - - - .code 16 - .global GetProcAddressA - .thumb_func - -GetProcAddressA: - ldr r3, GETP -.Lcallr3: - ldr r3, [r3] - bx r3 - - .global LoadLibraryW - .thumb_func - -LoadLibraryW: - ldr r3, LLIB - b .Lcallr3 - - .global CacheSync - .thumb_func -CacheSync: - ldr r3, CSYN - b .Lcallr3 - -# ifdef __ARM_ARCH_4T__ -call_upxmain: - b upx_main -# endif - - - - .global Unfilter_0x50 - .thumb_func - - buffer .req r0 - addval .req r2 - bufend .req r4 - -Unfilter_0x50: - push {r4 - r7, lr} - ldr buffer, FIBS - mov addval, #0 - ldr bufend, FIBE - mov r5, #0x0f - mov r6, #0xff - lsl r6, #24 - mvn r7, r6 -.Luf50_0: - cmp buffer, bufend - beq .Luf50_ret - - ldrb r3, [buffer, #3] - and r3, r5 - cmp r3, #0x0b - bne .Luf50_1 - ldr r3, [buffer] - mov r1, r3 - and r1, r6 - sub r3, addval - and r3, r7 - orr r3, r1 - str r3, [buffer] - -.Luf50_1: - add buffer, #4 - add addval, #1 - b .Luf50_0 -.Luf50_ret: - pop {r4 - r7, pc} - - .unreq buffer - .unreq addval - .unreq bufend - - - - .global get_le32 - .thumb_func -get_le32: @ optimized for size - mov r1, #3 -.Lg0: - ldrb r3, [r0, r1] - lsl r2, r2, #8 - add r2, r2, r3 - sub r1, #1 - bpl .Lg0 - mov r0, r2 - bx lr - - - -# ifdef STUB_FOR_DLL - .global reloc_main - .thumb_func - buffer .req r0 - dest .req r1 - addval .req r2 - -reloc_main: - push {r4, r5, lr} - ldr buffer, BREL - ldr addval, DST0 - sub dest, addval, #4 - -.Lreloc_loop: - ldrb r3, [buffer] - add buffer, #1 - cmp r3, #0 - beq .Lreloc_end - cmp r3, #0xf0 - blo .Lreloc_add - - mov r4, #0x0f - and r4, r3 - ldrb r3, [buffer, #1] @ get_le16 - lsl r4, #8 - add r4, r3 - ldrb r3, [buffer] - add buffer, #2 - lsl r4, #8 - add r3, r4 - -.Lreloc_add: - add dest, r3 - mov r5, #0 - -.Lread_be32: - ldrb r3, [dest, r5] - lsl r4, #8 - add r4, r3 - add r5, #1 - cmp r5, #4 - bne .Lread_be32 - - add r4, addval - str r4, [dest] - b .Lreloc_loop - -.Lreloc_end: - pop {r4, r5, pc} - -# endif - -# if DEBUG - -// debugging stuff - helpers for dumping memory to a file or deleting a file - -// !!!!! check the lines with "system dependent" below before calling - - .global CFwrap - .thumb_func -CFwrap: - push {r3} - ldr r3, createfilew - mov ip, r3 - pop {r3} - bx ip - - .global WFwrap - .thumb_func -WFwrap: - push {r3} - ldr r3, writefile - mov ip, r3 - pop {r3} - bx ip - - .global CHwrap - .thumb_func -CHwrap: - push {r3} - ldr r3, closehandle - mov ip, r3 - pop {r3} - bx ip - - .global DelFile - .thumb_func -DelFile: - adr r1, filename - strb r0, [r1, #2] - mov r0, r1 - ldr r3, deleteffilew - mov ip, r3 - bx ip - - .code 32 -createfilew: - .word 0x1f7927c @ system dependent -closehandle: - .word 0x1f71594 @ system dependent -deleteffilew: - .word 0x1f7b920 @ system dependent -writefile: - .word 0x1f79434 @ system dependent -filename: - .byte '\\', 0, 'r', 0, 0, 0 - -# endif - -#else // stub in ARM mode - - START - - stmfd sp!, {r0 - r3, lr} - adr r0, SRC0 - bl upx_main - ldmfd sp!, {r0 - r3, lr} -.Lstart_orig: - ldr pc, ENTR - - - - .global LoadLibraryW -LoadLibraryW: - ldr r3, LLIB - ldr pc, [r3] - - .global GetProcAddressA -GetProcAddressA: - ldr r3, GETP - ldr pc, [r3] - - .global CacheSync -CacheSync: - ldr r3, CSYN - ldr pc, [r3] - - - - .global Unfilter_0x50 - buffer .req r0 - addval .req r2 - bufend .req ip - -Unfilter_0x50: - ldr buffer, FIBS - mov addval, #0 - ldr bufend, FIBE -.Luf50_0: - cmp buffer, bufend - - moveq pc, lr - - ldrb r3, [buffer, #3] - and r3, r3, #0x0f - cmp r3, #0x0b - bne .Luf50_1 - ldr r3, [buffer] - and r1, r3, #0xff000000 - sub r3, r3, addval - and r3, r3, #0x00ffffff - orr r3, r3, r1 - str r3, [buffer] - -.Luf50_1: - add buffer, buffer, #4 - add addval, addval, #1 - b .Luf50_0 - - .unreq buffer - .unreq addval - .unreq bufend - - - - .global get_le32 -get_le32: @ optimized for size - mov r2, #3 -.Lg0: - ldrb r3, [r0, r2] - subs r2, r2, #1 - add r1, r3, r1, asl #8 - bpl .Lg0 - mov r0, r1 - mov pc, lr - - - -# ifdef STUB_FOR_DLL - .global reloc_main - buffer .req r0 - dest .req r1 - addval .req r2 - -reloc_main: - ldr buffer, BREL - ldr addval, DST0 - sub dest, addval, #4 - -.Lreloc_loop: - ldrb r3, [buffer], #1 - cmp r3, #0 - moveq pc, lr - cmp r3, #0xf0 - - bichs ip, r3, #0xf0 - ldrhsb r3, [buffer, #1] @ get_le16 - addhs ip, r3, ip, lsl #8 - ldrhsb r3, [buffer], #2 - addhs r3, r3, ip, lsl #8 - - add dest, dest, r3 - ldrb r3, [dest] @ get_be32 - add ip, r3, ip, lsl #8 - ldrb r3, [dest, #1] - add ip, r3, ip, lsl #8 - ldrb r3, [dest, #2] - add ip, r3, ip, lsl #8 - ldrb r3, [dest, #3] - add ip, r3, ip, lsl #8 - add ip, ip, addval - str ip, [dest] - b .Lreloc_loop - - .unreq buffer - .unreq addval - .unreq dest -# endif - -# if DEBUG - -// debugging stuff - helpers for dumping memory to a file or deleting a file - -// !!!!! check the lines with "system dependent" below before calling - - .global CFwrap -CFwrap: - ldr pc, createfilew - - .global WFwrap -WFwrap: - ldr pc, writefile - - .global CHwrap -CHwrap: - ldr pc, closehandle - - .global DelFile -DelFile: - adr r1, filename - strb r0, [r1, #2] - mov r0, r1 - ldr pc, deleteffilew - - .code 32 -createfilew: - .word 0x1f7927c @ system dependent -closehandle: - .word 0x1f71594 @ system dependent -deleteffilew: - .word 0x1f7b920 @ system dependent -writefile: - .word 0x1f79434 @ system dependent -filename: - .byte '\\', 0, 'r', 0, 0, 0 - -# endif - -#endif - - -@@@@@@@@@@@@@@@@ paramater area for UPX - - .code 32 - .p2align 2 -SRC0: .ascii "SRC0" @ start of compressed data -SRCL: .ascii "SRCL" @ compressed length -DST0: .ascii "DST0" @ start of uncompressed data - .ascii "DSTL" @ uncompressed length - .ascii "BIMPONAM" @ start of import data & dll names -GETP: .ascii "GETP" @ pointer to GetProcAddressA -LLIB: .ascii "LOAD" @ pointer to LoadLibraryW -ENTR: .ascii "ENTR" @ original entry point -BREL: .ascii "BREL" @ start of reloc info -FIBS: .ascii "FIBS" @ buffer start for filter -FIBE: .ascii "FIBE" @ buffer end for filter -CSYN: .ascii "CSYN" @ pointer to CacheSync -