From 68dadabc2953655faf63787b02d5ba7480152e68 Mon Sep 17 00:00:00 2001 From: John Reiser Date: Sun, 2 Jul 2006 16:25:31 -0700 Subject: [PATCH] BSD/elf386 --- src/conf.h | 4 + src/p_elf.h | 5 +- src/p_lx_elf.cpp | 65 ++- src/p_lx_elf.h | 16 + src/packmast.cpp | 2 + src/stub/Makefile | 47 ++ src/stub/i386-BSD.elf-entry.h | 721 ++++++++++++++++++++++++++++ src/stub/i386-BSD.elf-fold.h | 142 ++++++ src/stub/scripts/brandBSD.pl | 49 ++ src/stub/src/i386-BSD.elf-entry.asm | 235 +++++++++ src/stub/src/i386-BSD.elf-fold.asm | 276 +++++++++++ src/stub/src/i386-BSD.elf-fold.lds | 49 ++ src/stub/src/i386-BSD.elf-main.c | 588 +++++++++++++++++++++++ src/stub/src/include/BSD.h | 348 ++++++++++++++ 14 files changed, 2542 insertions(+), 5 deletions(-) create mode 100644 src/stub/i386-BSD.elf-entry.h create mode 100644 src/stub/i386-BSD.elf-fold.h create mode 100644 src/stub/scripts/brandBSD.pl create mode 100644 src/stub/src/i386-BSD.elf-entry.asm create mode 100644 src/stub/src/i386-BSD.elf-fold.asm create mode 100644 src/stub/src/i386-BSD.elf-fold.lds create mode 100644 src/stub/src/i386-BSD.elf-main.c create mode 100644 src/stub/src/include/BSD.h diff --git a/src/conf.h b/src/conf.h index 7fc18dd4..cbf92680 100644 --- a/src/conf.h +++ b/src/conf.h @@ -545,6 +545,10 @@ inline void operator delete[](void *p) #define UPX_F_LINUX_ELF64_AMD 22 #define UPX_F_LINUX_ELF32_ARMLE 23 +#define UPX_F_BSD_i386 24 +#define UPX_F_BSD_ELF_i386 25 +#define UPX_F_BSD_SH_i386 26 + #define UPX_F_PLAIN_TEXT 127 #define UPX_F_ATARI_TOS 129 diff --git a/src/p_elf.h b/src/p_elf.h index 7126e9f7..6330cc28 100644 --- a/src/p_elf.h +++ b/src/p_elf.h @@ -71,7 +71,10 @@ struct Ehdr ELFDATA2MSB = 2 /* 2's complement, big endian */ }; enum { // e_ident[EI_OSABI] - ELFOSABI_LINUX = 3 + ELFOSABI_NONE = 0, + ELFOSABI_LINUX = 3, + ELFOSABI_FREEBSD = 9, + ELFOSABI_ARM = 97 }; enum { // e_type ET_NONE = 0, /* No file type */ diff --git a/src/p_lx_elf.cpp b/src/p_lx_elf.cpp index d3c559b3..82aa74ca 100644 --- a/src/p_lx_elf.cpp +++ b/src/p_lx_elf.cpp @@ -53,7 +53,9 @@ PackLinuxElf32::checkEhdr(Elf32_Ehdr const *ehdr) const if (0!=memcmp(buf, "\x7f\x45\x4c\x46", 4) // "\177ELF" || buf[Elf32_Ehdr::EI_CLASS]!=ei_class - || buf[Elf32_Ehdr::EI_DATA] !=ei_data ) { + || buf[Elf32_Ehdr::EI_DATA] !=ei_data + || buf[Elf32_Ehdr::EI_OSABI] !=ei_osabi + ) { return -1; } if (!memcmp(buf+8, "FreeBSD", 7)) // branded @@ -96,7 +98,9 @@ PackLinuxElf64::checkEhdr(Elf64_Ehdr const *ehdr) const if (0!=memcmp(buf, "\x7f\x45\x4c\x46", 4) // "\177ELF" || buf[Elf64_Ehdr::EI_CLASS]!=ei_class - || buf[Elf64_Ehdr::EI_DATA] !=ei_data ) { + || buf[Elf64_Ehdr::EI_DATA] !=ei_data + || buf[Elf64_Ehdr::EI_OSABI] !=ei_osabi + ) { return -1; } if (!memcmp(buf+8, "FreeBSD", 7)) // branded @@ -134,7 +138,7 @@ PackLinuxElf64::checkEhdr(Elf64_Ehdr const *ehdr) const PackLinuxElf::PackLinuxElf(InputFile *f) : super(f), file_image(NULL), dynstr(NULL), sz_phdrs(0), sz_elf_hdrs(0), - e_machine(0), ei_class(0), ei_data(0) + e_machine(0), ei_class(0), ei_data(0), ei_osabi(0) { delete[] file_image; } @@ -263,6 +267,7 @@ PackLinuxElf32ppc::PackLinuxElf32ppc(InputFile *f) e_machine = Elf32_Ehdr::EM_PPC; ei_class = Elf32_Ehdr::ELFCLASS32; ei_data = Elf32_Ehdr::ELFDATA2MSB; + ei_osabi = Elf32_Ehdr::ELFOSABI_NONE; } PackLinuxElf32ppc::~PackLinuxElf32ppc() @@ -275,6 +280,7 @@ PackLinuxElf64amd::PackLinuxElf64amd(InputFile *f) e_machine = Elf64_Ehdr::EM_X86_64; ei_class = Elf64_Ehdr::ELFCLASS64; ei_data = Elf64_Ehdr::ELFDATA2LSB; + ei_osabi = Elf32_Ehdr::ELFOSABI_NONE; } PackLinuxElf64amd::~PackLinuxElf64amd() @@ -580,6 +586,36 @@ PackLinuxElf32x86::buildLoader(const Filter *ft) tmp, sizeof(linux_i386elf_fold), ft ); } +static const +#include "stub/i386-BSD.elf-entry.h" +static const +#include "stub/i386-BSD.elf-fold.h" + +int +PackBSDElf32x86::buildLoader(const Filter *ft) +{ + unsigned char tmp[sizeof(BSD_i386elf_fold)]; + memcpy(tmp, BSD_i386elf_fold, sizeof(BSD_i386elf_fold)); + ((Elf32_Ehdr *)tmp)->e_ident[Elf32_Ehdr::EI_OSABI] = ei_osabi; + ((Elf32_Ehdr *)tmp)->e_ident[Elf32_Ehdr::EI_ABIVERSION] = 0; + checkPatch(NULL, 0, 0, 0); // reset + if (opt->o_unix.is_ptinterp) { + unsigned j; + for (j = 0; j < sizeof(BSD_i386elf_fold)-1; ++j) { + if (0x60==tmp[ j] + && 0x47==tmp[1+j] ) { + /* put INC EDI before PUSHA: inhibits auxv_up for PT_INTERP */ + tmp[ j] = 0x47; + tmp[1+j] = 0x60; + break; + } + } + } + return buildLinuxLoader( + BSD_i386elf_loader, sizeof(BSD_i386elf_loader), + tmp, sizeof(BSD_i386elf_fold), ft ); +} + static const #include "stub/arm-linux.elf-entry.h" static const @@ -1005,10 +1041,16 @@ void PackLinuxElf32::pack1(OutputFile */*fo*/, Filter &/*ft*/) void PackLinuxElf32x86::pack1(OutputFile *fo, Filter &ft) { - super::pack1(fo, ft); + PackLinuxElf32::pack1(fo, ft); generateElfHdr(fo, linux_i386elf_fold, getbrk(phdri, get_native16(&ehdri.e_phnum)) ); } +void PackBSDElf32x86::pack1(OutputFile *fo, Filter &ft) +{ + PackLinuxElf32::pack1(fo, ft); + generateElfHdr(fo, BSD_i386elf_fold, getbrk(phdri, get_native16(&ehdri.e_phnum)) ); +} + void PackLinuxElf32::ARM_pack1(OutputFile *fo, bool const isBE) { Elf32_Ehdr const *const fold = (Elf32_Ehdr const *)&linux_elf32arm_fold; @@ -1820,12 +1862,25 @@ PackLinuxElf32x86::PackLinuxElf32x86(InputFile *f) : super(f) e_machine = Elf32_Ehdr::EM_386; ei_class = Elf32_Ehdr::ELFCLASS32; ei_data = Elf32_Ehdr::ELFDATA2LSB; + ei_osabi = Elf32_Ehdr::ELFOSABI_NONE; // ELFOSABI_LINUX } PackLinuxElf32x86::~PackLinuxElf32x86() { } +PackBSDElf32x86::PackBSDElf32x86(InputFile *f) : super(f) +{ + e_machine = Elf32_Ehdr::EM_386; + ei_class = Elf32_Ehdr::ELFCLASS32; + ei_data = Elf32_Ehdr::ELFDATA2LSB; + ei_osabi = Elf32_Ehdr::ELFOSABI_FREEBSD; +} + +PackBSDElf32x86::~PackBSDElf32x86() +{ +} + int const * PackLinuxElf32x86::getFilters() const { @@ -1854,6 +1909,7 @@ PackLinuxElf32armLe::PackLinuxElf32armLe(InputFile *f) : super(f) e_machine = Elf32_Ehdr::EM_ARM; ei_class = Elf32_Ehdr::ELFCLASS32; ei_data = Elf32_Ehdr::ELFDATA2LSB; + ei_osabi = Elf32_Ehdr::ELFOSABI_ARM; } PackLinuxElf32armLe::~PackLinuxElf32armLe() @@ -1865,6 +1921,7 @@ PackLinuxElf32armBe::PackLinuxElf32armBe(InputFile *f) : super(f) e_machine = Elf32_Ehdr::EM_ARM; ei_class = Elf32_Ehdr::ELFCLASS32; ei_data = Elf32_Ehdr::ELFDATA2MSB; + ei_osabi = Elf32_Ehdr::ELFOSABI_ARM; } PackLinuxElf32armBe::~PackLinuxElf32armBe() diff --git a/src/p_lx_elf.h b/src/p_lx_elf.h index 16af490a..3b44c0bb 100644 --- a/src/p_lx_elf.h +++ b/src/p_lx_elf.h @@ -71,6 +71,7 @@ protected: unsigned short e_machine; unsigned char ei_class; unsigned char ei_data; + unsigned char ei_osabi; }; class PackLinuxElf32 : public PackLinuxElf @@ -326,6 +327,21 @@ protected: ); }; +class PackBSDElf32x86 : public PackLinuxElf32x86 +{ + typedef PackLinuxElf32x86 super; +public: + PackBSDElf32x86(InputFile *f); + virtual ~PackBSDElf32x86(); + virtual int getFormat() const { return UPX_F_BSD_ELF_i386; } + virtual const char *getName() const { return "BSD/elf386"; } + +protected: + virtual void pack1(OutputFile *, Filter &); // generate executable header + + virtual int buildLoader(const Filter *); +}; + /************************************************************************* // linux/elfarm **************************************************************************/ diff --git a/src/packmast.cpp b/src/packmast.cpp index 2198cab6..0157e043 100644 --- a/src/packmast.cpp +++ b/src/packmast.cpp @@ -213,6 +213,8 @@ static Packer* try_packers(InputFile *f, try_function func) if ((p = func(new PackLinuxElf32x86interp(f),f)) != NULL) return p; } + if ((p = func(new PackBSDElf32x86(f),f)) != NULL) + return p; if ((p = func(new PackLinuxElf32x86(f),f)) != NULL) return p; if ((p = func(new PackLinuxElf64amd(f),f)) != NULL) diff --git a/src/stub/Makefile b/src/stub/Makefile index 0c9d77d0..868a6329 100644 --- a/src/stub/Makefile +++ b/src/stub/Makefile @@ -51,6 +51,8 @@ STUBS += i386-dos32.tmt.h STUBS += i386-dos32.watcom.le.h STUBS += i386-linux.elf-entry.h STUBS += i386-linux.elf-fold.h +STUBS += i386-BSD.elf-entry.h +STUBS += i386-BSD.elf-fold.h STUBS += i386-linux.elf.execve-entry.h STUBS += i386-linux.elf.execve-fold.h STUBS += i386-linux.elf.interp-entry.h @@ -120,6 +122,7 @@ override T = $(basename $(notdir $@)) # default settings for $(tc_list) tc.default.bin2h = python $(srcdir)/scripts/bin2h.py tc.default.brandelf = perl -w $(srcdir)/scripts/brandelf.pl +tc.default.brandBSD = perl -w $(srcdir)/scripts/brandBSD.pl tc.default.djasm = djasm tc.default.gpp_inc = python $(srcdir)/scripts/gpp_inc.py tc.default.m-objcopy = multiarch-objcopy-2.17 @@ -345,6 +348,50 @@ i386-dos32.watcom.le.h : $(srcdir)/src/$$T.asm $(call tc,bin2h) --ident=nrv_loader tmp/$T.bin $@ +# /*********************************************************************** +# // i386-BSD.elf +# ************************************************************************/ + +i386-BSD.elf% : tc_list = i386-BSD.elf arch-i386 default + +tc.i386-BSD.elf.gcc = i386-linux-gcc-3.4.6 -m32 -march=i386 -nostdinc -MMD +tc.i386-BSD.elf.gcc += -fno-exceptions -fno-asynchronous-unwind-tables +tc.i386-BSD.elf.gcc += -Wall -W -Wcast-align -Wcast-qual -Wwrite-strings -Werror +tc.i386-BSD.elf.gcc += -march=i386 -mtune=k6 +tc.i386-BSD.elf.gcc += -Os -fno-omit-frame-pointer +tc.i386-BSD.elf.gcc += -momit-leaf-frame-pointer +tc.i386-BSD.elf.gcc += -fno-align-functions -fno-align-jumps -fno-align-labels -fno-align-loops +tc.i386-BSD.elf.gcc += -mpreferred-stack-boundary=2 +tc.i386-BSD.elf.gcc += -fweb +##tc.i386-BSD.elf.ld = i386-linux-ld-2.16.1 +##tc.i386-BSD.elf.objcopy = i386-linux-objcopy-2.16.1 +##tc.i386-BSD.elf.objdump = i386-linux-objdump +tc.i386-BSD.elf.ld = $(call tc,m-ld) -b elf32-i386 +tc.i386-BSD.elf.objcopy = $(call tc,m-objcopy) -I elf32-i386 +tc.i386-BSD.elf.objdump = $(call tc,m-objdump) -b elf32-i386 +tc.i386-BSD.elf.objstrip = $(call tc,objcopy) -R .comment -R .note + +i386-BSD.elf-entry.h : $(srcdir)/src/$$T.asm + $(call tc,pp-nasm) $< -o tmp/$T.tmp1 + $(call tc,app-nasm) tmp/$T.tmp1 tmp/$T.tmp2 + $(call tc,nasm) -f bin -l tmp/$T.bin.lst tmp/$T.tmp2 -o tmp/$T.bin + $(call tc,bin2h) --ident=BSD_i386elf_loader tmp/$T.bin $@ + +i386-BSD.elf-fold.h : tmp/$$T.o tmp/i386-BSD.elf-main.o $(srcdir)/src/$$T.lds + $(call tc,ld) -T $(srcdir)/src/$T.lds -Map tmp/$T.map -o tmp/$T.bin --strip-all $(filter %.o,$^) + $(call tc,objstrip) tmp/$T.bin + $(call tc,sstrip) tmp/$T.bin + $(call tc,brandBSD) tmp/$T.bin + $(call tc,bin2h) --ident=BSD_i386elf_fold tmp/$T.bin $@ + +tmp/i386-BSD.elf-fold.o : $(srcdir)/src/$$T.asm + $(call tc,nasm) -f elf -l $@.lst $< -o $@ + $(call tc,objstrip) $@ + +tmp/i386-BSD.elf-main.o : $(srcdir)/src/$$T.c + $(call tc,gcc) -c $< -o $@ + $(call tc,objstrip) $@ + # /*********************************************************************** # // i386-linux.elf # ************************************************************************/ diff --git a/src/stub/i386-BSD.elf-entry.h b/src/stub/i386-BSD.elf-entry.h new file mode 100644 index 00000000..981908cc --- /dev/null +++ b/src/stub/i386-BSD.elf-entry.h @@ -0,0 +1,721 @@ +/* i386-BSD.elf-entry.h -- created from i386-BSD.elf-entry.bin, 10972 (0x2adc) 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 BSD_I386ELF_LOADER_SIZE 10972 +#define BSD_I386ELF_LOADER_ADLER32 0xf87da5ea +#define BSD_I386ELF_LOADER_CRC32 0x5c4c2f5c + +unsigned char BSD_i386elf_loader[10972] = { +232, 0, 0, 0, 0, 96,106, 63,139,116, 36, 40,139,124, 36, 48, /* 0x 0 */ +131,205,255,235, 0,164,235, 0,138, 6, 70,136, 7, 71, 1,219, /* 0x 10 */ +117, 7,139, 30,131,238,252, 17,219,114, 0, 49,192, 64,138, 7, /* 0x 20 */ +114, 0,184, 1, 0, 0, 0, 1,219,117, 7,139, 30,131,238,252, /* 0x 30 */ + 17,219, 17,192, 1,219,117, 7,139, 30,131,238,252, 17,219,115, /* 0x 40 */ + 0, 1,219,115, 0,117, 9,139, 30,131,238,252, 17,219,115, 0, /* 0x 50 */ + 49,201,131,232, 3,114, 13,193,224, 8,138, 6, 70,131,240,255, /* 0x 60 */ +116, 0,137,197, 1,219,117, 7,139, 30,131,238,252, 17,219, 17, /* 0x 70 */ +201, 1,219,117, 7,139, 30,131,238,252, 17,219, 17,201,117, 0, /* 0x 80 */ + 65, 1,219,117, 7,139, 30,131,238,252, 17,219, 17,201, 1,219, /* 0x 90 */ +117, 7,139, 30,131,238,252, 17,219,115, 0, 1,219,115, 0,117, /* 0x a0 */ + 9,139, 30,131,238,252, 17,219,115, 0, 65, 65,131,193, 2,129, /* 0x b0 */ +253, 0,243,255,255,131,209, 1, 86,141, 52, 47,243,164, 94,233, /* 0x c0 */ + 0, 0, 0, 0,141, 20, 47,131,253,252,138, 4, 15,118, 0,138, /* 0x d0 */ + 2, 66,136, 7, 71, 73,117,247,233, 0, 0, 0, 0,139, 2,131, /* 0x e0 */ +194, 4,137, 7,131,199, 4,131,233, 4,119,241, 1,207,233, 0, /* 0x f0 */ + 0, 0, 0,235, 0,164,235, 0,138, 6, 70,136, 7, 71, 1,219, /* 0x 100 */ +117, 7,139, 30,131,238,252, 17,219,114, 0, 49,192, 64,138, 7, /* 0x 110 */ +114, 0,184, 1, 0, 0, 0, 1,219,117, 7,139, 30,131,238,252, /* 0x 120 */ + 17,219, 17,192, 1,219,117, 7,139, 30,131,238,252, 17,219,114, /* 0x 130 */ + 0, 1,219,115, 11,117, 0,139, 30,131,238,252, 17,219,114, 0, /* 0x 140 */ + 72, 1,219,117, 7,139, 30,131,238,252, 17,219, 17,192,235, 0, /* 0x 150 */ + 49,201,131,232, 3,114, 17,193,224, 8,138, 6, 70,131,240,255, /* 0x 160 */ +116, 0,209,248,137,197,235, 11, 1,219,117, 7,139, 30,131,238, /* 0x 170 */ +252, 17,219, 17,201, 1,219,117, 7,139, 30,131,238,252, 17,219, /* 0x 180 */ + 17,201,117, 0, 65, 1,219,117, 7,139, 30,131,238,252, 17,219, /* 0x 190 */ + 17,201, 1,219,117, 7,139, 30,131,238,252, 17,219,115, 0, 1, /* 0x 1a0 */ +219,115, 0,117, 9,139, 30,131,238,252, 17,219,115, 0, 65, 65, /* 0x 1b0 */ +131,193, 2,129,253, 0,251,255,255,131,209, 1, 86,141, 52, 47, /* 0x 1c0 */ +243,164, 94,233, 0, 0, 0, 0,141, 20, 47,131,253,252,138, 4, /* 0x 1d0 */ + 15,118, 0,138, 2, 66,136, 7, 71, 73,117,247,233, 0, 0, 0, /* 0x 1e0 */ + 0,139, 2,131,194, 4,137, 7,131,199, 4,131,233, 4,119,241, /* 0x 1f0 */ + 1,207,233, 0, 0, 0, 0,235, 0,164,235, 0,138, 6, 70,136, /* 0x 200 */ + 7, 71, 1,219,117, 7,139, 30,131,238,252, 17,219,114, 0, 49, /* 0x 210 */ +192, 64,138, 7,114, 0,184, 1, 0, 0, 0, 1,219,117, 7,139, /* 0x 220 */ + 30,131,238,252, 17,219, 17,192, 1,219,117, 7,139, 30,131,238, /* 0x 230 */ +252, 17,219,114, 0, 1,219,115, 11,117, 0,139, 30,131,238,252, /* 0x 240 */ + 17,219,114, 0, 72, 1,219,117, 7,139, 30,131,238,252, 17,219, /* 0x 250 */ + 17,192,235, 0, 1,219,117, 7,139, 30,131,238,252, 17,219, 17, /* 0x 260 */ +201,235, 0, 49,201,131,232, 3,114, 17,193,224, 8,138, 6, 70, /* 0x 270 */ +131,240,255,116, 0,209,248,137,197,235, 11, 1,219,117, 7,139, /* 0x 280 */ + 30,131,238,252, 17,219,114,204, 65, 1,219,117, 7,139, 30,131, /* 0x 290 */ +238,252, 17,219,114,190, 1,219,117, 7,139, 30,131,238,252, 17, /* 0x 2a0 */ +219, 17,201, 1,219,117, 7,139, 30,131,238,252, 17,219,115, 0, /* 0x 2b0 */ + 1,219,115, 0,117, 9,139, 30,131,238,252, 17,219,115, 0, 65, /* 0x 2c0 */ + 65,131,193, 2,129,253, 0,251,255,255,131,209, 2, 86,141, 52, /* 0x 2d0 */ + 47,243,164, 94,233, 0, 0, 0, 0,141, 20, 47,131,253,252,138, /* 0x 2e0 */ + 4, 15,118, 0,138, 2, 66,136, 7, 71, 73,117,247,233, 0, 0, /* 0x 2f0 */ + 0, 0,139, 2,131,194, 4,137, 7,131,199, 4,131,233, 4,119, /* 0x 300 */ +241, 1,207,233, 0, 0, 0, 0,137,229,141,156, 36, 85, 80, 88, /* 0x 310 */ + 97, 49,192, 80, 57,220,117,251, 70, 70, 83,104, 85, 80, 88, 98, /* 0x 320 */ + 87,131,195, 4, 83,104, 85, 80, 88, 99, 86,131,195, 4, 83, 80, /* 0x 330 */ +199, 3, 85, 80, 88,100,137,229,139, 85, 44,172, 74,136,193, 36, /* 0x 340 */ + 7,192,233, 3,187, 0,253,255,255,211,227,141,156, 92,136,241, /* 0x 350 */ +255,255,131,227,224,106, 0, 57,220,117,250, 83,131,195, 4,139, /* 0x 360 */ + 77, 52,255, 49, 87, 83,131,195, 4,136, 67, 2,172, 74,136,193, /* 0x 370 */ + 36, 15,136, 3,192,233, 4,136, 75, 1, 82, 86, 83, 80, 85, 87, /* 0x 380 */ + 86, 83,131,236,124,139,148, 36,144, 0, 0, 0,199, 68, 36,116, /* 0x 390 */ + 0, 0, 0, 0,198, 68, 36,115, 0,139,172, 36,156, 0, 0, 0, /* 0x 3a0 */ +141, 66, 4,137, 68, 36,120,184, 1, 0, 0, 0, 15,182, 74, 2, /* 0x 3b0 */ +137,195,211,227,137,217, 73,137, 76, 36,108, 15,182, 74, 1,211, /* 0x 3c0 */ +224, 72,137, 68, 36,104,139,132, 36,168, 0, 0, 0, 15,182, 50, /* 0x 3d0 */ +199, 69, 0, 0, 0, 0, 0,199, 68, 36, 96, 0, 0, 0, 0,199, /* 0x 3e0 */ + 0, 0, 0, 0, 0,184, 0, 3, 0, 0,137,116, 36,100,199, 68, /* 0x 3f0 */ + 36, 92, 1, 0, 0, 0,199, 68, 36, 88, 1, 0, 0, 0,199, 68, /* 0x 400 */ + 36, 84, 1, 0, 0, 0,199, 68, 36, 80, 1, 0, 0, 0, 15,182, /* 0x 410 */ + 74, 1, 1,241,211,224,141,136, 54, 7, 0, 0, 57, 76, 36,116, /* 0x 420 */ +115, 14,139, 68, 36,120,102,199, 0, 0, 4,131,192, 2,226,246, /* 0x 430 */ +139,156, 36,148, 0, 0, 0, 49,255,199, 68, 36, 72,255,255,255, /* 0x 440 */ +255,137,218, 3,148, 36,152, 0, 0, 0,137, 84, 36, 76, 49,210, /* 0x 450 */ + 59, 92, 36, 76, 15,132,124, 9, 0, 0, 15,182, 3,193,231, 8, /* 0x 460 */ + 66, 67, 9,199,131,250, 4,126,231,139,140, 36,164, 0, 0, 0, /* 0x 470 */ + 57, 76, 36,116, 15,131,100, 9, 0, 0,139,116, 36,116, 35,116, /* 0x 480 */ + 36,108,139, 68, 36, 96,139, 84, 36,120,193,224, 4,137,116, 36, /* 0x 490 */ + 68, 1,240,129,124, 36, 72,255,255,255, 0,141, 44, 66,119, 24, /* 0x 4a0 */ + 59, 92, 36, 76, 15,132, 44, 9, 0, 0,193,100, 36, 72, 8, 15, /* 0x 4b0 */ +182, 3,193,231, 8, 67, 9,199,139, 68, 36, 72,102,139, 85, 0, /* 0x 4c0 */ +193,232, 11, 15,183,202, 15,175,193, 57,199, 15,131,221, 1, 0, /* 0x 4d0 */ + 0,137, 68, 36, 72,184, 0, 8, 0, 0, 41,200,138, 76, 36,100, /* 0x 4e0 */ +193,248, 5,190, 1, 0, 0, 0,141, 4, 2, 15,182, 84, 36,115, /* 0x 4f0 */ +102,137, 69, 0,139, 68, 36,116, 35, 68, 36,104,139,108, 36,120, /* 0x 500 */ +211,224,185, 8, 0, 0, 0, 43, 76, 36,100,211,250, 1,208,105, /* 0x 510 */ +192, 0, 6, 0, 0,131,124, 36, 96, 6,141,132, 5,108, 14, 0, /* 0x 520 */ + 0,137, 68, 36, 20, 15,142,202, 0, 0, 0,139, 68, 36,116, 43, /* 0x 530 */ + 68, 36, 92,139,148, 36,160, 0, 0, 0, 15,182, 4, 2,137, 68, /* 0x 540 */ + 36, 64,209,100, 36, 64,139, 76, 36, 64,141, 20, 54,139,108, 36, /* 0x 550 */ + 20,129,225, 0, 1, 0, 0,129,124, 36, 72,255,255,255, 0,141, /* 0x 560 */ + 68, 77, 0,137, 76, 36, 60,141, 44, 16,119, 24, 59, 92, 36, 76, /* 0x 570 */ + 15,132, 96, 8, 0, 0,193,100, 36, 72, 8, 15,182, 3,193,231, /* 0x 580 */ + 8, 67, 9,199,139, 68, 36, 72,102,139,141, 0, 2, 0, 0,193, /* 0x 590 */ +232, 11, 15,183,241, 15,175,198, 57,199,115, 35,137, 68, 36, 72, /* 0x 5a0 */ +184, 0, 8, 0, 0, 41,240,137,214,193,248, 5,131,124, 36, 60, /* 0x 5b0 */ + 0,141, 4, 1,102,137,133, 0, 2, 0, 0,116, 34,235, 46, 41, /* 0x 5c0 */ + 68, 36, 72, 41,199,137,200,141,114, 1,102,193,232, 5,102, 41, /* 0x 5d0 */ +193,131,124, 36, 60, 0,102,137,141, 0, 2, 0, 0,116, 14,129, /* 0x 5e0 */ +254,255, 0, 0, 0, 15,142, 87,255,255,255,235,121,129,254,255, /* 0x 5f0 */ + 0, 0, 0,127,113,141, 20, 54,139,108, 36, 20, 1,213,129,124, /* 0x 600 */ + 36, 72,255,255,255, 0,119, 24, 59, 92, 36, 76, 15,132,196, 7, /* 0x 610 */ + 0, 0,193,100, 36, 72, 8, 15,182, 3,193,231, 8, 67, 9,199, /* 0x 620 */ +139, 68, 36, 72,102,139, 77, 0,193,232, 11, 15,183,241, 15,175, /* 0x 630 */ +198, 57,199,115, 25,137, 68, 36, 72,184, 0, 8, 0, 0, 41,240, /* 0x 640 */ +137,214,193,248, 5,141, 4, 1,102,137, 69, 0,235,159, 41, 68, /* 0x 650 */ + 36, 72, 41,199,137,200,141,114, 1,102,193,232, 5,102, 41,193, /* 0x 660 */ +102,137, 77, 0,235,135,139, 84, 36,116,137,240,139,140, 36,160, /* 0x 670 */ + 0, 0, 0,136, 68, 36,115,136, 4, 10, 66,131,124, 36, 96, 3, /* 0x 680 */ +137, 84, 36,116,127, 13,199, 68, 36, 96, 0, 0, 0, 0,233, 27, /* 0x 690 */ + 7, 0, 0,131,124, 36, 96, 9,127, 10,131,108, 36, 96, 3,233, /* 0x 6a0 */ + 10, 7, 0, 0,131,108, 36, 96, 6,233, 0, 7, 0, 0,139, 76, /* 0x 6b0 */ + 36, 72, 41,199,139,116, 36, 96, 41,193,137,208,102,193,232, 5, /* 0x 6c0 */ +102, 41,194,129,249,255,255,255, 0,102,137, 85, 0,139,108, 36, /* 0x 6d0 */ +120,141,116,117, 0,137,116, 36, 56,119, 22, 59, 92, 36, 76, 15, /* 0x 6e0 */ +132,241, 6, 0, 0, 15,182, 3,193,231, 8,193,225, 8, 67, 9, /* 0x 6f0 */ +199,139,108, 36, 56,137,200,193,232, 11,102,139,149,128, 1, 0, /* 0x 700 */ + 0, 15,183,234, 15,175,197, 57,199,115, 82,137,198,184, 0, 8, /* 0x 710 */ + 0, 0, 41,232,139,108, 36, 88,193,248, 5,139, 76, 36, 84,141, /* 0x 720 */ + 4, 2,139, 84, 36, 56,137, 76, 36, 80,139, 76, 36,120,102,137, /* 0x 730 */ +130,128, 1, 0, 0,139, 68, 36, 92,137,108, 36, 84,137, 68, 36, /* 0x 740 */ + 88, 49,192,131,124, 36, 96, 6, 15,159,192,129,193,100, 6, 0, /* 0x 750 */ + 0,141, 4, 64,137, 68, 36, 96,233,116, 2, 0, 0,137,206, 41, /* 0x 760 */ +199, 41,198,137,208,102,193,232, 5,139, 76, 36, 56,102, 41,194, /* 0x 770 */ +129,254,255,255,255, 0,102,137,145,128, 1, 0, 0,119, 22, 59, /* 0x 780 */ + 92, 36, 76, 15,132, 77, 6, 0, 0, 15,182, 3,193,231, 8,193, /* 0x 790 */ +230, 8, 67, 9,199,139,108, 36, 56,137,242,193,234, 11,102,139, /* 0x 7a0 */ +141,152, 1, 0, 0, 15,183,193, 15,175,208, 57,215, 15,131,227, /* 0x 7b0 */ + 0, 0, 0,189, 0, 8, 0, 0,137,214, 41,197,199, 68, 36, 52, /* 0x 7c0 */ + 0, 8, 0, 0,137,232,193,248, 5,141, 4, 1,139, 76, 36, 56, /* 0x 7d0 */ +102,137,129,152, 1, 0, 0,139, 68, 36, 96,139, 76, 36, 68,193, /* 0x 7e0 */ +224, 5, 3, 68, 36,120,129,250,255,255,255, 0,141, 44, 72,119, /* 0x 7f0 */ + 22, 59, 92, 36, 76, 15,132,219, 5, 0, 0, 15,182, 3,193,231, /* 0x 800 */ + 8,193,230, 8, 67, 9,199,102,139,149,224, 1, 0, 0,137,240, /* 0x 810 */ +193,232, 11, 15,183,202, 15,175,193, 57,199,115, 96, 41, 76, 36, /* 0x 820 */ + 52,193,124, 36, 52, 5,139,116, 36, 52,137, 68, 36, 72,131,124, /* 0x 830 */ + 36,116, 0,141, 4, 50,102,137,133,224, 1, 0, 0, 15,132,147, /* 0x 840 */ + 5, 0, 0, 49,192,131,124, 36, 96, 6,139,172, 36,160, 0, 0, /* 0x 850 */ + 0,139, 84, 36,116, 15,159,192,141, 68, 0, 9,137, 68, 36, 96, /* 0x 860 */ +139, 68, 36,116, 43, 68, 36, 92,138, 68, 5, 0,136, 68, 36,115, /* 0x 870 */ +136, 4, 42, 66,137, 84, 36,116,233, 49, 5, 0, 0, 41,198, 41, /* 0x 880 */ +199,137,208,102,193,232, 5,102, 41,194,102,137,149,224, 1, 0, /* 0x 890 */ + 0,233, 31, 1, 0, 0,137,200, 41,214,102,193,232, 5,139,108, /* 0x 8a0 */ + 36, 56,102, 41,193, 41,215,129,254,255,255,255, 0,102,137,141, /* 0x 8b0 */ +152, 1, 0, 0,119, 22, 59, 92, 36, 76, 15,132, 22, 5, 0, 0, /* 0x 8c0 */ + 15,182, 3,193,231, 8,193,230, 8, 67, 9,199,139, 76, 36, 56, /* 0x 8d0 */ +137,240,193,232, 11,102,139,145,176, 1, 0, 0, 15,183,202, 15, /* 0x 8e0 */ +175,193, 57,199,115, 35,137,198,184, 0, 8, 0, 0, 41,200,139, /* 0x 8f0 */ +108, 36, 56,193,248, 5,141, 4, 2,102,137,133,176, 1, 0, 0, /* 0x 900 */ +139, 68, 36, 88,233,160, 0, 0, 0,137,241, 41,199, 41,193,137, /* 0x 910 */ +208,102,193,232, 5,102, 41,194,139, 68, 36, 56,129,249,255,255, /* 0x 920 */ +255, 0,102,137,144,176, 1, 0, 0,119, 22, 59, 92, 36, 76, 15, /* 0x 930 */ +132,161, 4, 0, 0, 15,182, 3,193,231, 8,193,225, 8, 67, 9, /* 0x 940 */ +199,139,116, 36, 56,137,200,193,232, 11,102,139,150,200, 1, 0, /* 0x 950 */ + 0, 15,183,234, 15,175,197, 57,199,115, 32,137,198,184, 0, 8, /* 0x 960 */ + 0, 0, 41,232,139,108, 36, 56,193,248, 5,141, 4, 2,102,137, /* 0x 970 */ +133,200, 1, 0, 0,139, 68, 36, 84,235, 38,137,206, 41,199, 41, /* 0x 980 */ +198,137,208,102,193,232, 5,102, 41,194,139, 68, 36, 56,102,137, /* 0x 990 */ +144,200, 1, 0, 0,139, 84, 36, 84,139, 68, 36, 80,137, 84, 36, /* 0x 9a0 */ + 80,139, 76, 36, 88,137, 76, 36, 84,139,108, 36, 92,137, 68, 36, /* 0x 9b0 */ + 92,137,108, 36, 88, 49,192,131,124, 36, 96, 6,139, 76, 36,120, /* 0x 9c0 */ + 15,159,192,129,193,104, 10, 0, 0,141, 68, 64, 8,137, 68, 36, /* 0x 9d0 */ + 96,129,254,255,255,255, 0,119, 22, 59, 92, 36, 76, 15,132,243, /* 0x 9e0 */ + 3, 0, 0, 15,182, 3,193,231, 8,193,230, 8, 67, 9,199,102, /* 0x 9f0 */ +139, 17,137,240,193,232, 11, 15,183,234, 15,175,197, 57,199,115, /* 0x a00 */ + 47,137, 68, 36, 72,184, 0, 8, 0, 0, 41,232,193,100, 36, 68, /* 0x a10 */ + 4,193,248, 5,199, 68, 36, 44, 0, 0, 0, 0,141, 4, 2,102, /* 0x a20 */ +137, 1,139, 68, 36, 68,141, 76, 1, 4,137, 76, 36, 16,235,114, /* 0x a30 */ + 41,198, 41,199,137,208,102,193,232, 5,102, 41,194,129,254,255, /* 0x a40 */ +255,255, 0,102,137, 17,119, 22, 59, 92, 36, 76, 15,132,132, 3, /* 0x a50 */ + 0, 0, 15,182, 3,193,231, 8,193,230, 8, 67, 9,199,102,139, /* 0x a60 */ + 81, 2,137,240,193,232, 11, 15,183,234, 15,175,197, 57,199,115, /* 0x a70 */ + 59,137, 68, 36, 72,184, 0, 8, 0, 0, 41,232,193,100, 36, 68, /* 0x a80 */ + 4,193,248, 5,199, 68, 36, 44, 8, 0, 0, 0,141, 4, 2,139, /* 0x a90 */ + 84, 36, 68,102,137, 65, 2,141,140, 17, 4, 1, 0, 0,137, 76, /* 0x aa0 */ + 36, 16,199, 68, 36, 48, 3, 0, 0, 0,235, 47, 41,198, 41,199, /* 0x ab0 */ +137,208,137,116, 36, 72,102,193,232, 5,199, 68, 36, 44, 16, 0, /* 0x ac0 */ + 0, 0,102, 41,194,199, 68, 36, 48, 8, 0, 0, 0,102,137, 81, /* 0x ad0 */ + 2,129,193, 4, 2, 0, 0,137, 76, 36, 16,139, 76, 36, 48,186, /* 0x ae0 */ + 1, 0, 0, 0,137, 76, 36, 40,141, 44, 18,139,116, 36, 16, 1, /* 0x af0 */ +238,129,124, 36, 72,255,255,255, 0,119, 24, 59, 92, 36, 76, 15, /* 0x b00 */ +132,209, 2, 0, 0,193,100, 36, 72, 8, 15,182, 3,193,231, 8, /* 0x b10 */ + 67, 9,199,139, 68, 36, 72,102,139, 22,193,232, 11, 15,183,202, /* 0x b20 */ + 15,175,193, 57,199,115, 24,137, 68, 36, 72,184, 0, 8, 0, 0, /* 0x b30 */ + 41,200,193,248, 5,141, 4, 2,137,234,102,137, 6,235, 21, 41, /* 0x b40 */ + 68, 36, 72, 41,199,137,208,102,193,232, 5,102, 41,194,102,137, /* 0x b50 */ + 22,141, 85, 1,139,116, 36, 40, 78,137,116, 36, 40,117,137,138, /* 0x b60 */ + 76, 36, 48,184, 1, 0, 0, 0,211,224, 41,194, 3, 84, 36, 44, /* 0x b70 */ +131,124, 36, 96, 3,137, 84, 36, 12, 15,143,231, 1, 0, 0,131, /* 0x b80 */ + 68, 36, 96, 7,131,250, 3,137,208,126, 5,184, 3, 0, 0, 0, /* 0x b90 */ +139,116, 36,120,193,224, 7,199, 68, 36, 36, 6, 0, 0, 0,141, /* 0x ba0 */ +132, 6, 96, 3, 0, 0,137, 68, 36, 8,184, 1, 0, 0, 0,141, /* 0x bb0 */ + 44, 0,139,116, 36, 8, 1,238,129,124, 36, 72,255,255,255, 0, /* 0x bc0 */ +119, 24, 59, 92, 36, 76, 15,132, 10, 2, 0, 0,193,100, 36, 72, /* 0x bd0 */ + 8, 15,182, 3,193,231, 8, 67, 9,199,139, 68, 36, 72,102,139, /* 0x be0 */ + 22,193,232, 11, 15,183,202, 15,175,193, 57,199,115, 24,137, 68, /* 0x bf0 */ + 36, 72,184, 0, 8, 0, 0, 41,200,193,248, 5,141, 4, 2,102, /* 0x c00 */ +137, 6,137,232,235, 21, 41, 68, 36, 72, 41,199,137,208,102,193, /* 0x c10 */ +232, 5,102, 41,194,141, 69, 1,102,137, 22,139,108, 36, 36, 77, /* 0x c20 */ +137,108, 36, 36,117,137,141, 80,192,131,250, 3,137, 20, 36, 15, /* 0x c30 */ +142, 39, 1, 0, 0,137,208,137,214,209,248,131,230, 1,141, 72, /* 0x c40 */ +255,131,206, 2,131,250, 13,137, 76, 36, 32,127, 28,139,108, 36, /* 0x c50 */ +120,211,230, 1,210,137, 52, 36,141, 68,117, 0, 41,208, 5, 94, /* 0x c60 */ + 5, 0, 0,137, 68, 36, 4,235, 86,141, 80,251,129,124, 36, 72, /* 0x c70 */ +255,255,255, 0,119, 24, 59, 92, 36, 76, 15,132, 86, 1, 0, 0, /* 0x c80 */ +193,100, 36, 72, 8, 15,182, 3,193,231, 8, 67, 9,199,209,108, /* 0x c90 */ + 36, 72, 1,246, 59,124, 36, 72,114, 7, 43,124, 36, 72,131,206, /* 0x ca0 */ + 1, 74,117,200,139, 68, 36,120,193,230, 4,137, 52, 36, 5, 68, /* 0x cb0 */ + 6, 0, 0,199, 68, 36, 32, 4, 0, 0, 0,137, 68, 36, 4,199, /* 0x cc0 */ + 68, 36, 28, 1, 0, 0, 0,184, 1, 0, 0, 0,139,108, 36, 4, /* 0x cd0 */ + 1,192,137, 68, 36, 24, 1,197,129,124, 36, 72,255,255,255, 0, /* 0x ce0 */ +119, 24, 59, 92, 36, 76, 15,132,234, 0, 0, 0,193,100, 36, 72, /* 0x cf0 */ + 8, 15,182, 3,193,231, 8, 67, 9,199,139, 68, 36, 72,102,139, /* 0x d00 */ + 85, 0,193,232, 11, 15,183,242, 15,175,198, 57,199,115, 27,137, /* 0x d10 */ + 68, 36, 72,184, 0, 8, 0, 0, 41,240,193,248, 5,141, 4, 2, /* 0x d20 */ +102,137, 69, 0,139, 68, 36, 24,235, 31, 41, 68, 36, 72, 41,199, /* 0x d30 */ +137,208,102,193,232, 5,102, 41,194,139, 68, 36, 24,102,137, 85, /* 0x d40 */ + 0,139, 84, 36, 28, 64, 9, 20, 36,139, 76, 36, 32,209,100, 36, /* 0x d50 */ + 28, 73,137, 76, 36, 32, 15,133,112,255,255,255,139, 52, 36, 70, /* 0x d60 */ +137,116, 36, 92,116, 89,139, 76, 36, 12,139,108, 36,116,131,193, /* 0x d70 */ + 2, 57,108, 36, 92,119, 95,139,132, 36,160, 0, 0, 0,137,234, /* 0x d80 */ + 43, 68, 36, 92, 3,148, 36,160, 0, 0, 0,141, 52, 40,138, 6, /* 0x d90 */ + 70,136, 68, 36,115,136, 2, 66,255, 68, 36,116, 73,116, 15,139, /* 0x da0 */ +172, 36,164, 0, 0, 0, 57,108, 36,116,114,226,235, 17,139,132, /* 0x db0 */ + 36,164, 0, 0, 0, 57, 68, 36,116, 15,130,187,246,255,255,129, /* 0x dc0 */ +124, 36, 72,255,255,255, 0,119, 21, 59, 92, 36, 76,184, 1, 0, /* 0x dd0 */ + 0, 0,116, 41,235, 7,184, 1, 0, 0, 0,235, 32, 67, 43,156, /* 0x de0 */ + 36,148, 0, 0, 0, 49,192,139,148, 36,156, 0, 0, 0,139, 76, /* 0x df0 */ + 36,116,137, 26,139,156, 36,168, 0, 0, 0,137, 11,131,196,124, /* 0x e00 */ + 91, 94, 95, 93, 85, 87, 86, 83,131,236,124,139,148, 36,144, 0, /* 0x e10 */ + 0, 0,199, 68, 36,116, 0, 0, 0, 0,198, 68, 36,115, 0,139, /* 0x e20 */ +172, 36,156, 0, 0, 0,141, 66, 4,137, 68, 36,120,184, 1, 0, /* 0x e30 */ + 0, 0, 15,182, 74, 2,137,195,211,227,137,217, 73,137, 76, 36, /* 0x e40 */ +108, 15,182, 74, 1,211,224, 72,137, 68, 36,104,139,132, 36,168, /* 0x e50 */ + 0, 0, 0, 15,182, 50,199, 69, 0, 0, 0, 0, 0,199, 68, 36, /* 0x e60 */ + 96, 0, 0, 0, 0,199, 0, 0, 0, 0, 0,184, 0, 3, 0, 0, /* 0x e70 */ +137,116, 36,100,199, 68, 36, 92, 1, 0, 0, 0,199, 68, 36, 88, /* 0x e80 */ + 1, 0, 0, 0,199, 68, 36, 84, 1, 0, 0, 0,199, 68, 36, 80, /* 0x e90 */ + 1, 0, 0, 0, 15,182, 74, 1, 1,241,211,224,141,136, 54, 7, /* 0x ea0 */ + 0, 0, 57, 76, 36,116,115, 14,139, 68, 36,120,102,199, 0, 0, /* 0x eb0 */ + 4,131,192, 2,226,246,139,156, 36,148, 0, 0, 0, 49,255,199, /* 0x ec0 */ + 68, 36, 72,255,255,255,255,137,218, 3,148, 36,152, 0, 0, 0, /* 0x ed0 */ +137, 84, 36, 76, 49,210, 59, 92, 36, 76, 15,132,124, 9, 0, 0, /* 0x ee0 */ + 15,182, 3,193,231, 8, 66, 67, 9,199,131,250, 4,126,231,139, /* 0x ef0 */ +140, 36,164, 0, 0, 0, 57, 76, 36,116, 15,131,100, 9, 0, 0, /* 0x f00 */ +139,116, 36,116, 35,116, 36,108,139, 68, 36, 96,139, 84, 36,120, /* 0x f10 */ +193,224, 4,137,116, 36, 68, 1,240,129,124, 36, 72,255,255,255, /* 0x f20 */ + 0,141, 44, 66,119, 24, 59, 92, 36, 76, 15,132, 44, 9, 0, 0, /* 0x f30 */ +193,100, 36, 72, 8, 15,182, 3,193,231, 8, 67, 9,199,139, 68, /* 0x f40 */ + 36, 72,102,139, 85, 0,193,232, 11, 15,183,202, 15,175,193, 57, /* 0x f50 */ +199, 15,131,221, 1, 0, 0,137, 68, 36, 72,184, 0, 8, 0, 0, /* 0x f60 */ + 41,200,138, 76, 36,100,193,248, 5,190, 1, 0, 0, 0,141, 4, /* 0x f70 */ + 2, 15,182, 84, 36,115,102,137, 69, 0,139, 68, 36,116, 35, 68, /* 0x f80 */ + 36,104,139,108, 36,120,211,224,185, 8, 0, 0, 0, 43, 76, 36, /* 0x f90 */ +100,211,250, 1,208,105,192, 0, 6, 0, 0,131,124, 36, 96, 6, /* 0x fa0 */ +141,132, 5,108, 14, 0, 0,137, 68, 36, 20, 15,142,202, 0, 0, /* 0x fb0 */ + 0,139, 68, 36,116, 43, 68, 36, 92,139,148, 36,160, 0, 0, 0, /* 0x fc0 */ + 15,182, 4, 2,137, 68, 36, 64,209,100, 36, 64,139, 76, 36, 64, /* 0x fd0 */ +141, 20, 54,139,108, 36, 20,129,225, 0, 1, 0, 0,129,124, 36, /* 0x fe0 */ + 72,255,255,255, 0,141, 68, 77, 0,137, 76, 36, 60,141, 44, 16, /* 0x ff0 */ +119, 24, 59, 92, 36, 76, 15,132, 96, 8, 0, 0,193,100, 36, 72, /* 0x1000 */ + 8, 15,182, 3,193,231, 8, 67, 9,199,139, 68, 36, 72,102,139, /* 0x1010 */ +141, 0, 2, 0, 0,193,232, 11, 15,183,241, 15,175,198, 57,199, /* 0x1020 */ +115, 35,137, 68, 36, 72,184, 0, 8, 0, 0, 41,240,137,214,193, /* 0x1030 */ +248, 5,131,124, 36, 60, 0,141, 4, 1,102,137,133, 0, 2, 0, /* 0x1040 */ + 0,116, 34,235, 46, 41, 68, 36, 72, 41,199,137,200,141,114, 1, /* 0x1050 */ +102,193,232, 5,102, 41,193,131,124, 36, 60, 0,102,137,141, 0, /* 0x1060 */ + 2, 0, 0,116, 14,129,254,255, 0, 0, 0, 15,142, 87,255,255, /* 0x1070 */ +255,235,121,129,254,255, 0, 0, 0,127,113,141, 20, 54,139,108, /* 0x1080 */ + 36, 20, 1,213,129,124, 36, 72,255,255,255, 0,119, 24, 59, 92, /* 0x1090 */ + 36, 76, 15,132,196, 7, 0, 0,193,100, 36, 72, 8, 15,182, 3, /* 0x10a0 */ +193,231, 8, 67, 9,199,139, 68, 36, 72,102,139, 77, 0,193,232, /* 0x10b0 */ + 11, 15,183,241, 15,175,198, 57,199,115, 25,137, 68, 36, 72,184, /* 0x10c0 */ + 0, 8, 0, 0, 41,240,137,214,193,248, 5,141, 4, 1,102,137, /* 0x10d0 */ + 69, 0,235,159, 41, 68, 36, 72, 41,199,137,200,141,114, 1,102, /* 0x10e0 */ +193,232, 5,102, 41,193,102,137, 77, 0,235,135,139, 84, 36,116, /* 0x10f0 */ +137,240,139,140, 36,160, 0, 0, 0,136, 68, 36,115,136, 4, 10, /* 0x1100 */ + 66,131,124, 36, 96, 3,137, 84, 36,116,127, 13,199, 68, 36, 96, /* 0x1110 */ + 0, 0, 0, 0,233, 27, 7, 0, 0,131,124, 36, 96, 9,127, 10, /* 0x1120 */ +131,108, 36, 96, 3,233, 10, 7, 0, 0,131,108, 36, 96, 6,233, /* 0x1130 */ + 0, 7, 0, 0,139, 76, 36, 72, 41,199,139,116, 36, 96, 41,193, /* 0x1140 */ +137,208,102,193,232, 5,102, 41,194,129,249,255,255,255, 0,102, /* 0x1150 */ +137, 85, 0,139,108, 36,120,141,116,117, 0,137,116, 36, 56,119, /* 0x1160 */ + 22, 59, 92, 36, 76, 15,132,241, 6, 0, 0, 15,182, 3,193,231, /* 0x1170 */ + 8,193,225, 8, 67, 9,199,139,108, 36, 56,137,200,193,232, 11, /* 0x1180 */ +102,139,149,128, 1, 0, 0, 15,183,234, 15,175,197, 57,199,115, /* 0x1190 */ + 82,137,198,184, 0, 8, 0, 0, 41,232,139,108, 36, 88,193,248, /* 0x11a0 */ + 5,139, 76, 36, 84,141, 4, 2,139, 84, 36, 56,137, 76, 36, 80, /* 0x11b0 */ +139, 76, 36,120,102,137,130,128, 1, 0, 0,139, 68, 36, 92,137, /* 0x11c0 */ +108, 36, 84,137, 68, 36, 88, 49,192,131,124, 36, 96, 6, 15,159, /* 0x11d0 */ +192,129,193,100, 6, 0, 0,141, 4, 64,137, 68, 36, 96,233,116, /* 0x11e0 */ + 2, 0, 0,137,206, 41,199, 41,198,137,208,102,193,232, 5,139, /* 0x11f0 */ + 76, 36, 56,102, 41,194,129,254,255,255,255, 0,102,137,145,128, /* 0x1200 */ + 1, 0, 0,119, 22, 59, 92, 36, 76, 15,132, 77, 6, 0, 0, 15, /* 0x1210 */ +182, 3,193,231, 8,193,230, 8, 67, 9,199,139,108, 36, 56,137, /* 0x1220 */ +242,193,234, 11,102,139,141,152, 1, 0, 0, 15,183,193, 15,175, /* 0x1230 */ +208, 57,215, 15,131,227, 0, 0, 0,189, 0, 8, 0, 0,137,214, /* 0x1240 */ + 41,197,199, 68, 36, 52, 0, 8, 0, 0,137,232,193,248, 5,141, /* 0x1250 */ + 4, 1,139, 76, 36, 56,102,137,129,152, 1, 0, 0,139, 68, 36, /* 0x1260 */ + 96,139, 76, 36, 68,193,224, 5, 3, 68, 36,120,129,250,255,255, /* 0x1270 */ +255, 0,141, 44, 72,119, 22, 59, 92, 36, 76, 15,132,219, 5, 0, /* 0x1280 */ + 0, 15,182, 3,193,231, 8,193,230, 8, 67, 9,199,102,139,149, /* 0x1290 */ +224, 1, 0, 0,137,240,193,232, 11, 15,183,202, 15,175,193, 57, /* 0x12a0 */ +199,115, 96, 41, 76, 36, 52,193,124, 36, 52, 5,139,116, 36, 52, /* 0x12b0 */ +137, 68, 36, 72,131,124, 36,116, 0,141, 4, 50,102,137,133,224, /* 0x12c0 */ + 1, 0, 0, 15,132,147, 5, 0, 0, 49,192,131,124, 36, 96, 6, /* 0x12d0 */ +139,172, 36,160, 0, 0, 0,139, 84, 36,116, 15,159,192,141, 68, /* 0x12e0 */ + 0, 9,137, 68, 36, 96,139, 68, 36,116, 43, 68, 36, 92,138, 68, /* 0x12f0 */ + 5, 0,136, 68, 36,115,136, 4, 42, 66,137, 84, 36,116,233, 49, /* 0x1300 */ + 5, 0, 0, 41,198, 41,199,137,208,102,193,232, 5,102, 41,194, /* 0x1310 */ +102,137,149,224, 1, 0, 0,233, 31, 1, 0, 0,137,200, 41,214, /* 0x1320 */ +102,193,232, 5,139,108, 36, 56,102, 41,193, 41,215,129,254,255, /* 0x1330 */ +255,255, 0,102,137,141,152, 1, 0, 0,119, 22, 59, 92, 36, 76, /* 0x1340 */ + 15,132, 22, 5, 0, 0, 15,182, 3,193,231, 8,193,230, 8, 67, /* 0x1350 */ + 9,199,139, 76, 36, 56,137,240,193,232, 11,102,139,145,176, 1, /* 0x1360 */ + 0, 0, 15,183,202, 15,175,193, 57,199,115, 35,137,198,184, 0, /* 0x1370 */ + 8, 0, 0, 41,200,139,108, 36, 56,193,248, 5,141, 4, 2,102, /* 0x1380 */ +137,133,176, 1, 0, 0,139, 68, 36, 88,233,160, 0, 0, 0,137, /* 0x1390 */ +241, 41,199, 41,193,137,208,102,193,232, 5,102, 41,194,139, 68, /* 0x13a0 */ + 36, 56,129,249,255,255,255, 0,102,137,144,176, 1, 0, 0,119, /* 0x13b0 */ + 22, 59, 92, 36, 76, 15,132,161, 4, 0, 0, 15,182, 3,193,231, /* 0x13c0 */ + 8,193,225, 8, 67, 9,199,139,116, 36, 56,137,200,193,232, 11, /* 0x13d0 */ +102,139,150,200, 1, 0, 0, 15,183,234, 15,175,197, 57,199,115, /* 0x13e0 */ + 32,137,198,184, 0, 8, 0, 0, 41,232,139,108, 36, 56,193,248, /* 0x13f0 */ + 5,141, 4, 2,102,137,133,200, 1, 0, 0,139, 68, 36, 84,235, /* 0x1400 */ + 38,137,206, 41,199, 41,198,137,208,102,193,232, 5,102, 41,194, /* 0x1410 */ +139, 68, 36, 56,102,137,144,200, 1, 0, 0,139, 84, 36, 84,139, /* 0x1420 */ + 68, 36, 80,137, 84, 36, 80,139, 76, 36, 88,137, 76, 36, 84,139, /* 0x1430 */ +108, 36, 92,137, 68, 36, 92,137,108, 36, 88, 49,192,131,124, 36, /* 0x1440 */ + 96, 6,139, 76, 36,120, 15,159,192,129,193,104, 10, 0, 0,141, /* 0x1450 */ + 68, 64, 8,137, 68, 36, 96,129,254,255,255,255, 0,119, 22, 59, /* 0x1460 */ + 92, 36, 76, 15,132,243, 3, 0, 0, 15,182, 3,193,231, 8,193, /* 0x1470 */ +230, 8, 67, 9,199,102,139, 17,137,240,193,232, 11, 15,183,234, /* 0x1480 */ + 15,175,197, 57,199,115, 47,137, 68, 36, 72,184, 0, 8, 0, 0, /* 0x1490 */ + 41,232,193,100, 36, 68, 4,193,248, 5,199, 68, 36, 44, 0, 0, /* 0x14a0 */ + 0, 0,141, 4, 2,102,137, 1,139, 68, 36, 68,141, 76, 1, 4, /* 0x14b0 */ +137, 76, 36, 16,235,114, 41,198, 41,199,137,208,102,193,232, 5, /* 0x14c0 */ +102, 41,194,129,254,255,255,255, 0,102,137, 17,119, 22, 59, 92, /* 0x14d0 */ + 36, 76, 15,132,132, 3, 0, 0, 15,182, 3,193,231, 8,193,230, /* 0x14e0 */ + 8, 67, 9,199,102,139, 81, 2,137,240,193,232, 11, 15,183,234, /* 0x14f0 */ + 15,175,197, 57,199,115, 59,137, 68, 36, 72,184, 0, 8, 0, 0, /* 0x1500 */ + 41,232,193,100, 36, 68, 4,193,248, 5,199, 68, 36, 44, 8, 0, /* 0x1510 */ + 0, 0,141, 4, 2,139, 84, 36, 68,102,137, 65, 2,141,140, 17, /* 0x1520 */ + 4, 1, 0, 0,137, 76, 36, 16,199, 68, 36, 48, 3, 0, 0, 0, /* 0x1530 */ +235, 47, 41,198, 41,199,137,208,137,116, 36, 72,102,193,232, 5, /* 0x1540 */ +199, 68, 36, 44, 16, 0, 0, 0,102, 41,194,199, 68, 36, 48, 8, /* 0x1550 */ + 0, 0, 0,102,137, 81, 2,129,193, 4, 2, 0, 0,137, 76, 36, /* 0x1560 */ + 16,139, 76, 36, 48,186, 1, 0, 0, 0,137, 76, 36, 40,141, 44, /* 0x1570 */ + 18,139,116, 36, 16, 1,238,129,124, 36, 72,255,255,255, 0,119, /* 0x1580 */ + 24, 59, 92, 36, 76, 15,132,209, 2, 0, 0,193,100, 36, 72, 8, /* 0x1590 */ + 15,182, 3,193,231, 8, 67, 9,199,139, 68, 36, 72,102,139, 22, /* 0x15a0 */ +193,232, 11, 15,183,202, 15,175,193, 57,199,115, 24,137, 68, 36, /* 0x15b0 */ + 72,184, 0, 8, 0, 0, 41,200,193,248, 5,141, 4, 2,137,234, /* 0x15c0 */ +102,137, 6,235, 21, 41, 68, 36, 72, 41,199,137,208,102,193,232, /* 0x15d0 */ + 5,102, 41,194,102,137, 22,141, 85, 1,139,116, 36, 40, 78,137, /* 0x15e0 */ +116, 36, 40,117,137,138, 76, 36, 48,184, 1, 0, 0, 0,211,224, /* 0x15f0 */ + 41,194, 3, 84, 36, 44,131,124, 36, 96, 3,137, 84, 36, 12, 15, /* 0x1600 */ +143,231, 1, 0, 0,131, 68, 36, 96, 7,131,250, 3,137,208,126, /* 0x1610 */ + 5,184, 3, 0, 0, 0,139,116, 36,120,193,224, 7,199, 68, 36, /* 0x1620 */ + 36, 6, 0, 0, 0,141,132, 6, 96, 3, 0, 0,137, 68, 36, 8, /* 0x1630 */ +184, 1, 0, 0, 0,141, 44, 0,139,116, 36, 8, 1,238,129,124, /* 0x1640 */ + 36, 72,255,255,255, 0,119, 24, 59, 92, 36, 76, 15,132, 10, 2, /* 0x1650 */ + 0, 0,193,100, 36, 72, 8, 15,182, 3,193,231, 8, 67, 9,199, /* 0x1660 */ +139, 68, 36, 72,102,139, 22,193,232, 11, 15,183,202, 15,175,193, /* 0x1670 */ + 57,199,115, 24,137, 68, 36, 72,184, 0, 8, 0, 0, 41,200,193, /* 0x1680 */ +248, 5,141, 4, 2,102,137, 6,137,232,235, 21, 41, 68, 36, 72, /* 0x1690 */ + 41,199,137,208,102,193,232, 5,102, 41,194,141, 69, 1,102,137, /* 0x16a0 */ + 22,139,108, 36, 36, 77,137,108, 36, 36,117,137,141, 80,192,131, /* 0x16b0 */ +250, 3,137, 20, 36, 15,142, 39, 1, 0, 0,137,208,137,214,209, /* 0x16c0 */ +248,131,230, 1,141, 72,255,131,206, 2,131,250, 13,137, 76, 36, /* 0x16d0 */ + 32,127, 28,139,108, 36,120,211,230, 1,210,137, 52, 36,141, 68, /* 0x16e0 */ +117, 0, 41,208, 5, 94, 5, 0, 0,137, 68, 36, 4,235, 86,141, /* 0x16f0 */ + 80,251,129,124, 36, 72,255,255,255, 0,119, 24, 59, 92, 36, 76, /* 0x1700 */ + 15,132, 86, 1, 0, 0,193,100, 36, 72, 8, 15,182, 3,193,231, /* 0x1710 */ + 8, 67, 9,199,209,108, 36, 72, 1,246, 59,124, 36, 72,114, 7, /* 0x1720 */ + 43,124, 36, 72,131,206, 1, 74,117,200,139, 68, 36,120,193,230, /* 0x1730 */ + 4,137, 52, 36, 5, 68, 6, 0, 0,199, 68, 36, 32, 4, 0, 0, /* 0x1740 */ + 0,137, 68, 36, 4,199, 68, 36, 28, 1, 0, 0, 0,184, 1, 0, /* 0x1750 */ + 0, 0,139,108, 36, 4, 1,192,137, 68, 36, 24, 1,197,129,124, /* 0x1760 */ + 36, 72,255,255,255, 0,119, 24, 59, 92, 36, 76, 15,132,234, 0, /* 0x1770 */ + 0, 0,193,100, 36, 72, 8, 15,182, 3,193,231, 8, 67, 9,199, /* 0x1780 */ +139, 68, 36, 72,102,139, 85, 0,193,232, 11, 15,183,242, 15,175, /* 0x1790 */ +198, 57,199,115, 27,137, 68, 36, 72,184, 0, 8, 0, 0, 41,240, /* 0x17a0 */ +193,248, 5,141, 4, 2,102,137, 69, 0,139, 68, 36, 24,235, 31, /* 0x17b0 */ + 41, 68, 36, 72, 41,199,137,208,102,193,232, 5,102, 41,194,139, /* 0x17c0 */ + 68, 36, 24,102,137, 85, 0,139, 84, 36, 28, 64, 9, 20, 36,139, /* 0x17d0 */ + 76, 36, 32,209,100, 36, 28, 73,137, 76, 36, 32, 15,133,112,255, /* 0x17e0 */ +255,255,139, 52, 36, 70,137,116, 36, 92,116, 89,139, 76, 36, 12, /* 0x17f0 */ +139,108, 36,116,131,193, 2, 57,108, 36, 92,119, 95,139,132, 36, /* 0x1800 */ +160, 0, 0, 0,137,234, 43, 68, 36, 92, 3,148, 36,160, 0, 0, /* 0x1810 */ + 0,141, 52, 40,138, 6, 70,136, 68, 36,115,136, 2, 66,255, 68, /* 0x1820 */ + 36,116, 73,116, 15,139,172, 36,164, 0, 0, 0, 57,108, 36,116, /* 0x1830 */ +114,226,235, 17,139,132, 36,164, 0, 0, 0, 57, 68, 36,116, 15, /* 0x1840 */ +130,187,246,255,255,129,124, 36, 72,255,255,255, 0,119, 21, 59, /* 0x1850 */ + 92, 36, 76,184, 1, 0, 0, 0,116, 41,235, 7,184, 1, 0, 0, /* 0x1860 */ + 0,235, 32, 67, 43,156, 36,148, 0, 0, 0, 49,192,139,148, 36, /* 0x1870 */ +156, 0, 0, 0,139, 76, 36,116,137, 26,139,156, 36,168, 0, 0, /* 0x1880 */ + 0,137, 11,131,196,124, 91, 94, 95, 93, 3,115,252, 3,123,248, /* 0x1890 */ + 49,192,141,140, 36, 0,255,255,255,137,236, 80, 57,204,117,251, /* 0x18a0 */ +137,236, 49,201,185, 84, 69, 88, 76,138, 7, 71, 44,232, 60, 1, /* 0x18b0 */ +119,247,128, 63, 63,117, 0,139, 7,138, 95, 4,102,193,232, 8, /* 0x18c0 */ +134,196,193,192, 16,134,196, 41,248,128,235,232,137, 7,131,199, /* 0x18d0 */ + 5,136,216,226, 0,185, 84, 69, 88, 76,176,232,176,233,242,174, /* 0x18e0 */ +117, 0,128, 63, 63,117, 0,139, 7,102,193,232, 8,134,196,193, /* 0x18f0 */ +192, 16,134,196, 41,248,171,235, 0,139, 84, 36, 40, 3, 84, 36, /* 0x1900 */ + 44, 57,214,116, 1, 72, 43,124, 36, 48,139, 84, 36, 52,137, 58, /* 0x1910 */ + 90,137, 68, 36, 28, 97,195,235, 0, 90, 88, 89,151, 96, 49,219, /* 0x1920 */ +187, 78, 77, 82, 85,106, 15, 88,138,100, 36, 32,106, 15, 91,138, /* 0x1930 */ +124, 36, 32,138, 84, 36, 32,233, 0, 0, 0, 0, 15,183, 47, 43, /* 0x1940 */ +110, 12, 41,221,117, 0,131,237, 1,115, 0,136, 95,255, 73,136, /* 0x1950 */ + 7, 71,139, 7,156,102,193,232, 8,193,192, 16,134,196,157,115, /* 0x1960 */ + 0,176, 0, 15,200,115, 0,209,232,115, 0,254,203, 75, 35, 30, /* 0x1970 */ +125, 2, 3, 30,137, 4,156,235, 0,141, 20, 24, 15,182,210, 35, /* 0x1980 */ + 22, 59, 22,114, 2, 43, 22,139, 4,148,254,203, 75, 35, 30,125, /* 0x1990 */ + 2, 3, 30,139, 44,156,133,237,117, 0, 80,139, 70, 4,254,200, /* 0x19a0 */ + 72, 35, 6,125, 2, 3, 6, 49,237,137, 70, 4,135,108,132, 4, /* 0x19b0 */ + 88,137, 44,148,137, 4,156, 41,248,131,233, 4, 3, 70, 16, 1, /* 0x19c0 */ +240,137, 7,131,199, 4,235, 0,235, 0, 80,176,233,176,232, 80, /* 0x19d0 */ +106, 0, 83,137,230, 94,137,218,178,233,178,232, 67,106, 0,254, /* 0x19e0 */ +203, 75,117, 0, 15,183, 7,131,199, 1, 60,128,114, 4, 60,143, /* 0x19f0 */ +118, 0, 41,208, 43, 70, 8,131,232, 2,116, 0,131,232, 1,114, /* 0x1a00 */ + 0,115, 0,122, 0,123, 0,248,235, 0,131,233, 1,127, 0,137, /* 0x1a10 */ +231,185, 4, 1, 0, 0,139, 14,131,193, 5,139, 14,131,193, 4, /* 0x1a20 */ + 49,192,243,171,137,252, 86, 97,151, 81, 80, 82,195,137,254,235, /* 0x1a30 */ + 0,138, 7,131,199, 1, 60,128,114, 10, 60,143,119, 6,128,127, /* 0x1a40 */ +254, 15,116, 0, 44,232, 60, 1,119, 0, 56, 23,117, 0,139, 7, /* 0x1a50 */ +102,193,232, 8,193,192, 16,134,196, 41,248, 1,240,137, 7,131, /* 0x1a60 */ +199, 4,131,233, 4,138, 7,131,199, 1,226, 0,131,233, 1,127, /* 0x1a70 */ + 0, 97,195,106, 29,232, 29, 0, 0, 0, 80, 82, 79, 84, 95, 69, /* 0x1a80 */ + 88, 69, 67,124, 80, 82, 79, 84, 95, 87, 82, 73, 84, 69, 32,102, /* 0x1a90 */ + 97,105,108,101,100, 46, 10,106, 2, 80,106, 4, 88,205,128,106, /* 0x1aa0 */ +127, 80,106, 1, 88,205,128, 94,141, 69,247, 43, 0,137,194, 3, /* 0x1ab0 */ + 64, 72, 5,255, 15, 0, 0, 37, 0,240,255,255, 80, 49,201, 81, /* 0x1ac0 */ +106,255,104, 18, 16, 0, 0,181, 16,106, 7, 81, 80, 49,192, 80, /* 0x1ad0 */ +176,197, 80, 80,176,198,205,128,114,153,146,147,252,173, 80,137, /* 0x1ae0 */ +225, 80, 81, 82,173, 80,173,137, 68, 36, 12, 86,255,213,131,196, /* 0x1af0 */ + 60,195, 93,232,175,255,255,255, 76, 69, 88, 69, 67, 48, 48, 48, /* 0x1b00 */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 76, 69, 88, /* 0x1b10 */ + 69, 67, 48, 50, 48, 0,127, 0, 0, 0, 76, 69, 88, 69, 67, 48, /* 0x1b20 */ + 48, 57, 0, 5, 0, 0, 0, 76, 69, 88, 69, 67, 48, 49, 48, 0, /* 0x1b30 */ + 5, 0, 0, 0, 78, 50, 66, 83, 77, 65, 49, 48, 0, 19, 0, 0, /* 0x1b40 */ + 0, 0, 0, 0, 0, 21, 0, 0, 0, 78, 50, 66, 68, 69, 67, 49, /* 0x1b50 */ + 48, 0, 4, 0, 0, 0, 78, 50, 66, 70, 65, 83, 49, 48, 0, 22, /* 0x1b60 */ + 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 78, 50, 66, 68, 69, /* 0x1b70 */ + 67, 49, 48, 0, 4, 0, 0, 0, 78, 50, 66, 70, 65, 83, 49, 49, /* 0x1b80 */ + 0, 24, 0, 0, 0, 78, 50, 66, 68, 69, 67, 49, 48, 0, 30, 0, /* 0x1b90 */ + 0, 0, 78, 50, 66, 83, 77, 65, 50, 48, 0, 41, 0, 0, 0, 0, /* 0x1ba0 */ + 0, 0, 0, 43, 0, 0, 0, 78, 50, 66, 83, 77, 65, 49, 48, 0, /* 0x1bb0 */ + 2, 0, 0, 0, 78, 50, 66, 70, 65, 83, 50, 48, 0, 46, 0, 0, /* 0x1bc0 */ + 0, 0, 0, 0, 0, 50, 0, 0, 0, 78, 50, 66, 70, 65, 83, 49, /* 0x1bd0 */ + 49, 0, 0, 0, 0, 0, 78, 50, 66, 68, 69, 67, 50, 48, 0, 55, /* 0x1be0 */ + 0, 0, 0, 78, 50, 66, 83, 77, 65, 51, 48, 0, 68, 0, 0, 0, /* 0x1bf0 */ + 0, 0, 0, 0, 81, 0, 0, 0, 78, 50, 66, 68, 69, 67, 50, 48, /* 0x1c00 */ + 0, 0, 0, 0, 0, 78, 50, 66, 70, 65, 83, 51, 48, 0, 81, 0, /* 0x1c10 */ + 0, 0, 0, 0, 0, 0, 85, 0, 0, 0, 78, 50, 66, 68, 69, 67, /* 0x1c20 */ + 50, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, 0, 0, 0, 78, /* 0x1c30 */ + 50, 66, 68, 69, 67, 50, 48, 0, 0, 0, 0, 0, 78, 50, 66, 68, /* 0x1c40 */ + 69, 67, 51, 48, 0, 96, 0, 0, 0, 0, 0, 0, 0,114, 0, 0, /* 0x1c50 */ + 0, 78, 50, 66, 68, 69, 67, 54, 48, 0, 0, 0, 0, 0, 0, 0, /* 0x1c60 */ + 0, 0,144, 0, 0, 0, 78, 50, 66, 68, 69, 67, 53, 48, 0, 0, /* 0x1c70 */ + 0, 0, 0, 78, 50, 66, 83, 77, 65, 52, 48, 0,158, 0, 0, 0, /* 0x1c80 */ + 0, 0, 0, 0,171, 0, 0, 0, 78, 50, 66, 68, 69, 67, 51, 48, /* 0x1c90 */ + 0, 49, 0, 0, 0, 78, 50, 66, 70, 65, 83, 52, 48, 0,171, 0, /* 0x1ca0 */ + 0, 0, 0, 0, 0, 0,175, 0, 0, 0, 78, 50, 66, 68, 69, 67, /* 0x1cb0 */ + 51, 48, 0, 49, 0, 0, 0, 0, 0, 0, 0,186, 0, 0, 0, 78, /* 0x1cc0 */ + 50, 66, 68, 69, 67, 51, 48, 0, 49, 0, 0, 0, 78, 50, 66, 68, /* 0x1cd0 */ + 85, 77, 77, 49, 0,186, 0, 0, 0, 78, 50, 66, 83, 77, 65, 53, /* 0x1ce0 */ + 48, 0,186, 0, 0, 0, 78, 50, 66, 70, 65, 83, 53, 48, 0,188, /* 0x1cf0 */ + 0, 0, 0, 78, 50, 66, 68, 69, 67, 53, 48, 0,191, 0, 0, 0, /* 0x1d00 */ + 78, 50, 66, 83, 77, 65, 54, 48, 0,200, 0, 0, 0, 0, 0, 0, /* 0x1d10 */ + 0,212, 0, 0, 0, 78, 50, 66, 68, 69, 67, 49, 48, 0, 0, 0, /* 0x1d20 */ + 0, 0, 78, 50, 66, 70, 65, 83, 54, 48, 0,212, 0, 0, 0, 0, /* 0x1d30 */ + 0, 0, 0,223, 0, 0, 0, 78, 50, 66, 70, 65, 83, 54, 49, 0, /* 0x1d40 */ + 0, 0, 0, 0, 0, 0, 0, 0,237, 0, 0, 0, 78, 50, 66, 68, /* 0x1d50 */ + 69, 67, 49, 48, 0, 0, 0, 0, 0, 78, 50, 66, 70, 65, 83, 54, /* 0x1d60 */ + 49, 0,237, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0, 0, 78, 50, /* 0x1d70 */ + 66, 68, 69, 67, 49, 48, 0, 0, 0, 0, 0, 78, 50, 66, 68, 69, /* 0x1d80 */ + 67, 54, 48, 0, 3, 1, 0, 0, 78, 82, 86, 50, 66, 69, 78, 68, /* 0x1d90 */ + 0, 3, 1, 0, 0, 78, 50, 68, 83, 77, 65, 49, 48, 0, 3, 1, /* 0x1da0 */ + 0, 0, 0, 0, 0, 0, 5, 1, 0, 0, 78, 50, 68, 68, 69, 67, /* 0x1db0 */ + 49, 48, 0, 4, 0, 0, 0, 78, 50, 68, 70, 65, 83, 49, 48, 0, /* 0x1dc0 */ + 6, 1, 0, 0, 0, 0, 0, 0, 8, 1, 0, 0, 78, 50, 68, 68, /* 0x1dd0 */ + 69, 67, 49, 48, 0, 4, 0, 0, 0, 78, 50, 68, 70, 65, 83, 49, /* 0x1de0 */ + 49, 0, 8, 1, 0, 0, 78, 50, 68, 68, 69, 67, 49, 48, 0, 14, /* 0x1df0 */ + 1, 0, 0, 78, 50, 68, 83, 77, 65, 50, 48, 0, 25, 1, 0, 0, /* 0x1e00 */ + 0, 0, 0, 0, 27, 1, 0, 0, 78, 50, 68, 83, 77, 65, 49, 48, /* 0x1e10 */ + 0, 2, 0, 0, 0, 78, 50, 68, 70, 65, 83, 50, 48, 0, 30, 1, /* 0x1e20 */ + 0, 0, 0, 0, 0, 0, 34, 1, 0, 0, 78, 50, 68, 70, 65, 83, /* 0x1e30 */ + 49, 49, 0, 0, 0, 0, 0, 78, 50, 68, 68, 69, 67, 50, 48, 0, /* 0x1e40 */ + 39, 1, 0, 0, 78, 50, 68, 83, 77, 65, 51, 48, 0, 52, 1, 0, /* 0x1e50 */ + 0, 0, 0, 0, 0, 65, 1, 0, 0, 78, 50, 68, 68, 69, 67, 51, /* 0x1e60 */ + 48, 0, 16, 0, 0, 0, 78, 50, 68, 70, 65, 83, 51, 48, 0, 65, /* 0x1e70 */ + 1, 0, 0, 0, 0, 0, 0, 71, 1, 0, 0, 78, 50, 68, 68, 69, /* 0x1e80 */ + 67, 51, 48, 0, 16, 0, 0, 0, 0, 0, 0, 0, 80, 1, 0, 0, /* 0x1e90 */ + 78, 50, 68, 68, 69, 67, 51, 48, 0, 16, 0, 0, 0, 78, 50, 68, /* 0x1ea0 */ + 68, 69, 67, 51, 48, 0, 80, 1, 0, 0, 0, 0, 0, 0, 96, 1, /* 0x1eb0 */ + 0, 0, 78, 50, 68, 68, 69, 67, 50, 48, 0, 0, 0, 0, 0, 0, /* 0x1ec0 */ + 0, 0, 0,114, 1, 0, 0, 78, 50, 68, 68, 69, 67, 54, 48, 0, /* 0x1ed0 */ + 0, 0, 0, 0, 0, 0, 0, 0,148, 1, 0, 0, 78, 50, 68, 68, /* 0x1ee0 */ + 69, 67, 53, 48, 0, 0, 0, 0, 0, 78, 50, 68, 83, 77, 65, 52, /* 0x1ef0 */ + 48, 0,162, 1, 0, 0, 0, 0, 0, 0,175, 1, 0, 0, 78, 50, /* 0x1f00 */ + 68, 68, 69, 67, 51, 48, 0, 69, 0, 0, 0, 78, 50, 68, 70, 65, /* 0x1f10 */ + 83, 52, 48, 0,175, 1, 0, 0, 0, 0, 0, 0,179, 1, 0, 0, /* 0x1f20 */ + 78, 50, 68, 68, 69, 67, 51, 48, 0, 69, 0, 0, 0, 0, 0, 0, /* 0x1f30 */ + 0,190, 1, 0, 0, 78, 50, 68, 68, 69, 67, 51, 48, 0, 69, 0, /* 0x1f40 */ + 0, 0, 78, 50, 68, 68, 85, 77, 77, 49, 0,190, 1, 0, 0, 78, /* 0x1f50 */ + 50, 68, 83, 77, 65, 53, 48, 0,190, 1, 0, 0, 78, 50, 68, 70, /* 0x1f60 */ + 65, 83, 53, 48, 0,192, 1, 0, 0, 78, 50, 68, 68, 69, 67, 53, /* 0x1f70 */ + 48, 0,195, 1, 0, 0, 78, 50, 68, 83, 77, 65, 54, 48, 0,204, /* 0x1f80 */ + 1, 0, 0, 0, 0, 0, 0,216, 1, 0, 0, 78, 50, 68, 68, 69, /* 0x1f90 */ + 67, 49, 48, 0, 0, 0, 0, 0, 78, 50, 68, 70, 65, 83, 54, 48, /* 0x1fa0 */ + 0,216, 1, 0, 0, 0, 0, 0, 0,227, 1, 0, 0, 78, 50, 68, /* 0x1fb0 */ + 70, 65, 83, 54, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0,241, 1, /* 0x1fc0 */ + 0, 0, 78, 50, 68, 68, 69, 67, 49, 48, 0, 0, 0, 0, 0, 78, /* 0x1fd0 */ + 50, 68, 70, 65, 83, 54, 49, 0,241, 1, 0, 0, 0, 0, 0, 0, /* 0x1fe0 */ + 7, 2, 0, 0, 78, 50, 68, 68, 69, 67, 49, 48, 0, 0, 0, 0, /* 0x1ff0 */ + 0, 78, 50, 68, 68, 69, 67, 54, 48, 0, 7, 2, 0, 0, 78, 82, /* 0x2000 */ + 86, 50, 68, 69, 78, 68, 0, 7, 2, 0, 0, 78, 50, 69, 83, 77, /* 0x2010 */ + 65, 49, 48, 0, 7, 2, 0, 0, 0, 0, 0, 0, 9, 2, 0, 0, /* 0x2020 */ + 78, 50, 69, 68, 69, 67, 49, 48, 0, 4, 0, 0, 0, 78, 50, 69, /* 0x2030 */ + 70, 65, 83, 49, 48, 0, 10, 2, 0, 0, 0, 0, 0, 0, 12, 2, /* 0x2040 */ + 0, 0, 78, 50, 69, 68, 69, 67, 49, 48, 0, 4, 0, 0, 0, 78, /* 0x2050 */ + 50, 69, 70, 65, 83, 49, 49, 0, 12, 2, 0, 0, 78, 50, 69, 68, /* 0x2060 */ + 69, 67, 49, 48, 0, 18, 2, 0, 0, 78, 50, 69, 83, 77, 65, 50, /* 0x2070 */ + 48, 0, 29, 2, 0, 0, 0, 0, 0, 0, 31, 2, 0, 0, 78, 50, /* 0x2080 */ + 69, 83, 77, 65, 49, 48, 0, 2, 0, 0, 0, 78, 50, 69, 70, 65, /* 0x2090 */ + 83, 50, 48, 0, 34, 2, 0, 0, 0, 0, 0, 0, 38, 2, 0, 0, /* 0x20a0 */ + 78, 50, 69, 70, 65, 83, 49, 49, 0, 0, 0, 0, 0, 78, 50, 69, /* 0x20b0 */ + 68, 69, 67, 50, 48, 0, 43, 2, 0, 0, 78, 50, 69, 83, 77, 65, /* 0x20c0 */ + 51, 48, 0, 56, 2, 0, 0, 0, 0, 0, 0, 69, 2, 0, 0, 78, /* 0x20d0 */ + 50, 69, 68, 69, 67, 51, 48, 0, 31, 0, 0, 0, 78, 50, 69, 70, /* 0x20e0 */ + 65, 83, 51, 48, 0, 69, 2, 0, 0, 0, 0, 0, 0, 75, 2, 0, /* 0x20f0 */ + 0, 78, 50, 69, 68, 69, 67, 51, 48, 0, 31, 0, 0, 0, 0, 0, /* 0x2100 */ + 0, 0, 84, 2, 0, 0, 78, 50, 69, 68, 69, 67, 51, 48, 0, 31, /* 0x2110 */ + 0, 0, 0, 78, 50, 69, 68, 69, 67, 51, 48, 0, 84, 2, 0, 0, /* 0x2120 */ + 0, 0, 0, 0,100, 2, 0, 0, 78, 50, 69, 68, 69, 67, 50, 48, /* 0x2130 */ + 0, 0, 0, 0, 0, 0, 0, 0, 0,115, 2, 0, 0, 78, 50, 69, /* 0x2140 */ + 68, 69, 67, 53, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,133, 2, /* 0x2150 */ + 0, 0, 78, 50, 69, 68, 69, 67, 54, 48, 0, 0, 0, 0, 0, 78, /* 0x2160 */ + 50, 69, 83, 77, 65, 52, 48, 0,179, 2, 0, 0, 0, 0, 0, 0, /* 0x2170 */ +192, 2, 0, 0, 78, 50, 69, 68, 69, 67, 51, 48, 0, 82, 0, 0, /* 0x2180 */ + 0, 78, 50, 69, 70, 65, 83, 52, 48, 0,192, 2, 0, 0, 0, 0, /* 0x2190 */ + 0, 0,196, 2, 0, 0, 78, 50, 69, 68, 69, 67, 51, 48, 0, 82, /* 0x21a0 */ + 0, 0, 0, 0, 0, 0, 0,207, 2, 0, 0, 78, 50, 69, 68, 69, /* 0x21b0 */ + 67, 51, 48, 0, 82, 0, 0, 0, 78, 50, 69, 68, 85, 77, 77, 49, /* 0x21c0 */ + 0,207, 2, 0, 0, 78, 50, 69, 83, 77, 65, 53, 48, 0,207, 2, /* 0x21d0 */ + 0, 0, 78, 50, 69, 70, 65, 83, 53, 48, 0,209, 2, 0, 0, 78, /* 0x21e0 */ + 50, 69, 68, 69, 67, 53, 48, 0,212, 2, 0, 0, 78, 50, 69, 83, /* 0x21f0 */ + 77, 65, 54, 48, 0,221, 2, 0, 0, 0, 0, 0, 0,233, 2, 0, /* 0x2200 */ + 0, 78, 50, 69, 68, 69, 67, 49, 48, 0, 0, 0, 0, 0, 78, 50, /* 0x2210 */ + 69, 70, 65, 83, 54, 48, 0,233, 2, 0, 0, 0, 0, 0, 0,244, /* 0x2220 */ + 2, 0, 0, 78, 50, 69, 70, 65, 83, 54, 49, 0, 0, 0, 0, 0, /* 0x2230 */ + 0, 0, 0, 0, 2, 3, 0, 0, 78, 50, 69, 68, 69, 67, 49, 48, /* 0x2240 */ + 0, 0, 0, 0, 0, 78, 50, 69, 70, 65, 83, 54, 49, 0, 2, 3, /* 0x2250 */ + 0, 0, 0, 0, 0, 0, 24, 3, 0, 0, 78, 50, 69, 68, 69, 67, /* 0x2260 */ + 49, 48, 0, 0, 0, 0, 0, 78, 50, 69, 68, 69, 67, 54, 48, 0, /* 0x2270 */ + 24, 3, 0, 0, 78, 82, 86, 50, 69, 69, 78, 68, 0, 24, 3, 0, /* 0x2280 */ + 0, 76, 90, 77, 65, 95, 68, 69, 67, 48, 48, 0, 24, 3, 0, 0, /* 0x2290 */ + 76, 90, 77, 65, 95, 69, 76, 70, 48, 48, 0, 70, 3, 0, 0, 76, /* 0x22a0 */ + 90, 77, 65, 95, 68, 69, 67, 49, 48, 0,142, 3, 0, 0, 76, 90, /* 0x22b0 */ + 77, 65, 95, 68, 69, 67, 50, 48, 0, 20, 14, 0, 0, 76, 90, 77, /* 0x22c0 */ + 65, 95, 68, 69, 67, 51, 48, 0,154, 24, 0, 0, 67, 65, 76, 76, /* 0x22d0 */ + 84, 82, 48, 48, 0,180, 24, 0, 0, 67, 84, 67, 76, 69, 86, 69, /* 0x22e0 */ + 49, 0,194, 24, 0, 0, 0, 0, 0, 0,199, 24, 0, 0, 67, 65, /* 0x22f0 */ + 76, 76, 84, 82, 48, 48, 0, 5, 0, 0, 0, 67, 65, 76, 76, 84, /* 0x2300 */ + 82, 48, 49, 0,199, 24, 0, 0, 67, 84, 68, 85, 77, 77, 89, 49, /* 0x2310 */ + 0,204, 24, 0, 0, 67, 84, 66, 83, 72, 82, 48, 49, 0,204, 24, /* 0x2320 */ + 0, 0, 67, 84, 66, 82, 79, 82, 48, 49, 0,208, 24, 0, 0, 67, /* 0x2330 */ + 84, 66, 83, 87, 65, 48, 49, 0,210, 24, 0, 0, 67, 65, 76, 76, /* 0x2340 */ + 84, 82, 48, 50, 0,215, 24, 0, 0, 0, 0, 0, 0,229, 24, 0, /* 0x2350 */ + 0, 67, 65, 76, 76, 84, 82, 48, 48, 0, 10, 0, 0, 0, 67, 65, /* 0x2360 */ + 76, 76, 84, 82, 49, 48, 0,229, 24, 0, 0, 67, 65, 76, 76, 84, /* 0x2370 */ + 82, 69, 56, 0,234, 24, 0, 0, 67, 65, 76, 76, 84, 82, 69, 57, /* 0x2380 */ + 0,236, 24, 0, 0, 67, 65, 76, 76, 84, 82, 49, 49, 0,238, 24, /* 0x2390 */ + 0, 0, 0, 0, 0, 0,242, 24, 0, 0, 67, 65, 76, 76, 84, 82, /* 0x23a0 */ + 49, 51, 0, 5, 0, 0, 0, 67, 84, 67, 76, 69, 86, 69, 50, 0, /* 0x23b0 */ +242, 24, 0, 0, 0, 0, 0, 0,247, 24, 0, 0, 67, 65, 76, 76, /* 0x23c0 */ + 84, 82, 49, 49, 0, 0, 0, 0, 0, 67, 65, 76, 76, 84, 82, 49, /* 0x23d0 */ + 50, 0,247, 24, 0, 0, 67, 84, 68, 85, 77, 77, 89, 50, 0,249, /* 0x23e0 */ + 24, 0, 0, 67, 84, 66, 83, 72, 82, 49, 49, 0,249, 24, 0, 0, /* 0x23f0 */ + 67, 84, 66, 82, 79, 82, 49, 49, 0,253, 24, 0, 0, 67, 84, 66, /* 0x2400 */ + 83, 87, 65, 49, 49, 0,255, 24, 0, 0, 67, 65, 76, 76, 84, 82, /* 0x2410 */ + 49, 51, 0, 4, 25, 0, 0, 0, 0, 0, 0, 9, 25, 0, 0, 67, /* 0x2420 */ + 65, 76, 76, 84, 82, 49, 48, 0, 5, 0, 0, 0, 67, 84, 84, 72, /* 0x2430 */ + 69, 69, 78, 68, 0, 9, 25, 0, 0, 76, 69, 88, 69, 67, 48, 49, /* 0x2440 */ + 53, 0, 9, 25, 0, 0, 76, 88, 85, 78, 70, 48, 48, 48, 0, 39, /* 0x2450 */ + 25, 0, 0, 0, 0, 0, 0, 41, 25, 0, 0, 76, 88, 85, 78, 70, /* 0x2460 */ + 48, 49, 48, 0, 5, 0, 0, 0, 76, 88, 85, 78, 70, 48, 48, 50, /* 0x2470 */ + 0, 41, 25, 0, 0, 77, 82, 85, 66, 89, 84, 69, 48, 0, 46, 25, /* 0x2480 */ + 0, 0, 76, 88, 77, 82, 85, 48, 48, 53, 0, 48, 25, 0, 0, 76, /* 0x2490 */ + 88, 77, 82, 85, 48, 48, 54, 0, 53, 25, 0, 0, 76, 88, 77, 82, /* 0x24a0 */ + 85, 48, 48, 55, 0, 60, 25, 0, 0, 76, 88, 85, 78, 70, 48, 48, /* 0x24b0 */ + 56, 0, 67, 25, 0, 0, 76, 88, 85, 78, 70, 48, 49, 48, 0, 71, /* 0x24c0 */ + 25, 0, 0, 0, 0, 0, 0, 76, 25, 0, 0, 76, 88, 85, 78, 70, /* 0x24d0 */ + 48, 52, 50, 0, 0, 0, 0, 0, 76, 88, 74, 67, 67, 48, 49, 48, /* 0x24e0 */ + 0, 76, 25, 0, 0, 76, 88, 77, 82, 85, 48, 52, 53, 0, 79, 25, /* 0x24f0 */ + 0, 0, 76, 88, 77, 82, 85, 48, 52, 54, 0, 82, 25, 0, 0, 76, /* 0x2500 */ + 88, 74, 67, 67, 48, 50, 48, 0, 84, 25, 0, 0, 0, 0, 0, 0, /* 0x2510 */ + 86, 25, 0, 0, 76, 88, 85, 78, 70, 48, 51, 52, 0, 0, 0, 0, /* 0x2520 */ + 0, 76, 88, 74, 67, 67, 48, 50, 49, 0, 86, 25, 0, 0, 0, 0, /* 0x2530 */ + 0, 0, 91, 25, 0, 0, 76, 88, 85, 78, 70, 48, 51, 52, 0, 0, /* 0x2540 */ + 0, 0, 0, 76, 88, 74, 67, 67, 48, 50, 51, 0, 91, 25, 0, 0, /* 0x2550 */ + 76, 88, 85, 78, 70, 48, 51, 55, 0, 98, 25, 0, 0, 76, 88, 85, /* 0x2560 */ + 78, 70, 51, 56, 54, 0,100, 25, 0, 0, 76, 88, 85, 78, 70, 51, /* 0x2570 */ + 56, 55, 0,101, 25, 0, 0, 76, 88, 85, 78, 70, 51, 56, 56, 0, /* 0x2580 */ +110, 25, 0, 0, 0, 0, 0, 0,113, 25, 0, 0, 76, 88, 85, 78, /* 0x2590 */ + 70, 48, 52, 48, 0, 0, 0, 0, 0, 76, 88, 85, 78, 70, 52, 56, /* 0x25a0 */ + 54, 0,113, 25, 0, 0, 76, 88, 85, 78, 70, 52, 56, 55, 0,117, /* 0x25b0 */ + 25, 0, 0, 0, 0, 0, 0,119, 25, 0, 0, 76, 88, 85, 78, 70, /* 0x25c0 */ + 48, 52, 48, 0, 0, 0, 0, 0, 76, 88, 77, 82, 85, 48, 54, 53, /* 0x25d0 */ + 0,119, 25, 0, 0, 0, 0, 0, 0,123, 25, 0, 0, 76, 88, 77, /* 0x25e0 */ + 82, 85, 48, 55, 48, 0, 5, 0, 0, 0, 77, 82, 85, 66, 89, 84, /* 0x25f0 */ + 69, 51, 0,123, 25, 0, 0, 77, 82, 85, 65, 82, 66, 51, 48, 0, /* 0x2600 */ +125, 25, 0, 0, 77, 82, 85, 66, 73, 84, 83, 51, 0,126, 25, 0, /* 0x2610 */ + 0, 77, 82, 85, 65, 82, 66, 52, 48, 0,128, 25, 0, 0, 76, 88, /* 0x2620 */ + 77, 82, 85, 48, 55, 48, 0,132, 25, 0, 0, 0, 0, 0, 0,137, /* 0x2630 */ + 25, 0, 0, 76, 88, 85, 78, 70, 48, 52, 48, 0, 0, 0, 0, 0, /* 0x2640 */ + 77, 82, 85, 66, 89, 84, 69, 52, 0,140, 25, 0, 0, 77, 82, 85, /* 0x2650 */ + 66, 73, 84, 83, 52, 0,143, 25, 0, 0, 77, 82, 85, 65, 82, 66, /* 0x2660 */ + 53, 48, 0,145, 25, 0, 0, 76, 88, 77, 82, 85, 48, 56, 48, 0, /* 0x2670 */ +151, 25, 0, 0, 77, 82, 85, 66, 89, 84, 69, 53, 0,154, 25, 0, /* 0x2680 */ + 0, 77, 82, 85, 65, 82, 66, 54, 48, 0,156, 25, 0, 0, 77, 82, /* 0x2690 */ + 85, 66, 73, 84, 83, 53, 0,157, 25, 0, 0, 77, 82, 85, 65, 82, /* 0x26a0 */ + 66, 55, 48, 0,159, 25, 0, 0, 76, 88, 77, 82, 85, 48, 57, 48, /* 0x26b0 */ + 0,163, 25, 0, 0, 0, 0, 0, 0,170, 25, 0, 0, 76, 88, 77, /* 0x26c0 */ + 82, 85, 49, 48, 48, 0, 10, 0, 0, 0, 77, 82, 85, 66, 89, 84, /* 0x26d0 */ + 69, 54, 0,174, 25, 0, 0, 77, 82, 85, 65, 82, 66, 56, 48, 0, /* 0x26e0 */ +176, 25, 0, 0, 77, 82, 85, 66, 73, 84, 83, 54, 0,177, 25, 0, /* 0x26f0 */ + 0, 77, 82, 85, 65, 82, 66, 57, 48, 0,179, 25, 0, 0, 76, 88, /* 0x2700 */ + 77, 82, 85, 49, 48, 48, 0,183, 25, 0, 0, 76, 88, 85, 78, 70, /* 0x2710 */ + 48, 52, 48, 0,199, 25, 0, 0, 76, 88, 77, 82, 85, 49, 49, 48, /* 0x2720 */ + 0,204, 25, 0, 0, 76, 88, 77, 82, 85, 49, 49, 49, 0,207, 25, /* 0x2730 */ + 0, 0, 76, 88, 85, 78, 70, 48, 52, 49, 0,209, 25, 0, 0, 0, /* 0x2740 */ + 0, 0, 0,216, 25, 0, 0, 76, 88, 85, 78, 70, 48, 51, 52, 0, /* 0x2750 */ + 0, 0, 0, 0, 76, 88, 85, 78, 70, 48, 52, 50, 0,216, 25, 0, /* 0x2760 */ + 0, 76, 69, 88, 69, 67, 48, 49, 54, 0,216, 25, 0, 0, 0, 0, /* 0x2770 */ + 0, 0,218, 25, 0, 0, 76, 88, 85, 78, 70, 48, 52, 50, 0, 0, /* 0x2780 */ + 0, 0, 0, 76, 88, 77, 82, 85, 48, 49, 48, 0,218, 25, 0, 0, /* 0x2790 */ + 76, 88, 74, 77, 80, 65, 48, 48, 0,219, 25, 0, 0, 76, 88, 67, /* 0x27a0 */ + 65, 76, 76, 66, 48, 0,221, 25, 0, 0, 76, 88, 85, 78, 70, 48, /* 0x27b0 */ + 50, 49, 0,223, 25, 0, 0, 76, 88, 77, 82, 85, 48, 50, 50, 0, /* 0x27c0 */ +229, 25, 0, 0, 76, 88, 74, 77, 80, 65, 48, 49, 0,232, 25, 0, /* 0x27d0 */ + 0, 76, 88, 67, 65, 76, 76, 66, 49, 0,234, 25, 0, 0, 77, 82, /* 0x27e0 */ + 85, 66, 73, 84, 83, 49, 0,236, 25, 0, 0, 76, 88, 77, 82, 85, /* 0x27f0 */ + 48, 51, 48, 0,237, 25, 0, 0, 77, 82, 85, 66, 89, 84, 69, 49, /* 0x2800 */ + 0,239, 25, 0, 0, 77, 82, 85, 65, 82, 66, 49, 48, 0,241, 25, /* 0x2810 */ + 0, 0, 76, 88, 77, 82, 85, 48, 52, 48, 0,242, 25, 0, 0, 0, /* 0x2820 */ + 0, 0, 0,244, 25, 0, 0, 76, 88, 77, 82, 85, 48, 51, 48, 0, /* 0x2830 */ + 0, 0, 0, 0, 76, 88, 85, 78, 70, 48, 51, 48, 0,244, 25, 0, /* 0x2840 */ + 0, 76, 88, 74, 67, 67, 48, 48, 48, 0,250, 25, 0, 0, 0, 0, /* 0x2850 */ + 0, 0, 2, 26, 0, 0, 76, 88, 74, 67, 67, 48, 49, 48, 0, 0, /* 0x2860 */ + 0, 0, 0, 76, 88, 67, 74, 48, 77, 82, 85, 0, 2, 26, 0, 0, /* 0x2870 */ + 76, 88, 67, 74, 49, 77, 82, 85, 0, 4, 26, 0, 0, 76, 88, 67, /* 0x2880 */ + 65, 76, 74, 77, 80, 0, 7, 26, 0, 0, 76, 88, 67, 65, 76, 76, /* 0x2890 */ + 48, 48, 0, 10, 26, 0, 0, 0, 0, 0, 0, 12, 26, 0, 0, 76, /* 0x28a0 */ + 88, 85, 78, 70, 48, 51, 55, 0, 0, 0, 0, 0, 76, 88, 67, 65, /* 0x28b0 */ + 76, 76, 48, 49, 0, 12, 26, 0, 0, 76, 88, 67, 74, 50, 77, 82, /* 0x28c0 */ + 85, 0, 15, 26, 0, 0, 0, 0, 0, 0, 17, 26, 0, 0, 76, 88, /* 0x28d0 */ + 85, 78, 70, 48, 51, 55, 0, 0, 0, 0, 0, 76, 88, 67, 74, 52, /* 0x28e0 */ + 77, 82, 85, 0, 17, 26, 0, 0, 0, 0, 0, 0, 19, 26, 0, 0, /* 0x28f0 */ + 76, 88, 85, 78, 70, 48, 51, 52, 0, 0, 0, 0, 0, 76, 88, 67, /* 0x2900 */ + 74, 54, 77, 82, 85, 0, 19, 26, 0, 0, 0, 0, 0, 0, 21, 26, /* 0x2910 */ + 0, 0, 76, 88, 67, 74, 56, 77, 82, 85, 0, 1, 0, 0, 0, 76, /* 0x2920 */ + 88, 67, 74, 55, 77, 82, 85, 0, 21, 26, 0, 0, 0, 0, 0, 0, /* 0x2930 */ + 23, 26, 0, 0, 76, 88, 67, 74, 56, 77, 82, 85, 0, 1, 0, 0, /* 0x2940 */ + 0, 76, 88, 67, 74, 56, 77, 82, 85, 0, 23, 26, 0, 0, 0, 0, /* 0x2950 */ + 0, 0, 26, 26, 0, 0, 76, 88, 85, 78, 70, 48, 51, 55, 0, 0, /* 0x2960 */ + 0, 0, 0, 76, 88, 85, 78, 70, 48, 51, 52, 0, 26, 26, 0, 0, /* 0x2970 */ + 0, 0, 0, 0, 31, 26, 0, 0, 76, 88, 85, 78, 70, 48, 51, 48, /* 0x2980 */ + 0, 0, 0, 0, 0, 76, 88, 77, 82, 85, 48, 53, 53, 0, 31, 26, /* 0x2990 */ + 0, 0, 77, 82, 85, 66, 89, 84, 69, 50, 0, 33, 26, 0, 0, 77, /* 0x29a0 */ + 82, 85, 66, 73, 84, 83, 50, 0, 38, 26, 0, 0, 77, 82, 85, 65, /* 0x29b0 */ + 82, 66, 50, 48, 0, 43, 26, 0, 0, 76, 88, 77, 82, 85, 48, 53, /* 0x29c0 */ + 55, 0, 48, 26, 0, 0, 76, 88, 77, 82, 85, 48, 53, 56, 0, 54, /* 0x29d0 */ + 26, 0, 0, 76, 88, 85, 78, 70, 48, 51, 53, 0, 55, 26, 0, 0, /* 0x29e0 */ + 67, 75, 76, 76, 84, 82, 48, 48, 0, 61, 26, 0, 0, 0, 0, 0, /* 0x29f0 */ + 0, 65, 26, 0, 0, 67, 75, 76, 76, 84, 82, 50, 48, 0, 30, 0, /* 0x2a00 */ + 0, 0, 67, 75, 76, 76, 84, 82, 49, 48, 0, 70, 26, 0, 0, 0, /* 0x2a10 */ + 0, 0, 0, 84, 26, 0, 0, 67, 75, 76, 76, 84, 82, 50, 48, 0, /* 0x2a20 */ + 6, 0, 0, 0, 67, 75, 76, 76, 84, 82, 50, 48, 0, 84, 26, 0, /* 0x2a30 */ + 0, 0, 0, 0, 0, 90, 26, 0, 0, 67, 75, 76, 76, 84, 82, 52, /* 0x2a40 */ + 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94, 26, 0, 0, 67, 75, /* 0x2a50 */ + 76, 76, 84, 82, 52, 48, 0, 0, 0, 0, 0, 67, 75, 76, 76, 84, /* 0x2a60 */ + 82, 51, 48, 0,117, 26, 0, 0, 0, 0, 0, 0,124, 26, 0, 0, /* 0x2a70 */ + 67, 75, 76, 76, 84, 82, 49, 48, 0, 14, 0, 0, 0, 67, 75, 76, /* 0x2a80 */ + 76, 84, 82, 52, 48, 0,124, 26, 0, 0, 0, 0, 0, 0,129, 26, /* 0x2a90 */ + 0, 0, 67, 75, 76, 76, 84, 82, 48, 48, 0, 4, 0, 0, 0, 76, /* 0x2aa0 */ + 69, 88, 69, 67, 48, 49, 55, 0,129, 26, 0, 0, 76, 69, 88, 69, /* 0x2ab0 */ + 67, 48, 50, 48, 0,131, 26, 0, 0, 88, 84, 72, 69, 69, 78, 68, /* 0x2ac0 */ + 88, 0, 8, 27, 0, 0,255,255,255,255, 8, 27 /* 0x2ad0 */ +}; diff --git a/src/stub/i386-BSD.elf-fold.h b/src/stub/i386-BSD.elf-fold.h new file mode 100644 index 00000000..76b182ff --- /dev/null +++ b/src/stub/i386-BSD.elf-fold.h @@ -0,0 +1,142 @@ +/* i386-BSD.elf-fold.h -- created from i386-BSD.elf-fold.bin, 1702 (0x6a6) 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 BSD_I386ELF_FOLD_SIZE 1702 +#define BSD_I386ELF_FOLD_ADLER32 0xd3fbf52c +#define BSD_I386ELF_FOLD_CRC32 0x627f021f + +unsigned char BSD_i386elf_fold[1702] = { +127, 69, 76, 70, 1, 1, 1, 9, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 0 */ + 2, 0, 3, 0, 1, 0, 0, 0,128, 16,192, 0, 52, 0, 0, 0, /* 0x 10 */ + 0, 0, 0, 0, 0, 0, 0, 0, 52, 0, 32, 0, 2, 0, 0, 0, /* 0x 20 */ + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 16,192, 0, /* 0x 30 */ + 0, 16,192, 0,166, 6, 0, 0,168, 6, 0, 0, 5, 0, 0, 0, /* 0x 40 */ + 0, 16, 0, 0, 1, 0, 0, 0,166, 6, 0, 0, 0, 0, 0, 0, /* 0x 50 */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 60 */ + 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 70 */ + 41,201,186,120, 2, 0, 0,137,230,137,231,232,121, 0, 0, 0, /* 0x 80 */ +137,230,209,234, 25,192, 41,193,141, 36,196,133,210,117,243,137, /* 0x 90 */ +231,232, 99, 0, 0, 0,129,236, 0, 10, 0, 0, 83,139, 83, 72, /* 0x a0 */ +141,148, 26,255, 31, 0, 0,129,226, 0,240,255,255, 82, 41,192, /* 0x b0 */ +102,131,123, 16, 3,117, 1,146, 80,139,115, 24,141,131,140, 0, /* 0x c0 */ + 0, 0, 41,198,139, 24,139, 72, 4,131,193, 12,141, 84, 36, 12, /* 0x d0 */ + 96, 71,232,157, 4, 0, 0,131,196, 36, 89, 91,129,196, 0, 10, /* 0x e0 */ + 0, 0, 80, 79, 41,192, 60,175,175,117,252, 80, 80, 80, 80, 80, /* 0x f0 */ + 80, 80, 80, 41,217,176, 73,255, 39,173,171,133,192,117,250,173, /* 0x 100 */ +171,133,192,117,250, 87,173,171,131,248, 32,115, 3, 15,179,194, /* 0x 110 */ +133,192,173,171,117,240,131,239, 8, 1,201, 64,243,171, 72,171, /* 0x 120 */ +171, 95,195, 85,137,229, 49,192, 80,255,117, 28, 80,255,117, 24, /* 0x 130 */ +255,117, 20,255,117, 16,255,117, 12,255,117, 8, 80,176,197, 80, /* 0x 140 */ + 80,176,198,205,128,201,195,195,176, 1, 15,182,192,205,128,195, /* 0x 150 */ +176, 3,235,246,176, 4,235,242,176, 5,235,238,176, 6,235,234, /* 0x 160 */ +176, 73,235,230,176, 74,235,226, 85,137,229, 87, 86,137,206, 83, /* 0x 170 */ +137,195, 57, 8,139,120, 4,115, 7,106,127,232,200,255,255,255, /* 0x 180 */ +133,201,116, 8,138, 7, 71,136, 2, 66,226,248, 1,115, 4, 41, /* 0x 190 */ + 51,141,101,244, 91, 94, 95,201,195, 85,137,229, 87, 86,137,198, /* 0x 1a0 */ + 83,137,211,131,236, 24,139, 69, 8,139,125, 12,137, 69,220,131, /* 0x 1b0 */ + 58, 0, 15,132,182, 0, 0, 0,141, 85,228,185, 12, 0, 0, 0, /* 0x 1c0 */ +137,240,232,161,255,255,255,139, 69,228,139, 77,232,133,192,117, /* 0x 1d0 */ + 19,129,249, 85, 80, 88, 33,117, 15,131, 62, 0, 15,132,140, 0, /* 0x 1e0 */ + 0, 0,235, 4,133,201,117, 7,106,127,232, 89,255,255,255, 57, /* 0x 1f0 */ +193,119,245, 59, 3,119,241, 57,193,115, 86,137, 69,224,141, 69, /* 0x 200 */ +224,255,117,236, 80,255,115, 4, 81,255,118, 4,255, 85,220,131, /* 0x 210 */ +196, 20,133,192,117,210,139, 85,224, 59, 85,228,117,202,138, 69, /* 0x 220 */ +237,132,192,116, 34,133,255,116, 30,129,250, 0, 2, 0, 0,119, /* 0x 230 */ + 4, 57, 19,117, 18, 15,182,192, 80, 15,182, 69,238, 80, 82,255, /* 0x 240 */ +115, 4,255,215,131,196, 16,139, 69,232, 1, 70, 4, 41, 6,235, /* 0x 250 */ + 10,139, 83, 4,137,240,232, 13,255,255,255,139, 85,228,139, 3, /* 0x 260 */ + 1, 83, 4, 41,208,133,192,137, 3,233, 68,255,255,255,141,101, /* 0x 270 */ +244, 91, 94, 95,201,195,133,192, 83,137,211,116, 29,168, 1,117, /* 0x 280 */ + 25,139, 16, 57,218,116, 7, 74,117, 11,133,219,116, 7,137, 24, /* 0x 290 */ +137, 72, 4,235, 5,131,192, 8,235,231, 91,195, 85,137,229, 87, /* 0x 2a0 */ + 86, 83,131,236, 60,137, 85,224,137, 69,228,139, 85, 12,139, 69, /* 0x 2b0 */ + 8,199, 69,204,255,255,255,255,137, 85,216,139,125,224,139, 85, /* 0x 2c0 */ +224,137, 69,220,139, 69, 20, 3,127, 28,137, 69,212, 49,192,102, /* 0x 2d0 */ +131,122, 16, 2, 15,183, 74, 44,137,251, 15,148,192, 49,246,193, /* 0x 2e0 */ +224, 4,137,202, 5, 2, 16, 0, 0, 74,120, 30,131, 59, 1,117, /* 0x 2f0 */ + 20,139, 83, 8, 59, 85,204,115, 3,137, 85,204, 3, 83, 20, 57, /* 0x 300 */ +214,115, 2,137,214,131,195, 32,226,226,139, 93,204,106, 0,106, /* 0x 310 */ +255,129,227, 0,240,255,255, 80, 41,222,106, 0,129,198,255, 15, /* 0x 320 */ + 0, 0,129,230, 0,240,255,255, 86, 83,232,244,253,255,255,131, /* 0x 330 */ +196, 24,141, 52, 48, 41,216,137, 69,208,139, 69,224,137,117,240, /* 0x 340 */ +102,131,120, 44, 0,199, 69,200, 0, 0, 0, 0, 15,132,216, 1, /* 0x 350 */ + 0, 0,139, 7,131,248, 6,117, 24,139, 77,208,186, 3, 0, 0, /* 0x 360 */ + 0, 3, 79, 8,139, 69,216,232, 10,255,255,255,233,163, 1, 0, /* 0x 370 */ + 0, 72, 15,133,156, 1, 0, 0,139, 69,208,199, 69,196, 64, 98, /* 0x 380 */ + 81,115, 3, 71, 8,139, 87, 20,139, 79, 24, 1,194,137, 69,236, /* 0x 390 */ +137, 85,188,137,194,129,226,255, 15, 0, 0,131,225, 7, 41,208, /* 0x 3a0 */ +193,225, 2,137, 69,192,139, 71, 4,211,109,196, 41,208,131,101, /* 0x 3b0 */ +196, 7,131,125,220, 0,139, 79, 16, 80,139, 69,228,137, 77,232, /* 0x 3c0 */ +141, 52, 17,116, 3,131,200,255,131,125,220, 1, 80, 25,192, 37, /* 0x 3d0 */ + 0,240,255,255, 5, 18, 16, 0, 0,131,125,220, 0, 80,139, 69, /* 0x 3e0 */ +196,116, 3,131,200, 2,131,125,220, 0, 80,137,240,116, 3,141, /* 0x 3f0 */ + 70, 3, 80,255,117,192,232, 40,253,255,255,131,196, 24, 57, 69, /* 0x 400 */ +192, 15,133,185, 0, 0, 0,131,125,220, 0,116, 28,246, 69,196, /* 0x 410 */ + 4,139, 69,212,117, 2, 49,192, 80,139, 69,220,255,117,228,141, /* 0x 420 */ + 85,232,232,114,253,255,255, 88, 90,137,240,247,216, 37,255, 15, /* 0x 430 */ + 0, 0,246, 69,196, 2,137, 69,184,116, 20,139, 69,192, 1,240, /* 0x 440 */ +131,125,184, 0,116, 9,139, 77,184,198, 0, 0, 64,226,250,131, /* 0x 450 */ +125,220, 0,116,114,131, 63, 1,117, 83,246, 71, 24, 1,116, 77, /* 0x 460 */ +139, 87, 20,139, 95, 8,141, 12, 26, 3, 77,208, 59, 87, 16,117, /* 0x 470 */ + 14,137,200,247,216, 37,255, 15, 0, 0,131,248, 3,119, 14,107, /* 0x 480 */ + 69,208, 52,131,127, 4, 0,141, 76, 3, 12,117, 15,139, 1, 61, /* 0x 490 */ +205,128, 97,195,116, 6,199, 1,205,128, 97,195,133,201,116, 13, /* 0x 4a0 */ +139, 69,216, 49,210,131,224,254,232,201,253,255,255,255,117,196, /* 0x 4b0 */ + 86,255,117,192,232,171,252,255,255,131,196, 12,133,192,116, 7, /* 0x 4c0 */ +106,127,232,129,252,255,255,139, 85,184,139, 93,192,141, 4, 22, /* 0x 4d0 */ + 1,195, 59, 93,188,115, 33,106, 0,106,255,104, 18, 16, 0, 0, /* 0x 4e0 */ +255,117,196, 41, 93,188,255,117,188, 83,232, 52,252,255,255,131, /* 0x 4f0 */ +196, 24, 57,195,116, 30,235,200,131,125,220, 0,116, 22,141, 70, /* 0x 500 */ + 3, 37,255, 15, 0, 0,131,248, 3,119, 9, 80, 83,232, 78,252, /* 0x 510 */ +255,255, 89, 91,139, 85,224,131,199, 32,255, 69,200, 15,183, 66, /* 0x 520 */ + 44, 57, 69,200, 15,140, 40,254,255,255,131,125,220, 0,117, 15, /* 0x 530 */ +255,117,228,232, 36,252,255,255, 90,133,192,116, 21,235,129,139, /* 0x 540 */ + 69,224,102,131,120, 16, 3,116, 9,255,117,240,232,246,251,255, /* 0x 550 */ +255, 88,131,125, 16, 0,116, 8,139, 69,208,139, 85, 16,137, 2, /* 0x 560 */ +139, 85,224,139, 82, 24, 1, 85,208,139, 69,208,141,101,244, 91, /* 0x 570 */ + 94, 95,201,195, 85,137,229, 87, 86, 83,131,236, 16,139,125, 16, /* 0x 580 */ +106, 0,139, 69, 28,141, 87, 2,139,117, 8,137, 69,232,131,192, /* 0x 590 */ + 52,137, 69,228,139, 93, 32,137, 85,236,141, 69, 32,141, 85, 24, /* 0x 5a0 */ + 87,232,243,251,255,255,139, 69, 12,186, 5, 0, 0, 0, 41, 93, /* 0x 5b0 */ + 36,137, 69, 32,139, 69,232, 15,183, 72, 44,137,240,232,180,252, /* 0x 5c0 */ +255,255,139, 85,232,137,240, 15,183, 74, 42,186, 4, 0, 0, 0, /* 0x 5d0 */ +232,161,252,255,255,139, 69,228,139, 77, 40,186, 3, 0, 0, 0, /* 0x 5e0 */ + 3, 72, 8,137,240,131,193, 52,232,137,252,255,255,141, 69,240, /* 0x 5f0 */ +255,117,236, 80,139, 85,232,141, 69, 32, 86, 80,137,248,232,153, /* 0x 600 */ +252,255,255,186, 9, 0, 0, 0,137,193,137,195,137,240,232, 99, /* 0x 610 */ +252,255,255,139, 85,232,131,196, 24,102,139, 74, 44, 49,210,102, /* 0x 620 */ +133,201,116,104,139, 69,228,131, 56, 3,117, 84,106, 0,139, 85, /* 0x 630 */ +228,106, 0,139, 69,240, 3, 66, 8, 80,232, 25,251,255,255,131, /* 0x 640 */ +196, 12,133,192,137,195,120, 24,104, 0, 2, 0, 0,255,117,232, /* 0x 650 */ + 80,232,250,250,255,255,131,196, 12, 61, 0, 2, 0, 0,116, 7, /* 0x 660 */ +106,127,232,225,250,255,255,106, 0,139, 85,232,106, 0,137,216, /* 0x 670 */ +106, 0,106, 0,232, 35,252,255,255,131,196, 16,137,195,235, 12, /* 0x 680 */ + 66, 15,183,193,131, 69,228, 32, 57,194,124,152,141,101,244,137, /* 0x 690 */ +216, 91, 94, 95,201,195 /* 0x 6a0 */ +}; diff --git a/src/stub/scripts/brandBSD.pl b/src/stub/scripts/brandBSD.pl new file mode 100644 index 00000000..114f3462 --- /dev/null +++ b/src/stub/scripts/brandBSD.pl @@ -0,0 +1,49 @@ +#! /usr/bin/perl -w +# +# brandBSD.pl -- brand an ELF binary as Linux or FreeBSD +# +# This file is part of the UPX executable compressor. +# +# Copyright (C) 1996-2006 Markus Franz Xaver Johannes Oberhumer +# Copyright (C) 1996-2006 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 +# +# + + +$fname = shift || die; + +$sig = shift || "FreeBSD"; +die if length($sig) > 7; + +sysopen (FH,$fname,2) || die; +binmode FH; + +sysread (FH,$header,7) || die; +die if (substr($header, 0, 7) ne "\x7f\x45\x4c\x46\x01\x01\x01"); + +syswrite (FH,"\011\0",2) || die; +# syswrite (FH,$sig,length($sig)) || die; +# syswrite (FH,"\0\0\0\0\0\0\0\0",8-length($sig)) || die; +close (FH) || die; + +exit (0); + +# vi:ts=4:et diff --git a/src/stub/src/i386-BSD.elf-entry.asm b/src/stub/src/i386-BSD.elf-entry.asm new file mode 100644 index 00000000..acb67569 --- /dev/null +++ b/src/stub/src/i386-BSD.elf-entry.asm @@ -0,0 +1,235 @@ +; i386-BSD.elf-entry.asm -- BSD program entry point & decompressor (Elf binary) +; +; 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 +; +; + + + BITS 32 + SECTION .text + CPU 386 + +%define jmps jmp short +%define jmpn jmp near + +; /************************************************************************* +; // program entry point +; // see glibc/sysdeps/i386/elf/start.S +; **************************************************************************/ + +GLOBAL _start +;__LEXEC000__ +_start: +;;;; int3 +;; How to debug this code: Uncomment the 'int3' breakpoint instruction above. +;; Build the stubs and upx. Compress a testcase, such as a copy of /bin/date. +;; Invoke gdb, and give a 'run' command. Define a single-step macro such as +;; define g +;; stepi +;; x/i $pc +;; end +;; and a step-over macro such as +;; define h +;; x/2i $pc +;; tbreak *$_ +;; continue +;; x/i $pc +;; end +;; Step through the code; remember that repeats the previous command. +;; + call main ; push address of decompress subroutine +decompress: + +; /************************************************************************* +; // C callable decompressor +; **************************************************************************/ + +; /* Offsets to parameters, allowing for {push + pusha + call} */ +%define O_INP (4+ 8*4 +1*4) +%define O_INS (4+ 8*4 +2*4) +%define O_OUTP (4+ 8*4 +3*4) +%define O_OUTS (4+ 8*4 +4*4) +%define O_PARAM (4+ 8*4 +5*4) + +%define INP dword [esp+O_INP] +%define INS dword [esp+O_INS] +%define OUTP dword [esp+O_OUTP] +%define OUTS dword [esp+O_OUTS] +%define PARM dword [esp+O_PARAM] + +;__LEXEC009__ + ;; empty section for commonality with l_lx_exec86.asm +;__LEXEC010__ + pusha + push byte '?' ; cto8 (sign extension does not matter) + ; cld + + mov esi, INP + mov edi, OUTP + + or ebp, byte -1 +;;; align 8 + +%include "arch/i386/nrv2b_d32.ash" +%include "arch/i386/nrv2d_d32.ash" +%include "arch/i386/nrv2e_d32.ash" +%include "arch/i386/lzma_d.ash" +%include "arch/i386/macros.ash" + cjt32 0 + +;__LEXEC015__ + ; eax is 0 from decompressor code + ;xor eax, eax ; return code + +; check compressed size + mov edx, INP + add edx, INS + cmp esi, edx + jz .ok + dec eax +.ok: + +; write back the uncompressed size + sub edi, OUTP + mov edx, OUTS + mov [edx], edi + + pop edx ; cto8 + + mov [7*4 + esp], eax + popa + ret + + ctojr32 + ckt32 edi, dl +;__LEXEC017__ + popa + ret + +;__LEXEC020__ + +%define PAGE_SIZE ( 1<<12) + +%define MAP_FIXED 0x10 +%define MAP_PRIVATE 0x02 +%define MAP_ANONYMOUS 0x1000 +%define PROT_READ 1 +%define PROT_WRITE 2 +%define PROT_EXEC 4 +%define __NR_mmap 197 +%define __NR_syscall 198 +%define szElf32_Ehdr 0x34 +%define p_memsz 5*4 + +%define __NR_write 4 +%define __NR_exit 1 + +fail_mmap: + push byte L71 - L70 + call L71 +L70: + db "PROT_EXEC|PROT_WRITE failed.",10 +L71: + push byte 2 ; fd stderr + push eax ; fake ret.addr + push byte __NR_write + pop eax + int 0x80 +die: + push byte 127 ; only low 7 bits matter! + push eax ; fake ret.addr + push byte __NR_exit + pop eax ; write to stderr could fail, leaving eax as -EBADF etc. + int 0x80 + +; Decompress the rest of this loader, and jump to it +unfold: + pop esi ; &{ b_info:{sz_unc, sz_cpr, 4{byte}}, compressed_data...} + + lea eax, [ebp - (4+ decompress - _start)] ; 4: sizeof(int) + sub eax, [eax] ; %eax= &Elf32_Ehdr of this program + mov edx, eax ; %edx= &Elf32_Ehdr of this program + +; Linux requires PF_W in order to create .bss (implied by .p_filesz!=.p_memsz), +; but strict SELinux (or PaX, grSecurity) forbids PF_W with PF_X. +; So first PT_LOAD must be PF_R|PF_X only, and .p_memsz==.p_filesz. +; So we must round up here, instead of pre-rounding .p_memsz. + add eax, [p_memsz + szElf32_Ehdr + eax] ; address after .text + add eax, PAGE_SIZE -1 + and eax, -PAGE_SIZE + + push eax ; destination for 'ret' + + ; mmap a page to hold the decompressed fold_elf86 + xor ecx, ecx ; %ecx= 0 + ; MAP_ANONYMOUS ==>offset is ignored, so do not push! + push ecx ; pad (must be zero?) + push byte -1 ; *BSD demands -1==fd for mmap(,,,MAP_ANON,,) + push dword MAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS + mov ch, PAGE_SIZE >> 8 ; %ecx= PAGE_SIZE + push byte PROT_READ | PROT_WRITE | PROT_EXEC + push ecx ; length + push eax ; destination + xor eax,eax ; 0 + push eax ; current thread + mov al, __NR_mmap + push eax ; __NR_mmap + push eax ; fake return address + mov al, __NR_syscall + int 0x80 ; changes only %eax; %edx is live + jb fail_mmap + xchg eax, edx ; %edx= page after .text; %eax= &Elf32_Ehdr of this program + xchg eax, ebx ; %ebx= &Elf32_Ehdr of this program + + cld + lodsd + push eax ; sz_uncompressed (maximum dstlen for lzma) + mov ecx,esp ; save &dstlen + push eax ; space for 5th param + push ecx ; &dstlen + push edx ; &dst + lodsd + push eax ; sz_compressed (srclen) + lodsd ; last 4 bytes of b_info + mov [4*3 + esp],eax + push esi ; &compressed_data + call ebp ; decompress(&src, srclen, &dst, &dstlen, b_info.misc) + add esp, byte (5+1 + 9)*4 ; (5+1) args to decompress, 9 "args" to mmap + ret ; &destination +main: + pop ebp ; &decompress + call unfold + ; compressed fold_elf86 follows +eof: +; __XTHEENDX__ + section .data + dd -1 + dw eof + +; vi:ts=8:et:nowrap + diff --git a/src/stub/src/i386-BSD.elf-fold.asm b/src/stub/src/i386-BSD.elf-fold.asm new file mode 100644 index 00000000..09fcacb2 --- /dev/null +++ b/src/stub/src/i386-BSD.elf-fold.asm @@ -0,0 +1,276 @@ +; fold_elf86.asm -- linkage to C code to process Elf binary +; +; This file is part of the UPX executable compressor. +; +; 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 +; +; + + + BITS 32 + SECTION .text + CPU 386 + +%define PAGE_SIZE ( 1<<12) +%define szElf32_Ehdr 0x34 +%define szElf32_Phdr 8*4 +%define e_type 16 +%define e_entry (16 + 2*2 + 4) +%define p_memsz 5*4 +%define szb_info 12 +%define szl_info 12 +%define szp_info 12 +%define a_type 0 +%define a_val 4 +%define sz_auxv 8 + +%define __NR_munmap 73 + +;; control just falls through, after this part and compiled C code +;; are uncompressed. + +fold_begin: ; enter: %ebx= &Elf32_Ehdr of this program + ; patchLoader will modify to be + ; dword sz_uncompressed, sz_compressed + ; byte compressed_data... + +; ld-linux.so.2 depends on AT_PHDR and AT_ENTRY, for instance. +; Move argc,argv,envp down to make room for Elf_auxv table. +; Linux kernel 2.4.2 and earlier give only AT_HWCAP and AT_PLATFORM +; because we have no PT_INTERP. Linux kernel 2.4.5 (and later?) +; give not quite everything. It is simpler and smaller code for us +; to generate a "complete" table where Elf_auxv[k -1].a_type = k. +; On second thought, that wastes a lot of stack space (the entire kernel +; auxv, plus those slots that remain empty anyway). So try for minimal +; space on stack, without too much code, by doing it serially. + +%define AT_NULL 0 +%define AT_IGNORE 1 +%define AT_PHDR 3 +%define AT_PHENT 4 +%define AT_PHNUM 5 +%define AT_PAGESZ 6 +%define AT_ENTRY 9 + +%define ET_DYN 3 + + sub ecx, ecx + mov edx, (1< + + John F. Reiser + + */ + + +OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") +OUTPUT_ARCH(i386) +/*ENTRY(_start)*/ +PHDRS +{ + text PT_LOAD FILEHDR PHDRS ; + data PT_LOAD ; /* for setting brk(0) */ +} +SECTIONS +{ + /* 0x00c01000: 12MB+4KB for Fedora Core 5 vDSO at 0xc00000 */ + . = 0x00c01000 + SIZEOF_HEADERS + 12; /* 12==sizeof(l_info) */ + .text : { + *(.text) + *(.data) + } : text + .data : { + } : data +} diff --git a/src/stub/src/i386-BSD.elf-main.c b/src/stub/src/i386-BSD.elf-main.c new file mode 100644 index 00000000..f8e64bf9 --- /dev/null +++ b/src/stub/src/i386-BSD.elf-main.c @@ -0,0 +1,588 @@ +/* l_lx_elf.c -- stub loader for Linux x86 ELF executable + + 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 + + */ + + +#include "include/BSD.h" + + +/************************************************************************* +// configuration section +**************************************************************************/ + +// In order to make it much easier to move this code at runtime and execute +// it at an address different from it load address: there must be no +// static data, and no string constants. + +#if 1 /*{*/ +#define DPRINTF(a) /* empty: no debug drivel */ +#else /*}{*/ +#include "stdarg.h" + +static int +unsimal(unsigned x, char *ptr, int n) +{ + if (10<=x) { + n = unsimal(x/10, ptr, n); + x %= 10; + } + ptr[n] = '0' + x; + return 1+ n; +} + +static int +decimal(int x, char *ptr, int n) +{ + if (x < 0) { + *ptr++ = '-'; ++n; + x = -x; + } + return unsimal(x, ptr, n); +} + +extern char const *STR_hex(); + +static int +heximal(unsigned x, char *ptr, int n) +{ + if (16<=x) { + n = heximal(x>>4, ptr, n); + x &= 0xf; + } + ptr[n] = STR_hex()[x]; + return 1+ n; +} + + +#define DPRINTF(a) dprintf a +extern char const *STR_0x(); +extern char const *STR_xread(); +extern char const *STR_unpackExtent(); +extern char const *STR_make_hatch_arm(); +extern char const *STR_auxv_up(); +extern char const *STR_xfind_pages(); +extern char const *STR_do_xmap(); +extern char const *STR_upx_main(); + +static int +dprintf(char const *fmt, ...) +{ + char c; + int n= 0; + char *ptr; + char buf[20]; + va_list va; va_start(va, fmt); + ptr= &buf[0]; + while (0!=(c= *fmt++)) if ('%'!=c) goto literal; + else switch (c= *fmt++) { + default: { +literal: + n+= write(2, fmt-1, 1); + } break; + case 0: goto done; /* early */ + case 'u': { + n+= write(2, buf, unsimal(va_arg(va, unsigned), buf, 0)); + } break; + case 'd': { + n+= write(2, buf, decimal(va_arg(va, int), buf, 0)); + } break; + case 'p': /* same as 'x'; relies on sizeof(int)==sizeof(void *) */ + case 'x': { + buf[0] = '0'; + buf[1] = 'x'; + n+= write(2, buf, heximal(va_arg(va, int), buf, 2)); + } break; + } +done: + va_end(va); + return n; +} +#endif /*}*/ + +#define MAX_ELF_HDR 512 // Elf32_Ehdr + n*Elf32_Phdr must fit in this + + +/************************************************************************* +// "file" util +**************************************************************************/ + +struct Extent { + size_t size; // must be first to match size[0] uncompressed size + char *buf; +}; + + +static void +#if (ACC_CC_GNUC >= 0x030300) && defined(__i386__) /*{*/ +__attribute__((__noinline__, __used__, regparm(3), stdcall)) +#endif /*}*/ +xread(struct Extent *x, char *buf, size_t count) +{ + char *p=x->buf, *q=buf; + size_t j; + DPRINTF((STR_xread(), x, x->size, x->buf, buf, count)); + if (x->size < count) { + exit(127); + } + for (j = count; 0!=j--; ++p, ++q) { + *q = *p; + } + x->buf += count; + x->size -= count; +} + + +/************************************************************************* +// util +**************************************************************************/ + +#if 1 //{ save space +#define ERR_LAB error: exit(127); +#define err_exit(a) goto error +#else //}{ save debugging time +#define ERR_LAB +static void +err_exit(int a) __attribute__ ((__noreturn__)); +{ + (void)a; // debugging convenience + exit(127); +} +#endif //} + +static void * +do_brk(void *addr) +{ + return brk(addr); +} + +/************************************************************************* +// UPX & NRV stuff +**************************************************************************/ + +typedef void f_unfilter( + nrv_byte *, // also addvalue + nrv_uint, + unsigned cto8, // junk in high 24 bits + unsigned ftid +); +typedef int f_expand( + const nrv_byte *, nrv_uint, + nrv_byte *, nrv_uint *, unsigned ); + +static void +unpackExtent( + struct Extent *const xi, // input + struct Extent *const xo, // output + f_expand *const f_decompress, + f_unfilter *f_unf +) +{ + DPRINTF((STR_unpackExtent(), + xi, xi->size, xi->buf, xo, xo->size, xo->buf, f_decompress, f_unf)); + while (xo->size) { + struct b_info h; + // Note: if h.sz_unc == h.sz_cpr then the block was not + // compressible and is stored in its uncompressed form. + + // Read and check block sizes. + xread(xi, (char *)&h, sizeof(h)); + if (h.sz_unc == 0) { // uncompressed size 0 -> EOF + if (h.sz_cpr != UPX_MAGIC_LE32) // h.sz_cpr must be h->magic + err_exit(2); + if (xi->size != 0) // all bytes must be written + err_exit(3); + break; + } + if (h.sz_cpr <= 0) { + err_exit(4); +ERR_LAB + } + if (h.sz_cpr > h.sz_unc + || h.sz_unc > xo->size ) { + err_exit(5); + } + // Now we have: + // assert(h.sz_cpr <= h.sz_unc); + // assert(h.sz_unc > 0 && h.sz_unc <= blocksize); + // assert(h.sz_cpr > 0 && h.sz_cpr <= blocksize); + + if (h.sz_cpr < h.sz_unc) { // Decompress block + nrv_uint out_len = h.sz_unc; // EOF for lzma + int const j = (*f_decompress)((unsigned char *)xi->buf, h.sz_cpr, + (unsigned char *)xo->buf, &out_len, *(int *)(void *)&h.b_method ); + if (j != 0 || out_len != (nrv_uint)h.sz_unc) + err_exit(7); + // Skip Ehdr+Phdrs: separate 1st block, not filtered + if (h.b_ftid!=0 && f_unf // have filter + && ((512 < out_len) // this block is longer than Ehdr+Phdrs + || (xo->size==(unsigned)h.sz_unc) ) // block is last in Extent + ) { + (*f_unf)((unsigned char *)xo->buf, out_len, h.b_cto8, h.b_ftid); + } + xi->buf += h.sz_cpr; + xi->size -= h.sz_cpr; + } + else { // copy literal block + xread(xi, xo->buf, h.sz_cpr); + } + xo->buf += h.sz_unc; + xo->size -= h.sz_unc; + } +} + +#if defined(__i386__) /*{*/ +// Create (or find) an escape hatch to use when munmapping ourselves the stub. +// Called by do_xmap to create it; remembered in AT_NULL.d_val +static void * +make_hatch_x86(Elf32_Phdr const *const phdr, unsigned const reloc) +{ + unsigned *hatch = 0; + if (phdr->p_type==PT_LOAD && phdr->p_flags & PF_X) { + // The format of the 'if' is + // if ( ( (hatch = loc1), test_loc1 ) + // || ( (hatch = loc2), test_loc2 ) ) { + // action + // } + // which uses the comma to save bytes when test_locj involves locj + // and the action is the same when either test succeeds. + + // Try page fragmentation just beyond .text . + if ( ( (hatch = (void *)(phdr->p_memsz + phdr->p_vaddr + reloc)), + ( phdr->p_memsz==phdr->p_filesz // don't pollute potential .bss + && 4<=(~PAGE_MASK & -(int)hatch) ) ) // space left on page + // Try Elf32_Ehdr.e_ident[12..15] . warning: 'const' cast away + || ( (hatch = (void *)(&((Elf32_Ehdr *)phdr->p_vaddr + reloc)->e_ident[12])), + (phdr->p_offset==0) ) ) { + // Omitting 'const' saves repeated literal in gcc. + unsigned /*const*/ escape = 0xc36180cd; // "int $0x80; popa; ret" + // Don't store into read-only page if value is already there. + if (* (volatile unsigned*) hatch != escape) { + * hatch = escape; + } + } + } + return hatch; +} +#elif defined(__arm__) /*}{*/ +static void * +make_hatch_arm(Elf32_Phdr const *const phdr, unsigned const reloc) +{ + unsigned *hatch = 0; + DPRINTF((STR_make_hatch_arm(),phdr,reloc)); + if (phdr->p_type==PT_LOAD && phdr->p_flags & PF_X) { + // The format of the 'if' is + // if ( ( (hatch = loc1), test_loc1 ) + // || ( (hatch = loc2), test_loc2 ) ) { + // action + // } + // which uses the comma to save bytes when test_locj involves locj + // and the action is the same when either test succeeds. + + // Try page fragmentation just beyond .text . + if ( ( (hatch = (void *)(phdr->p_memsz + phdr->p_vaddr + reloc)), + ( phdr->p_memsz==phdr->p_filesz // don't pollute potential .bss + && 8<=(~PAGE_MASK & -(int)hatch) ) ) // space left on page + // Try Elf32_Ehdr.e_ident[8..15] . warning: 'const' cast away + || ( (hatch = (void *)(&((Elf32_Ehdr *)phdr->p_vaddr + reloc)->e_ident[8])), + (phdr->p_offset==0) ) ) + { + hatch[0]= 0xef90005b; // syscall __NR_unmap + hatch[1]= 0xe1a0f00e; // mov pc,lr + } + } + return hatch; +} +#endif /*}*/ + +static void +#if defined(__i386__) /*{*/ +__attribute__((regparm(2), stdcall)) +#endif /*}*/ +upx_bzero(char *p, size_t len) +{ + if (len) do { + *p++= 0; + } while (--len); +} +#define bzero upx_bzero + + +static void +#if defined(__i386__) /*{*/ +__attribute__((regparm(3), stdcall)) +#endif /*}*/ +auxv_up(Elf32_auxv_t *av, unsigned const type, unsigned const value) +{ + DPRINTF((STR_auxv_up(),av,type,value)); + if (av +#if defined(__i386__) /*{*/ + && 0==(1&(int)av) /* PT_INTERP usually inhibits, except for hatch */ +#endif /*}*/ + ) + for (;; ++av) { + if (av->a_type==type || (av->a_type==AT_IGNORE && type!=AT_NULL)) { + av->a_type = type; + av->a_un.a_val = value; + return; + } + } +} + +// The PF_* and PROT_* bits are {1,2,4}; the conversion table fits in 32 bits. +#define REP8(x) \ + ((x)|((x)<<4)|((x)<<8)|((x)<<12)|((x)<<16)|((x)<<20)|((x)<<24)|((x)<<28)) +#define EXP8(y) \ + ((1&(y)) ? 0xf0f0f0f0 : (2&(y)) ? 0xff00ff00 : (4&(y)) ? 0xffff0000 : 0) +#define PF_TO_PROT(pf) \ + ((PROT_READ|PROT_WRITE|PROT_EXEC) & ( \ + ( (REP8(PROT_EXEC ) & EXP8(PF_X)) \ + |(REP8(PROT_READ ) & EXP8(PF_R)) \ + |(REP8(PROT_WRITE) & EXP8(PF_W)) \ + ) >> ((pf & (PF_R|PF_W|PF_X))<<2) )) + + +// Find convex hull of PT_LOAD (the minimal interval which covers all PT_LOAD), +// and mmap that much, to be sure that a kernel using exec-shield-randomize +// won't place the first piece in a way that leaves no room for the rest. +static unsigned long // returns relocation constant +#if defined(__i386__) /*{*/ +__attribute__((regparm(3), stdcall)) +#endif /*}*/ +xfind_pages(unsigned mflags, Elf32_Phdr const *phdr, int phnum, + char **const p_brk +) +{ + size_t lo= ~0, hi= 0, szlo= 0; + char *addr; + DPRINTF((STR_xfind_pages(), mflags, phdr, phnum, p_brk)); + mflags += MAP_PRIVATE | MAP_ANONYMOUS; // '+' can optimize better than '|' + for (; --phnum>=0; ++phdr) if (PT_LOAD==phdr->p_type) { + if (phdr->p_vaddr < lo) { + lo = phdr->p_vaddr; + szlo = phdr->p_filesz; + } + if (hi < (phdr->p_memsz + phdr->p_vaddr)) { + hi = phdr->p_memsz + phdr->p_vaddr; + } + } + szlo += ~PAGE_MASK & lo; // page fragment on lo edge + lo -= ~PAGE_MASK & lo; // round down to page boundary + hi = PAGE_MASK & (hi - lo - PAGE_MASK -1); // page length + szlo = PAGE_MASK & (szlo - PAGE_MASK -1); // page length + addr = mmap((void *)lo, hi, PROT_NONE, mflags, -1, 0); + *p_brk = hi + addr; // the logical value of brk(0) + //mprotect(szlo + addr, hi - szlo, PROT_NONE); // no access, but keep the frames! + return (unsigned long)addr - lo; +} + +static Elf32_Addr // entry address +do_xmap(int const fdi, Elf32_Ehdr const *const ehdr, struct Extent *const xi, + Elf32_auxv_t *const av, unsigned *p_reloc, f_unfilter *const f_unf) +{ + Elf32_Phdr const *phdr = (Elf32_Phdr const *) (ehdr->e_phoff + + (void const *)ehdr); + char *v_brk; + unsigned const reloc = xfind_pages( + ((ET_EXEC==ehdr->e_type) ? MAP_FIXED : 0), phdr, ehdr->e_phnum, &v_brk); + int j; + DPRINTF((STR_do_xmap(), + fdi, ehdr, xi, (xi? xi->size: 0), (xi? xi->buf: 0), av, p_reloc, f_unf)); + for (j=0; j < ehdr->e_phnum; ++phdr, ++j) + if (PT_PHDR==phdr->p_type) { + auxv_up(av, AT_PHDR, phdr->p_vaddr + reloc); + } + else if (PT_LOAD==phdr->p_type) { + unsigned const prot = PF_TO_PROT(phdr->p_flags); + struct Extent xo; + size_t mlen = xo.size = phdr->p_filesz; + char *addr = xo.buf = (char *)(phdr->p_vaddr + reloc); + char *haddr = phdr->p_memsz + addr; + size_t frag = (int)addr &~ PAGE_MASK; + mlen += frag; + addr -= frag; + + if (addr != mmap(addr, mlen +#if defined(__i386__) /*{*/ + // Decompressor can overrun the destination by 3 bytes. + + (xi ? 3 : 0) +#endif /*}*/ + , prot | (xi ? PROT_WRITE : 0), + MAP_FIXED | MAP_PRIVATE | (xi ? MAP_ANONYMOUS : 0), + (xi ? -1 : fdi), phdr->p_offset - frag) ) { + err_exit(8); + } + if (xi) { + unpackExtent(xi, &xo, (f_expand *)fdi, + ((PROT_EXEC & prot) ? f_unf : 0) ); + } + // Linux does not fixup the low end, so neither do we. + //if (PROT_WRITE & prot) { + // bzero(addr, frag); // fragment at lo end + //} + frag = (-mlen) &~ PAGE_MASK; // distance to next page boundary + if (PROT_WRITE & prot) { // note: read-only .bss not supported here + bzero(mlen+addr, frag); // fragment at hi end + } + if (xi) { +#if defined(__i386__) /*{*/ + void *const hatch = make_hatch_x86(phdr, reloc); + if (0!=hatch) { + /* always update AT_NULL, especially for compressed PT_INTERP */ + auxv_up((Elf32_auxv_t *)(~1 & (int)av), AT_NULL, (unsigned)hatch); + } +#elif defined(__arm__) /*}{*/ + void *const hatch = make_hatch_arm(phdr, reloc); + if (0!=hatch) { + auxv_up((Elf32_auxv_t *)(void *)av, AT_NULL, (unsigned)hatch); + } +#endif /*}*/ + if (0!=mprotect(addr, mlen, prot)) { + err_exit(10); +ERR_LAB + } + } + addr += mlen + frag; /* page boundary on hi end */ + if (addr < haddr) { // need pages for .bss + if (addr != mmap(addr, haddr - addr, prot, + MAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS, -1, 0 ) ) { + err_exit(9); + } + } +#if defined(__i386__) /*{*/ + else if (xi) { // cleanup if decompressor overrun crosses page boundary + mlen = ~PAGE_MASK & (3+ mlen); + if (mlen<=3) { // page fragment was overrun buffer only + munmap(addr, mlen); + } + } +#endif /*}*/ + } + if (!xi) { // 2nd call (PT_INTERP); close()+check is smaller here + if (0!=close(fdi)) { + err_exit(11); + } + } + else { // 1st call (main); also have (0!=av) here + if (ET_DYN!=ehdr->e_type) { + // Needed only if compressed shell script invokes compressed shell. + do_brk(v_brk); + } + } + if (0!=p_reloc) { + *p_reloc = reloc; + } + return ehdr->e_entry + reloc; +} + + +/************************************************************************* +// upx_main - called by our entry code +// +// This function is optimized for size. +**************************************************************************/ + +void *upx_main( + Elf32_auxv_t *const av, + unsigned const sz_compressed, + f_expand *const f_decompress, + f_unfilter */*const*/ f_unfilter, + struct Extent xo, + struct Extent xi, + unsigned const volatile dynbase +) __asm__("upx_main"); + +void *upx_main( + Elf32_auxv_t *const av, + unsigned const sz_compressed, + f_expand *const f_decompress, + f_unfilter */*const*/ f_unf, + struct Extent xo, // {sz_unc, ehdr} for ELF headers + struct Extent xi, // {sz_cpr, &b_info} for ELF headers + unsigned const volatile dynbase // value+result: compiler must not change +) +{ + Elf32_Ehdr *const ehdr = (Elf32_Ehdr *)(void *)xo.buf; // temp char[MAX_ELF_HDR+OVERHEAD] + Elf32_Phdr const *phdr = (Elf32_Phdr const *)(1+ ehdr); + Elf32_Addr reloc; + Elf32_Addr entry; + + // sizeof(Ehdr+Phdrs), compressed; including b_info header + size_t const sz_pckhdrs = xi.size; + + DPRINTF((STR_upx_main(), + av, sz_compressed, f_decompress, f_unf, &xo, xo.size, xo.buf, + &xi, xi.size, xi.buf, dynbase)); +#if defined(__i386__) /*{*/ + f_unf = (f_unfilter *)(2+ (long)f_decompress); +#endif /*}*/ + + // Uncompress Ehdr and Phdrs. + unpackExtent(&xi, &xo, f_decompress, 0); + + // Prepare to decompress the Elf headers again, into the first PT_LOAD. + xi.buf -= sz_pckhdrs; + xi.size = sz_compressed; + + // Some kernels omit AT_PHNUM,AT_PHENT,AT_PHDR because this stub has no PT_INTERP. + // That is "too much" optimization. Linux 2.6.x seems to give all AT_*. + //auxv_up(av, AT_PAGESZ, PAGE_SIZE); /* ld-linux.so.2 does not need this */ + auxv_up(av, AT_PHNUM , ehdr->e_phnum); + auxv_up(av, AT_PHENT , ehdr->e_phentsize); + auxv_up(av, AT_PHDR , dynbase + (unsigned)(1+(Elf32_Ehdr *)phdr->p_vaddr)); + // AT_PHDR.a_un.a_val is set again by do_xmap if PT_PHDR is present. + // This is necessary for ET_DYN if|when we override a prelink address. + + entry = do_xmap((int)f_decompress, ehdr, &xi, av, &reloc, f_unf); + auxv_up(av, AT_ENTRY , entry); // might not be necessary? + + { // Map PT_INTERP program interpreter + int j; + for (j=0; j < ehdr->e_phnum; ++phdr, ++j) if (PT_INTERP==phdr->p_type) { + int const fdi = open(reloc + (char const *)phdr->p_vaddr, O_RDONLY, 0); + if (0 > fdi) { + err_exit(18); + } + if (MAX_ELF_HDR!=read(fdi, (void *)ehdr, MAX_ELF_HDR)) { +ERR_LAB + err_exit(19); + } + entry = do_xmap(fdi, ehdr, 0, 0, 0, 0); + break; + } + } + + return (void *)entry; +} + + +/* +vi:ts=4:et:nowrap +*/ + diff --git a/src/stub/src/include/BSD.h b/src/stub/src/include/BSD.h new file mode 100644 index 00000000..ab67d416 --- /dev/null +++ b/src/stub/src/include/BSD.h @@ -0,0 +1,348 @@ +/* BSD.h -- common stuff to the BSD stub loaders + + This file is part of the UPX executable compressor. + + Copyright (C) 1996-2006 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2006 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 + + */ + + +// NOTE: +// to avoid endless problems with moving libc and kernel headers, this +// section is now completely freestanding + + +#if defined(__GNUC__) +# if defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__) +# define ACC_CC_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__) +# elif defined(__GNUC_MINOR__) +# define ACC_CC_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100) +# else +# define ACC_CC_GNUC (__GNUC__ * 0x10000L) +# endif +#endif + +#define ACC_UNUSED(var) ((void) var) + + +/************************************************************************* +// +**************************************************************************/ + +// +typedef long ptrdiff_t; +typedef long ssize_t; +typedef unsigned long size_t; +// +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef int int32_t; +typedef unsigned uint32_t; +#if (ACC_CC_GNUC >= 0x020800ul) +__extension__ typedef long long int64_t; +__extension__ typedef unsigned long long uint64_t; +#elif defined(_WIN32) +typedef __int64 int64_t; +typedef unsigned __int64 uint64_t; +#else +typedef long long int64_t; +typedef unsigned long long uint64_t; +#endif +typedef size_t uintptr_t; + +// +typedef long off_t; +//typedef int64_t off64_t; +//typedef size_t caddr_t; +typedef void* caddr_t; +typedef unsigned pid_t; + +struct rusage; +struct timex; +struct timeval { + unsigned tv_sec; + unsigned tv_usec; +}; +struct timespec { + unsigned tv_sec; + long tv_nsec; +}; + + +// misc constants + +#if defined(__amd64__) || defined(__powerpc64__) +#define PAGE_MASK (~0ul<<12) // discards the offset, keeps the page +#define PAGE_SIZE ( 1ul<<12) +#elif defined(__i386__) || defined(__powerpc__) || defined(__arm__) +#define PAGE_MASK (~0ul<<12) // discards the offset, keeps the page +#define PAGE_SIZE ( 1ul<<12) +#endif + +#define SEEK_SET 0 +#define SEEK_CUR 1 + +#define O_RDONLY 00 +#define O_WRONLY 01 +#define O_RDWR 02 +#define O_CREAT 0100 +#define O_EXCL 0200 + +#define R_OK 4 +#define W_OK 2 +#define X_OK 1 +#define F_OK 0 + +#define F_GETFD 1 +#define F_SETFD 2 +#define FD_CLOEXEC 1 + +// +#define ENOENT 2 +#define EINTR 4 + +// +#define PROT_READ 0x1 +#define PROT_WRITE 0x2 +#define PROT_EXEC 0x4 +#define PROT_NONE 0x0 + +#define MAP_SHARED 0x01 +#define MAP_PRIVATE 0x02 +#define MAP_FIXED 0x10 +#define MAP_ANONYMOUS 0x1000 /* differs from Linux */ +#define MAP_DENYWRITE 0x0 /* does not exist on BSD ? */ + + +/************************************************************************* +// i386 syscalls +// +// Because of different versions and subtle bugs +// in both gcc and egcs we define all syscalls manually. +// +// Also, errno conversion is not necessary in our case, and we +// use optimized assembly statements to further decrease the size. +**************************************************************************/ + +extern void *brk(void *); +extern int close(int); +extern void *mmap(void *, size_t, int, int, int, unsigned); +extern int munmap(void *, size_t); +extern int mprotect(void const *, size_t, int); +extern int open(char const *, unsigned, unsigned); +extern ssize_t read(int, void *, size_t); +extern ssize_t write(int, char const *, size_t); +void exit(int) __attribute__((noreturn)); + +/************************************************************************* +// +**************************************************************************/ + +typedef uint16_t Elf32_Half; +typedef uint16_t Elf64_Half; +typedef uint32_t Elf32_Word; +typedef int32_t Elf32_Sword; +typedef uint32_t Elf64_Word; +typedef int32_t Elf64_Sword; +typedef uint64_t Elf32_Xword; +typedef int64_t Elf32_Sxword; +typedef uint64_t Elf64_Xword; +typedef int64_t Elf64_Sxword; +typedef uint32_t Elf32_Addr; +typedef uint64_t Elf64_Addr; +typedef uint32_t Elf32_Off; +typedef uint64_t Elf64_Off; +typedef uint16_t Elf32_Section; +typedef uint16_t Elf64_Section; +typedef Elf32_Half Elf32_Versym; +typedef Elf64_Half Elf64_Versym; + + +#define EI_NIDENT 16 + +typedef struct +{ + unsigned char e_ident[EI_NIDENT]; + Elf32_Half e_type; + Elf32_Half e_machine; + Elf32_Word e_version; + Elf32_Addr e_entry; + Elf32_Off e_phoff; + Elf32_Off e_shoff; + Elf32_Word e_flags; + Elf32_Half e_ehsize; + Elf32_Half e_phentsize; + Elf32_Half e_phnum; + Elf32_Half e_shentsize; + Elf32_Half e_shnum; + Elf32_Half e_shstrndx; +} Elf32_Ehdr; + +typedef struct +{ + unsigned char e_ident[EI_NIDENT]; + Elf64_Half e_type; + Elf64_Half e_machine; + Elf64_Word e_version; + Elf64_Addr e_entry; + Elf64_Off e_phoff; + Elf64_Off e_shoff; + Elf64_Word e_flags; + Elf64_Half e_ehsize; + Elf64_Half e_phentsize; + Elf64_Half e_phnum; + Elf64_Half e_shentsize; + Elf64_Half e_shnum; + Elf64_Half e_shstrndx; +} Elf64_Ehdr; + +typedef struct +{ + Elf32_Word p_type; + Elf32_Off p_offset; + Elf32_Addr p_vaddr; + Elf32_Addr p_paddr; + Elf32_Word p_filesz; + Elf32_Word p_memsz; + Elf32_Word p_flags; + Elf32_Word p_align; +} Elf32_Phdr; + +typedef struct +{ + Elf64_Word p_type; + Elf64_Word p_flags; + Elf64_Off p_offset; + Elf64_Addr p_vaddr; + Elf64_Addr p_paddr; + Elf64_Xword p_filesz; + Elf64_Xword p_memsz; + Elf64_Xword p_align; +} Elf64_Phdr; + +typedef struct +{ + uint32_t a_type; + union { + uint32_t a_val; + } a_un; +} Elf32_auxv_t; + +typedef struct +{ + uint64_t a_type; + union + { + uint64_t a_val; + } a_un; +} Elf64_auxv_t; + +#define AT_NULL 0 +#define AT_IGNORE 1 +#define AT_PHDR 3 +#define AT_PHENT 4 +#define AT_PHNUM 5 +#define AT_PAGESZ 6 +#define AT_ENTRY 9 + +#define ET_EXEC 2 +#define ET_DYN 3 + +#define PF_X 1 +#define PF_W 2 +#define PF_R 4 + +#define PT_LOAD 1 +#define PT_INTERP 3 +#define PT_PHDR 6 + + +/************************************************************************* +// UPX stuff +**************************************************************************/ + +// !!! must be the same as in p_unix.h !!! +#define OVERHEAD 2048 + +#define UPX_MAGIC_LE32 0x21585055 // "UPX!" + +// patch constants for our loader (le32 format) +#define UPX1 0x31585055 // "UPX1" +#define UPX2 0x32585055 // "UPX2" +#define UPX3 0x33585055 // "UPX4" +#define UPX4 0x34585055 // "UPX4" +#define UPX5 0x35585055 // "UPX5" + + +typedef int nrv_int; +typedef int nrv_int32; +typedef unsigned int nrv_uint; +typedef unsigned int nrv_uint32; +#define nrv_byte unsigned char +#define nrv_bytep unsigned char * +#define nrv_voidp void * + + +// From ../p_unix.h +struct b_info { // 12-byte header before each compressed block + uint32_t sz_unc; // uncompressed_size + uint32_t sz_cpr; // compressed_size + unsigned char b_method; // compression algorithm + unsigned char b_ftid; // filter id + unsigned char b_cto8; // filter parameter + unsigned char b_unused; +}; + +struct l_info // 12-byte trailer in header for loader (offset 116) +{ + uint32_t l_checksum; + uint32_t l_magic; + uint16_t l_lsize; + uint8_t l_version; + uint8_t l_format; +}; + +struct p_info // 12-byte packed program header follows stub loader +{ + uint32_t p_progid; + uint32_t p_filesize; + uint32_t p_blocksize; +}; + + +#define CONST_CAST(type, var) \ + ((type) ((uintptr_t) (var))) + + +#if (ACC_CC_GNUC >= 0x030300) +# define __attribute_cdecl __attribute__((__cdecl__, __used__)) +#elif (ACC_CC_GNUC >= 0x020700) +# define __attribute_cdecl __attribute__((__cdecl__)) +#else +# define __attribute_cdecl +#endif + + +/* +vi:ts=4:et:nowrap +*/ +