all: canonicalize win32 and win64 file names

This commit is contained in:
Markus F.X.J. Oberhumer 2023-02-10 09:49:29 +01:00
parent b8d9c2b755
commit f584c91386
38 changed files with 1061 additions and 326 deletions

View File

@ -366,8 +366,8 @@ jobs:
- { zig_target: x86_64-macos.13-none }
- { zig_target: x86_64-windows-gnu }
env:
# 2023-02-05
ZIG_DIST_VERSION: 0.11.0-dev.1575+289e8fab7
# 2023-02-10
ZIG_DIST_VERSION: 0.11.0-dev.1593+d24ebf1d1
# for zig-cc wrapper scripts (see below):
ZIG_CPPFLAGS: -DUPX_DOCTEST_CONFIG_MULTITHREADING
ZIG_FLAGS: ${{ matrix.zig_flags }}

View File

@ -316,7 +316,7 @@ endif()
if(CMAKE_INSTALL_PREFIX AND DEFINED CMAKE_INSTALL_FULL_BINDIR)
install(TARGETS upx DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}")
install(FILES
COPYING LICENSE NEWS.md README THANKS doc/upx-doc.html doc/upx-doc.txt
COPYING LICENSE NEWS README THANKS doc/upx-doc.html doc/upx-doc.txt
DESTINATION "${CMAKE_INSTALL_FULL_DOCDIR}"
)
install(FILES doc/upx.1 DESTINATION "${CMAKE_INSTALL_FULL_MANDIR}/man1")

View File

@ -1,5 +1,5 @@
==================================================================
### User visible changes for UPX
User visible changes for UPX
==================================================================
Changes in 4.0.3 (XX XXX 2023):
@ -152,7 +152,7 @@ Changes in 2.92 beta (23 Jan 2007):
Changes in 2.91 beta (29 Nov 2006):
* assorted bug fixes
* arm/pe: fix "missing" icon & version info resource problem for wince 5
* win32/arm: fix "missing" icon & version info resource problem for WinCE 5
* win32/pe & arm/pe: added option --compress-icons=3 to compress all icons
Changes in 2.90 beta (08 Oct 2006):
@ -206,7 +206,7 @@ Changes in 1.95 beta (09 Apr 2006):
* win32/pe: really worked around R6002 runtime errors
Changes in 1.94 beta (11 Mar 2006):
* new format: added support for arm/pe (ARM executables running on WinCE)
* new format: added support for win32/arm (ARM executables running on WinCE)
* new format: added support for linux elf/amd64
* new format: added support for linux elf/ppc32
* new format: added support for mach/ppc32 (Apple Mac OS X)
@ -539,3 +539,5 @@ Changes in 0.20 (05 Jul 1998)
Changes in 0.05 (26 May 1998)
* first public beta release
* based on experience gained from our previous packers DJP (1996),
lzop (1996) and mfxpak (atari/tos, 1990)

View File

@ -518,7 +518,7 @@ constexpr bool string_ge(const char *a, const char *b) {
#define UPX_E_INVALID_ARGUMENT (-10)
// Executable formats. Note: big endian types are >= 128.
// Executable formats (info: big endian types are >= 128); DO NOT CHANGE
#define UPX_F_DOS_COM 1
#define UPX_F_DOS_SYS 2
#define UPX_F_DOS_EXE 3
@ -527,7 +527,7 @@ constexpr bool string_ge(const char *a, const char *b) {
//#define UPX_F_VXD_LE 6 // NOT IMPLEMENTED
#define UPX_F_DOS_EXEH 7 // OBSOLETE
#define UPX_F_TMT_ADAM 8
#define UPX_F_WIN32_PE 9
#define UPX_F_W32PE_I386 9
#define UPX_F_LINUX_i386 10
//#define UPX_F_WIN16_NE 11 // NOT IMPLEMENTED
#define UPX_F_LINUX_ELF_i386 12
@ -539,52 +539,47 @@ constexpr bool string_ge(const char *a, const char *b) {
#define UPX_F_PS1_EXE 18
#define UPX_F_VMLINUX_i386 19
#define UPX_F_LINUX_ELFI_i386 20
#define UPX_F_WINCE_ARM_PE 21
#define UPX_F_LINUX_ELF64_AMD 22
#define UPX_F_LINUX_ELF32_ARMEL 23
#define UPX_F_W32PE_ARM 21
#define UPX_F_LINUX_ELF64_AMD64 22
#define UPX_F_LINUX_ELF32_ARM 23
#define UPX_F_BSD_i386 24
#define UPX_F_BSD_ELF_i386 25
#define UPX_F_BSD_SH_i386 26
#define UPX_F_VMLINUX_AMD64 27
#define UPX_F_VMLINUX_ARMEL 28
#define UPX_F_VMLINUX_ARM 28
#define UPX_F_MACH_i386 29
#define UPX_F_LINUX_ELF32_MIPSEL 30
#define UPX_F_VMLINUZ_ARMEL 31
#define UPX_F_MACH_ARMEL 32
#define UPX_F_VMLINUZ_ARM 31
#define UPX_F_MACH_ARM 32
#define UPX_F_DYLIB_i386 33
#define UPX_F_MACH_AMD64 34
#define UPX_F_DYLIB_AMD64 35
#define UPX_F_WIN64_PEP 36
#define UPX_F_MACH_ARM64EL 37
//#define UPX_F_MACH_PPC64LE 38 // DOES NOT EXIST
#define UPX_F_LINUX_ELFPPC64LE 39
#define UPX_F_W64PE_AMD64 36
#define UPX_F_MACH_ARM64 37
//#define UPX_F_MACH_PPC64LE 38 // DOES NOT EXIST
#define UPX_F_LINUX_ELF64_PPC64LE 39
#define UPX_F_VMLINUX_PPC64LE 40
//#define UPX_F_DYLIB_PPC64LE 41 // DOES NOT EXIST
#define UPX_F_LINUX_ELF64_ARM 42
//#define UPX_F_DYLIB_PPC64LE 41 // DOES NOT EXIST
#define UPX_F_LINUX_ELF64_ARM64 42
#define UPX_F_W64PE_ARM64 43 // NOT YET IMPLEMENTED
#define UPX_F_W64PE_ARM64EC 44 // NOT YET IMPLEMENTED
#define UPX_F_ATARI_TOS 129
//#define UPX_F_SOLARIS_SPARC 130 // NOT IMPLEMENTED
#define UPX_F_MACH_PPC32 131
#define UPX_F_LINUX_ELFPPC32 132
#define UPX_F_LINUX_ELF32_PPC32 132
#define UPX_F_LINUX_ELF32_ARMEB 133
#define UPX_F_MACH_FAT 134
#define UPX_F_VMLINUX_ARMEB 135
#define UPX_F_VMLINUX_PPC32 136
#define UPX_F_LINUX_ELF32_MIPSEB 137
#define UPX_F_LINUX_ELF32_MIPS 137
#define UPX_F_DYLIB_PPC32 138
#define UPX_F_MACH_PPC64 139
#define UPX_F_LINUX_ELFPPC64 140
#define UPX_F_LINUX_ELF64_PPC64 140
#define UPX_F_VMLINUX_PPC64 141
#define UPX_F_DYLIB_PPC64 142
// compression methods - DO NOT CHANGE
// compression methods; DO NOT CHANGE
#define M_NRV2B_LE32 2
#define M_NRV2B_8 3
#define M_NRV2B_LE16 4

View File

@ -275,7 +275,7 @@ void show_help(int verbose)
" --le produce LE output [default: EXE]\n"
"\n");
fg = con_fg(f,FG_YELLOW);
con_fprintf(f,"Options for win32/pe, win64/pe, rtm32/pe & arm/pe:\n");
con_fprintf(f,"Options for win32/pe, win64/pe & rtm32/pe:\n");
fg = con_fg(f,fg);
con_fprintf(f,
" --compress-exports=0 do not compress the export section\n"

View File

@ -26,6 +26,7 @@
*/
#pragma once
#ifndef __UPX_P_ELF_H
#define __UPX_P_ELF_H 1

View File

@ -30,6 +30,7 @@
*/
#pragma once
#ifndef __UPX_P_LX_ELF_H //{
#define __UPX_P_LX_ELF_H 1
@ -457,7 +458,7 @@ class PackLinuxElf64amd : public PackLinuxElf64Le
public:
PackLinuxElf64amd(InputFile *f);
virtual ~PackLinuxElf64amd();
virtual int getFormat() const override { return UPX_F_LINUX_ELF64_AMD; }
virtual int getFormat() const override { return UPX_F_LINUX_ELF64_AMD64; }
virtual const char *getName() const override { return "linux/amd64"; }
virtual const char *getFullName(const options_t *) const override { return "amd64-linux.elf"; }
virtual const int *getFilters() const override;
@ -474,7 +475,7 @@ class PackLinuxElf64arm : public PackLinuxElf64Le
public:
PackLinuxElf64arm(InputFile *f);
virtual ~PackLinuxElf64arm();
virtual int getFormat() const override { return UPX_F_LINUX_ELF64_ARM; }
virtual int getFormat() const override { return UPX_F_LINUX_ELF64_ARM64; }
virtual const char *getName() const override { return "linux/arm64"; }
virtual const char *getFullName(const options_t *) const override { return "arm64-linux.elf"; }
virtual const int *getFilters() const override;
@ -496,7 +497,7 @@ class PackLinuxElf32ppc : public PackLinuxElf32Be
public:
PackLinuxElf32ppc(InputFile *f);
virtual ~PackLinuxElf32ppc();
virtual int getFormat() const override { return UPX_F_LINUX_ELFPPC32; }
virtual int getFormat() const override { return UPX_F_LINUX_ELF32_PPC32; }
virtual const char *getName() const override { return "linux/ppc32"; }
virtual const char *getFullName(const options_t *) const override { return "powerpc-linux.elf"; }
virtual const int *getFilters() const override;
@ -516,7 +517,7 @@ class PackLinuxElf64ppcle : public PackLinuxElf64Le
public:
PackLinuxElf64ppcle(InputFile *f);
virtual ~PackLinuxElf64ppcle();
virtual int getFormat() const override { return UPX_F_LINUX_ELFPPC64LE; }
virtual int getFormat() const override { return UPX_F_LINUX_ELF64_PPC64LE; }
virtual const char *getName() const override { return "linux/ppc64le"; }
virtual const char *getFullName(const options_t *) const override { return "powerpc64le-linux.elf"; }
virtual const int *getFilters() const override;
@ -535,7 +536,7 @@ class PackLinuxElf64ppc : public PackLinuxElf64Be
public:
PackLinuxElf64ppc(InputFile *f);
virtual ~PackLinuxElf64ppc();
virtual int getFormat() const override { return UPX_F_LINUX_ELFPPC64; }
virtual int getFormat() const override { return UPX_F_LINUX_ELF64_PPC64; }
virtual const char *getName() const override { return "linux/ppc64"; }
virtual const char *getFullName(const options_t *) const override { return "powerpc64-linux.elf"; }
virtual const int *getFilters() const override;
@ -648,7 +649,7 @@ class PackLinuxElf32armLe : public PackLinuxElf32Le
public:
PackLinuxElf32armLe(InputFile *f);
virtual ~PackLinuxElf32armLe();
virtual int getFormat() const override { return UPX_F_LINUX_ELF32_ARMEL; }
virtual int getFormat() const override { return UPX_F_LINUX_ELF32_ARM; }
virtual const char *getName() const override { return "linux/arm"; }
virtual const char *getFullName(const options_t *) const override { return "arm-linux.elf"; }
virtual const int *getFilters() const override;
@ -688,7 +689,7 @@ class PackLinuxElf32mipseb : public PackLinuxElf32Be
public:
PackLinuxElf32mipseb(InputFile *f);
virtual ~PackLinuxElf32mipseb();
virtual int getFormat() const override { return UPX_F_LINUX_ELF32_MIPSEB; }
virtual int getFormat() const override { return UPX_F_LINUX_ELF32_MIPS; }
virtual const char *getName() const override { return "linux/mips"; }
virtual const char *getFullName(const options_t *) const override { return "mips-linux.elf"; }
virtual const int *getFilters() const override;

View File

@ -1141,7 +1141,7 @@ class PackMachARMEL : public PackMachBase<MachClass_LE32>
public:
PackMachARMEL(InputFile *f);
virtual int getFormat() const override { return UPX_F_MACH_ARMEL; }
virtual int getFormat() const override { return UPX_F_MACH_ARM; }
virtual const char *getName() const override { return "macho/arm"; }
virtual const char *getFullName(const options_t *) const override { return "arm-darwin.macho"; }
protected:
@ -1194,7 +1194,7 @@ class PackMachARM64EL : public PackMachBase<MachClass_LE64>
public:
PackMachARM64EL(InputFile *f);
virtual int getFormat() const override { return UPX_F_MACH_ARM64EL; }
virtual int getFormat() const override { return UPX_F_MACH_ARM64; }
virtual const char *getName() const override { return "macho/arm64"; }
virtual const char *getFullName(const options_t *) const override { return "arm64-darwin.macho"; }
protected:

View File

@ -125,7 +125,7 @@ class PackVmlinuxARMEL : public PackVmlinuxBase<ElfClass_LE32>
public:
PackVmlinuxARMEL(InputFile *f) : super(f, Ehdr::EM_ARM,
Ehdr::ELFCLASS32, Ehdr::ELFDATA2LSB, "decompress_kernel") { }
virtual int getFormat() const override { return UPX_F_VMLINUX_ARMEL; }
virtual int getFormat() const override { return UPX_F_VMLINUX_ARM; }
virtual const char *getName() const override { return "vmlinux/arm"; }
virtual const char *getFullName(const options_t *) const override { return "arm-linux.kernel.vmlinux"; }
virtual const int *getCompressionMethods(int method, int level) const override;

View File

@ -750,7 +750,7 @@ int PackVmlinuzARMEL::readFileHeader()
return 0;
}
}
return UPX_F_VMLINUZ_ARMEL;
return UPX_F_VMLINUZ_ARM;
}
int PackVmlinuzARMEL::decompressKernel()

View File

@ -131,7 +131,7 @@ class PackVmlinuzARMEL : public Packer
public:
PackVmlinuzARMEL(InputFile *f);
virtual int getVersion() const override { return 13; }
virtual int getFormat() const override{ return UPX_F_VMLINUZ_ARMEL; }
virtual int getFormat() const override{ return UPX_F_VMLINUZ_ARM; }
virtual const char *getName() const override { return "vmlinuz/arm"; }
virtual const char *getFullName(const options_t *) const override { return "arm-linux.kernel.vmlinuz"; }
virtual const int *getCompressionMethods(int method, int level) const override;

View File

@ -1,4 +1,4 @@
/* p_armpe.cpp --
/* p_w32pe_arm.cpp --
This file is part of the UPX executable compressor.
@ -30,25 +30,25 @@
#include "filter.h"
#include "packer.h"
#include "pefile.h"
#include "p_armpe.h"
#include "p_w32pe_arm.h"
#include "linker.h"
static const CLANG_FORMAT_DUMMY_STATEMENT
#include "stub/arm.v4a-wince.pe.h"
#include "stub/arm.v4a-win32.pe.h"
static const CLANG_FORMAT_DUMMY_STATEMENT
#include "stub/arm.v4t-wince.pe.h"
#include "stub/arm.v4t-win32.pe.h"
/*************************************************************************
//
**************************************************************************/
PackArmPe::PackArmPe(InputFile *f) : super(f) {}
PackW32PeArm::PackW32PeArm(InputFile *f) : super(f) {}
PackArmPe::~PackArmPe() {}
PackW32PeArm::~PackW32PeArm() {}
Linker *PackArmPe::newLinker() const { return new ElfLinkerArmLE; }
Linker *PackW32PeArm::newLinker() const { return new ElfLinkerArmLE; }
const int *PackArmPe::getCompressionMethods(int method, int level) const {
const int *PackW32PeArm::getCompressionMethods(int method, int level) const {
static const int m_all[] = {M_NRV2B_8, M_NRV2E_8, M_LZMA, M_END};
static const int m_lzma[] = {M_LZMA, M_END};
static const int m_nrv2b[] = {M_NRV2B_8, M_END};
@ -68,7 +68,7 @@ const int *PackArmPe::getCompressionMethods(int method, int level) const {
return m_nrv2e;
}
const int *PackArmPe::getFilters() const {
const int *PackW32PeArm::getFilters() const {
static const int filters[] = {0x50, FT_END};
return filters;
}
@ -77,7 +77,7 @@ const int *PackArmPe::getFilters() const {
// import handling
**************************************************************************/
void PackArmPe::processImports2(unsigned myimport, unsigned iat_off) // pass 2
void PackW32PeArm::processImports2(unsigned myimport, unsigned iat_off) // pass 2
{
PeFile::processImports2(myimport, iat_off);
@ -89,7 +89,7 @@ void PackArmPe::processImports2(unsigned myimport, unsigned iat_off) // pass 2
}
}
void PackArmPe::addStubImports() {
void PackW32PeArm::addStubImports() {
// the order of procedure names below should match the
// assumptions of the assembly stubs
// WARNING! these names are sorted alphanumerically by the ImportLinker
@ -98,12 +98,12 @@ void PackArmPe::addStubImports() {
addKernelImport("LoadLibraryW");
}
void PackArmPe::processTls(Interval *) // pass 1
void PackW32PeArm::processTls(Interval *) // pass 1
{
if ((sotls = ALIGN_UP(IDSIZE(PEDIR_TLS), 4u)) == 0)
return;
// never should happen on wince
// never should happen on win32/arm
throwCantPack("Static TLS entries found. Send a report please.");
}
@ -111,17 +111,19 @@ void PackArmPe::processTls(Interval *) // pass 1
// pack
**************************************************************************/
bool PackArmPe::canPack() {
if (!readFileHeader() || (ih.cpu != 0x1c0 && ih.cpu != 0x1c2))
bool PackW32PeArm::canPack() {
if (!readFileHeader())
return false;
use_thumb_stub |= ih.cpu == 0x1c2 || (ih.entry & 1) == 1;
if (ih.cpu != IMAGE_FILE_MACHINE_ARM && ih.cpu != IMAGE_FILE_MACHINE_THUMB)
return false;
use_thumb_stub |= ih.cpu == IMAGE_FILE_MACHINE_THUMB || (ih.entry & 1) == 1;
use_thumb_stub |= (opt->cpu == opt->CPU_8086); // FIXME
return true;
}
void PackArmPe::buildLoader(const Filter *ft) {
const unsigned char *loader = use_thumb_stub ? stub_arm_v4t_wince_pe : stub_arm_v4a_wince_pe;
unsigned size = use_thumb_stub ? sizeof(stub_arm_v4t_wince_pe) : sizeof(stub_arm_v4a_wince_pe);
void PackW32PeArm::buildLoader(const Filter *ft) {
const unsigned char *loader = use_thumb_stub ? stub_arm_v4t_win32_pe : stub_arm_v4a_win32_pe;
unsigned size = use_thumb_stub ? sizeof(stub_arm_v4t_win32_pe) : sizeof(stub_arm_v4a_win32_pe);
// prepare loader
initLoader(loader, size);
@ -160,15 +162,19 @@ void PackArmPe::buildLoader(const Filter *ft) {
addLoader("IDENTSTR,UPX1HEAD");
}
bool PackArmPe::handleForceOption() {
return (ih.cpu != 0x1c0 && ih.cpu != 0x1c2) || (ih.opthdrsize != 0xe0) ||
((ih.flags & EXECUTABLE) == 0) || (ih.entry == 0 /*&& !isdll*/) ||
(ih.ddirsentries != 16);
// || IDSIZE(PEDIR_EXCEPTION) // is this used on arm?
// || IDSIZE(PEDIR_COPYRIGHT)
bool PackW32PeArm::needForceOption() const {
// return true if we need `--force` to pack this file
bool r = false;
r |= (ih.opthdrsize != 0xe0);
r |= ((ih.flags & EXECUTABLE) == 0);
r |= (ih.entry == 0 /*&& !isdll*/);
r |= (ih.ddirsentries != 16);
//// r |= (IDSIZE(PEDIR_EXCEPTION) != 0); // is this used on arm?
//// r |= (IDSIZE(PEDIR_COPYRIGHT) != 0);
return r;
}
void PackArmPe::callCompressWithFilters(Filter &ft, int filter_strategy, unsigned ih_codebase) {
void PackW32PeArm::callCompressWithFilters(Filter &ft, int filter_strategy, unsigned ih_codebase) {
// limit stack size needed for runtime decompression
upx_compress_config_t cconf;
cconf.reset();
@ -176,7 +182,7 @@ void PackArmPe::callCompressWithFilters(Filter &ft, int filter_strategy, unsigne
compressWithFilters(&ft, 2048, &cconf, filter_strategy, ih_codebase, rvamin, 0, nullptr, 0);
}
void PackArmPe::addNewRelocations(Reloc &rel, unsigned upxsection) {
void PackW32PeArm::addNewRelocations(Reloc &rel, unsigned upxsection) {
static const char *const symbols_to_relocate[] = {"ONAM", "BIMP", "BREL", "FIBE",
"FIBS", "ENTR", "DST0", "SRC0"};
for (unsigned s2r = 0; s2r < TABLESIZE(symbols_to_relocate); s2r++) {
@ -186,12 +192,12 @@ void PackArmPe::addNewRelocations(Reloc &rel, unsigned upxsection) {
}
}
unsigned PackArmPe::getProcessImportParam(unsigned upxsection) {
unsigned PackW32PeArm::getProcessImportParam(unsigned upxsection) {
return linker->getSymbolOffset("IATT") + upxsection;
}
void PackArmPe::defineSymbols(unsigned ncsection, unsigned, unsigned, unsigned ic,
unsigned s1addr) {
void PackW32PeArm::defineSymbols(unsigned ncsection, unsigned, unsigned, unsigned ic,
unsigned s1addr) {
const unsigned onam = ncsection + soxrelocs + ih.imagebase;
linker->defineSymbol("start_of_dll_names", onam);
linker->defineSymbol("start_of_imports", ih.imagebase + rvamin + cimports);
@ -206,13 +212,13 @@ void PackArmPe::defineSymbols(unsigned ncsection, unsigned, unsigned, unsigned i
defineDecompressorSymbols();
}
void PackArmPe::setOhDataBase(const pe_section_t *osection) { oh.database = osection[2].vaddr; }
void PackW32PeArm::setOhDataBase(const pe_section_t *osection) { oh.database = osection[2].vaddr; }
void PackArmPe::setOhHeaderSize(const pe_section_t *osection) {
void PackW32PeArm::setOhHeaderSize(const pe_section_t *osection) {
oh.headersize = osection[1].rawdataptr;
}
void PackArmPe::pack(OutputFile *fo) {
void PackW32PeArm::pack(OutputFile *fo) {
super::pack0(fo, (1u << IMAGE_SUBSYSTEM_WINDOWS_CE_GUI), 0x10000, true);
}

View File

@ -1,4 +1,4 @@
/* p_armpe.h --
/* p_w32pe_arm.h --
This file is part of the UPX executable compressor.
@ -26,27 +26,25 @@
*/
#pragma once
#ifndef UPX_P_ARMPE_H__
#define UPX_P_ARMPE_H__ 1
/*************************************************************************
// arm/pe
//
**************************************************************************/
class PackArmPe final : public PeFile32 {
class PackW32PeArm final : public PeFile32 {
typedef PeFile32 super;
public:
PackArmPe(InputFile *f);
virtual ~PackArmPe();
virtual int getFormat() const override { return UPX_F_WINCE_ARM_PE; }
virtual const char *getName() const override { return "arm/pe"; }
virtual const char *getFullName(const options_t *) const override { return "arm-wince.pe"; }
PackW32PeArm(InputFile *f);
virtual ~PackW32PeArm();
virtual int getFormat() const override { return UPX_F_W32PE_ARM; }
virtual const char *getName() const override { return "win32/arm"; }
virtual const char *getFullName(const options_t *) const override { return "arm-win32.pe"; }
virtual const int *getCompressionMethods(int method, int level) const override;
virtual const int *getFilters() const override;
virtual void defineFilterSymbols(const Filter *) override {}
virtual bool handleForceOption() override;
virtual bool needForceOption() const override;
virtual void callCompressWithFilters(Filter &, int filter_strategy,
unsigned ih_codebase) override;
virtual void defineSymbols(unsigned ncsection, unsigned upxsection, unsigned sizeof_oh,
@ -72,6 +70,4 @@ protected:
bool use_thumb_stub = false;
};
#endif /* already included */
/* vim:set ts=4 sw=4 et: */

View File

@ -1,4 +1,4 @@
/* p_w32pe.cpp --
/* p_w32pe_i386.cpp --
This file is part of the UPX executable compressor.
@ -30,7 +30,7 @@
#include "filter.h"
#include "packer.h"
#include "pefile.h"
#include "p_w32pe.h"
#include "p_w32pe_i386.h"
#include "linker.h"
static const CLANG_FORMAT_DUMMY_STATEMENT
@ -40,28 +40,28 @@ static const CLANG_FORMAT_DUMMY_STATEMENT
//
**************************************************************************/
PackW32Pe::PackW32Pe(InputFile *f) : super(f) {}
PackW32PeI386::PackW32PeI386(InputFile *f) : super(f) {}
PackW32Pe::~PackW32Pe() {}
PackW32PeI386::~PackW32PeI386() {}
const int *PackW32Pe::getCompressionMethods(int method, int level) const {
const int *PackW32PeI386::getCompressionMethods(int method, int level) const {
bool small = ih.codesize + ih.datasize <= 256 * 1024;
return Packer::getDefaultCompressionMethods_le32(method, level, small);
}
const int *PackW32Pe::getFilters() const {
const int *PackW32PeI386::getFilters() const {
static const int filters[] = {0x26, 0x24, 0x49, 0x46, 0x16, 0x13, 0x14,
0x11, FT_ULTRA_BRUTE, 0x25, 0x15, 0x12, FT_END};
return filters;
}
Linker *PackW32Pe::newLinker() const { return new ElfLinkerX86; }
Linker *PackW32PeI386::newLinker() const { return new ElfLinkerX86; }
/*************************************************************************
// util
**************************************************************************/
int PackW32Pe::readFileHeader() {
int PackW32PeI386::readFileHeader() {
if (fi->st_size() >= 0x206) {
char buf[6];
fi->seek(0x200, SEEK_SET);
@ -75,13 +75,13 @@ int PackW32Pe::readFileHeader() {
// pack
**************************************************************************/
bool PackW32Pe::canPack() {
if (!readFileHeader() || ih.cpu < 0x14c || ih.cpu > 0x150)
bool PackW32PeI386::canPack() {
if (!readFileHeader() || ih.cpu < IMAGE_FILE_MACHINE_I386 || ih.cpu > 0x150)
return false;
return true;
}
void PackW32Pe::buildLoader(const Filter *ft) {
void PackW32PeI386::buildLoader(const Filter *ft) {
// recompute tlsindex (see pack() below)
unsigned tmp_tlsindex = tlsindex;
const unsigned oam1 = ih.objectalign - 1;
@ -138,21 +138,22 @@ void PackW32Pe::buildLoader(const Filter *ft) {
addLoader("IDENTSTR,UPX1HEAD");
}
bool PackW32Pe::handleForceOption() {
return (ih.cpu < 0x14c || ih.cpu > 0x150) || (ih.opthdrsize != 0xe0) ||
((ih.flags & EXECUTABLE) == 0) ||
((ih.flags & BITS_32_MACHINE) ==
0) // NEW: 32 bit machine flag must be set - Stefan Widmann
|| (ih.coffmagic !=
0x10B) // COFF magic is 0x10B in PE files, 0x20B in PE32+ files - Stefan Widmann
|| (ih.entry == 0 && !isdll) || (ih.ddirsentries != 16) ||
IDSIZE(PEDIR_EXCEPTION) // is this used on i386?
// || IDSIZE(PEDIR_COPYRIGHT)
;
bool PackW32PeI386::needForceOption() const {
// return true if we need `--force` to pack this file
bool r = false;
r |= (ih.opthdrsize != 0xe0);
r |= ((ih.flags & EXECUTABLE) == 0);
r |= ((ih.flags & BITS_32_MACHINE) == 0); // 32 bit machine flag must be set
r |= (ih.coffmagic != 0x10b); // COFF magic is 0x10B in PE files
r |= (ih.entry == 0 && !isdll);
r |= (ih.ddirsentries != 16);
r |= (IDSIZE(PEDIR_EXCEPTION) != 0); // is this used on i386?
//// r |= (IDSIZE(PEDIR_COPYRIGHT) != 0);
return r;
}
void PackW32Pe::defineSymbols(unsigned ncsection, unsigned upxsection, unsigned sizeof_oh,
unsigned ic, unsigned s1addr) {
void PackW32PeI386::defineSymbols(unsigned ncsection, unsigned upxsection, unsigned sizeof_oh,
unsigned ic, unsigned s1addr) {
const unsigned myimport = ncsection + soresources - rvamin;
// patch loader
@ -229,18 +230,18 @@ void PackW32Pe::defineSymbols(unsigned ncsection, unsigned upxsection, unsigned
// linker->dumpSymbols();
}
void PackW32Pe::addNewRelocations(Reloc &rel, unsigned base) {
void PackW32PeI386::addNewRelocations(Reloc &rel, unsigned base) {
if (use_stub_relocs)
rel.add(base + linker->getSymbolOffset("PESOCREL") + 1, 3);
}
void PackW32Pe::setOhDataBase(const pe_section_t *osection) { oh.database = osection[2].vaddr; }
void PackW32PeI386::setOhDataBase(const pe_section_t *osection) { oh.database = osection[2].vaddr; }
void PackW32Pe::setOhHeaderSize(const pe_section_t *osection) {
void PackW32PeI386::setOhHeaderSize(const pe_section_t *osection) {
oh.headersize = ALIGN_UP(pe_offset + sizeof(oh) + sizeof(*osection) * oh.objects, oh.filealign);
}
void PackW32Pe::pack(OutputFile *fo) {
void PackW32PeI386::pack(OutputFile *fo) {
unsigned mask = (1u << IMAGE_SUBSYSTEM_WINDOWS_GUI) | (1u << IMAGE_SUBSYSTEM_WINDOWS_CUI) |
(1u << IMAGE_SUBSYSTEM_EFI_APPLICATION) |
(1u << IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER) |

View File

@ -1,4 +1,4 @@
/* p_w32pe.h --
/* p_w32pe_i386.h --
This file is part of the UPX executable compressor.
@ -26,26 +26,24 @@
*/
#pragma once
#ifndef UPX_P_W32PE_H__
#define UPX_P_W32PE_H__ 1
/*************************************************************************
// w32/pe
//
**************************************************************************/
class PackW32Pe final : public PeFile32 {
class PackW32PeI386 final : public PeFile32 {
typedef PeFile32 super;
public:
PackW32Pe(InputFile *f);
virtual ~PackW32Pe();
virtual int getFormat() const override { return UPX_F_WIN32_PE; }
PackW32PeI386(InputFile *f);
virtual ~PackW32PeI386();
virtual int getFormat() const override { return UPX_F_W32PE_I386; }
virtual const char *getName() const override { return isrtm ? "rtm32/pe" : "win32/pe"; }
virtual const char *getFullName(const options_t *) const override { return "i386-win32.pe"; }
virtual const int *getCompressionMethods(int method, int level) const override;
virtual const int *getFilters() const override;
virtual bool handleForceOption() override;
virtual bool needForceOption() const override;
virtual void defineSymbols(unsigned ncsection, unsigned upxsection, unsigned sizeof_oh,
unsigned isize_isplit, unsigned s1addr) override;
virtual void addNewRelocations(Reloc &, unsigned upxsection) override;
@ -62,6 +60,4 @@ protected:
virtual Linker *newLinker() const override;
};
#endif /* already included */
/* vim:set ts=4 sw=4 et: */

View File

@ -1,4 +1,4 @@
/* p_w64pep.cpp --
/* p_w64pe_amd64.cpp --
This file is part of the UPX executable compressor.
@ -35,44 +35,44 @@
#include "filter.h"
#include "packer.h"
#include "pefile.h"
#include "p_w64pep.h"
#include "p_w64pe_amd64.h"
#include "linker.h"
static const CLANG_FORMAT_DUMMY_STATEMENT
#include "stub/amd64-win64.pep.h"
#include "stub/amd64-win64.pe.h"
/*************************************************************************
//
**************************************************************************/
PackW64Pep::PackW64Pep(InputFile *f) : super(f) { use_stub_relocs = false; }
PackW64PeAmd64::PackW64PeAmd64(InputFile *f) : super(f) { use_stub_relocs = false; }
PackW64Pep::~PackW64Pep() {}
PackW64PeAmd64::~PackW64PeAmd64() {}
const int *PackW64Pep::getCompressionMethods(int method, int level) const {
const int *PackW64PeAmd64::getCompressionMethods(int method, int level) const {
bool small = ih.codesize + ih.datasize <= 256 * 1024;
return Packer::getDefaultCompressionMethods_le32(method, level, small);
}
const int *PackW64Pep::getFilters() const {
const int *PackW64PeAmd64::getFilters() const {
static const int filters[] = {0x49, FT_END};
return filters;
}
Linker *PackW64Pep::newLinker() const { return new ElfLinkerAMD64; }
Linker *PackW64PeAmd64::newLinker() const { return new ElfLinkerAMD64; }
/*************************************************************************
// pack
**************************************************************************/
bool PackW64Pep::canPack() {
bool PackW64PeAmd64::canPack() {
// just check if machine type is 0x8664
if (!readFileHeader() || ih.cpu != 0x8664) // CPU magic of AMD64 is 0x8664
if (!readFileHeader() || ih.cpu != IMAGE_FILE_MACHINE_AMD64)
return false;
return true;
}
void PackW64Pep::buildLoader(const Filter *ft) {
void PackW64PeAmd64::buildLoader(const Filter *ft) {
// recompute tlsindex (see pack() below)
unsigned tmp_tlsindex = tlsindex;
const unsigned oam1 = ih.objectalign - 1;
@ -81,7 +81,7 @@ void PackW64Pep::buildLoader(const Filter *ft) {
tmp_tlsindex = 0;
// prepare loader
initLoader(stub_amd64_win64_pep, sizeof(stub_amd64_win64_pep), 2);
initLoader(stub_amd64_win64_pe, sizeof(stub_amd64_win64_pe), 2);
addLoader("START");
if (ih.entry && isdll)
addLoader("PEISDLL0");
@ -142,20 +142,20 @@ void PackW64Pep::buildLoader(const Filter *ft) {
addLoader("IDENTSTR,UPX1HEAD");
}
bool PackW64Pep::handleForceOption() {
return (ih.cpu != 0x8664) // CPU magic of AMD64 is 0x8664
||
(ih.opthdrsize != 0xF0) // optional header size is 0xF0 in PE32+ files - Stefan Widmann
|| (ih.coffmagic != 0x20B) // COFF magic is 0x20B in PE+ files, 0x10B in "normal" 32 bit
// PE files - Stefan Widmann
|| ((ih.flags & EXECUTABLE) == 0) ||
((ih.flags & BITS_32_MACHINE) !=
0) // NEW: 32 bit machine flag may not be set - Stefan Widmann
|| (ih.entry == 0 && !isdll) || (ih.ddirsentries != 16);
bool PackW64PeAmd64::needForceOption() const {
// return true if we need `--force` to pack this file
bool r = false;
r |= (ih.opthdrsize != 0xf0); // optional header size is 0xF0 in PE32+ files
r |= ((ih.flags & EXECUTABLE) == 0);
r |= ((ih.flags & BITS_32_MACHINE) != 0); // 32 bit machine flag may not be set
r |= (ih.coffmagic != 0x20b); // COFF magic is 0x20B in PE32+ files
r |= (ih.entry == 0 && !isdll);
r |= (ih.ddirsentries != 16);
return r;
}
void PackW64Pep::defineSymbols(unsigned ncsection, unsigned upxsection, unsigned sizeof_oh,
unsigned ic, unsigned s1addr) {
void PackW64PeAmd64::defineSymbols(unsigned ncsection, unsigned upxsection, unsigned sizeof_oh,
unsigned ic, unsigned s1addr) {
const unsigned myimport = ncsection + soresources - rvamin;
// patch loader
@ -228,11 +228,11 @@ void PackW64Pep::defineSymbols(unsigned ncsection, unsigned upxsection, unsigned
linker->defineSymbol("START", upxsection);
}
void PackW64Pep::setOhHeaderSize(const pe_section_t *osection) {
void PackW64PeAmd64::setOhHeaderSize(const pe_section_t *osection) {
oh.headersize = ALIGN_UP(pe_offset + sizeof(oh) + sizeof(*osection) * oh.objects, oh.filealign);
}
void PackW64Pep::pack(OutputFile *fo) {
void PackW64PeAmd64::pack(OutputFile *fo) {
unsigned mask = (1u << IMAGE_SUBSYSTEM_WINDOWS_GUI) | (1u << IMAGE_SUBSYSTEM_WINDOWS_CUI) |
(1u << IMAGE_SUBSYSTEM_EFI_APPLICATION) |
(1u << IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER) |

View File

@ -1,4 +1,4 @@
/* p_w64pep.h --
/* p_w64pe_amd64.h --
This file is part of the UPX executable compressor.
@ -26,26 +26,24 @@
*/
#pragma once
#ifndef UPX_P_W64PEP_H__
#define UPX_P_W64PEP_H__ 1
/*************************************************************************
// w64/pep
//
**************************************************************************/
class PackW64Pep final : public PeFile64 {
class PackW64PeAmd64 final : public PeFile64 {
typedef PeFile64 super;
public:
PackW64Pep(InputFile *f);
virtual ~PackW64Pep();
virtual int getFormat() const override { return UPX_F_WIN64_PEP; }
PackW64PeAmd64(InputFile *f);
virtual ~PackW64PeAmd64();
virtual int getFormat() const override { return UPX_F_W64PE_AMD64; }
virtual const char *getName() const override { return "win64/pe"; }
virtual const char *getFullName(const options_t *) const override { return "amd64-win64.pe"; }
virtual const int *getCompressionMethods(int method, int level) const override;
virtual const int *getFilters() const override;
virtual bool handleForceOption() override;
virtual bool needForceOption() const override;
virtual void defineSymbols(unsigned ncsection, unsigned upxsection, unsigned sizeof_oh,
unsigned isize_isplit, unsigned s1addr) override;
virtual void setOhDataBase(const pe_section_t *) override {}
@ -59,6 +57,4 @@ protected:
virtual Linker *newLinker() const override;
};
#endif /* already included */
/* vim:set ts=4 sw=4 et: */

114
src/p_w64pe_arm64.cpp Normal file
View File

@ -0,0 +1,114 @@
/* p_w64pe_arm64.cpp --
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2023 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
<markus@oberhumer.com> <ezerotven+github@gmail.com>
*/
// TODO: implement this; see p_w64pe_amd64.cpp
#include "conf.h"
#include "file.h"
#include "filter.h"
#include "packer.h"
#include "pefile.h"
#include "p_w64pe_arm64.h"
#include "linker.h"
// static const CLANG_FORMAT_DUMMY_STATEMENT
// #include "stub/arm64-win64.pe.h"
// static const CLANG_FORMAT_DUMMY_STATEMENT
// #include "stub/arm64ce-win64.pe.h" // TODO ???
/*************************************************************************
//
**************************************************************************/
PackW64PeArm64::PackW64PeArm64(InputFile *f) : super(f) {
// use_stub_relocs = false;
}
Linker *PackW64PeArm64::newLinker() const { return new ElfLinkerArm64LE; }
const int *PackW64PeArm64::getCompressionMethods(int method, int level) const {
bool small = ih.codesize + ih.datasize <= 256 * 1024;
return Packer::getDefaultCompressionMethods_le32(method, level, small);
}
const int *PackW64PeArm64::getFilters() const { return nullptr; }
/*************************************************************************
// pack
**************************************************************************/
bool PackW64PeArm64::canPack() {
if (!readFileHeader() || ih.cpu != IMAGE_FILE_MACHINE_ARM64)
return false;
throwCantPack("not yet implemented");
return true;
}
void PackW64PeArm64::buildLoader(const Filter *ft) {
UNUSED(ft);
throwCantPack("not yet implemented");
}
bool PackW64PeArm64::needForceOption() const {
// return true if we need `--force` to pack this file
bool r = false;
throwCantPack("not yet implemented");
return r;
}
void PackW64PeArm64::defineSymbols(unsigned ncsection, unsigned upxsection, unsigned sizeof_oh,
unsigned ic, unsigned s1addr) {
UNUSED(ncsection);
UNUSED(upxsection);
UNUSED(sizeof_oh);
UNUSED(ic);
UNUSED(s1addr);
throwCantPack("not yet implemented");
}
void PackW64PeArm64::setOhHeaderSize(const pe_section_t *osection) {
UNUSED(osection);
throwCantPack("not yet implemented");
}
void PackW64PeArm64::pack(OutputFile *fo) {
UNUSED(fo);
throwCantPack("not yet implemented");
}
/*************************************************************************
// pack
**************************************************************************/
bool PackW64PeArm64EC::canPack() {
if (!readFileHeader() || ih.cpu != IMAGE_FILE_MACHINE_ARM64EC)
return false;
throwCantPack("not yet implemented");
return true;
}
/* vim:set ts=4 sw=4 et: */

78
src/p_w64pe_arm64.h Normal file
View File

@ -0,0 +1,78 @@
/* p_w64pe_arm64.h --
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2023 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
<markus@oberhumer.com> <ezerotven+github@gmail.com>
*/
#pragma once
/*************************************************************************
//
**************************************************************************/
class PackW64PeArm64 : public PeFile64 {
typedef PeFile64 super;
public:
PackW64PeArm64(InputFile *f);
virtual ~PackW64PeArm64() {}
virtual int getFormat() const override { return UPX_F_W64PE_ARM64; }
virtual const char *getName() const override { return "win64/arm64"; }
virtual const char *getFullName(const options_t *) const override { return "arm64-win64.pe"; }
virtual const int *getCompressionMethods(int method, int level) const override;
virtual const int *getFilters() const override;
virtual bool needForceOption() const override;
virtual void defineSymbols(unsigned ncsection, unsigned upxsection, unsigned sizeof_oh,
unsigned isize_isplit, unsigned s1addr) override;
virtual void setOhDataBase(const pe_section_t *) override {}
virtual void setOhHeaderSize(const pe_section_t *osection) override;
virtual void pack(OutputFile *fo) override;
virtual bool canPack() override;
protected:
virtual void buildLoader(const Filter *ft) override;
virtual Linker *newLinker() const override;
};
/*************************************************************************
// TODO: it is unclear yet if this should be made a subclass
// or just get merged into the base class using a flag;
// maybe the difference between arm64 and arm64ec does not really affect us
**************************************************************************/
class PackW64PeArm64EC final : public PackW64PeArm64 {
typedef PackW64PeArm64 super;
public:
PackW64PeArm64EC(InputFile *f) : super(f) {}
virtual int getFormat() const override { return UPX_F_W64PE_ARM64EC; }
virtual const char *getName() const override { return "win64/arm64ec"; }
virtual const char *getFullName(const options_t *) const override { return "arm64ec-win64.pe"; }
virtual bool canPack() override;
};
/* vim:set ts=4 sw=4 et: */

View File

@ -26,8 +26,6 @@
*/
#pragma once
#ifndef UPX_P_WCLE_H__
#define UPX_P_WCLE_H__ 1
/*************************************************************************
// watcom/le
@ -88,6 +86,4 @@ protected:
unsigned neweip;
};
#endif /* already included */
/* vim:set ts=4 sw=4 et: */

View File

@ -93,6 +93,28 @@ const int *Packer::getDefaultCompressionMethods_le32(int method, int level, int
// loader util
**************************************************************************/
static bool callsManyTimes(int format) {
return
UPX_F_LINUX_ELF_i386 ==format
|| UPX_F_LINUX_ELFI_i386 ==format
|| UPX_F_LINUX_ELF64_AMD64==format
|| UPX_F_LINUX_ELF32_ARM ==format
|| UPX_F_LINUX_ELF32_PPC32 ==format
|| UPX_F_LINUX_ELF64_PPC64LE ==format
|| UPX_F_LINUX_ELF32_ARMEB==format
|| UPX_F_BSD_ELF_i386 ==format
|| UPX_F_VMLINUX_ARM ==format
|| UPX_F_VMLINUX_ARMEB ==format
|| UPX_F_VMLINUX_PPC32 ==format
|| UPX_F_VMLINUX_PPC64LE ==format
|| UPX_F_VMLINUZ_ARM ==format
|| UPX_F_MACH_PPC32 ==format
|| UPX_F_MACH_PPC64 ==format
|| UPX_F_MACH_i386 ==format
|| UPX_F_DYLIB_i386 ==format
;
}
const char *Packer::getDecompressorSections() const
{
static const char nrv2b_le32_small[] =
@ -197,24 +219,7 @@ const char *Packer::getDecompressorSections() const
// if (ph.method == M_CL1B_LE32)
// return opt->small ? cl1b_le32_small : cl1b_le32_fast;
if (M_IS_LZMA(ph.method)) {
if (UPX_F_LINUX_ELF_i386 ==ph.format
|| UPX_F_LINUX_ELFI_i386 ==ph.format
|| UPX_F_LINUX_ELF64_AMD ==ph.format
|| UPX_F_LINUX_ELF32_ARMEL==ph.format
|| UPX_F_LINUX_ELFPPC32 ==ph.format
|| UPX_F_LINUX_ELFPPC64LE ==ph.format
|| UPX_F_LINUX_ELF32_ARMEB==ph.format
|| UPX_F_BSD_ELF_i386 ==ph.format
|| UPX_F_VMLINUZ_ARMEL ==ph.format
|| UPX_F_VMLINUX_ARMEL ==ph.format
|| UPX_F_VMLINUX_ARMEB ==ph.format
|| UPX_F_VMLINUX_PPC32 ==ph.format
|| UPX_F_VMLINUX_PPC64LE ==ph.format
|| UPX_F_MACH_PPC32 ==ph.format
|| UPX_F_MACH_PPC64 ==ph.format
|| UPX_F_MACH_i386 ==ph.format
|| UPX_F_DYLIB_i386 ==ph.format
) {
if (callsManyTimes(ph.format)) {
return opt->small ? lzma_elf_small : lzma_elf_fast;
}
return opt->small ? lzma_small : lzma_fast;
@ -240,24 +245,7 @@ unsigned Packer::getDecompressorWrkmemSize() const
void Packer::defineDecompressorSymbols()
{
if (UPX_F_LINUX_ELF_i386 ==ph.format
|| UPX_F_LINUX_ELFI_i386 ==ph.format
|| UPX_F_LINUX_ELF64_AMD ==ph.format
|| UPX_F_LINUX_ELF32_ARMEL==ph.format
|| UPX_F_LINUX_ELFPPC32 ==ph.format
|| UPX_F_LINUX_ELFPPC64LE ==ph.format
|| UPX_F_LINUX_ELF32_ARMEB==ph.format
|| UPX_F_BSD_ELF_i386 ==ph.format
|| UPX_F_VMLINUZ_ARMEL ==ph.format
|| UPX_F_VMLINUX_ARMEL ==ph.format
|| UPX_F_VMLINUX_ARMEB ==ph.format
|| UPX_F_VMLINUX_PPC32 ==ph.format
|| UPX_F_VMLINUX_PPC64LE ==ph.format
|| UPX_F_MACH_PPC32 ==ph.format
|| UPX_F_MACH_PPC64 ==ph.format
|| UPX_F_MACH_i386 ==ph.format
|| UPX_F_DYLIB_i386 ==ph.format
) {
if (callsManyTimes(ph.format)) {
// ELF calls the decompressor many times; the parameters change!
return;
}

View File

@ -190,8 +190,8 @@ bool PackHeader::decodePackHeaderFromBuf(SPAN_S(const upx_byte) buf, int blen) {
fprintf(stderr, " decodePackHeaderFromBuf version=%d format=%d method=%d level=%d\n",
version, format, method, level);
}
if (0 == format || 128 == format || (format < 128 && format > UPX_F_LINUX_ELF64_ARM) ||
(format > 128 && format > UPX_F_DYLIB_PPC64)) {
if (!((format >= 1 && format <= UPX_F_W64PE_ARM64EC) ||
(format >= 129 && format <= UPX_F_DYLIB_PPC64))) {
char msg[24];
snprintf(msg, sizeof(msg), "unknown format %d", format);
throwCantUnpack(msg);

View File

@ -29,29 +29,31 @@
#include "file.h"
#include "packmast.h"
#include "packer.h"
#include "lefile.h"
#include "pefile.h"
#include "p_elf.h"
#include "p_unix.h"
#include "p_com.h"
#include "p_djgpp2.h"
#include "p_exe.h"
#include "p_unix.h"
#include "p_lx_exc.h"
#include "p_lx_elf.h"
#include "p_lx_sh.h"
#include "p_lx_interp.h"
#include "p_sys.h"
#include "p_tos.h"
#include "p_wcle.h"
#include "p_tmt.h"
#include "p_w32pe.h"
#include "p_w64pep.h"
#include "p_vmlinz.h"
#include "p_vmlinx.h"
#include "p_ps1.h"
#include "p_lx_sh.h"
#include "p_mach.h"
#include "p_armpe.h"
#include "p_ps1.h"
#include "p_sys.h"
#include "p_tmt.h"
#include "p_tos.h"
#include "p_vmlinx.h"
#include "p_vmlinz.h"
#include "p_w32pe_arm.h"
#include "p_w32pe_i386.h"
#include "p_w64pe_amd64.h"
#include "p_w64pe_arm64.h"
#include "p_wcle.h"
/*************************************************************************
//
@ -156,10 +158,12 @@ Packer *PackMaster::visitAllPackers(visit_func_t func, InputFile *f, const optio
D(PackDjgpp2);
D(PackTmt);
D(PackWcle);
D(PackW64Pep);
D(PackW32Pe);
D(PackW64PeAmd64);
D(PackW32PeI386);
}
D(PackArmPe);
D(PackW32PeArm);
// D(PackW64PeArm64EC); // NOT YET IMPLEMENTED
// D(PackW64PeArm64); // NOT YET IMPLEMENTED
D(PackExe);
//

View File

@ -92,17 +92,17 @@ PeFile::PeFile(InputFile *f) : super(f) {
sorelocs = 0;
soxrelocs = 0;
sotls = 0;
isdll = false;
ilinker = nullptr;
use_tls_callbacks = false;
oloadconf = nullptr;
soloadconf = 0;
isdll = false;
isrtm = false;
isefi = false;
use_dep_hack = true;
use_clear_dirty_stack = true;
use_stub_relocs = true;
isrtm = false;
isefi = false;
}
bool PeFile::testUnpackVersion(int version) const {
@ -530,6 +530,8 @@ LE32 &PeFile::IDSIZE(unsigned x) { return iddirs[x].size; }
LE32 &PeFile::IDADDR(unsigned x) { return iddirs[x].vaddr; }
LE32 &PeFile::ODSIZE(unsigned x) { return oddirs[x].size; }
LE32 &PeFile::ODADDR(unsigned x) { return oddirs[x].vaddr; }
const LE32 &PeFile::IDSIZE(unsigned x) const { return iddirs[x].size; }
const LE32 &PeFile::IDADDR(unsigned x) const { return iddirs[x].vaddr; }
/*
ImportLinker: 32 and 64 bit import table building.
@ -2076,7 +2078,7 @@ void PeFile::callCompressWithFilters(Filter &ft, int filter_strategy, unsigned i
}
void PeFile::callProcessRelocs(Reloc &rel, unsigned &ic) {
// wince wants relocation data at the beginning of a section
// WinCE wants relocation data at the beginning of a section
PeFile::processRelocs(&rel);
ODADDR(PEDIR_RELOC) = soxrelocs ? ic : 0;
ODSIZE(PEDIR_RELOC) = soxrelocs;
@ -2100,7 +2102,7 @@ void PeFile::pack0(OutputFile *fo, ht &ih, ht &oh, unsigned subsystem_mask,
const unsigned objs = ih.objects;
readSectionHeaders(objs, sizeof(ih));
if (!opt->force && handleForceOption())
if (!opt->force && needForceOption())
throwCantPack("unexpected value in PE header (try --force)");
if (ih.dllflags & IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY) {
@ -2142,7 +2144,7 @@ void PeFile::pack0(OutputFile *fo, ht &ih, ht &oh, unsigned subsystem_mask,
overlay = 0;
checkOverlay(overlay);
if (ih.dllflags & IMAGE_DLLCHARACTERISTICS_CONTROL_FLOW_GUARD) {
if (ih.dllflags & IMAGE_DLLCHARACTERISTICS_GUARD_CF) {
if (opt->force) {
const unsigned lcsize = IDSIZE(PEDIR_LOADCONF);
const unsigned lcaddr = IDADDR(PEDIR_LOADCONF);
@ -2152,10 +2154,9 @@ void PeFile::pack0(OutputFile *fo, ht &ih, ht &oh, unsigned subsystem_mask,
// and clear the rest
set_le32(ibuf.subref("bad guard flags at %#x", lcaddr + gfpos, sizeof(LE32)),
0x00000800);
ih.dllflags ^= IMAGE_DLLCHARACTERISTICS_CONTROL_FLOW_GUARD;
ih.dllflags ^= IMAGE_DLLCHARACTERISTICS_GUARD_CF;
} else
throwCantPack("CFGuard enabled PE files are not supported (use "
"--force to disable)");
throwCantPack("GUARD_CF enabled PE files are not supported (use --force to disable)");
}
Resource res(ibuf, ibuf + ibuf.getSize());
@ -2274,7 +2275,7 @@ void PeFile::pack0(OutputFile *fo, ht &ih, ht &oh, unsigned subsystem_mask,
// section 0 : bss
// 1 : [ident + header] + packed_data + unpacker + tls + loadconf
// 2 : not compressed data
// 3 : resource data -- wince 5 needs a new section for this
// 3 : resource data -- win32/arm 5 needs a new section for this
// the last section should start with the resource data, because lots of lame
// windoze codes assume that resources starts on the beginning of a section
@ -2962,14 +2963,14 @@ void PeFile32::pack0(OutputFile *fo, unsigned subsystem_mask, upx_uint64_t defau
}
void PeFile32::unpack(OutputFile *fo) {
bool set_oft = getFormat() == UPX_F_WINCE_ARM_PE;
bool set_oft = getFormat() == UPX_F_W32PE_ARM;
unpack0<pe_header_t, LE32>(fo, ih, oh, 1U << 31, set_oft);
}
int PeFile32::canUnpack() {
if (!canPack()) // this calls readFileHeader() and readPeHeader()
return false;
return canUnpack0(getFormat() == UPX_F_WINCE_ARM_PE ? 4 : 3, ih.objects, ih.entry, sizeof(ih));
return canUnpack0(getFormat() == UPX_F_W32PE_ARM ? 4 : 3, ih.objects, ih.entry, sizeof(ih));
}
unsigned PeFile32::processImports() // pass 1

View File

@ -26,8 +26,6 @@
*/
#pragma once
#ifndef UPX_PEFILE_H__
#define UPX_PEFILE_H__ 1
#include "util/membuffer.h"
@ -58,7 +56,7 @@ protected:
unsigned handleStripRelocs(upx_uint64_t ih_imagebase, upx_uint64_t default_imagebase,
LE16 &dllflags);
virtual bool handleForceOption() = 0;
virtual bool needForceOption() const = 0;
virtual void callCompressWithFilters(Filter &, int filter_strategy, unsigned ih_codebase);
virtual void defineSymbols(unsigned ncsection, unsigned upxsection, unsigned sizeof_oh,
unsigned isize_isplit, unsigned s1addr) = 0;
@ -149,12 +147,12 @@ protected:
unsigned tlsindex;
unsigned tlscb_ptr;
unsigned tls_handler_offset;
bool use_tls_callbacks;
bool use_tls_callbacks = false;
void processLoadConf(Reloc *, const Interval *, unsigned);
void processLoadConf(Interval *);
MemBuffer mb_oloadconf;
upx_byte *oloadconf;
upx_byte *oloadconf = nullptr;
unsigned soloadconf;
unsigned stripDebug(unsigned);
@ -162,8 +160,8 @@ protected:
unsigned icondir_offset;
int icondir_count;
bool importbyordinal;
bool kernel32ordinal;
bool importbyordinal = false;
bool kernel32ordinal = false;
unsigned rvamin;
unsigned cimports; // rva of preprocessed imports
unsigned crelocs; // rva of preprocessed fixups
@ -173,8 +171,15 @@ protected:
LE32 vaddr;
LE32 size;
};
ddirs_t *iddirs;
ddirs_t *oddirs;
ddirs_t *iddirs = nullptr;
ddirs_t *oddirs = nullptr;
LE32 &IDSIZE(unsigned x);
LE32 &IDADDR(unsigned x);
LE32 &ODSIZE(unsigned x);
LE32 &ODADDR(unsigned x);
const LE32 &IDSIZE(unsigned x) const;
const LE32 &IDADDR(unsigned x) const;
struct alignas(1) import_desc {
LE32 oft; // orig first thunk
@ -183,11 +188,6 @@ protected:
LE32 iat; // import address table
};
LE32 &IDSIZE(unsigned x);
LE32 &IDADDR(unsigned x);
LE32 &ODSIZE(unsigned x);
LE32 &ODADDR(unsigned x);
struct alignas(1) pe_section_t {
char name[8];
LE32 vsize;
@ -200,16 +200,26 @@ protected:
MemBuffer mb_isection;
SPAN_0(pe_section_t) isection = nullptr;
bool isdll;
bool isrtm;
bool isefi;
bool use_dep_hack;
bool use_clear_dirty_stack;
bool use_stub_relocs;
bool isdll = false;
bool isrtm = false;
bool isefi = false;
bool use_dep_hack = true;
bool use_clear_dirty_stack = true;
bool use_stub_relocs = true;
static unsigned virta2objnum(unsigned, SPAN_0(pe_section_t), unsigned);
unsigned tryremove(unsigned, unsigned);
enum {
IMAGE_FILE_MACHINE_UNKNOWN = 0x0,
IMAGE_FILE_MACHINE_AMD64 = 0x8664, // win64/pe (amd64)
IMAGE_FILE_MACHINE_ARM = 0x1c0, // win32/arm
IMAGE_FILE_MACHINE_ARM64 = 0xaa64, // win64/arm64
IMAGE_FILE_MACHINE_ARM64EC = 0xa641, // win64/arm64ec
IMAGE_FILE_MACHINE_I386 = 0x14c, // win32/pe (i386)
IMAGE_FILE_MACHINE_THUMB = 0x1c2, // win32/arm
};
enum {
PEDIR_EXPORT = 0,
PEDIR_IMPORT = 1,
@ -259,7 +269,6 @@ protected:
FBIG_ENDIAN = 0x8000,
};
// NEW: DLL characteristics definition for ASLR, ... - Stefan Widmann
enum {
IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA = 0x0020,
IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE = 0x0040,
@ -268,8 +277,9 @@ protected:
IMAGE_DLLCHARACTERISTICS_NO_ISOLATION = 0x0200,
IMAGE_DLLCHARACTERISTICS_NO_SEH = 0x0400,
IMAGE_DLLCHARACTERISTICS_NO_BIND = 0x0800,
IMAGE_DLLCHARACTERISTICS_APPCONTAINER = 0x1000,
IMAGE_DLLCHARACTERISTICS_WDM_DRIVER = 0x2000,
IMAGE_DLLCHARACTERISTICS_CONTROL_FLOW_GUARD = 0x4000,
IMAGE_DLLCHARACTERISTICS_GUARD_CF = 0x4000,
IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE = 0x8000,
};
@ -470,14 +480,15 @@ protected:
virtual void processTls(Reloc *, const Interval *, unsigned) override;
struct alignas(1) pe_header_t {
// 0x0
// 0x00
char _[4]; // pemagic
LE16 cpu;
LE16 objects; // number of sections
char __[12]; // timestamp + reserved
LE16 opthdrsize;
LE16 flags; // characteristics
// optional header
// 0x04 IMAGE_FILE_HEADER
LE16 cpu; // IMAGE_FILE_MACHINE_xxx
LE16 objects; // NumberOfSections
char __[12]; // timestamp + reserved
LE16 opthdrsize; // SizeOfOptionalHeader
LE16 flags; // Characteristics
// 0x18 IMAGE_OPTIONAL_HEADER32
LE16 coffmagic; // NEW: Stefan Widmann
char ___[2]; // linkerversion
LE32 codesize;
@ -497,14 +508,14 @@ protected:
// 0x50
LE32 imagesize;
LE32 headersize;
LE32 chksum; // should set to 0
LE16 subsystem;
LE16 dllflags;
LE32 chksum; // should set to 0
LE16 subsystem; // IMAGE_SUBSYSTEM_xxx
LE16 dllflags; // IMAGE_DLLCHARACTERISTICS_xxx
// 0x60
char _____[20]; // stack + heap sizes
// 0x74
LE32 ddirsentries; // usually 16
// 0x78
ddirs_t ddirs[16];
};
@ -530,14 +541,15 @@ protected:
virtual void processTls(Reloc *, const Interval *, unsigned) override;
struct alignas(1) pe_header_t {
// 0x0
// 0x00
char _[4]; // pemagic
LE16 cpu;
LE16 objects; // number of sections
char __[12]; // timestamp + reserved
LE16 opthdrsize;
LE16 flags; // characteristics
// optional header
// 0x04 IMAGE_FILE_HEADER
LE16 cpu; // IMAGE_FILE_MACHINE_xxx
LE16 objects; // NumberOfSections
char __[12]; // timestamp + reserved
LE16 opthdrsize; // SizeOfOptionalHeader
LE16 flags; // Characteristics
// 0x18 IMAGE_OPTIONAL_HEADER64
LE16 coffmagic; // NEW: Stefan Widmann
char ___[2]; // linkerversion
LE32 codesize;
@ -557,20 +569,18 @@ protected:
// 0x50
LE32 imagesize;
LE32 headersize;
LE32 chksum; // should set to 0
LE16 subsystem;
LE16 dllflags;
LE32 chksum; // should set to 0
LE16 subsystem; // IMAGE_SUBSYSTEM_xxx
LE16 dllflags; // IMAGE_DLLCHARACTERISTICS_xxx
// 0x60
char _____[36]; // stack + heap sizes + loader flag
// 0x84
LE32 ddirsentries; // usually 16
// 0x88
ddirs_t ddirs[16];
};
pe_header_t ih, oh;
};
#endif /* already included */
/* vim:set ts=4 sw=4 et: */

View File

@ -61,11 +61,11 @@ STUBS += amd64-linux.elf-so_fold.h
STUBS += amd64-linux.kernel.vmlinux-head.h
STUBS += amd64-linux.kernel.vmlinux.h
STUBS += amd64-linux.shlib-init.h
STUBS += amd64-win64.pep.h
STUBS += amd64-win64.pe.h
STUBS += arm.v4a-linux.elf-entry.h
STUBS += arm.v4a-linux.elf-fold.h
STUBS += arm.v4a-wince.pe.h
STUBS += arm.v4t-wince.pe.h
STUBS += arm.v4a-win32.pe.h
STUBS += arm.v4t-win32.pe.h
STUBS += arm.v5a-darwin.macho-entry.h
STUBS += arm.v5a-darwin.macho-fold.h
STUBS += arm.v5a-linux.elf-entry.h
@ -85,6 +85,7 @@ STUBS += arm64-linux.elf-fold.h
STUBS += arm64-linux.shlib-init.h
STUBS += arm64-darwin.macho-entry.h
STUBS += arm64-darwin.macho-fold.h
STUBS += arm64-win64.pe.h
STUBS += i086-dos16.com.h
STUBS += i086-dos16.exe.h
STUBS += i086-dos16.sys.h
@ -270,6 +271,7 @@ define tc.default.f-embed_objinfo
$(call tc,objcopy) --strip-unneeded --keep-symbol=_start $1
$(call tc,objcopy) -R .text -R .data -R .bss $1
$(call tc,objcopy) -R .comment -R .note -R .note.GNU-stack -R .reginfo $1
$(call tc,objdump) -Dr $(tc_objdump_disasm_options) $1 | $(RTRIM) > $1.disasm
$(call tc,objdump) -htr -w $1 | $(BLSQUEEZE) | sed \
-e '1s/^.*: *file format/file format/' \
-e 's/$(tab)/ /g' \
@ -304,7 +306,7 @@ define tc.default.f-embed_objinfo_without_xstrip
# remove everything after "CONTENTS"
$(call tc,objdump) -htr -w $1 | $(BLSQUEEZE) | sed \
-e '1s/^.*: *file format/file format/' \
-e 's/ / /g' \
-e 's/$(tab)/ /g' \
-e 's/ 00*/ 0/g' \
-e 's/CONTENTS.*/CONTENTS/' \
> $1.dump
@ -473,19 +475,19 @@ amd64-linux.shlib-init.h : $(srcdir)/src/$$T.S
# /***********************************************************************
# // amd64-win64.pep
# // amd64-win64.pe
# ************************************************************************/
amd64-win64.pep.h : tc_list = amd64-win64.pep default
amd64-win64.pep.h : tc_bfdname = elf64-x86-64
amd64-win64.pep.h : tc_objdump_disasm_options = -M intel-mnemonic
amd64-win64.pe.h : tc_list = amd64-win64.pe default
amd64-win64.pe.h : tc_bfdname = elf64-x86-64
amd64-win64.pe.h : tc_objdump_disasm_options = -M intel-mnemonic
tc.amd64-win64.pep.gcc = amd64-linux-gcc-4.1.1 -m64 -nostdinc -MMD -MT $@
tc.amd64-win64.pep.gcc += -fno-exceptions -fno-asynchronous-unwind-tables
tc.amd64-win64.pep.gcc += -Wall -W -Wcast-align -Wcast-qual -Wstrict-prototypes -Wwrite-strings -Werror
tc.amd64-win64.pep.objdump = multiarch-objdump-2.23.90
tc.amd64-win64.pe.gcc = amd64-linux-gcc-4.1.1 -m64 -nostdinc -MMD -MT $@
tc.amd64-win64.pe.gcc += -fno-exceptions -fno-asynchronous-unwind-tables
tc.amd64-win64.pe.gcc += -Wall -W -Wcast-align -Wcast-qual -Wstrict-prototypes -Wwrite-strings -Werror
tc.amd64-win64.pe.objdump = multiarch-objdump-2.23.90
amd64-win64.pep.h : $(srcdir)/src/$$T.S
amd64-win64.pe.h : $(srcdir)/src/$$T.S
$(call tc,gcc) -c -x assembler-with-cpp $< -o tmp/$T.bin
$(call tc,f-embed_objinfo,tmp/$T.bin)
$(call tc,bin2h) tmp/$T.bin $@
@ -668,6 +670,21 @@ arm64-linux.shlib%.h : $(srcdir)/src/$$T.S
$(call tc,bin2h-c) tmp/$T.bin $@
# /***********************************************************************
# // arm64-win64.pe
# ************************************************************************/
arm64-win64.pe.h : tc_list = arm64-linux.elf default
arm64-win64.pe.h : tc_bfdname = elf64-littleaarch64
tc.arm64-win64.pe.objcopy = arm64-linux-objcopy-2.25 -F elf64-littleaarch64
tc.arm64-win64.pe.objdump = arm64-linux-objdump-2.25
arm64-win64.pe.h : $(srcdir)/src/$$T.S
$(call tc,gcc) -c -x assembler-with-cpp $< -o tmp/$T.bin
$(call tc,f-embed_objinfo,tmp/$T.bin)
$(call tc,bin2h-c) tmp/$T.bin $@
# /***********************************************************************
# // arm.v5a-linux.shlib (arm.v5a)
# ************************************************************************/
@ -747,23 +764,23 @@ armeb.v5a-linux.kernel.vmlinux-head.h : $(srcdir)/src/$$T.S
# /***********************************************************************
# // arm.v4a-wince.pe (arm.v4a)
# // arm.v4t-wince.pe (arm.v4t)
# // arm.v4a-win32.pe (arm.v4a)
# // arm.v4t-win32.pe (arm.v4t)
# ************************************************************************/
# info: we use the tc settings from arm.v4a-linux.elf
arm.v4a-wince.pe.h : tc_list = arm.v4a-linux.elf default
arm.v4t-wince.pe.h : tc_list = arm.v4a-linux.elf default
arm.v4a-wince.pe.h : tc_bfdname = elf32-littlearm
arm.v4t-wince.pe.h : tc_bfdname = elf32-littlearm
arm.v4t-wince.pe.h : tc_objdump_disasm_options = -M force-thumb
arm.v4a-win32.pe.h : tc_list = arm.v4a-linux.elf default
arm.v4t-win32.pe.h : tc_list = arm.v4a-linux.elf default
arm.v4a-win32.pe.h : tc_bfdname = elf32-littlearm
arm.v4t-win32.pe.h : tc_bfdname = elf32-littlearm
arm.v4t-win32.pe.h : tc_objdump_disasm_options = -M force-thumb
arm.v4a-wince.pe.h : $(srcdir)/src/$$T.S
arm.v4a-win32.pe.h : $(srcdir)/src/$$T.S
$(call tc,gcc) -march=armv4 -c $< -o tmp/$T.bin
$(call tc,f-embed_objinfo,tmp/$T.bin)
$(call tc,bin2h-c) tmp/$T.bin $@
arm.v4t-wince.pe.h : $(srcdir)/src/$$T.S
arm.v4t-win32.pe.h : $(srcdir)/src/$$T.S
$(call tc,gcc) -march=armv4t -c $< -o tmp/$T.bin
$(call tc,f-embed_objinfo,tmp/$T.bin)
$(call tc,bin2h-c) tmp/$T.bin $@

View File

@ -1,5 +1,5 @@
/* amd64-win64.pep.h
created from amd64-win64.pep.bin, 14679 (0x3957) bytes
/* amd64-win64.pe.h
created from amd64-win64.pe.bin, 14679 (0x3957) bytes
This file is part of the UPX executable compressor.
@ -31,11 +31,11 @@
*/
#define STUB_AMD64_WIN64_PEP_SIZE 14679
#define STUB_AMD64_WIN64_PEP_ADLER32 0x64c27601
#define STUB_AMD64_WIN64_PEP_CRC32 0x16bb9397
#define STUB_AMD64_WIN64_PE_SIZE 14679
#define STUB_AMD64_WIN64_PE_ADLER32 0x64c27601
#define STUB_AMD64_WIN64_PE_CRC32 0x16bb9397
unsigned char stub_amd64_win64_pep[14679] = {
unsigned char stub_amd64_win64_pe[14679] = {
/* 0x0000 */ 127, 69, 76, 70, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0010 */ 1, 0, 62, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0020 */ 0, 0, 0, 0, 0, 0, 0, 0,200, 17, 0, 0, 0, 0, 0, 0,

View File

@ -1,5 +1,5 @@
/* arm.v4a-wince.pe.h
created from arm.v4a-wince.pe.bin, 14676 (0x3954) bytes
/* arm.v4a-win32.pe.h
created from arm.v4a-win32.pe.bin, 14676 (0x3954) bytes
This file is part of the UPX executable compressor.
@ -31,11 +31,11 @@
*/
#define STUB_ARM_V4A_WINCE_PE_SIZE 14676
#define STUB_ARM_V4A_WINCE_PE_ADLER32 0x3e1886fc
#define STUB_ARM_V4A_WINCE_PE_CRC32 0x3d92a84f
#define STUB_ARM_V4A_WIN32_PE_SIZE 14676
#define STUB_ARM_V4A_WIN32_PE_ADLER32 0x3e1886fc
#define STUB_ARM_V4A_WIN32_PE_CRC32 0x3d92a84f
unsigned char stub_arm_v4a_wince_pe[14676] = {
unsigned char stub_arm_v4a_win32_pe[14676] = {
/* 0x0000 */ 127, 69, 76, 70, 1, 1, 1, 97, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0010 */ 1, 0, 40, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0020 */ 156, 15, 0, 0, 0, 0, 0, 0, 52, 0, 0, 0, 0, 0, 40, 0,

View File

@ -1,5 +1,5 @@
/* arm.v4t-wince.pe.h
created from arm.v4t-wince.pe.bin, 6742 (0x1a56) bytes
/* arm.v4t-win32.pe.h
created from arm.v4t-win32.pe.bin, 6742 (0x1a56) bytes
This file is part of the UPX executable compressor.
@ -31,11 +31,11 @@
*/
#define STUB_ARM_V4T_WINCE_PE_SIZE 6742
#define STUB_ARM_V4T_WINCE_PE_ADLER32 0xd74653e1
#define STUB_ARM_V4T_WINCE_PE_CRC32 0xbafe943f
#define STUB_ARM_V4T_WIN32_PE_SIZE 6742
#define STUB_ARM_V4T_WIN32_PE_ADLER32 0xd74653e1
#define STUB_ARM_V4T_WIN32_PE_CRC32 0xbafe943f
unsigned char stub_arm_v4t_wince_pe[6742] = {
unsigned char stub_arm_v4t_win32_pe[6742] = {
/* 0x0000 */ 127, 69, 76, 70, 1, 1, 1, 97, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0010 */ 1, 0, 40, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0020 */ 132, 11, 0, 0, 0, 0, 0, 0, 52, 0, 0, 0, 0, 0, 40, 0,

442
src/stub/arm64-win64.pe.h Normal file
View File

@ -0,0 +1,442 @@
/* arm64-win64.pe.h
created from arm64-win64.pe.bin, 6441 (0x1929) bytes
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2023 Laszlo Molnar
Copyright (C) 2000-2023 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
<markus@oberhumer.com> <ezerotven+github@gmail.com>
John F. Reiser
<jreiser@users.sourceforge.net>
*/
#define STUB_ARM64_WIN64_PE_SIZE 6441
#define STUB_ARM64_WIN64_PE_ADLER32 0xa3046739
#define STUB_ARM64_WIN64_PE_CRC32 0x0340666b
unsigned char stub_arm64_win64_pe[6441] = {
/* 0x0000 */ 127, 69, 76, 70, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0010 */ 1, 0,183, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0020 */ 0, 0, 0, 0, 0, 0, 0, 0,216, 21, 0, 0, 0, 0, 0, 0,
/* 0x0030 */ 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0,
/* 0x0040 */ 1, 64, 33,139,225, 11,190,169,227,123, 1,169, 5, 0,128, 18,
/* 0x0050 */ 4, 0,176, 82, 52, 0, 0, 20,228,123, 65,169,225, 15,194,168,
/* 0x0060 */ 0, 0, 1,203, 66, 0, 3,203,130, 0, 0,185,229, 3, 0,170,
/* 0x0070 */ 224, 3, 3,170, 97, 0, 2,139, 35, 0, 59,213, 99, 1,224, 55,
/* 0x0080 */ 98, 76, 80,211,100, 0,128,146,132, 32,194,154, 2, 0, 4,138,
/* 0x0090 */ 95, 0, 1,235,162, 0, 0, 84, 34,123, 11,213, 66, 0, 4,203,
/* 0x00a0 */ 63, 0, 2,235,168,255,255, 84,159, 59, 3,213, 99, 1,232, 55,
/* 0x00b0 */ 99, 12, 64,146, 98, 0,128,146, 66, 32,195,154, 0, 0, 2,138,
/* 0x00c0 */ 63, 0, 0,235,169, 0, 0, 84, 32,117, 11,213, 0, 0, 2,203,
/* 0x00d0 */ 63, 0, 0,235,168,255,255, 84,159, 59, 3,213,223, 63, 3,213,
/* 0x00e0 */ 224, 3, 5,170,192, 3, 95,214,132, 0, 4, 43, 68, 0, 0, 52,
/* 0x00f0 */ 192, 3, 95,214, 4, 68, 64,184,132, 0, 4, 58,192, 3, 95,214,
/* 0x0100 */ 33, 0,128, 82,240, 3, 30,170,248,255,255,151, 33, 0, 1, 58,
/* 0x0110 */ 246,255,255,151,163,255,255, 84, 0, 2, 31,214, 3, 20, 64, 56,
/* 0x0120 */ 67, 20, 0, 56,241,255,255,151,162,255,255, 84,245,255,255,151,
/* 0x0130 */ 35, 12, 0,113, 1, 0,128, 82,163, 0, 0, 84, 5, 20, 64, 56,
/* 0x0140 */ 165, 32, 3, 42,229, 3, 37, 42,133,248,255, 52,231,255,255,151,
/* 0x0150 */ 33, 0, 1, 58,229,255,255,151, 33, 0, 1, 58, 97, 0, 0, 84,
/* 0x0160 */ 232,255,255,151, 33, 8, 0, 17,191, 0, 52, 49, 33, 36,129, 26,
/* 0x0170 */ 67,200,101, 56, 33, 4, 0,113, 67, 20, 0, 56,162,255,255, 84,
/* 0x0180 */ 233,255,255, 23,226, 15,190,169,254, 11, 0,249, 7, 64, 33,139,
/* 0x0190 */ 5, 0,128, 18, 4, 0,176, 82, 45, 0, 0, 20,227, 19,193,168,
/* 0x01a0 */ 0, 0, 7,203, 66, 0, 3,203,130, 0, 0,185,229, 3, 0,170,
/* 0x01b0 */ 224, 3, 3,170, 97, 0, 2,139, 35, 0, 59,213, 99, 1,224, 55,
/* 0x01c0 */ 98, 76, 80,211,100, 0,128,146,132, 32,194,154, 2, 0, 4,138,
/* 0x01d0 */ 95, 0, 1,235,162, 0, 0, 84, 34,123, 11,213, 66, 0, 4,203,
/* 0x01e0 */ 63, 0, 2,235,168,255,255, 84,159, 59, 3,213, 99, 1,232, 55,
/* 0x01f0 */ 99, 12, 64,146, 98, 0,128,146, 66, 32,195,154, 0, 0, 2,138,
/* 0x0200 */ 63, 0, 0,235,169, 0, 0, 84, 32,117, 11,213, 0, 0, 2,203,
/* 0x0210 */ 63, 0, 0,235,168,255,255, 84,159, 59, 3,213,223, 63, 3,213,
/* 0x0220 */ 224, 3, 5,170,254, 7, 65,248,192, 3, 95,214,132, 0, 4, 43,
/* 0x0230 */ 68, 0, 0, 52,192, 3, 95,214, 4, 68, 64,184,132, 0, 4, 58,
/* 0x0240 */ 192, 3, 95,214, 3, 20, 64, 56, 67, 20, 0, 56,248,255,255,151,
/* 0x0250 */ 162,255,255, 84, 33, 0,128, 82, 4, 0, 0, 20, 33, 4, 0, 81,
/* 0x0260 */ 243,255,255,151, 33, 0, 1, 58,241,255,255,151, 33, 0, 1, 58,
/* 0x0270 */ 239,255,255,151, 67,255,255, 84, 35, 12, 0,113, 1, 0,128, 82,
/* 0x0280 */ 35, 1, 0, 84, 5, 20, 64, 56,165, 32, 3, 42,229, 3, 37, 42,
/* 0x0290 */ 101,248,255, 52,163, 0, 1, 83,165,124, 1, 83, 99, 0, 3, 43,
/* 0x02a0 */ 2, 0, 0, 20,226,255,255,151, 33, 0, 1, 58,224,255,255,151,
/* 0x02b0 */ 33, 0, 1, 58,225, 0, 0, 84, 33, 0,128, 82,220,255,255,151,
/* 0x02c0 */ 33, 0, 1, 58,218,255,255,151,163,255,255, 84, 33, 8, 0, 17,
/* 0x02d0 */ 33, 4, 0, 17,191, 0, 20, 49, 33, 52,129, 26, 67, 0, 64, 57,
/* 0x02e0 */ 67,200,101, 56, 67, 20, 0, 56, 33, 4, 0,113,161,255,255, 84,
/* 0x02f0 */ 215,255,255, 23,254, 15, 31,248,226, 15,191,169, 7, 64, 33,139,
/* 0x0300 */ 5, 0,128, 18, 4, 0,176, 82, 45, 0, 0, 20,227, 19,193,168,
/* 0x0310 */ 0, 0, 7,203, 66, 0, 3,203,130, 0, 0,185,229, 3, 0,170,
/* 0x0320 */ 224, 3, 3,170, 97, 0, 2,139, 35, 0, 59,213, 99, 1,224, 55,
/* 0x0330 */ 98, 76, 80,211,100, 0,128,146,132, 32,194,154, 2, 0, 4,138,
/* 0x0340 */ 95, 0, 1,235,162, 0, 0, 84, 34,123, 11,213, 66, 0, 4,203,
/* 0x0350 */ 63, 0, 2,235,168,255,255, 84,159, 59, 3,213, 99, 1,232, 55,
/* 0x0360 */ 99, 12, 64,146, 98, 0,128,146, 66, 32,195,154, 0, 0, 2,138,
/* 0x0370 */ 63, 0, 0,235,169, 0, 0, 84, 32,117, 11,213, 0, 0, 2,203,
/* 0x0380 */ 63, 0, 0,235,168,255,255, 84,159, 59, 3,213,223, 63, 3,213,
/* 0x0390 */ 224, 3, 5,170,254, 7, 65,248,192, 3, 95,214,132, 0, 4, 43,
/* 0x03a0 */ 68, 0, 0, 52,192, 3, 95,214, 4, 68, 64,184,132, 0, 4, 58,
/* 0x03b0 */ 192, 3, 95,214, 3, 20, 64, 56, 67, 20, 0, 56,248,255,255,151,
/* 0x03c0 */ 162,255,255, 84, 33, 0,128, 82, 4, 0, 0, 20, 33, 4, 0, 81,
/* 0x03d0 */ 243,255,255,151, 33, 0, 1, 26,241,255,255,151, 33, 0, 1, 26,
/* 0x03e0 */ 239,255,255,151, 67,255,255, 84, 35, 12, 0,113, 1, 0,128, 82,
/* 0x03f0 */ 35, 1, 0, 84, 5, 20, 64, 56,165, 32, 3, 42,229, 3, 37, 42,
/* 0x0400 */ 101,248,255, 52,191, 0, 0,114,165,124, 1, 19,161, 1, 0, 84,
/* 0x0410 */ 3, 0, 0, 20,226,255,255,151, 66, 1, 0, 84, 33, 0,128, 82,
/* 0x0420 */ 223,255,255,151,226, 0, 0, 84,221,255,255,151, 33, 0, 1, 26,
/* 0x0430 */ 219,255,255,151,163,255,255, 84, 33, 16, 0, 17, 4, 0, 0, 20,
/* 0x0440 */ 215,255,255,151, 33, 0, 1, 26, 33, 8, 0, 17,191, 0, 20, 49,
/* 0x0450 */ 33, 36,129, 26, 67, 64, 33,139, 99,240, 95, 56, 67,200,101, 56,
/* 0x0460 */ 67, 20, 0, 56, 33, 4, 0,113,161,255,255, 84,212,255,255, 23,
/* 0x0470 */ 159, 56, 0,113, 1, 0, 0, 84,226, 15,190,169,253,123, 1,169,
/* 0x0480 */ 253, 3, 0,145, 8, 0, 64, 57, 7,192,128, 82, 8,125, 3, 83,
/* 0x0490 */ 231, 32,200, 26,231,192, 57, 17,232, 3, 0,145,255, 67, 39,203,
/* 0x04a0 */ 228, 3, 0,145,159,124,129,168,159, 0, 8,235,195,255,255, 84,
/* 0x04b0 */ 255,127,191,169,230, 3, 3,170,197, 0, 64,185,228, 3, 2,170,
/* 0x04c0 */ 227, 35, 0,145, 34, 8, 0, 81,225, 3, 0,170,224, 3, 0,145,
/* 0x04d0 */ 39, 20, 64, 56,231, 8, 0, 18, 7, 8, 0, 57, 39, 20, 64, 56,
/* 0x04e0 */ 232,124, 4, 83, 8, 4, 0, 57,231, 12, 0, 18, 7, 0, 0, 57,
/* 0x04f0 */ 35, 0, 0,148,191, 3, 0,145,229, 3, 0,170,253,123, 65,169,
/* 0x0500 */ 224, 7,194,168, 33, 0, 64,249, 33, 0, 0,139, 35, 0, 59,213,
/* 0x0510 */ 99, 1,224, 55, 98, 76, 80,211,100, 0,128,146,132, 32,194,154,
/* 0x0520 */ 2, 0, 4,138, 95, 0, 1,235,162, 0, 0, 84, 34,123, 11,213,
/* 0x0530 */ 66, 0, 4,203, 63, 0, 2,235,168,255,255, 84,159, 59, 3,213,
/* 0x0540 */ 99, 1,232, 55, 99, 12, 64,146, 98, 0,128,146, 66, 32,195,154,
/* 0x0550 */ 0, 0, 2,138, 63, 0, 0,235,169, 0, 0, 84, 32,117, 11,213,
/* 0x0560 */ 0, 0, 2,203, 63, 0, 0,235,168,255,255, 84,159, 59, 3,213,
/* 0x0570 */ 223, 63, 3,213,224, 3, 5,170,192, 3, 95,214,255, 67, 1,209,
/* 0x0580 */ 39, 0,128, 82, 17, 16, 0,145, 9,128,128, 82,243, 83, 0,169,
/* 0x0590 */ 245, 91, 1,169,247, 99, 2,169,249,107, 3,169,251,115, 4,169,
/* 0x05a0 */ 20, 8, 64, 57, 19, 4, 64, 57, 22, 0, 64, 57,244, 32,212, 26,
/* 0x05b0 */ 127, 0, 0,185,243, 32,211, 26,223, 0, 0,185, 7, 0,128,210,
/* 0x05c0 */ 148, 6, 0, 81, 8, 4, 64, 57, 10, 1, 22, 11,104, 6, 0, 81,
/* 0x05d0 */ 18, 1, 39, 30, 8, 96,128, 82, 8, 33,202, 26, 8,217, 28, 49,
/* 0x05e0 */ 160, 0, 0, 84, 41,122, 39,120,231, 4, 0,145, 31, 1, 7,107,
/* 0x05f0 */ 168,255,255, 84, 34, 64, 34,139, 63, 0, 2,235, 64, 16, 0, 84,
/* 0x0600 */ 235, 3, 1,170, 40, 4, 0,145,103, 85, 64, 56, 31, 1, 2,235,
/* 0x0610 */ 160, 15, 0, 84, 9, 21, 64, 56, 31, 1, 11,235, 39, 33, 7, 42,
/* 0x0620 */ 97,255,255, 84,229, 69, 0, 52, 8, 1,128, 82, 53, 0,128, 82,
/* 0x0630 */ 18, 0,128, 82, 9, 0,128, 18, 20, 1, 39, 30,104, 0,128, 82,
/* 0x0640 */ 177, 2, 39, 30,247, 3, 21, 42, 7, 1, 39, 30, 8, 86,128,210,
/* 0x0650 */ 165, 2, 39, 30,252, 3, 21, 42, 3, 1,103,158,104, 1,128, 82,
/* 0x0660 */ 234, 3, 18, 42,240, 3, 18, 42, 0, 1, 39, 30, 8,176, 41,145,
/* 0x0670 */ 14,224,191, 18, 15, 0,129, 82, 1, 1,103,158, 40, 1,128, 82,
/* 0x0680 */ 2, 1, 39, 30,136, 2, 38, 30, 8, 1, 22, 75, 16, 1, 39, 30,
/* 0x0690 */ 72,110, 28, 83, 63, 1, 14,107, 25, 2, 20, 10, 13,125, 64,147,
/* 0x06a0 */ 173,193, 57,139,173,249,127,211,232, 0, 0, 84,127, 1, 2,235,
/* 0x06b0 */ 160, 10, 0, 84,104, 1, 64, 57, 41, 93, 24, 83,107, 5, 0,145,
/* 0x06c0 */ 7, 33, 7, 42, 59,106,109,120, 40,125, 11, 83, 8,125, 27, 27,
/* 0x06d0 */ 255, 0, 8,107,130, 10, 0, 84, 73, 2, 38, 30, 19, 62, 1, 14,
/* 0x06e0 */ 95, 26, 0,113, 12, 2, 9, 10, 73, 41,211, 26,140, 33,214, 26,
/* 0x06f0 */ 234, 1, 27, 75, 41, 1, 12, 11,106, 23,138, 11, 42,106, 45,120,
/* 0x0700 */ 41, 5, 9, 11, 41, 93,120,211, 41,217, 28,145, 58, 6, 9,139,
/* 0x0710 */ 109, 31, 0, 84, 10, 2, 28, 75, 41, 0,128, 82,153,104,106, 56,
/* 0x0720 */ 7, 0, 0, 20, 91,107, 42,120, 41,121, 31, 83,232, 3, 13, 42,
/* 0x0730 */ 83, 57, 0, 53, 63,253, 3,113,236, 3, 0, 84, 57,123, 31, 83,
/* 0x0740 */ 31, 1, 14,107, 51, 3, 24, 18, 56,121, 31, 83,106,126, 64,147,
/* 0x0750 */ 74, 1, 4,145, 74,193, 41,139, 74,249,127,211,232, 0, 0, 84,
/* 0x0760 */ 127, 1, 2,235, 8, 93, 24, 83,224, 4, 0, 84,108, 1, 64, 57,
/* 0x0770 */ 107, 5, 0,145,135, 33, 7, 42, 76,107,106,120, 13,125, 11, 83,
/* 0x0780 */ 251, 1, 12, 75,173,125, 12, 27,155, 21,155, 11,140, 21, 76, 75,
/* 0x0790 */ 255, 0, 13,107, 8, 1, 13, 75, 99,252,255, 84, 76,107, 42,120,
/* 0x07a0 */ 9, 7, 0, 17,231, 0, 13, 75,115,252,255, 53, 63,253, 3,113,
/* 0x07b0 */ 77, 27, 0, 84, 42, 29, 0, 83,233, 3, 8, 42,138, 72, 48, 56,
/* 0x07c0 */ 16, 6, 0, 17, 95, 38, 0,113,236, 49, 0, 84, 82, 14, 0, 81,
/* 0x07d0 */ 191, 0, 16,107,232,245,255, 84, 0,224,191, 18, 63, 1, 0,107,
/* 0x07e0 */ 136, 0, 0, 84,127, 1, 2,235,224, 0, 0, 84,107, 5, 0,145,
/* 0x07f0 */ 97, 1, 1,203, 97, 0, 0,185,208, 0, 0,185, 0, 0,128, 82,
/* 0x0800 */ 2, 0, 0, 20, 32, 0,128, 82,243, 83, 64,169,245, 91, 65,169,
/* 0x0810 */ 247, 99, 66,169,249,107, 67,169,251,115, 68,169,255, 67, 1,145,
/* 0x0820 */ 192, 3, 95,214, 58, 1, 8, 75, 74,126, 64,147,105, 23, 91, 75,
/* 0x0830 */ 95, 3, 14,107, 41,106, 45,120, 76, 1, 3,145,231, 0, 8, 75,
/* 0x0840 */ 140,249,127,211,232, 0, 0, 84,127, 1, 2,235,192,253,255, 84,
/* 0x0850 */ 104, 1, 64, 57, 90, 95, 24, 83,107, 5, 0,145, 7, 33, 7, 42,
/* 0x0860 */ 40,106,108,120, 74,127, 11, 83, 74,125, 8, 27,255, 0, 10,107,
/* 0x0870 */ 130, 25, 0, 84,237, 0, 38, 30,233, 1, 8, 75, 95, 30, 0,113,
/* 0x0880 */ 53, 2, 38, 30, 8, 21,137, 11,241, 2, 39, 30, 40,106, 44,120,
/* 0x0890 */ 242,179,141, 26, 12,160, 25,145,247, 3, 28, 42, 95, 1, 14,107,
/* 0x08a0 */ 232, 0, 0, 84,127, 1, 2,235,224,250,255, 84,104, 1, 64, 57,
/* 0x08b0 */ 74, 93, 24, 83,107, 5, 0,145, 7, 33, 7, 42,141, 1, 64,121,
/* 0x08c0 */ 73,125, 11, 83, 41,125, 13, 27,255, 0, 9,107, 98, 31, 0, 84,
/* 0x08d0 */ 40,115, 29, 83,115, 0,128, 82,234, 1, 13, 75, 8,125, 64,147,
/* 0x08e0 */ 8, 9, 0,145,173, 21,138, 11,228, 3, 39, 30,141, 1, 0,121,
/* 0x08f0 */ 102, 2, 39, 30,153, 5, 8,139,218, 0, 38, 30, 44, 0,128, 82,
/* 0x0900 */ 6, 0, 0, 20, 13, 3, 0,121, 90, 7, 0,113,140,121, 31, 83,
/* 0x0910 */ 233, 3, 8, 42, 32, 3, 0, 84, 63, 1, 14,107,147,121, 31, 83,
/* 0x0920 */ 56,199, 44,139,232, 0, 0, 84,127, 1, 2,235, 41, 93, 24, 83,
/* 0x0930 */ 160,246,255, 84,104, 1, 64, 57,107, 5, 0,145, 7, 33, 7, 42,
/* 0x0940 */ 8, 3, 64,121, 42,125, 11, 83,237, 1, 8, 75, 27, 21, 72, 75,
/* 0x0950 */ 13, 21,141, 11, 72,125, 8, 27,255, 0, 8,107, 41, 1, 8, 75,
/* 0x0960 */ 35,253,255, 84, 27, 3, 0,121, 90, 7, 0,113,231, 0, 8, 75,
/* 0x0970 */ 108, 6, 0, 17, 33,253,255, 84,166, 68,166, 46,138, 0, 38, 30,
/* 0x0980 */ 95, 14, 0,113,200, 0, 38, 30, 72, 1, 8, 75, 8, 1, 12, 11,
/* 0x0990 */ 6, 1, 39, 30,236, 22, 0, 84,234, 0, 38, 30, 31, 13, 0,113,
/* 0x09a0 */ 220, 0,128, 82, 10,209,138, 26, 40, 0,128, 82, 74,101, 26, 83,
/* 0x09b0 */ 74,125, 64,147, 74,193, 6,145, 91,249,127,211, 6, 0, 0, 20,
/* 0x09c0 */ 44,106, 57,120,156, 7, 0,113, 8,121, 31, 83,233, 3, 10, 42,
/* 0x09d0 */ 32, 3, 0, 84, 63, 1, 14,107, 19,121, 31, 83,121,199, 40,139,
/* 0x09e0 */ 232, 0, 0, 84,127, 1, 2,235, 41, 93, 24, 83,192,240,255, 84,
/* 0x09f0 */ 106, 1, 64, 57,107, 5, 0,145, 71, 33, 7, 42, 42,106,121,120,
/* 0x0a00 */ 45,125, 11, 83,236, 1, 10, 75, 90, 21, 74, 75, 76, 21,140, 11,
/* 0x0a10 */ 170,125, 10, 27,255, 0, 10,107, 41, 1, 10, 75, 35,253,255, 84,
/* 0x0a20 */ 58,106, 57,120,156, 7, 0,113,231, 0, 10, 75,104, 6, 0, 17,
/* 0x0a30 */ 33,253,255, 84, 10, 1, 1, 81, 95, 13, 0,113, 45, 17, 0, 84,
/* 0x0a40 */ 95, 53, 0,113, 72, 1, 0, 18, 77,125, 1, 19, 12, 1, 31, 50,
/* 0x0a50 */ 140, 32, 0, 84,104, 0,102,158,187, 5, 0, 81,152, 33,219, 26,
/* 0x0a60 */ 8,193, 42,203, 8, 65, 56,139, 40, 6, 8,139, 8, 9, 0,209,
/* 0x0a70 */ 19, 1,103,158, 40, 0,128, 82,252, 3, 8, 42, 7, 0, 0, 20,
/* 0x0a80 */ 83, 3, 0,121, 8,121, 31, 83,233, 3, 10, 42,123, 7, 0,113,
/* 0x0a90 */ 156,123, 31, 83,128, 14, 0, 84,106, 2,102,158, 63, 1, 14,107,
/* 0x0aa0 */ 25,121, 31, 83, 90,197, 40,139,232, 0, 0, 84,127, 1, 2,235,
/* 0x0ab0 */ 41, 93, 24, 83,128,234,255, 84,106, 1, 64, 57,107, 5, 0,145,
/* 0x0ac0 */ 71, 33, 7, 42, 74, 3, 64,121, 45,125, 11, 83,243, 1, 10, 75,
/* 0x0ad0 */ 76, 21, 74, 75, 83, 21,147, 11,170,125, 10, 27,255, 0, 10,107,
/* 0x0ae0 */ 41, 1, 10, 75,227,252,255, 84, 76, 3, 0,121, 24, 3, 28, 42,
/* 0x0af0 */ 231, 0, 10, 75, 40, 7, 0, 17,229,255,255, 23, 41, 0,128, 82,
/* 0x0b00 */ 6, 0, 0, 20, 41,121, 31, 83, 74,107, 56,120, 63,253, 3,113,
/* 0x0b10 */ 232, 3, 12, 42, 44, 3, 0, 84, 31, 1, 14,107, 51,121, 31, 83,
/* 0x0b20 */ 56,125,127,147,232, 0, 0, 84,127, 1, 2,235, 8, 93, 24, 83,
/* 0x0b30 */ 160,230,255, 84,106, 1, 64, 57,107, 5, 0,145, 71, 33, 7, 42,
/* 0x0b40 */ 74,107,120,120, 12,125, 11, 83,237, 1, 10, 75,140,125, 10, 27,
/* 0x0b50 */ 89, 21, 74, 75, 74, 21,141, 11,255, 0, 12,107, 8, 1, 12, 75,
/* 0x0b60 */ 35,253,255, 84,105, 6, 0, 17, 89,107, 56,120, 63,253, 3,113,
/* 0x0b70 */ 231, 0, 12, 75, 45,253,255, 84, 42, 29, 0, 83, 95, 14, 0,113,
/* 0x0b80 */ 138, 72, 48, 56,233, 3, 8, 42, 16, 6, 0, 17,204,225,255, 84,
/* 0x0b90 */ 191, 0, 16,107, 18, 0,128, 82,200,215,255, 84, 15,255,255, 23,
/* 0x0ba0 */ 73, 3, 10, 75, 8, 21, 72, 75, 63, 1, 14,107, 40,106, 44,120,
/* 0x0bb0 */ 231, 0, 10, 75,154, 97, 0,145,232, 0, 0, 84,127, 1, 2,235,
/* 0x0bc0 */ 32,226,255, 84,104, 1, 64, 57, 41, 93, 24, 83,107, 5, 0,145,
/* 0x0bd0 */ 7, 33, 7, 42, 40,106,122,120, 42,125, 11, 83, 74,125, 8, 27,
/* 0x0be0 */ 255, 0, 10,107, 66, 10, 0, 84,233, 1, 8, 75, 95, 1, 14,107,
/* 0x0bf0 */ 173,129, 7,145, 8, 21,137, 11, 40,106, 58,120,232, 0, 0, 84,
/* 0x0c00 */ 127, 1, 2,235, 0,224,255, 84,104, 1, 64, 57, 74, 93, 24, 83,
/* 0x0c10 */ 107, 5, 0,145, 7, 33, 7, 42, 40,106,109,120, 73,125, 11, 83,
/* 0x0c20 */ 41,125, 8, 27,255, 0, 9,107,226, 16, 0, 84,234, 1, 8, 75,
/* 0x0c30 */ 8, 21,138, 11, 40,106, 45,120,112,222,255, 52, 74, 0, 38, 30,
/* 0x0c40 */ 8, 2, 28, 75, 12, 0, 38, 30, 95, 30, 0,113, 82,177,140, 26,
/* 0x0c50 */ 138,104,104, 56,138, 72, 48, 56, 16, 6, 0, 17,221,254,255, 23,
/* 0x0c60 */ 248, 3, 10, 42, 28, 7, 0, 49,128,219,255, 84, 82, 30, 0, 17,
/* 0x0c70 */ 200, 0, 38, 30,159, 3, 16,107, 12, 9, 0, 17, 72,220,255, 84,
/* 0x0c80 */ 232, 3, 16, 42, 2, 0, 0, 20, 76,218,255, 52, 10, 2, 28, 75,
/* 0x0c90 */ 16, 6, 0, 17, 31, 2, 5,107,140, 5, 0, 81,138,104,106, 56,
/* 0x0ca0 */ 138, 72, 40, 56,232, 3, 16, 42, 3,255,255, 84,191, 0, 16,107,
/* 0x0cb0 */ 8,207,255, 84,201,254,255, 23, 74, 1, 9, 75,173, 21, 77, 75,
/* 0x0cc0 */ 95, 1, 14,107,141, 1, 0,121,231, 0, 9, 75,232, 0, 0, 84,
/* 0x0cd0 */ 127, 1, 2,235,128,217,255, 84,104, 1, 64, 57, 74, 93, 24, 83,
/* 0x0ce0 */ 107, 5, 0,145, 7, 33, 7, 42,141, 5, 64,121, 73,125, 11, 83,
/* 0x0cf0 */ 41,125, 13, 27,255, 0, 9,107, 34, 7, 0, 84, 40,115, 29, 83,
/* 0x0d00 */ 19, 1,128, 82,234, 1, 13, 75, 8,125, 64,147,100, 2, 39, 30,
/* 0x0d10 */ 8, 9, 2,145,115, 0,128, 82,173, 21,138, 11,153, 5, 8,139,
/* 0x0d20 */ 141, 5, 0,121,102, 2, 39, 30,244,254,255, 23, 41, 1, 10, 75,
/* 0x0d30 */ 8, 21, 72, 75, 63, 1, 14,107, 40,106, 58,120,231, 0, 10, 75,
/* 0x0d40 */ 154,193, 0,145,232, 0, 0, 84,127, 1, 2,235,192,213,255, 84,
/* 0x0d50 */ 104, 1, 64, 57, 41, 93, 24, 83,107, 5, 0,145, 7, 33, 7, 42,
/* 0x0d60 */ 45,106,122,120, 40,125, 11, 83, 10,125, 13, 27,255, 0, 10,107,
/* 0x0d70 */ 35, 5, 0, 84, 41, 1, 10, 75,173, 21, 77, 75, 63, 1, 14,107,
/* 0x0d80 */ 45,106, 58,120,231, 0, 10, 75,140, 33, 1,145,232, 0, 0, 84,
/* 0x0d90 */ 127, 1, 2,235,128,211,255, 84,104, 1, 64, 57, 41, 93, 24, 83,
/* 0x0da0 */ 107, 5, 0,145, 7, 33, 7, 42, 45,106,108,120, 40,125, 11, 83,
/* 0x0db0 */ 10,125, 13, 27,255, 0, 10,107, 2, 8, 0, 84,232, 1, 13, 75,
/* 0x0dc0 */ 233, 3, 28, 42, 60, 2, 38, 30,173, 21,136, 11, 45,106, 44,120,
/* 0x0dd0 */ 241, 2, 39, 30,247, 3, 9, 42, 21, 0, 0, 20, 8, 2,128, 82,
/* 0x0de0 */ 231, 0, 9, 75,173, 21, 77, 75,153, 17, 8,145, 4, 1, 39, 30,
/* 0x0df0 */ 8, 1,128, 82,141, 5, 0,121, 73, 1, 9, 75, 6, 1, 39, 30,
/* 0x0e00 */ 190,254,255, 23,191, 0, 16,107, 82, 26, 0, 81, 40,196,255, 84,
/* 0x0e10 */ 114,254,255, 23,232, 1, 13, 75,233, 3, 28, 42,252, 3, 23, 42,
/* 0x0e20 */ 247, 3, 9, 42,173, 21,136, 11, 45,106, 58,120,136, 2, 38, 30,
/* 0x0e30 */ 95, 30, 0,113, 9, 0, 38, 30, 44, 0,102,158, 18,177,137, 26,
/* 0x0e40 */ 151,254,255, 23, 8, 21, 72, 75, 74, 1, 9, 75,231, 0, 9, 75,
/* 0x0e50 */ 40,106, 45,120,246,255,255, 23,232, 3, 13, 42, 84,254,255, 23,
/* 0x0e60 */ 170, 21, 0, 81, 63, 1, 14,107,140,121, 31, 83,232, 0, 0, 84,
/* 0x0e70 */ 127, 1, 2,235, 41, 93, 24, 83, 96,204,255, 84,104, 1, 64, 57,
/* 0x0e80 */ 107, 5, 0,145, 7, 33, 7, 42, 41,125, 1, 83,255, 0, 9,107,
/* 0x0e90 */ 99, 0, 0, 84,231, 0, 9, 75,140, 1, 0, 50, 74, 5, 0,113,
/* 0x0ea0 */ 33,254,255, 84, 8, 32, 25,145,152,109, 28, 83,155, 0,128, 82,
/* 0x0eb0 */ 19, 1,103,158,240,254,255, 23,232, 3, 28, 42,231, 0, 10, 75,
/* 0x0ec0 */ 173, 21, 77, 75,252, 3, 21, 42, 45,106, 44,120, 42, 1, 10, 75,
/* 0x0ed0 */ 53, 2, 38, 30,241, 2, 39, 30,247, 3, 8, 42,212,255,255, 23,
/* 0x0ee0 */ 240, 3, 5, 42,227, 19,189,169,229, 27, 1,169,254, 19, 0,249,
/* 0x0ef0 */ 232, 3, 1,170, 45, 64, 34,139,233, 3, 4,170,142, 64, 37,139,
/* 0x0f00 */ 11, 16, 0,145, 6, 0, 64, 57, 5, 4, 64, 57, 4, 8, 64, 57,
/* 0x0f10 */ 174, 0, 6, 11, 7, 0,128, 18,229, 32,197, 26,229, 3, 37, 42,
/* 0x0f20 */ 228, 32,196, 26,228, 3, 36, 42, 35, 0,128, 82, 34, 0,128, 82,
/* 0x0f30 */ 33, 0,128, 82, 32, 0,128, 82, 6, 0,128, 82,230, 31, 0,185,
/* 0x0f40 */ 2, 96,128, 82,192,230,128, 82, 66, 32,206, 26, 66, 0, 0, 11,
/* 0x0f50 */ 0,128,128,210,225, 3, 11,170, 0, 64, 0,170, 0,128, 0,170,
/* 0x0f60 */ 32,132, 0,248, 66, 16, 0,113,204,255,255, 84, 0, 21, 0,145,
/* 0x0f70 */ 231, 0, 0,148, 31, 0, 8,235,193,255,255, 84,227, 67, 66,248,
/* 0x0f80 */ 226, 19, 64,185, 36, 1, 3,203,128, 0, 2, 10,224, 47, 0,185,
/* 0x0f90 */ 0, 16, 6, 11, 97, 1, 0,145,225, 0, 0,148,129, 5, 0, 84,
/* 0x0fa0 */ 227, 23, 64,185,226, 27, 64,185, 99, 0, 4, 10,224,115, 64, 57,
/* 0x0fb0 */ 99, 32,194, 26,226, 3, 2, 75, 66, 32, 0, 17, 2, 36,194, 26,
/* 0x0fc0 */ 99, 0, 2, 11,106,177, 57,145, 99, 4, 3, 11,227, 3, 3, 42,
/* 0x0fd0 */ 32, 0,128, 82, 74, 37, 3,139,223, 28, 0,113, 3, 2, 0, 84,
/* 0x0fe0 */ 227,125, 64,147,227, 3, 3,203, 37,105, 99, 56,165,120, 31, 83,
/* 0x0ff0 */ 65, 1, 8,145,164, 0, 24, 18,227, 3, 4, 42, 33, 4, 3,139,
/* 0x1000 */ 201, 0, 0,148, 3, 0, 0, 18,127, 32, 68,107,193, 0, 0, 84,
/* 0x1010 */ 31, 0, 4,113,195,254,255, 84, 5, 0, 0, 20,225, 3, 10,170,
/* 0x1020 */ 193, 0, 0,148, 31, 0, 4,113,163,255,255, 84, 98, 0,128, 82,
/* 0x1030 */ 195, 0,128, 82,223, 40, 0,113, 67, 48,131, 26,223, 16, 0,113,
/* 0x1040 */ 195, 48,131, 26,198, 0, 3, 75, 34, 0, 0, 20, 97, 1, 6,145,
/* 0x1050 */ 178, 0, 0,148,129, 1, 0, 84,227, 11, 64,185,226, 7, 64,185,
/* 0x1060 */ 227, 15, 0,185,226, 11, 0,185,239, 7, 0,185, 3, 0,128, 82,
/* 0x1070 */ 223, 28, 0,113,102, 0,128, 82,102, 48,134, 26,106,145, 25,145,
/* 0x1080 */ 42, 0, 0, 20, 97, 97, 6,145,164, 0, 0,148, 97, 2, 0, 84,
/* 0x1090 */ 227, 47, 64,185, 97,129, 7,145, 96, 16, 6, 11,160, 0, 0,148,
/* 0x10a0 */ 161, 3, 0, 84, 35, 1,128, 82,223, 28, 0,113,102, 1,128, 82,
/* 0x10b0 */ 102, 48,134, 26,227, 67, 66,248, 36, 1, 3,203,159, 0, 15,107,
/* 0x10c0 */ 131, 17, 0, 84,227,125, 64,147,227, 3, 3,203, 32,105, 99, 56,
/* 0x10d0 */ 32, 21, 0, 56,121, 0, 0, 20, 97,193, 6,145,143, 0, 0,148,
/* 0x10e0 */ 228, 7, 64,185, 64, 1, 0, 84, 97, 33, 7,145,139, 0, 0,148,
/* 0x10f0 */ 228, 11, 64,185,128, 0, 0, 84,227, 11, 64,185,228, 15, 64,185,
/* 0x1100 */ 227, 15, 0,185,227, 7, 64,185,227, 11, 0,185,239, 7, 0,185,
/* 0x1110 */ 239, 3, 4, 42, 3, 1,128, 82,223, 28, 0,113,102, 1,128, 82,
/* 0x1120 */ 102, 48,134, 26,106,161, 41,145, 65, 1, 0,145,125, 0, 0,148,
/* 0x1130 */ 1, 1, 0, 84,227, 47, 64,185, 69, 17, 0,145,227, 3, 3, 42,
/* 0x1140 */ 2, 0,128, 82,165, 16, 3,139, 4, 1,128, 82, 14, 0, 0, 20,
/* 0x1150 */ 65, 9, 0,145,115, 0, 0,148, 1, 1, 0, 84,227, 47, 64,185,
/* 0x1160 */ 69, 17, 4,145,227, 3, 3, 42, 2, 1,128, 82,165, 16, 3,139,
/* 0x1170 */ 4, 1,128, 82, 4, 0, 0, 20, 69, 17, 8,145, 2, 2,128, 82,
/* 0x1180 */ 4, 32,128, 82,226, 55, 0,185, 32, 0,128, 82,225, 3, 5,170,
/* 0x1190 */ 101, 0, 0,148, 3, 0, 4,107,163,255,255, 84,229, 55, 64,185,
/* 0x11a0 */ 165, 0, 3, 11,229, 55, 0,185,223, 16, 0,113,194, 6, 0, 84,
/* 0x11b0 */ 198, 28, 0, 17, 99, 0,128, 82,191, 16, 0,113,101, 32,133, 26,
/* 0x11c0 */ 227, 3, 5, 42,101, 29, 3,139,165,128, 13,145, 32, 0,128, 82,
/* 0x11d0 */ 4, 8,128, 82,225, 3, 5,170, 83, 0, 0,148, 3, 0, 4,107,
/* 0x11e0 */ 163,255,255, 84,227, 47, 0,185,127, 16, 0,113, 99, 4, 0, 84,
/* 0x11f0 */ 100,124, 1, 83,132, 4, 0, 81,111, 0, 0, 18,239, 1, 31, 50,
/* 0x1200 */ 127, 56, 0,113,226, 0, 0, 84,239, 33,196, 26,106,121, 21,145,
/* 0x1210 */ 227, 1, 3, 75,227, 3, 3, 42, 74, 5, 3,139, 12, 0, 0, 20,
/* 0x1220 */ 132, 16, 0, 81, 53, 0, 0,148,231,124, 1, 83,131, 1, 7,107,
/* 0x1230 */ 108, 32,140, 26,239, 1, 15, 26,132, 4, 0,113, 65,255,255, 84,
/* 0x1240 */ 106, 17, 25,145,239,109, 28, 83,132, 0,128, 82, 37, 0,128, 82,
/* 0x1250 */ 32, 0,128, 82,225, 3, 10,170, 51, 0, 0,148, 31, 0, 0,114,
/* 0x1260 */ 64, 0, 0, 84,239, 1, 5, 42,165,120, 31, 83,132, 4, 0,113,
/* 0x1270 */ 33,255,255, 84, 2, 0, 0, 20,239, 47, 64,185,239, 5, 0, 49,
/* 0x1280 */ 229, 55, 64,185,227, 67, 66,248,165, 8, 0, 17, 35, 1, 3,203,
/* 0x1290 */ 255, 1, 3,107,232, 2, 0, 84,227,125, 64,147,227, 3, 3,203,
/* 0x12a0 */ 32,105, 99, 56, 32, 21, 0, 56, 63, 1, 14,235,194, 0, 0, 84,
/* 0x12b0 */ 165, 4, 0,113, 97,255,255, 84,224,115, 0, 57, 63, 1, 14,235,
/* 0x12c0 */ 227,229,255, 84, 13, 0, 0,148, 0, 0,128, 82,226, 19, 64,249,
/* 0x12d0 */ 3, 1, 2,203,226, 31, 64,249, 67, 0, 0,185,226, 67, 66,248,
/* 0x12e0 */ 35, 1, 2,203,226, 55, 64,249, 67, 0, 0,185,255,243, 0,145,
/* 0x12f0 */ 32, 0,128, 82,246,255,255, 23,227,124, 24, 83,195, 0, 0, 53,
/* 0x1300 */ 31, 1, 13,235,231, 92, 24, 83, 66,255,255, 84, 3, 21, 64, 56,
/* 0x1310 */ 108, 32, 12, 42,192, 3, 95,214,224, 3, 6, 42, 33, 68, 32,139,
/* 0x1320 */ 0, 0,128, 82, 33, 68, 32,139,227,124, 24, 83,241, 3, 30,170,
/* 0x1330 */ 94, 0, 0, 16, 99,254,255, 52, 35, 0, 64,121,226,124, 11, 83,
/* 0x1340 */ 98,124, 2, 27,159, 1, 2,107, 2, 1, 0, 84,231, 3, 2, 42,
/* 0x1350 */ 2, 0,129, 82, 66, 0, 3, 75, 0, 0, 0, 58, 99, 20, 66, 11,
/* 0x1360 */ 35, 0, 0,121, 32, 2, 95,214,140, 1, 2, 75,231, 0, 2, 75,
/* 0x1370 */ 99, 20, 67, 75, 0, 0, 0, 58, 35, 0, 0,121, 32, 2, 95,214,
/* 0x1380 */ 102,105,108,101, 32,102,111,114,109, 97,116, 32,101,108,102, 54,
/* 0x1390 */ 52, 45,108,105,116,116,108,101, 97, 97,114, 99,104, 54, 52, 10,
/* 0x13a0 */ 10, 83,101, 99,116,105,111,110,115, 58, 10, 73,100,120, 32, 78,
/* 0x13b0 */ 97,109,101, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 83,105,122,
/* 0x13c0 */ 101, 32, 32, 32, 32, 32, 32, 86, 77, 65, 32, 32, 32, 32, 32, 32,
/* 0x13d0 */ 32, 32, 32, 32, 32, 32, 32, 32, 32, 76, 77, 65, 32, 32, 32, 32,
/* 0x13e0 */ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 70,105,108,101, 32,
/* 0x13f0 */ 111,102,102, 32, 32, 65,108,103,110, 32, 32, 70,108, 97,103,115,
/* 0x1400 */ 10, 32, 32, 48, 32, 78, 82, 86, 95, 72, 69, 65, 68, 32, 32, 32,
/* 0x1410 */ 32, 32, 32, 48, 32, 32, 48, 32, 32, 48, 32, 32, 48, 52, 48, 32,
/* 0x1420 */ 32, 50, 42, 42, 48, 32, 32, 67, 79, 78, 84, 69, 78, 84, 83, 10,
/* 0x1430 */ 32, 32, 49, 32, 78, 82, 86, 50, 66, 32, 32, 32, 32, 32, 32, 32,
/* 0x1440 */ 32, 32, 48, 49, 52, 52, 32, 32, 48, 32, 32, 48, 32, 32, 48, 52,
/* 0x1450 */ 48, 32, 32, 50, 42, 42, 48, 32, 32, 67, 79, 78, 84, 69, 78, 84,
/* 0x1460 */ 83, 10, 32, 32, 50, 32, 78, 82, 86, 50, 68, 32, 32, 32, 32, 32,
/* 0x1470 */ 32, 32, 32, 32, 48, 49, 55, 48, 32, 32, 48, 32, 32, 48, 32, 32,
/* 0x1480 */ 48, 49, 56, 52, 32, 32, 50, 42, 42, 48, 32, 32, 67, 79, 78, 84,
/* 0x1490 */ 69, 78, 84, 83, 10, 32, 32, 51, 32, 78, 82, 86, 50, 69, 32, 32,
/* 0x14a0 */ 32, 32, 32, 32, 32, 32, 32, 48, 49, 55, 99, 32, 32, 48, 32, 32,
/* 0x14b0 */ 48, 32, 32, 48, 50,102, 52, 32, 32, 50, 42, 42, 48, 32, 32, 67,
/* 0x14c0 */ 79, 78, 84, 69, 78, 84, 83, 10, 32, 32, 52, 32, 76, 90, 77, 65,
/* 0x14d0 */ 95, 72, 69, 65, 68, 32, 32, 32, 32, 32, 48, 32, 32, 48, 32, 32,
/* 0x14e0 */ 48, 32, 32, 48, 52, 55, 48, 32, 32, 50, 42, 42, 48, 32, 32, 67,
/* 0x14f0 */ 79, 78, 84, 69, 78, 84, 83, 10, 32, 32, 53, 32, 76, 90, 77, 65,
/* 0x1500 */ 95, 69, 76, 70, 48, 48, 32, 32, 32, 32, 48, 49, 48, 99, 32, 32,
/* 0x1510 */ 48, 32, 32, 48, 32, 32, 48, 52, 55, 48, 32, 32, 50, 42, 42, 48,
/* 0x1520 */ 32, 32, 67, 79, 78, 84, 69, 78, 84, 83, 10, 32, 32, 54, 32, 76,
/* 0x1530 */ 90, 77, 65, 95, 68, 69, 67, 50, 48, 32, 32, 32, 32, 48, 57, 54,
/* 0x1540 */ 56, 32, 32, 48, 32, 32, 48, 32, 32, 48, 53, 55, 99, 32, 32, 50,
/* 0x1550 */ 42, 42, 48, 32, 32, 67, 79, 78, 84, 69, 78, 84, 83, 10, 32, 32,
/* 0x1560 */ 55, 32, 76, 90, 77, 65, 95, 68, 69, 67, 49, 48, 32, 32, 32, 32,
/* 0x1570 */ 48, 52, 57, 99, 32, 32, 48, 32, 32, 48, 32, 32, 48,101,101, 52,
/* 0x1580 */ 32, 32, 50, 42, 42, 48, 32, 32, 67, 79, 78, 84, 69, 78, 84, 83,
/* 0x1590 */ 10, 32, 32, 56, 32, 76, 90, 77, 65, 95, 68, 69, 67, 51, 48, 32,
/* 0x15a0 */ 32, 32, 32, 48, 32, 32, 48, 32, 32, 48, 32, 32, 48, 49, 51, 56,
/* 0x15b0 */ 48, 32, 32, 50, 42, 42, 48, 32, 32, 67, 79, 78, 84, 69, 78, 84,
/* 0x15c0 */ 83, 10, 32, 32, 57, 32, 76, 90, 77, 65, 95, 84, 65, 73, 76, 32,
/* 0x15d0 */ 32, 32, 32, 32, 48, 32, 32, 48, 32, 32, 48, 32, 32, 48, 49, 51,
/* 0x15e0 */ 56, 48, 32, 32, 50, 42, 42, 48, 32, 32, 67, 79, 78, 84, 69, 78,
/* 0x15f0 */ 84, 83, 10, 83, 89, 77, 66, 79, 76, 32, 84, 65, 66, 76, 69, 58,
/* 0x1600 */ 10, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
/* 0x1610 */ 48, 32,108, 32, 32, 32, 32,100, 32, 32, 76, 90, 77, 65, 95, 68,
/* 0x1620 */ 69, 67, 51, 48, 32, 48, 32, 76, 90, 77, 65, 95, 68, 69, 67, 51,
/* 0x1630 */ 48, 10, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
/* 0x1640 */ 48, 48, 32,108, 32, 32, 32, 32,100, 32, 32, 78, 82, 86, 95, 72,
/* 0x1650 */ 69, 65, 68, 32, 48, 32, 78, 82, 86, 95, 72, 69, 65, 68, 10, 48,
/* 0x1660 */ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 32,
/* 0x1670 */ 108, 32, 32, 32, 32,100, 32, 32, 78, 82, 86, 50, 66, 32, 48, 32,
/* 0x1680 */ 78, 82, 86, 50, 66, 10, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
/* 0x1690 */ 48, 48, 48, 48, 48, 48, 32,108, 32, 32, 32, 32,100, 32, 32, 78,
/* 0x16a0 */ 82, 86, 50, 68, 32, 48, 32, 78, 82, 86, 50, 68, 10, 48, 48, 48,
/* 0x16b0 */ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 32,108, 32,
/* 0x16c0 */ 32, 32, 32,100, 32, 32, 78, 82, 86, 50, 69, 32, 48, 32, 78, 82,
/* 0x16d0 */ 86, 50, 69, 10, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
/* 0x16e0 */ 48, 48, 48, 48, 32,108, 32, 32, 32, 32,100, 32, 32, 76, 90, 77,
/* 0x16f0 */ 65, 95, 72, 69, 65, 68, 32, 48, 32, 76, 90, 77, 65, 95, 72, 69,
/* 0x1700 */ 65, 68, 10, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
/* 0x1710 */ 48, 48, 48, 32,108, 32, 32, 32, 32,100, 32, 32, 76, 90, 77, 65,
/* 0x1720 */ 95, 69, 76, 70, 48, 48, 32, 48, 32, 76, 90, 77, 65, 95, 69, 76,
/* 0x1730 */ 70, 48, 48, 10, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
/* 0x1740 */ 48, 48, 48, 48, 32,108, 32, 32, 32, 32,100, 32, 32, 76, 90, 77,
/* 0x1750 */ 65, 95, 68, 69, 67, 50, 48, 32, 48, 32, 76, 90, 77, 65, 95, 68,
/* 0x1760 */ 69, 67, 50, 48, 10, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
/* 0x1770 */ 48, 48, 48, 48, 48, 32,108, 32, 32, 32, 32,100, 32, 32, 76, 90,
/* 0x1780 */ 77, 65, 95, 68, 69, 67, 49, 48, 32, 48, 32, 76, 90, 77, 65, 95,
/* 0x1790 */ 68, 69, 67, 49, 48, 10, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
/* 0x17a0 */ 48, 48, 48, 48, 48, 48, 32,108, 32, 32, 32, 32,100, 32, 32, 76,
/* 0x17b0 */ 90, 77, 65, 95, 84, 65, 73, 76, 32, 48, 32, 76, 90, 77, 65, 95,
/* 0x17c0 */ 84, 65, 73, 76, 10, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
/* 0x17d0 */ 48, 48, 48, 48, 48, 32,103, 32, 32, 32, 32, 32, 70, 32, 78, 82,
/* 0x17e0 */ 86, 50, 66, 32, 48, 49, 52, 52, 32,117, 99,108, 95,110,114,118,
/* 0x17f0 */ 50, 98, 95,100,101, 99,111,109,112,114,101,115,115, 95, 51, 50,
/* 0x1800 */ 10, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
/* 0x1810 */ 48, 32,103, 32, 32, 32, 32, 32, 70, 32, 78, 82, 86, 50, 68, 32,
/* 0x1820 */ 48, 49, 55, 48, 32,117, 99,108, 95,110,114,118, 50,100, 95,100,
/* 0x1830 */ 101, 99,111,109,112,114,101,115,115, 95, 51, 50, 10, 48, 48, 48,
/* 0x1840 */ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 32,103, 32,
/* 0x1850 */ 32, 32, 32, 32, 70, 32, 78, 82, 86, 50, 69, 32, 48, 49, 55, 99,
/* 0x1860 */ 32,117, 99,108, 95,110,114,118, 50,101, 95,100,101, 99,111,109,
/* 0x1870 */ 112,114,101,115,115, 95, 51, 50, 10, 48, 48, 48, 48, 48, 48, 48,
/* 0x1880 */ 48, 48, 48, 48, 48, 48, 48, 48, 48, 32,103, 32, 32, 32, 32, 32,
/* 0x1890 */ 32, 32, 76, 90, 77, 65, 95, 68, 69, 67, 49, 48, 32, 48, 32, 76,
/* 0x18a0 */ 122,109, 97, 68,101, 99,111,100,101, 10, 10, 82, 69, 76, 79, 67,
/* 0x18b0 */ 65, 84, 73, 79, 78, 32, 82, 69, 67, 79, 82, 68, 83, 32, 70, 79,
/* 0x18c0 */ 82, 32, 91, 76, 90, 77, 65, 95, 69, 76, 70, 48, 48, 93, 58, 10,
/* 0x18d0 */ 79, 70, 70, 83, 69, 84, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
/* 0x18e0 */ 32, 84, 89, 80, 69, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
/* 0x18f0 */ 32, 32, 32, 86, 65, 76, 85, 69, 10, 48, 48, 48, 48, 48, 48, 48,
/* 0x1900 */ 48, 48, 48, 48, 48, 48, 48, 48, 52, 32, 82, 95, 65, 65, 82, 67,
/* 0x1910 */ 72, 54, 52, 95, 67, 79, 78, 68, 66, 82, 49, 57, 32, 32, 76, 90,
/* 0x1920 */ 77, 65, 95, 68, 69, 67, 51, 48, 10
};

View File

@ -1,5 +1,5 @@
/*
; AMD64-win64.pep.S -- loader & decompressor for the w64/pe32+ format
; AMD64-win64.pe.S -- loader & decompressor for the w64/pe32+ format
;
; This file is part of the UPX executable compressor.
;

View File

@ -1,4 +1,4 @@
/* arm.v4a-wince.pe.S -- ARM/PE decompressor assembly startup (arm mode)
/* arm.v4a-win32.pe.S -- ARM/PE decompressor assembly startup (arm mode)
This file is part of the UPX executable compressor.
@ -33,8 +33,8 @@
// DEBUG == 0 -> none
// DEBUG == 1 -> for armpe_tester
// DEBUG == 2 -> wince - dumps memory
// DEBUG == 3 -> wince - removes files
// DEBUG == 2 -> win32 - dumps memory
// DEBUG == 3 -> win32 - removes files
#define DEBUG 0
#if DEBUG == 0

View File

@ -1,4 +1,4 @@
/* arm.v4t-wince.pe.S -- ARM/PE decompressor assembly startup (thumb mode)
/* arm.v4t-win32.pe.S -- ARM/PE decompressor assembly startup (thumb mode)
This file is part of the UPX executable compressor.

View File

@ -0,0 +1,58 @@
/* arm64-win64.pe.S --
*
* This file is part of the UPX executable compressor.
*
* Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
* Copyright (C) 1996-2023 Laszlo Molnar
* Copyright (C) 2000-2023 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
* <markus@oberhumer.com> <ml1050@users.sourceforge.net>
*
* John F. Reiser
* <jreiser@users.sourceforge.net>
*/
#include "arch/arm64/v8/macros.S"
// =============
// ============= DECOMPRESSION
// =============
section NRV_HEAD
// empty ???
section NRV2B
#include "arch/arm64/v8/nrv2b_d32.S"
section NRV2D
#include "arch/arm64/v8/nrv2d_d32.S"
section NRV2E
#include "arch/arm64/v8/nrv2e_d32.S"
section LZMA_HEAD
#include "arch/arm64/v8/lzma_d.S"
section LZMA_TAIL
// vim:set ts=8 sw=8 et:

33
src/stub/tmp/arm64-win64.pe.bin.dump vendored Normal file
View File

@ -0,0 +1,33 @@
file format elf64-littleaarch64
Sections:
Idx Name Size VMA LMA File off Algn Flags
0 NRV_HEAD 0 0 0 040 2**0 CONTENTS
1 NRV2B 0144 0 0 040 2**0 CONTENTS
2 NRV2D 0170 0 0 0184 2**0 CONTENTS
3 NRV2E 017c 0 0 02f4 2**0 CONTENTS
4 LZMA_HEAD 0 0 0 0470 2**0 CONTENTS
5 LZMA_ELF00 010c 0 0 0470 2**0 CONTENTS
6 LZMA_DEC20 0968 0 0 057c 2**0 CONTENTS
7 LZMA_DEC10 049c 0 0 0ee4 2**0 CONTENTS
8 LZMA_DEC30 0 0 0 01380 2**0 CONTENTS
9 LZMA_TAIL 0 0 0 01380 2**0 CONTENTS
SYMBOL TABLE:
0000000000000000 l d LZMA_DEC30 0 LZMA_DEC30
0000000000000000 l d NRV_HEAD 0 NRV_HEAD
0000000000000000 l d NRV2B 0 NRV2B
0000000000000000 l d NRV2D 0 NRV2D
0000000000000000 l d NRV2E 0 NRV2E
0000000000000000 l d LZMA_HEAD 0 LZMA_HEAD
0000000000000000 l d LZMA_ELF00 0 LZMA_ELF00
0000000000000000 l d LZMA_DEC20 0 LZMA_DEC20
0000000000000000 l d LZMA_DEC10 0 LZMA_DEC10
0000000000000000 l d LZMA_TAIL 0 LZMA_TAIL
0000000000000000 g F NRV2B 0144 ucl_nrv2b_decompress_32
0000000000000000 g F NRV2D 0170 ucl_nrv2d_decompress_32
0000000000000000 g F NRV2E 017c ucl_nrv2e_decompress_32
0000000000000000 g LZMA_DEC10 0 LzmaDecode
RELOCATION RECORDS FOR [LZMA_ELF00]:
OFFSET TYPE VALUE
0000000000000004 R_AARCH64_CONDBR19 LZMA_DEC30