Compare commits

..

80 Commits

Author SHA1 Message Date
Markus F.X.J. Oberhumer 89cfa22c3f Final cleanups for 2.01. 2006-06-06 17:36:34 +02:00
John Reiser e7522f4bdf branch merge 2006-05-24 13:59:43 -07:00
John Reiser 504deeff42 ET_DYN cannot be old format for decompression 2006-05-24 13:15:39 -07:00
Markus F.X.J. Oberhumer b7785b64cf Small cleanups to keep p_armpe & p_w32pe in sync. 2006-05-24 19:21:26 +02:00
László Molnár f914cb6858 pe: added support for empty resource section 2006-05-24 17:14:09 +02:00
John Reiser 91051d2521 Try to merge with mainline. 2006-05-23 17:52:05 -07:00
John Reiser 51536a7acd decompression PackLinuxElf32x86.ET_DYN 2006-05-23 17:42:35 -07:00
Markus F.X.J. Oberhumer 263ccab6e3 Updated NEWS for --brute bugfix. 2006-05-23 13:25:19 +02:00
John Reiser 9f87755dcb Note fix to --force-execve for PaX, grSecurity, strict SELinux. 2006-05-22 15:15:21 -07:00
John Reiser 60b4cca5e5 use powerpc-750-linux-gnu/gcc-3.4.3.20050210-glibc-2.2.5 2006-05-22 13:14:54 -07:00
John Reiser d2718e99a4 Change class PackLinuxI386elf : public PackLinuxI386
into   class PackLinuxElf32x86 : public PackLinuxElf32Le : public PackLinuxElf32
which makes the code for compressing ELF (for direct-to-memory decompression)
cleaner because ELF has some of the class tree to itself.
This assumes PROT_EXEC|PROT_WRITE ought to work.
This is checked at runtime, and if it fails then
give a message on stderr and exit(127).

Modify --force-execve so that runtime avoids PROT_EXEC|PROT_WRITE.
Then executables compressed with --force-execve will run under
PaX, grSecurity, and strict SELinux.
2006-05-21 13:58:24 -07:00
John Reiser 69a00c0ab3 *BSD requires -1==fd for MAP_ANONYMOUS
stub/l_lx_exec.c stub/l_lx_sh.c stub/l_lx_sh86.asm
2006-05-21 13:45:57 -07:00
Markus F.X.J. Oberhumer 3272d23917 Renamed variable hdr_clen to hdr_c_len. 2006-05-20 13:44:36 +02:00
Markus F.X.J. Oberhumer 7f0545cae7 Check result of hdr compression. 2006-05-20 13:37:34 +02:00
Markus F.X.J. Oberhumer 68f35deb86 Fixed a rare boundary problem in Packer::compressWithFilters().
The comparision if an update might be possible later was using
"<" instead of "<=" which resulted in missing calls to
findOverlapOverhead() and buildLoader().

Also, the comparision had not been updated for the newly added
hdr_clen fields.

This fixes sf.net bug #1477825.
2006-05-20 13:29:01 +02:00
Markus F.X.J. Oberhumer c4f4035072 Updated NEWS. 2006-05-18 19:01:03 +02:00
László Molnár a7d8845952 mention --keep-resource in NEWS and help.cpp 2006-05-18 15:54:35 +02:00
Markus F.X.J. Oberhumer a3378393b0 Removed scripts/. 2006-05-18 15:35:35 +02:00
László Molnár 3dfe0ad478 pe: fined grain control over resource compression 2006-05-18 15:20:37 +02:00
László Molnár 9a3b7a4f3f arm/pe: really fix the memory leak 2006-05-18 15:20:11 +02:00
László Molnár 78579b1103 pe: do not crash on out of bounds bogus relocation records 2006-05-18 15:19:55 +02:00
László Molnár 7d50344512 pe: fixed a memory leak in the resource handling code 2006-05-18 15:19:13 +02:00
László Molnár 7a00c12065 arm/pe: minor cleanup in the thumb mode stub 2006-05-18 15:18:50 +02:00
László Molnár af71e67681 arm/pe: saved 4 bytes in the arm mode stub 2006-05-18 15:18:36 +02:00
László Molnár b3e20fc324 arm/pe: no need to try to precompute the size of relocations 2006-05-18 15:18:13 +02:00
László Molnár bd1014abb6 dos/exe: saved some bytes in device driver mode 2006-05-18 15:17:53 +02:00
László Molnár 7f76664a5d Merged with mainline 2006-05-18 13:10:15 +02:00
Markus F.X.J. Oberhumer 0a5a80b05d Updated .hgignore. 2006-05-18 10:48:06 +02:00
Markus F.X.J. Oberhumer 2d63da0660 Support automatic ChangeLog generation. 2006-05-18 10:16:59 +02:00
Markus F.X.J. Oberhumer 8387527d2e Updated .hgignore. 2006-05-18 09:37:18 +02:00
Markus F.X.J. Oberhumer 5d03ba7d63 Added .hgignore. 2006-05-18 09:08:38 +02:00
Markus F.X.J. Oberhumer 0ece50c122 Removed .cvsignore and .gitignore files. 2006-05-18 09:02:00 +02:00
Markus F.X.J. Oberhumer f2ac297252 Updated tags. 2006-05-18 08:27:19 +02:00
László Molnár 0ca8ae17d4 updated my email address 2006-05-17 21:05:46 +02:00
convert-repo 88ca87cf9e update tags 2006-05-11 10:41:33 +00:00
László Molnár 0d69d228e4 arm/pe: no need to allocate extra memory in the import table
committer: ml1050 <ml1050> 1147090379 +0000
2006-05-08 12:12:59 +00:00
Markus F.X.J. Oberhumer a3afe95306 Updated NEWS.
committer: mfx <mfx> 1147081195 +0000
2006-05-08 09:39:55 +00:00
Markus F.X.J. Oberhumer 9fb4af8658 Updated Makefile.
committer: mfx <mfx> 1147081156 +0000
2006-05-08 09:39:16 +00:00
László Molnár 9bb6ba9311 dos/exe: device driver support added (thanks Michael Devore)
committer: ml1050 <ml1050> 1147078121 +0000
2006-05-08 08:48:41 +00:00
Markus F.X.J. Oberhumer faa42ba341 Updated the master Makefile
to be more friendly to people without the special stub build tools.

committer: mfx <mfx> 1146764116 +0000
2006-05-04 17:35:16 +00:00
László Molnár 596827a912 remove obsolete files: l_armpe.asm l_armpe.h l_armpe_c.c l_armpe_s.S
committer: ml1050 <ml1050> 1146763209 +0000
2006-05-04 17:20:09 +00:00
László Molnár 89b4292445 saved 2 bytes
committer: ml1050 <ml1050> 1146763076 +0000
2006-05-04 17:17:56 +00:00
László Molnár dd88737414 it works on wince now (only with dlls)
committer: ml1050 <ml1050> 1146763013 +0000
2006-05-04 17:16:53 +00:00
László Molnár 5456cfc304 arm/pe: use the new linker friendly stubs
two linkers: one for arm mode, one for thumb mode
the import address table is moved to the stubs area of compressed files
changed the alignment of some header fields
the command line option "--8086" can be used to force thumb mode on

committer: ml1050 <ml1050> 1146647520 +0000
2006-05-03 09:12:00 +00:00
László Molnár 1e66096ea7 arm/pe stubs: the import address table is moved to the stub
committer: ml1050 <ml1050> 1146646915 +0000
2006-05-03 09:01:55 +00:00
John Reiser 2b6ae3908c /usr/bin/dyld can be a "fat binary" [how stupid!]
m_mac_mach32.c fold_machppc32.S fold_machppc32.h

committer: jreiser <jreiser> 1146434013 +0000
2006-04-30 21:53:33 +00:00
László Molnár 1924612479 a small fix for the thumb stub
committer: ml1050 <ml1050> 1146224685 +0000
2006-04-28 11:44:45 +00:00
László Molnár 2af5bdeaab added some debugging code
committer: ml1050 <ml1050> 1146154452 +0000
2006-04-27 16:14:12 +00:00
László Molnár b28565b38d new files: l_armpea.h l_armpet.h
committer: ml1050 <ml1050> 1146154411 +0000
2006-04-27 16:13:31 +00:00
László Molnár fec602362b added new virtual function createLinker()
committer: ml1050 <ml1050> 1146153290 +0000
2006-04-27 15:54:50 +00:00
László Molnár 6753c5f45a trying to implement the user space loader on native wince
committer: ml1050 <ml1050> 1146152386 +0000
2006-04-27 15:39:46 +00:00
Markus F.X.J. Oberhumer 2f3c108d42 Next version will be 2.01.
committer: mfx <mfx> 1146140843 +0000
2006-04-27 12:27:23 +00:00
Markus F.X.J. Oberhumer ce6d99bdb4 More README updates.
committer: mfx <mfx> 1146086335 +0000
2006-04-26 21:18:55 +00:00
Markus F.X.J. Oberhumer 86d4125893 Updates.
committer: mfx <mfx> 1146086189 +0000
2006-04-26 21:16:29 +00:00
Markus F.X.J. Oberhumer 3a18f00379 Prepared 2.00 release notes.
committer: mfx <mfx> 1146085621 +0000
2006-04-26 21:07:01 +00:00
Markus F.X.J. Oberhumer e6274904a7 Rebuilt using i386-linux-ld-2.16.1 and i386-linux-objcopy-2.16.1.
committer: mfx <mfx> 1146079399 +0000
2006-04-26 19:23:19 +00:00
Markus F.X.J. Oberhumer 3677395444 Add version suffix to the binutils we use. Prefix all linux/386 tools
with i386-linux-.

committer: mfx <mfx> 1146079325 +0000
2006-04-26 19:22:05 +00:00
László Molnár 22ba35b3b5 new arm/pe assembly with UPX linker support
committer: ml1050 <ml1050> 1145955479 +0000
2006-04-25 08:57:59 +00:00
Markus F.X.J. Oberhumer 9c1ab9979b Split "$Id" strings so that CVS does not interfere. Explicitlty
use ".p2align" and ".balign" instead of ".align".

committer: mfx <mfx> 1145864788 +0000
2006-04-24 07:46:28 +00:00
John Reiser eaa463e1c9 Insert copyright notice (equivalent to ident_s.ash) into stub by hand
because buildLoader is not fully working yet
	l_lx_elf64amd.S l_lx_elfppc32.S l_mac_ppc32.S

committer: jreiser <jreiser> 1145825498 +0000
2006-04-23 20:51:38 +00:00
John Reiser 6984be48c3 build sync: compile using crosstool gcc-3.4.3.20050507-glibc-2.3.5
committer: jreiser <jreiser> 1145820281 +0000
2006-04-23 19:24:41 +00:00
John Reiser b739bd3d79 Work better with SELinux. We still require allow_execmem.
p_lx_elf.cpp
	stub/fold_elfppc32.h
	stub/l_lx_elfppc32.h
	stub/l_lx_elfppc32.S
	stub/m_lx_elfppc32.c

committer: jreiser <jreiser> 1145666524 +0000
2006-04-22 00:42:04 +00:00
John Reiser 23f3e4396c For elf64and and elfppc32: -fno-exceptions -fno-asynchronous-unwind-tables
committer: jreiser <jreiser> 1145666377 +0000
2006-04-22 00:39:37 +00:00
John Reiser c264750924 Adapt better to SELinux. We still need allow_execmem.
p_lx_elf.cpp
	stub/a_lx_elf64.c
	stub/l_lx_elf64amd.h
	stub/l_lx_elf64amd.lds
	stub/l_lx_elf64amd.S
	stub/fold_elf64amd.h

committer: jreiser <jreiser> 1145657332 +0000
2006-04-21 22:08:52 +00:00
John Reiser c155f0a5d5 Better fit with SELinux. Now requires only execmem, which Fedora Core 5
enables as default for non-confined [ordinary] executables.
	l_lx_elf.c
	l_lx_elf86.asm
	l_lx_elf86.h
	l_lx_elf86.lds
	fold_elf86.asm
	fold_elf86.h

committer: jreiser <jreiser> 1145634453 +0000
2006-04-21 15:47:33 +00:00
László Molnár 76734f086d added an arm/linux based loader/tester for arm/pe files
committer: ml1050 <ml1050> 1145605029 +0000
2006-04-21 07:37:09 +00:00
Markus F.X.J. Oberhumer 4f2d1172dd Added a note about --force-execve. Converted quoting from using
backticks to single-quotes.

committer: mfx <mfx> 1145444708 +0000
2006-04-19 11:05:08 +00:00
Markus F.X.J. Oberhumer 75caf4e297 Fix spelling in NEWS.
committer: mfx <mfx> 1145436378 +0000
2006-04-19 08:46:18 +00:00
Markus F.X.J. Oberhumer 509ab8261f Avoid code bloat in the official builds.
committer: mfx <mfx> 1145436321 +0000
2006-04-19 08:45:21 +00:00
Markus F.X.J. Oberhumer 1e05b40d4f Whitespace changes.
committer: mfx <mfx> 1145436164 +0000
2006-04-19 08:42:44 +00:00
Markus F.X.J. Oberhumer 451390f835 Updated NEWS.
committer: mfx <mfx> 1145435924 +0000
2006-04-19 08:38:44 +00:00
John Reiser 58cce9d2f8 Give message on stderr when SELinux enforcing mode inhibits execution.
l_lx_elf.c fold_elf86.asm fold_elf86.h

committer: jreiser <jreiser> 1145393418 +0000
2006-04-18 20:50:18 +00:00
László Molnár 2eb6e3b0ea arm/pe & w32/pe: disable filters for files with broken headers
committer: ml1050 <ml1050> 1145356307 +0000
2006-04-18 10:31:47 +00:00
John Reiser fb1181ed26 Allow executables >=3MB on elf64amd; -r1.69 on 2005-11-12 forgot to remove check.
committer: jreiser <jreiser> 1145139994 +0000
2006-04-15 22:26:34 +00:00
Markus F.X.J. Oberhumer 6d5e1d529d Updated NEWS.
committer: mfx <mfx> 1144968512 +0000
2006-04-13 22:48:32 +00:00
John Reiser 0e0ca08924 Propagate changes from linux.hh.
fold_elf86.h fold_pti86.h fold_sh86.h

committer: jreiser <jreiser> 1144967510 +0000
2006-04-13 22:31:50 +00:00
John Reiser 5d948a67a8 Propagate changes from linux.hh.
Also adjust calling segquence of upx_main() to shave a few bytes.
	l_lx_exec.c fold_exec86.asm fold_exec86.h

committer: jreiser <jreiser> 1144967447 +0000
2006-04-13 22:30:47 +00:00
John Reiser 6a4db2ecab Linux syscalls can clobber any input register, thanks to gcc and
the lack of a Linux kernel ABI.
	linux.hh

committer: jreiser <jreiser> 1144967342 +0000
2006-04-13 22:29:02 +00:00
Markus F.X.J. Oberhumer f700273624 Really bump the release date.
committer: mfx <mfx> 1144944628 +0000
2006-04-13 16:10:28 +00:00
Markus F.X.J. Oberhumer 0c198e0ccc Set tentative release date.
committer: mfx <mfx> 1144944070 +0000
2006-04-13 16:01:10 +00:00
112 changed files with 3824 additions and 6374 deletions
-13
View File
@@ -1,13 +0,0 @@
.bzr*
.darcs*
.git*
.hg*
_darcs
B
build*
doxygen
maint
ChangeLog.cvs*
GNUmakefile
MMakefile
TODO.*
-13
View File
@@ -1,13 +0,0 @@
.bzr*
.darcs*
.git*
.hg*
_darcs
B
build*
doxygen
maint
ChangeLog.cvs*
GNUmakefile
MMakefile
TODO.*
+43
View File
@@ -0,0 +1,43 @@
syntax: regexp
^ChangeLog
^build
^maint
syntax: glob
*.a
*.d
*.dll
*.exe
*.lib
*.map
*.o
*.out
*.py[cdo]
*.so
*.res
*.ttp
doc/*.1
doc/*.doc
doc/*.html
src/MMakefile
src/compress_nrv*
src/*.rc
stub/MMakefile
stub/l_t_*.i
stub/stamp-h
stub/*.ash
stub/*.asx
stub/*.asy
stub/*.bin
stub/*.lst
stub/util/armpe/armpe_tester
stub/util/sstrip/amd64-linux-sstrip
stub/util/sstrip/i386-linux-sstrip
stub/util/sstrip/sstrip
+10
View File
@@ -0,0 +1,10 @@
140415ffbcef86a42b4d672249927364430d3d38 RELEASE_111
223ac5b23f9731ceac9ff8d65167df4900776e36 RELEASE_190
2c753c5bf38e7322715e2a5c6c5381111bd7a61a RELEASE_194
2ee65b77f9117651e2e5517b2edede23698d73ca RELEASE_196
70402aeee6e0e4fc2889658ed8cee44461c0b0a8 RELEASE_200
a935d577fc7dd9c2c87761c9c702805da6ce1e51 RELEASE_193
b0353253b0b3d062eb5adb50d4b665a96620da45 RELEASE_195
c2e0cd4d621b047f254f2def42132a03683ff52c RELEASE_192
eb1ce56dce7dd1835964362470610925963b9043 RELEASE_110
ed96891ef795bceec6b7ff3ca1ca7764431bfb39 RELEASE_191
+8 -18
View File
@@ -12,32 +12,22 @@ default:
@echo "UPX info: please choose a target for 'make'"
all mostlyclean clean distclean maintainer-clean:
ifneq ($(wildcard $(HOME)/local/bin/bin-upx),)
# these need special build tools
$(MAKE) -C src/stub/util/sstrip $@
$(MAKE) -C src/stub $@
endif
$(MAKE) -C src $@
$(MAKE) -C doc $@
dist: distclean
false
ifneq ($(wildcard CVS/R*),)
CVS_ROOT := $(shell cat CVS/Root)
CVS_REPO := $(shell cat CVS/Repository)
endif
cvs-info:
@echo 'CVS info: $(CVS_ROOT) $(CVS_REPO)'
cvs-admin-ko:
cvs admin -ko .
cvs -q -z6 update -P -d
# automatically generate ChangeLog from CVS
ChangeLog ChangeLog.cvs:
perl $(srcdir)/scripts/cvs2cl.pl --utc -f ChangeLog.cvs
# automatically generate ChangeLog from hg
ChangeLog:
hg log --style=changelog > $@
.PHONY: all mostlyclean clean distclean maintainer-clean
.PHONY: dist cvs-info cvs-admin-ko ChangeLog ChangeLog.cvs
.PHONY: default all mostlyclean clean distclean maintainer-clean
.PHONY: dist ChangeLog
+42 -27
View File
@@ -2,12 +2,27 @@
User visible changes for UPX
==================================================================
Changes in 2.00 (XX XXX 2006):
Changes in 2.01 (06 Jun 2006):
* arm/pe: better DLL support
* dos/exe: device driver support added
* linux/386: Fix --force-execve for PaX, grSecurity, and strict SELinux.
/tmp must support execve(); therefore /tmp cannot be mounted 'noexec'.
* win32/pe & arm/pe: added new option '--keep-resource=' for
excluding selected resources from compression
Changes in 2.00 (27 Apr 2006):
* linux/386: the stub now prints an error message if some strict
SELinux mode does prevent runtime decompression and execution
(for a fully SELinux-compatible but otherwise inferior compression
format you can use the '--force-execve' option)
* linux/386: worked around a problem where certain Linux kernels
clobber the %ebx register during a syscall
* win32/pe: disable filters for files with broken PE headers
Changes in 1.96 beta (13 Apr 2006):
* arm/pe: added filter support
* win32/pe: removed an unnecessary check so that Delphi 2006 and
Digital Mars C++ programs finally work
Digital Mars C++ programs finally are supported
Changes in 1.95 beta (09 Apr 2006):
* arm/pe: added DLL support
@@ -28,8 +43,8 @@ Changes in 1.93 beta (07 Feb 2005):
* vmlinuz/386: fixes to support more kernels
Changes in 1.92 beta (20 Jul 2004):
* win32/pe: added option `--strip-loadconf' to strip the SEH
load config section
* win32/pe: added option '--strip-loadconf' to strip the SEH load
config section [NOTE: this option is obsolete since UPX 1.94]
* win32/pe: try to detect .NET (win32/net) files [not yet supported by UPX]
* vmlinux/386: new format that directly supports building Linux kernels
* source code: now compiles cleanly under Win64
@@ -40,7 +55,7 @@ Changes in 1.91 beta (30 Jun 2004):
* vmlinuz/386: added support for recent kernels
* watcom/le: don't crash on files without relocations
* win32/pe: stricter checks of some PE values
* option `--brute' now implies `--crp-ms=999999'.
* option '--brute' now implies '--crp-ms=999999'.
* source code: much improved portability using ACC, the
Automatic Compiler Configuration
* source code: compile fixes for strict ISO C++ compilers
@@ -49,9 +64,9 @@ Changes in 1.91 beta (30 Jun 2004):
Changes in 1.90 beta (11 Nov 2002):
* implemented several new options for finer compression control:
`--all-methods', `--all-filters' and `--brute'
'--all-methods', '--all-filters' and '--brute'
* ps1/exe: new format - UPX now supports PlayStation One programs
* linux/386: added the option `--force-execve'
* linux/386: added the option '--force-execve'
* vmlinuz/386: better kernel detection and sanity checks
* re-synced with upx 1.24 branch
* documentation updates
@@ -96,9 +111,9 @@ Changes in 1.22 (27 Jun 2002)
Digital Mars C++ and Watcom C++
Changes in 1.21 (01 Jun 2002)
* New option `--crp-ms=' for slightly better compression at the cost
* New option '--crp-ms=' for slightly better compression at the cost
of higher memory requirements during compression.
Try `upx --best --crp-ms=100000'. See the docs for more info.
Try 'upx --best --crp-ms=100000'. See the docs for more info.
* source code: portability fixes
* source code: compile fixes for g++ 3.0 and g++ 3.1
@@ -136,7 +151,7 @@ Changes in 1.05 (24 Jan 2001)
at the unstable UPX 1.1x beta versions for that)
Changes in 1.04 (19 Dec 2000)
* dos/exe: fixed an internal error when using `--no-reloc'
* dos/exe: fixed an internal error when using '--no-reloc'
* win32/pe: fixed a rare bug in the relocation handling code
* some tunings for the default compression level
@@ -144,7 +159,7 @@ Changes in 1.03 (30 Nov 2000)
* linked with a new version of the NRV compression library:
- improved compression ratio a little bit
- overall significantly faster compression
- much faster when using high compression levels like `-9' or `--best'
- much faster when using high compression levels like '-9' or '--best'
- much faster with large files
* atari/tos: added support for FreeMiNT
* the 32-bit DOS version now uses the new CWSDSTUB extender
@@ -152,7 +167,7 @@ Changes in 1.03 (30 Nov 2000)
Changes in 1.02 (13 Sep 2000)
* watcom/le: fixed a problem with the Causeway extender
* win32/pe: don't automatically strip relocs if they seem needed
* support multiple backup generations when using `-k'
* support multiple backup generations when using '-k'
* updated the console screen driver
Changes in 1.01 (09 Apr 2000)
@@ -180,7 +195,7 @@ Changes in 0.99.1 (29 Feb 2000)
Changes in 0.99 (25 Feb 2000)
* FULL SOURCE CODE RELEASED UNDER THE TERMS OF THE GNU GPL
* win32/pe: changed default to `--strip-relocs=1'
* win32/pe: changed default to '--strip-relocs=1'
* dos/com and dos/sys: fixed a bad decompressor problem
* linux/386: the counter for the progress indicator was off by one
@@ -203,7 +218,7 @@ Changes in 0.91 (13 Nov 1999)
* dos/exe: correctly restore cs when uncompressing
Changes in 0.90 (10 Nov 1999)
* all formats: `--overlay=copy' now is the default overlay mode
* all formats: '--overlay=copy' now is the default overlay mode
* improved compression ratio for most files
* win32/pe: uncompression is finally supported
* win32/pe: never compress REGISTRY resources
@@ -213,7 +228,7 @@ Changes in 0.90 (10 Nov 1999)
* win32/pe: somewhat less memory is required during compression
* linux/386: fixed compression of scripts which was broken since 0.71
* linux/386: more FreeBSD compatibility issues
* changed option: `-i' now prints some more details during compression
* changed option: '-i' now prints some more details during compression
(not finished yet)
Changes in 0.84 (04 Oct 1999)
@@ -229,7 +244,7 @@ Changes in 0.83 (17 Sep 1999)
Changes in 0.82 (16 Aug 1999)
* dos/exe: fixed a decompressor bug which could cause crash on some files
* linux/386: section headers are now stripped from the stub so that
`strip' won't ruin a compressed file any longer
'strip' won't ruin a compressed file any longer
* wc/le: support for stack not in the last object disabled again
* win32/pe: removed some unneeded data
@@ -238,32 +253,32 @@ Changes in 0.81 (04 Aug 1999)
* dos/com: fixed an internal error that could happen with very small files
Changes in 0.80 (03 Aug 1999)
* you can set some default options in the environment var `UPX'
* you can set some default options in the environment var 'UPX'
* dos/com: the decompressor stub now checks for enough free memory
* dos/exe: decompressor rewritten, some bugs are fixed
* dos/exe: new option `--no-reloc': no relocation data is put into
* dos/exe: new option '--no-reloc': no relocation data is put into
the DOS header
* tmt/adam: added support for more stubs, detect already packed files
* tmt/adam: new option `--copy-overlay'
* tmt/adam: new option '--copy-overlay'
* wc/le: reduced memory requirement during uncompression
* wc/le: support files which do not contain their stack in the last object
* wc/le: fixed a bug which could cause a crash, improved relocation
handling
* wc/le: new option `--copy-overlay'
* win32/pe: `--compress-icons=2' is now the default
* wc/le: new option '--copy-overlay'
* win32/pe: '--compress-icons=2' is now the default
* win32/pe: even better TLS support
* win32/pe: versioninfo works on NT
* win32/pe: import by ordinal from kernel32.dll works
* win32/pe: other import improvements: importing a nonexistant DLL
results in a usual Windows message, importing a nonexistant function
results in program exit (instead of crash ;-)
* win32/pe: new option: `--compress-resources=0'
* win32/pe: new option: '--compress-resources=0'
* win32/pe: reduced memory requirement during uncompression, some
files might even require LESS memory when they're compressed
* win32/pe: TYPELIBs should work now
* win32/pe: improved relocation handling, 16-bit relocations should work
* win32/pe: new option `--strip-relocs' (only if you know what you are doing)
* win32/pe: new option `--copy-overlay'
* win32/pe: new option '--strip-relocs' (only if you know what you are doing)
* win32/pe: new option '--copy-overlay'
* important internal changes: now the stubs are built at runtime
Changes in 0.72 (12 May 1999)
@@ -277,20 +292,20 @@ Changes in 0.72 (12 May 1999)
* linux/386: minor decompressor stub updates, nicer progress bar
Changes in 0.71 (19 Apr 1999)
* dos/exe: added option `--no-overlay'
* dos/exe: added option '--no-overlay'
* linux/386: various improvements in the stub, most notably the
overhead for an extra cleanup process has been removed
* win32/pe: added support for export forwarders
* win32/pe: added support for DLLs without entry point or imports
* win32/pe: yet another .bss fix
* win32/pe: new option `--compress-icons=2': compress all icons
* win32/pe: new option '--compress-icons=2': compress all icons
which are not in the first icon directory
* win32/pe: rearranged stub to avoid false alerts from some virus scanners
Changes in 0.70 (30 Mar 1999)
* added support for linux/386 executables
* improved compression ratio quite a bit
* added new compression level `--best' to squeeze out even some more bytes
* added new compression level '--best' to squeeze out even some more bytes
* win32/pe: TLS support is much better now
* win32/pe: --compress-icons=0 should now work as well
* the usual minor fixes for win32/pe
+1 -4
View File
@@ -56,8 +56,6 @@ Existing formats:
- dos/exe: implement filter support
- dos/sys: add support for sys/exe combos
- linux/i386:
- use the new assembly preprocessor stuff (ie. process the file
headers internally)
@@ -68,8 +66,7 @@ Existing formats:
- win32/pe: display a nice dialog box in the stub in case
of problems (like importing a DLL or function fails)
- win32/pe: finer control over resource compression, per section
compression
- win32/pe: per section compression
Compression ratio:
+3 -28
View File
@@ -13,31 +13,6 @@
WARNING - UNSTABLE BETA VERSION
===============================
All versions 1.9x are unstable beta releases - use them only for testing,
and never distribute a program that is packed with them !
There will be hidden bugs. Really.
The current stable release is 1.25, and the next stable release
will be called version 2.00.
The main news since 1.25 are:
- slightly better compression using the new NRV2E algorithm
- new options for compression tuning (e.g. `--brute')
- support for bootable Linux kernels ("vmlinuz/386")
- support for Linux kernel building ("vmlinux/386")
- direct Linux ELF-to-memory decompression ("linux/elf386") and
shell-to-memory decompression ("linux/sh386")
- support for arm/WinCE ("arm/pe") exes
- support for mach/ppc32
- support for Linux elf/ppc32
- support for Linux elf/amd64
- support for playstation exes ("ps1/exe")
- lots of new bugs ;-) take care
WELCOME
=======
@@ -80,8 +55,8 @@ UPX aims to be Commercial Quality Freeware.
SHORT DOCUMENTATION
===================
`upx program.exe' will compress a program or DLL. For best compression
results try `upx --best program.exe'.
'upx program.exe' will compress a program or DLL. For best compression
results try 'upx --brute program.exe'.
Please see the file UPX.DOC for the full documentation. The files
NEWS and BUGS also contain various tidbits of information.
@@ -95,7 +70,7 @@ UPX comes with ABSOLUTELY NO WARRANTY; for details see the file LICENSE.
Having said that, we think that UPX is quite stable now. Indeed we
have compressed lots of files without any problems. Also, the
current version has undergone several months of beta testing -
actually it's more than 4 years since our first public beta.
actually it's almost 8 years since our first public beta.
This is the first production quality release, and we plan that future
releases will be backward compatible with this version.
+15 -16
View File
@@ -13,22 +13,21 @@
WARNING - UNSTABLE BETA VERSION
===============================
The current stable release is 1.25, and the next stable release
will be called version 2.00.
MAJOR NEWS IN UPX 2
===================
The main news since 1.25 are:
- slightly better compression using the new NRV2E algorithm
- new options for compression tuning (e.g. `--brute')
- support for bootable Linux kernels ("vmlinuz/386")
- support for Linux kernel building ("vmlinux/386")
- direct Linux ELF-to-memory decompression ("linux/elf386") and
shell-to-memory decompression ("linux/sh386")
- support for arm/WinCE ("arm/pe") exes
- support for Linux elf/amd64
- support for Linux elf/ppc32
- support for mach/ppc32
- support for playstation exes ("ps1/exe")
* new format: added support for arm/pe (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)
* new format: added support for bootable Linux kernels ("vmlinuz/386")
* new format: added support for Playstation exes ("ps1/exe")
* slightly better compression using the new NRV2E algorithm
* new options for compression tuning (e.g. '--brute')
* improved win32/pe compatibility
* direct ELF-to-memory decompression
* various bug fixes
+14 -13
View File
@@ -69,11 +69,7 @@ Tools needed to build/modify the UPX sources
- A C++ compiler supporting inner classes, templates, exceptions
and RTTI.
- GNU make 3.80 for Win32
http://www.cygwin.com/
- GNU make 3.80 for DOS
http://www.delorie.com/djgpp/
- GNU make 3.80 or better
To compile the packer sources
@@ -96,26 +92,31 @@ To compile the packer sources
If you want to modify the stub sources you'll also need
-------------------------------------------------------
- Nasm 0.98.38 - the Netwide Assembler
http://upx.sourceforge.net/download/tools/
http://sourceforge.net/projects/nasm/
- A68K - a 68000 macro assembler
http://upx.sourceforge.net/download/tools/
- ASM5900 - a MIPS R3000 assembler
http://upx.sourceforge.net/download/tools/
- djasm - an assembler for the djgpp stub
http://upx.sourceforge.net/download/tools/
- Perl 5.6 or better
- nasm 0.98.39 - the Netwide Assembler
http://upx.sourceforge.net/download/tools/
http://sourceforge.net/projects/nasm/
- Linux (for the linux/386 stubs)
- Perl & Python
- Certain versions of some i386-linux tools:
- gcc-2.95.3
- gcc-3.4.6
- binutils-2.16.1
- Other cross compilers targeted at the following architectures:
- arm-9tdmi-linux-gnu
- powerpc-750-linux-gnu
- x86_64-unknown-linux-gnu
- arm-9tdmi-linux-gnu
- ASM5900 - a MIPS R3000 assembler
Misc. notes
-----------
+2
View File
@@ -43,6 +43,8 @@ John S. Fine <johnfine@erols.com>
for the new version of the dos/exe decompressor
Lukundoo <Lukundoo@softhome.net>
for beta testing
Michael Devore
for initial dos/exe device driver support
Oleg V. Volkov <rover@lglobus.ru>
for various FreeBSD specific informations
The Owl & G-RoM
-3
View File
@@ -105,9 +105,6 @@ FORMAT WIN32/PE
- decrease runtime memory overhead
2 - easy - mfx + ml) new switch(es) : do not compress resource types x,y,z
or resource names a,b,c
3 - difficult) don't compress the BSS section and other holes.
4 - medium - ml) fix when objectalign < 0x1000
-6
View File
@@ -1,6 +0,0 @@
upx.1
upx.doc
upx.html
upx.man
upx.ps
upx.tex
-6
View File
@@ -1,6 +0,0 @@
upx.1
upx.doc
upx.html
upx.man
upx.ps
upx.tex
+16 -3
View File
@@ -340,9 +340,6 @@ Extra options available for this executable format:
=head2 NOTES FOR DOS/SYS
You can only compress plain sys files, sys/exe (two in one)
combos are not supported.
Compressed programs only work on a 286+.
Packed programs will be byte-identical to the original after uncompression.
@@ -873,6 +870,22 @@ Extra options available for this executable format:
--compress-resources=0 Don't compress any resources at all.
--keep-resource=list Don't compress resources specified by the list.
The members of the list are separated by commas.
A list member has the following format: I<type[/name]>.
I<Type> is the type of the resource. Standard types
must be specified as decimal numbers, user types can be
specified by decimal IDs or strings. I<Name> is the
identifier of the resource. It can be a decimal number
or a string. For example:
--keep-resource=2/MYBITMAP,5,6/12345
UPX won't compress the named bitmap resource "MYBITMAP",
it leaves every dialog (5) resource uncompressed, and
it won't touch the string table resource with identifier
12345.
--force Force compression even when there is an
unexpected value in a header field.
Use with care.
-3220
View File
File diff suppressed because it is too large Load Diff
-20
View File
@@ -1,20 +0,0 @@
*.0??
*.d
*.dat
*.idb
*.img
*.map
*.raw
*.rc
*.rel
*.res
*.pdb
*.out
*.upx
.gdbinit
GNUmakefile
MMakefile
compress_nrv.*
upx
version1*.h
version2*.h
-20
View File
@@ -1,20 +0,0 @@
*.0??
*.d
*.dat
*.idb
*.img
*.map
*.raw
*.rc
*.rel
*.res
*.pdb
*.out
*.upx
.gdbinit
GNUmakefile
MMakefile
compress_nrv.*
upx
version1*.h
version2*.h
+1 -1
View File
@@ -22,7 +22,7 @@
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
markus@oberhumer.com ml1050@cdata.tvnet.hu
markus@oberhumer.com ml1050@users.sourceforge.net
*/
+1 -1
View File
@@ -22,7 +22,7 @@
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
markus@oberhumer.com ml1050@cdata.tvnet.hu
markus@oberhumer.com ml1050@users.sourceforge.net
*/
+1
View File
@@ -229,6 +229,7 @@ void show_help(int x)
" --compress-icons=1 compress all but the first icon\n"
" --compress-icons=2 compress all but the first icon directory [default]\n"
" --compress-resources=0 do not compress any resources at all\n"
" --keep-resource=list do not compress resources specified by list\n"
" --strip-relocs=0 do not strip relocations\n"
" --strip-relocs=1 strip relocations [default]\n"
" --all-methods try all available compression methods\n"
+1 -1
View File
@@ -22,7 +22,7 @@
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
markus@oberhumer.com ml1050@cdata.tvnet.hu
markus@oberhumer.com ml1050@users.sourceforge.net
*/
+9 -1
View File
@@ -72,6 +72,7 @@ void init_options(struct options_t *o)
o->win32_pe.compress_rt[i] = -1;
o->win32_pe.compress_rt[24] = false; // 24 == RT_MANIFEST
o->win32_pe.strip_relocs = -1;
o->win32_pe.keep_resource = "";
}
static struct options_t global_options;
@@ -702,6 +703,11 @@ static int do_option(int optc, const char *arg)
opt->win32_pe.strip_relocs = 0;
//printf("strip_relocs: %d\n", opt->win32_pe.strip_relocs);
break;
case 635:
if (!mfx_optarg || !mfx_optarg[0])
e_optarg(arg);
opt->win32_pe.keep_resource = mfx_optarg;
break;
case 650:
opt->atari_tos.split_segments = true;
break;
@@ -859,6 +865,7 @@ static const struct mfx_option longopts[] =
{"compress-resources", 2, 0, 632},
{"strip-loadconf", 0x12, 0, 633}, // OBSOLETE - IGNORED
{"strip-relocs", 0x12, 0, 634},
{"keep-resource", 0x31, 0, 635},
// ps1/exe
{"boot-only", 0x10, 0, 670},
{"no-align", 0x10, 0, 671},
@@ -941,6 +948,7 @@ static const struct mfx_option longopts[] =
{"compress-resources", 2, 0, 632},
{"strip-loadconf", 0x12, 0, 633}, // OBSOLETE - IGNORED
{"strip-relocs", 0x12, 0, 634},
{"keep-resource", 0x31, 0, 635},
{ NULL, 0, NULL, 0 }
};
@@ -1120,7 +1128,7 @@ void upx_sanity_check(void)
assert(memcmp(UPX_VERSION_DATE + strlen(UPX_VERSION_DATE) - 4, UPX_VERSION_YEAR, 4) == 0);
#if 1
# if 1
# if 1 && !defined(UPX_OFFICIAL_BUILD)
assert(TestBELE<LE16>::test());
assert(TestBELE<LE32>::test());
assert(TestBELE<LE64>::test());
+1
View File
@@ -139,6 +139,7 @@ struct options_t {
int compress_resources;
signed char compress_rt[25]; // 25 == RT_LAST
int strip_relocs;
const char *keep_resource;
} win32_pe;
};
+202 -130
View File
@@ -31,9 +31,12 @@
#include "filter.h"
#include "packer.h"
#include "p_armpe.h"
#include "linker.h"
static const
#include "stub/l_armpe.h"
#include "stub/l_armpea.h"
static const
#include "stub/l_armpet.h"
#define IDSIZE(x) ih.ddirs[x].size
#define IDADDR(x) ih.ddirs[x].vaddr
@@ -214,6 +217,36 @@ bool PackArmPe::testUnpackVersion(int version) const
}
void PackArmPe::createLinker(const void *pdata, int plen, int pinfo)
{
struct ArmLinker : public Linker
{
ArmLinker(const void *d, int l, int i) : Linker(d, l, i) {}
virtual void set32(void *b, unsigned v) const
{
set_le32(b, (v - 5) / 4);
}
};
struct ThumbLinker : public Linker
{
ThumbLinker(const void *d, int l, int i) : Linker(d, l, i) {}
virtual void set32(void *b, unsigned v) const
{
assert(v < 0x200);
set_le32(b, 0xF000 + ((v - 1) / 2) * 0x10000);
}
};
if (use_thumb_stub)
linker = new ThumbLinker(pdata, plen, pinfo);
else
linker = new ArmLinker(pdata, plen, pinfo);
}
/*************************************************************************
// util
**************************************************************************/
@@ -487,37 +520,42 @@ void PackArmPe::processRelocs() // pass1
for (; ic; ic--)
fix[ic] = new LE32 [counts[ic]];
unsigned xcounts[4];
memset(xcounts, 0, sizeof(xcounts));
// prepare sorting
unsigned pos,type;
while (rel.next(pos,type))
{
if (pos >= ih.imagesize)
continue; // skip out-of-bounds record
if (type == 3)
set_le32(ibuf + pos,get_le32(ibuf + pos) - ih.imagebase - rvamin);
if (type < 4)
*fix[type]++ = pos - rvamin;
fix[type][xcounts[type]++] = pos - rvamin;
}
fix[3] -= counts[3];
ibuf.fill(IDADDR(PEDIR_RELOC), IDSIZE(PEDIR_RELOC), FILLVAL);
orelocs = new upx_byte [rnum * 4 + 1024]; // 1024 - safety
sorelocs = ptr_diff(optimizeReloc32((upx_byte*) fix[3],counts[3],orelocs,ibuf + rvamin,1,&big_relocs),orelocs);
sorelocs = ptr_diff(optimizeReloc32((upx_byte*) fix[3], xcounts[3],
orelocs, ibuf + rvamin,1, &big_relocs),
orelocs);
delete [] fix[3];
// append relocs type "LOW" then "HIGH"
for (ic = 2; ic ; ic--)
{
fix[ic] -= counts[ic];
memcpy(orelocs + sorelocs,fix[ic],4 * counts[ic]);
sorelocs += 4 * counts[ic];
memcpy(orelocs + sorelocs,fix[ic],4 * xcounts[ic]);
sorelocs += 4 * xcounts[ic];
delete [] fix[ic];
set_le32(orelocs + sorelocs,0);
if (counts[ic])
if (xcounts[ic])
{
sorelocs += 4;
big_relocs |= 2 * ic;
}
}
delete [] fix[3];
info("Relocations: original size: %u bytes, preprocessed size: %u bytes",(unsigned) IDSIZE(PEDIR_RELOC),sorelocs);
}
@@ -535,7 +573,7 @@ struct import_desc
}
__attribute_packed;
void PackArmPe::processImports(unsigned myimport) // pass 2
void PackArmPe::processImports(unsigned myimport, unsigned iat_off) // pass 2
{
COMPILE_TIME_ASSERT(sizeof(import_desc) == 20);
@@ -551,6 +589,8 @@ void PackArmPe::processImports(unsigned myimport) // pass 2
while (*p)
if ((*p++ & 0x80000000) == 0) // import by name?
p[-1] += myimport;
im->iat = im == (import_desc*) oimpdlls ? iat_off : iat_off + 12;
}
}
@@ -1180,10 +1220,9 @@ public:
bool clear();
void dump() const { dump(root,0); }
/*
unsigned iname() const {return current->parent->id;}
const upx_byte *nname() const {return current->parent->name;}
/*
unsigned ilang() const {return current->id;}
const upx_byte *nlang() const {return current->name;}
*/
@@ -1206,10 +1245,7 @@ void Resource::check(const res_dir *node,unsigned level)
{
int ic = node->identr + node->namedentr;
if (ic == 0)
{
//throwCantPack("unsupported resource structure");
throwCantPack("empty resource sections are not supported");
}
return;
for (const res_dir_entry *rde = node->entries; --ic >= 0; rde++)
if (((rde->child & 0x80000000) == 0) ^ (level == 2))
throwCantPack("unsupported resource structure");
@@ -1235,10 +1271,14 @@ Resource::upx_rnode *Resource::convert(const void *rnode,upx_rnode *parent,unsig
}
const res_dir *node = (const res_dir *) rnode;
int ic = node->identr + node->namedentr;
if (ic == 0)
return NULL;
upx_rbranch *branch = new upx_rbranch;
branch->name = NULL;
branch->parent = parent;
int ic = branch->nc = node->identr + node->namedentr;
branch->nc = ic;
branch->children = new upx_rnode*[ic];
branch->data = *node;
@@ -1305,13 +1345,15 @@ upx_byte *Resource::build()
void Resource::destroy(upx_rnode *node,unsigned level)
{
delete [] node->name; node->name = NULL;
if (level == 3)
return;
if (level != 3)
{
upx_rbranch * const branch = (upx_rbranch *) node;
for (int ic = branch->nc; --ic >= 0; )
destroy(branch->children[ic],level + 1);
delete [] branch->children; branch->children = NULL;
}
delete node;
}
static void lame_print_unicode(const upx_byte *p)
{
@@ -1380,6 +1422,52 @@ void PackArmPe::processResources(Resource *res,unsigned newaddr)
delete [] p;
}
static bool match(unsigned itype, const unsigned char *ntype,
unsigned iname, const unsigned char *nname,
const char *keep)
{
// format of string keep: type1[/name1],type2[/name2], ....
// typex and namex can be string or number
// hopefully resource names do not have '/' or ',' characters inside
struct helper
{
static bool match(unsigned num, const unsigned char *unistr,
const char *keep)
{
if (!unistr)
return (unsigned) atoi(keep) == num;
unsigned ic;
for (ic = 0; ic < get_le16(unistr); ic++)
if (unistr[2 + ic * 2] != (unsigned char) keep[ic])
return false;
return keep[ic] == 0 || keep[ic] == ',' || keep[ic] == '/';
};
};
// FIXME this comparison is not too exact
while (1)
{
char *delim1 = strchr(keep, '/');
char *delim2 = strchr(keep, ',');
if (helper::match(itype, ntype, keep))
{
if (!delim1)
return true;
if (delim2 && delim2 < delim1)
return true;
if (helper::match(iname, nname, delim1 + 1))
return true;
}
if (delim2 == NULL)
break;
keep = delim2 + 1;
}
return false;
}
void PackArmPe::processResources(Resource *res)
{
const unsigned vaddr = IDADDR(PEDIR_RESOURCE);
@@ -1448,6 +1536,10 @@ void PackArmPe::processResources(Resource *res)
do_compress = false; // u"REGISTRY"
}
if (do_compress && opt->win32_pe.keep_resource[0])
do_compress ^= match(res->itype(), res->ntype(), res->iname(),
res->nname(), opt->win32_pe.keep_resource);
if (do_compress)
{
csize += res->size();
@@ -1550,27 +1642,69 @@ bool PackArmPe::canPack()
if (!readFileHeader() || (ih.cpu != 0x1c0 && ih.cpu != 0x1c2))
return false;
use_thumb_stub |= ih.cpu == 0x1c2 || (ih.entry & 1) == 1;
use_thumb_stub |= (opt->cpu == opt->CPU_8086); // FIXME
return true;
}
int PackArmPe::buildLoader(const Filter *ft)
{
UNUSED(ft);
const unsigned char *loader = use_thumb_stub ? nrv_loader_thumb : nrv_loader_arm;
// ignore possible garbage aligment data at the end of the loader
unsigned size = use_thumb_stub ? sizeof(nrv_loader_thumb) : sizeof(nrv_loader_arm);
while (loader[size - 1] == 0)
size--;
// prepare loader
initLoader(nrv_loader, sizeof(nrv_loader), -1, 2);
initLoader(loader, size, -1, 2);
char stubname[20];
strcpy(stubname, "ARMPE");
strcat(stubname, use_thumb_stub ? "T" : "A");
strcat(stubname, isdll ? "D" : "X");
strcat(stubname, ph.method == M_NRV2E_8 ? "E" : "B");
if (isdll)
addLoader("DllStart", NULL);
addLoader("ExeStart", NULL);
addLoader(stubname, "IDENTSTR,UPX1HEAD", NULL);
if (ph.method == M_NRV2E_8)
addLoader("Call2E", NULL);
else if (ph.method == M_NRV2B_8)
addLoader("Call2B", NULL);
if (ft->id == 0x50)
addLoader("Unfilter_0x50", NULL);
if (sorelocs)
addLoader("Relocs", NULL);
addLoader("Imports", NULL);
addLoader("ProcessEnd", NULL);
if (!use_thumb_stub)
{
if (ph.method == M_NRV2E_8)
addLoader("ucl_nrv2e_decompress_8", NULL);
}
else
{
if (ph.method == M_NRV2E_8)
addLoader("thumb_nrv2e_d8", NULL);
else if (ph.method == M_NRV2B_8)
addLoader("go_thumb_n2b", NULL);
}
addLoader("IDENTSTR,UPX1HEAD", NULL);
return getLoaderSize();
}
int PackArmPe::rpatch_le32(void *b, int blen, const void *old, unsigned new_,
Reloc &rel, unsigned off)
{
int o = patch_le32(b, blen, old, new_);
rel.add(off + o, 3);
return o;
}
void PackArmPe::pack(OutputFile *fo)
{
const unsigned objs = ih.objects;
@@ -1764,6 +1898,14 @@ void PackArmPe::pack(OutputFile *fo)
ft.addvalue = ih.codebase - rvamin;
// compress
int strategy = allow_filter ? 0 : -3;
// disable filters for files with broken headers
if (ih.codebase + ih.codesize > ph.u_len)
{
ft.buf_len = 1;
strategy = -3;
}
compressWithFilters(&ft, 2048, strategy,
NULL, 0, 0, ih.codebase, rvamin);
// info: see buildLoader()
@@ -1809,89 +1951,25 @@ void PackArmPe::pack(OutputFile *fo)
const unsigned ncsection = (s1addr + s1size + oam1) &~ oam1;
const unsigned upxsection = s1addr + ic + clen;
// FIXME
const unsigned assumed_soxrelocs = isdll ? 0x20 : 0;
const unsigned myimport = ncsection + assumed_soxrelocs + soresources - rvamin;
const int src0_offset = find(loader, lsize, "SRC0", 4);
// patch loader
patch_le32(loader, codesize, "CSYN", ih.imagebase + rvamin + myimport + get_le32(oimpdlls + 16) + 8);
patch_le32(loader, codesize, "FIBE", ih.imagebase + ih.codebase + (ft.id ? ih.codesize : 0));
patch_le32(loader, codesize, "FIBS", ih.imagebase + ih.codebase);
patch_le32(loader, codesize, "BREL", crelocs + rvamin + ih.imagebase);
patch_le32(loader, codesize, "ENTR", ih.entry + ih.imagebase);
patch_le32(loader, codesize, "LOAD", ih.imagebase + rvamin + myimport + get_le32(oimpdlls + 16));
patch_le32(loader, codesize, "GETP", ih.imagebase + rvamin + myimport + get_le32(oimpdlls + 16) + 4);
patch_le32(loader, codesize, "ONAM", ih.imagebase + myimport + rvamin);
patch_le32(loader, codesize, "BIMP", ih.imagebase + rvamin + cimports);
patch_le32(loader, codesize, "DSTL", ph.u_len);
patch_le32(loader, codesize, "DST0", ih.imagebase + rvamin);
patch_le32(loader, codesize, "SRCL", ph.c_len);
patch_le32(loader, codesize, "SRC0", ih.imagebase + s1addr + identsize - identsplit);
#if 0
if (ih.entry)
{
unsigned jmp_pos = find_le32(loader,codesize + 4,get_le32("JMPO"));
patch_le32(loader,codesize + 4,"JMPO",ih.entry - upxsection - jmp_pos - 4);
}
if (big_relocs & 6)
patch_le32(loader,codesize,"DELT", 0u - (unsigned) ih.imagebase - rvamin);
if (sorelocs && (soimport == 0 || soimport + cimports != crelocs))
patch_le32(loader,codesize,"BREL",crelocs);
if (soimport)
{
if (!isdll)
patch_le32(loader,codesize,"EXIT",myimport + get_le32(oimpdlls + 16) + 8);
patch_le32(loader,codesize,"GETP",myimport + get_le32(oimpdlls + 16) + 4);
if (kernel32ordinal)
patch_le32(loader,codesize,"K32O",myimport);
patch_le32(loader,codesize,"LOAD",myimport + get_le32(oimpdlls + 16));
patch_le32(loader,codesize,"IMPS",myimport);
patch_le32(loader,codesize,"BIMP",cimports);
}
if (patchFilter32(loader, codesize, &ft))
{
const unsigned texv = ih.codebase - rvamin;
if (texv)
patch_le32(loader, codesize, "TEXV", texv);
}
if (tlsindex)
{
// in case of overlapping decompression, this hack is needed,
// because windoze zeroes the word pointed by tlsindex before
// it starts programs
if (tlsindex + 4 > s1addr)
patch_le32(loader,codesize,"TLSV",get_le32(obuf + tlsindex - s1addr - ic));
else
patch_le32(loader,codesize,"TLSV",0); // bad guess
patch_le32(loader,codesize,"TLSA",tlsindex - rvamin);
}
if (icondir_count > 1)
{
if (icondir_count > 2)
patch_le16(loader,codesize,"DR",icondir_count - 1);
patch_le32(loader,codesize,"ICON",ncsection + icondir_offset - rvamin);
}
const unsigned esi0 = s1addr + ic;
patch_le32(loader,codesize,"EDI0", 0u - esi0 + rvamin);
patch_le32(loader,codesize,"ESI0", esi0 + ih.imagebase);
#endif
Reloc rel(1024); // new relocations are put here
rel.add(upxsection + src0_offset, 3);
rel.add(upxsection + src0_offset + 8, 3);
rel.add(upxsection + src0_offset + 16, 3);
rel.add(upxsection + src0_offset + 20, 3);
rel.add(upxsection + src0_offset + 24, 3);
rel.add(upxsection + src0_offset + 28, 3);
rel.add(upxsection + src0_offset + 32, 3);
rel.add(upxsection + src0_offset + 36, 3);
rel.add(upxsection + src0_offset + 40, 3);
rel.add(upxsection + src0_offset + 44, 3);
rel.add(upxsection + src0_offset + 48, 3);
// patch loader
// the exact value of "ONAM" can not be computed here, so we set it later
int onam_offset = rpatch_le32(loader, codesize, "ONAM", 0, rel, upxsection);
rpatch_le32(loader, codesize, "BIMP", ih.imagebase + rvamin + cimports, rel, upxsection);
if (sorelocs)
rpatch_le32(loader, codesize, "BREL", crelocs + rvamin + ih.imagebase, rel, upxsection);
if (ft.id)
{
rpatch_le32(loader, codesize, "FIBE", ih.imagebase + ih.codebase + (ft.id ? ih.codesize : 0), rel, upxsection);
rpatch_le32(loader, codesize, "FIBS", ih.imagebase + ih.codebase, rel, upxsection);
}
rpatch_le32(loader, codesize, "ENTR", ih.entry + ih.imagebase, rel, upxsection);
unsigned iat_offset = patch_le32(loader, codesize, "IATT", 0);
patch_le32(loader, codesize, "DSTL", ph.u_len);
rpatch_le32(loader, codesize, "DST0", ih.imagebase + rvamin, rel, upxsection);
patch_le32(loader, codesize, "SRCL", ph.c_len);
rpatch_le32(loader, codesize, "SRC0", ih.imagebase + s1addr + identsize - identsplit, rel, upxsection);
// new PE header
memcpy(&oh,&ih,sizeof(oh));
@@ -1934,7 +2012,7 @@ void PackArmPe::pack(OutputFile *fo)
ODSIZE(PEDIR_RESOURCE) = soresources;
ic += soresources;
processImports(ic);
processImports(ic, iat_offset + upxsection);
ODADDR(PEDIR_IMPORT) = ic;
ODSIZE(PEDIR_IMPORT) = soimpdlls;
ic += soimpdlls;
@@ -1949,17 +2027,12 @@ void PackArmPe::pack(OutputFile *fo)
}
ic += soexport;
if (isdll && soxrelocs != assumed_soxrelocs)
throwInternalError("FIXME: soxrelocs != assumed_soxrelocs");
const unsigned onam = ncsection + soxrelocs + soresources + ih.imagebase;
set_le32(loader + onam_offset, onam);
// this is computed here, because soxrelocs changes some lines above
const unsigned ncsize = soxrelocs + soresources + soimpdlls + soexport;
ic = oh.filealign - 1;
// this one is tricky: it seems windoze touches 4 bytes after
// the end of the relocation data - so we have to increase
// the virtual size of this section
const unsigned ncsize_virt_increase = (ncsize & oam1) == 0 ? 8 : 0;
const unsigned fam1 = oh.filealign - 1;
// fill the sections
strcpy(osection[0].name,"UPX0");
@@ -1979,31 +2052,30 @@ void PackArmPe::pack(OutputFile *fo)
osection[2].vaddr = ncsection;
osection[0].size = 0;
osection[1].size = (s1size + ic) &~ ic;
osection[2].size = (ncsize + ic) &~ ic;
osection[1].size = (s1size + fam1) &~ fam1;
osection[2].size = (ncsize + fam1) &~ fam1;
osection[0].vsize = osection[1].vaddr - osection[0].vaddr;
//osection[1].vsize = (osection[1].size + oam1) &~ oam1;
//osection[2].vsize = (osection[2].size + ncsize_virt_increase + oam1) &~ oam1;
//osection[2].vsize = (osection[2].size + oam1) &~ oam1;
osection[1].vsize = osection[1].size;
osection[2].vsize = osection[2].size + ncsize_virt_increase;
osection[2].vsize = osection[2].size;
osection[0].rawdataptr = (pe_offset + sizeof(oh) + sizeof(osection) + ic) &~ ic;
osection[1].rawdataptr = osection[0].rawdataptr;
osection[0].rawdataptr = 0;
osection[1].rawdataptr = (pe_offset + sizeof(oh) + sizeof(osection) + fam1) &~ fam1;
osection[2].rawdataptr = osection[1].rawdataptr + osection[1].size;
osection[0].flags = (unsigned) (PEFL_BSS|PEFL_EXEC|PEFL_WRITE|PEFL_READ);
osection[1].flags = (unsigned) (PEFL_DATA|PEFL_EXEC|PEFL_WRITE|PEFL_READ);
osection[2].flags = (unsigned) (PEFL_DATA|PEFL_WRITE|PEFL_READ);
osection[2].flags = (unsigned) (PEFL_DATA|PEFL_READ);
oh.imagesize = osection[2].vaddr + osection[2].vsize;
oh.imagesize = (osection[2].vaddr + osection[2].vsize + oam1) &~ oam1;
oh.bsssize = osection[0].vsize;
oh.datasize = osection[2].vsize;
oh.database = osection[2].vaddr;
oh.codesize = osection[1].vsize;
oh.codebase = osection[1].vaddr;
// oh.headersize = osection[0].rawdataptr;
oh.headersize = rvamin;
oh.headersize = osection[1].rawdataptr;
if (opt->win32_pe.strip_relocs && !isdll)
oh.flags |= RELOCS_STRIPPED;
@@ -2023,7 +2095,7 @@ void PackArmPe::pack(OutputFile *fo)
// some alignment
if (identsplit == identsize)
{
unsigned n = osection[0].rawdataptr - fo->getBytesWritten() - identsize;
unsigned n = osection[1].rawdataptr - fo->getBytesWritten() - identsize;
assert(n <= oh.filealign);
fo->write(ibuf, n);
}
@@ -2331,7 +2403,7 @@ void PackArmPe::rebuildTls()
void PackArmPe::rebuildResources(upx_byte *& extrainfo)
{
if (ODSIZE(PEDIR_RESOURCE) == 0)
if (ODSIZE(PEDIR_RESOURCE) == 0 || IDSIZE(PEDIR_RESOURCE) == 0)
return;
icondir_count = get_le16(extrainfo);
+5 -1
View File
@@ -72,7 +72,7 @@ protected:
unsigned pe_offset;
unsigned processImports();
void processImports(unsigned);
void processImports(unsigned, unsigned);
void rebuildImports(upx_byte *&);
upx_byte *oimport;
unsigned soimport;
@@ -120,6 +120,10 @@ protected:
bool use_thumb_stub;
void createLinker(const void *pdata, int plen, int pinfo);
int rpatch_le32(void *b, int blen, const void *old, unsigned new_,
PackArmPe_Reloc &, unsigned);
struct pe_header_t
{
// 0x0
+1 -1
View File
@@ -22,7 +22,7 @@
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
markus@oberhumer.com ml1050@cdata.tvnet.hu
markus@oberhumer.com ml1050@users.sourceforge.net
*/
+1 -1
View File
@@ -22,7 +22,7 @@
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
markus@oberhumer.com ml1050@cdata.tvnet.hu
markus@oberhumer.com ml1050@users.sourceforge.net
*/
+1 -1
View File
@@ -22,7 +22,7 @@
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
markus@oberhumer.com ml1050@cdata.tvnet.hu
markus@oberhumer.com ml1050@users.sourceforge.net
*/
+1 -1
View File
@@ -22,7 +22,7 @@
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
markus@oberhumer.com ml1050@cdata.tvnet.hu
markus@oberhumer.com ml1050@users.sourceforge.net
*/
+21 -2
View File
@@ -80,7 +80,6 @@ int PackExe::fillExeHeader(struct exe_header_t *eh) const
memset(&oh,0,sizeof(oh));
oh.ident = 'M' + 'Z' * 256;
oh.headsize16 = 2;
oh.ip = 0;
oh.sp = ih.sp > 0x200 ? (unsigned) ih.sp : 0x200;
@@ -108,7 +107,11 @@ int PackExe::buildLoader(const Filter *)
// prepare loader
initLoader(nrv_loader,sizeof(nrv_loader));
if (device_driver)
addLoader("DEVICEENTRY", NULL);
addLoader("EXEENTRY",
device_driver ? "DEVICESUB" : "EXESUB",
"JNCDOCOPY",
relocsize ? "EXERELPU" : "",
"EXEMAIN4,+G5DXXXX,UPX1HEAD,EXECUTPO",
NULL
@@ -162,6 +165,7 @@ int PackExe::buildLoader(const Filter *)
NULL
);
addLoader("EXEMAIN8",
device_driver ? "DEVICEEND" : "",
(flag & SS) ? "EXESTACK" : "",
(flag & SP) ? "EXESTASP" : "",
(flag & USEJUMP) ? "EXEJUMPF" : "",
@@ -367,6 +371,8 @@ void PackExe::pack(OutputFile *fo)
checkAlreadyPacked(ibuf, UPX_MIN(ih_imagesize, 127u));
device_driver = get_le32(ibuf) == 0xffffffffu;
// relocations
has_9a = false;
upx_byte *w = ibuf + ih_imagesize;
@@ -523,6 +529,19 @@ void PackExe::pack(OutputFile *fo)
oh.m512 = outputlen & 511;
oh.p512 = (outputlen + 511) >> 9;
oh.ip = 0;
if (device_driver)
{
patch_le16(loader, e_len, "OP", oh.sp);
patch_le16(loader, e_len, "OS", oh.ss);
// copy .sys header
memcpy(loader + 4, ibuf + 4, 2);
memcpy(loader + 8, ibuf + 8, 2);
// copy original strategy
memcpy(loader + 10, ibuf + 6, 2);
oh.ip = getLoaderSection("EXEENTRY") - 2;
}
//fprintf(stderr,"\ne_len=%x d_len=%x clen=%x oo=%x ulen=%x destp=%x copys=%x images=%x",e_len,d_len,packedsize,ph.overlap_overhead,ph.u_len,destpara,copysize,ih_imagesize);
// write header + write loader + compressed file
@@ -567,7 +586,7 @@ int PackExe::canUnpack()
return false;
const off_t off = ih.headsize16 * 16;
fi->seek(off, SEEK_SET);
bool b = readPackHeader(128);
bool b = readPackHeader(256);
return b && (off + (off_t) ph.c_len <= file_size);
}
+2 -1
View File
@@ -22,7 +22,7 @@
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
markus@oberhumer.com ml1050@cdata.tvnet.hu
markus@oberhumer.com ml1050@users.sourceforge.net
*/
@@ -98,6 +98,7 @@ protected:
unsigned relocsize;
bool has_9a;
bool device_driver;
enum {
NORELOC = 1,
+215 -42
View File
@@ -22,8 +22,11 @@
If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar John F. Reiser
markus@oberhumer.com ml1050@cdata.tvnet.hu jreiser@BitWagon.com
Markus F.X.J. Oberhumer Laszlo Molnar
<mfx@users.sourceforge.net> <ml1050@users.sourceforge.net>
John F. Reiser
<jreiser@users.sourceforge.net>
*/
@@ -267,6 +270,134 @@ umax(unsigned a, unsigned b)
return a;
}
int
PackLinuxElf32x86::buildLinuxLoader(
upx_byte const *const proto,
unsigned const szproto,
upx_byte const *const fold,
unsigned const szfold,
Filter const *ft
)
{
initLoader(proto, szproto);
struct b_info h; memset(&h, 0, sizeof(h));
unsigned fold_hdrlen = 0;
if (0 < szfold) {
cprElfHdr1 const *const hf = (cprElfHdr1 const *)fold;
fold_hdrlen = sizeof(hf->ehdr) + hf->ehdr.e_phentsize * hf->ehdr.e_phnum +
sizeof(l_info);
if (0 == get_le32(fold_hdrlen + fold)) {
// inconsistent SIZEOF_HEADERS in *.lds (ld, binutils)
fold_hdrlen = umax(0x80, fold_hdrlen);
}
h.sz_unc = (szfold < fold_hdrlen) ? 0 : (szfold - fold_hdrlen);
h.b_method = (unsigned char) ph.method;
h.b_ftid = (unsigned char) ph.filter;
h.b_cto8 = (unsigned char) ph.filter_cto;
}
unsigned char const *const uncLoader = fold_hdrlen + fold;
unsigned char *const cprLoader = new unsigned char[sizeof(h) + h.sz_unc];
if (0 < szfold) {
unsigned sz_cpr;
int r = upx_compress(uncLoader, h.sz_unc, sizeof(h) + cprLoader, &sz_cpr,
NULL, ph.method, 10, NULL, NULL );
if (r != UPX_E_OK || h.sz_cpr >= h.sz_unc)
throwInternalError("loader compression failed");
h.sz_cpr = sz_cpr;
}
memcpy(cprLoader, &h, sizeof(h));
// This adds the definition to the "library", to be used later.
linker->addSection("FOLDEXEC", cprLoader, sizeof(h) + h.sz_cpr);
delete [] cprLoader;
int const n_mru = ft->n_mru; // FIXME: belongs to filter? packerf?
// Here is a quick summary of the format of the output file:
linker->setLoaderAlignOffset(
// Elf32_Edhr
sizeof(elfout.ehdr) +
// Elf32_Phdr: 1 for exec86, 2 for sh86, 3 for elf86
(elfout.ehdr.e_phentsize * elfout.ehdr.e_phnum) +
// checksum UPX! lsize version format
sizeof(l_info) +
// PT_DYNAMIC with DT_NEEDED "forwarded" from original file
((elfout.ehdr.e_phnum==3) ? (unsigned) elfout.phdr[2].p_memsz : 0) +
// p_progid, p_filesize, p_blocksize
sizeof(p_info) +
// compressed data
b_len + ph.c_len );
// entry to stub
addLoader("LEXEC000", NULL);
if (ft->id) {
{ // decompr, unfilter are separate
addLoader("LXUNF000", NULL);
addLoader("LXUNF002", NULL);
if (0x80==(ft->id & 0xF0)) {
if (256==n_mru) {
addLoader("MRUBYTE0", NULL);
}
else if (n_mru) {
addLoader("LXMRU005", NULL);
}
if (n_mru) {
addLoader("LXMRU006", NULL);
}
else {
addLoader("LXMRU007", NULL);
}
}
else if (0x40==(ft->id & 0xF0)) {
addLoader("LXUNF008", NULL);
}
addLoader("LXUNF010", NULL);
}
if (n_mru) {
addLoader("LEXEC009", NULL);
}
}
addLoader("LEXEC010", NULL);
addLoader(getDecompressor(), NULL);
addLoader("LEXEC015", NULL);
if (ft->id) {
{ // decompr, unfilter are separate
if (0x80!=(ft->id & 0xF0)) {
addLoader("LXUNF042", NULL);
}
}
addFilter32(ft->id);
{ // decompr, unfilter are separate
if (0x80==(ft->id & 0xF0)) {
if (0==n_mru) {
addLoader("LXMRU058", NULL);
}
}
addLoader("LXUNF035", NULL);
}
}
else {
addLoader("LEXEC017", NULL);
}
addLoader("IDENTSTR", NULL);
addLoader("LEXEC020", NULL);
addLoader("FOLDEXEC", NULL);
char *ptr_cto = (char *)const_cast<unsigned char *>(getLoader());
int sz_cto = getLoaderSize();
if (0x20==(ft->id & 0xF0) || 0x30==(ft->id & 0xF0)) { // push byte '?' ; cto8
patch_le16(ptr_cto, sz_cto, "\x6a?", 0x6a + (ft->cto << 8));
checkPatch(NULL, 0, 0, 0); // reset
}
// PackHeader and overlay_offset at the end of the output file,
// after the compressed data.
return getLoaderSize();
}
int
PackLinuxElf32ppc::buildLinuxLoader(
upx_byte const *const proto,
@@ -277,7 +408,7 @@ PackLinuxElf32ppc::buildLinuxLoader(
)
{
{
int const MAX_LOADER_LEN = 4096;
int const MAX_LOADER_LEN = 8000;
int *const eof_empty = new int[MAX_LOADER_LEN/sizeof(int)];
eof_empty[0] = -1;
initLoader(eof_empty, MAX_LOADER_LEN, 0, 0);
@@ -317,9 +448,9 @@ PackLinuxElf32ppc::buildLinuxLoader(
//int const GAP = 128; // must match stub/l_mac_ppc.S
//segcmdo.vmsize += sz_unc - sz_cpr + GAP + 64;
linker->addSection("ELFPPC32", proto, szproto);
linker->addSection("ELF32PPC", proto, szproto);
addLoader("ELFPPC32", NULL);
addLoader("ELF32PPC", NULL);
addLoader("FOLDEXEC", NULL);
return getLoaderSize();
}
@@ -508,14 +639,6 @@ PackLinuxElf64amd::canPack()
// throwCantPack("invalid Phdr p_offset; try `--force-execve'");
// return false;
//}
// detect possible conflict upon invocation
acc_uint64l_t const p_vaddr = get_native64(&phdr->p_vaddr);
if (p_vaddr < (unsigned)(0x100000 + file_size)
|| p_vaddr < (unsigned)(0x100000 + file_size) ) {
throwAlreadyPackedByUPX(); // not necessarily, but mostly true
return false;
}
exetype = 1;
break;
}
@@ -544,6 +667,22 @@ PackLinuxElf32::getbrk(const Elf32_Phdr *phdr, int e_phnum) const
return brka;
}
off_t
PackLinuxElf32::getbase(const Elf32_Phdr *phdr, int e_phnum) const
{
off_t base = ~0u;
for (int j = 0; j < e_phnum; ++phdr, ++j) {
if (phdr->PT_LOAD == phdr->p_type) {
if (phdr->p_vaddr < (unsigned) base)
base = phdr->p_vaddr;
}
}
if (0!=base) {
return base;
}
return 0x12000;
}
off_t
PackLinuxElf64::getbrk(const Elf64_Phdr *phdr, int e_phnum) const
{
@@ -642,6 +781,27 @@ PackLinuxElf64::generateElfHdr(
}
}
void
PackLinuxElf32x86::generateElfHdr(
OutputFile *fo,
void const *proto,
unsigned const brka
)
{
super::generateElfHdr(fo, proto, brka);
if (ph.format==UPX_F_LINUX_ELF_i386) {
cprElfHdr2 *const h2 = (cprElfHdr2 *)&elfout;
assert(2==get_native16(&h2->ehdr.e_phnum));
set_native32(&h2->phdr[0].p_flags, ~Elf32_Phdr::PF_W & get_native32(&h2->phdr[0].p_flags));
memset(&h2->linfo, 0, sizeof(h2->linfo));
fo->write(h2, sizeof(*h2));
}
else {
assert(false); // unknown ph.format, PackLinuxElf32x86::generateElfHdr
}
}
void
PackLinuxElf32ppc::generateElfHdr(
OutputFile *fo,
@@ -654,7 +814,7 @@ PackLinuxElf32ppc::generateElfHdr(
if (ph.format==UPX_F_LINUX_ELFPPC32) {
cprElfHdr2 *const h2 = (cprElfHdr2 *)&elfout;
assert(2==get_native16(&h2->ehdr.e_phnum));
set_native32(&h2->phdr[0].p_flags, Elf32_Phdr::PF_W | get_native32(&h2->phdr[0].p_flags));
set_native32(&h2->phdr[0].p_flags, ~Elf32_Phdr::PF_W & get_native32(&h2->phdr[0].p_flags));
memset(&h2->linfo, 0, sizeof(h2->linfo));
fo->write(h2, sizeof(*h2));
}
@@ -675,7 +835,7 @@ PackLinuxElf64amd::generateElfHdr(
if (ph.format==UPX_F_LINUX_ELF64_AMD) {
cprElfHdr2 *const h2 = (cprElfHdr2 *)&elfout;
assert(2==get_native16(&h2->ehdr.e_phnum));
set_native32(&h2->phdr[0].p_flags, Elf64_Phdr::PF_W | get_native32(&h2->phdr[0].p_flags));
set_native32(&h2->phdr[0].p_flags, ~Elf64_Phdr::PF_W & get_native32(&h2->phdr[0].p_flags));
memset(&h2->linfo, 0, sizeof(h2->linfo));
fo->write(h2, sizeof(*h2));
}
@@ -1021,10 +1181,17 @@ void PackLinuxElf32::pack4(OutputFile *fo, Filter &ft)
set_native32(&elfout.phdr[0].p_filesz, len);
super::pack4(fo, ft); // write PackHeader and overlay_offset
// Cannot pre-round .p_memsz. If .p_filesz < .p_memsz, then kernel
// tries to make .bss, which requires PF_W.
// But strict SELinux (or PaX, grSecurity) disallows PF_W with PF_X.
#if 0 /*{*/
#define PAGE_MASK (~0u<<12)
// pre-calculate for benefit of runtime disappearing act via munmap()
set_native32(&elfout.phdr[0].p_memsz, PAGE_MASK & (~PAGE_MASK + len));
#undef PAGE_MASK
#else /*}{*/
set_native32(&elfout.phdr[0].p_memsz, len);
#endif /*}*/
// rewrite Elf header
if (Elf32_Ehdr::ET_DYN==ehdri.e_type) {
@@ -1051,10 +1218,17 @@ void PackLinuxElf64::pack4(OutputFile *fo, Filter &ft)
set_native64(&elfout.phdr[0].p_filesz, len);
super::pack4(fo, ft); // write PackHeader and overlay_offset
// Cannot pre-round .p_memsz. If .p_filesz < .p_memsz, then kernel
// tries to make .bss, which requires PF_W.
// But strict SELinux (or PaX, grSecurity) disallows PF_W with PF_X.
#if 0 /*{*/
#define PAGE_MASK (~0u<<12)
// pre-calculate for benefit of runtime disappearing act via munmap()
set_native64(&elfout.phdr[0].p_memsz, PAGE_MASK & (~PAGE_MASK + len));
#undef PAGE_MASK
#else /*}{*/
set_native64(&elfout.phdr[0].p_memsz, len);
#endif /*}*/
// rewrite Elf header
fo->seek(0, SEEK_SET);
@@ -1276,20 +1450,20 @@ void PackLinuxElf64::unpack(OutputFile *fo)
**************************************************************************/
PackLinuxI386elf::PackLinuxI386elf(InputFile *f) :
PackLinuxElf32x86::PackLinuxElf32x86(InputFile *f) :
super(f), phdri(NULL),
file_image(NULL), dynseg(NULL), hashtab(NULL), dynstr(NULL), dynsym(NULL)
{
}
PackLinuxI386elf::~PackLinuxI386elf()
PackLinuxElf32x86::~PackLinuxElf32x86()
{
delete[] file_image;
delete[] phdri;
}
int const *
PackLinuxI386elf::getFilters() const
PackLinuxElf32x86::getFilters() const
{
static const int filters[] = {
0x49, 0x46,
@@ -1312,7 +1486,7 @@ PackLinuxI386elf::getFilters() const
}
int
PackLinuxI386elf::buildLoader(const Filter *ft)
PackLinuxElf32x86::buildLoader(const Filter *ft)
{
unsigned char tmp[sizeof(linux_i386elf_fold)];
memcpy(tmp, linux_i386elf_fold, sizeof(linux_i386elf_fold));
@@ -1335,10 +1509,10 @@ PackLinuxI386elf::buildLoader(const Filter *ft)
}
void PackLinuxI386elf::patchLoader() { }
void PackLinuxElf32x86::patchLoader() { }
bool PackLinuxI386elf::canPack()
bool PackLinuxElf32x86::canPack()
{
unsigned char buf[sizeof(Elf32_Ehdr) + 14*sizeof(Elf32_Phdr)];
COMPILE_TIME_ASSERT(sizeof(buf) <= 512);
@@ -1350,7 +1524,8 @@ bool PackLinuxI386elf::canPack()
Elf32_Ehdr const *const ehdr = (Elf32_Ehdr const *)buf;
// now check the ELF header
if (checkEhdr(ehdr) != 0)
if (checkEhdr(ehdr, Elf32_Ehdr::EM_386,
Elf32_Ehdr::ELFCLASS32, Elf32_Ehdr::ELFDATA2LSB) != 0)
return false;
// additional requirements for linux/elf386
@@ -1446,7 +1621,7 @@ bool PackLinuxI386elf::canPack()
}
unsigned
PackLinuxI386elf::elf_get_offset_from_address(unsigned const addr) const
PackLinuxElf32x86::elf_get_offset_from_address(unsigned const addr) const
{
Elf32_Phdr const *phdr = phdri;
int j = ehdri.e_phnum;
@@ -1460,7 +1635,7 @@ PackLinuxI386elf::elf_get_offset_from_address(unsigned const addr) const
}
void const *
PackLinuxI386elf::elf_find_dynamic(unsigned int const key) const
PackLinuxElf32x86::elf_find_dynamic(unsigned int const key) const
{
Elf32_Dyn const *dynp= dynseg;
if (dynp)
@@ -1474,7 +1649,7 @@ PackLinuxI386elf::elf_find_dynamic(unsigned int const key) const
return 0;
}
unsigned PackLinuxI386elf::elf_hash(char const *p)
unsigned PackLinuxElf32x86::elf_hash(char const *p)
{
unsigned h;
for (h= 0; 0!=*p; ++p) {
@@ -1488,7 +1663,7 @@ unsigned PackLinuxI386elf::elf_hash(char const *p)
return h;
}
Elf32_Sym const *PackLinuxI386elf::elf_lookup(char const *name) const
Elf32_Sym const *PackLinuxElf32x86::elf_lookup(char const *name) const
{
if (hashtab && dynsym && dynstr) {
unsigned const nbucket = hashtab[0];
@@ -1507,7 +1682,7 @@ Elf32_Sym const *PackLinuxI386elf::elf_lookup(char const *name) const
}
void PackLinuxI386elf::pack1(OutputFile *fo, Filter &)
void PackLinuxElf32x86::pack1(OutputFile *fo, Filter &)
{
fi->seek(0, SEEK_SET);
fi->readx(&ehdri, sizeof(ehdri));
@@ -1518,10 +1693,11 @@ void PackLinuxI386elf::pack1(OutputFile *fo, Filter &)
fi->seek(ehdri.e_phoff, SEEK_SET);
fi->readx(phdri, sz_phdrs);
progid = getRandomId();
generateElfHdr(fo, linux_i386elf_fold, getbrk(phdri, ehdri.e_phnum) );
}
unsigned PackLinuxI386elf::find_LOAD_gap(
unsigned PackLinuxElf32x86::find_LOAD_gap(
Elf32_Phdr const *const phdri,
unsigned const k,
unsigned const e_phnum
@@ -1555,7 +1731,7 @@ unsigned PackLinuxI386elf::find_LOAD_gap(
return lo - hi;
}
void PackLinuxI386elf::pack2(OutputFile *fo, Filter &ft)
void PackLinuxElf32x86::pack2(OutputFile *fo, Filter &ft)
{
Extent x;
unsigned k;
@@ -1616,7 +1792,7 @@ void PackLinuxI386elf::pack2(OutputFile *fo, Filter &ft)
set_native32(&elfout.phdr[0].p_filesz, fo->getBytesWritten());
}
void PackLinuxI386elf::pack3(OutputFile *fo, Filter &ft)
void PackLinuxElf32x86::pack3(OutputFile *fo, Filter &ft)
{
unsigned disp;
unsigned len = fo->getBytesWritten();
@@ -1626,7 +1802,7 @@ void PackLinuxI386elf::pack3(OutputFile *fo, Filter &ft)
set_native32(&disp, len);
fo->write(&disp, sizeof(disp));
// We have packed multiple blocks, so PackLinuxI386::buildLinuxLoader
// We have packed multiple blocks, so PackLinuxElfxx::buildLinuxLoader
// needs an adjusted ph.c_len in order to get alignment correct.
unsigned const save_c_len = ph.c_len;
ph.c_len = sizeof(disp) + len - (
@@ -1648,17 +1824,10 @@ void PackLinuxI386elf::pack3(OutputFile *fo, Filter &ft)
super::pack3(fo, ft);
}
void PackLinuxI386elf::pack4(OutputFile *fo, Filter &ft)
void PackLinuxElf32x86::pack4(OutputFile *fo, Filter &ft)
{
super::pack4(fo, ft); // write PackHeader and overlay_offset
#if 0 /*{ where was this done already? FIXME */
#define PAGE_MASK (~0u<<12)
// pre-calculate for benefit of runtime disappearing act via munmap()
set_native32(&elfout.phdr[0].p_memsz, PAGE_MASK & (~PAGE_MASK + len));
#undef PAGE_MASK
#endif /*}*/
// rewrite Elf header
if (Elf32_Ehdr::ET_DYN==ehdri.e_type) {
// File being compressed was -pie.
@@ -1669,14 +1838,15 @@ void PackLinuxI386elf::pack4(OutputFile *fo, Filter &ft)
elfout.ehdr.e_entry -= base;
elfout.phdr[0].p_vaddr -= base;
elfout.phdr[0].p_paddr -= base;
elfout.phdr[0].p_flags |= Elf32_Phdr::PF_W;
// Strict SELinux (or PaX, grSecurity) disallows PF_W with PF_X
//elfout.phdr[0].p_flags |= Elf32_Phdr::PF_W;
}
fo->seek(0, SEEK_SET);
fo->rewrite(&elfout, sizeof(Elf32_Ehdr) + sizeof(Elf32_Phdr));
//fo->rewrite(&linfo, sizeof(linfo));
}
void PackLinuxI386elf::unpack(OutputFile *fo)
void PackLinuxElf32x86::unpack(OutputFile *fo)
{
#define MAX_ELF_HDR 512
char bufehdr[MAX_ELF_HDR];
@@ -1688,7 +1858,10 @@ void PackLinuxI386elf::unpack(OutputFile *fo)
fi->seek(0, SEEK_SET);
fi->readx(bufehdr, MAX_ELF_HDR);
unsigned const e_entry = get_native32(&ehdr->e_entry);
if (e_entry < 0x401180) { /* old style, 8-byte b_info */
unsigned const e_type = get_native16(&ehdr->e_type);
if (e_entry < 0x401180 && Elf32_Ehdr::ET_EXEC==e_type) {
// beware ET_DYN.e_entry==0x10f0 or so
/* old style, 8-byte b_info */
szb_info = 2*sizeof(unsigned);
}
}
+39 -16
View File
@@ -22,8 +22,11 @@
If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar John F. Reiser
markus@oberhumer.com ml1050@cdata.tvnet.hu jreiser@BitWagon.com
Markus F.X.J. Oberhumer Laszlo Molnar
<mfx@users.sourceforge.net> <ml1050@users.sourceforge.net>
John F. Reiser
<jreiser@users.sourceforge.net>
*/
@@ -56,13 +59,6 @@ protected:
void const *proto,
unsigned const brka
) = 0;
virtual int buildLinuxLoader(
upx_byte const *const proto, // assembly-only sections
unsigned const szproto,
upx_byte const *const fold, // linked assembly + C section
unsigned const szfold,
Filter const *ft
) = 0;
virtual void unpack(OutputFile *fo) = 0;
protected:
@@ -99,6 +95,7 @@ protected:
virtual void updateLoader(OutputFile *fo);
virtual unsigned find_LOAD_gap(Elf32_Phdr const *const phdri, unsigned const k,
unsigned const e_phnum);
virtual off_t getbase(const Elf32_Phdr *phdr, int e_phnum) const;
protected:
Elf32_Ehdr ehdri; // from input file
@@ -203,6 +200,20 @@ protected:
virtual void set_native16(void *b, unsigned v) const { set_be16(b, v); }
};
class PackLinuxElf32Le : public PackLinuxElf32
{
typedef PackLinuxElf32 super;
protected:
PackLinuxElf32Le(InputFile *f) : super(f) { }
virtual acc_uint64l_t get_native64(const void *b) const { return get_le64(b); }
virtual unsigned get_native32(const void *b) const { return get_le32(b); }
virtual unsigned get_native16(const void *b) const { return get_le16(b); }
virtual void set_native64(void *b, acc_uint64l_t v) const { set_le64(b, v); }
virtual void set_native32(void *b, unsigned v) const { set_le32(b, v); }
virtual void set_native16(void *b, unsigned v) const { set_le16(b, v); }
};
class PackLinuxElf64Le : public PackLinuxElf64
{
typedef PackLinuxElf64 super;
@@ -234,6 +245,7 @@ public:
protected:
virtual void pack3(OutputFile *, Filter &); // append loader
virtual const int *getCompressionMethods(int method, int level) const;
virtual int buildLoader(const Filter *);
virtual int buildLinuxLoader(
upx_byte const *const proto, // assembly-only sections
unsigned const szproto,
@@ -241,7 +253,6 @@ protected:
unsigned const szfold,
Filter const *ft
);
virtual int buildLoader(const Filter *);
virtual void generateElfHdr(
OutputFile *,
void const *proto,
@@ -266,6 +277,7 @@ public:
protected:
virtual void pack3(OutputFile *, Filter &); // append loader
virtual const int *getCompressionMethods(int method, int level) const;
virtual int buildLoader(const Filter *);
virtual int buildLinuxLoader(
upx_byte const *const proto, // assembly-only sections
unsigned const szproto,
@@ -273,7 +285,6 @@ protected:
unsigned const szfold,
Filter const *ft
);
virtual int buildLoader(const Filter *);
virtual void generateElfHdr(
OutputFile *,
void const *proto,
@@ -285,17 +296,16 @@ protected:
// linux/elf386
**************************************************************************/
class PackLinuxI386elf : public PackLinuxI386
class PackLinuxElf32x86 : public PackLinuxElf32Le
{
typedef PackLinuxI386 super;
typedef PackLinuxElf32Le super;
public:
PackLinuxI386elf(InputFile *f);
virtual ~PackLinuxI386elf();
PackLinuxElf32x86(InputFile *f);
virtual ~PackLinuxElf32x86();
virtual int getVersion() const { return 13; }
virtual int getFormat() const { return UPX_F_LINUX_ELF_i386; }
virtual const char *getName() const { return "linux/elf386"; }
virtual const int *getFilters() const;
virtual int buildLoader(const Filter *);
virtual void unpack(OutputFile *fo);
@@ -310,6 +320,19 @@ protected:
virtual void pack4(OutputFile *, Filter &); // append pack header
virtual void patchLoader();
virtual int buildLoader(const Filter *);
virtual int buildLinuxLoader(
upx_byte const *const proto, // assembly-only sections
unsigned const szproto,
upx_byte const *const fold, // linked assembly + C section
unsigned const szfold,
Filter const *ft
);
virtual void generateElfHdr(
OutputFile *,
void const *proto,
unsigned const brka
);
Elf32_Ehdr ehdri; // from input file
Elf32_Phdr *phdri; // for input file
+19 -99
View File
@@ -22,8 +22,11 @@
If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar John F. Reiser
markus@oberhumer.com ml1050@cdata.tvnet.hu jreiser@BitWagon.com
Markus F.X.J. Oberhumer Laszlo Molnar
<mfx@users.sourceforge.net> <ml1050@users.sourceforge.net>
John F. Reiser
<jreiser@users.sourceforge.net>
*/
@@ -131,11 +134,6 @@ PackLinuxI386::generateElfHdr(
memset(&h1->linfo, 0, sizeof(h1->linfo));
fo->write(h1, sizeof(*h1));
}
else if (ph.format==UPX_F_LINUX_ELF_i386) {
assert(h2->ehdr.e_phnum==2);
memset(&h2->linfo, 0, sizeof(h2->linfo));
fo->write(h2, sizeof(*h2));
}
else if (ph.format==UPX_F_LINUX_SH_i386) {
assert(h2->ehdr.e_phnum==1);
h2->ehdr.e_phnum = 1;
@@ -225,11 +223,19 @@ PackLinuxI386::pack4(OutputFile *fo, Filter &ft)
fo->write(shstrtab, sizeof(shstrtab));
#endif // }
// Cannot pre-round .p_memsz. If .p_filesz < .p_memsz, then kernel
// tries to make .bss, which requires PF_W.
// But strict SELinux (or PaX, grSecurity) disallows PF_W with PF_X.
#if 0 /*{*/
#undef PAGE_MASK
#define PAGE_MASK (~0u<<12)
// pre-calculate for benefit of runtime disappearing act via munmap()
elfout.phdr[0].p_memsz = PAGE_MASK & (~PAGE_MASK + elfout.phdr[0].p_filesz);
#undef PAGE_MASK
#else /*}{*/
elfout.phdr[0].p_memsz = elfout.phdr[0].p_filesz;
#endif /*}*/
// rewrite Elf header
fo->seek(0, SEEK_SET);
@@ -273,19 +279,14 @@ PackLinuxI386::buildLinuxLoader(
}
unsigned char const *const uncLoader = fold_hdrlen + fold;
unsigned char *const cprLoader = new unsigned char[sizeof(h) + h.sz_unc];
unsigned char *const cprLoader = new unsigned char[h.sz_unc];
if (0 < szfold) {
unsigned sz_cpr;
int r = upx_compress(uncLoader, h.sz_unc, sizeof(h) + cprLoader, &sz_cpr,
NULL, ph.method, 10, NULL, NULL );
unsigned sz_cpr = h.sz_unc;
memcpy(cprLoader, uncLoader, sz_cpr);
h.sz_cpr = sz_cpr;
if (r != UPX_E_OK || h.sz_cpr >= h.sz_unc)
throwInternalError("loader compression failed");
}
memcpy(cprLoader, &h, sizeof(h));
// This adds the definition to the "library", to be used later.
linker->addSection("FOLDEXEC", cprLoader, sizeof(h) + h.sz_cpr);
linker->addSection("FOLDEXEC", cprLoader, h.sz_cpr);
delete [] cprLoader;
n_mru = ft->n_mru;
@@ -308,28 +309,6 @@ PackLinuxI386::buildLinuxLoader(
addLoader("LEXEC000", NULL);
if (ft->id) {
if (ph.format==UPX_F_LINUX_ELF_i386) { // decompr, unfilter are separate
addLoader("LXUNF000", NULL);
addLoader("LXUNF002", NULL);
if (0x80==(ft->id & 0xF0)) {
if (256==n_mru) {
addLoader("MRUBYTE0", NULL);
}
else if (n_mru) {
addLoader("LXMRU005", NULL);
}
if (n_mru) {
addLoader("LXMRU006", NULL);
}
else {
addLoader("LXMRU007", NULL);
}
}
else if (0x40==(ft->id & 0xF0)) {
addLoader("LXUNF008", NULL);
}
addLoader("LXUNF010", NULL);
}
if (n_mru) {
addLoader("LEXEC009", NULL);
}
@@ -338,12 +317,7 @@ PackLinuxI386::buildLinuxLoader(
addLoader(getDecompressor(), NULL);
addLoader("LEXEC015", NULL);
if (ft->id) {
if (ph.format==UPX_F_LINUX_ELF_i386) { // decompr, unfilter are separate
if (0x80!=(ft->id & 0xF0)) {
addLoader("LXUNF042", NULL);
}
}
else { // decompr, unfilter not separate
{ // decompr, unfilter not separate
if (0x80==(ft->id & 0xF0)) {
addLoader("LEXEC110", NULL);
if (n_mru) {
@@ -354,15 +328,7 @@ PackLinuxI386::buildLinuxLoader(
}
}
addFilter32(ft->id);
if (ph.format==UPX_F_LINUX_ELF_i386) { // decompr, unfilter are separate
if (0x80==(ft->id & 0xF0)) {
if (0==n_mru) {
addLoader("LXMRU058", NULL);
}
}
addLoader("LXUNF035", NULL);
}
else { // decompr always unfilters
{ // decompr always unfilters
addLoader("LEXEC017", NULL);
}
}
@@ -401,24 +367,6 @@ PackLinuxI386::buildLoader(Filter const *ft)
patch_le32(buf,sz_fold,"UPX3",progid);
patch_le32(buf,sz_fold,"UPX2",exetype > 0 ? 0 : 0x7fffffff);
// get fresh filter
Filter fold_ft = *ft;
fold_ft.init(ft->id, ft->addvalue);
int preferred_ctos[2] = {ft->cto, -1};
fold_ft.preferred_ctos = preferred_ctos;
// filter
optimizeFilter(&fold_ft, buf, sz_fold);
unsigned fold_hdrlen = sizeof(l_info) + sizeof(Elf32_Ehdr) +
sizeof(Elf32_Phdr) * get_native32(&((Elf32_Ehdr const *)(void *)buf)->e_phnum);
if (0 == get_le32(fold_hdrlen + buf)) {
// inconsistent SIZEOF_HEADERS in *.lds (ld, binutils)
fold_hdrlen = umax(0x80, fold_hdrlen);
}
bool success = fold_ft.filter(buf + fold_hdrlen, sz_fold - fold_hdrlen);
(void)success;
return buildLinuxLoader(
linux_i386exec_loader, sizeof(linux_i386exec_loader),
buf, sz_fold, ft );
@@ -476,34 +424,6 @@ int PackLinuxI386::checkEhdr(const Elf32_Ehdr *ehdr) const
}
off_t PackLinuxI386::getbrk(const Elf32_Phdr *phdr, int e_phnum) const
{
off_t brka = 0;
for (int j = 0; j < e_phnum; ++phdr, ++j) {
if (phdr->PT_LOAD == phdr->p_type) {
off_t b = phdr->p_vaddr + phdr->p_memsz;
if (b > brka)
brka = b;
}
}
return brka;
}
off_t PackLinuxI386::getbase(const Elf32_Phdr *phdr, int e_phnum) const
{
off_t base = ~0u;
for (int j = 0; j < e_phnum; ++phdr, ++j) {
if (phdr->PT_LOAD == phdr->p_type) {
if (phdr->p_vaddr < (unsigned) base)
base = phdr->p_vaddr;
}
}
if (0!=base) {
return base;
}
return 0x12000;
}
/*************************************************************************
//
+4 -3
View File
@@ -22,7 +22,10 @@
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
markus@oberhumer.com ml1050@cdata.tvnet.hu
<mfx@users.sourceforge.net> <ml1050@users.sourceforge.net>
John F. Reiser
<jreiser@users.sourceforge.net>
*/
@@ -75,8 +78,6 @@ protected:
// ELF util
virtual int checkEhdr(const Elf32_Ehdr *ehdr) const;
virtual off_t getbrk(const Elf32_Phdr *phdr, int e_phnum) const;
virtual off_t getbase(const Elf32_Phdr *phdr, int e_phnum) const;
enum {
UPX_ELF_MAGIC = 0x5850557f // "\x7fUPX"
+12 -9
View File
@@ -22,8 +22,11 @@
If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar John F. Reiser
markus@oberhumer.com ml1050@cdata.tvnet.hu jreiser@BitWagon.com
Markus F.X.J. Oberhumer Laszlo Molnar
<mfx@users.sourceforge.net> <ml1050@users.sourceforge.net>
John F. Reiser
<jreiser@users.sourceforge.net>
*/
@@ -52,16 +55,16 @@ static const
static const
#include "stub/fold_pti86.h"
PackLinuxI386interp::PackLinuxI386interp(InputFile *f) :
PackLinuxElf32x86interp::PackLinuxElf32x86interp(InputFile *f) :
super(f)
{
}
PackLinuxI386interp::~PackLinuxI386interp()
PackLinuxElf32x86interp::~PackLinuxElf32x86interp()
{
}
bool PackLinuxI386interp::canPack()
bool PackLinuxElf32x86interp::canPack()
{
if (opt->o_unix.make_ptinterp) {
return true;
@@ -72,7 +75,7 @@ bool PackLinuxI386interp::canPack()
return super::canPack();
}
void PackLinuxI386interp::pack1(OutputFile *fo, Filter &)
void PackLinuxElf32x86interp::pack1(OutputFile *fo, Filter &)
{
fi->seek(0, SEEK_SET);
fi->readx(&ehdri, sizeof(ehdri));
@@ -121,7 +124,7 @@ void PackLinuxI386interp::pack1(OutputFile *fo, Filter &)
#undef E
}
void PackLinuxI386interp::pack2(OutputFile *fo, Filter &ft)
void PackLinuxElf32x86interp::pack2(OutputFile *fo, Filter &ft)
{
if (opt->o_unix.make_ptinterp) {
return; // ignore current input file!
@@ -132,7 +135,7 @@ void PackLinuxI386interp::pack2(OutputFile *fo, Filter &ft)
#undef PAGE_MASK
#define PAGE_MASK (~0u<<12)
void PackLinuxI386interp::pack3(OutputFile *fo, Filter &/*ft*/)
void PackLinuxElf32x86interp::pack3(OutputFile *fo, Filter &/*ft*/)
{
unsigned base = getbase(phdri, ehdri.e_phnum);
unsigned sz = PAGE_MASK & (~PAGE_MASK + elfout.phdr[0].p_filesz);
@@ -191,7 +194,7 @@ void PackLinuxI386interp::pack3(OutputFile *fo, Filter &/*ft*/)
}
void PackLinuxI386interp::unpack(OutputFile *fo)
void PackLinuxElf32x86interp::unpack(OutputFile *fo)
{
#define MAX_INTERP_HDR 512
char bufehdr[MAX_INTERP_HDR];
+9 -6
View File
@@ -22,8 +22,11 @@
If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar John F. Reiser
markus@oberhumer.com ml1050@cdata.tvnet.hu jreiser@BitWagon.com
Markus F.X.J. Oberhumer Laszlo Molnar
<mfx@users.sourceforge.net> <ml1050@users.sourceforge.net>
John F. Reiser
<jreiser@users.sourceforge.net>
*/
@@ -35,12 +38,12 @@
// linux/interp386
**************************************************************************/
class PackLinuxI386interp : public PackLinuxI386elf
class PackLinuxElf32x86interp : public PackLinuxElf32x86
{
typedef PackLinuxI386elf super;
typedef PackLinuxElf32x86 super;
public:
PackLinuxI386interp(InputFile *f);
virtual ~PackLinuxI386interp();
PackLinuxElf32x86interp(InputFile *f);
virtual ~PackLinuxElf32x86interp();
virtual int getVersion() const { return 13; }
virtual int getFormat() const { return UPX_F_LINUX_ELFI_i386; }
virtual const char *getName() const { return "linux/elfi386"; }
+5 -2
View File
@@ -22,8 +22,11 @@
If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar John F. Reiser
markus@oberhumer.com ml1050@cdata.tvnet.hu jreiser@BitWagon.com
Markus F.X.J. Oberhumer Laszlo Molnar
<mfx@users.sourceforge.net> <ml1050@users.sourceforge.net>
John F. Reiser
<jreiser@users.sourceforge.net>
*/
+7 -4
View File
@@ -22,8 +22,11 @@
If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar John F. Reiser
markus@oberhumer.com ml1050@cdata.tvnet.hu jreiser@BitWagon.com
Markus F.X.J. Oberhumer Laszlo Molnar
<mfx@users.sourceforge.net> <ml1050@users.sourceforge.net>
John F. Reiser
<jreiser@users.sourceforge.net>
*/
@@ -35,9 +38,9 @@
// linux/sep386
**************************************************************************/
class PackLinuxI386sep : public PackLinuxI386elf
class PackLinuxI386sep : public PackLinuxI386
{
typedef PackLinuxI386elf super;
typedef PackLinuxI386 super;
public:
PackLinuxI386sep(InputFile *f) : super(f) { }
virtual int getFormat() const { return UPX_F_LINUX_SEP_i386; }
+5 -2
View File
@@ -22,8 +22,11 @@
If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar John F. Reiser
markus@oberhumer.com ml1050@cdata.tvnet.hu jreiser@BitWagon.com
Markus F.X.J. Oberhumer Laszlo Molnar
<mfx@users.sourceforge.net> <ml1050@users.sourceforge.net>
John F. Reiser
<jreiser@users.sourceforge.net>
*/
+5 -2
View File
@@ -22,8 +22,11 @@
If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar John F. Reiser
markus@oberhumer.com ml1050@cdata.tvnet.hu jreiser@BitWagon.com
Markus F.X.J. Oberhumer Laszlo Molnar
<mfx@users.sourceforge.net> <ml1050@users.sourceforge.net>
John F. Reiser
<jreiser@users.sourceforge.net>
*/
+1 -1
View File
@@ -22,7 +22,7 @@
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
markus@oberhumer.com ml1050@cdata.tvnet.hu
markus@oberhumer.com ml1050@users.sourceforge.net
*/
+1 -1
View File
@@ -22,7 +22,7 @@
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
markus@oberhumer.com ml1050@cdata.tvnet.hu
markus@oberhumer.com ml1050@users.sourceforge.net
*/
+1 -1
View File
@@ -22,7 +22,7 @@
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
markus@oberhumer.com ml1050@cdata.tvnet.hu
markus@oberhumer.com ml1050@users.sourceforge.net
*/
+1 -1
View File
@@ -22,7 +22,7 @@
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
markus@oberhumer.com ml1050@cdata.tvnet.hu
markus@oberhumer.com ml1050@users.sourceforge.net
*/
+1 -1
View File
@@ -22,7 +22,7 @@
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
markus@oberhumer.com ml1050@cdata.tvnet.hu
markus@oberhumer.com ml1050@users.sourceforge.net
*/
+1 -1
View File
@@ -22,7 +22,7 @@
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
markus@oberhumer.com ml1050@cdata.tvnet.hu
markus@oberhumer.com ml1050@users.sourceforge.net
*/
+1 -1
View File
@@ -22,7 +22,7 @@
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
markus@oberhumer.com ml1050@cdata.tvnet.hu
markus@oberhumer.com ml1050@users.sourceforge.net
*/
+1 -1
View File
@@ -22,7 +22,7 @@
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
markus@oberhumer.com ml1050@cdata.tvnet.hu
markus@oberhumer.com ml1050@users.sourceforge.net
*/
+1 -1
View File
@@ -22,7 +22,7 @@
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
markus@oberhumer.com ml1050@cdata.tvnet.hu
markus@oberhumer.com ml1050@users.sourceforge.net
*/
+83 -18
View File
@@ -482,37 +482,42 @@ void PackW32Pe::processRelocs() // pass1
for (; ic; ic--)
fix[ic] = new LE32 [counts[ic]];
unsigned xcounts[4];
memset(xcounts, 0, sizeof(xcounts));
// prepare sorting
unsigned pos,type;
while (rel.next(pos,type))
{
if (pos >= ih.imagesize)
continue; // skip out-of-bounds record
if (type == 3)
set_le32(ibuf + pos,get_le32(ibuf + pos) - ih.imagebase - rvamin);
if (type < 4)
*fix[type]++ = pos - rvamin;
fix[type][xcounts[type]++] = pos - rvamin;
}
fix[3] -= counts[3];
ibuf.fill(IDADDR(PEDIR_RELOC), IDSIZE(PEDIR_RELOC), FILLVAL);
orelocs = new upx_byte [rnum * 4 + 1024]; // 1024 - safety
sorelocs = ptr_diff(optimizeReloc32((upx_byte*) fix[3],counts[3],orelocs,ibuf + rvamin,1,&big_relocs),orelocs);
sorelocs = ptr_diff(optimizeReloc32((upx_byte*) fix[3], xcounts[3],
orelocs, ibuf + rvamin,1, &big_relocs),
orelocs);
delete [] fix[3];
// append relocs type "LOW" then "HIGH"
for (ic = 2; ic ; ic--)
{
fix[ic] -= counts[ic];
memcpy(orelocs + sorelocs,fix[ic],4 * counts[ic]);
sorelocs += 4 * counts[ic];
memcpy(orelocs + sorelocs,fix[ic],4 * xcounts[ic]);
sorelocs += 4 * xcounts[ic];
delete [] fix[ic];
set_le32(orelocs + sorelocs,0);
if (counts[ic])
if (xcounts[ic])
{
sorelocs += 4;
big_relocs |= 2 * ic;
}
}
delete [] fix[3];
info("Relocations: original size: %u bytes, preprocessed size: %u bytes",(unsigned) IDSIZE(PEDIR_RELOC),sorelocs);
}
@@ -1173,10 +1178,9 @@ public:
bool clear();
void dump() const { dump(root,0); }
/*
unsigned iname() const {return current->parent->id;}
const upx_byte *nname() const {return current->parent->name;}
/*
unsigned ilang() const {return current->id;}
const upx_byte *nlang() const {return current->name;}
*/
@@ -1199,10 +1203,7 @@ void Resource::check(const res_dir *node,unsigned level)
{
int ic = node->identr + node->namedentr;
if (ic == 0)
{
//throwCantPack("unsupported resource structure");
throwCantPack("empty resource sections are not supported");
}
return;
for (const res_dir_entry *rde = node->entries; --ic >= 0; rde++)
if (((rde->child & 0x80000000) == 0) ^ (level == 2))
throwCantPack("unsupported resource structure");
@@ -1228,10 +1229,14 @@ Resource::upx_rnode *Resource::convert(const void *rnode,upx_rnode *parent,unsig
}
const res_dir *node = (const res_dir *) rnode;
int ic = node->identr + node->namedentr;
if (ic == 0)
return NULL;
upx_rbranch *branch = new upx_rbranch;
branch->name = NULL;
branch->parent = parent;
int ic = branch->nc = node->identr + node->namedentr;
branch->nc = ic;
branch->children = new upx_rnode*[ic];
branch->data = *node;
@@ -1298,13 +1303,15 @@ upx_byte *Resource::build()
void Resource::destroy(upx_rnode *node,unsigned level)
{
delete [] node->name; node->name = NULL;
if (level == 3)
return;
if (level != 3)
{
upx_rbranch * const branch = (upx_rbranch *) node;
for (int ic = branch->nc; --ic >= 0; )
destroy(branch->children[ic],level + 1);
delete [] branch->children; branch->children = NULL;
}
delete node;
}
static void lame_print_unicode(const upx_byte *p)
{
@@ -1373,6 +1380,52 @@ void PackW32Pe::processResources(Resource *res,unsigned newaddr)
delete [] p;
}
static bool match(unsigned itype, const unsigned char *ntype,
unsigned iname, const unsigned char *nname,
const char *keep)
{
// format of string keep: type1[/name1],type2[/name2], ....
// typex and namex can be string or number
// hopefully resource names do not have '/' or ',' characters inside
struct helper
{
static bool match(unsigned num, const unsigned char *unistr,
const char *keep)
{
if (!unistr)
return (unsigned) atoi(keep) == num;
unsigned ic;
for (ic = 0; ic < get_le16(unistr); ic++)
if (unistr[2 + ic * 2] != (unsigned char) keep[ic])
return false;
return keep[ic] == 0 || keep[ic] == ',' || keep[ic] == '/';
};
};
// FIXME this comparison is not too exact
while (1)
{
char *delim1 = strchr(keep, '/');
char *delim2 = strchr(keep, ',');
if (helper::match(itype, ntype, keep))
{
if (!delim1)
return true;
if (delim2 && delim2 < delim1)
return true;
if (helper::match(iname, nname, delim1 + 1))
return true;
}
if (delim2 == NULL)
break;
keep = delim2 + 1;
}
return false;
}
void PackW32Pe::processResources(Resource *res)
{
const unsigned vaddr = IDADDR(PEDIR_RESOURCE);
@@ -1441,6 +1494,10 @@ void PackW32Pe::processResources(Resource *res)
do_compress = false; // u"REGISTRY"
}
if (do_compress && opt->win32_pe.keep_resource[0])
do_compress ^= match(res->itype(), res->ntype(), res->iname(),
res->nname(), opt->win32_pe.keep_resource);
if (do_compress)
{
csize += res->size();
@@ -1853,6 +1910,14 @@ void PackW32Pe::pack(OutputFile *fo)
ft.addvalue = ih.codebase - rvamin;
// compress
int strategy = allow_filter ? 0 : -3;
// disable filters for files with broken headers
if (ih.codebase + ih.codesize > ph.u_len)
{
ft.buf_len = 1;
strategy = -3;
}
compressWithFilters(&ft, 2048, strategy,
NULL, 0, 0, ih.codebase, rvamin);
// info: see buildLoader()
@@ -2430,7 +2495,7 @@ void PackW32Pe::rebuildTls()
void PackW32Pe::rebuildResources(upx_byte *& extrainfo)
{
if (ODSIZE(PEDIR_RESOURCE) == 0)
if (ODSIZE(PEDIR_RESOURCE) == 0 || IDSIZE(PEDIR_RESOURCE) == 0)
return;
icondir_count = get_le16(extrainfo);
+1 -1
View File
@@ -22,7 +22,7 @@
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
markus@oberhumer.com ml1050@cdata.tvnet.hu
markus@oberhumer.com ml1050@users.sourceforge.net
*/
+1 -1
View File
@@ -22,7 +22,7 @@
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
markus@oberhumer.com ml1050@cdata.tvnet.hu
markus@oberhumer.com ml1050@users.sourceforge.net
*/
+29 -17
View File
@@ -1055,6 +1055,14 @@ char const *Packer::getIdentstr(unsigned *size, int small)
}
}
void Packer::createLinker(const void *pdata, int plen, int pinfo)
{
if (getFormat() < 128)
linker = new Linker(pdata, plen, pinfo); // little endian
else
linker = new BeLinker(pdata, plen, pinfo); // big endian
}
void Packer::initLoader(const void *pdata, int plen, int pinfo, int small)
{
if (pinfo < 0)
@@ -1064,10 +1072,7 @@ void Packer::initLoader(const void *pdata, int plen, int pinfo, int small)
}
delete linker; linker = NULL;
if (getFormat() < 128)
linker = new Linker(pdata, plen, pinfo); // little endian
else
linker = new BeLinker(pdata, plen, pinfo); // big endian
createLinker(pdata, plen, pinfo);
unsigned size;
char const * const ident = getIdentstr(&size, small);
@@ -1302,7 +1307,7 @@ void Packer::compressWithFilters(Filter *parm_ft,
best_ph.c_len = orig_ph.u_len;
best_ph.overlap_overhead = 0;
unsigned best_ph_lsize = 0;
unsigned best_hdr_clen = 0;
unsigned best_hdr_c_len = 0;
// preconditions
assert(orig_ph.filter == 0);
@@ -1396,8 +1401,9 @@ void Packer::compressWithFilters(Filter *parm_ft,
int nfilters_success = 0;
for (int m = 0; m < nmethods; m++) // for all methods
{
unsigned hdr_clen = 0;
if (hdr_buf && hdr_u_len) {
unsigned hdr_c_len = 0;
if (hdr_buf && hdr_u_len)
{
unsigned result[16];
upx_compress_config_t conf;
memset(&conf, 0xff, sizeof(conf));
@@ -1405,9 +1411,12 @@ void Packer::compressWithFilters(Filter *parm_ft,
otemp_buf.allocForCompression(compress_buf_len);
otemp = &otemp_buf;
}
int r = upx_compress(hdr_buf, hdr_u_len, *otemp, &hdr_clen,
int r = upx_compress(hdr_buf, hdr_u_len, *otemp, &hdr_c_len,
0, methods[m], 10, &conf, result);
(void)r;
if (r != UPX_E_OK)
throwInternalError("header compression failed");
if (hdr_c_len >= hdr_u_len)
throwInternalError("header compression size increase");
}
for (int i = 0; i < nfilters; i++) // for all filters
{
@@ -1417,6 +1426,7 @@ void Packer::compressWithFilters(Filter *parm_ft,
ph = orig_ph;
ph.method = methods[m];
ph.filter = filters[i];
ph.overlap_overhead = 0;
// get fresh filter
Filter ft = orig_ft;
ft.init(ph.filter, orig_ft.addvalue);
@@ -1457,26 +1467,27 @@ void Packer::compressWithFilters(Filter *parm_ft,
if (compress(ibuf + compress_buf_off, *otemp, max_offset, max_match))
{
unsigned lsize = 0;
if (ph.c_len + lsize < best_ph.c_len + best_ph_lsize)
if (ph.c_len + lsize + hdr_c_len <= best_ph.c_len + best_ph_lsize + best_hdr_c_len)
{
// get results
ph.overlap_overhead = findOverlapOverhead(*otemp, overlap_range);
lsize = buildLoader(&ft);
assert(lsize > 0);
}
#if 0
printf("\n%2d %02x: %d +%4d +%3d = %d (best: %d +%4d +%3d = %d)\n", ph.method, ph.filter,
ph.c_len, lsize, hdr_clen, ph.c_len + lsize + hdr_clen,
best_ph.c_len, best_ph_lsize, best_hdr_clen, best_ph.c_len + best_ph_lsize + best_hdr_clen);
ph.c_len, lsize, hdr_c_len, ph.c_len + lsize + hdr_c_len,
best_ph.c_len, best_ph_lsize, best_hdr_c_len, best_ph.c_len + best_ph_lsize + best_hdr_c_len);
#endif
bool update = false;
if (ph.c_len + lsize + hdr_clen < best_ph.c_len + best_ph_lsize + best_hdr_clen)
if (ph.c_len + lsize + hdr_c_len < best_ph.c_len + best_ph_lsize + best_hdr_c_len)
update = true;
else if (ph.c_len + lsize + hdr_clen == best_ph.c_len + best_ph_lsize + best_hdr_clen)
else if (ph.c_len + lsize + hdr_c_len == best_ph.c_len + best_ph_lsize + best_hdr_c_len)
{
// prefer smaller loaders
if (lsize + hdr_clen < best_ph_lsize + best_hdr_clen)
if (lsize + hdr_c_len < best_ph_lsize + best_hdr_c_len)
update = true;
else if (lsize + hdr_clen == best_ph_lsize + best_hdr_clen)
else if (lsize + hdr_c_len == best_ph_lsize + best_hdr_c_len)
{
// prefer less overlap_overhead
if (ph.overlap_overhead < best_ph.overlap_overhead)
@@ -1485,13 +1496,14 @@ void Packer::compressWithFilters(Filter *parm_ft,
}
if (update)
{
assert((int)ph.overlap_overhead > 0);
// update obuf[] with best version
if (otemp != &obuf)
memcpy(obuf, *otemp, ph.c_len);
// save compression results
best_ph = ph;
best_ph_lsize = lsize;
best_hdr_clen = hdr_clen;
best_hdr_c_len = hdr_c_len;
best_ft = ft;
}
}
+2 -1
View File
@@ -22,7 +22,7 @@
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
markus@oberhumer.com ml1050@cdata.tvnet.hu
markus@oberhumer.com ml1050@users.sourceforge.net
*/
@@ -271,6 +271,7 @@ protected:
protected:
// linker
Linker *linker;
virtual void createLinker(const void *pdata, int plen, int pinfo);
private:
// private to checkPatch()
+1 -1
View File
@@ -22,7 +22,7 @@
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
markus@oberhumer.com ml1050@cdata.tvnet.hu
markus@oberhumer.com ml1050@users.sourceforge.net
*/
+3 -3
View File
@@ -22,7 +22,7 @@
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
markus@oberhumer.com ml1050@cdata.tvnet.hu
markus@oberhumer.com ml1050@users.sourceforge.net
*/
@@ -212,14 +212,14 @@ static Packer* try_packers(InputFile *f, try_function func)
}
#endif
if (opt->o_unix.use_ptinterp) {
if ((p = func(new PackLinuxI386interp(f),f)) != NULL)
if ((p = func(new PackLinuxElf32x86interp(f),f)) != NULL)
return p;
}
if ((p = func(new PackLinuxElf64amd(f),f)) != NULL)
return p;
if ((p = func(new PackLinuxElf32ppc(f),f)) != NULL)
return p;
if ((p = func(new PackLinuxI386elf(f),f)) != NULL)
if ((p = func(new PackLinuxElf32x86(f),f)) != NULL)
return p;
if ((p = func(new PackLinuxI386sh(f),f)) != NULL)
return p;
+1 -1
View File
@@ -22,7 +22,7 @@
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
markus@oberhumer.com ml1050@cdata.tvnet.hu
markus@oberhumer.com ml1050@users.sourceforge.net
*/
-18
View File
@@ -1,18 +0,0 @@
.*-stamp
*.ah
*.asx
*.asy
*.bin
*.d
*.i
*.lst
*.map
*.o
*.out
*.tmp
GNUmakefile
MMakefile
stamp-h
stubify.exe
upxb
upxd
-18
View File
@@ -1,18 +0,0 @@
.*-stamp
*.ah
*.asx
*.asy
*.bin
*.d
*.i
*.lst
*.map
*.o
*.out
*.tmp
GNUmakefile
MMakefile
stamp-h
stubify.exe
upxb
upxd
+20 -44
View File
@@ -32,7 +32,7 @@ top_srcdir = ../..
# These are the files we want to create.
STUBS = \
l_armpe.h \
l_armpea.h l_armpet.h \
l_com.h \
l_djgpp2.h stubify.h \
l_exe.h \
@@ -101,23 +101,23 @@ O2BIN = perl -w $(srcdir)/scripts/o2bin.pl
### i386-linux
###
LD_LINUX_I386 = ld -m elf_i386
OBJCOPY_LINUX_I386 = objcopy -F elf32-i386
LD_LINUX_I386 = i386-linux-ld-2.16.1 -m elf_i386
OBJCOPY_LINUX_I386 = i386-linux-objcopy-2.16.1 -F elf32-i386
OBJSTRIP_LINUX_I386 = $(OBJCOPY_LINUX_I386) -R .comment -R .note
STRIPELF_LINUX_I386 = ./util/sstrip/i386-linux-sstrip
# gcc 2.7.2.3 (fold_*86.bin: 1900 / 1011 / 1786 / 1401)
CC_LINUX_I386_GCC272 = gcc-2.72 -m386 -O2 -MMD
CC_LINUX_I386_GCC272 = i386-linux-gcc-2.72 -m386 -O2 -MMD
CC_LINUX_I386_GCC272 += -malign-functions=0 -malign-jumps=0 -malign-loops=0
# gcc 2.95.3 (fold_*86.bin: 1770 / 995 / 1661 / 1314)
CC_LINUX_I386_GCC295 = gcc-2.95.3 -march=i386 -mcpu=k6 -fno-exceptions -MMD
CC_LINUX_I386_GCC295 = i386-linux-gcc-2.95.3 -march=i386 -mcpu=k6 -fno-exceptions -MMD
CC_LINUX_I386_GCC295 += -Os -fno-omit-frame-pointer
CC_LINUX_I386_GCC295 += -malign-functions=0 -malign-jumps=0 -malign-loops=0
CC_LINUX_I386_GCC295 += -Werror
# gcc 3.4.6 (fold_*86.bin: 1651 / 947 / 1537 / 1190)
CC_LINUX_I386_GCC34 = gcc-3.4.6
CC_LINUX_I386_GCC34 = i386-linux-gcc-3.4.6
CC_LINUX_I386_GCC34 += -m32 -march=i386 -mtune=k6 -fno-exceptions -MMD
CC_LINUX_I386_GCC34 += -Os -fno-omit-frame-pointer
CC_LINUX_I386_GCC34 += -momit-leaf-frame-pointer
@@ -128,7 +128,7 @@ CC_LINUX_I386_GCC34 += -Werror
# gcc 4.1.0 (fold_*86.bin: 1725 / 963 / 1620 / 1202)
# gcc 4.0.3 (fold_*86.bin: 1731 / 995 / 1625 / 1195)
CC_LINUX_I386_GCC41 = gcc-4.1.0
CC_LINUX_I386_GCC41 = i386-linux-gcc-4.1.0
CC_LINUX_I386_GCC41 += -m32 -march=i386 -mtune=k6 -fno-exceptions -MMD
CC_LINUX_I386_GCC41 += -Os -fno-omit-frame-pointer
CC_LINUX_I386_GCC41 += -momit-leaf-frame-pointer
@@ -150,7 +150,7 @@ CC_LINUX_I386 += -funsigned-char
### MIPS R3000
###
CPP_MR3K = gcc-2.95.3 -nostdinc -I$(UCL_UPX) -I$(srcdir) -E -x assembler-with-cpp -Wall -Wp,-P,-C,-traditional
CPP_MR3K = i386-linux-gcc-2.95.3 -nostdinc -I$(UCL_UPX) -I$(srcdir) -E -x assembler-with-cpp -Wall -Wp,-P,-C,-traditional
APP_MR3K = perl -w $(srcdir)/scripts/app_mr3k.pl
ASM_MR3K = asm5900 --nologo -q
@@ -189,7 +189,7 @@ ifneq ($(wildcard $d),)
endif
d = /opt/cc-i386-linux/crosstool/powerpc-750-linux-gnu/gcc-3.4.3.20050210-glibc-2.2.5/bin
ifneq ($(wildcard $d),)
GCC_PPC32 := $d/powerpc-750-linux-gnu-gcc -m32 -nostdinc -MMD
GCC_PPC32 := $d/powerpc-750-linux-gnu-gcc -m32 -nostdinc -MMD -fno-exceptions -fno-asynchronous-unwind-tables
LD_PPC32 := $d/powerpc-750-linux-gnu-ld
OBJCOPY_PPC32 := $d/powerpc-750-linux-gnu-objcopy
endif
@@ -226,10 +226,8 @@ GCC_AMD64 += -Wall -W -Wcast-align -Wcast-qual -Wwrite-strings -Werror
GCC_ARM := arm-9tdmi-linux-gnu-gcc -march=armv4 -nostdinc -MMD
GCC_ARM += -Wall -W -Wcast-align -Wcast-qual -Wwrite-strings -Werror
GCC_ARM_T := $(GCC_ARM) -march=armv4t -mthumb-interwork -mthumb
LD_ARM := arm-9tdmi-linux-gnu-ld
GCC_ARM_T := $(GCC_ARM) -march=armv4t
OBJCOPY_ARM := arm-9tdmi-linux-gnu-objcopy
BIN2H_WINCE := perl -ne 'print "db\t", join(",", map { sprintf "%\#02x", $$_ } unpack("C*", $$_)), "\n"'
# /***********************************************************************
@@ -468,7 +466,7 @@ m_lx_elfppc32.o: m_lx_elfppc32.c $(MAKEFILE_DEPS)
$(OBJSTRIP_PPC32) $@
a_lx_elf64amd.o: a_lx_elf64.c $(MAKEFILE_DEPS)
$(GCC_AMD64) -c -Os -o $@ $<
$(GCC_AMD64) -c -Os -fno-exceptions -fno-asynchronous-unwind-tables -o $@ $<
$(OBJSTRIP_AMD64) $@
fold_elfppc32.o: fold_elfppc32.S ppc_bxx.S $(MAKEFILE_DEPS)
@@ -555,37 +553,15 @@ upxd: l_lx_sep.o l_lx_sep86.asm
$(STRIPELF_LINUX_I386) $@
$(BRANDELF) $@
l_armpe.h: l_armpe.asx l_armpe_s.S l_armpe_c.c arm_nrv2e_d8.S arm_nrv2b_d8.S armv4_n2e_d8.S $(MAKEFILE_LIST)
$(GCC_ARM_T) -c l_armpe_s.S arm_nrv2e_d8.S arm_nrv2b_d8.S
$(GCC_ARM_T) -Os -c l_armpe_c.c -DUCL_DECOMPRESS=thumb_nrv2e_d8
$(LD_ARM) -o l_armpe_txe.out l_armpe_s.o l_armpe_c.o arm_nrv2e_d8.o
$(OBJCOPY_ARM) --only-section .text -O binary l_armpe_txe.out l_armpe_txe.bin
$(BIN2H_WINCE) <l_armpe_txe.bin >l_armpe_txe.ah
$(GCC_ARM_T) -Os -c l_armpe_c.c -DUCL_DECOMPRESS=go_thumb_n2b
$(LD_ARM) -o l_armpe_txb.out l_armpe_s.o l_armpe_c.o arm_nrv2b_d8.o
$(OBJCOPY_ARM) --only-section .text -O binary l_armpe_txb.out l_armpe_txb.bin
$(BIN2H_WINCE) <l_armpe_txb.bin >l_armpe_txb.ah
$(GCC_ARM_T) -DSTUB_FOR_DLL -c l_armpe_s.S
$(GCC_ARM_T) -DSTUB_FOR_DLL -Os -c l_armpe_c.c -DUCL_DECOMPRESS=thumb_nrv2e_d8
$(LD_ARM) -o l_armpe_tde.out l_armpe_s.o l_armpe_c.o arm_nrv2e_d8.o
$(OBJCOPY_ARM) --only-section .text -O binary l_armpe_tde.out l_armpe_tde.bin
$(BIN2H_WINCE) <l_armpe_tde.bin >l_armpe_tde.ah
$(GCC_ARM_T) -DSTUB_FOR_DLL -Os -c l_armpe_c.c -DUCL_DECOMPRESS=go_thumb_n2b
$(LD_ARM) -o l_armpe_tdb.out l_armpe_s.o l_armpe_c.o arm_nrv2b_d8.o
$(OBJCOPY_ARM) --only-section .text -O binary l_armpe_tdb.out l_armpe_tdb.bin
$(BIN2H_WINCE) <l_armpe_tdb.bin >l_armpe_tdb.ah
$(GCC_ARM) -Os -c l_armpe_c.c -DUCL_DECOMPRESS=ucl_nrv2e_decompress_8
$(GCC_ARM) -c armv4_n2e_d8.S l_armpe_s.S
$(LD_ARM) -o l_armpe_axe.out l_armpe_s.o l_armpe_c.o armv4_n2e_d8.o
$(OBJCOPY_ARM) --only-section .text -O binary l_armpe_axe.out l_armpe_axe.bin
$(BIN2H_WINCE) <l_armpe_axe.bin >l_armpe_axe.ah
$(GCC_ARM) -DSTUB_FOR_DLL -Os -c l_armpe_c.c -DUCL_DECOMPRESS=ucl_nrv2e_decompress_8
$(GCC_ARM) -DSTUB_FOR_DLL -c l_armpe_s.S
$(LD_ARM) -o l_armpe_ade.out l_armpe_s.o l_armpe_c.o armv4_n2e_d8.o
$(OBJCOPY_ARM) --only-section .text -O binary l_armpe_ade.out l_armpe_ade.bin
$(BIN2H_WINCE) <l_armpe_ade.bin >l_armpe_ade.ah
$(NASM) -f bin -o $T.bin $<
$(BIN2H) $T.bin nrv_loader $@
l_armpea.h: l_armpea.S armv4_n2e_d8.S $(MAKEFILE_LIST)
$(GCC_ARM) $T.S -o $T.out -nostdlib
$(OBJCOPY_ARM) --only-section .text -O binary $T.out $T.bin
$(BIN2H) $T.bin nrv_loader_arm $@
l_armpet.h: l_armpet.S arm_nrv2e_d8.S arm_nrv2b_d8.S $(MAKEFILE_LIST)
$(GCC_ARM_T) $T.S -o $T.out -nostdlib
$(OBJCOPY_ARM) --only-section .text -O binary $T.out $T.bin
$(BIN2H) $T.bin nrv_loader_thumb $@
# /***********************************************************************
# // dependencies
+14 -7
View File
@@ -224,9 +224,9 @@ xfind_pages(unsigned mflags, Elf64_Phdr const *phdr, int phnum,
lo -= ~PAGE_MASK & lo; // round down to page boundary
hi = PAGE_MASK & (hi - lo - PAGE_MASK -1); // page length
szlo = PAGE_MASK & (szlo - PAGE_MASK -1); // page length
addr = mmap((void *)lo, hi, PROT_READ|PROT_WRITE|PROT_EXEC, mflags, 0, 0);
addr = mmap((void *)lo, hi, PROT_NONE, mflags, -1, 0);
*p_brk = hi + addr; // the logical value of brk(0)
munmap(szlo + addr, hi - szlo); // desirable if PT_LOAD non-contiguous
//mprotect(szlo + addr, hi - szlo, PROT_NONE); // no access, but keep the frames!
return (unsigned long)addr - lo;
}
@@ -260,18 +260,24 @@ do_xmap(
mlen += frag;
addr -= frag;
if (addr != mmap(addr, mlen, PROT_READ | PROT_WRITE,
if (addr != mmap(addr, mlen, prot | (xi ? PROT_WRITE : 0),
MAP_FIXED | MAP_PRIVATE | (xi ? MAP_ANONYMOUS : 0),
fdi, phdr->p_offset - frag) ) {
(xi ? -1 : fdi), phdr->p_offset - frag) ) {
err_exit(8);
}
if (xi) {
unpackExtent(xi, &xo, f_decompress, f_unf);
}
bzero(addr, frag); // fragment at lo end
// Linux does not fixup the low end, so neither do we.
//if (PROT_WRITE & prot) {
// bzero(addr, frag); // fragment at lo end
//}
frag = (-mlen) &~ PAGE_MASK; // distance to next page boundary
if (PROT_WRITE & prot) { // note: read-only .bss not supported here
bzero(mlen+addr, frag); // fragment at hi end
if (xi && 0==phdr->p_offset) {
}
if (xi) {
if (0==phdr->p_offset) {
Elf64_Ehdr *const ehdr = (Elf64_Ehdr *)addr;
*(int *)&ehdr->e_ident[12] = 0x90c3050f; // syscall; ret; nop
}
@@ -279,10 +285,11 @@ do_xmap(
err_exit(10);
ERR_LAB
}
}
addr += mlen + frag; /* page boundary on hi end */
if (addr < haddr) { // need pages for .bss
if (addr != mmap(addr, haddr - addr, prot,
MAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS, 0, 0 ) ) {
MAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS, -1, 0 ) ) {
err_exit(9);
}
}
+1 -1
View File
@@ -29,7 +29,7 @@
<jreiser@users.sourceforge.net>
*/
ALIGN(1<<3)
.p2align 3
lit_n2b:
incq %rsi; movb %dl,(%rdi)
incq %rdi
+1 -1
View File
@@ -29,7 +29,7 @@
<jreiser@users.sourceforge.net>
*/
ALIGN(1<<3)
.p2align 3
lit_n2e:
incq %rsi; movb %dl,(%rdi)
incq %rdi
+68 -85
View File
@@ -1,4 +1,4 @@
/* fold_elf64amd.h -- created from fold_elf64amd.bin, 1964 (0x7ac) bytes
/* fold_elf64amd.h -- created from fold_elf64amd.bin, 1696 (0x6a0) bytes
This file is part of the UPX executable compressor.
@@ -27,22 +27,22 @@
*/
#define LINUX_ELF64AMD_FOLD_SIZE 1964
#define LINUX_ELF64AMD_FOLD_ADLER32 0xbcebb18a
#define LINUX_ELF64AMD_FOLD_CRC32 0x2dba754c
#define LINUX_ELF64AMD_FOLD_SIZE 1696
#define LINUX_ELF64AMD_FOLD_ADLER32 0x8e868b92
#define LINUX_ELF64AMD_FOLD_CRC32 0xfc2cafa4
unsigned char linux_elf64amd_fold[1964] = {
unsigned char linux_elf64amd_fold[1696] = {
127, 69, 76, 70, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 0 */
2, 0, 62, 0, 1, 0, 0, 0,188, 0, 16, 0, 0, 0, 0, 0, /* 0x 10 */
64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 20 */
0, 0, 0, 0, 64, 0, 56, 0, 2, 0, 0, 0, 0, 0, 0, 0, /* 0x 30 */
1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 40 */
0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, /* 0x 50 */
172, 6, 0, 0, 0, 0, 0, 0,172, 6, 0, 0, 0, 0, 0, 0, /* 0x 60 */
160, 6, 0, 0, 0, 0, 0, 0,160, 6, 0, 0, 0, 0, 0, 0, /* 0x 60 */
0, 0, 16, 0, 0, 0, 0, 0, 1, 0, 0, 0, 6, 0, 0, 0, /* 0x 70 */
172, 6, 0, 0, 0, 0, 0, 0,172, 6, 16, 0, 0, 0, 0, 0, /* 0x 80 */
172, 6, 16, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, /* 0x 90 */
4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, /* 0x a0 */
160, 6, 0, 0, 0, 0, 0, 0,160, 6, 16, 0, 0, 0, 0, 0, /* 0x 80 */
160, 6, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 90 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, /* 0x a0 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232, 80, 0, 0, /* 0x b0 */
0,131,249, 73,117, 74, 72,137,241, 72,137,254,235, 44,138, 7, /* 0x c0 */
72,131,199, 1, 60,128,114, 10, 60,143,119, 6,128,127,254, 15, /* 0x d0 */
@@ -51,7 +51,7 @@ unsigned char linux_elf64amd_fold[1964] = {
72,131,199, 1, 72,255,201,117,217,235, 5, 72,255,201,117,190, /* 0x 100 */
195, 72,141,116, 36, 56, 72,173, 72,133,192,117,249, 72,173, 72, /* 0x 110 */
133,192,117,249, 65, 89, 72,137,241, 94, 95, 72,129,236, 0, 8, /* 0x 120 */
0, 0, 72,137,226, 73,137,232,232, 77, 4, 0, 0, 72,129,196, /* 0x 130 */
0, 0, 72,137,226, 73,137,232,232, 65, 4, 0, 0, 72,129,196, /* 0x 130 */
0, 8, 0, 0, 94, 95, 89, 80,106, 11, 88,255,225,176, 11,235, /* 0x 140 */
13,176, 10,235, 9,176, 12,235, 5,176, 9, 73,137,202, 15,182, /* 0x 150 */
192, 15, 5, 72, 61, 0,240,255,255,114, 4, 72,131,200,255,195, /* 0x 160 */
@@ -80,79 +80,62 @@ unsigned char linux_elf64amd_fold[1964] = {
57,200,116, 17, 72,255,200, 15,148,194, 49,192,133,246, 15,149, /* 0x 2d0 */
192,133,194,116, 8, 72,137, 15, 76,137, 71, 8,195, 72,131,199, /* 0x 2e0 */
16,235,215,195, 65, 87,184, 0, 0, 0, 0, 73,137,255, 65, 86, /* 0x 2f0 */
73,137,254, 65, 85, 65, 84, 85, 83, 72,131,236, 88, 76, 3,119, /* 0x 300 */
32,102,131,127, 16, 3, 72,137,116, 36, 48, 15,183,119, 56, 72, /* 0x 310 */
137, 76, 36, 32,185, 16, 0, 0, 0,137, 84, 36, 44, 76,137, 68, /* 0x 320 */
36, 24, 76,137, 76, 36, 16, 15, 68,200, 76,137,242, 73,131,205, /* 0x 330 */
255, 49,237, 69, 49,228,131,193, 34,255,206,120, 38,131, 58, 1, /* 0x 340 */
117, 27, 72,139, 66, 16, 76, 57,232,115, 7, 76,139, 98, 32, 73, /* 0x 350 */
137,197, 72, 3, 66, 40, 72, 57,197, 72, 15, 66,232, 72,131,194, /* 0x 360 */
56,235,214, 76,137,232, 73,129,229, 0,240,255,255, 69, 49,201, /* 0x 370 */
76, 41,237, 37,255, 15, 0, 0, 69, 49,192, 72,129,197,255, 15, /* 0x 380 */
0, 0, 77,141,164, 4,255, 15, 0, 0,186, 7, 0, 0, 0, 72, /* 0x 390 */
129,229, 0,240,255,255, 76,137,239, 72,137,238, 73,129,228, 0, /* 0x 3a0 */
240,255,255,232,161,253,255,255, 72,137,195, 72,141, 4, 40, 76, /* 0x 3b0 */
41,229, 74,141, 60, 35, 72,137,238, 76, 41,235, 72,137, 68, 36, /* 0x 3c0 */
56,232,119,253,255,255,102, 65,131,127, 56, 0, 72,137, 92, 36, /* 0x 3d0 */
8,199, 68, 36, 4, 0, 0, 0, 0, 15,132,100, 1, 0, 0, 72, /* 0x 3e0 */
131,124, 36, 48, 0,116, 35, 65,131, 62, 6,117, 29, 72,139, 84, /* 0x 3f0 */
36, 8, 73, 3, 86, 16,190, 3, 0, 0, 0, 72,139,124, 36, 32, /* 0x 400 */
232,173,254,255,255,233, 34, 1, 0, 0, 65,131, 62, 1, 15,133, /* 0x 410 */
24, 1, 0, 0, 72,139,124, 36, 8, 73, 3,126, 16,186, 3, 0, /* 0x 420 */
0, 0, 65,139, 78, 4,199, 4, 36, 64, 98, 81,115, 73,139, 70, /* 0x 430 */
32, 77,139, 78, 8, 68,139, 68, 36, 44,131,225, 7, 72,137,253, /* 0x 440 */
72,137,251,129,229,255, 15, 0, 0,193,225, 2,211, 44, 36, 72, /* 0x 450 */
41,235,131, 36, 36, 7, 73,137,253, 77, 3,110, 40, 72,131,124, /* 0x 460 */
36, 48, 1, 76,141, 36, 40, 72,137,124, 36, 72, 72,137,223, 76, /* 0x 470 */
137,230, 72,137, 68, 36, 64, 25,201, 73, 41,233,131,225,224,131, /* 0x 480 */
193, 50,232,194,252,255,255, 72, 57,195,117,105, 72,131,124, 36, /* 0x 490 */
48, 0,116, 25, 72,139, 76, 36, 16, 72,139, 84, 36, 24, 72,141, /* 0x 4a0 */
116, 36, 64, 72,139,124, 36, 48,232,251,252,255,255, 72,137,233, /* 0x 4b0 */
76,137,229, 49,192, 72,247,221, 72,137,223,252,129,229,255, 15, /* 0x 4c0 */
0, 0, 72,131,124, 36, 48, 0,243,170, 74,141, 60, 35, 72,137, /* 0x 4d0 */
233,243,170,116, 14, 73,131,126, 8, 0,117, 7,199, 67, 12, 15, /* 0x 4e0 */
5,195,144,139, 20, 36, 76,137,230, 72,137,223,232, 80,252,255, /* 0x 4f0 */
255,133,192,116, 10,191,127, 0, 0, 0,232,109,252,255,255, 73, /* 0x 500 */
141, 4, 44, 72, 1,195, 76, 57,235,115, 33,139, 20, 36, 73, 41, /* 0x 510 */
221, 69, 49,201, 69, 49,192,185, 50, 0, 0, 0, 76,137,238, 72, /* 0x 520 */
137,223,232, 34,252,255,255, 72, 57,195,117,201,255, 68, 36, 4, /* 0x 530 */
65, 15,183, 71, 56, 73,131,198, 56, 57, 68, 36, 4, 15,140,156, /* 0x 540 */
254,255,255, 72,131,124, 36, 48, 0,116, 18,102, 65,131,127, 16, /* 0x 550 */
3,116, 10, 72,139,124, 36, 56,232,232,251,255,255, 73,139, 71, /* 0x 560 */
24, 72, 1, 68, 36, 8, 72,139, 68, 36, 8, 72,131,196, 88, 91, /* 0x 570 */
93, 65, 92, 65, 93, 65, 94, 65, 95,195, 65, 86, 76,141,114, 64, /* 0x 580 */
65, 85, 77,137,205, 65, 84, 77,137,196, 85, 72,137,213, 83, 72, /* 0x 590 */
137,203, 49,201, 72,131,236, 48,139, 7, 72,137, 52, 36, 72,137, /* 0x 5a0 */
116, 36, 16, 72,141,116, 36, 32, 72,137, 84, 36, 40, 72,137,124, /* 0x 5b0 */
36, 8, 76,137,194, 72,137,124, 36, 24, 72,137,231, 72,137, 68, /* 0x 5c0 */
36, 32,232,225,251,255,255, 73,139, 86, 16,190, 3, 0, 0, 0, /* 0x 5d0 */
72,137,223, 72,131,194, 64,232,214,252,255,255, 72, 15,183, 85, /* 0x 5e0 */
56,190, 5, 0, 0, 0, 72,137,223,232,196,252,255,255, 72,139, /* 0x 5f0 */
85, 24,190, 9, 0, 0, 0, 72,137,223,232,179,252,255,255, 72, /* 0x 600 */
141,116, 36, 16, 77,137,233, 77,137,224, 49,210, 72,137,217, 72, /* 0x 610 */
137,239,232,205,252,255,255, 69, 49,237,102,131,125, 56, 0, 73, /* 0x 620 */
137,196,116,104, 65,131, 62, 3,117, 82, 73,139,126, 16, 49,210, /* 0x 630 */
49,246,232, 45,251,255,255,133,192,137,195,120, 23,186, 0, 4, /* 0x 640 */
0, 0, 72,137,238,137,199,232, 20,251,255,255, 72, 61, 0, 4, /* 0x 650 */
0, 0,116, 10,191,127, 0, 0, 0,232, 14,251,255,255, 72,137, /* 0x 660 */
239, 69, 49,201, 69, 49,192, 49,201,137,218, 49,246,232,114,252, /* 0x 670 */
255,255,137,223, 73,137,196,232,236,250,255,255, 15,183, 69, 56, /* 0x 680 */
65,255,197, 73,131,198, 56, 65, 57,197,124,152, 72,131,196, 48, /* 0x 690 */
76,137,224, 91, 93, 65, 92, 65, 93, 65, 94,195, 0, 0, 0, 0, /* 0x 6a0 */
20, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1,120, 16, 12, 7, 8, /* 0x 6b0 */
144, 1, 0, 0, 0, 0, 0, 0, 36, 0, 0, 0, 28, 0, 0, 0, /* 0x 6c0 */
128, 1, 16, 0, 0, 0, 0, 0, 56, 0, 0, 0, 0, 0, 0, 0, /* 0x 6d0 */
65, 14, 16, 46, 8, 87, 14, 8, 46, 0, 95, 14, 0, 0, 0, 0, /* 0x 6e0 */
44, 0, 0, 0, 68, 0, 0, 0,184, 1, 16, 0, 0, 0, 0, 0, /* 0x 6f0 */
10, 1, 0, 0, 0, 0, 0, 0, 66, 14, 16,141, 2, 69, 14, 24, /* 0x 700 */
140, 3, 68, 14, 32,134, 4, 68, 14, 40,131, 5, 71, 14, 80, 0, /* 0x 710 */
20, 0, 0, 0,116, 0, 0, 0,194, 2, 16, 0, 0, 0, 0, 0, /* 0x 720 */
50, 0, 0, 0, 0, 0, 0, 0, 60, 0, 0, 0,140, 0, 0, 0, /* 0x 730 */
244, 2, 16, 0, 0, 0, 0, 0,150, 2, 0, 0, 0, 0, 0, 0, /* 0x 740 */
66, 14, 16,143, 2, 74, 14, 24,142, 3, 69, 14, 32, 66, 14, 40, /* 0x 750 */
65, 14, 48, 65, 14, 56, 68, 14,144, 1,131, 7,134, 6,140, 5, /* 0x 760 */
141, 4, 0, 0, 0, 0, 0, 0, 52, 0, 0, 0,204, 0, 0, 0, /* 0x 770 */
138, 5, 16, 0, 0, 0, 0, 0, 34, 1, 0, 0, 0, 0, 0, 0, /* 0x 780 */
66, 14, 16,142, 2, 70, 14, 24,141, 3, 69, 14, 32,140, 4, 68, /* 0x 790 */
14, 40,134, 5, 68, 14, 48,131, 6, 73, 14, 96 /* 0x 7a0 */
65, 85, 65, 84, 73,137,252, 85, 83, 72,131,236,104, 76, 3,103, /* 0x 300 */
32,102,131,127, 16, 3,137, 84, 36, 60, 15,183, 87, 56, 72,137, /* 0x 310 */
76, 36, 48,185, 16, 0, 0, 0, 72,137,116, 36, 64, 76,137, 68, /* 0x 320 */
36, 40, 76,137, 76, 36, 32, 15, 68,200, 76,137,230, 72,131,205, /* 0x 330 */
255, 49,219,131,193, 34,255,202,120, 33,131, 62, 1,117, 22, 72, /* 0x 340 */
139, 70, 16, 72, 57,232, 72, 15, 66,232, 72, 3, 70, 40, 72, 57, /* 0x 350 */
195, 72, 15, 66,216, 72,131,198, 56,235,219, 72,129,229, 0,240, /* 0x 360 */
255,255, 49,210, 69, 49,201, 72, 41,235, 65,131,200,255, 72,137, /* 0x 370 */
239, 72,129,195,255, 15, 0, 0, 72,129,227, 0,240,255,255, 72, /* 0x 380 */
137,222,232,194,253,255,255, 72,141, 20, 24, 72, 41,232,102, 65, /* 0x 390 */
131,127, 56, 0, 72,137, 68, 36, 24,199, 68, 36, 20, 0, 0, 0, /* 0x 3a0 */
0, 72,137, 84, 36, 72, 15,132,139, 1, 0, 0, 72,131,124, 36, /* 0x 3b0 */
64, 0,116, 37, 65,131, 60, 36, 6,117, 30, 72,139, 84, 36, 24, /* 0x 3c0 */
73, 3, 84, 36, 16,190, 3, 0, 0, 0, 72,139,124, 36, 48,232, /* 0x 3d0 */
222,254,255,255,233, 71, 1, 0, 0, 65,131, 60, 36, 1, 15,133, /* 0x 3e0 */
60, 1, 0, 0, 72,139, 68, 36, 24, 73, 3, 68, 36, 16, 65,190, /* 0x 3f0 */
64, 98, 81,115, 65,139, 76, 36, 4, 65,131,200,255, 73,139, 84, /* 0x 400 */
36, 32, 72,137,197, 72,137, 68, 36, 88, 73,139, 68, 36, 40,131, /* 0x 410 */
225, 7, 72,137,235, 72,137, 84, 36, 80,193,225, 2,129,227,255, /* 0x 420 */
15, 0, 0, 72, 1,232, 65,211,238, 72, 41,221, 72,137, 68, 36, /* 0x 430 */
8, 73,139, 68, 36, 8, 65,131,230, 7, 76,141, 44, 26,185, 50, /* 0x 440 */
0, 0, 0, 72, 41,216, 72,131,124, 36, 64, 0,117, 7, 68,139, /* 0x 450 */
68, 36, 60,177, 18, 68,137,242, 73,137,193, 76,137,238,131,202, /* 0x 460 */
2, 72,131,124, 36, 64, 0, 72,137,239, 65, 15, 68,214,232,214, /* 0x 470 */
252,255,255, 72, 57,197,117,105, 72,131,124, 36, 64, 0,116, 25, /* 0x 480 */
72,139, 76, 36, 32, 72,139, 84, 36, 40, 72,141,116, 36, 80, 72, /* 0x 490 */
139,124, 36, 64,232, 15,253,255,255, 76,137,235, 72,247,219,129, /* 0x 4a0 */
227,255, 15, 0, 0, 65,246,198, 2,116, 13, 74,141,124, 45, 0, /* 0x 4b0 */
49,192, 72,137,217,252,243,170, 72,131,124, 36, 64, 0,116, 43, /* 0x 4c0 */
73,131,124, 36, 8, 0,117, 7,199, 69, 12, 15, 5,195,144, 68, /* 0x 4d0 */
137,242, 76,137,238, 72,137,239,232,100,252,255,255,133,192,116, /* 0x 4e0 */
10,191,127, 0, 0, 0,232,129,252,255,255, 73,141, 68, 29, 0, /* 0x 4f0 */
72, 1,197, 72, 59,108, 36, 8,115, 38, 72, 41,108, 36, 8, 69, /* 0x 500 */
49,201, 65,131,200,255, 72,139,116, 36, 8,185, 50, 0, 0, 0, /* 0x 510 */
68,137,242, 72,137,239,232, 46,252,255,255, 72, 57,197,117,193, /* 0x 520 */
255, 68, 36, 20, 65, 15,183, 71, 56, 73,131,196, 56, 57, 68, 36, /* 0x 530 */
20, 15,140,117,254,255,255, 72,131,124, 36, 64, 0,116, 18,102, /* 0x 540 */
65,131,127, 16, 3,116, 10, 72,139,124, 36, 72,232,244,251,255, /* 0x 550 */
255, 73,139, 71, 24, 72, 1, 68, 36, 24, 72,139, 68, 36, 24, 72, /* 0x 560 */
131,196,104, 91, 93, 65, 92, 65, 93, 65, 94, 65, 95,195, 65, 86, /* 0x 570 */
76,141,114, 64, 65, 85, 77,137,205, 65, 84, 77,137,196, 85, 72, /* 0x 580 */
137,213, 83, 72,137,203, 49,201, 72,131,236, 48,139, 7, 72,137, /* 0x 590 */
52, 36, 72,137,116, 36, 16, 72,141,116, 36, 32, 72,137, 84, 36, /* 0x 5a0 */
40, 72,137,124, 36, 8, 76,137,194, 72,137,124, 36, 24, 72,137, /* 0x 5b0 */
231, 72,137, 68, 36, 32,232,237,251,255,255, 73,139, 86, 16,190, /* 0x 5c0 */
3, 0, 0, 0, 72,137,223, 72,131,194, 64,232,226,252,255,255, /* 0x 5d0 */
72, 15,183, 85, 56,190, 5, 0, 0, 0, 72,137,223,232,208,252, /* 0x 5e0 */
255,255, 72,139, 85, 24,190, 9, 0, 0, 0, 72,137,223,232,191, /* 0x 5f0 */
252,255,255, 72,141,116, 36, 16, 77,137,233, 77,137,224, 49,210, /* 0x 600 */
72,137,217, 72,137,239,232,217,252,255,255, 69, 49,237,102,131, /* 0x 610 */
125, 56, 0, 73,137,196,116,104, 65,131, 62, 3,117, 82, 73,139, /* 0x 620 */
126, 16, 49,210, 49,246,232, 57,251,255,255,133,192,137,195,120, /* 0x 630 */
23,186, 0, 4, 0, 0, 72,137,238,137,199,232, 32,251,255,255, /* 0x 640 */
72, 61, 0, 4, 0, 0,116, 10,191,127, 0, 0, 0,232, 26,251, /* 0x 650 */
255,255, 72,137,239, 69, 49,201, 69, 49,192, 49,201,137,218, 49, /* 0x 660 */
246,232,126,252,255,255,137,223, 73,137,196,232,248,250,255,255, /* 0x 670 */
15,183, 69, 56, 65,255,197, 73,131,198, 56, 65, 57,197,124,152, /* 0x 680 */
72,131,196, 48, 76,137,224, 91, 93, 65, 92, 65, 93, 65, 94,195 /* 0x 690 */
};
+20 -33
View File
@@ -97,32 +97,36 @@ L50:
%define MAX_ELF_HDR 512
sub esp, dword MAX_ELF_HDR + OVERHEAD ; alloca
mov edx, esp ; %edx= &tmp
push ebx ; save &Elf32_Ehdr of this stub
xor ecx, ecx ; 0
push ecx ; assume not ET_DYN
lea eax, [szElf32_Ehdr + 2*szElf32_Phdr + szl_info + szp_info + ebx] ; 1st &b_info
mov esi, [e_entry + ebx] ; beyond compressed data
push ebx ; start of unmap region (&Elf32_Ehdr of this stub)
; Cannot pre-round .p_memsz because kernel requires PF_W to setup .bss,
; but strict SELinux (or PaX, grsecurity) prohibits PF_W with PF_X.
mov edx, [p_memsz + szElf32_Ehdr + ebx] ; phdr[0].p_memsz
lea edx, [-1 + 2*PAGE_SIZE + edx + ebx] ; 1 page for round, 1 for unfold
and edx, -PAGE_SIZE
push edx ; end of unmap region
sub eax, eax ; 0
cmp word [e_type + ebx], byte ET_DYN
jne L53
pop ecx ; is ET_DYN: discard false assumption
add esi, ebx ; relocate e_entry
mov ch, PAGE_SIZE>>8 ; %ecx= PAGE_SIZE
add ebx, [p_memsz + szElf32_Ehdr + ebx]
add ebx, ecx
push ebx ; dynbase
xchg eax, edx ; dynbase for ET_DYN; assumes mmap(0, ...) is placed after us!
L53:
push eax ; dynbase
mov esi, [e_entry + ebx] ; end of compressed data
lea eax, [szElf32_Ehdr + 2*szElf32_Phdr + szl_info + szp_info + ebx] ; 1st &b_info
sub esi, eax ; length of compressed data
mov ebx, [ eax] ; length of uncompressed ELF headers
mov ecx, [4+ eax] ; length of compressed ELF headers
add ecx, byte szb_info
lea edx, [3*4 + esp] ; &tmp
pusha ; (AT_table, sz_cpr, f_expand, &tmp_ehdr, {sz_unc, &tmp}, {sz_cpr, &b1st_info} )
inc edi ; swap with above 'pusha' to inhibit auxv_up for PT_INTERP
EXTERN upx_main
call upx_main ; returns entry address
add esp, byte 8*4 ; remove 8 params from pusha
pop ecx ; dynbase
pop ebx ; &Elf32_Ehdr of this stub
add esp, byte (8 +1)*4 ; remove 8 params from pusha, also dynbase
pop ecx ; end of unmap region
pop ebx ; start of unmap region (&Elf32_Ehdr of this stub)
add esp, dword MAX_ELF_HDR + OVERHEAD ; un-alloca
push eax ; save entry address
@@ -135,23 +139,6 @@ L60:
jne L60 ; not AT_NULL
; edi now points at [AT_NULL]a_un.a_ptr which contains result of make_hatch()
; _dl_start and company (ld-linux.so.2) once assumed that it had virgin stack,
; and did not initialize all its stack local variables to zero.
; See bug libc/1165 at http://bugs.gnu.org/cgi-bin/gnatsweb.pl
; Found 1999-06-16 glibc-2.1.1
; Fixed 1999-12-29 glibc-2.1.2
;
;%define N_STKCLR (0x100 + MAX_ELF_HDR + OVERHEAD)/4
;%define N_STKCLR 8
; lea edi, [esp - 4*N_STKCLR]
; pusha ; values will be zeroed
; mov esi,esp ; save
; mov esp,edi ; Linux does not grow stack below esp
; mov ecx, N_STKCLR
; ; xor eax,eax ; eax already 0 from L60
; rep stosd
; mov esp,esi ; restore
push eax
push eax
push eax
@@ -159,7 +146,7 @@ L60:
push eax
push eax
push eax
push eax ; 32 bytes of zeroes now on stack
push eax ; 32 bytes of zeroes now on stack, ready for 'popa'
sub ecx, ebx ; length to unmap
mov al, __NR_munmap ; eax was 0 from L60
+102 -105
View File
@@ -1,4 +1,4 @@
/* fold_elf86.h -- created from fold_elf86.bin, 1651 (0x673) bytes
/* fold_elf86.h -- created from fold_elf86.bin, 1607 (0x647) bytes
This file is part of the UPX executable compressor.
@@ -27,113 +27,110 @@
*/
#define LINUX_I386ELF_FOLD_SIZE 1651
#define LINUX_I386ELF_FOLD_ADLER32 0x3a4ad069
#define LINUX_I386ELF_FOLD_CRC32 0xd4e0324c
#define LINUX_I386ELF_FOLD_SIZE 1607
#define LINUX_I386ELF_FOLD_ADLER32 0xdf50b4ab
#define LINUX_I386ELF_FOLD_CRC32 0x537b9a31
unsigned char linux_i386elf_fold[1651] = {
unsigned char linux_i386elf_fold[1607] = {
127, 69, 76, 70, 1, 1, 1, 0, 76,105,110,117,120, 0, 0, 0, /* 0x 0 */
2, 0, 3, 0, 1, 0, 0, 0,128, 0,192, 0, 52, 0, 0, 0, /* 0x 10 */
2, 0, 3, 0, 1, 0, 0, 0,128, 16,192, 0, 52, 0, 0, 0, /* 0x 10 */
0, 0, 0, 0, 0, 0, 0, 0, 52, 0, 32, 0, 2, 0, 0, 0, /* 0x 20 */
0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 0, /* 0x 30 */
0, 0,192, 0,115, 6, 0, 0,116, 6, 0, 0, 5, 0, 0, 0, /* 0x 40 */
0, 16, 0, 0, 1, 0, 0, 0,115, 6, 0, 0,116, 6,192, 0, /* 0x 50 */
116, 6,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, /* 0x 60 */
0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 16,192, 0, /* 0x 30 */
0, 16,192, 0, 71, 6, 0, 0, 72, 6, 0, 0, 5, 0, 0, 0, /* 0x 40 */
0, 16, 0, 0, 1, 0, 0, 0, 71, 6, 0, 0, 72, 22,192, 0, /* 0x 50 */
72, 22,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, /* 0x 60 */
0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 70 */
41,201,186,120, 2, 0, 0,137,230,137,231,232,112, 0, 0, 0, /* 0x 80 */
41,201,186,120, 2, 0, 0,137,230,137,231,232,121, 0, 0, 0, /* 0x 80 */
137,230,209,234, 25,192, 41,193,141, 36,196,133,210,117,243,137, /* 0x 90 */
231,232, 90, 0, 0, 0,129,236, 0, 10, 0, 0,137,226, 83, 49, /* 0x a0 */
201, 81,141,131,140, 0, 0, 0,139,115, 24,102,131,123, 16, 3, /* 0x b0 */
117, 11, 89, 1,222,181, 16, 3, 91, 72, 1,203, 83, 41,198,139, /* 0x c0 */
24,139, 72, 4,131,193, 12, 96, 71,232,144, 4, 0, 0,131,196, /* 0x d0 */
32, 89, 91,129,196, 0, 10, 0, 0, 80, 79, 41,192, 60,175,175, /* 0x e0 */
117,252, 80, 80, 80, 80, 80, 80, 80, 80, 41,217,176, 91,255, 39, /* 0x f0 */
173,171,133,192,117,250,173,171,133,192,117,250, 87,173,171,131, /* 0x 100 */
248, 32,115, 3, 15,179,194,133,192,173,171,117,240,131,239, 8, /* 0x 110 */
1,201, 64,243,171, 72,171,171, 95,195, 83,141, 92, 36, 8,106, /* 0x 120 */
90, 88,205,128, 91,195, 0, 0, 87, 86,137,206, 83,137,195, 57, /* 0x 130 */
8,139,120, 4,115, 10,106,127, 91,106, 1, 88,205,128,235,254, /* 0x 140 */
133,201,116, 8,138, 7, 71,136, 2, 66,226,248, 1,115, 4, 41, /* 0x 150 */
51, 91, 94, 95,195, 85,137,229, 87, 86,137,198, 83,137,211,131, /* 0x 160 */
236, 24,139, 69, 8,139,125, 12,137, 69,220,131, 58, 0, 15,132, /* 0x 170 */
184, 0, 0, 0,141, 85,228,185, 12, 0, 0, 0,137,240,232,165, /* 0x 180 */
255,255,255,139, 69,228,139, 77,232,133,192,117, 19,129,249, 85, /* 0x 190 */
80, 88, 33,117, 15,131, 62, 0, 15,132,142, 0, 0, 0,235, 4, /* 0x 1a0 */
133,201,117, 10,106,127, 91,106, 1, 88,205,128,235,254, 57,193, /* 0x 1b0 */
119,242, 59, 3,119,238, 57,193,115, 85, 15,182, 69,236, 80,141, /* 0x 1c0 */
69,224, 80,255,115, 4, 81,255,118, 4,255, 85,220,131,196, 20, /* 0x 1d0 */
133,192,117,208,139, 85,224, 59, 85,228,117,200,138, 69,237,132, /* 0x 1e0 */
192,116, 34,133,255,116, 30,129,250, 0, 2, 0, 0,119, 4, 57, /* 0x 1f0 */
19,117, 18, 15,182,192, 80, 15,182, 69,238, 80, 82,255,115, 4, /* 0x 200 */
255,215,131,196, 16,139, 69,232, 1, 70, 4, 41, 6,235, 10,139, /* 0x 210 */
83, 4,137,240,232, 15,255,255,255,139, 85,228,139, 3, 1, 83, /* 0x 220 */
4, 41,208,133,192,137, 3,233, 66,255,255,255,141,101,244, 91, /* 0x 230 */
94, 95,201,195,133,210,137,209,116, 6,198, 0, 0, 64,226,250, /* 0x 240 */
195,133,192, 83,137,211,116, 29,168, 1,117, 25,139, 16, 57,218, /* 0x 250 */
116, 7, 74,117, 11,133,219,116, 7,137, 24,137, 72, 4,235, 5, /* 0x 260 */
131,192, 8,235,231, 91,195, 85,137,229, 87, 86, 83,131,236, 72, /* 0x 270 */
137, 85,224,139, 77,224,137, 69,228,139, 93,224,199, 69,204, 0, /* 0x 280 */
0, 0, 0, 3, 73, 28,139, 69, 8,139, 85, 12,137, 69,220, 49, /* 0x 290 */
192,102,131,123, 16, 2,137, 85,216,137, 77,212,137,202, 15,183, /* 0x 2a0 */
75, 44, 15,148,192,131,206,255,193,224, 4,137,207,131,192, 34, /* 0x 2b0 */
49,219, 79,137, 69,184,120, 34,131, 58, 1,117, 24,139, 66, 8, /* 0x 2c0 */
57,240,115, 8,139,122, 16,137,198,137,125,204, 3, 66, 20, 57, /* 0x 2d0 */
195,115, 2,137,195,131,194, 32,226,222,137,247,106, 0,129,231, /* 0x 2e0 */
0,240,255,255,106, 0, 41,251,255,117,184,129,195,255, 15, 0, /* 0x 2f0 */
0,106, 7,129,227, 0,240,255,255,139, 85,204, 83,137,240, 37, /* 0x 300 */
255, 15, 0, 0, 87,137, 93,172,141,180, 2,255, 15, 0, 0,232, /* 0x 310 */
6,254,255,255,137,194,131,196, 24, 1,218,129,230, 0,240,255, /* 0x 320 */
255,137, 85,240,137,194, 41,243, 1,242,137,217,137, 69,176,137, /* 0x 330 */
211,106, 91, 88,205,128,139, 69,176,199, 69,196, 0, 0, 0, 0, /* 0x 340 */
139, 85,224, 41,248,102,131,122, 44, 0,137, 69,208, 15,132,195, /* 0x 350 */
1, 0, 0,139, 77,212,139, 1,131,248, 6,117, 27,139, 93,212, /* 0x 360 */
186, 3, 0, 0, 0,139, 77,208, 3, 75, 8,139, 69,216,232,206, /* 0x 370 */
254,255,255,233,135, 1, 0, 0, 72, 15,133,128, 1, 0, 0,139, /* 0x 380 */
125,212,199, 69,192, 64, 98, 81,115,139, 69,208,139, 79, 24, 3, /* 0x 390 */
71, 8,131,225, 7,139, 87, 16,193,225, 2,211,109,192,137,195, /* 0x 3a0 */
139, 79, 20,137,199,129,231,255, 15, 0, 0,137, 85,232,141, 52, /* 0x 3b0 */
58,139, 85,212, 1,193,137, 69,236,139, 66, 4, 41,251,131,101, /* 0x 3c0 */
192, 7, 41,248,131,125,220, 1, 80,255,117,228, 25,192,137, 77, /* 0x 3d0 */
188,131,224,224,131,192, 50,131,125,220, 0, 80,137,240,106, 3, /* 0x 3e0 */
116, 3,141, 70, 3, 80, 83,232, 46,253,255,255,131,196, 24, 57, /* 0x 3f0 */
195, 15,133,186, 0, 0, 0,131,125,220, 0,116, 34,139, 77,212, /* 0x 400 */
49,192,246, 65, 24, 1,116, 6,139, 69,228,131,192, 2, 80,139, /* 0x 410 */
69,220,255,117,228,141, 85,232,232, 56,253,255,255, 88, 90,137, /* 0x 420 */
250,137,247,137,216,247,223,232, 8,254,255,255,129,231,255, 15, /* 0x 430 */
0, 0,141, 4, 51,137,250,137,125,180,232,245,253,255,255,131, /* 0x 440 */
125,220, 0,116, 94,139, 69,212,131, 56, 1,117, 86,246, 64, 24, /* 0x 450 */
1,116, 80,139, 80, 20,139,120, 8,141, 12, 58, 3, 77,208, 59, /* 0x 460 */
80, 16,117, 14,137,200,247,216, 37,255, 15, 0, 0,131,248, 3, /* 0x 470 */
119, 17,139, 85,212,107, 69,208, 52,131,122, 4, 0,141, 76, 7, /* 0x 480 */
12,117, 15,139, 1, 61,205,128, 97,195,116, 6,199, 1,205,128, /* 0x 490 */
97,195,133,201,116, 13,139, 69,216, 49,210,131,224,254,232,158, /* 0x 4a0 */
253,255,255,137,241,139, 85,192,106,125, 88,205,128,133,192,116, /* 0x 4b0 */
10,106,127, 91,106, 1, 88,205,128,235,254,139,125,180,141, 4, /* 0x 4c0 */
62, 1,195, 59, 93,188,115, 30,106, 0,106, 0,106, 50,255,117, /* 0x 4d0 */
192, 41, 93,188,255,117,188, 83,232, 61,252,255,255,131,196, 24, /* 0x 4e0 */
57,195,116, 27,235,203,131,125,220, 0,116, 19,141, 78, 3,129, /* 0x 4f0 */
225,255, 15, 0, 0,131,249, 3,119, 5,106, 91, 88,205,128,139, /* 0x 500 */
85,224,255, 69,196, 15,183, 66, 44,131, 69,212, 32, 57, 69,196, /* 0x 510 */
15,140, 61,254,255,255,131,125,220, 0,117, 14,139, 93,228,106, /* 0x 520 */
6, 88,205,128,133,192,116, 20,235,135,139,125,224,102,131,127, /* 0x 530 */
16, 3,116, 8,139, 93,240,106, 45, 88,205,128,131,125, 16, 0, /* 0x 540 */
116, 8,139, 85,208,139, 69, 16,137, 16,139, 77,224,139, 73, 24, /* 0x 550 */
1, 77,208,139, 69,208,141,101,244, 91, 94, 95,201,195, 85,137, /* 0x 560 */
229, 87, 86, 83,131,236, 12,139,125, 28,106, 0,139, 69, 16,141, /* 0x 570 */
87, 52,139,117, 8, 80,139, 93, 32,137, 69,236,137, 85,232,141, /* 0x 580 */
69, 32,141, 85, 24,232,203,251,255,255,139, 69, 12, 15,183, 79, /* 0x 590 */
44,186, 5, 0, 0, 0,137, 69, 32,137,240, 41, 93, 36,232,158, /* 0x 5a0 */
252,255,255, 15,183, 79, 42,186, 4, 0, 0, 0,137,240,232,142, /* 0x 5b0 */
252,255,255,139, 93,232,139, 77, 40,186, 3, 0, 0, 0, 3, 75, /* 0x 5c0 */
8,137,240,131,193, 52,232,118,252,255,255,141, 69,240,137,250, /* 0x 5d0 */
80,141, 69, 32, 86, 80,139, 69,236,232,137,252,255,255,186, 9, /* 0x 5e0 */
0, 0, 0,137,193,137,195,137,240,232, 83,252,255,255,102,139, /* 0x 5f0 */
79, 44,131,196, 20, 49,210,102,133,201,116, 93,139, 69,232,131, /* 0x 600 */
56, 3,117, 73,139, 93,240, 49,201, 3, 88, 8,137,202,106, 5, /* 0x 610 */
88,205,128,133,192,137,198,120, 20,102,186, 0, 2,137,195,137, /* 0x 620 */
249,106, 3, 88,205,128, 61, 0, 2, 0, 0,116, 10,106,127, 91, /* 0x 630 */
106, 1, 88,205,128,235,254,106, 0,137,250,106, 0,137,240,106, /* 0x 640 */
0,232, 33,252,255,255,131,196, 12,137,195,235, 12, 66, 15,183, /* 0x 650 */
193,131, 69,232, 32, 57,194,124,163,141,101,244,137,216, 91, 94, /* 0x 660 */
95,201,195 /* 0x 670 */
231,232, 99, 0, 0, 0,129,236, 0, 10, 0, 0, 83,139, 83, 72, /* 0x a0 */
141,148, 26,255, 31, 0, 0,129,226, 0,240,255,255, 82, 41,192, /* 0x b0 */
102,131,123, 16, 3,117, 1,146, 80,139,115, 24,141,131,140, 0, /* 0x c0 */
0, 0, 41,198,139, 24,139, 72, 4,131,193, 12,141, 84, 36, 12, /* 0x d0 */
96, 71,232, 90, 4, 0, 0,131,196, 36, 89, 91,129,196, 0, 10, /* 0x e0 */
0, 0, 80, 79, 41,192, 60,175,175,117,252, 80, 80, 80, 80, 80, /* 0x f0 */
80, 80, 80, 41,217,176, 91,255, 39,173,171,133,192,117,250,173, /* 0x 100 */
171,133,192,117,250, 87,173,171,131,248, 32,115, 3, 15,179,194, /* 0x 110 */
133,192,173,171,117,240,131,239, 8, 1,201, 64,243,171, 72,171, /* 0x 120 */
171, 95,195, 83,141, 92, 36, 8,106, 90, 88,205,128, 91,195, 0, /* 0x 130 */
87, 86,137,206, 83,137,195, 57, 8,139,120, 4,115, 10,106,127, /* 0x 140 */
91,106, 1, 88,205,128,235,254,133,201,116, 8,138, 7, 71,136, /* 0x 150 */
2, 66,226,248, 1,115, 4, 41, 51, 91, 94, 95,195, 85,137,229, /* 0x 160 */
87, 86,137,198, 83,137,211,131,236, 24,139, 69, 8,139,125, 12, /* 0x 170 */
137, 69,220,131, 58, 0, 15,132,184, 0, 0, 0,141, 85,228,185, /* 0x 180 */
12, 0, 0, 0,137,240,232,165,255,255,255,139, 69,228,139, 77, /* 0x 190 */
232,133,192,117, 19,129,249, 85, 80, 88, 33,117, 15,131, 62, 0, /* 0x 1a0 */
15,132,142, 0, 0, 0,235, 4,133,201,117, 10,106,127, 91,106, /* 0x 1b0 */
1, 88,205,128,235,254, 57,193,119,242, 59, 3,119,238, 57,193, /* 0x 1c0 */
115, 85, 15,182, 69,236, 80,141, 69,224, 80,255,115, 4, 81,255, /* 0x 1d0 */
118, 4,255, 85,220,131,196, 20,133,192,117,208,139, 85,224, 59, /* 0x 1e0 */
85,228,117,200,138, 69,237,132,192,116, 34,133,255,116, 30,129, /* 0x 1f0 */
250, 0, 2, 0, 0,119, 4, 57, 19,117, 18, 15,182,192, 80, 15, /* 0x 200 */
182, 69,238, 80, 82,255,115, 4,255,215,131,196, 16,139, 69,232, /* 0x 210 */
1, 70, 4, 41, 6,235, 10,139, 83, 4,137,240,232, 15,255,255, /* 0x 220 */
255,139, 85,228,139, 3, 1, 83, 4, 41,208,133,192,137, 3,233, /* 0x 230 */
66,255,255,255,141,101,244, 91, 94, 95,201,195,133,192, 83,137, /* 0x 240 */
211,116, 29,168, 1,117, 25,139, 16, 57,218,116, 7, 74,117, 11, /* 0x 250 */
133,219,116, 7,137, 24,137, 72, 4,235, 5,131,192, 8,235,231, /* 0x 260 */
91,195, 85,137,229, 87, 86, 83,131,236, 64,137, 85,224,139, 77, /* 0x 270 */
224,137, 69,228,139, 85, 12, 3, 73, 28,139, 69, 8,137, 85,216, /* 0x 280 */
139, 93,224,139, 85,224,137, 69,220, 49,192,102,131,123, 16, 2, /* 0x 290 */
137, 77,212,137,203, 15,183, 74, 44, 15,148,192,131,207,255,193, /* 0x 2a0 */
224, 4,137,202, 49,246,131,192, 34, 74,120, 28,131, 59, 1,117, /* 0x 2b0 */
18,139, 83, 8, 57,250,115, 2,137,215, 3, 83, 20, 57,214,115, /* 0x 2c0 */
2,137,214,131,195, 32,226,228,137,251,106, 0,129,227, 0,240, /* 0x 2d0 */
255,255,106,255, 41,222, 80,129,198,255, 15, 0, 0,106, 0,129, /* 0x 2e0 */
230, 0,240,255,255, 86, 83,232, 55,254,255,255,139, 77,224,141, /* 0x 2f0 */
52, 48,131,196, 24, 41,216,102,131,121, 44, 0,137,117,240,137, /* 0x 300 */
69,208,199, 69,204, 0, 0, 0, 0, 15,132,218, 1, 0, 0,139, /* 0x 310 */
93,212,139, 3,131,248, 6,117, 24,139, 77,208,186, 3, 0, 0, /* 0x 320 */
0, 3, 75, 8,139, 69,216,232, 16,255,255,255,233,161, 1, 0, /* 0x 330 */
0, 72, 15,133,154, 1, 0, 0,139, 69,212,199, 69,200, 64, 98, /* 0x 340 */
81,115,139, 85,212,139, 72, 24,139, 90, 20,131,225, 7,193,225, /* 0x 350 */
2,211,109,200,139, 72, 16,139, 69,208, 3, 66, 8,137, 77,232, /* 0x 360 */
131,101,200, 7,137,194, 1,195,129,226,255, 15, 0, 0,137,199, /* 0x 370 */
141, 52, 17,139, 77,212,137, 69,236, 41,215,139, 65, 4,137, 93, /* 0x 380 */
196, 41,208,131,125,220, 0, 80,139, 69,228,116, 3,131,200,255, /* 0x 390 */
131,125,220, 1, 80, 25,192,131,224,224,131,192, 50,131,125,220, /* 0x 3a0 */
0, 80,139, 69,200,116, 3,131,200, 2,131,125,220, 0, 80,137, /* 0x 3b0 */
240,116, 3,141, 70, 3, 80, 87,232,102,253,255,255,131,196, 24, /* 0x 3c0 */
57,199, 15,133,187, 0, 0, 0,131,125,220, 0,116, 31, 49,192, /* 0x 3d0 */
246, 69,200, 4,116, 6,139, 69,228,131,192, 2, 80,139, 69,220, /* 0x 3e0 */
255,117,228,141, 85,232,232,114,253,255,255, 88, 90,137,243,247, /* 0x 3f0 */
219,129,227,255, 15, 0, 0,246, 69,200, 2,137, 93,192,116, 15, /* 0x 400 */
133,219,141, 4, 55,116, 8,137,217,198, 0, 0, 64,226,250,131, /* 0x 410 */
125,220, 0,116,120,139, 69,212,131, 56, 1,117, 86,246, 64, 24, /* 0x 420 */
1,116, 80,139, 80, 20,139, 88, 8,141, 12, 26, 3, 77,208, 59, /* 0x 430 */
80, 16,117, 14,137,200,247,216, 37,255, 15, 0, 0,131,248, 3, /* 0x 440 */
119, 17,139, 85,212,107, 69,208, 52,131,122, 4, 0,141, 76, 3, /* 0x 450 */
12,117, 15,139, 1, 61,205,128, 97,195,116, 6,199, 1,205,128, /* 0x 460 */
97,195,133,201,116, 13,139, 69,216, 49,210,131,224,254,232,201, /* 0x 470 */
253,255,255,137,251,137,241,139, 85,200,106,125, 88,205,128,133, /* 0x 480 */
192,116, 10,106,127, 91,106, 1, 88,205,128,235,254,139, 85,192, /* 0x 490 */
141, 4, 22,141, 28, 7, 59, 93,196,115, 30,106, 0,106,255,106, /* 0x 4a0 */
50,255,117,200, 41, 93,196,255,117,196, 83,232,115,252,255,255, /* 0x 4b0 */
131,196, 24, 57,195,116, 27,235,202,131,125,220, 0,116, 19,141, /* 0x 4c0 */
78, 3,129,225,255, 15, 0, 0,131,249, 3,119, 5,106, 91, 88, /* 0x 4d0 */
205,128,139, 77,224,255, 69,204, 15,183, 65, 44,131, 69,212, 32, /* 0x 4e0 */
57, 69,204, 15,140, 38,254,255,255,131,125,220, 0,117, 14,139, /* 0x 4f0 */
93,228,106, 6, 88,205,128,133,192,116, 20,235,134,139, 69,224, /* 0x 500 */
102,131,120, 16, 3,116, 8,139, 93,240,106, 45, 88,205,128,131, /* 0x 510 */
125, 16, 0,116, 8,139, 77,208,139, 85, 16,137, 10,139, 93,224, /* 0x 520 */
139, 91, 24, 1, 93,208,139, 69,208,141,101,244, 91, 94, 95,201, /* 0x 530 */
195, 85,137,229, 87, 86, 83,131,236, 24,139,125, 28,106, 0,139, /* 0x 540 */
69, 16,141, 87, 52,139,117, 8, 80,139, 93, 32,137, 69,236,137, /* 0x 550 */
85,232,141, 69, 32,141, 85, 24,232, 0,252,255,255,139, 69, 12, /* 0x 560 */
15,183, 79, 44,186, 5, 0, 0, 0,137, 69, 32,137,240, 41, 93, /* 0x 570 */
36,232,198,252,255,255, 15,183, 79, 42,186, 4, 0, 0, 0,137, /* 0x 580 */
240,232,182,252,255,255,139, 93,232,139, 77, 40,186, 3, 0, 0, /* 0x 590 */
0, 3, 75, 8,137,240,131,193, 52,232,158,252,255,255,141, 69, /* 0x 5a0 */
240,137,250, 80,141, 69, 32, 86, 80,139, 69,236,232,177,252,255, /* 0x 5b0 */
255,186, 9, 0, 0, 0,137,193,137,195,137,240,232,123,252,255, /* 0x 5c0 */
255,102,139, 79, 44,131,196, 20, 49,210,102,133,201,116, 94,139, /* 0x 5d0 */
69,232,131, 56, 3,117, 74,139, 93,240, 49,201, 3, 88, 8,137, /* 0x 5e0 */
202,106, 5, 88,205,128,133,192,137,198,120, 21,186, 0, 2, 0, /* 0x 5f0 */
0,137,195,137,249,106, 3, 88,205,128, 61, 0, 2, 0, 0,116, /* 0x 600 */
10,106,127, 91,106, 1, 88,205,128,235,254,106, 0,137,250,106, /* 0x 610 */
0,137,240,106, 0,232, 72,252,255,255,131,196, 12,137,195,235, /* 0x 620 */
12, 66, 15,183,193,131, 69,232, 32, 57,194,124,162,141,101,244, /* 0x 630 */
137,216, 91, 94, 95,201,195 /* 0x 640 */
};
+98 -102
View File
@@ -1,4 +1,4 @@
/* fold_elfppc32.h -- created from fold_elfppc32.bin, 2324 (0x914) bytes
/* fold_elfppc32.h -- created from fold_elfppc32.bin, 2260 (0x8d4) bytes
This file is part of the UPX executable compressor.
@@ -27,18 +27,18 @@
*/
#define LINUX_ELFPPC32_FOLD_SIZE 2324
#define LINUX_ELFPPC32_FOLD_ADLER32 0x0789a535
#define LINUX_ELFPPC32_FOLD_CRC32 0x665028e2
#define LINUX_ELFPPC32_FOLD_SIZE 2260
#define LINUX_ELFPPC32_FOLD_ADLER32 0x6c8685d0
#define LINUX_ELFPPC32_FOLD_CRC32 0xa1bffc23
unsigned char linux_elfppc32_fold[2324] = {
unsigned char linux_elfppc32_fold[2260] = {
127, 69, 76, 70, 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 0 */
0, 2, 0, 20, 0, 0, 0, 1, 0, 16, 0,128, 0, 0, 0, 52, /* 0x 10 */
0, 0, 7,252, 0, 0, 0, 0, 0, 52, 0, 32, 0, 2, 0, 40, /* 0x 20 */
0, 0, 7,188, 0, 0, 0, 0, 0, 52, 0, 32, 0, 2, 0, 40, /* 0x 20 */
0, 7, 0, 6, 0, 0, 0, 1, 0, 0, 0, 0, 0, 16, 0, 0, /* 0x 30 */
0, 16, 0, 0, 0, 0, 7,196, 0, 0, 7,196, 0, 0, 0, 5, /* 0x 40 */
0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 7,196, 0, 16, 7,196, /* 0x 50 */
0, 16, 7,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, /* 0x 60 */
0, 16, 0, 0, 0, 0, 7,132, 0, 0, 7,132, 0, 0, 0, 5, /* 0x 40 */
0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 7,132, 0, 16, 7,132, /* 0x 50 */
0, 16, 7,132, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, /* 0x 60 */
0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 70 */
72, 0, 0,125, 40, 6, 0,208, 76,130, 0, 32, 84,132,240,191, /* 0x 80 */
77,130, 0, 32, 60, 0, 0, 16,124, 4, 0, 64, 65,128, 0, 8, /* 0x 90 */
@@ -50,7 +50,7 @@ unsigned char linux_elfppc32_fold[2324] = {
47,130, 0, 0, 64,158,255,244, 78,128, 0, 32,125, 8, 2,166, /* 0x f0 */
129, 33, 0, 0, 75,255,255,229, 75,255,255,225,128,159,255,248, /* 0x 100 */
85, 30, 0, 38, 56,161,248, 0,127,231,251,120,124,100,248, 80, /* 0x 110 */
56, 33,247,240, 84,125, 0, 38,128,195, 0, 24, 72, 0, 5, 73, /* 0x 120 */
56, 33,247,240, 84,125, 0, 38,128,195, 0, 24, 72, 0, 5, 9, /* 0x 120 */
124,127, 27,120,127,163,235,120,124,157,240, 80, 72, 0, 0, 81, /* 0x 130 */
127,232, 3,166,184, 65, 8, 20,128, 33, 8, 16, 78,128, 0, 32, /* 0x 140 */
56, 0, 0, 90, 68, 0, 0, 2, 64,163, 0, 8, 56, 96,255,255, /* 0x 150 */
@@ -86,96 +86,92 @@ unsigned char linux_elfppc32_fold[2324] = {
129, 63, 0, 0,128, 31, 0, 4,125, 43, 72, 80, 47,137, 0, 0, /* 0x 330 */
124, 0, 90, 20,144, 31, 0, 4,145, 63, 0, 0, 75,255,254,228, /* 0x 340 */
128, 1, 0, 68,187,129, 0, 48, 56, 33, 0, 64,124, 8, 3,166, /* 0x 350 */
78,128, 0, 32,124,128, 35,121,124, 9, 3,166, 77,130, 0, 32, /* 0x 360 */
56, 0, 0, 0,152, 3, 0, 0, 56, 99, 0, 1, 66, 0,255,248, /* 0x 370 */
78,128, 0, 32, 44, 3, 0, 0, 77,130, 0, 32, 48, 4,255,255, /* 0x 380 */
125, 96, 33, 16,128, 3, 0, 0,127,128, 32, 0,104, 9, 0, 1, /* 0x 390 */
33, 73, 0, 0,125, 42, 73, 20,125, 42, 88, 57, 65,158, 0, 8, /* 0x 3a0 */
65,162, 0, 16,144,163, 0, 4,144,131, 0, 0, 78,128, 0, 32, /* 0x 3b0 */
56, 99, 0, 8, 75,255,255,208,124, 8, 2,166,148, 33,255,160, /* 0x 3c0 */
125,128, 0, 38,190, 65, 0, 40,124,121, 27,120,124,151, 35,120, /* 0x 3d0 */
144, 1, 0,100,124,181, 43,120,161, 67, 0, 44,124,210, 51,120, /* 0x 3e0 */
160, 3, 0, 16,124,243, 59,120, 53, 74,255,255,129, 35, 0, 28, /* 0x 3f0 */
104, 0, 0, 3,145,129, 0, 36,124, 0, 0,208,127, 99, 74, 20, /* 0x 400 */
84, 3, 46,246,125, 20, 67,120, 56, 99, 8, 34,127,107,219,120, /* 0x 410 */
59,128,255,255, 59,192, 0, 0, 59,224, 0, 0, 65,128, 0, 72, /* 0x 420 */
57, 74, 0, 1,125, 73, 3,166,128, 11, 0, 0, 47,128, 0, 1, /* 0x 430 */
64,190, 0, 44,129, 43, 0, 8,127,137,224, 64, 64,156, 0, 12, /* 0x 440 */
131,235, 0, 16,125, 60, 75,120,128, 11, 0, 20,124, 0, 74, 20, /* 0x 450 */
127,158, 0, 64, 64,156, 0, 8,124, 30, 3,120, 57,107, 0, 32, /* 0x 460 */
66, 0,255,200, 87,128, 5, 62, 87,156, 0, 38,125, 60,240, 80, /* 0x 470 */
127,255, 2, 20, 57, 41, 15,255, 56, 31, 15,255, 85, 62, 0, 38, /* 0x 480 */
84, 31, 0, 38,124,102, 27,120,127,196,243,120, 56,160, 0, 7, /* 0x 490 */
126,167,171,120, 57, 0, 0, 0,127,131,227,120, 75,255,252,165, /* 0x 4a0 */
124,159,240, 80,124, 3,242, 20,124,125, 27,120, 56,160, 0, 0, /* 0x 4b0 */
124, 99,250, 20,144, 1, 0, 8, 75,255,252,189,160, 25, 0, 44, /* 0x 4c0 */
58,192, 0, 0,127, 28,232, 80,127,150, 0, 0, 64,156, 1,116, /* 0x 4d0 */
45,151, 0, 0, 65,142, 0, 40,128, 27, 0, 0, 47,128, 0, 6, /* 0x 4e0 */
64,190, 0, 28,128,187, 0, 8,126, 67,147,120, 56,128, 0, 3, /* 0x 4f0 */
124,165,194, 20, 75,255,254,129, 72, 0, 1, 52,128, 27, 0, 0, /* 0x 500 */
47,128, 0, 1, 64,190, 1, 40,128, 27, 0, 24, 61, 32,115, 81, /* 0x 510 */
129, 91, 0, 8, 97, 41, 98, 64, 84, 0, 22,250,129,123, 0, 20, /* 0x 520 */
125, 41, 4, 48, 85, 94, 5, 62, 48, 23,255,255,124,160,185, 16, /* 0x 530 */
128, 27, 0, 16, 85, 58, 7,126,127,170, 90, 20, 84,165, 8, 60, /* 0x 540 */
127,254, 80, 80,144, 1, 0, 16,127,128,242, 20,145, 65, 0, 20, /* 0x 550 */
127,255,194, 20,127,189,194, 20,124,165,211,120, 65,142, 0, 12, /* 0x 560 */
56,192, 0, 50, 72, 0, 0, 8, 56,192, 0, 18,129, 27, 0, 4, /* 0x 570 */
127,227,251,120,127,132,227,120,126,167,171,120,125, 30, 64, 80, /* 0x 580 */
75,255,251,193,127,159, 24, 0, 64,158, 0,104, 65,174, 0, 24, /* 0x 590 */
126,227,187,120, 56,129, 0, 16,126,101,155,120,126,134,163,120, /* 0x 5a0 */
75,255,252, 89, 87, 64,255,254, 46, 0, 0, 0, 65,178, 0, 16, /* 0x 5b0 */
127,196,243,120,127,227,251,120, 75,255,253,157,124, 28, 0,208, /* 0x 5c0 */
84, 30, 5, 62, 65,178, 0, 16,124,127,226, 20,127,196,243,120, /* 0x 5d0 */
75,255,253,133, 65,174, 0, 36,127,227,251,120,127,132,227,120, /* 0x 5e0 */
127, 69,211,120, 75,255,251,145, 47,131, 0, 0, 65,190, 0, 12, /* 0x 5f0 */
56, 96, 0,127, 75,255,251, 97,124, 28,242, 20,127,255, 2, 20, /* 0x 600 */
127,159,232, 64, 64,188, 0, 40,124,159,232, 80,127, 69,211,120, /* 0x 610 */
127,227,251,120, 56,192, 0, 50, 56,224, 0, 0, 57, 0, 0, 0, /* 0x 620 */
75,255,251, 33,127,159, 24, 0, 64,190,255,200,160, 25, 0, 44, /* 0x 630 */
58,214, 0, 1, 59,123, 0, 32,127,150, 0, 0, 75,255,254,144, /* 0x 640 */
128,121, 0, 24,128, 1, 0,100,129,129, 0, 36,124, 99,194, 20, /* 0x 650 */
124, 8, 3,166,186, 65, 0, 40,125,129,129, 32, 56, 33, 0, 96, /* 0x 660 */
78,128, 0, 32,124, 8, 2,166,148, 33,255,192, 56,132,255,232, /* 0x 670 */
191, 97, 0, 44,144,129, 0, 8,124,191, 43,120,144, 1, 0, 68, /* 0x 680 */
56, 3, 0, 24,144, 1, 0, 12,124,229, 59,120,128, 3, 0, 24, /* 0x 690 */
56,192, 0, 0,200, 1, 0, 8, 56, 97, 0, 8, 56,129, 0, 16, /* 0x 6a0 */
59,223, 0, 52,125, 61, 75,120,124,251, 59,120,144, 1, 0, 16, /* 0x 6b0 */
125, 28, 67,120,216, 1, 0, 24,147,225, 0, 20, 75,255,251, 61, /* 0x 6c0 */
128,190, 0, 8,127,163,235,120, 56,128, 0, 3, 56,165, 0, 52, /* 0x 6d0 */
75,255,252,165,160,191, 0, 44,127,163,235,120, 56,128, 0, 5, /* 0x 6e0 */
75,255,252,149,128,191, 0, 24,127,163,235,120, 56,128, 0, 9, /* 0x 6f0 */
75,255,252,133,127,103,219,120,127,136,227,120,127,227,251,120, /* 0x 700 */
127,166,235,120, 56,129, 0, 24, 56,160, 0, 0, 59, 96, 0, 0, /* 0x 710 */
75,255,252,169,160, 31, 0, 44,124,124, 27,120,127,155, 0, 0, /* 0x 720 */
64,156, 0,124,128, 30, 0, 0, 59,123, 0, 1, 56,128, 0, 0, /* 0x 730 */
56,160, 0, 0, 47,128, 0, 3, 64,190, 0, 88,128,126, 0, 8, /* 0x 740 */
75,255,250, 37,127,228,251,120,124,125, 27,121, 56,160, 2, 0, /* 0x 750 */
65,128, 0, 40, 75,255,250, 9, 56,128, 0, 0, 47,131, 2, 0, /* 0x 760 */
127,165,235,120,127,227,251,120, 56,192, 0, 0, 56,224, 0, 0, /* 0x 770 */
57, 0, 0, 0, 65,190, 0, 12, 56, 96, 0,127, 75,255,249,217, /* 0x 780 */
75,255,252, 57,124,124, 27,120,127,163,235,120, 75,255,249,225, /* 0x 790 */
160, 31, 0, 44, 59,222, 0, 32, 75,255,255,132,128, 1, 0, 68, /* 0x 7a0 */
127,131,227,120,187, 97, 0, 44, 56, 33, 0, 64,124, 8, 3,166, /* 0x 7b0 */
78,128, 0, 32, 0, 46,115,104,115,116,114,116, 97, 98, 0, 46, /* 0x 7c0 */
116,101,120,116, 0, 46, 98,115,115, 0, 46,115,100, 97,116, 97, /* 0x 7d0 */
0, 46,115,100, 97,116, 97, 50, 0, 46,110,111,116,101, 46, 71, /* 0x 7e0 */
78, 85, 45,115,116, 97, 99,107, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 7f0 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 800 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 810 */
0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 1, 0, 0, 0, 6, /* 0x 820 */
0, 16, 0,128, 0, 0, 0,128, 0, 0, 7, 68, 0, 0, 0, 0, /* 0x 830 */
0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 17, /* 0x 840 */
0, 0, 0, 8, 0, 0, 0, 3, 0, 16, 7,196, 0, 0, 7,196, /* 0x 850 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, /* 0x 860 */
0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 1, 0, 0, 0, 3, /* 0x 870 */
0, 16, 7,196, 0, 0, 7,196, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 880 */
0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 29, /* 0x 890 */
0, 0, 0, 1, 0, 0, 0, 2, 0, 16, 7,196, 0, 0, 7,196, /* 0x 8a0 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, /* 0x 8b0 */
0, 0, 0, 0, 0, 0, 0, 37, 0, 0, 0, 7, 0, 0, 0, 0, /* 0x 8c0 */
0, 0, 0, 0, 0, 0, 7,196, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 8d0 */
0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, /* 0x 8e0 */
0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7,196, /* 0x 8f0 */
0, 0, 0, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, /* 0x 900 */
0, 0, 0, 0 /* 0x 910 */
78,128, 0, 32, 44, 3, 0, 0, 77,130, 0, 32, 48, 4,255,255, /* 0x 360 */
125, 96, 33, 16,128, 3, 0, 0,127,128, 32, 0,104, 9, 0, 1, /* 0x 370 */
33, 73, 0, 0,125, 42, 73, 20,125, 42, 88, 57, 65,158, 0, 8, /* 0x 380 */
65,162, 0, 16,144,163, 0, 4,144,131, 0, 0, 78,128, 0, 32, /* 0x 390 */
56, 99, 0, 8, 75,255,255,208,124, 8, 2,166,148, 33,255,160, /* 0x 3a0 */
125,128, 0, 38,190, 65, 0, 40,124,121, 27,120,124,151, 35,120, /* 0x 3b0 */
144, 1, 0,100,124,178, 43,120,161, 67, 0, 44,124,211, 51,120, /* 0x 3c0 */
160, 3, 0, 16,124,244, 59,120, 53, 74,255,255,129, 35, 0, 28, /* 0x 3d0 */
104, 0, 0, 3,145,129, 0, 36,124, 0, 0,208,127,163, 74, 20, /* 0x 3e0 */
84, 3, 46,246,125, 21, 67,120, 56, 99, 8, 34,127,171,235,120, /* 0x 3f0 */
59,224,255,255, 59,192, 0, 0, 65,128, 0, 68, 57, 74, 0, 1, /* 0x 400 */
125, 73, 3,166,128, 11, 0, 0, 47,128, 0, 1, 64,190, 0, 40, /* 0x 410 */
129, 43, 0, 8,127,137,248, 64, 64,156, 0, 8,125, 63, 75,120, /* 0x 420 */
128, 11, 0, 20,124, 0, 74, 20,127,158, 0, 64, 64,156, 0, 8, /* 0x 430 */
124, 30, 3,120, 57,107, 0, 32, 66, 0,255,204, 87,255, 0, 38, /* 0x 440 */
124,102, 27,120,125, 63,240, 80,127,227,251,120, 57, 41, 15,255, /* 0x 450 */
56,160, 0, 0, 85, 62, 0, 38, 56,224,255,255,127,196,243,120, /* 0x 460 */
57, 0, 0, 0, 75,255,252,221,160, 25, 0, 44, 58,192, 0, 0, /* 0x 470 */
127, 31, 24, 80,127,150, 0, 0,124, 3,242, 20,144, 1, 0, 8, /* 0x 480 */
64,156, 1,128, 46, 23, 0, 0, 65,146, 0, 40,128, 29, 0, 0, /* 0x 490 */
47,128, 0, 6, 64,190, 0, 28,128,189, 0, 8,126, 99,155,120, /* 0x 4a0 */
56,128, 0, 3,124,165,194, 20, 75,255,254,173, 72, 0, 1, 64, /* 0x 4b0 */
128, 29, 0, 0, 47,128, 0, 1, 64,190, 1, 52,128, 29, 0, 24, /* 0x 4c0 */
61, 32,115, 81,129, 93, 0, 8, 97, 41, 98, 64, 84, 0, 22,250, /* 0x 4d0 */
129,125, 0, 20,125, 41, 4, 48, 85, 94, 5, 62, 48, 23,255,255, /* 0x 4e0 */
124,160,185, 16,128, 29, 0, 16, 85, 58, 7,126,127,106, 90, 20, /* 0x 4f0 */
84,165, 8, 60,127,254, 80, 80,144, 1, 0, 16,127,128,242, 20, /* 0x 500 */
145, 65, 0, 20,127,255,194, 20,127,123,194, 20,124,165,211,120, /* 0x 510 */
65,146, 0, 12, 56,192, 0, 50, 72, 0, 0, 8, 56,192, 0, 18, /* 0x 520 */
64,146, 0, 12,126, 71,147,120, 72, 0, 0, 8, 56,224,255,255, /* 0x 530 */
129, 29, 0, 4,127,227,251,120,127,132,227,120,125, 30, 64, 80, /* 0x 540 */
75,255,252, 1,127,159, 24, 0, 64,158, 0,104, 65,178, 0, 24, /* 0x 550 */
126,227,187,120, 56,129, 0, 16,126,133,163,120,126,166,171,120, /* 0x 560 */
75,255,252,153,115, 64, 0, 2,124, 28, 0,208, 84, 30, 5, 62, /* 0x 570 */
65,130, 0, 36, 47,158, 0, 0,125, 63,226, 20, 65,158, 0, 24, /* 0x 580 */
127,201, 3,166, 56, 0, 0, 0,152, 9, 0, 0, 57, 41, 0, 1, /* 0x 590 */
66, 0,255,248, 65,178, 0, 36,127,227,251,120,127,132,227,120, /* 0x 5a0 */
127, 69,211,120, 75,255,251,209, 47,131, 0, 0, 65,190, 0, 12, /* 0x 5b0 */
56, 96, 0,127, 75,255,251,161,124, 28,242, 20,127,255, 2, 20, /* 0x 5c0 */
127,159,216, 64, 64,188, 0, 40,124,159,216, 80,127, 69,211,120, /* 0x 5d0 */
127,227,251,120, 56,192, 0, 50, 56,224,255,255, 57, 0, 0, 0, /* 0x 5e0 */
75,255,251, 97,127,159, 24, 0, 64,190,255,200,160, 25, 0, 44, /* 0x 5f0 */
58,214, 0, 1, 59,189, 0, 32,127,150, 0, 0, 75,255,254,132, /* 0x 600 */
128,121, 0, 24,128, 1, 0,100,129,129, 0, 36,124, 99,194, 20, /* 0x 610 */
124, 8, 3,166,186, 65, 0, 40,125,128,129, 32, 56, 33, 0, 96, /* 0x 620 */
78,128, 0, 32,124, 8, 2,166,148, 33,255,192, 56,132,255,232, /* 0x 630 */
191, 97, 0, 44,144,129, 0, 8,124,191, 43,120,144, 1, 0, 68, /* 0x 640 */
56, 3, 0, 24,144, 1, 0, 12,124,229, 59,120,128, 3, 0, 24, /* 0x 650 */
56,192, 0, 0,200, 1, 0, 8, 56, 97, 0, 8, 56,129, 0, 16, /* 0x 660 */
59,223, 0, 52,125, 61, 75,120,124,251, 59,120,144, 1, 0, 16, /* 0x 670 */
125, 28, 67,120,216, 1, 0, 24,147,225, 0, 20, 75,255,251,125, /* 0x 680 */
128,190, 0, 8,127,163,235,120, 56,128, 0, 3, 56,165, 0, 52, /* 0x 690 */
75,255,252,197,160,191, 0, 44,127,163,235,120, 56,128, 0, 5, /* 0x 6a0 */
75,255,252,181,128,191, 0, 24,127,163,235,120, 56,128, 0, 9, /* 0x 6b0 */
75,255,252,165,127,103,219,120,127,136,227,120,127,227,251,120, /* 0x 6c0 */
127,166,235,120, 56,129, 0, 24, 56,160, 0, 0, 59, 96, 0, 0, /* 0x 6d0 */
75,255,252,201,160, 31, 0, 44,124,124, 27,120,127,155, 0, 0, /* 0x 6e0 */
64,156, 0,124,128, 30, 0, 0, 59,123, 0, 1, 56,128, 0, 0, /* 0x 6f0 */
56,160, 0, 0, 47,128, 0, 3, 64,190, 0, 88,128,126, 0, 8, /* 0x 700 */
75,255,250,101,127,228,251,120,124,125, 27,121, 56,160, 2, 0, /* 0x 710 */
65,128, 0, 40, 75,255,250, 73, 56,128, 0, 0, 47,131, 2, 0, /* 0x 720 */
127,165,235,120,127,227,251,120, 56,192, 0, 0, 56,224, 0, 0, /* 0x 730 */
57, 0, 0, 0, 65,190, 0, 12, 56, 96, 0,127, 75,255,250, 25, /* 0x 740 */
75,255,252, 89,124,124, 27,120,127,163,235,120, 75,255,250, 33, /* 0x 750 */
160, 31, 0, 44, 59,222, 0, 32, 75,255,255,132,128, 1, 0, 68, /* 0x 760 */
127,131,227,120,187, 97, 0, 44, 56, 33, 0, 64,124, 8, 3,166, /* 0x 770 */
78,128, 0, 32, 0, 46,115,104,115,116,114,116, 97, 98, 0, 46, /* 0x 780 */
116,101,120,116, 0, 46, 98,115,115, 0, 46,115,100, 97,116, 97, /* 0x 790 */
0, 46,115,100, 97,116, 97, 50, 0, 46,110,111,116,101, 46, 71, /* 0x 7a0 */
78, 85, 45,115,116, 97, 99,107, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 7b0 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 7c0 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 7d0 */
0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 1, 0, 0, 0, 6, /* 0x 7e0 */
0, 16, 0,128, 0, 0, 0,128, 0, 0, 7, 4, 0, 0, 0, 0, /* 0x 7f0 */
0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 17, /* 0x 800 */
0, 0, 0, 8, 0, 0, 0, 3, 0, 16, 7,132, 0, 0, 7,132, /* 0x 810 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, /* 0x 820 */
0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 1, 0, 0, 0, 3, /* 0x 830 */
0, 16, 7,132, 0, 0, 7,132, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 840 */
0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 29, /* 0x 850 */
0, 0, 0, 1, 0, 0, 0, 2, 0, 16, 7,132, 0, 0, 7,132, /* 0x 860 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, /* 0x 870 */
0, 0, 0, 0, 0, 0, 0, 37, 0, 0, 0, 7, 0, 0, 0, 0, /* 0x 880 */
0, 0, 0, 0, 0, 0, 7,132, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 890 */
0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, /* 0x 8a0 */
0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7,132, /* 0x 8b0 */
0, 0, 0, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, /* 0x 8c0 */
0, 0, 0, 0 /* 0x 8d0 */
};
+5 -7
View File
@@ -44,17 +44,15 @@
%define szp_info 12
fold_begin: ; enter: %ebx= &Elf32_Ehdr of this program
pop eax ; discard &dstlen
pop eax ; discard dstlen
pop eax ; Pop the argument count
mov ecx, esp ; argv starts just at the current stack top
lea edx, [esp+eax*4+4] ; envp = &argv[argc + 1]
mov esi, [e_entry + ebx]
add ebx, szElf32_Ehdr + szElf32_Phdr + szl_info
sub esi, ebx ; length
lea edi, [2 + ebp] ; f_unfilter, maybe
pusha ; (f_unf, cprLen, f_decpr, xx, cprSrc, envp, argv, argc)
mov edi, [ebx + e_entry]
lea esi, [ebx + szElf32_Ehdr + szElf32_Phdr + szl_info]
sub edi, esi ; length
lea ebx, [2 + ebp] ; f_unfilter, maybe
pusha ; (cprLen, cprSrc, f_decpr, xx, f_unf, envp, argv, argc)
EXTERN upx_main
call upx_main ; Call the UPX main function
hlt ; Crash if somehow upx_main does return
+54 -57
View File
@@ -1,4 +1,4 @@
/* fold_exec86.h -- created from fold_exec86.bin, 947 (0x3b3) bytes
/* fold_exec86.h -- created from fold_exec86.bin, 899 (0x383) bytes
This file is part of the UPX executable compressor.
@@ -27,69 +27,66 @@
*/
#define LINUX_I386EXEC_FOLD_SIZE 947
#define LINUX_I386EXEC_FOLD_ADLER32 0x14ec8f58
#define LINUX_I386EXEC_FOLD_CRC32 0x81e80623
#define LINUX_I386EXEC_FOLD_SIZE 899
#define LINUX_I386EXEC_FOLD_ADLER32 0x1a1874e1
#define LINUX_I386EXEC_FOLD_CRC32 0x6ce5306c
unsigned char linux_i386exec_fold[947] = {
unsigned char linux_i386exec_fold[899] = {
127, 69, 76, 70, 1, 1, 1, 0, 76,105,110,117,120, 0, 0, 0, /* 0x 0 */
2, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 52, 0, 0, 0, /* 0x 10 */
0, 0, 0, 0, 0, 0, 0, 0, 52, 0, 32, 0, 1, 0, 0, 0, /* 0x 20 */
0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 16, 64, 0, /* 0x 30 */
0, 16, 64, 0,179, 3, 0, 0,180, 3, 0, 0, 7, 0, 0, 0, /* 0x 40 */
0, 16, 64, 0,131, 3, 0, 0,132, 3, 0, 0, 5, 0, 0, 0, /* 0x 40 */
0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 50 */
88, 88, 88,137,225,141, 84,132, 4,139,115, 24,131,195, 96, 41, /* 0x 60 */
222,141,125, 2, 96,232,197, 0, 0, 0,244, 83,141, 92, 36, 8, /* 0x 70 */
106, 90, 88,205,128, 91,195, 0, 83,137,195,139, 76, 36, 8,136, /* 0x 80 */
88,137,225,141, 84,132, 4,139,123, 24,141,115, 96, 41,247,141, /* 0x 60 */
93, 2, 96,232,199, 0, 0, 0,244, 83,141, 92, 36, 8,106, 90, /* 0x 70 */
88,205,128, 91,195, 0, 0, 0, 83,137,195,139, 76, 36, 8,136, /* 0x 80 */
208,131,224, 31, 60, 25,118, 3,131,232, 43,131,192, 65, 75,136, /* 0x 90 */
3,137,208,193,232, 5,137,194,226,229, 91,195, 85, 49,201,137, /* 0x a0 */
229, 87, 86,137,202, 83,131,236, 32,139, 93, 8,106, 5, 88,205, /* 0x b0 */
128,133,192,137,199,120,108,199, 69,212, 47,112,114,111,199, 69, /* 0x c0 */
216, 99, 47, 0, 0,106, 20, 88,205,128,141, 85,218,141,117,212, /* 0x d0 */
232,171, 2, 0, 0,141, 80, 4,137,243,199, 0, 47,102,100, 47, /* 0x e0 */
137,248,232,153, 2, 0, 0,186, 1, 0, 0, 0,106, 33, 88,106, /* 0x f0 */
229, 87, 86,137,202, 83,131,236, 44,139, 93, 8,106, 5, 88,205, /* 0x b0 */
128,133,192,137,198,120,108,199, 69,212, 47,112,114,111,199, 69, /* 0x c0 */
216, 99, 47, 0, 0,106, 20, 88,205,128,141, 85,218,141,125,212, /* 0x d0 */
232,123, 2, 0, 0,141, 80, 4,137,251,199, 0, 47,102,100, 47, /* 0x e0 */
137,240,232,105, 2, 0, 0,186, 1, 0, 0, 0,106, 33, 88,106, /* 0x f0 */
5, 89,205,128, 61, 85, 80, 88, 50,117, 33,139, 93, 8,106, 10, /* 0x 100 */
88,205,128,185, 2, 0, 0, 0,137,251,106, 55, 88,205,128,137, /* 0x 110 */
243,139, 77, 12,139, 85, 16,106, 11, 88,205,128,137,251,106, 6, /* 0x 120 */
88,205,128,131,196, 32,137,248, 91, 94, 95,201,194, 12, 0, 85, /* 0x 130 */
137,229, 87, 86, 83,131,236,112,141,125,228,139, 77, 24,139, 69, /* 0x 140 */
16,139, 85, 12,137,203,129,227, 0,240,255,255,137, 69,156,137, /* 0x 150 */
85,148,137,206,137, 77,152,137, 93,144,165,165,165,131,109,148, /* 0x 160 */
12,129,125,228, 85, 80, 88, 51,137,117,152, 15,133,100, 1, 0, /* 0x 170 */
0,199, 69,196, 47,116,109,112,199, 69,200, 47,117,112,120,141, /* 0x 180 */
77,215,106, 20, 88,205,128,137,194,106, 4,137,200,141,117,211, /* 0x 190 */
232,227,254,255,255,141, 93,172,137,199,198, 69,215, 0, 51,125, /* 0x 1a0 */
228, 49,201,106, 78, 88,205,128, 51,125,172,139, 85,176,137,240, /* 0x 1b0 */
199, 4, 36, 7, 0, 0, 0,193,226, 12,141, 93,196, 49,250,232, /* 0x 1c0 */
180,254,255,255, 88,106, 10, 88,205,128,131,248,254,116, 8,133, /* 0x 1d0 */
192, 15,133,254, 0, 0, 0,185,194, 0, 0, 0,186,192, 1, 0, /* 0x 1e0 */
0,141, 93,196,106, 5, 88,205,128,137, 69,136,139, 77,232,137, /* 0x 1f0 */
195,106, 93, 88,205,128,133,192, 15,133,207, 0, 0, 0,106, 0, /* 0x 200 */
83,106, 1,106, 3, 81,106, 0,232, 94,254,255,255,131,196, 24, /* 0x 210 */
61, 0,240,255,255,137, 69,132, 15,135,175, 0, 0, 0,139, 69, /* 0x 220 */
232,106, 0,106, 0, 5,255, 15, 0, 0,106, 50, 37, 0,240,255, /* 0x 230 */
255,106, 3, 3, 69,132,104, 0, 16, 0, 0, 80,232, 42,254,255, /* 0x 240 */
255,131,196, 24,141,125,180,139,117,152,165,165,165,139, 77,180, /* 0x 250 */
131,109,148, 12,133,201,137,117,152,139, 85,184,117, 20,129,250, /* 0x 260 */
85, 80, 88, 33,117,103,131,125,232, 0, 15,132,141, 0, 0, 0, /* 0x 270 */
235, 91, 57,202,119, 87, 59, 85,236,119, 82, 57,202,115, 36, 15, /* 0x 280 */
182, 69,188, 80,141, 69,168, 80,255,117,132, 82,255,117,152,255, /* 0x 290 */
85,156,131,196, 20,133,192,117, 52,139, 69,180, 57, 69,168,117, /* 0x 2a0 */
44,235, 8,139,125,132,139,117,152,243,164,139, 77,180,139, 93, /* 0x 2b0 */
132,106, 91, 88,205,128,139, 69,184, 1,203, 41, 69,148, 41, 77, /* 0x 2c0 */
232, 1, 69,152,131,125,148, 0,137, 93,132,121, 18,141, 93,196, /* 0x 2d0 */
106, 10, 88,205,128,106,127, 91,106, 1, 88,205,128,235,254,139, /* 0x 2e0 */
77,152,139, 93,144,129,225, 0,240,255,255, 43, 77,144,106, 91, /* 0x 2f0 */
88,205,128, 1,203,137, 93,144,233, 71,255,255,255,139, 93,136, /* 0x 300 */
106, 6, 88,205,128,133,192,117,196,255,117, 28,255,117, 32,141, /* 0x 310 */
117,196, 86,232,132,253,255,255,133,192,120,177,106, 2, 88,205, /* 0x 320 */
128,133,192,117, 51,106, 2, 88,205,128,133,192,137,193,117, 31, /* 0x 330 */
199, 69,160, 85, 80, 88, 52,184,162, 0, 0, 0,141, 93,160,199, /* 0x 340 */
69,164, 0, 0, 0, 0,205,128,137,243,106, 10, 88,205,128, 49, /* 0x 350 */
219,106, 1, 88,205,128,235,254, 49,201,131,203,255,137,202,106, /* 0x 360 */
7, 88,205,128,141, 93,196,139, 77, 32,139, 85, 28,106, 11, 88, /* 0x 370 */
205,128,233, 86,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 380 */
87,137,215,106, 10,252, 89,232, 5, 0, 0, 0,136, 39,151, 95, /* 0x 390 */
195,153,247,241, 82,133,192,116, 5,232,243,255,255,255, 88, 4, /* 0x 3a0 */
48,170,195 /* 0x 3b0 */
88,205,128,185, 2, 0, 0, 0,137,243,106, 55, 88,205,128,137, /* 0x 110 */
251,139, 77, 12,139, 85, 16,106, 11, 88,205,128,137,243,106, 6, /* 0x 120 */
88,205,128,131,196, 44,137,240, 91, 94, 95,201,194, 12, 0, 85, /* 0x 130 */
137,229, 87, 86, 83,131,236,124,141,125,228,139, 69, 16,139,117, /* 0x 140 */
12,137, 69,156,165,165,165,131,109, 8, 12,129,125,228, 85, 80, /* 0x 150 */
88, 51,137,117, 12, 15,133,111, 1, 0, 0,199, 69,196, 47,116, /* 0x 160 */
109,112,199, 69,200, 47,117,112,120,141, 77,215,106, 20, 88,205, /* 0x 170 */
128,137,194,106, 4,137,200,141,125,211,232,249,254,255,255,139, /* 0x 180 */
85,228,198, 69,215, 0, 49,201, 49,208,141, 93,172,137, 69,132, /* 0x 190 */
106, 78, 88,205,128,139, 85,172,137,248, 49, 85,132,139, 85,176, /* 0x 1a0 */
199, 4, 36, 7, 0, 0, 0,141, 93,196,193,226, 12, 51, 85,132, /* 0x 1b0 */
232,195,254,255,255, 88,106, 10, 88,205,128,131,248,254,116, 8, /* 0x 1c0 */
133,192, 15,133, 2, 1, 0, 0,185,194, 0, 0, 0,186,192, 1, /* 0x 1d0 */
0, 0,141, 93,196,106, 5, 88,205,128,139, 85,232,137, 69,148, /* 0x 1e0 */
137,195,137,209,106, 93, 88,205,128,133,192, 15,133,209, 0, 0, /* 0x 1f0 */
0,106, 0,255,117,148,106, 1,106, 3, 82,106, 0,232,103,254, /* 0x 200 */
255,255,131,196, 24, 61, 0,240,255,255,137, 69,136, 15,135,175, /* 0x 210 */
0, 0, 0,139, 69,232,106, 0,106,255, 5,255, 15, 0, 0,106, /* 0x 220 */
50, 37, 0,240,255,255,106, 3, 3, 69,136,104, 0, 16, 0, 0, /* 0x 230 */
80,232, 51,254,255,255,131,196, 24,141,125,180,139,117, 12,165, /* 0x 240 */
165,165,139, 77,180,131,109, 8, 12,133,201,137,117, 12,139, 85, /* 0x 250 */
184,117, 16,129,250, 85, 80, 88, 33,117,103,131,125,232, 0,116, /* 0x 260 */
115,235, 95, 57,202,119, 91, 59, 85,236,119, 86, 57,202,115, 36, /* 0x 270 */
15,182, 69,188, 80,141, 69,168, 80,255,117,136, 82,255,117, 12, /* 0x 280 */
255, 85,156,131,196, 20,133,192,117, 56,139, 69,180, 57, 69,168, /* 0x 290 */
117, 48,235, 8,139,125,136,139,117, 12,243,164,139, 85,180,139, /* 0x 2a0 */
93,136,137,209,106, 91, 88,205,128,139, 69,184, 41, 69, 8, 1, /* 0x 2b0 */
85,136, 41, 85,232, 1, 69, 12,131,125, 8, 0, 15,137,119,255, /* 0x 2c0 */
255,255,141, 93,196,106, 10, 88,205,128,106,127, 91,106, 1, 88, /* 0x 2d0 */
205,128,235,254,139, 93,148,106, 6, 88,205,128,133,192,117,226, /* 0x 2e0 */
255,117, 28,255,117, 32,141,117,196, 86,232,173,253,255,255,133, /* 0x 2f0 */
192,120,207,106, 2, 88,205,128,133,192,117, 51,106, 2, 88,205, /* 0x 300 */
128,133,192,137,193,117, 31,199, 69,160, 85, 80, 88, 52,184,162, /* 0x 310 */
0, 0, 0,141, 93,160,199, 69,164, 0, 0, 0, 0,205,128,137, /* 0x 320 */
243,106, 10, 88,205,128, 49,219,106, 1, 88,205,128,235,254, 49, /* 0x 330 */
201,131,203,255,137,202,106, 7, 88,205,128,141, 93,196,139, 77, /* 0x 340 */
32,139, 85, 28,106, 11, 88,205,128,233,116,255,255,255, 0, 0, /* 0x 350 */
87,137,215,106, 10,252, 89,232, 5, 0, 0, 0,136, 39,151, 95, /* 0x 360 */
195,153,247,241, 82,133,192,116, 5,232,243,255,255,255, 88, 4, /* 0x 370 */
48,170,195 /* 0x 380 */
};
+4
View File
@@ -96,6 +96,7 @@ SYS_write =4
SYS_open =5
SYS_close =6
SYS_pread =153
SYS_mmap =197
SYS_mprotect= 74
@@ -103,6 +104,9 @@ SYS_mprotect= 74
in wrong registers. So change C interface to use size_t (32-bits) instead
of off_t (64 bits), and convert here.
*/
pread: .globl pread
movr a4,a3; li a3,0 # zero extend 4th arg size_t to off_t
li 0,SYS_pread; b sysgo
mmap: .globl mmap
movr a6,a5; li a5,0 # zero extend 6th arg size_t to off_t
li 0,SYS_mmap
+95 -88
View File
@@ -1,4 +1,4 @@
/* fold_machppc32.h -- created from fold_machppc32.bin, 1528 (0x5f8) bytes
/* fold_machppc32.h -- created from fold_machppc32.bin, 1648 (0x670) bytes
This file is part of the UPX executable compressor.
@@ -27,11 +27,11 @@
*/
#define FOLD_MACHPPC32_SIZE 1528
#define FOLD_MACHPPC32_ADLER32 0xb665fdb7
#define FOLD_MACHPPC32_CRC32 0x0feee296
#define FOLD_MACHPPC32_SIZE 1648
#define FOLD_MACHPPC32_ADLER32 0x16162538
#define FOLD_MACHPPC32_CRC32 0x67f187d4
unsigned char fold_machppc32[1528] = {
unsigned char fold_machppc32[1648] = {
72, 0, 0,105, 40, 6, 0,208, 76,130, 0, 32, 84,132,240,191, /* 0x 0 */
77,130, 0, 32, 60, 0, 0, 16,124, 4, 0, 64, 65,128, 0, 8, /* 0x 10 */
124, 4, 3,120, 56,165, 1, 32,124,103, 27,120, 56, 99,255,252, /* 0x 20 */
@@ -42,90 +42,97 @@ unsigned char fold_machppc32[1528] = {
124, 41, 11,120,125, 8, 2,166,128,159,255,248,124,100,248, 80, /* 0x 70 */
128,195, 0, 24, 40, 6, 8, 0, 65,129, 0, 8, 56,192, 8, 0, /* 0x 80 */
124, 61, 11,120,124, 38, 8, 80,124, 37, 11,120, 56, 33,255,232, /* 0x 90 */
127,231,251,120, 72, 0, 4, 33,127,161,235,120,128, 67, 0, 0, /* 0x a0 */
127,231,251,120, 72, 0, 4, 57,127,161,235,120,128, 67, 0, 0, /* 0x a0 */
124, 73, 3,166,128, 67, 0,136,124, 79,241, 32,128, 67, 0,140, /* 0x b0 */
124, 65, 3,166,128, 67, 0,144,124, 72, 3,166,184,131, 0, 24, /* 0x c0 */
128, 3, 0, 8,128, 67, 0, 16,128, 99, 0, 20, 78,128, 4, 32, /* 0x d0 */
125, 9, 67,120, 57, 0, 0, 0, 56, 0, 0,197, 68, 0, 0, 2, /* 0x e0 */
56, 96,255,255, 78,128, 0, 32, 56, 0, 0, 1, 75,255,255,240, /* 0x f0 */
56, 0, 0, 3, 75,255,255,232, 56, 0, 0, 5, 75,255,255,224, /* 0x 100 */
56, 0, 0, 6, 75,255,255,216, 56, 0, 0, 74, 75,255,255,208, /* 0x 110 */
124, 8, 2,166,148, 33,255,240,144, 1, 0, 20,128, 3, 0, 0, /* 0x 120 */
129, 35, 0, 4,127,128, 40, 64, 64,188, 0, 12, 56, 96, 0,127, /* 0x 130 */
75,255,255,185, 47,133, 0, 0, 65,158, 0, 28,124,169, 3,166, /* 0x 140 */
136, 9, 0, 0, 57, 41, 0, 1,152, 4, 0, 0, 56,132, 0, 1, /* 0x 150 */
66, 0,255,240,128, 3, 0, 0,129, 35, 0, 4,124, 5, 0, 80, /* 0x 160 */
144, 3, 0, 0,125, 41, 42, 20,128, 1, 0, 20, 56, 33, 0, 16, /* 0x 170 */
145, 35, 0, 4,124, 8, 3,166, 78,128, 0, 32,124, 8, 2,166, /* 0x 180 */
148, 33,255,192,191,129, 0, 48,124,159, 35,120,124,126, 27,120, /* 0x 190 */
124,188, 43,120,144, 1, 0, 68,124,221, 51,120,128, 4, 0, 0, /* 0x 1a0 */
47,128, 0, 0, 65,158, 1, 32, 56,160, 0, 12,127,195,243,120, /* 0x 1b0 */
56,129, 0, 16, 75,255,255, 93,129, 33, 0, 16,128,161, 0, 20, /* 0x 1c0 */
47,137, 0, 0, 64,190, 0, 36, 60, 0, 33, 88, 96, 0, 80, 85, /* 0x 1d0 */
127,133, 0, 0, 64,190, 0, 28,128, 30, 0, 0, 47,128, 0, 0, /* 0x 1e0 */
65,190, 0,228, 72, 0, 0, 12, 47,133, 0, 0, 64,190, 0, 12, /* 0x 1f0 */
56, 96, 0,127, 75,255,254,245,127, 5, 72, 64, 65,185,255,244, /* 0x 200 */
128, 31, 0, 0,127,137, 0, 64, 65,189,255,232,128, 31, 0, 4, /* 0x 210 */
64,152, 0,132,124,164, 43,120,128,126, 0, 4,124, 5, 3,120, /* 0x 220 */
56,193, 0, 32,136,225, 0, 24,127,136, 3,166, 78,128, 0, 33, /* 0x 230 */
47,131, 0, 0, 64,190,255,188,128,129, 0, 32,128, 1, 0, 16, /* 0x 240 */
127,132, 0, 0, 64,190,255,172,136,193, 0, 25, 49, 61,255,255, /* 0x 250 */
124, 9,233, 16,125, 38, 0,208, 85, 41, 15,254,125, 43, 0, 57, /* 0x 260 */
65,162, 0, 20,128,127, 0, 4,127,168, 3,166,136,161, 0, 26, /* 0x 270 */
78,128, 0, 33,128, 30, 0, 4,129, 97, 0, 20,129, 62, 0, 0, /* 0x 280 */
124, 0, 90, 20,125, 43, 72, 80,144, 30, 0, 4,145, 62, 0, 0, /* 0x 290 */
72, 0, 0, 16,124, 4, 3,120,127,195,243,120, 75,255,254,117, /* 0x 2a0 */
129, 97, 0, 16,129, 63, 0, 0,128, 31, 0, 4,125, 43, 72, 80, /* 0x 2b0 */
47,137, 0, 0,124, 0, 90, 20,144, 31, 0, 4,145, 63, 0, 0, /* 0x 2c0 */
75,255,254,228,128, 1, 0, 68,187,129, 0, 48, 56, 33, 0, 64, /* 0x 2d0 */
124, 8, 3,166, 78,128, 0, 32,124, 8, 2,166,148, 33,255,176, /* 0x 2e0 */
190, 97, 0, 28,125,128, 0, 38, 58,224, 0, 0,124,122, 27,120, /* 0x 2f0 */
144, 1, 0, 84,124,155, 35,120,128, 3, 0, 16,124,179, 43,120, /* 0x 300 */
145,129, 0, 24,124,212, 51,120,127,151, 0, 64,124,245, 59,120, /* 0x 310 */
125, 22, 67,120, 59,195, 0, 28, 59, 0, 0, 0, 64,156, 1,120, /* 0x 320 */
129, 62, 0, 0, 47,137, 0, 1, 64,190, 1, 44,129, 62, 0, 24, /* 0x 330 */
129,126, 0, 36, 85, 61, 5, 62,128, 30, 0, 28,127,139,234, 20, /* 0x 340 */
145, 97, 0, 8, 46, 28, 0, 0,127, 41, 2, 20,145, 33, 0, 12, /* 0x 350 */
127,253, 72, 80, 65,146, 0, 72, 47,155, 0, 0, 64,190, 0, 16, /* 0x 360 */
47,139, 0, 0, 56,192, 0, 18, 64,158, 0, 8, 56,192, 16, 18, /* 0x 370 */
47,139, 0, 0,126,103,155,120, 64,158, 0, 8, 56,224,255,255, /* 0x 380 */
129, 30, 0, 32,127,227,251,120,127,132,227,120, 56,160, 0, 3, /* 0x 390 */
75,255,253, 65,127,159, 24, 0, 64,158, 0,124, 47,155, 0, 0, /* 0x 3a0 */
65,158, 0, 52,128, 30, 0, 36, 47,128, 0, 0, 65,158, 0, 40, /* 0x 3b0 */
128, 30, 0, 32, 47,128, 0, 0, 64,158, 0, 8,147,244, 0, 0, /* 0x 3c0 */
127, 99,219,120, 56,129, 0, 8,126,165,171,120,126,198,179,120, /* 0x 3d0 */
75,255,253,173,124, 28, 0,208,125, 63,226, 20,112, 29, 15,255, /* 0x 3e0 */
65,130, 0, 24,127,169, 3,166, 56, 0, 0, 0,152, 9, 0, 0, /* 0x 3f0 */
57, 41, 0, 1, 66, 0,255,248, 65,178, 0, 36,128,190, 0, 44, /* 0x 400 */
127,227,251,120,127,132,227,120, 75,255,253, 1, 47,131, 0, 0, /* 0x 410 */
65,190, 0, 12, 56, 96, 0,127, 75,255,252,209,124, 28,234, 20, /* 0x 420 */
127,255, 2, 20,127,159,200, 64, 64,188, 0, 84,128,190, 0, 44, /* 0x 430 */
124,159,200, 80,127,227,251,120, 56,192, 16, 18, 56,224,255,255, /* 0x 440 */
57, 0, 0, 0, 75,255,252,141,127,159, 24, 0, 65,190, 0, 48, /* 0x 450 */
75,255,255,196, 56, 9,255,252, 43,128, 0, 1, 65,157, 0, 32, /* 0x 460 */
128, 30, 0, 8, 47,128, 0, 1, 64,190, 0, 20,128, 30, 0, 12, /* 0x 470 */
47,128, 0, 40, 64,190, 0, 8, 58,254, 0, 16,128, 26, 0, 16, /* 0x 480 */
59, 24, 0, 1,127,152, 0, 64,128, 30, 0, 4,127,222, 2, 20, /* 0x 490 */
75,255,254,140,128, 1, 0, 84,126,227,187,120,129,129, 0, 24, /* 0x 4a0 */
186, 97, 0, 28,124, 8, 3,166, 56, 33, 0, 80,125,128,129, 32, /* 0x 4b0 */
78,128, 0, 32,148, 33,255,192,124, 8, 2,166,144,129, 0, 8, /* 0x 4c0 */
191, 65, 0, 40,129, 97, 0, 8,124,191, 43,120,144, 1, 0, 68, /* 0x 4d0 */
56, 3, 0, 24, 57,107,255,232,144, 1, 0, 20,145, 97, 0, 16, /* 0x 4e0 */
124,253, 59,120,128, 3, 0, 24,125, 60, 75,120,200, 1, 0, 16, /* 0x 4f0 */
125, 27, 67,120,124,229, 59,120, 56, 97, 0, 16, 56,129, 0, 24, /* 0x 500 */
124,218, 51,120, 56,192, 0, 0,144, 1, 0, 24,216, 1, 0, 32, /* 0x 510 */
59,192, 0, 0,147,225, 0, 28, 75,255,252,101,127,167,235,120, /* 0x 520 */
127,104,219,120,127,227,251,120,127,134,227,120, 56,129, 0, 32, /* 0x 530 */
56,160,255,255, 75,255,253,165,128, 31, 0, 16,124,123, 27,120, /* 0x 540 */
59,191, 0, 28,127,158, 0, 64, 64,156, 0,136,128, 29, 0, 0, /* 0x 550 */
59,222, 0, 1, 56,128, 0, 0, 56,160, 0, 0, 47,128, 0, 14, /* 0x 560 */
64,190, 0, 92,128,125, 0, 8,124,125, 26, 20, 75,255,251,141, /* 0x 570 */
127,228,251,120,124,124, 27,121,127, 69,211,120, 65,128, 0, 40, /* 0x 580 */
75,255,251,113, 56,128, 0, 0,127,154, 24, 0,127,133,227,120, /* 0x 590 */
127,227,251,120, 56,192, 0, 0, 56,224, 0, 0, 57, 0, 0, 0, /* 0x 5a0 */
65,190, 0, 12, 56, 96, 0,127, 75,255,251, 65, 75,255,253, 45, /* 0x 5b0 */
124,123, 27,120,127,131,227,120, 75,255,251, 73,128, 31, 0, 16, /* 0x 5c0 */
129, 61, 0, 4,127,158, 0, 64,127,189, 74, 20, 75,255,255,124, /* 0x 5d0 */
128, 1, 0, 68,127, 99,219,120,187, 65, 0, 40, 56, 33, 0, 64, /* 0x 5e0 */
124, 8, 3,166, 78,128, 0, 32 /* 0x 5f0 */
124,199, 51,120, 56,192, 0, 0, 56, 0, 0,153, 72, 0, 0, 16, /* 0x e0 */
125, 9, 67,120, 57, 0, 0, 0, 56, 0, 0,197, 68, 0, 0, 2, /* 0x f0 */
56, 96,255,255, 78,128, 0, 32, 56, 0, 0, 1, 75,255,255,240, /* 0x 100 */
56, 0, 0, 3, 75,255,255,232, 56, 0, 0, 5, 75,255,255,224, /* 0x 110 */
56, 0, 0, 6, 75,255,255,216, 56, 0, 0, 74, 75,255,255,208, /* 0x 120 */
124, 8, 2,166,148, 33,255,240,144, 1, 0, 20,128, 3, 0, 0, /* 0x 130 */
129, 35, 0, 4,127,128, 40, 64, 64,188, 0, 12, 56, 96, 0,127, /* 0x 140 */
75,255,255,185, 47,133, 0, 0, 65,158, 0, 28,124,169, 3,166, /* 0x 150 */
136, 9, 0, 0, 57, 41, 0, 1,152, 4, 0, 0, 56,132, 0, 1, /* 0x 160 */
66, 0,255,240,128, 3, 0, 0,129, 35, 0, 4,124, 5, 0, 80, /* 0x 170 */
144, 3, 0, 0,125, 41, 42, 20,128, 1, 0, 20, 56, 33, 0, 16, /* 0x 180 */
145, 35, 0, 4,124, 8, 3,166, 78,128, 0, 32,124, 8, 2,166, /* 0x 190 */
148, 33,255,192,191,129, 0, 48,124,159, 35,120,124,126, 27,120, /* 0x 1a0 */
124,188, 43,120,144, 1, 0, 68,124,221, 51,120,128, 4, 0, 0, /* 0x 1b0 */
47,128, 0, 0, 65,158, 1, 32, 56,160, 0, 12,127,195,243,120, /* 0x 1c0 */
56,129, 0, 16, 75,255,255, 93,129, 33, 0, 16,128,161, 0, 20, /* 0x 1d0 */
47,137, 0, 0, 64,190, 0, 36, 60, 0, 33, 88, 96, 0, 80, 85, /* 0x 1e0 */
127,133, 0, 0, 64,190, 0, 28,128, 30, 0, 0, 47,128, 0, 0, /* 0x 1f0 */
65,190, 0,228, 72, 0, 0, 12, 47,133, 0, 0, 64,190, 0, 12, /* 0x 200 */
56, 96, 0,127, 75,255,254,245,127, 5, 72, 64, 65,185,255,244, /* 0x 210 */
128, 31, 0, 0,127,137, 0, 64, 65,189,255,232,128, 31, 0, 4, /* 0x 220 */
64,152, 0,132,124,164, 43,120,128,126, 0, 4,124, 5, 3,120, /* 0x 230 */
56,193, 0, 32,136,225, 0, 24,127,136, 3,166, 78,128, 0, 33, /* 0x 240 */
47,131, 0, 0, 64,190,255,188,128,129, 0, 32,128, 1, 0, 16, /* 0x 250 */
127,132, 0, 0, 64,190,255,172,136,193, 0, 25, 49, 61,255,255, /* 0x 260 */
124, 9,233, 16,125, 38, 0,208, 85, 41, 15,254,125, 43, 0, 57, /* 0x 270 */
65,162, 0, 20,128,127, 0, 4,127,168, 3,166,136,161, 0, 26, /* 0x 280 */
78,128, 0, 33,128, 30, 0, 4,129, 97, 0, 20,129, 62, 0, 0, /* 0x 290 */
124, 0, 90, 20,125, 43, 72, 80,144, 30, 0, 4,145, 62, 0, 0, /* 0x 2a0 */
72, 0, 0, 16,124, 4, 3,120,127,195,243,120, 75,255,254,117, /* 0x 2b0 */
129, 97, 0, 16,129, 63, 0, 0,128, 31, 0, 4,125, 43, 72, 80, /* 0x 2c0 */
47,137, 0, 0,124, 0, 90, 20,144, 31, 0, 4,145, 63, 0, 0, /* 0x 2d0 */
75,255,254,228,128, 1, 0, 68,187,129, 0, 48, 56, 33, 0, 64, /* 0x 2e0 */
124, 8, 3,166, 78,128, 0, 32,124, 8, 2,166,148, 33,255,176, /* 0x 2f0 */
190, 65, 0, 24,125,128, 0, 38, 58,224, 0, 0,124,122, 27,120, /* 0x 300 */
144, 1, 0, 84,124,146, 35,120,128, 3, 0, 16,124,187, 43,120, /* 0x 310 */
145,129, 0, 20,124,211, 51,120,127,151, 0, 64,124,244, 59,120, /* 0x 320 */
125, 21, 67,120,125, 54, 75,120, 59,195, 0, 28, 59, 0, 0, 0, /* 0x 330 */
64,156, 1,124,129, 62, 0, 0, 47,137, 0, 1, 64,190, 1, 48, /* 0x 340 */
129, 62, 0, 24,129,126, 0, 36, 85, 61, 5, 62,128, 30, 0, 28, /* 0x 350 */
127,139,234, 20,145, 97, 0, 8, 46, 28, 0, 0,127, 41, 2, 20, /* 0x 360 */
145, 33, 0, 12,127,253, 72, 80, 65,146, 0, 76, 47,155, 0, 0, /* 0x 370 */
64,190, 0, 16, 47,139, 0, 0, 56,192, 0, 18, 64,158, 0, 8, /* 0x 380 */
56,192, 16, 18, 47,139, 0, 0,126,103,155,120, 64,158, 0, 8, /* 0x 390 */
56,224,255,255,129, 30, 0, 32,127,227,251,120,127,132,227,120, /* 0x 3a0 */
56,160, 0, 3,125, 8,146, 20, 75,255,253, 57,127,159, 24, 0, /* 0x 3b0 */
64,158, 0,124, 47,155, 0, 0, 65,158, 0, 52,128, 30, 0, 36, /* 0x 3c0 */
47,128, 0, 0, 65,158, 0, 40,128, 30, 0, 32, 47,128, 0, 0, /* 0x 3d0 */
64,158, 0, 8,147,244, 0, 0,127, 99,219,120, 56,129, 0, 8, /* 0x 3e0 */
126,165,171,120,126,198,179,120, 75,255,253,165,124, 28, 0,208, /* 0x 3f0 */
125, 63,226, 20,112, 29, 15,255, 65,130, 0, 24,127,169, 3,166, /* 0x 400 */
56, 0, 0, 0,152, 9, 0, 0, 57, 41, 0, 1, 66, 0,255,248, /* 0x 410 */
65,178, 0, 36,128,190, 0, 44,127,227,251,120,127,132,227,120, /* 0x 420 */
75,255,252,249, 47,131, 0, 0, 65,190, 0, 12, 56, 96, 0,127, /* 0x 430 */
75,255,252,201,124, 28,234, 20,127,255, 2, 20,127,159,200, 64, /* 0x 440 */
64,188, 0, 84,128,190, 0, 44,124,159,200, 80,127,227,251,120, /* 0x 450 */
56,192, 16, 18, 56,224,255,255, 57, 0, 0, 0, 75,255,252,133, /* 0x 460 */
127,159, 24, 0, 65,190, 0, 48, 75,255,255,196, 56, 9,255,252, /* 0x 470 */
43,128, 0, 1, 65,157, 0, 32,128, 30, 0, 8, 47,128, 0, 1, /* 0x 480 */
64,190, 0, 20,128, 30, 0, 12, 47,128, 0, 40, 64,190, 0, 8, /* 0x 490 */
58,254, 0, 16,128, 26, 0, 16, 59, 24, 0, 1,127,152, 0, 64, /* 0x 4a0 */
128, 30, 0, 4,127,222, 2, 20, 75,255,254,136,128, 1, 0, 84, /* 0x 4b0 */
126,227,187,120,129,129, 0, 20,186, 65, 0, 24,124, 8, 3,166, /* 0x 4c0 */
56, 33, 0, 80,125,128,129, 32, 78,128, 0, 32,148, 33,255,192, /* 0x 4d0 */
124, 8, 2,166,144,129, 0, 8,191, 97, 0, 44,129, 97, 0, 8, /* 0x 4e0 */
124,191, 43,120,144, 1, 0, 68, 56, 3, 0, 24, 57,107,255,232, /* 0x 4f0 */
144, 1, 0, 20,145, 97, 0, 16,125, 27, 67,120,128, 3, 0, 24, /* 0x 500 */
125, 60, 75,120,200, 1, 0, 16,124,253, 59,120,124,229, 59,120, /* 0x 510 */
56, 97, 0, 16, 56,129, 0, 24,124,222, 51,120, 56,192, 0, 0, /* 0x 520 */
144, 1, 0, 24,216, 1, 0, 32,147,225, 0, 28, 75,255,252, 97, /* 0x 530 */
127,105,219,120,127,135,227,120,127,227,251,120,127,168,235,120, /* 0x 540 */
56,128, 0, 0, 56,161, 0, 32, 56,192,255,255, 59, 96, 0, 0, /* 0x 550 */
75,255,253,153,129, 95, 0, 16, 57, 96, 0, 0,124,124, 27,120, /* 0x 560 */
127,139, 80, 64, 57, 63, 0, 28, 64,156, 0,224,128, 9, 0, 0, /* 0x 570 */
57,107, 0, 1,127, 11, 80, 64, 47,128, 0, 14, 64,190, 0,192, /* 0x 580 */
128,105, 0, 8, 56,128, 0, 0, 56,160, 0, 0,124,105, 26, 20, /* 0x 590 */
75,255,251,121,124,125, 27,121, 65,128, 0, 32,127,163,235,120, /* 0x 5a0 */
127,228,251,120,127,197,243,120,127,102,219,120, 75,255,251, 37, /* 0x 5b0 */
127,158, 24, 0, 65,190, 0, 20, 56, 96, 0,127, 75,255,251, 61, /* 0x 5c0 */
131,105, 0, 8, 75,255,255,216,128, 31, 0, 0, 61, 32,202,254, /* 0x 5d0 */
97, 41,186,190,127,128, 72, 0, 64,158, 0, 52,129, 95, 0, 4, /* 0x 5e0 */
57, 96, 0, 0, 57, 63, 0, 8,127,139, 80, 64, 64,156, 0, 32, /* 0x 5f0 */
128, 9, 0, 0, 57,107, 0, 1,127, 11, 80, 64, 47,128, 0, 18, /* 0x 600 */
65,190,255,192, 57, 41, 0, 20, 65,152,255,232,127,227,251,120, /* 0x 610 */
127,100,219,120, 56,160, 0, 0,127,166,235,120, 56,224, 0, 0, /* 0x 620 */
57, 0, 0, 0, 57, 32, 0, 0, 75,255,252,193,124,124, 27,120, /* 0x 630 */
127,163,235,120, 75,255,250,221, 72, 0, 0, 16,128, 9, 0, 4, /* 0x 640 */
125, 41, 2, 20, 65,152,255, 40,128, 1, 0, 68,127,131,227,120, /* 0x 650 */
187, 97, 0, 44, 56, 33, 0, 64,124, 8, 3,166, 78,128, 0, 32 /* 0x 660 */
};
+70 -71
View File
@@ -1,4 +1,4 @@
/* fold_pti86.h -- created from fold_pti86.bin, 1537 (0x601) bytes
/* fold_pti86.h -- created from fold_pti86.bin, 1531 (0x5fb) bytes
This file is part of the UPX executable compressor.
@@ -27,23 +27,23 @@
*/
#define LINUX_I386PTI_FOLD_SIZE 1537
#define LINUX_I386PTI_FOLD_ADLER32 0xf6d697b8
#define LINUX_I386PTI_FOLD_CRC32 0xcce6fcb1
#define LINUX_I386PTI_FOLD_SIZE 1531
#define LINUX_I386PTI_FOLD_ADLER32 0x90e59978
#define LINUX_I386PTI_FOLD_CRC32 0xdd8fa001
unsigned char linux_i386pti_fold[1537] = {
unsigned char linux_i386pti_fold[1531] = {
127, 69, 76, 70, 1, 1, 1, 0, 76,105,110,117,120, 0, 0, 0, /* 0x 0 */
2, 0, 3, 0, 1, 0, 0, 0,128, 0, 1, 0, 52, 0, 0, 0, /* 0x 10 */
0, 0, 0, 0, 0, 0, 0, 0, 52, 0, 32, 0, 2, 0, 0, 0, /* 0x 20 */
0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, /* 0x 30 */
0, 0, 1, 0, 1, 6, 0, 0, 4, 6, 0, 0, 5, 0, 0, 0, /* 0x 40 */
0, 16, 0, 0, 1, 0, 0, 0, 1, 6, 0, 0, 4, 6, 1, 0, /* 0x 50 */
4, 6, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, /* 0x 60 */
0, 0, 1, 0,251, 5, 0, 0,252, 5, 0, 0, 5, 0, 0, 0, /* 0x 40 */
0, 16, 0, 0, 1, 0, 0, 0,251, 5, 0, 0,252, 5, 1, 0, /* 0x 50 */
252, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, /* 0x 60 */
0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 70 */
93, 89, 88,141,124,132, 4, 80, 41,192,175,117,253,175,137,254, /* 0x 80 */
139, 6,131,248, 3,116, 8,131,198, 8,131,248, 0,117,241,139, /* 0x 90 */
94, 4, 83,129,236, 0, 10, 0, 0,137,226, 81,141, 67, 88,139, /* 0x a0 */
115, 24, 41,198,139, 24,139, 72, 4,131,193, 12, 96,232, 71, 4, /* 0x b0 */
115, 24, 41,198,139, 24,139, 72, 4,131,193, 12, 96,232, 62, 4, /* 0x b0 */
0, 0,129,196, 36, 10, 0, 0, 91, 80,139, 75, 20,139, 91, 8, /* 0x c0 */
184, 91, 0, 0, 0,205,128, 41,192, 41,201, 41,210, 41,219, 41, /* 0x d0 */
237, 41,246, 41,255,195, 83,141, 92, 36, 8,106, 90, 88,205,128, /* 0x e0 */
@@ -67,66 +67,65 @@ unsigned char linux_i386pti_fold[1537] = {
6,198, 0, 0, 64,226,250,195,133,192, 83,137,211,116, 29,168, /* 0x 200 */
1,117, 25,139, 16, 57,218,116, 7, 74,117, 11,133,219,116, 7, /* 0x 210 */
137, 24,137, 72, 4,235, 5,131,192, 8,235,231, 91,195, 85,137, /* 0x 220 */
229, 87, 86, 83,131,236, 80,137, 69,228,139, 69, 8,137, 85,224, /* 0x 230 */
139, 77, 16,199, 69,200, 0, 0, 0, 0,137, 69,220, 3, 64, 28, /* 0x 240 */
139, 93,220,137, 77,212,139, 85, 12,137, 69,208, 49,192,102,131, /* 0x 250 */
123, 16, 3,137, 85,216, 15,183, 75, 44,139, 85,208, 15,149,192, /* 0x 260 */
131,206,255,193,224, 4,137,207,131,192, 34, 49,219, 79,137, 69, /* 0x 270 */
184,120, 34,131, 58, 1,117, 24,139, 66, 8, 57,240,115, 8,139, /* 0x 280 */
122, 16,137,198,137,125,200, 3, 66, 20, 57,195,115, 2,137,195, /* 0x 290 */
131,194, 32,226,222,137,247,106, 0,129,231, 0,240,255,255,106, /* 0x 2a0 */
0, 41,251,255,117,184,129,195,255, 15, 0, 0,106, 7,129,227, /* 0x 2b0 */
0,240,255,255,139, 85,200, 83,137,240, 37,255, 15, 0, 0, 87, /* 0x 2c0 */
137, 93,172,141,180, 2,255, 15, 0, 0,232, 7,254,255,255,137, /* 0x 2d0 */
194,131,196, 24, 1,218,129,230, 0,240,255,255,137, 85,240,137, /* 0x 2e0 */
194, 41,243, 1,242,137,217,137, 69,176,137,211,106, 91, 88,205, /* 0x 2f0 */
128,139, 69,176,199, 69,192, 0, 0, 0, 0,139, 85,220, 41,248, /* 0x 300 */
102,131,122, 44, 0,137, 69,204, 15,132,177, 1, 0, 0,139, 77, /* 0x 310 */
208,139, 1,131,248, 6,117, 27,139, 93,208,186, 3, 0, 0, 0, /* 0x 320 */
139, 77,204, 3, 75, 8,139, 69,212,232,202,254,255,255,233,117, /* 0x 330 */
1, 0, 0, 72, 15,133,110, 1, 0, 0,139,125,208,199, 69,188, /* 0x 340 */
64, 98, 81,115,139, 79, 24,139, 71, 8,131,225, 7,139, 87, 16, /* 0x 350 */
193,225, 2,137, 69,236,211,109,188,137,193, 3, 79, 20,137,199, /* 0x 360 */
129,231,255, 15, 0, 0,137, 85,232,141, 52, 58,139, 85,204, 41, /* 0x 370 */
248,131,101,188, 7, 1,209,141, 28, 16,137, 77,180,139, 77,208, /* 0x 380 */
139, 65, 4, 41,248,131,125,216, 1, 80,255,117,228, 25,192,131, /* 0x 390 */
224,224,131,192, 50,131,125,216, 0, 80,137,240,106, 3,116, 3, /* 0x 3a0 */
141, 70, 3, 80, 83,232, 44,253,255,255,131,196, 24, 57,195, 15, /* 0x 3b0 */
133,168, 0, 0, 0,131,125,216, 0,116, 19,255,117,224,255,117, /* 0x 3c0 */
228,141, 85,232,139, 69,216,232, 69,253,255,255, 88, 90,137,250, /* 0x 3d0 */
137,247,137,216,247,223,232, 16,254,255,255,129,231,255, 15, 0, /* 0x 3e0 */
0,141, 4, 51,137,250,232, 0,254,255,255,131,125,216, 0,116, /* 0x 3f0 */
94,139, 69,208,131, 56, 1,117, 86,246, 64, 24, 1,116, 80,139, /* 0x 400 */
80, 20,139, 72, 8,137, 77,164,137,209, 3, 77,164, 59, 80, 16, /* 0x 410 */
117, 14,137,200,247,216, 37,255, 15, 0, 0,131,248, 3,119, 15, /* 0x 420 */
139, 77,164,139, 69,208,131,193, 12,131,120, 4, 0,117, 15,139, /* 0x 430 */
1, 61,205,128, 97,195,116, 6,199, 1,205,128, 97,195,133,201, /* 0x 440 */
116, 13,139, 69,212, 49,210,131,224,254,232,169,253,255,255,137, /* 0x 450 */
241,139, 85,188,106,125, 88,205,128,133,192,116, 10,106,127, 91, /* 0x 460 */
106, 1, 88,205,128,235,254,141, 4, 62, 1,195, 59, 93,180,115, /* 0x 470 */
30,106, 0,106, 0,106, 50,255,117,188, 41, 93,180,255,117,180, /* 0x 480 */
83,232, 80,252,255,255,131,196, 24, 57,195,116, 27,235,206,131, /* 0x 490 */
125,216, 0,116, 19,141, 78, 3,129,225,255, 15, 0, 0,131,249, /* 0x 4a0 */
3,119, 5,106, 91, 88,205,128,139, 93,220,255, 69,192, 15,183, /* 0x 4b0 */
67, 44,131, 69,208, 32, 57, 69,192, 15,140, 79,254,255,255,131, /* 0x 4c0 */
125,216, 0,117, 14,139, 93,228,106, 6, 88,205,128,133,192,116, /* 0x 4d0 */
20,235,138,139,125,220,102,131,127, 16, 3,116, 8,139, 93,240, /* 0x 4e0 */
106, 45, 88,205,128,139, 69,220,139, 64, 24, 1, 69,204,139, 69, /* 0x 4f0 */
204,141,101,244, 91, 94, 95,201,195, 85,137,229, 87, 86, 83, 81, /* 0x 500 */
139,125, 20,141, 85, 24,255,117, 40,141, 71, 52,139, 93, 8,255, /* 0x 510 */
117, 16,137, 69,240,139,117, 32,141, 69, 32,232,241,251,255,255, /* 0x 520 */
139, 85,240,139, 69, 12,139, 74, 8,186, 3, 0, 0, 0,137, 69, /* 0x 530 */
32,137,216,131,193, 52, 41,117, 36,232,186,252,255,255, 15,183, /* 0x 540 */
79, 42,137,216,186, 4, 0, 0, 0,232,170,252,255,255, 15,183, /* 0x 550 */
79, 44,137,216,186, 5, 0, 0, 0,232,154,252,255,255,139, 79, /* 0x 560 */
24,137,216,186, 9, 0, 0, 0,232,139,252,255,255,141, 69, 32, /* 0x 570 */
83,139, 85, 40, 80,139, 69, 16, 87,232,160,252,255,255,102,139, /* 0x 580 */
79, 44,131,196, 20, 49,210,102,133,201,137,195,116, 89,139, 69, /* 0x 590 */
240,131, 56, 3,117, 69, 49,201,139, 88, 8,137,202,106, 5, 88, /* 0x 5a0 */
205,128,133,192,137,198,120, 20,102,186, 0, 2,137,195,137,249, /* 0x 5b0 */
106, 3, 88,205,128, 61, 0, 2, 0, 0,116, 10,106,127, 91,106, /* 0x 5c0 */
1, 88,205,128,235,254,106, 0, 49,210,106, 0,137,240, 87,232, /* 0x 5d0 */
74,252,255,255,131,196, 12,137,195,235, 12, 66, 15,183,193,131, /* 0x 5e0 */
69,240, 32, 57,194,124,167,141,101,244,137,216, 91, 94, 95,201, /* 0x 5f0 */
195 /* 0x 600 */
229, 87, 86, 83,131,236, 84,137, 69,228,139, 69, 8,137, 85,224, /* 0x 230 */
139, 77, 16,137, 69,220, 3, 64, 28,139, 93,220,137, 77,212,139, /* 0x 240 */
85, 12,137, 69,208, 49,192,102,131,123, 16, 3,137, 85,216, 15, /* 0x 250 */
183, 75, 44,139, 85,208, 15,149,192,131,206,255,193,224, 4,131, /* 0x 260 */
192, 34, 49,219,137, 69,184,137,200, 49,255, 72,120, 31,131, 58, /* 0x 270 */
1,117, 21,139, 66, 8, 57,240,115, 5,137,198,139,122, 16, 3, /* 0x 280 */
66, 20, 57,195,115, 2,137,195,131,194, 32,226,225,137,240,129, /* 0x 290 */
230, 0,240,255,255,106, 0, 41,243,106, 0, 37,255, 15, 0, 0, /* 0x 2a0 */
137,117,188,141,179,255, 15, 0, 0,255,117,184,129,230, 0,240, /* 0x 2b0 */
255,255,106, 7, 86,255,117,188,141,188, 7,255, 15, 0, 0,232, /* 0x 2c0 */
18,254,255,255,129,231, 0,240,255,255,137,194,137,195, 1,242, /* 0x 2d0 */
41,254,131,196, 24,137, 69,172,137, 85,240, 1,251,137,241,106, /* 0x 2e0 */
91, 88,205,128,139, 69,220,199, 69,196, 0, 0, 0, 0,139, 93, /* 0x 2f0 */
172, 43, 93,188,102,131,120, 44, 0,137, 93,204, 15,132,180, 1, /* 0x 300 */
0, 0,139, 85,208,139, 2,131,248, 6,117, 24,139, 77,204, 3, /* 0x 310 */
74, 8,186, 3, 0, 0, 0,139, 69,212,232,217,254,255,255,233, /* 0x 320 */
123, 1, 0, 0, 72, 15,133,116, 1, 0, 0,139, 93,208,199, 69, /* 0x 330 */
192, 64, 98, 81,115,139, 75, 24,139, 67, 8,131,225, 7,139, 83, /* 0x 340 */
16,193,225, 2,137, 69,236,211,109,192,137,193, 3, 75, 20,137, /* 0x 350 */
195,129,227,255, 15, 0, 0,137, 85,232,141, 60, 26,139, 85,204, /* 0x 360 */
41,216,131,101,192, 7, 1,209,141, 52, 16,137, 77,176,139, 77, /* 0x 370 */
208,139, 65, 4, 41,216,131,125,216, 1, 80,255,117,228, 25,192, /* 0x 380 */
131,224,224,131,192, 50,131,125,216, 0, 80,137,248,106, 3,116, /* 0x 390 */
3,141, 71, 3, 80, 86,232, 59,253,255,255,131,196, 24, 57,198, /* 0x 3a0 */
15,133,170, 0, 0, 0,131,125,216, 0,116, 19,255,117,224,255, /* 0x 3b0 */
117,228,141, 85,232,139, 69,216,232, 84,253,255,255, 88, 90,137, /* 0x 3c0 */
218,137,251,137,240,247,219,232, 31,254,255,255,129,227,255, 15, /* 0x 3d0 */
0, 0,141, 4, 62,137,218,137, 93,180,232, 12,254,255,255,131, /* 0x 3e0 */
125,216, 0,116, 91,139, 69,208,131, 56, 1,117, 83,246, 64, 24, /* 0x 3f0 */
1,116, 77,139, 93,208,137,194,139, 64, 20, 59, 67, 16,139, 82, /* 0x 400 */
8,141, 12, 16,117, 14,137,200,247,216, 37,255, 15, 0, 0,131, /* 0x 410 */
248, 3,119, 12,139, 69,208,141, 74, 12,131,120, 4, 0,117, 15, /* 0x 420 */
139, 1, 61,205,128, 97,195,116, 6,199, 1,205,128, 97,195,133, /* 0x 430 */
201,116, 13,139, 69,212, 49,210,131,224,254,232,184,253,255,255, /* 0x 440 */
137,243,137,249,139, 85,192,106,125, 88,205,128,133,192,116, 10, /* 0x 450 */
106,127, 91,106, 1, 88,205,128,235,254,139, 85,180,141, 4, 23, /* 0x 460 */
141, 28, 6, 59, 93,176,115, 30,106, 0,106, 0,106, 50,255,117, /* 0x 470 */
192, 41, 93,176,255,117,176, 83,232, 89,252,255,255,131,196, 24, /* 0x 480 */
57,195,116, 27,235,202,131,125,216, 0,116, 19,141, 79, 3,129, /* 0x 490 */
225,255, 15, 0, 0,131,249, 3,119, 5,106, 91, 88,205,128,139, /* 0x 4a0 */
77,220,255, 69,196, 15,183, 65, 44,131, 69,208, 32, 57, 69,196, /* 0x 4b0 */
15,140, 76,254,255,255,131,125,216, 0,117, 14,139, 93,228,106, /* 0x 4c0 */
6, 88,205,128,133,192,116, 20,235,134,139, 69,220,102,131,120, /* 0x 4d0 */
16, 3,116, 8,139, 93,240,106, 45, 88,205,128,139, 85,220,139, /* 0x 4e0 */
82, 24, 1, 85,204,139, 69,204,141,101,244, 91, 94, 95,201,195, /* 0x 4f0 */
85,137,229, 87, 86, 83,131,236, 16,141, 85, 24,139,125, 20,255, /* 0x 500 */
117, 40,141, 71, 52,139, 93, 8,255,117, 16,137, 69,240,139,117, /* 0x 510 */
32,141, 69, 32,232,248,251,255,255,139, 85,240,139, 69, 12,139, /* 0x 520 */
74, 8,186, 3, 0, 0, 0,137, 69, 32,137,216,131,193, 52, 41, /* 0x 530 */
117, 36,232,193,252,255,255, 15,183, 79, 42,137,216,186, 4, 0, /* 0x 540 */
0, 0,232,177,252,255,255, 15,183, 79, 44,137,216,186, 5, 0, /* 0x 550 */
0, 0,232,161,252,255,255,139, 79, 24,137,216,186, 9, 0, 0, /* 0x 560 */
0,232,146,252,255,255,141, 69, 32, 83,139, 85, 40, 80,139, 69, /* 0x 570 */
16, 87,232,167,252,255,255,102,139, 79, 44,131,196, 20, 49,210, /* 0x 580 */
102,133,201,137,195,116, 90,139, 69,240,131, 56, 3,117, 70, 49, /* 0x 590 */
201,139, 88, 8,137,202,106, 5, 88,205,128,133,192,137,198,120, /* 0x 5a0 */
21,186, 0, 2, 0, 0,137,195,137,249,106, 3, 88,205,128, 61, /* 0x 5b0 */
0, 2, 0, 0,116, 10,106,127, 91,106, 1, 88,205,128,235,254, /* 0x 5c0 */
106, 0, 49,210,106, 0,137,240, 87,232, 80,252,255,255,131,196, /* 0x 5d0 */
12,137,195,235, 12, 66, 15,183,193,131, 69,240, 32, 57,194,124, /* 0x 5e0 */
166,141,101,244,137,216, 91, 94, 95,201,195 /* 0x 5f0 */
};
+4 -2
View File
@@ -38,7 +38,6 @@
%define szElf32_Ehdr 0x34
%define szElf32_Phdr 8*4
%define e_entry (16 + 2*2 + 4)
%define p_memsz 5*4
%define szl_info 12
%define szp_info 12
%define a_type 0
@@ -60,8 +59,9 @@ fold_begin: ; enter: %ebx= uncDst
%define AT_NULL 0
%define AT_IGNORE 1
%define AT_PHDR 3
%define AT_NUMBER (5+ 23)
%define AT_NUMBER (5+ 37)
; 2002-11-09 glibc-2.2.90 AT_IGNOREPPC==22 plus 5 for future growth
; 2006-05-15 glibc-2.4-4 AT_L3_CACHESHAPE==37
mov esi, esp
sub esp, sz_auxv * AT_NUMBER ; more than 128 bytes
@@ -98,6 +98,8 @@ L30: ; distribute existing Elf32_auxv into new table
xchg eax,ecx ; edx is busy, do not use
lodsd
je L40
cmp ecx, byte AT_NUMBER
jae L30
mov [a_type + sz_auxv*(ecx -1) + edi], ecx
mov [a_val + sz_auxv*(ecx -1) + edi], eax
jmp L30
+74 -73
View File
@@ -1,4 +1,4 @@
/* fold_sh86.h -- created from fold_sh86.bin, 1190 (0x4a6) bytes
/* fold_sh86.h -- created from fold_sh86.bin, 1201 (0x4b1) bytes
This file is part of the UPX executable compressor.
@@ -27,84 +27,85 @@
*/
#define LINUX_I386SH_FOLD_SIZE 1190
#define LINUX_I386SH_FOLD_ADLER32 0x93daf2db
#define LINUX_I386SH_FOLD_CRC32 0x4e35857e
#define LINUX_I386SH_FOLD_SIZE 1201
#define LINUX_I386SH_FOLD_ADLER32 0x5788f83f
#define LINUX_I386SH_FOLD_CRC32 0xf1ddde7a
unsigned char linux_i386sh_fold[1190] = {
unsigned char linux_i386sh_fold[1201] = {
127, 69, 76, 70, 1, 1, 1, 0, 76,105,110,117,120, 0, 0, 0, /* 0x 0 */
2, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 52, 0, 0, 0, /* 0x 10 */
0, 0, 0, 0, 0, 0, 0, 0, 52, 0, 32, 0, 1, 0, 0, 0, /* 0x 20 */
0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 1, /* 0x 30 */
0, 0, 64, 1,166, 4, 0, 0,168, 4, 0, 0, 7, 0, 0, 0, /* 0x 40 */
0, 0, 64, 1,177, 4, 0, 0,180, 4, 0, 0, 7, 0, 0, 0, /* 0x 40 */
0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 50 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 60 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 70 */
88, 88,137,230,129,236,224, 0, 0, 0,137,231,173,171,133,192, /* 0x 80 */
117,250,173,171,133,192,117,250, 87, 64,106, 54, 89,243,171, 72, /* 0x 90 */
171,171, 95,173,133,192,145,173,116, 10,137, 76,207,248,137, 68, /* 0x a0 */
207,252,235,239,129,236, 0, 10, 0, 0,147,141, 82, 24,139, 10, /* 0x b0 */
139, 90, 4,137,198, 96,232,120, 2, 0, 0, 89, 80, 97,129,196, /* 0x c0 */
0, 10, 0, 0, 89, 90, 82, 65, 86,131,238, 3,102,199, 6, 45, /* 0x d0 */
99, 65, 86, 65, 82, 81, 87,141,188, 36, 0,245,255,255, 96,137, /* 0x e0 */
227,137,252,185,192, 2, 0, 0, 49,192,243,171,137,220, 97,195, /* 0x f0 */
83,141, 92, 36, 8,106, 90, 88,205,128, 91,195, 87, 86, 83,137, /* 0x 100 */
195,139,124, 36, 16, 57, 56,139,112, 4,115, 10,106,127, 91,106, /* 0x 110 */
1, 88,205,128,235,254,133,255,116, 10,137,249,138, 6, 70,136, /* 0x 120 */
2, 66,226,248, 1,123, 4, 41, 59, 91, 94, 95,195,133,210,137, /* 0x 130 */
209,116, 6,198, 0, 0, 64,226,250,195, 85, 49,201,137,229, 87, /* 0x 140 */
86, 83,137,195,131,236, 40,137, 85,240,139, 69, 8,137,202,137, /* 0x 150 */
69,236,106, 5, 88,205,128,133,192,137, 69,232,121, 10,106,127, /* 0x 160 */
91,106, 1, 88,205,128,235,254,186, 0, 2, 0, 0,139, 93,232, /* 0x 170 */
139, 77,240,106, 3, 88,205,128, 61, 0, 2, 0, 0,117,223,139, /* 0x 180 */
69,240, 3, 73, 28,102,131,120, 16, 3,139, 93,240,137, 77,228, /* 0x 190 */
137,202, 15,149,192, 15,183, 75, 44, 15,182,192,131,207,255,193, /* 0x 1a0 */
224, 4,131,192, 34, 49,246,137, 69,212,137,200, 72,120, 30,131, /* 0x 1b0 */
58, 1,117, 20,139, 66, 8, 57,248,115, 2,137,199,139, 90, 20, /* 0x 1c0 */
1,195, 57,222,115, 2,137,222,131,194, 32,226,226,246, 69,212, /* 0x 1d0 */
16,116, 7,137,243,106, 45, 88,205,128,137,251,106, 0,129,227, /* 0x 1e0 */
0,240,255,255,106, 0, 41,222,255,117,212,141,134,255, 15, 0, /* 0x 1f0 */
0,106, 7, 37, 0,240,255,255, 80, 83,232,241,254,255,255,131, /* 0x 200 */
196, 24, 41,216,199, 69,220, 0, 0, 0, 0,137, 69,224,139, 69, /* 0x 210 */
240,102,131,120, 44, 0, 15,132,247, 0, 0, 0,139, 85,228,139, /* 0x 220 */
2,131,248, 6,117, 14,139, 66, 8,139, 77,236,137, 65, 20,233, /* 0x 230 */
200, 0, 0, 0, 72, 15,133,193, 0, 0, 0,139, 93,228,199, 69, /* 0x 240 */
216, 64, 98, 81,115,139, 75, 24,139, 67, 8,131,225, 7,193,225, /* 0x 250 */
2,137,194,211,109,216,139, 77,228, 3, 83, 20,137,195,139,121, /* 0x 260 */
16,129,227,255, 15, 0, 0,139, 77,224, 41,216, 1,223,131,101, /* 0x 270 */
216, 7, 1,202,141, 52, 8,137, 85,208,139, 85,228,139, 66, 4, /* 0x 280 */
41,216, 80,255,117,232,106, 18,106, 3, 87, 86,232, 95,254,255, /* 0x 290 */
255,131,196, 24, 57,198,117, 48,137,218,137,240,232,140,254,255, /* 0x 2a0 */
255,137,249,247,217,141, 4, 62,129,225,255, 15, 0, 0,137,243, /* 0x 2b0 */
137,202,137, 77,204,232,115,254,255,255,137,249,139, 85,216,106, /* 0x 2c0 */
125, 88,205,128,133,192,116, 10,106,127, 91,106, 1, 88,205,128, /* 0x 2d0 */
235,254,139, 85,204,141, 4, 23,141, 28, 6, 59, 93,208,115, 28, /* 0x 2e0 */
106, 0,106, 0,106, 50,255,117,216, 41, 93,208,255,117,208, 83, /* 0x 2f0 */
232,251,253,255,255,131,196, 24, 57,195,117,204,139, 77,240,255, /* 0x 300 */
69,220, 15,183, 65, 44,131, 69,228, 32, 57, 69,220, 15,140, 9, /* 0x 310 */
255,255,255,139, 93,232,106, 6, 88,205,128,133,192,117,169,139, /* 0x 320 */
69,240,139, 64, 24, 1, 69,224,139, 69,224,141,101,244, 91, 94, /* 0x 330 */
95,201,195, 85,137,229, 87, 86, 83,131,236, 36,141,117, 32,139, /* 0x 340 */
69, 16,141, 93, 24,139, 85, 20,137, 69,212,139, 69, 36,139,125, /* 0x 350 */
8,137, 85,208, 5, 85, 80, 88, 50,137, 69,240,139, 69,240, 5, /* 0x 360 */
85, 80, 88, 51,131,125, 32, 0,137, 69,236, 15,132,139, 0, 0, /* 0x 370 */
0,141, 85,220,137,216,106, 12,232,127,253,255,255, 88,139, 69, /* 0x 380 */
220,139, 77,224,133,192,117, 15,129,249, 85, 80, 88, 33,117, 11, /* 0x 390 */
131, 59, 0,116,103,235, 4,133,201,117, 10,106,127, 91,106, 1, /* 0x 3a0 */
88,205,128,235,254, 57,193,119,242, 59, 6,119,238, 57,193,115, /* 0x 3b0 */
44, 15,182, 69,228, 80,141, 69,216, 80,255,118, 4, 81,255,115, /* 0x 3c0 */
4,255, 85,212,131,196, 20,133,192,117,208,139, 69,220, 57, 69, /* 0x 3d0 */
216,117,200,139, 69,224, 1, 67, 4, 41, 3,235, 12,139, 86, 4, /* 0x 3e0 */
137,216, 81,232, 20,253,255,255, 88,139, 85,220,139, 6, 1, 86, /* 0x 3f0 */
4, 41,208,133,192,137, 6,233,111,255,255,255,139, 69,236,139, /* 0x 400 */
85,208,138, 24,139, 69,236,198, 0, 0,139, 69,240, 87,232, 39, /* 0x 410 */
253,255,255,139, 85,208,137,198,139, 69,236,136, 24, 15,183, 66, /* 0x 420 */
42,199, 71, 16, 3, 0, 0, 0,199, 71, 24, 4, 0, 0, 0,199, /* 0x 430 */
71, 32, 5, 0, 0, 0,137, 71, 28, 15,183, 66, 44,199, 71, 44, /* 0x 440 */
0, 16, 0, 0,137,119, 68,131,194, 52,199, 71, 40, 6, 0, 0, /* 0x 450 */
0,137, 71, 36,139, 69,208,199, 71, 64, 9, 0, 0, 0,102,139, /* 0x 460 */
88, 44, 89, 49,201,102,133,219,116, 34,131, 58, 3,117, 18,139, /* 0x 470 */
66, 8,106, 0,139, 85,208,232,190,252,255,255,137,198, 88,235, /* 0x 480 */
11, 65, 15,183,195,131,194, 32, 57,193,124,222,141,101,244,137, /* 0x 490 */
240, 91, 94, 95,201,195 /* 0x 4a0 */
88, 88,137,230,129,236, 80, 1, 0, 0,137,231,173,171,133,192, /* 0x 80 */
117,250,173,171,133,192,117,250, 87, 64,106, 82, 89,243,171, 72, /* 0x 90 */
171,171, 95,173,133,192,145,173,116, 15,131,249, 42,115,244,137, /* 0x a0 */
76,207,248,137, 68,207,252,235,234,129,236, 0, 10, 0, 0,147, /* 0x b0 */
141, 82, 24,139, 10,139, 90, 4,137,198, 96,232,126, 2, 0, 0, /* 0x c0 */
89, 80, 97,129,196, 0, 10, 0, 0, 89, 90, 82, 65, 86,131,238, /* 0x d0 */
3,102,199, 6, 45, 99, 65, 86, 65, 82, 81, 87,141,188, 36, 0, /* 0x e0 */
245,255,255, 96,137,227,137,252,185,192, 2, 0, 0, 49,192,243, /* 0x f0 */
171,137,220, 97,195, 83,141, 92, 36, 8,106, 90, 88,205,128, 91, /* 0x 100 */
195, 0, 0, 0, 87, 86, 83,137,195,139,124, 36, 16, 57, 56,139, /* 0x 110 */
112, 4,115, 10,106,127, 91,106, 1, 88,205,128,235,254,133,255, /* 0x 120 */
116, 10,137,249,138, 6, 70,136, 2, 66,226,248, 1,123, 4, 41, /* 0x 130 */
59, 91, 94, 95,195,133,210,137,209,116, 6,198, 0, 0, 64,226, /* 0x 140 */
250,195, 85, 49,201,137,229, 87, 86, 83,137,195,131,236, 52,137, /* 0x 150 */
85,240,139, 69, 8,137,202,137, 69,236,106, 5, 88,205,128,133, /* 0x 160 */
192,137, 69,232,121, 10,106,127, 91,106, 1, 88,205,128,235,254, /* 0x 170 */
186, 0, 2, 0, 0,139, 93,232,139, 77,240,106, 3, 88,205,128, /* 0x 180 */
61, 0, 2, 0, 0,117,223,139, 69,240,139, 85,240, 3, 64, 28, /* 0x 190 */
15,183, 90, 44,137, 69,228, 49,192,102,131,122, 16, 3,139, 77, /* 0x 1a0 */
228, 15,149,192,131,207,255,193,224, 4,131,192, 34, 49,210,137, /* 0x 1b0 */
69,212,137,216, 72,120, 33,137,222,131, 57, 1,117, 20,139, 65, /* 0x 1c0 */
8, 57,248,115, 2,137,199,139, 89, 20, 1,195, 57,218,115, 2, /* 0x 1d0 */
137,218,131,193, 32, 78,117,225,246, 69,212, 16,116, 7,137,211, /* 0x 1e0 */
106, 45, 88,205,128,137,251,106, 0,129,227, 0,240,255,255,106, /* 0x 1f0 */
255, 41,218,255,117,212,141,130,255, 15, 0, 0,106, 7, 37, 0, /* 0x 200 */
240,255,255, 80, 83,232,235,254,255,255,131,196, 24, 41,216,199, /* 0x 210 */
69,220, 0, 0, 0, 0,137, 69,224,139, 69,240,102,131,120, 44, /* 0x 220 */
0, 15,132,247, 0, 0, 0,139, 85,228,139, 2,131,248, 6,117, /* 0x 230 */
14,139, 66, 8,139, 77,236,137, 65, 20,233,200, 0, 0, 0, 72, /* 0x 240 */
15,133,193, 0, 0, 0,139, 93,228,199, 69,216, 64, 98, 81,115, /* 0x 250 */
139, 75, 24,139, 67, 8,131,225, 7,193,225, 2,137,194,211,109, /* 0x 260 */
216,139, 77,228, 3, 83, 20,137,195,139,121, 16,129,227,255, 15, /* 0x 270 */
0, 0,139, 77,224, 41,216, 1,223,131,101,216, 7, 1,202,141, /* 0x 280 */
52, 8,137, 85,204,139, 85,228,139, 66, 4, 41,216, 80,255,117, /* 0x 290 */
232,106, 18,106, 3, 87, 86,232, 89,254,255,255,131,196, 24, 57, /* 0x 2a0 */
198,117, 48,137,218,137,240,232,137,254,255,255,137,249,247,217, /* 0x 2b0 */
141, 4, 62,129,225,255, 15, 0, 0,137,243,137,202,137, 77,208, /* 0x 2c0 */
232,112,254,255,255,137,249,139, 85,216,106,125, 88,205,128,133, /* 0x 2d0 */
192,116, 10,106,127, 91,106, 1, 88,205,128,235,254,139, 85,208, /* 0x 2e0 */
141, 4, 23,141, 28, 6, 59, 93,204,115, 28,106, 0,106,255,106, /* 0x 2f0 */
50,255,117,216, 41, 93,204,255,117,204, 83,232,245,253,255,255, /* 0x 300 */
131,196, 24, 57,195,117,204,139, 77,240,255, 69,220, 15,183, 65, /* 0x 310 */
44,131, 69,228, 32, 57, 69,220, 15,140, 9,255,255,255,139, 93, /* 0x 320 */
232,106, 6, 88,205,128,133,192,117,169,139, 69,240,139, 64, 24, /* 0x 330 */
1, 69,224,139, 69,224,141,101,244, 91, 94, 95,201,195, 85,137, /* 0x 340 */
229, 87, 86, 83,131,236, 36,141,117, 32,139, 69, 16,141, 93, 24, /* 0x 350 */
139, 85, 20,137, 69,212,139, 69, 36,139,125, 8,137, 85,208, 5, /* 0x 360 */
85, 80, 88, 50,137, 69,240,139, 69,240, 5, 85, 80, 88, 51,131, /* 0x 370 */
125, 32, 0,137, 69,236, 15,132,139, 0, 0, 0,141, 85,220,137, /* 0x 380 */
216,106, 12,232,124,253,255,255, 88,139, 69,220,139, 77,224,133, /* 0x 390 */
192,117, 15,129,249, 85, 80, 88, 33,117, 11,131, 59, 0,116,103, /* 0x 3a0 */
235, 4,133,201,117, 10,106,127, 91,106, 1, 88,205,128,235,254, /* 0x 3b0 */
57,193,119,242, 59, 6,119,238, 57,193,115, 44, 15,182, 69,228, /* 0x 3c0 */
80,141, 69,216, 80,255,118, 4, 81,255,115, 4,255, 85,212,131, /* 0x 3d0 */
196, 20,133,192,117,208,139, 69,220, 57, 69,216,117,200,139, 69, /* 0x 3e0 */
224, 1, 67, 4, 41, 3,235, 12,139, 86, 4,137,216, 81,232, 17, /* 0x 3f0 */
253,255,255, 88,139, 85,220,139, 6, 1, 86, 4, 41,208,133,192, /* 0x 400 */
137, 6,233,111,255,255,255,139, 69,236,139, 85,208,138, 24,139, /* 0x 410 */
69,236,198, 0, 0,139, 69,240, 87,232, 36,253,255,255,139, 85, /* 0x 420 */
208,137,198,139, 69,236,136, 24, 15,183, 66, 42,199, 71, 16, 3, /* 0x 430 */
0, 0, 0,199, 71, 24, 4, 0, 0, 0,199, 71, 32, 5, 0, 0, /* 0x 440 */
0,137, 71, 28, 15,183, 66, 44,199, 71, 44, 0, 16, 0, 0,137, /* 0x 450 */
119, 68,131,194, 52,199, 71, 40, 6, 0, 0, 0,137, 71, 36,139, /* 0x 460 */
69,208,199, 71, 64, 9, 0, 0, 0,102,139, 88, 44, 89, 49,201, /* 0x 470 */
102,133,219,116, 34,131, 58, 3,117, 18,139, 66, 8,106, 0,139, /* 0x 480 */
85,208,232,187,252,255,255,137,198, 88,235, 11, 65, 15,183,195, /* 0x 490 */
131,194, 32, 57,193,124,222,141,101,244,137,240, 91, 94, 95,201, /* 0x 4a0 */
195 /* 0x 4b0 */
};
-63
View File
@@ -1,63 +0,0 @@
; l_armwce.asm -- loader & decompressor for the arm/wince/pe format
;
; This file is part of the UPX executable compressor.
;
; Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
; Copyright (C) 1996-2004 Laszlo Molnar
; All Rights Reserved.
;
; UPX and the UCL library are free software; you can redistribute them
; and/or modify them under the terms of the GNU General Public License as
; published by the Free Software Foundation; either version 2 of
; the License, or (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with this program; see the file COPYING.
; If not, write to the Free Software Foundation, Inc.,
; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
;
; Markus F.X.J. Oberhumer Laszlo Molnar
; <mfx@users.sourceforge.net> <ml1050@users.sourceforge.net>
;
%define jmps jmp short
%define jmpn jmp near
%include "macros.ash"
BITS 32
SECTION .text
ORG 0
CPU 386
; =============
; ============= ENTRY POINT
; =============
; __ARMPEAXE__
%include "l_armpe_axe.ah"
; __ARMPEADE__
%include "l_armpe_ade.ah"
; __ARMPETXE__
%include "l_armpe_txe.ah"
; __ARMPETDE__
%include "l_armpe_tde.ah"
; __ARMPETXB__
%include "l_armpe_txb.ah"
; __ARMPETDB__
%include "l_armpe_tdb.ah"
; __ARMPEHEAD__
%include "header.ash"
eof:
; __ARMPEEOF__
section .data
dd -1
dw eof
; vi:ts=8:et:nowrap
-292
View File
@@ -1,292 +0,0 @@
/* l_armpe.h -- created from l_armpe.bin, 4112 (0x1010) bytes
This file is part of the UPX executable compressor.
Copyright (C) 1996-2006 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2006 Laszlo Molnar
Copyright (C) 2000-2006 John F. Reiser
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
and/or modify them under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING.
If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
<mfx@users.sourceforge.net> <ml1050@users.sourceforge.net>
*/
#define NRV_LOADER_SIZE 4112
#define NRV_LOADER_ADLER32 0x78258e9b
#define NRV_LOADER_CRC32 0xa3de7215
unsigned char nrv_loader[4112] = {
15, 64, 45,233,132, 0,143,226, 45, 0, 0,235, 15, 64,189,232, /* 0x 0 */
152,240,159,229,144, 48,159,229, 0,240,147,229,132, 48,159,229, /* 0x 10 */
0,240,147,229,148, 48,159,229, 0,240,147,229,132, 0,159,229, /* 0x 20 */
0, 32,160,227,128,192,159,229, 12, 0, 80,225, 14,240,160, 1, /* 0x 30 */
3, 48,208,229, 15, 48, 3,226, 11, 0, 83,227, 5, 0, 0, 26, /* 0x 40 */
0, 48,144,229,255, 20, 3,226, 2, 48, 67,224,255, 52,195,227, /* 0x 50 */
1, 48,131,225, 0, 48,128,229, 4, 0,128,226, 1, 32,130,226, /* 0x 60 */
240,255,255,234, 3, 32,160,227, 2, 48,208,231, 1, 32, 82,226, /* 0x 70 */
1, 20,131,224,251,255,255, 90, 1, 0,160,225, 14,240,160,225, /* 0x 80 */
83, 82, 67, 48, 83, 82, 67, 76, 68, 83, 84, 48, 68, 83, 84, 76, /* 0x 90 */
66, 73, 77, 80, 79, 78, 65, 77, 71, 69, 84, 80, 76, 79, 65, 68, /* 0x a0 */
69, 78, 84, 82, 66, 82, 69, 76, 70, 73, 66, 83, 70, 73, 66, 69, /* 0x b0 */
67, 83, 89, 78,240, 65, 45,233, 0,224,160,227,132,208, 77,226, /* 0x c0 */
8,112,144,229, 0,192,160,225, 3, 0,144,232, 0,224,141,229, /* 0x d0 */
7, 32,160,225, 13, 48,160,225, 16, 64,140,226, 16, 1,148,232, /* 0x e0 */
55, 0, 0,235,204,255,255,235, 4, 0,160,225,220,255,255,235, /* 0x f0 */
0, 80, 80,226, 46, 0, 0, 10, 4, 0,132,226,216,255,255,235, /* 0x 100 */
8, 80,133,224, 0, 48,213,229, 4, 16,141,226, 0, 0, 83,227, /* 0x 110 */
7, 96,128,224, 1, 32,160,225, 3, 0, 0, 10,178, 48,194,224, /* 0x 120 */
1, 48,245,229, 0, 0, 83,227,250,255,255,234, 0, 48,160,227, /* 0x 130 */
176, 48,194,225, 1, 0,160,225,177,255,255,235, 8, 48,244,229, /* 0x 140 */
0, 80,160,225, 0, 0, 83,227, 23, 0, 0, 10,255, 48, 3,226, /* 0x 150 */
1, 0, 83,227, 1, 64,132,226, 2, 0, 0, 10,255, 0, 83,227, /* 0x 160 */
8, 0, 0, 10, 14, 0, 0,234, 5, 0,160,225, 4, 16,160,225, /* 0x 170 */
165,255,255,235, 4, 0,134,228, 1, 48,212,228, 0, 0, 83,227, /* 0x 180 */
252,255,255, 26, 6, 0, 0,234, 0, 48,212,229, 1, 16,212,229, /* 0x 190 */
5, 0,160,225, 1, 20,131,224,155,255,255,235, 2, 64,132,226, /* 0x 1a0 */
4, 0,134,228, 0, 48,212,229,229,255,255,234, 1, 64,132,226, /* 0x 1b0 */
204,255,255,234, 4, 0,160,227,149,255,255,235,132,208,141,226, /* 0x 1c0 */
240,129,189,232,252, 64, 45,233, 0,112,129,224, 0, 80,224,227, /* 0x 1d0 */
2, 65,160,227, 10, 0, 0,234, 24, 0,189,232, 7, 0, 64,224, /* 0x 1e0 */
3, 32, 66,224, 0, 32,132,229,240,128,189,232, 1, 64,208,228, /* 0x 1f0 */
4, 64,164,224, 4, 76,176,225, 14,240,160,225, 1, 48,208,228, /* 0x 200 */
1, 48,194,228, 4, 64,148,224,247,255,255, 11,250,255,255, 42, /* 0x 210 */
1, 16,160,227, 3, 0, 0,234, 1, 16, 65,226, 4, 64,148,224, /* 0x 220 */
241,255,255, 11, 1, 16,161,224, 4, 64,148,224,238,255,255, 11, /* 0x 230 */
1, 16,161,224, 4, 64,148,224,235,255,255, 11,245,255,255, 58, /* 0x 240 */
3, 48, 81,226, 0, 16,160,227, 6, 0, 0, 58, 1, 80,208,228, /* 0x 250 */
3, 84,133,225, 5, 80,240,225,222,255,255, 10,197, 80,176,225, /* 0x 260 */
15, 0, 0, 42, 2, 0, 0,234, 4, 64,148,224,222,255,255, 11, /* 0x 270 */
11, 0, 0, 42, 1, 16,160,227, 4, 64,148,224,218,255,255, 11, /* 0x 280 */
7, 0, 0, 42, 4, 64,148,224,215,255,255, 11, 1, 16,161,224, /* 0x 290 */
4, 64,148,224,212,255,255, 11,249,255,255, 58, 4, 16,129,226, /* 0x 2a0 */
3, 0, 0,234, 4, 64,148,224,207,255,255, 11, 1, 16,161,224, /* 0x 2b0 */
2, 16,129,226, 5, 12,117,227, 0, 0, 0, 42, 1, 16,129,226, /* 0x 2c0 */
0, 48,210,229, 5, 48,210,231, 1, 48,194,228, 1, 16, 81,226, /* 0x 2d0 */
251,255,255, 26,202,255,255,234, 1, 0, 81,227, 3, 0, 0, 26, /* 0x 2e0 */
15, 64, 45,233,228, 0,143,226, 69, 0, 0,235, 15, 64,189,232, /* 0x 2f0 */
248,240,159,229,240, 48,159,229, 0,240,147,229,228, 48,159,229, /* 0x 300 */
0,240,147,229,244, 48,159,229, 0,240,147,229,228, 0,159,229, /* 0x 310 */
0, 32,160,227,224,192,159,229, 12, 0, 80,225, 14,240,160, 1, /* 0x 320 */
3, 48,208,229, 15, 48, 3,226, 11, 0, 83,227, 5, 0, 0, 26, /* 0x 330 */
0, 48,144,229,255, 20, 3,226, 2, 48, 67,224,255, 52,195,227, /* 0x 340 */
1, 48,131,225, 0, 48,128,229, 4, 0,128,226, 1, 32,130,226, /* 0x 350 */
240,255,255,234, 3, 32,160,227, 2, 48,208,231, 1, 32, 82,226, /* 0x 360 */
1, 20,131,224,251,255,255, 90, 1, 0,160,225, 14,240,160,225, /* 0x 370 */
124, 0,159,229, 92, 32,159,229, 4, 16, 66,226, 1, 48,208,228, /* 0x 380 */
0, 0, 83,227, 14,240,160, 1,240, 0, 83,227,240,192,195, 35, /* 0x 390 */
1, 48,208, 37, 12,196,131, 32, 2, 48,208, 36, 12, 52,131, 32, /* 0x 3a0 */
3, 16,129,224, 0, 48,209,229, 12,196,131,224, 1, 48,209,229, /* 0x 3b0 */
12,196,131,224, 2, 48,209,229, 12,196,131,224, 3, 48,209,229, /* 0x 3c0 */
12,196,131,224, 2,192,140,224, 0,192,129,229,234,255,255,234, /* 0x 3d0 */
83, 82, 67, 48, 83, 82, 67, 76, 68, 83, 84, 48, 68, 83, 84, 76, /* 0x 3e0 */
66, 73, 77, 80, 79, 78, 65, 77, 71, 69, 84, 80, 76, 79, 65, 68, /* 0x 3f0 */
69, 78, 84, 82, 66, 82, 69, 76, 70, 73, 66, 83, 70, 73, 66, 69, /* 0x 400 */
67, 83, 89, 78,240, 65, 45,233, 0,224,160,227,132,208, 77,226, /* 0x 410 */
8,112,144,229, 0,192,160,225, 3, 0,144,232, 0,224,141,229, /* 0x 420 */
7, 32,160,225, 13, 48,160,225, 16, 64,140,226, 16, 1,148,232, /* 0x 430 */
56, 0, 0,235,180,255,255,235, 4, 0,160,225,196,255,255,235, /* 0x 440 */
0, 80, 80,226, 46, 0, 0, 10, 4, 0,132,226,192,255,255,235, /* 0x 450 */
8, 80,133,224, 0, 48,213,229, 4, 16,141,226, 0, 0, 83,227, /* 0x 460 */
7, 96,128,224, 1, 32,160,225, 3, 0, 0, 10,178, 48,194,224, /* 0x 470 */
1, 48,245,229, 0, 0, 83,227,250,255,255,234, 0, 48,160,227, /* 0x 480 */
176, 48,194,225, 1, 0,160,225,153,255,255,235, 8, 48,244,229, /* 0x 490 */
0, 80,160,225, 0, 0, 83,227, 23, 0, 0, 10,255, 48, 3,226, /* 0x 4a0 */
1, 0, 83,227, 1, 64,132,226, 2, 0, 0, 10,255, 0, 83,227, /* 0x 4b0 */
8, 0, 0, 10, 14, 0, 0,234, 5, 0,160,225, 4, 16,160,225, /* 0x 4c0 */
141,255,255,235, 4, 0,134,228, 1, 48,212,228, 0, 0, 83,227, /* 0x 4d0 */
252,255,255, 26, 6, 0, 0,234, 0, 48,212,229, 1, 16,212,229, /* 0x 4e0 */
5, 0,160,225, 1, 20,131,224,131,255,255,235, 2, 64,132,226, /* 0x 4f0 */
4, 0,134,228, 0, 48,212,229,229,255,255,234, 1, 64,132,226, /* 0x 500 */
204,255,255,234,153,255,255,235, 4, 0,160,227,124,255,255,235, /* 0x 510 */
132,208,141,226,240,129,189,232,252, 64, 45,233, 0,112,129,224, /* 0x 520 */
0, 80,224,227, 2, 65,160,227, 10, 0, 0,234, 24, 0,189,232, /* 0x 530 */
7, 0, 64,224, 3, 32, 66,224, 0, 32,132,229,240,128,189,232, /* 0x 540 */
1, 64,208,228, 4, 64,164,224, 4, 76,176,225, 14,240,160,225, /* 0x 550 */
1, 48,208,228, 1, 48,194,228, 4, 64,148,224,247,255,255, 11, /* 0x 560 */
250,255,255, 42, 1, 16,160,227, 3, 0, 0,234, 1, 16, 65,226, /* 0x 570 */
4, 64,148,224,241,255,255, 11, 1, 16,161,224, 4, 64,148,224, /* 0x 580 */
238,255,255, 11, 1, 16,161,224, 4, 64,148,224,235,255,255, 11, /* 0x 590 */
245,255,255, 58, 3, 48, 81,226, 0, 16,160,227, 6, 0, 0, 58, /* 0x 5a0 */
1, 80,208,228, 3, 84,133,225, 5, 80,240,225,222,255,255, 10, /* 0x 5b0 */
197, 80,176,225, 15, 0, 0, 42, 2, 0, 0,234, 4, 64,148,224, /* 0x 5c0 */
222,255,255, 11, 11, 0, 0, 42, 1, 16,160,227, 4, 64,148,224, /* 0x 5d0 */
218,255,255, 11, 7, 0, 0, 42, 4, 64,148,224,215,255,255, 11, /* 0x 5e0 */
1, 16,161,224, 4, 64,148,224,212,255,255, 11,249,255,255, 58, /* 0x 5f0 */
4, 16,129,226, 3, 0, 0,234, 4, 64,148,224,207,255,255, 11, /* 0x 600 */
1, 16,161,224, 2, 16,129,226, 5, 12,117,227, 0, 0, 0, 42, /* 0x 610 */
1, 16,129,226, 0, 48,210,229, 5, 48,210,231, 1, 48,194,228, /* 0x 620 */
1, 16, 81,226,251,255,255, 26,202,255,255,234, 15, 64, 45,233, /* 0x 630 */
128, 0,143,226, 14, 0,144,232, 2, 16,129,224, 0, 32,147,229, /* 0x 640 */
1, 58,131,226, 1, 0, 83,225,251,255,255,154, 31,192,143,226, /* 0x 650 */
15,224,160,225, 28,255, 47,225, 15, 64,189,232,116,192,159,229, /* 0x 660 */
28,255, 47,225, 26, 75, 27,104, 24, 71, 26, 75,251,231, 30, 75, /* 0x 670 */
249,231, 59,224,240,181, 26, 72, 0, 34, 26, 76, 15, 37,255, 38, /* 0x 680 */
54, 6,247, 67,160, 66, 13,208,195,120, 43, 64, 11, 43, 6,209, /* 0x 690 */
3,104, 25, 28, 49, 64,155, 26, 59, 64, 11, 67, 3, 96, 4, 48, /* 0x 6a0 */
1, 50,239,231,240,189, 3, 33, 67, 92, 18, 2,210, 24, 1, 57, /* 0x 6b0 */
250,213, 16, 28,112, 71, 0, 0, 83, 82, 67, 48, 83, 82, 67, 76, /* 0x 6c0 */
68, 83, 84, 48, 68, 83, 84, 76, 66, 73, 77, 80, 79, 78, 65, 77, /* 0x 6d0 */
71, 69, 84, 80, 76, 79, 65, 68, 69, 78, 84, 82, 66, 82, 69, 76, /* 0x 6e0 */
70, 73, 66, 83, 70, 73, 66, 69, 67, 83, 89, 78,240,181,163,176, /* 0x 6f0 */
0, 34, 2,146,130,104, 1,146, 66,105, 3, 28, 4,105, 89,104, /* 0x 700 */
0,146, 2,171, 1,154, 0,104, 0,240, 82,248,255,247,178,255, /* 0x 710 */
37, 28, 40, 28,255,247,199,255, 4, 30, 61,208, 0,155, 40, 29, /* 0x 720 */
228, 24,255,247,192,255, 1,154,134, 24, 3,168, 2, 28, 35,120, /* 0x 730 */
27, 6, 0, 43, 4,208, 27, 14, 19,128, 1, 52, 2, 50,246,231, /* 0x 740 */
0, 35, 19,128,255,247,145,255, 8, 53, 7, 28, 43,120, 27, 6, /* 0x 750 */
0, 43, 31,208, 27, 14, 1, 53, 1, 43, 2,208,255, 43, 13,208, /* 0x 760 */
244,231, 56, 28, 41, 28,255,247,125,255, 52, 28, 32, 96, 4, 54, /* 0x 770 */
43,120, 27, 6, 1, 53, 0, 43,250,209,231,231,105,120, 43,120, /* 0x 780 */
9, 2, 56, 28, 89, 24,255,247,109,255, 52, 28, 2, 53, 4, 54, /* 0x 790 */
32, 96,219,231, 1, 53,188,231, 4, 32,255,247,104,255, 35,176, /* 0x 7a0 */
240,188, 1,188, 0, 71,192, 70, 1,192,143,226, 28,255, 47,225, /* 0x 7b0 */
252,181, 15, 24, 1, 36,101, 66,228, 7, 5, 38, 54, 2, 15,224, /* 0x 7c0 */
24,188,192, 27,210, 26, 34, 96,240,188, 2,188, 8, 71, 4,120, /* 0x 7d0 */
100, 65, 1, 48, 36, 6,247, 70, 3,120, 1, 48, 19,112, 1, 50, /* 0x 7e0 */
36, 25,254, 70,243,208,247,210, 1, 33, 4,224, 1, 57, 36, 25, /* 0x 7f0 */
254, 70,236,208, 73, 65, 36, 25,254, 70,232,208, 73, 65, 36, 25, /* 0x 800 */
254, 70,228,208,242,211,203, 30, 0, 33, 8,211, 27, 2, 5,120, /* 0x 810 */
1, 48, 29, 67,237, 67,211,208,109, 16, 19,210, 3,224, 36, 25, /* 0x 820 */
254, 70,212,208, 14,210, 1, 33, 36, 25,254, 70,207,208, 9,210, /* 0x 830 */
36, 25,254, 70,203,208, 73, 65, 36, 25,254, 70,199,208,247,211, /* 0x 840 */
4, 49, 4,224, 36, 25,254, 70,193,208, 73, 65, 2, 49,238, 66, /* 0x 850 */
0,210, 1, 49, 19,120, 83, 93, 19,112, 1, 50, 1, 57,250,209, /* 0x 860 */
190,231, 0, 0, 1, 0, 81,227, 11, 0, 0, 26, 15, 64, 45,233, /* 0x 870 */
188, 0,143,226, 14, 0,144,232, 2, 16,129,224, 0, 32,147,229, /* 0x 880 */
1, 58,131,226, 1, 0, 83,225,251,255,255,154, 31,192,143,226, /* 0x 890 */
15,224,160,225, 28,255, 47,225, 15, 64,189,232,176,192,159,229, /* 0x 8a0 */
28,255, 47,225, 41, 75, 27,104, 24, 71, 41, 75,251,231, 45, 75, /* 0x 8b0 */
249,231, 89,224,240,181, 41, 72, 0, 34, 41, 76, 15, 37,255, 38, /* 0x 8c0 */
54, 6,247, 67,160, 66, 13,208,195,120, 43, 64, 11, 43, 6,209, /* 0x 8d0 */
3,104, 25, 28, 49, 64,155, 26, 59, 64, 11, 67, 3, 96, 4, 48, /* 0x 8e0 */
1, 50,239,231,240,189, 3, 33, 67, 92, 18, 2,210, 24, 1, 57, /* 0x 8f0 */
250,213, 16, 28,112, 71, 48,181, 23, 72, 16, 74, 17, 31, 3,120, /* 0x 900 */
1, 48, 0, 43, 21,208,240, 43, 8,211, 15, 36, 28, 64, 67,120, /* 0x 910 */
36, 2,228, 24, 3,120, 2, 48, 36, 2, 27, 25,201, 24, 0, 37, /* 0x 920 */
75, 93, 36, 2,228, 24, 1, 53, 4, 45,249,209,164, 24, 12, 96, /* 0x 930 */
229,231, 48,189, 83, 82, 67, 48, 83, 82, 67, 76, 68, 83, 84, 48, /* 0x 940 */
68, 83, 84, 76, 66, 73, 77, 80, 79, 78, 65, 77, 71, 69, 84, 80, /* 0x 950 */
76, 79, 65, 68, 69, 78, 84, 82, 66, 82, 69, 76, 70, 73, 66, 83, /* 0x 960 */
70, 73, 66, 69, 67, 83, 89, 78,240,181,163,176, 0, 34, 2,146, /* 0x 970 */
130,104, 1,146, 66,105, 3, 28, 4,105, 89,104, 0,146, 2,171, /* 0x 980 */
1,154, 0,104, 0,240, 84,248,255,247,148,255, 37, 28, 40, 28, /* 0x 990 */
255,247,169,255, 4, 30, 61,208, 0,155, 40, 29,228, 24,255,247, /* 0x 9a0 */
162,255, 1,154,134, 24, 3,168, 2, 28, 35,120, 27, 6, 0, 43, /* 0x 9b0 */
4,208, 27, 14, 19,128, 1, 52, 2, 50,246,231, 0, 35, 19,128, /* 0x 9c0 */
255,247,115,255, 8, 53, 7, 28, 43,120, 27, 6, 0, 43, 31,208, /* 0x 9d0 */
27, 14, 1, 53, 1, 43, 2,208,255, 43, 13,208,244,231, 56, 28, /* 0x 9e0 */
41, 28,255,247, 95,255, 52, 28, 32, 96, 4, 54, 43,120, 27, 6, /* 0x 9f0 */
1, 53, 0, 43,250,209,231,231,105,120, 43,120, 9, 2, 56, 28, /* 0x a00 */
89, 24,255,247, 79,255, 52, 28, 2, 53, 4, 54, 32, 96,219,231, /* 0x a10 */
1, 53,188,231,255,247,111,255, 4, 32,255,247, 72,255, 35,176, /* 0x a20 */
240,188, 1,188, 0, 71,192, 70, 1,192,143,226, 28,255, 47,225, /* 0x a30 */
252,181, 15, 24, 1, 36,101, 66,228, 7, 5, 38, 54, 2, 15,224, /* 0x a40 */
24,188,192, 27,210, 26, 34, 96,240,188, 2,188, 8, 71, 4,120, /* 0x a50 */
100, 65, 1, 48, 36, 6,247, 70, 3,120, 1, 48, 19,112, 1, 50, /* 0x a60 */
36, 25,254, 70,243,208,247,210, 1, 33, 4,224, 1, 57, 36, 25, /* 0x a70 */
254, 70,236,208, 73, 65, 36, 25,254, 70,232,208, 73, 65, 36, 25, /* 0x a80 */
254, 70,228,208,242,211,203, 30, 0, 33, 8,211, 27, 2, 5,120, /* 0x a90 */
1, 48, 29, 67,237, 67,211,208,109, 16, 19,210, 3,224, 36, 25, /* 0x aa0 */
254, 70,212,208, 14,210, 1, 33, 36, 25,254, 70,207,208, 9,210, /* 0x ab0 */
36, 25,254, 70,203,208, 73, 65, 36, 25,254, 70,199,208,247,211, /* 0x ac0 */
4, 49, 4,224, 36, 25,254, 70,193,208, 73, 65, 2, 49,238, 66, /* 0x ad0 */
0,210, 1, 49, 19,120, 83, 93, 19,112, 1, 50, 1, 57,250,209, /* 0x ae0 */
190,231, 0, 0, 15, 64, 45,233,128, 0,143,226, 14, 0,144,232, /* 0x af0 */
2, 16,129,224, 0, 32,147,229, 1, 58,131,226, 1, 0, 83,225, /* 0x b00 */
251,255,255,154, 31,192,143,226, 15,224,160,225, 28,255, 47,225, /* 0x b10 */
15, 64,189,232,116,192,159,229, 28,255, 47,225, 26, 75, 27,104, /* 0x b20 */
24, 71, 26, 75,251,231, 30, 75,249,231, 59,224,240,181, 26, 72, /* 0x b30 */
0, 34, 26, 76, 15, 37,255, 38, 54, 6,247, 67,160, 66, 13,208, /* 0x b40 */
195,120, 43, 64, 11, 43, 6,209, 3,104, 25, 28, 49, 64,155, 26, /* 0x b50 */
59, 64, 11, 67, 3, 96, 4, 48, 1, 50,239,231,240,189, 3, 33, /* 0x b60 */
67, 92, 18, 2,210, 24, 1, 57,250,213, 16, 28,112, 71, 0, 0, /* 0x b70 */
83, 82, 67, 48, 83, 82, 67, 76, 68, 83, 84, 48, 68, 83, 84, 76, /* 0x b80 */
66, 73, 77, 80, 79, 78, 65, 77, 71, 69, 84, 80, 76, 79, 65, 68, /* 0x b90 */
69, 78, 84, 82, 66, 82, 69, 76, 70, 73, 66, 83, 70, 73, 66, 69, /* 0x ba0 */
67, 83, 89, 78,240,181,163,176, 0, 34, 2,146,130,104, 1,146, /* 0x bb0 */
66,105, 3, 28, 4,105, 89,104, 0,146, 2,171, 1,154, 0,104, /* 0x bc0 */
0,240, 82,248,255,247,178,255, 37, 28, 40, 28,255,247,199,255, /* 0x bd0 */
4, 30, 61,208, 0,155, 40, 29,228, 24,255,247,192,255, 1,154, /* 0x be0 */
134, 24, 3,168, 2, 28, 35,120, 27, 6, 0, 43, 4,208, 27, 14, /* 0x bf0 */
19,128, 1, 52, 2, 50,246,231, 0, 35, 19,128,255,247,145,255, /* 0x c00 */
8, 53, 7, 28, 43,120, 27, 6, 0, 43, 31,208, 27, 14, 1, 53, /* 0x c10 */
1, 43, 2,208,255, 43, 13,208,244,231, 56, 28, 41, 28,255,247, /* 0x c20 */
125,255, 52, 28, 32, 96, 4, 54, 43,120, 27, 6, 1, 53, 0, 43, /* 0x c30 */
250,209,231,231,105,120, 43,120, 9, 2, 56, 28, 89, 24,255,247, /* 0x c40 */
109,255, 52, 28, 2, 53, 4, 54, 32, 96,219,231, 1, 53,188,231, /* 0x c50 */
4, 32,255,247,104,255, 35,176,240,188, 1,188, 0, 71,192, 70, /* 0x c60 */
1,192,143,226, 28,255, 47,225, 9, 24,254,181, 1, 36,101, 66, /* 0x c70 */
228, 7, 13, 39, 63, 2, 15,224, 26,188, 64, 26,210, 26, 34, 96, /* 0x c80 */
240,188, 2,188, 8, 71, 4,120,100, 65, 1, 48, 36, 6,247, 70, /* 0x c90 */
3,120, 1, 48, 19,112, 1, 50, 36, 25,254, 70,243,208,247,210, /* 0x ca0 */
1, 33, 36, 25,254, 70,238,208, 73, 65, 36, 25,254, 70,234,208, /* 0x cb0 */
247,211,203, 30, 0, 33, 5,211, 27, 2, 5,120, 1, 48, 29, 67, /* 0x cc0 */
237, 67,217,208, 36, 25,254, 70,221,208, 73, 65, 36, 25,254, 70, /* 0x cd0 */
217,208, 73, 65, 9,209, 1, 33, 36, 25,254, 70,211,208, 73, 65, /* 0x ce0 */
36, 25,254, 70,207,208,247,211, 2, 49, 1, 49,253, 66, 0,210, /* 0x cf0 */
1, 49, 19,120, 83, 93, 19,112, 1, 50, 1, 57,250,209,203,231, /* 0x d00 */
1, 0, 81,227, 11, 0, 0, 26, 15, 64, 45,233,188, 0,143,226, /* 0x d10 */
14, 0,144,232, 2, 16,129,224, 0, 32,147,229, 1, 58,131,226, /* 0x d20 */
1, 0, 83,225,251,255,255,154, 31,192,143,226, 15,224,160,225, /* 0x d30 */
28,255, 47,225, 15, 64,189,232,176,192,159,229, 28,255, 47,225, /* 0x d40 */
41, 75, 27,104, 24, 71, 41, 75,251,231, 45, 75,249,231, 89,224, /* 0x d50 */
240,181, 41, 72, 0, 34, 41, 76, 15, 37,255, 38, 54, 6,247, 67, /* 0x d60 */
160, 66, 13,208,195,120, 43, 64, 11, 43, 6,209, 3,104, 25, 28, /* 0x d70 */
49, 64,155, 26, 59, 64, 11, 67, 3, 96, 4, 48, 1, 50,239,231, /* 0x d80 */
240,189, 3, 33, 67, 92, 18, 2,210, 24, 1, 57,250,213, 16, 28, /* 0x d90 */
112, 71, 48,181, 23, 72, 16, 74, 17, 31, 3,120, 1, 48, 0, 43, /* 0x da0 */
21,208,240, 43, 8,211, 15, 36, 28, 64, 67,120, 36, 2,228, 24, /* 0x db0 */
3,120, 2, 48, 36, 2, 27, 25,201, 24, 0, 37, 75, 93, 36, 2, /* 0x dc0 */
228, 24, 1, 53, 4, 45,249,209,164, 24, 12, 96,229,231, 48,189, /* 0x dd0 */
83, 82, 67, 48, 83, 82, 67, 76, 68, 83, 84, 48, 68, 83, 84, 76, /* 0x de0 */
66, 73, 77, 80, 79, 78, 65, 77, 71, 69, 84, 80, 76, 79, 65, 68, /* 0x df0 */
69, 78, 84, 82, 66, 82, 69, 76, 70, 73, 66, 83, 70, 73, 66, 69, /* 0x e00 */
67, 83, 89, 78,240,181,163,176, 0, 34, 2,146,130,104, 1,146, /* 0x e10 */
66,105, 3, 28, 4,105, 89,104, 0,146, 2,171, 1,154, 0,104, /* 0x e20 */
0,240, 84,248,255,247,148,255, 37, 28, 40, 28,255,247,169,255, /* 0x e30 */
4, 30, 61,208, 0,155, 40, 29,228, 24,255,247,162,255, 1,154, /* 0x e40 */
134, 24, 3,168, 2, 28, 35,120, 27, 6, 0, 43, 4,208, 27, 14, /* 0x e50 */
19,128, 1, 52, 2, 50,246,231, 0, 35, 19,128,255,247,115,255, /* 0x e60 */
8, 53, 7, 28, 43,120, 27, 6, 0, 43, 31,208, 27, 14, 1, 53, /* 0x e70 */
1, 43, 2,208,255, 43, 13,208,244,231, 56, 28, 41, 28,255,247, /* 0x e80 */
95,255, 52, 28, 32, 96, 4, 54, 43,120, 27, 6, 1, 53, 0, 43, /* 0x e90 */
250,209,231,231,105,120, 43,120, 9, 2, 56, 28, 89, 24,255,247, /* 0x ea0 */
79,255, 52, 28, 2, 53, 4, 54, 32, 96,219,231, 1, 53,188,231, /* 0x eb0 */
255,247,111,255, 4, 32,255,247, 72,255, 35,176,240,188, 1,188, /* 0x ec0 */
0, 71,192, 70, 1,192,143,226, 28,255, 47,225, 9, 24,254,181, /* 0x ed0 */
1, 36,101, 66,228, 7, 13, 39, 63, 2, 15,224, 26,188, 64, 26, /* 0x ee0 */
210, 26, 34, 96,240,188, 2,188, 8, 71, 4,120,100, 65, 1, 48, /* 0x ef0 */
36, 6,247, 70, 3,120, 1, 48, 19,112, 1, 50, 36, 25,254, 70, /* 0x f00 */
243,208,247,210, 1, 33, 36, 25,254, 70,238,208, 73, 65, 36, 25, /* 0x f10 */
254, 70,234,208,247,211,203, 30, 0, 33, 5,211, 27, 2, 5,120, /* 0x f20 */
1, 48, 29, 67,237, 67,217,208, 36, 25,254, 70,221,208, 73, 65, /* 0x f30 */
36, 25,254, 70,217,208, 73, 65, 9,209, 1, 33, 36, 25,254, 70, /* 0x f40 */
211,208, 73, 65, 36, 25,254, 70,207,208,247,211, 2, 49, 1, 49, /* 0x f50 */
253, 66, 0,210, 1, 49, 19,120, 83, 93, 19,112, 1, 50, 1, 57, /* 0x f60 */
250,209,203,231, 85, 80, 88, 33,161,216,208,213, 0, 0, 0, 0, /* 0x f70 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x f80 */
0, 0, 0, 45, 65, 82, 77, 80, 69, 65, 88, 69, 0, 0, 0, 0, /* 0x f90 */
0, 65, 82, 77, 80, 69, 65, 68, 69, 0,232, 2, 0, 0, 65, 82, /* 0x fa0 */
77, 80, 69, 84, 88, 69, 0, 60, 6, 0, 0, 65, 82, 77, 80, 69, /* 0x fb0 */
84, 68, 69, 0,116, 8, 0, 0, 65, 82, 77, 80, 69, 84, 88, 66, /* 0x fc0 */
0,244, 10, 0, 0, 65, 82, 77, 80, 69, 84, 68, 66, 0, 16, 13, /* 0x fd0 */
0, 0, 65, 82, 77, 80, 69, 72, 69, 65, 68, 0,116, 15, 0, 0, /* 0x fe0 */
85, 80, 88, 49, 72, 69, 65, 68, 0,116, 15, 0, 0, 65, 82, 77, /* 0x ff0 */
80, 69, 69, 79, 70, 0,148, 15, 0, 0,255,255,255,255,148, 15 /* 0x1000 */
};
-144
View File
@@ -1,144 +0,0 @@
/* l_armpe_c.c -- ARM/PE decompressor for NRV2E
This file is part of the UPX executable compressor.
Copyright (C) 1996-2006 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2006 Laszlo Molnar
Copyright (C) 2000-2006 John F. Reiser
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
and/or modify them under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING.
If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
<mfx@users.sourceforge.net> <ml1050@users.sourceforge.net>
John F. Reiser
<jreiser@users.sourceforge.net>
*/
#ifndef UCL_DECOMPRESS
# error please define UCL_DECOMPRESS
#endif
int UCL_DECOMPRESS(const unsigned char * src, unsigned src_len,
unsigned char * dst, unsigned * dst_len);
void *LoadLibraryW(const unsigned short *);
void *GetProcAddressA(const void *, const void *);
void *get_le32(const void *);
void reloc_main();
void Unfilter_0x50();
void CacheSync(unsigned);
static void handle_imports(const unsigned char *imp, unsigned name_offset,
unsigned iat_offset)
{
unsigned short buf[64];
while (1)
{
unsigned short *b;
//printf("name=%p iat=%p\n", get_le32(imp), get_le32(imp + 4));
unsigned char *name = get_le32(imp);
if (name == 0)
break;
name += name_offset;
unsigned *iat = get_le32(imp + 4) + iat_offset;
//printf("name=%p iat=%p\n", name, iat);
for (b = buf; *name; name++, b++)
*b = *name;
*b = 0;
void *dll = LoadLibraryW(buf);
imp += 8;
unsigned ord;
while (*imp)
{
switch (*imp++)
{
case 1:
// by name
*iat++ = (unsigned) GetProcAddressA(dll, imp);
while (*imp++)
;
break;
case 0xff:
// by ordinal
ord = ((unsigned) imp[0]) + imp[1] * 0x100;
imp += 2;
*iat++ = (unsigned) GetProcAddressA(dll, (void *) ord);
break;
default:
// *(int*) 1 = 0;
break;
}
}
imp++;
}
}
// debugging stuff
int CFwrap(short *, int, int, int, int, int, int);
void WFwrap(int, const void *, int, int *, int);
void CHwrap(int);
#define WRITEFILE2(name0, buf, len) \
do { short b[3]; b[0] = '\\'; b[1] = name0; b[2] = 0; \
int h = CFwrap(b, 0x40000000L, 3, 0, 2, 0x80, 0);\
int l; WFwrap(h, buf, len, &l, 0); \
CHwrap(h); \
} while (0)
void upx_main(const unsigned *info)
{
unsigned dlen = 0;
#if 0
unsigned src0 = *info++;
unsigned srcl = *info++;
unsigned dst0 = *info++;
unsigned dstl = *info++;
unsigned bimp = *info++;
unsigned onam = *info++;
unsigned getp = *info++;
unsigned load = *info++;
unsigned entr = *info++;
#else
unsigned src0 = info[0];
unsigned srcl = info[1];
unsigned dst0 = info[2];
// unsigned dstl = info[3];
unsigned bimp = info[4];
unsigned onam = info[5];
// unsigned getp = info[6];
// unsigned load = info[7];
// unsigned entr = info[8];
#endif
#ifdef SAFE
dlen = info[3];
#endif
//WRITEFILE2('l', (void*) dst0, info[7] + 256 - dst0);
UCL_DECOMPRESS((void *) src0, srcl, (void *) dst0, &dlen);
// WRITEFILE2('c', (void*) dst0, info[7] + 256 - dst0);
Unfilter_0x50();
//WRITEFILE2('f', (void*) dst0, info[7] + 256 - dst0);
handle_imports((void *) bimp, onam, dst0);
//WRITEFILE2('i', (void*) dst0, info[7] + 256 - dst0);
#ifdef STUB_FOR_DLL
reloc_main();
//WRITEFILE2('r', (void*) dst0, info[7] + 256 - dst0);
#endif
CacheSync(4); // CACHE_SYNC_WRITEBACK
}
-463
View File
@@ -1,463 +0,0 @@
/* l_armpe_s.S -- ARM/PE decompressor assembly startup
This file is part of the UPX executable compressor.
Copyright (C) 1996-2006 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2006 Laszlo Molnar
Copyright (C) 2000-2006 John F. Reiser
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
and/or modify them under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING.
If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
<mfx@users.sourceforge.net> <ml1050@users.sourceforge.net>
John F. Reiser
<jreiser@users.sourceforge.net>
*/
#define DEBUG 0
#undef STUB_IN_THUMB_MODE
#if defined(__ARM_ARCH_4T__) || defined(__ARM_ARCH_5T__)
# define STUB_IN_THUMB_MODE
#endif
#ifdef STUB_FOR_DLL
#define START _start: cmp r1, #1; bne .Lstart_orig
#else
#define START _start:
#endif
.text
.align 0
.globl upx_main
.globl _start
#ifdef STUB_IN_THUMB_MODE
START
stmfd sp!, {r0 - r3, lr}
@ touch all pages in ARM mode - this seems to be required
@ otherwise the THUMB mode stuff fails
adr r0, SRC0
ldmia r0, {r1, r2, r3} @ r1 - src, r2 - slen, r3 - dst
add r1, r1, r2
.L01:
ldr r2, [r3]
add r3, r3, #4096
cmp r3, r1
bls .L01
# ifdef __ARM_ARCH_4T__
adr ip, call_upxmain + 1
mov lr, pc
bx ip
ldmfd sp!, {r0 - r3, lr}
.Lstart_orig:
ldr ip, ENTR
bx ip
# else
blx upx_main @ call thumb armv5t style
ldmfd sp!, {r0 - r3, lr}
.Lstart_orig:
ldr pc, ENTR @ original entry
# endif
.code 16
.global GetProcAddressA
.thumb_func
GetProcAddressA:
ldr r3, GETP
.Lcallr3:
ldr r3, [r3]
bx r3
.global LoadLibraryW
.thumb_func
LoadLibraryW:
ldr r3, LLIB
b .Lcallr3
.global CacheSync
.thumb_func
CacheSync:
ldr r3, CSYN
b .Lcallr3
# ifdef __ARM_ARCH_4T__
call_upxmain:
b upx_main
# endif
.global Unfilter_0x50
.thumb_func
buffer .req r0
addval .req r2
bufend .req r4
Unfilter_0x50:
push {r4 - r7, lr}
ldr buffer, FIBS
mov addval, #0
ldr bufend, FIBE
mov r5, #0x0f
mov r6, #0xff
lsl r6, #24
mvn r7, r6
.Luf50_0:
cmp buffer, bufend
beq .Luf50_ret
ldrb r3, [buffer, #3]
and r3, r5
cmp r3, #0x0b
bne .Luf50_1
ldr r3, [buffer]
mov r1, r3
and r1, r6
sub r3, addval
and r3, r7
orr r3, r1
str r3, [buffer]
.Luf50_1:
add buffer, #4
add addval, #1
b .Luf50_0
.Luf50_ret:
pop {r4 - r7, pc}
.unreq buffer
.unreq addval
.unreq bufend
.global get_le32
.thumb_func
get_le32: @ optimized for size
mov r1, #3
.Lg0:
ldrb r3, [r0, r1]
lsl r2, r2, #8
add r2, r2, r3
sub r1, #1
bpl .Lg0
mov r0, r2
bx lr
# ifdef STUB_FOR_DLL
.global reloc_main
.thumb_func
buffer .req r0
dest .req r1
addval .req r2
reloc_main:
push {r4, r5, lr}
ldr buffer, BREL
ldr addval, DST0
sub dest, addval, #4
.Lreloc_loop:
ldrb r3, [buffer]
add buffer, #1
cmp r3, #0
beq .Lreloc_end
cmp r3, #0xf0
blo .Lreloc_add
mov r4, #0x0f
and r4, r3
ldrb r3, [buffer, #1] @ get_le16
lsl r4, #8
add r4, r3
ldrb r3, [buffer]
add buffer, #2
lsl r4, #8
add r3, r4
.Lreloc_add:
add dest, r3
mov r5, #0
.Lread_be32:
ldrb r3, [dest, r5]
lsl r4, #8
add r4, r3
add r5, #1
cmp r5, #4
bne .Lread_be32
add r4, addval
str r4, [dest]
b .Lreloc_loop
.Lreloc_end:
pop {r4, r5, pc}
# endif
# if DEBUG
// debugging stuff - helpers for dumping memory to a file or deleting a file
// !!!!! check the lines with "system dependent" below before calling
.global CFwrap
.thumb_func
CFwrap:
push {r3}
ldr r3, createfilew
mov ip, r3
pop {r3}
bx ip
.global WFwrap
.thumb_func
WFwrap:
push {r3}
ldr r3, writefile
mov ip, r3
pop {r3}
bx ip
.global CHwrap
.thumb_func
CHwrap:
push {r3}
ldr r3, closehandle
mov ip, r3
pop {r3}
bx ip
.global DelFile
.thumb_func
DelFile:
adr r1, filename
strb r0, [r1, #2]
mov r0, r1
ldr r3, deleteffilew
mov ip, r3
bx ip
.code 32
createfilew:
.word 0x1f7927c @ system dependent
closehandle:
.word 0x1f71594 @ system dependent
deleteffilew:
.word 0x1f7b920 @ system dependent
writefile:
.word 0x1f79434 @ system dependent
filename:
.byte '\\', 0, 'r', 0, 0, 0
# endif
#else // stub in ARM mode
START
stmfd sp!, {r0 - r3, lr}
adr r0, SRC0
bl upx_main
ldmfd sp!, {r0 - r3, lr}
.Lstart_orig:
ldr pc, ENTR
.global LoadLibraryW
LoadLibraryW:
ldr r3, LLIB
ldr pc, [r3]
.global GetProcAddressA
GetProcAddressA:
ldr r3, GETP
ldr pc, [r3]
.global CacheSync
CacheSync:
ldr r3, CSYN
ldr pc, [r3]
.global Unfilter_0x50
buffer .req r0
addval .req r2
bufend .req ip
Unfilter_0x50:
ldr buffer, FIBS
mov addval, #0
ldr bufend, FIBE
.Luf50_0:
cmp buffer, bufend
moveq pc, lr
ldrb r3, [buffer, #3]
and r3, r3, #0x0f
cmp r3, #0x0b
bne .Luf50_1
ldr r3, [buffer]
and r1, r3, #0xff000000
sub r3, r3, addval
and r3, r3, #0x00ffffff
orr r3, r3, r1
str r3, [buffer]
.Luf50_1:
add buffer, buffer, #4
add addval, addval, #1
b .Luf50_0
.unreq buffer
.unreq addval
.unreq bufend
.global get_le32
get_le32: @ optimized for size
mov r2, #3
.Lg0:
ldrb r3, [r0, r2]
subs r2, r2, #1
add r1, r3, r1, asl #8
bpl .Lg0
mov r0, r1
mov pc, lr
# ifdef STUB_FOR_DLL
.global reloc_main
buffer .req r0
dest .req r1
addval .req r2
reloc_main:
ldr buffer, BREL
ldr addval, DST0
sub dest, addval, #4
.Lreloc_loop:
ldrb r3, [buffer], #1
cmp r3, #0
moveq pc, lr
cmp r3, #0xf0
bichs ip, r3, #0xf0
ldrhsb r3, [buffer, #1] @ get_le16
addhs ip, r3, ip, lsl #8
ldrhsb r3, [buffer], #2
addhs r3, r3, ip, lsl #8
add dest, dest, r3
ldrb r3, [dest] @ get_be32
add ip, r3, ip, lsl #8
ldrb r3, [dest, #1]
add ip, r3, ip, lsl #8
ldrb r3, [dest, #2]
add ip, r3, ip, lsl #8
ldrb r3, [dest, #3]
add ip, r3, ip, lsl #8
add ip, ip, addval
str ip, [dest]
b .Lreloc_loop
.unreq buffer
.unreq addval
.unreq dest
# endif
# if DEBUG
// debugging stuff - helpers for dumping memory to a file or deleting a file
// !!!!! check the lines with "system dependent" below before calling
.global CFwrap
CFwrap:
ldr pc, createfilew
.global WFwrap
WFwrap:
ldr pc, writefile
.global CHwrap
CHwrap:
ldr pc, closehandle
.global DelFile
DelFile:
adr r1, filename
strb r0, [r1, #2]
mov r0, r1
ldr pc, deleteffilew
.code 32
createfilew:
.word 0x1f7927c @ system dependent
closehandle:
.word 0x1f71594 @ system dependent
deleteffilew:
.word 0x1f7b920 @ system dependent
writefile:
.word 0x1f79434 @ system dependent
filename:
.byte '\\', 0, 'r', 0, 0, 0
# endif
#endif
@@@@@@@@@@@@@@@@ paramater area for UPX
.code 32
.align 2
SRC0: .ascii "SRC0" @ start of compressed data
SRCL: .ascii "SRCL" @ compressed length
DST0: .ascii "DST0" @ start of uncompressed data
.ascii "DSTL" @ uncompressed length
.ascii "BIMPONAM" @ start of import data & dll names
GETP: .ascii "GETP" @ pointer to GetProcAddressA
LLIB: .ascii "LOAD" @ pointer to LoadLibraryW
ENTR: .ascii "ENTR" @ original entry point
BREL: .ascii "BREL" @ start of reloc info
FIBS: .ascii "FIBS" @ buffer start for filter
FIBE: .ascii "FIBE" @ buffer end for filter
CSYN: .ascii "CSYN" @ pointer to CacheSync
+374
View File
@@ -0,0 +1,374 @@
/* l_armpea.S -- ARM/PE decompressor assembly startup (arm mode)
This file is part of the UPX executable compressor.
Copyright (C) 1996-2006 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2006 Laszlo Molnar
Copyright (C) 2000-2006 John F. Reiser
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
and/or modify them under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING.
If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
<mfx@users.sourceforge.net> <ml1050@users.sourceforge.net>
John F. Reiser
<jreiser@users.sourceforge.net>
*/
// DEBUG == 0 -> none
// DEBUG == 1 -> for armpe_tester
// DEBUG == 2 -> wince - dumps memory
// DEBUG == 3 -> wince - removes files
#define DEBUG 0
#if DEBUG == 0
# define DINIT
# define DDUMP(x)
# define DDONE
#else
#define DDUMP(x) stmfd sp!, {r0 - r3}; mov r0, x; mov lr, pc; mov pc, r8; ldmia sp!, {r0 - r3}
#if DEBUG == 1
#define DINIT mov r8, r0
#define DDONE mov pc, lr
#elif DEBUG == 2
#define DINIT adr r8, writefile
#define DDONE
#elif DEBUG == 3
#define DINIT adr r8, DelFile
#define DDONE
#endif
#endif
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// magic for the UPX linker
#define SECT(n) .text 1; .asciz #n; .long n - _start; .text 0; n
#define BL(t) \
.text 1; .long 0, bl##t - _start; .asciz #t; .long 0; \
.text 0; .byte 0, 0, 0; bl##t: .byte 0xeb
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
.text
.balign 0
.globl _start
.arm
_start:
dst0 .req r9 @ global register
SECT(DllStart):
cmp r1, #1
bne .Lstart_orig
SECT(ExeStart):
stmfd sp!, {r0 - r11, lr}
DINIT
adr r3, SRC0
ldmia r3!, {r0, r1, r2} @ r0=src0, r1=slen, r2=dst0, r3=addr dstl
ldmia r3, {r4, r10, r11} @ r10=LoadLibraryW, r11=GetProcAddressA
mov dst0, r2
bl ProcessAll
mov r0, #4
bl CacheSync
ldmia sp!, {r0 - r11, lr}
DDONE
.Lstart_orig:
ldr pc, ENTR
CacheSync:
ldr pc, IATT + 8
SRC0: .ascii "SRC0" @ start of compressed data
SRCL: .ascii "SRCL" @ compressed length
DST0: .ascii "DST0" @ start of uncompressed data
DSTL: .ascii "DSTL" @ uncompressed length
IATT: .ascii "IATT"; .long 0, 0, 0 @ import address table
ENTR: .ascii "ENTR" @ original entry point
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
#if DEBUG == 2
writefile:
stmfd sp!, {r4, r5, r6, r7, lr}
mov r1, dst0
sub r2, r8, r1
add r2, r2, #4096+2048
mov r3, #2
sub sp, sp, #24
mov r4, #0
strh r0, [sp, #18]
str r3, [sp, #0]
mov r0, #128
mov r3, #92
str r0, [sp, #4]
mov r6, r1
mov r7, r2
strh r3, [sp, #16]
strh r4, [sp, #20]
mov r3, r4
str r4, [sp, #8]
mov r1, #1073741824
mov r2, #3
add r0, sp, #16
ldr ip, .L3
mov lr, pc
mov pc, ip
add r3, sp, #12
mov r5, r0
str r4, [sp, #0]
mov r1, r6
mov r2, r7
ldr ip, .L3+4
mov lr, pc
mov pc, ip
mov r0, r5
ldr r3, .L3+8
mov lr, pc
mov pc, r3
add sp, sp, #24
ldmfd sp!, {r4, r5, r6, r7, pc}
.L3:
.word 33135704
.word 33135968
.word 33137392
#endif
#if DEBUG == 3
DelFile:
adr r1, filename
strb r0, [r1, #2]
mov r0, r1
ldr pc, deleteffilew
deleteffilew:
.word 0x1f99bc8
filename:
.byte '\\', 0, 'r', 0, 0, 0
.align 2
#endif
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
ProcessAll:
stmfd sp!, {lr}
@@ uncompress/unfilter/imports/relocs are copied here by the upx linker
SECT(ProcessEnd):
ldmia sp!, {pc}
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
SECT(Unfilter_0x50):
buffer .req r0
addval .req r2
bufend .req ip
ldr buffer, FIBS
mov addval, #0
ldr bufend, FIBE
.Luf50_0:
cmp buffer, bufend
beq .Luf_end
ldr r3, [buffer]
and r1, r3, #0x0f000000
cmp r1, #0x0b000000
bne .Luf50_1
and r1, r3, #0xff000000
sub r3, r3, addval
and r3, r3, #0x00ffffff
orr r3, r3, r1
str r3, [buffer]
.Luf50_1:
add buffer, buffer, #4
add addval, addval, #1
b .Luf50_0
.unreq buffer
.unreq addval
.unreq bufend
FIBS: .ascii "FIBS" @ buffer start for filter
FIBE: .ascii "FIBE" @ buffer end for filter
.Luf_end:
DDUMP (#'F')
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
SECT(Relocs):
dest .req r0
buffer .req r1
addval .req dst0
ldr buffer, BREL
sub dest, addval, #4
.Lreloc_loop:
ldrb r3, [buffer], #1
cmp r3, #0
beq .Lreloc_end
cmp r3, #0xf0
bichs ip, r3, #0xf0
ldrhsb r3, [buffer, #1] @ get_le16
addhs ip, r3, ip, lsl #8
ldrhsb r3, [buffer], #2
addhs r3, r3, ip, lsl #8
add dest, dest, r3
ldrb r3, [dest] @ get_be32
add ip, r3, ip, lsl #8
ldrb r3, [dest, #1]
add ip, r3, ip, lsl #8
ldrb r3, [dest, #2]
add ip, r3, ip, lsl #8
ldrb r3, [dest, #3]
add ip, r3, ip, lsl #8
add ip, ip, addval
str ip, [dest]
b .Lreloc_loop
BREL: .ascii "BREL" @ start of reloc info
.unreq buffer
.unreq addval
.unreq dest
.Lreloc_end:
DDUMP (#'R')
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
SECT(Imports):
imp .req r4
iat .req r5
dll .req r6
.equ bufsize, 2048
sub sp, sp, #bufsize
ldr imp, BIMP
.Lhi_loop1:
mov r0, imp
bl get_le32
beq .Lhi_end
ldr r1, ONAM
add r0, r0, r1
mov r1, sp
.Lhi_copyname:
ldrb r2, [r0], #1
strh r2, [r1], #2
cmp r2, #0
bne .Lhi_copyname
mov r0, sp
bl LoadLibraryW
mov dll, r0
add r0, imp, #4
bl get_le32
add iat, dst0, r0
add imp, imp, #8
.Lhi_gpa_loop:
ldrb r0, [imp], #1
cmp r0, #1
bmi .Lhi_loop1
bne .Lhi_by_ord
mov r1, imp
.Lhi_by_name:
ldrb r0, [imp], #1
cmp r0, #0
bne .Lhi_by_name
b .Lhi_call_gpa
.Lhi_by_ord:
ldrb r0, [imp], #1
ldrb r1, [imp], #1
add r1, r0, r1, lsl #8
.Lhi_call_gpa:
mov r0, dll
bl GetProcAddressA
str r0, [iat], #4
b .Lhi_gpa_loop
.unreq iat
.unreq imp
.unreq dll
get_le32: @ optimized for size
mov r2, #3
.Lg0:
ldrb r3, [r0, r2]
subs r2, r2, #1
add r1, r3, r1, asl #8
bpl .Lg0
movs r0, r1 @ set the Z flag if zero
mov pc, lr
LoadLibraryW:
mov pc, r10
GetProcAddressA:
mov pc, r11
BIMP: .ascii "BIMP" @ start of import data
ONAM: .ascii "ONAM" @ start of dll names
.Lhi_end:
add sp, sp, #bufsize
DDUMP (#'I')
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
SECT(ucl_nrv2e_decompress_8):
#include "armv4_n2e_d8.S"
SECT(Call2E):
BL (ucl_nrv2e_decompress_8)
DDUMP (#'C')
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
SECT(UPX1HEAD):
.byte 85,80,88,33 @ 0 UPX_MAGIC_LE32
.byte 161,216,208,213 @ 4 UPX_MAGIC2_LE32
.long 0 @ 8 uncompressed adler32
.long 0 @ 12 compressed adler32
.long 0 @ 16 uncompressed len
.long 0 @ 20 compressed len
.long 0 @ 24 original file size
.byte 0 @ 28 filter id
.byte 0 @ 29 filter cto
.byte 0 @ unused
.byte 45 @ 31 header checksum
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
SECT(eof):
.text 1
.long -1; .short eof - _start
+95
View File
@@ -0,0 +1,95 @@
/* l_armpea.h -- created from l_armpea.bin, 952 (0x3b8) bytes
This file is part of the UPX executable compressor.
Copyright (C) 1996-2006 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2006 Laszlo Molnar
Copyright (C) 2000-2006 John F. Reiser
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
and/or modify them under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING.
If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
<mfx@users.sourceforge.net> <ml1050@users.sourceforge.net>
*/
#define NRV_LOADER_ARM_SIZE 952
#define NRV_LOADER_ARM_ADLER32 0xd6f275cf
#define NRV_LOADER_ARM_CRC32 0x3a603f09
unsigned char nrv_loader_arm[952] = {
1, 0, 81,227, 8, 0, 0, 26,255, 79, 45,233, 32, 48,143,226, /* 0x 0 */
7, 0,179,232, 16, 12,147,232, 2,144,160,225, 13, 0, 0,235, /* 0x 10 */
4, 0,160,227, 1, 0, 0,235,255, 79,189,232, 32,240,159,229, /* 0x 20 */
20,240,159,229, 83, 82, 67, 48, 83, 82, 67, 76, 68, 83, 84, 48, /* 0x 30 */
68, 83, 84, 76, 73, 65, 84, 84, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 40 */
0, 0, 0, 0, 69, 78, 84, 82, 0, 64, 45,233, 0,128,189,232, /* 0x 50 */
60, 0,159,229, 0, 32,160,227, 56,192,159,229, 12, 0, 80,225, /* 0x 60 */
13, 0, 0, 10, 0, 48,144,229, 15, 20, 3,226, 11, 4, 81,227, /* 0x 70 */
4, 0, 0, 26,255, 20, 3,226, 2, 48, 67,224,255, 52,195,227, /* 0x 80 */
1, 48,131,225, 0, 48,128,229, 4, 0,128,226, 1, 32,130,226, /* 0x 90 */
241,255,255,234, 70, 73, 66, 83, 70, 73, 66, 69, 84, 16,159,229, /* 0x a0 */
4, 0, 73,226, 1, 48,209,228, 0, 0, 83,227, 18, 0, 0, 10, /* 0x b0 */
240, 0, 83,227,240,192,195, 35, 1, 48,209, 37, 12,196,131, 32, /* 0x c0 */
2, 48,209, 36, 12, 52,131, 32, 3, 0,128,224, 0, 48,208,229, /* 0x d0 */
12,196,131,224, 1, 48,208,229, 12,196,131,224, 2, 48,208,229, /* 0x e0 */
12,196,131,224, 3, 48,208,229, 12,196,131,224, 9,192,140,224, /* 0x f0 */
0,192,128,229,234,255,255,234, 66, 82, 69, 76, 2,219, 77,226, /* 0x 100 */
164, 64,159,229, 4, 0,160,225, 30, 0, 0,235, 40, 0, 0, 10, /* 0x 110 */
152, 16,159,229, 1, 0,128,224, 13, 16,160,225, 1, 32,208,228, /* 0x 120 */
178, 32,193,224, 0, 0, 82,227,251,255,255, 26, 13, 0,160,225, /* 0x 130 */
27, 0, 0,235, 0, 96,160,225, 4, 0,132,226, 17, 0, 0,235, /* 0x 140 */
0, 80,137,224, 8, 64,132,226, 1, 0,212,228, 1, 0, 80,227, /* 0x 150 */
235,255,255, 74, 4, 0, 0, 26, 4, 16,160,225, 1, 0,212,228, /* 0x 160 */
0, 0, 80,227,252,255,255, 26, 2, 0, 0,234, 1, 0,212,228, /* 0x 170 */
1, 16,212,228, 1, 20,128,224, 6, 0,160,225, 9, 0, 0,235, /* 0x 180 */
4, 0,133,228,239,255,255,234, 3, 32,160,227, 2, 48,208,231, /* 0x 190 */
1, 32, 82,226, 1, 20,131,224,251,255,255, 90, 1, 0,176,225, /* 0x 1a0 */
14,240,160,225, 10,240,160,225, 11,240,160,225, 66, 73, 77, 80, /* 0x 1b0 */
79, 78, 65, 77, 2,219,141,226,252, 64, 45,233, 0,112,129,224, /* 0x 1c0 */
0, 80,224,227, 2, 65,160,227, 10, 0, 0,234, 24, 0,189,232, /* 0x 1d0 */
7, 0, 64,224, 3, 32, 66,224, 0, 32,132,229,240,128,189,232, /* 0x 1e0 */
1, 64,208,228, 4, 64,164,224, 4, 76,176,225, 14,240,160,225, /* 0x 1f0 */
1, 48,208,228, 1, 48,194,228, 4, 64,148,224,247,255,255, 11, /* 0x 200 */
250,255,255, 42, 1, 16,160,227, 3, 0, 0,234, 1, 16, 65,226, /* 0x 210 */
4, 64,148,224,241,255,255, 11, 1, 16,161,224, 4, 64,148,224, /* 0x 220 */
238,255,255, 11, 1, 16,161,224, 4, 64,148,224,235,255,255, 11, /* 0x 230 */
245,255,255, 58, 3, 48, 81,226, 0, 16,160,227, 6, 0, 0, 58, /* 0x 240 */
1, 80,208,228, 3, 84,133,225, 5, 80,240,225,222,255,255, 10, /* 0x 250 */
197, 80,176,225, 15, 0, 0, 42, 2, 0, 0,234, 4, 64,148,224, /* 0x 260 */
222,255,255, 11, 11, 0, 0, 42, 1, 16,160,227, 4, 64,148,224, /* 0x 270 */
218,255,255, 11, 7, 0, 0, 42, 4, 64,148,224,215,255,255, 11, /* 0x 280 */
1, 16,161,224, 4, 64,148,224,212,255,255, 11,249,255,255, 58, /* 0x 290 */
4, 16,129,226, 3, 0, 0,234, 4, 64,148,224,207,255,255, 11, /* 0x 2a0 */
1, 16,161,224, 2, 16,129,226, 5, 12,117,227, 0, 0, 0, 42, /* 0x 2b0 */
1, 16,129,226, 0, 48,210,229, 5, 48,210,231, 1, 48,194,228, /* 0x 2c0 */
1, 16, 81,226,251,255,255, 26,202,255,255,234, 0, 0, 0,235, /* 0x 2d0 */
85, 80, 88, 33,161,216,208,213, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 2e0 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, /* 0x 2f0 */
68,108,108, 83,116, 97,114,116, 0, 0, 0, 0, 0, 69,120,101, /* 0x 300 */
83,116, 97,114,116, 0, 8, 0, 0, 0, 80,114,111, 99,101,115, /* 0x 310 */
115, 69,110,100, 0, 92, 0, 0, 0, 85,110,102,105,108,116,101, /* 0x 320 */
114, 95, 48,120, 53, 48, 0, 96, 0, 0, 0, 82,101,108,111, 99, /* 0x 330 */
115, 0,172, 0, 0, 0, 73,109,112,111,114,116,115, 0, 12, 1, /* 0x 340 */
0, 0,117, 99,108, 95,110,114,118, 50,101, 95,100,101, 99,111, /* 0x 350 */
109,112,114,101,115,115, 95, 56, 0,200, 1, 0, 0, 67, 97,108, /* 0x 360 */
108, 50, 69, 0,220, 2, 0, 0, 0, 0, 0, 0,223, 2, 0, 0, /* 0x 370 */
117, 99,108, 95,110,114,118, 50,101, 95,100,101, 99,111,109,112, /* 0x 380 */
114,101,115,115, 95, 56, 0, 0, 0, 0, 0, 85, 80, 88, 49, 72, /* 0x 390 */
69, 65, 68, 0,224, 2, 0, 0,101,111,102, 0, 0, 3, 0, 0, /* 0x 3a0 */
255,255,255,255, 0, 3, 0, 0 /* 0x 3b0 */
};
+345
View File
@@ -0,0 +1,345 @@
/* l_armpet.S -- ARM/PE decompressor assembly startup (thumb mode)
This file is part of the UPX executable compressor.
Copyright (C) 1996-2006 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2006 Laszlo Molnar
Copyright (C) 2000-2006 John F. Reiser
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
and/or modify them under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING.
If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
<mfx@users.sourceforge.net> <ml1050@users.sourceforge.net>
John F. Reiser
<jreiser@users.sourceforge.net>
*/
#define DEBUG 0
// magic for the UPX linker
#define SECT(n) .text 1; .asciz #n; .long n - _start; .text 0; n
#define BL(t) \
.text 1; .long 0, bl##t - _start; .asciz #t; .long 0; \
.text 0; .byte 0, 0, 0; bl##t: .byte 0xf8
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
.text
.balign 0
.globl _start
.arm
_start:
dst0 .req r9 @ global register
SECT(DllStart):
cmp r1, #1
bne .Lstart_orig
SECT(ExeStart):
stmfd sp!, {r0 - r11, lr}
@ access all pages in ARM mode - this seems to be required
@ otherwise the THUMB mode stuff fails
adr r3, SRC0
ldmia r3, {r5, r6, r7, r9, r10, r11, ip} @ r7=dst0
add r5, pc, #4096 @ r3=addr src0, r10=LoadLibraryW
.L01: @ r11=GetProcAddressA, ip=CacheSync
ldr r6, [r7]
add r7, r7, #4096
cmp r7, r5
bls .L01
adr r4, ProcessAll + 1
mov lr, pc
bx r4
ldmfd sp!, {r0 - r11, lr}
.Lstart_orig:
ldr ip, ENTR
bx ip
SRC0: .ascii "SRC0" @ start of compressed data
SRCL: .ascii "SRCL" @ compressed length
DST0: .ascii "DST0" @ start of uncompressed data
DSTL: .ascii "DSTL" @ uncompressed length
IATT: .ascii "IATT"; .long 0, 0, 0 @ import address table
ENTR: .ascii "ENTR" @ original entry point
.thumb
ProcessAll:
ldmia r3!, {r0, r1, r2} @ r0=src0, r1=slen, r2=dst0, r3=addr dstl
mov dst0, r2
mov r4, ip @ CacheSync
push {r4, lr}
.align 2
@@ uncompress/unfilter/imports/relocs are copied here by the upx linker
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
SECT(Unfilter_0x50):
.align 2
buffer .req r0
addval .req r2
bufend .req r4
ldr buffer, FIBS
mov addval, #0
ldr bufend, FIBE
mov r5, #0x0f
mov r6, #0xff
lsl r6, #24
mvn r7, r6
.Luf50_0:
cmp buffer, bufend
beq .Luf50_ret
ldr r3, [buffer]
lsr r1, r3, #24
and r1, r5
cmp r1, #0x0b
bne .Luf50_1
mov r1, r3
and r1, r6
sub r3, addval
and r3, r7
orr r3, r1
str r3, [buffer]
.Luf50_1:
add buffer, #4
add addval, #1
b .Luf50_0
.unreq buffer
.unreq addval
.unreq bufend
.align 2
FIBS: .ascii "FIBS" @ buffer start for filter
FIBE: .ascii "FIBE" @ buffer end for filter
.Luf50_ret:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
SECT(Relocs):
.align 2
buffer .req r0
dest .req r1
addval .req r2
ldr buffer, BREL
mov addval, dst0
sub dest, addval, #4
.Lreloc_loop:
ldrb r3, [buffer]
add buffer, #1
cmp r3, #0
beq .Lreloc_end
cmp r3, #0xf0
blo .Lreloc_add
mov r4, #0x0f
and r4, r3
ldrb r3, [buffer, #1] @ get_le16
lsl r4, #8
add r4, r3
ldrb r3, [buffer]
add buffer, #2
lsl r4, #8
add r3, r4
.Lreloc_add:
add dest, r3
mov r5, #0
.Lread_be32:
ldrb r3, [dest, r5]
lsl r4, #8
add r4, r3
add r5, #1
cmp r5, #4
bne .Lread_be32
add r4, addval
str r4, [dest]
b .Lreloc_loop
.align 2
BREL: .ascii "BREL" @ start of reloc info
.Lreloc_end:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
SECT(Imports):
.align 2
imp .req r4
iat .req r5
dll .req r6
mov r7, sp
sub sp, #508
sub sp, #508
sub sp, #508
sub sp, #508
ldr imp, BIMP
.Lhi_loop1:
mov r0, imp
bl get_le32
beq .Lhi_end
ldr r1, ONAM
add r0, r1
mov r1, sp
.Lhi_copyname:
ldrb r2, [r0]
add r0, #1
strh r2, [r1]
add r1, #2
cmp r2, #0
bne .Lhi_copyname
mov r0, sp
bl LoadLibraryW
mov dll, r0
add r0, imp, #4
bl get_le32
mov iat, dst0
add iat, r0
add imp, #8
.Lhi_gpa_loop:
ldrb r0, [imp]
add imp, #1
cmp r0, #1
bmi .Lhi_loop1
bne .Lhi_by_ord
mov r1, imp
.Lhi_by_name:
ldrb r0, [imp]
add imp, #1
cmp r0, #0
bne .Lhi_by_name
b .Lhi_call_gpa
.Lhi_by_ord:
ldrb r0, [imp]
ldrb r1, [imp, #1]
add imp, #2
lsl r1, #8
add r1, r0
.Lhi_call_gpa:
mov r0, dll
bl GetProcAddressA
stmia iat!, {r0}
b .Lhi_gpa_loop
.unreq iat
.unreq imp
.unreq dll
get_le32: @ optimized for size
mov r1, #3
.Lg0:
ldrb r3, [r0, r1]
lsl r2, r2, #8
add r2, r2, r3
sub r1, #1
bpl .Lg0
mov r0, r2 @ sets the Z flag if zero
bx lr
LoadLibraryW:
bx r10
GetProcAddressA:
bx r11
.align 2
BIMP: .ascii "BIMP" @ start of import data
ONAM: .ascii "ONAM" @ start of dll names
.Lhi_end:
mov sp, r7
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
SECT(ProcessEnd):
pop {r1, r2} @ r1=CacheSync, r2=lr
mov r0, #4 @ parameter of CacheSync
mov lr, r2
bx r1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
#define XSECT(n) .text 1; .asciz #n; .long n - _start; .text 0
SECT(dummy0):
.align 2
.arm
#include "arm_nrv2b_d8.S"
XSECT (go_thumb_n2b)
SECT(Call2B):
BL (go_thumb_n2b)
#undef wrnk
#undef GETBIT
SECT(dummy1):
.align 2
.arm
#include "arm_nrv2e_d8.S"
XSECT (thumb_nrv2e_d8)
SECT(Call2E):
BL (thumb_nrv2e_d8)
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
SECT(UPX1HEAD):
.byte 85,80,88,33 @ 0 UPX_MAGIC_LE32
.byte 161,216,208,213 @ 4 UPX_MAGIC2_LE32
.long 0 @ 8 uncompressed adler32
.long 0 @ 12 compressed adler32
.long 0 @ 16 uncompressed len
.long 0 @ 20 compressed len
.long 0 @ 24 original file size
.byte 0 @ 28 filter id
.byte 0 @ 29 filter cto
.byte 0 @ unused
.byte 45 @ 31 header checksum
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
.arm
SECT(eof):
.text 1
.long -1; .short eof - _start
+98
View File
@@ -0,0 +1,98 @@
/* l_armpet.h -- created from l_armpet.bin, 1000 (0x3e8) bytes
This file is part of the UPX executable compressor.
Copyright (C) 1996-2006 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2006 Laszlo Molnar
Copyright (C) 2000-2006 John F. Reiser
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
and/or modify them under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING.
If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
<mfx@users.sourceforge.net> <ml1050@users.sourceforge.net>
*/
#define NRV_LOADER_THUMB_SIZE 1000
#define NRV_LOADER_THUMB_ADLER32 0x4f344c3e
#define NRV_LOADER_THUMB_CRC32 0xe1803a67
unsigned char nrv_loader_thumb[1000] = {
1, 0, 81,227, 11, 0, 0, 26,255, 79, 45,233, 44, 48,143,226, /* 0x 0 */
224, 30,147,232, 1, 90,143,226, 0, 96,151,229, 1,122,135,226, /* 0x 10 */
5, 0, 87,225,251,255,255,154, 53, 64,143,226, 15,224,160,225, /* 0x 20 */
20,255, 47,225,255, 79,189,232, 32,192,159,229, 28,255, 47,225, /* 0x 30 */
83, 82, 67, 48, 83, 82, 67, 76, 68, 83, 84, 48, 68, 83, 84, 76, /* 0x 40 */
73, 65, 84, 84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 50 */
69, 78, 84, 82, 7,203,145, 70,100, 70, 16,181, 11, 72, 0, 34, /* 0x 60 */
11, 76, 15, 37,255, 38, 54, 6,247, 67,160, 66, 18,208, 3,104, /* 0x 70 */
25, 14, 41, 64, 11, 41, 5,209, 25, 28, 49, 64,155, 26, 59, 64, /* 0x 80 */
11, 67, 3, 96, 4, 48, 1, 50,239,231, 0, 0, 70, 73, 66, 83, /* 0x 90 */
70, 73, 66, 69, 14, 72, 74, 70, 17, 31, 3,120, 1, 48, 0, 43, /* 0x a0 */
24,208,240, 43, 8,211, 15, 36, 28, 64, 67,120, 36, 2,228, 24, /* 0x b0 */
3,120, 2, 48, 36, 2, 27, 25,201, 24, 0, 37, 75, 93, 36, 2, /* 0x c0 */
228, 24, 1, 53, 4, 45,249,209,164, 24, 12, 96,229,231, 0, 0, /* 0x d0 */
66, 82, 69, 76,111, 70,255,176,255,176,255,176,255,176, 27, 76, /* 0x e0 */
32, 28, 0,240, 41,248, 53,208, 25, 73, 64, 24,105, 70, 2,120, /* 0x f0 */
1, 48, 10,128, 2, 49, 0, 42,249,209,104, 70, 0,240, 36,248, /* 0x 100 */
6, 28, 32, 29, 0,240, 24,248, 77, 70, 45, 24, 8, 52, 32,120, /* 0x 110 */
1, 52, 1, 40,228,212, 5,209, 33, 28, 32,120, 1, 52, 0, 40, /* 0x 120 */
251,209, 4,224, 32,120, 97,120, 2, 52, 9, 2, 9, 24, 48, 28, /* 0x 130 */
0,240, 11,248, 1,197,234,231, 3, 33, 67, 92, 18, 2,210, 24, /* 0x 140 */
1, 57,250,213, 16, 28,112, 71, 80, 71, 88, 71, 66, 73, 77, 80, /* 0x 150 */
79, 78, 65, 77,189, 70, 6,188, 4, 32,150, 70, 8, 71, 0, 0, /* 0x 160 */
1,192,143,226, 28,255, 47,225, 9, 24,254,181, 1, 36,101, 66, /* 0x 170 */
228, 7, 13, 39, 63, 2, 15,224, 26,188, 64, 26,210, 26, 34, 96, /* 0x 180 */
240,188, 2,188, 8, 71, 4,120,100, 65, 1, 48, 36, 6,247, 70, /* 0x 190 */
3,120, 1, 48, 19,112, 1, 50, 36, 25,254, 70,243,208,247,210, /* 0x 1a0 */
1, 33, 36, 25,254, 70,238,208, 73, 65, 36, 25,254, 70,234,208, /* 0x 1b0 */
247,211,203, 30, 0, 33, 5,211, 27, 2, 5,120, 1, 48, 29, 67, /* 0x 1c0 */
237, 67,217,208, 36, 25,254, 70,221,208, 73, 65, 36, 25,254, 70, /* 0x 1d0 */
217,208, 73, 65, 9,209, 1, 33, 36, 25,254, 70,211,208, 73, 65, /* 0x 1e0 */
36, 25,254, 70,207,208,247,211, 2, 49, 1, 49,253, 66, 0,210, /* 0x 1f0 */
1, 49, 19,120, 83, 93, 19,112, 1, 50, 1, 57,250,209,203,231, /* 0x 200 */
0, 0, 0,248, 1,192,143,226, 28,255, 47,225,252,181, 15, 24, /* 0x 210 */
1, 36,101, 66,228, 7, 5, 38, 54, 2, 15,224, 24,188,192, 27, /* 0x 220 */
210, 26, 34, 96,240,188, 2,188, 8, 71, 4,120,100, 65, 1, 48, /* 0x 230 */
36, 6,247, 70, 3,120, 1, 48, 19,112, 1, 50, 36, 25,254, 70, /* 0x 240 */
243,208,247,210, 1, 33, 4,224, 1, 57, 36, 25,254, 70,236,208, /* 0x 250 */
73, 65, 36, 25,254, 70,232,208, 73, 65, 36, 25,254, 70,228,208, /* 0x 260 */
242,211,203, 30, 0, 33, 8,211, 27, 2, 5,120, 1, 48, 29, 67, /* 0x 270 */
237, 67,211,208,109, 16, 19,210, 3,224, 36, 25,254, 70,212,208, /* 0x 280 */
14,210, 1, 33, 36, 25,254, 70,207,208, 9,210, 36, 25,254, 70, /* 0x 290 */
203,208, 73, 65, 36, 25,254, 70,199,208,247,211, 4, 49, 4,224, /* 0x 2a0 */
36, 25,254, 70,193,208, 73, 65, 2, 49,238, 66, 0,210, 1, 49, /* 0x 2b0 */
19,120, 83, 93, 19,112, 1, 50, 1, 57,250,209,190,231, 0, 0, /* 0x 2c0 */
0,248, 85, 80, 88, 33,161,216,208,213, 0, 0, 0, 0, 0, 0, /* 0x 2d0 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 2e0 */
0, 45, 0, 0, 68,108,108, 83,116, 97,114,116, 0, 0, 0, 0, /* 0x 2f0 */
0, 69,120,101, 83,116, 97,114,116, 0, 8, 0, 0, 0, 85,110, /* 0x 300 */
102,105,108,116,101,114, 95, 48,120, 53, 48, 0,108, 0, 0, 0, /* 0x 310 */
82,101,108,111, 99,115, 0,164, 0, 0, 0, 73,109,112,111,114, /* 0x 320 */
116,115, 0,228, 0, 0, 0, 80,114,111, 99,101,115,115, 69,110, /* 0x 330 */
100, 0,102, 1, 0, 0,100,117,109,109,121, 48, 0,110, 1, 0, /* 0x 340 */
0,103,111, 95,116,104,117,109, 98, 95,110, 50, 98, 0,120, 1, /* 0x 350 */
0, 0, 67, 97,108,108, 50, 66, 0, 16, 2, 0, 0, 0, 0, 0, /* 0x 360 */
0, 19, 2, 0, 0,103,111, 95,116,104,117,109, 98, 95,110, 50, /* 0x 370 */
98, 0, 0, 0, 0, 0,100,117,109,109,121, 49, 0, 20, 2, 0, /* 0x 380 */
0,116,104,117,109, 98, 95,110,114,118, 50,101, 95,100, 56, 0, /* 0x 390 */
28, 2, 0, 0, 67, 97,108,108, 50, 69, 0,206, 2, 0, 0, 0, /* 0x 3a0 */
0, 0, 0,209, 2, 0, 0,116,104,117,109, 98, 95,110,114,118, /* 0x 3b0 */
50,101, 95,100, 56, 0, 0, 0, 0, 0, 85, 80, 88, 49, 72, 69, /* 0x 3c0 */
65, 68, 0,210, 2, 0, 0,101,111,102, 0,244, 2, 0, 0,255, /* 0x 3d0 */
255,255,255,244, 2, 0, 0, 0 /* 0x 3e0 */
};
+62 -3
View File
@@ -35,10 +35,45 @@
SECTION .text
CPU 8086
; __DEVICEENTRY__
dd -1
dw 0
dw strategy ; .sys header
dw 0 ; opendos wants this field untouched
original_strategy:
dw 'ST'
strategy:
push cs
push word [cs:original_strategy]
push ax
push bx
push cx
push dx
mov ax, cs
add ax, 'OS' ; calculate normal EXE stack
mov bx, 'OP'
mov cx, ss
mov dx, sp
mov ss, ax ; switch to stack EXE normally has
mov sp, bx
push cx ; save device stack on EXE stack
push dx
push si
push di
push bp
push ds
push es
db 0x72 ; "jc 0xf9" but flag C is 0 => nop
exe_as_device_entry:
stc ; flag C is 1
pushf
; =============
; ============= ENTRY POINT
; =============
; __EXEENTRY__
exe_entry:
mov cx, 'CX' ; first_copy_len/2
mov si, 'SI' ; cx*2-2
mov di, si
@@ -47,7 +82,8 @@
do_copy:
mov ch, 0x80 ; 64 kbyte
mov ax, cs
add ax, 'DS'
addaxds:
add ax, 'DS' ; MSB is referenced by the "sub" below
mov ds, ax
add ax, 'ES'
mov es, ax
@@ -56,8 +92,11 @@ do_copy:
rep
movsw
cld
sub [byte cs:si+do_copy+6+2], byte 0x10
; __DEVICESUB__
sub [byte cs:si + addaxds + 4], byte 0x10
; __EXESUB__
sub [byte cs:si + addaxds - exe_entry + 4], byte 0x10
; __JNCDOCOPY__
jnc do_copy
xchg ax, dx
scasw
@@ -152,6 +191,26 @@ reloc_5:
pop es
push es
pop ds
; __DEVICEEND__
popf
jc loaded_as_exe
pop es
pop ds
pop bp
pop di
pop si
pop bx ; get original device SS:SP
pop ax
mov ss, ax ; switch to device driver stack
mov sp, bx
pop dx
pop cx
pop bx
pop ax
retf ; return to original strategy
loaded_as_exe:
%ifdef __EXESTACK__
lea ax, ['SS'+bp]
mov ss, ax
+154 -144
View File
@@ -1,4 +1,4 @@
/* l_exe.h -- created from l_exe.bin, 2215 (0x8a7) bytes
/* l_exe.h -- created from l_exe.bin, 2377 (0x949) bytes
This file is part of the UPX executable compressor.
@@ -27,148 +27,158 @@
*/
#define NRV_LOADER_SIZE 2215
#define NRV_LOADER_ADLER32 0x4b5438fc
#define NRV_LOADER_CRC32 0x250186be
#define NRV_LOADER_SIZE 2377
#define NRV_LOADER_ADLER32 0xe8176e1e
#define NRV_LOADER_CRC32 0x723ae5c1
unsigned char nrv_loader[2215] = {
185, 67, 88,190, 83, 73,137,247, 30,169,181,128,140,200, 5, 68, /* 0x 0 */
83,142,216, 5, 69, 83,142,192,253,243,165,252, 46,128,108, 18, /* 0x 10 */
16,115,231,146,175,173, 14, 14, 14, 6, 31, 7, 22,189, 66, 80, /* 0x 20 */
187, 66, 88, 85,203, 85, 80, 88, 33,161,216,208,213, 0, 0, 0, /* 0x 30 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, /* 0x 40 */
164, 0,255,117, 3,232, 0, 0,114,246, 65,140,192, 1,255,115, /* 0x 50 */
5,128,196, 8,142,192,209,239,232, 0, 0,227, 0,115,249, 73, /* 0x 60 */
73,116, 0, 1,201, 1,201, 1,201, 1,201,193,225, 4,137,205, /* 0x 70 */
138, 28, 70,246,211, 49,201,232, 0, 0, 17,201,117, 8, 65,232, /* 0x 80 */
0, 0,115,251, 65, 65,129,253,209, 0,131,217,254, 41,232,114, /* 0x 90 */
14,142,216,141, 1, 40,252,150,243,164,150,142,218,235, 0,209, /* 0x a0 */
224,209,224,209,224,209,224, 80, 49,192,142,216, 88,193,224, 4, /* 0x b0 */
106, 0, 31, 1,216, 1,248,235, 0, 0,255,117, 3,232, 6, 0, /* 0x c0 */
17,201, 0,255,117, 0,138, 60, 17,246,115, 5,128,198, 8,142, /* 0x d0 */
218,209,238, 70, 16,255,195,164, 0,255,117, 3,232, 0, 0,114, /* 0x e0 */
246, 65,140,192, 1,255,115, 5,128,196, 8,142,192,209,239,232, /* 0x f0 */
0, 0,114, 10, 73,232, 0, 0, 17,201,121,243,235, 0, 73, 73, /* 0x 100 */
116, 0, 1,201, 1,201, 1,201,193,225, 3,137,205,138, 28, 70, /* 0x 110 */
246,211, 49,201,208,235,235, 3,232, 0, 0, 17,201,232, 0, 0, /* 0x 120 */
17,201,117, 8, 65,232, 0, 0,115,251, 65, 65,131,253, 81,131, /* 0x 130 */
217,254, 41,232,114, 14,142,216,141, 1, 40,252,150,243,164,150, /* 0x 140 */
142,218,235, 0,209,224,209,224,209,224,209,224, 80, 49,192,142, /* 0x 150 */
216, 88,193,224, 4,106, 0, 31, 1,216, 1,248,235, 0, 0,255, /* 0x 160 */
117, 3,232, 6, 0, 17,201, 0,255,117, 0,138, 60, 17,246,115, /* 0x 170 */
5,128,198, 8,142,218,209,238, 70, 16,255,195,164, 0,255,117, /* 0x 180 */
3,232, 0, 0,114,246, 65,140,192, 1,255,115, 5,128,196, 8, /* 0x 190 */
142,192,209,239,232, 0, 0,114, 10, 73,232, 0, 0, 17,201,121, /* 0x 1a0 */
243,235, 0, 73, 73,116, 0, 1,201, 1,201, 1,201,193,225, 3, /* 0x 1b0 */
137,205,138, 28, 70,246,211, 49,201,208,235,115, 12,232, 0, 0, /* 0x 1c0 */
17,201,235, 18,232, 0, 0,114,244, 65,232, 0, 0,114,238,232, /* 0x 1d0 */
0, 0,115,251, 65, 65,131,253, 81,131,217,253, 41,232,114, 14, /* 0x 1e0 */
142,216,141, 1, 40,252,150,243,164,150,142,218,235, 0,209,224, /* 0x 1f0 */
209,224,209,224,209,224, 80, 49,192,142,216, 88,193,224, 4,106, /* 0x 200 */
0, 31, 1,216, 1,248,235, 0, 0,255,117, 3,232, 6, 0, 17, /* 0x 210 */
201, 0,255,117, 0,138, 60, 17,246,115, 5,128,198, 8,142,218, /* 0x 220 */
209,238, 70, 16,255,195, 93,140,192,128,236, 6,142,216, 6, 31, /* 0x 230 */
141,181, 82, 83,173, 91,145,173,146,173,151,173, 1,195,142,195, /* 0x 240 */
49,192, 1,199, 38, 1, 45,172, 72,116, 0, 64,117,244, 71, 71, /* 0x 250 */
38,128, 61,154,117,249, 38, 57, 85, 3,119,243,176, 3,235, 0, /* 0x 260 */
129,199,254, 0,114, 0,226, 0, 7, 6, 31,141,134, 83, 83,142, /* 0x 270 */
208,188, 83, 80,234, 73, 80, 67, 83,129,197, 67, 83, 85,184, 73, /* 0x 280 */
80, 80,203, 0, 69, 88, 69, 69, 78, 84, 82, 89, 0, 0, 0, 0, /* 0x 290 */
0, 69, 88, 69, 82, 69, 76, 80, 85, 0, 38, 0, 0, 0, 69, 88, /* 0x 2a0 */
69, 77, 65, 73, 78, 52, 0, 39, 0, 0, 0, 85, 80, 88, 49, 72, /* 0x 2b0 */
69, 65, 68, 0, 53, 0, 0, 0, 69, 88, 69, 67, 85, 84, 80, 79, /* 0x 2c0 */
0, 80, 0, 0, 0, 78, 82, 86, 50, 66, 49, 54, 83, 0, 80, 0, /* 0x 2d0 */
0, 0, 0, 0, 0, 0, 88, 0, 0, 0, 78, 82, 86, 50, 66, 69, /* 0x 2e0 */
88, 51, 0, 19, 0, 0, 0, 78, 50, 66, 54, 52, 75, 48, 49, 0, /* 0x 2f0 */
93, 0, 0, 0, 78, 82, 86, 50, 66, 69, 88, 49, 0,104, 0, 0, /* 0x 300 */
0, 0, 0, 0, 0,107, 0, 0, 0, 78, 82, 86, 50, 66, 69, 88, /* 0x 310 */
51, 0, 6, 0, 0, 0, 0, 0, 0, 0,109, 0, 0, 0, 78, 82, /* 0x 320 */
86, 50, 66, 69, 88, 57, 0, 4, 0, 0, 0, 0, 0, 0, 0,115, /* 0x 330 */
0, 0, 0, 78, 82, 86, 50, 66, 69, 88, 50, 0, 9, 0, 0, 0, /* 0x 340 */
78, 50, 66, 88, 56, 54, 48, 49, 0,115, 0, 0, 0, 78, 50, 66, /* 0x 350 */
50, 56, 54, 48, 49, 0,123, 0, 0, 0, 78, 82, 86, 50, 66, 69, /* 0x 360 */
88, 50, 0,126, 0, 0, 0, 0, 0, 0, 0,138, 0, 0, 0, 78, /* 0x 370 */
82, 86, 50, 66, 69, 88, 51, 0, 6, 0, 0, 0, 0, 0, 0, 0, /* 0x 380 */
146, 0, 0, 0, 78, 82, 86, 50, 66, 69, 88, 51, 0, 6, 0, 0, /* 0x 390 */
0, 0, 0, 0, 0,175, 0, 0, 0, 78, 82, 86, 50, 66, 49, 54, /* 0x 3a0 */
83, 0, 1, 0, 0, 0, 78, 50, 66, 88, 56, 54, 48, 50, 0,175, /* 0x 3b0 */
0, 0, 0, 78, 50, 66, 50, 56, 54, 48, 50, 0,189, 0, 0, 0, /* 0x 3c0 */
78, 82, 86, 50, 66, 69, 88, 51, 0,195, 0, 0, 0, 0, 0, 0, /* 0x 3d0 */
0,201, 0, 0, 0, 78, 82, 86, 50, 66, 69, 88, 50, 0, 39, 0, /* 0x 3e0 */
0, 0, 0, 0, 0, 0,214, 0, 0, 0, 78, 82, 86, 50, 66, 69, /* 0x 3f0 */
88, 57, 0, 3, 0, 0, 0, 78, 50, 66, 54, 52, 75, 48, 50, 0, /* 0x 400 */
216, 0, 0, 0, 78, 82, 86, 50, 66, 69, 88, 57, 0,227, 0, 0, /* 0x 410 */
0, 78, 82, 86, 50, 66, 49, 54, 69, 0,231, 0, 0, 0, 78, 82, /* 0x 420 */
86, 50, 68, 49, 54, 83, 0,231, 0, 0, 0, 0, 0, 0, 0,239, /* 0x 430 */
0, 0, 0, 78, 82, 86, 50, 68, 69, 88, 51, 0, 19, 0, 0, 0, /* 0x 440 */
78, 50, 68, 54, 52, 75, 48, 49, 0,244, 0, 0, 0, 78, 82, 86, /* 0x 450 */
50, 68, 69, 88, 49, 0,255, 0, 0, 0, 0, 0, 0, 0, 2, 1, /* 0x 460 */
0, 0, 78, 82, 86, 50, 68, 69, 88, 51, 0, 6, 0, 0, 0, 0, /* 0x 470 */
0, 0, 0, 8, 1, 0, 0, 78, 82, 86, 50, 68, 69, 88, 51, 0, /* 0x 480 */
15, 0, 0, 0, 0, 0, 0, 0, 14, 1, 0, 0, 78, 82, 86, 50, /* 0x 490 */
68, 69, 88, 57, 0, 4, 0, 0, 0, 0, 0, 0, 0, 18, 1, 0, /* 0x 4a0 */
0, 78, 82, 86, 50, 68, 69, 88, 50, 0, 13, 0, 0, 0, 78, 50, /* 0x 4b0 */
68, 88, 56, 54, 48, 49, 0, 18, 1, 0, 0, 78, 50, 68, 50, 56, /* 0x 4c0 */
54, 48, 49, 0, 24, 1, 0, 0, 78, 82, 86, 50, 68, 69, 88, 50, /* 0x 4d0 */
0, 27, 1, 0, 0, 0, 0, 0, 0, 43, 1, 0, 0, 78, 82, 86, /* 0x 4e0 */
50, 68, 69, 88, 51, 0, 15, 0, 0, 0, 0, 0, 0, 0, 48, 1, /* 0x 4f0 */
0, 0, 78, 82, 86, 50, 68, 69, 88, 51, 0, 15, 0, 0, 0, 0, /* 0x 500 */
0, 0, 0, 56, 1, 0, 0, 78, 82, 86, 50, 68, 69, 88, 51, 0, /* 0x 510 */
6, 0, 0, 0, 0, 0, 0, 0, 84, 1, 0, 0, 78, 82, 86, 50, /* 0x 520 */
68, 49, 54, 83, 0, 1, 0, 0, 0, 78, 50, 68, 88, 56, 54, 48, /* 0x 530 */
50, 0, 84, 1, 0, 0, 78, 50, 68, 50, 56, 54, 48, 50, 0, 98, /* 0x 540 */
1, 0, 0, 78, 82, 86, 50, 68, 69, 88, 51, 0,104, 1, 0, 0, /* 0x 550 */
0, 0, 0, 0,110, 1, 0, 0, 78, 82, 86, 50, 68, 69, 88, 50, /* 0x 560 */
0, 47, 0, 0, 0, 0, 0, 0, 0,123, 1, 0, 0, 78, 82, 86, /* 0x 570 */
50, 68, 69, 88, 57, 0, 3, 0, 0, 0, 78, 50, 68, 54, 52, 75, /* 0x 580 */
48, 50, 0,125, 1, 0, 0, 78, 82, 86, 50, 68, 69, 88, 57, 0, /* 0x 590 */
136, 1, 0, 0, 78, 82, 86, 50, 68, 49, 54, 69, 0,140, 1, 0, /* 0x 5a0 */
0, 78, 82, 86, 50, 69, 49, 54, 83, 0,140, 1, 0, 0, 0, 0, /* 0x 5b0 */
0, 0,148, 1, 0, 0, 78, 82, 86, 50, 69, 69, 88, 51, 0, 19, /* 0x 5c0 */
0, 0, 0, 78, 50, 69, 54, 52, 75, 48, 49, 0,153, 1, 0, 0, /* 0x 5d0 */
78, 82, 86, 50, 69, 69, 88, 49, 0,164, 1, 0, 0, 0, 0, 0, /* 0x 5e0 */
0,167, 1, 0, 0, 78, 82, 86, 50, 69, 69, 88, 51, 0, 6, 0, /* 0x 5f0 */
0, 0, 0, 0, 0, 0,173, 1, 0, 0, 78, 82, 86, 50, 69, 69, /* 0x 600 */
88, 51, 0, 15, 0, 0, 0, 0, 0, 0, 0,179, 1, 0, 0, 78, /* 0x 610 */
82, 86, 50, 69, 69, 88, 57, 0, 4, 0, 0, 0, 0, 0, 0, 0, /* 0x 620 */
183, 1, 0, 0, 78, 82, 86, 50, 69, 69, 88, 50, 0, 20, 0, 0, /* 0x 630 */
0, 78, 50, 69, 88, 56, 54, 48, 49, 0,183, 1, 0, 0, 78, 50, /* 0x 640 */
69, 50, 56, 54, 48, 49, 0,189, 1, 0, 0, 78, 82, 86, 50, 69, /* 0x 650 */
69, 88, 50, 0,192, 1, 0, 0, 0, 0, 0, 0,208, 1, 0, 0, /* 0x 660 */
78, 82, 86, 50, 69, 69, 88, 51, 0, 15, 0, 0, 0, 0, 0, 0, /* 0x 670 */
0,215, 1, 0, 0, 78, 82, 86, 50, 69, 69, 88, 51, 0, 15, 0, /* 0x 680 */
0, 0, 0, 0, 0, 0,221, 1, 0, 0, 78, 82, 86, 50, 69, 69, /* 0x 690 */
88, 51, 0, 15, 0, 0, 0, 0, 0, 0, 0,226, 1, 0, 0, 78, /* 0x 6a0 */
82, 86, 50, 69, 69, 88, 51, 0, 6, 0, 0, 0, 0, 0, 0, 0, /* 0x 6b0 */
254, 1, 0, 0, 78, 82, 86, 50, 69, 49, 54, 83, 0, 1, 0, 0, /* 0x 6c0 */
0, 78, 50, 69, 88, 56, 54, 48, 50, 0,254, 1, 0, 0, 78, 50, /* 0x 6d0 */
69, 50, 56, 54, 48, 50, 0, 12, 2, 0, 0, 78, 82, 86, 50, 69, /* 0x 6e0 */
69, 88, 51, 0, 18, 2, 0, 0, 0, 0, 0, 0, 24, 2, 0, 0, /* 0x 6f0 */
78, 82, 86, 50, 69, 69, 88, 50, 0, 52, 0, 0, 0, 0, 0, 0, /* 0x 700 */
0, 37, 2, 0, 0, 78, 82, 86, 50, 69, 69, 88, 57, 0, 3, 0, /* 0x 710 */
0, 0, 78, 50, 69, 54, 52, 75, 48, 50, 0, 39, 2, 0, 0, 78, /* 0x 720 */
82, 86, 50, 69, 69, 88, 57, 0, 50, 2, 0, 0, 78, 82, 86, 50, /* 0x 730 */
69, 49, 54, 69, 0, 54, 2, 0, 0, 69, 88, 69, 77, 65, 73, 78, /* 0x 740 */
53, 0, 54, 2, 0, 0, 69, 88, 69, 82, 69, 76, 79, 67, 0, 55, /* 0x 750 */
2, 0, 0, 69, 88, 69, 65, 68, 74, 85, 83, 0, 55, 2, 0, 0, /* 0x 760 */
69, 88, 69, 78, 79, 65, 68, 74, 0, 62, 2, 0, 0, 69, 88, 69, /* 0x 770 */
82, 69, 76, 79, 49, 0, 64, 2, 0, 0, 0, 0, 0, 0, 91, 2, /* 0x 780 */
0, 0, 69, 88, 69, 82, 69, 76, 79, 50, 0, 0, 0, 0, 0, 69, /* 0x 790 */
88, 69, 82, 69, 76, 57, 65, 0, 94, 2, 0, 0, 0, 0, 0, 0, /* 0x 7a0 */
112, 2, 0, 0, 69, 88, 69, 82, 69, 76, 79, 49, 0, 18, 0, 0, /* 0x 7b0 */
0, 69, 88, 69, 82, 69, 76, 79, 50, 0,112, 2, 0, 0, 69, 88, /* 0x 7c0 */
69, 82, 69, 66, 73, 71, 0,116, 2, 0, 0, 0, 0, 0, 0,118, /* 0x 7d0 */
2, 0, 0, 69, 88, 69, 82, 69, 76, 79, 49, 0, 9, 0, 0, 0, /* 0x 7e0 */
69, 88, 69, 82, 69, 76, 79, 51, 0,118, 2, 0, 0, 0, 0, 0, /* 0x 7f0 */
0,120, 2, 0, 0, 69, 88, 69, 82, 69, 76, 79, 49, 0, 23, 0, /* 0x 800 */
0, 0, 69, 88, 69, 77, 65, 73, 78, 56, 0,120, 2, 0, 0, 69, /* 0x 810 */
88, 69, 83, 84, 65, 67, 75, 0,123, 2, 0, 0, 69, 88, 69, 68, /* 0x 820 */
85, 77, 77, 83, 0,129, 2, 0, 0, 69, 88, 69, 83, 84, 65, 83, /* 0x 830 */
80, 0,129, 2, 0, 0, 69, 88, 69, 68, 85, 77, 77, 80, 0,132, /* 0x 840 */
2, 0, 0, 69, 88, 69, 74, 85, 77, 80, 70, 0,132, 2, 0, 0, /* 0x 850 */
69, 88, 69, 82, 69, 84, 85, 82, 0,137, 2, 0, 0, 69, 88, 69, /* 0x 860 */
82, 67, 83, 80, 79, 0,137, 2, 0, 0, 69, 88, 69, 82, 69, 84, /* 0x 870 */
73, 80, 0,141, 2, 0, 0, 69, 88, 69, 68, 85, 77, 77, 90, 0, /* 0x 880 */
147, 2, 0, 0, 69, 88, 69, 84, 72, 69, 78, 68, 0,147, 2, 0, /* 0x 890 */
0,255,255,255,255,147, 2 /* 0x 8a0 */
unsigned char nrv_loader[2377] = {
255,255,255,255, 0, 0, 12, 0, 0, 0, 83, 84, 14, 46,255, 54, /* 0x 0 */
10, 0, 80, 83, 81, 82,140,200, 5, 79, 83,187, 79, 80,140,209, /* 0x 10 */
137,226,142,208,137,220, 81, 82, 86, 87, 85, 30, 6,114,249,156, /* 0x 20 */
185, 67, 88,190, 83, 73,137,247, 30,169,181,128,140,200, 5, 68, /* 0x 30 */
83,142,216, 5, 69, 83,142,192,253,243,165,252, 46,128,108, 66, /* 0x 40 */
16, 46,128,108, 18, 16,115, 0,146,175,173, 14, 14, 14, 6, 31, /* 0x 50 */
7, 22,189, 66, 80,187, 66, 88, 85,203, 85, 80, 88, 33,161,216, /* 0x 60 */
208,213, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 70 */
0, 0, 0, 0, 45,164, 0,255,117, 3,232, 0, 0,114,246, 65, /* 0x 80 */
140,192, 1,255,115, 5,128,196, 8,142,192,209,239,232, 0, 0, /* 0x 90 */
227, 0,115,249, 73, 73,116, 0, 1,201, 1,201, 1,201, 1,201, /* 0x a0 */
193,225, 4,137,205,138, 28, 70,246,211, 49,201,232, 0, 0, 17, /* 0x b0 */
201,117, 8, 65,232, 0, 0,115,251, 65, 65,129,253,209, 0,131, /* 0x c0 */
217,254, 41,232,114, 14,142,216,141, 1, 40,252,150,243,164,150, /* 0x d0 */
142,218,235, 0,209,224,209,224,209,224,209,224, 80, 49,192,142, /* 0x e0 */
216, 88,193,224, 4,106, 0, 31, 1,216, 1,248,235, 0, 0,255, /* 0x f0 */
117, 3,232, 6, 0, 17,201, 0,255,117, 0,138, 60, 17,246,115, /* 0x 100 */
5,128,198, 8,142,218,209,238, 70, 16,255,195,164, 0,255,117, /* 0x 110 */
3,232, 0, 0,114,246, 65,140,192, 1,255,115, 5,128,196, 8, /* 0x 120 */
142,192,209,239,232, 0, 0,114, 10, 73,232, 0, 0, 17,201,121, /* 0x 130 */
243,235, 0, 73, 73,116, 0, 1,201, 1,201, 1,201,193,225, 3, /* 0x 140 */
137,205,138, 28, 70,246,211, 49,201,208,235,235, 3,232, 0, 0, /* 0x 150 */
17,201,232, 0, 0, 17,201,117, 8, 65,232, 0, 0,115,251, 65, /* 0x 160 */
65,131,253, 81,131,217,254, 41,232,114, 14,142,216,141, 1, 40, /* 0x 170 */
252,150,243,164,150,142,218,235, 0,209,224,209,224,209,224,209, /* 0x 180 */
224, 80, 49,192,142,216, 88,193,224, 4,106, 0, 31, 1,216, 1, /* 0x 190 */
248,235, 0, 0,255,117, 3,232, 6, 0, 17,201, 0,255,117, 0, /* 0x 1a0 */
138, 60, 17,246,115, 5,128,198, 8,142,218,209,238, 70, 16,255, /* 0x 1b0 */
195,164, 0,255,117, 3,232, 0, 0,114,246, 65,140,192, 1,255, /* 0x 1c0 */
115, 5,128,196, 8,142,192,209,239,232, 0, 0,114, 10, 73,232, /* 0x 1d0 */
0, 0, 17,201,121,243,235, 0, 73, 73,116, 0, 1,201, 1,201, /* 0x 1e0 */
1,201,193,225, 3,137,205,138, 28, 70,246,211, 49,201,208,235, /* 0x 1f0 */
115, 12,232, 0, 0, 17,201,235, 18,232, 0, 0,114,244, 65,232, /* 0x 200 */
0, 0,114,238,232, 0, 0,115,251, 65, 65,131,253, 81,131,217, /* 0x 210 */
253, 41,232,114, 14,142,216,141, 1, 40,252,150,243,164,150,142, /* 0x 220 */
218,235, 0,209,224,209,224,209,224,209,224, 80, 49,192,142,216, /* 0x 230 */
88,193,224, 4,106, 0, 31, 1,216, 1,248,235, 0, 0,255,117, /* 0x 240 */
3,232, 6, 0, 17,201, 0,255,117, 0,138, 60, 17,246,115, 5, /* 0x 250 */
128,198, 8,142,218,209,238, 70, 16,255,195, 93,140,192,128,236, /* 0x 260 */
6,142,216, 6, 31,141,181, 82, 83,173, 91,145,173,146,173,151, /* 0x 270 */
173, 1,195,142,195, 49,192, 1,199, 38, 1, 45,172, 72,116, 0, /* 0x 280 */
64,117,244, 71, 71, 38,128, 61,154,117,249, 38, 57, 85, 3,119, /* 0x 290 */
243,176, 3,235, 0,129,199,254, 0,114, 0,226, 0, 7, 6, 31, /* 0x 2a0 */
157,114, 16, 7, 31, 93, 95, 94, 91, 88,142,208,137,220, 90, 89, /* 0x 2b0 */
91, 88,203,141,134, 83, 83,142,208,188, 83, 80,234, 73, 80, 67, /* 0x 2c0 */
83,129,197, 67, 83, 85,184, 73, 80, 80,203, 0, 68, 69, 86, 73, /* 0x 2d0 */
67, 69, 69, 78, 84, 82, 89, 0, 0, 0, 0, 0, 69, 88, 69, 69, /* 0x 2e0 */
78, 84, 82, 89, 0, 48, 0, 0, 0, 68, 69, 86, 73, 67, 69, 83, /* 0x 2f0 */
85, 66, 0, 76, 0, 0, 0, 69, 88, 69, 83, 85, 66, 0, 81, 0, /* 0x 300 */
0, 0, 74, 78, 67, 68, 79, 67, 79, 80, 89, 0, 86, 0, 0, 0, /* 0x 310 */
0, 0, 0, 0, 88, 0, 0, 0, 69, 88, 69, 69, 78, 84, 82, 89, /* 0x 320 */
0, 10, 0, 0, 0, 69, 88, 69, 82, 69, 76, 80, 85, 0, 91, 0, /* 0x 330 */
0, 0, 69, 88, 69, 77, 65, 73, 78, 52, 0, 92, 0, 0, 0, 85, /* 0x 340 */
80, 88, 49, 72, 69, 65, 68, 0,106, 0, 0, 0, 69, 88, 69, 67, /* 0x 350 */
85, 84, 80, 79, 0,133, 0, 0, 0, 78, 82, 86, 50, 66, 49, 54, /* 0x 360 */
83, 0,133, 0, 0, 0, 0, 0, 0, 0,141, 0, 0, 0, 78, 82, /* 0x 370 */
86, 50, 66, 69, 88, 51, 0, 19, 0, 0, 0, 78, 50, 66, 54, 52, /* 0x 380 */
75, 48, 49, 0,146, 0, 0, 0, 78, 82, 86, 50, 66, 69, 88, 49, /* 0x 390 */
0,157, 0, 0, 0, 0, 0, 0, 0,160, 0, 0, 0, 78, 82, 86, /* 0x 3a0 */
50, 66, 69, 88, 51, 0, 6, 0, 0, 0, 0, 0, 0, 0,162, 0, /* 0x 3b0 */
0, 0, 78, 82, 86, 50, 66, 69, 88, 57, 0, 4, 0, 0, 0, 0, /* 0x 3c0 */
0, 0, 0,168, 0, 0, 0, 78, 82, 86, 50, 66, 69, 88, 50, 0, /* 0x 3d0 */
9, 0, 0, 0, 78, 50, 66, 88, 56, 54, 48, 49, 0,168, 0, 0, /* 0x 3e0 */
0, 78, 50, 66, 50, 56, 54, 48, 49, 0,176, 0, 0, 0, 78, 82, /* 0x 3f0 */
86, 50, 66, 69, 88, 50, 0,179, 0, 0, 0, 0, 0, 0, 0,191, /* 0x 400 */
0, 0, 0, 78, 82, 86, 50, 66, 69, 88, 51, 0, 6, 0, 0, 0, /* 0x 410 */
0, 0, 0, 0,199, 0, 0, 0, 78, 82, 86, 50, 66, 69, 88, 51, /* 0x 420 */
0, 6, 0, 0, 0, 0, 0, 0, 0,228, 0, 0, 0, 78, 82, 86, /* 0x 430 */
50, 66, 49, 54, 83, 0, 1, 0, 0, 0, 78, 50, 66, 88, 56, 54, /* 0x 440 */
48, 50, 0,228, 0, 0, 0, 78, 50, 66, 50, 56, 54, 48, 50, 0, /* 0x 450 */
242, 0, 0, 0, 78, 82, 86, 50, 66, 69, 88, 51, 0,248, 0, 0, /* 0x 460 */
0, 0, 0, 0, 0,254, 0, 0, 0, 78, 82, 86, 50, 66, 69, 88, /* 0x 470 */
50, 0, 39, 0, 0, 0, 0, 0, 0, 0, 11, 1, 0, 0, 78, 82, /* 0x 480 */
86, 50, 66, 69, 88, 57, 0, 3, 0, 0, 0, 78, 50, 66, 54, 52, /* 0x 490 */
75, 48, 50, 0, 13, 1, 0, 0, 78, 82, 86, 50, 66, 69, 88, 57, /* 0x 4a0 */
0, 24, 1, 0, 0, 78, 82, 86, 50, 66, 49, 54, 69, 0, 28, 1, /* 0x 4b0 */
0, 0, 78, 82, 86, 50, 68, 49, 54, 83, 0, 28, 1, 0, 0, 0, /* 0x 4c0 */
0, 0, 0, 36, 1, 0, 0, 78, 82, 86, 50, 68, 69, 88, 51, 0, /* 0x 4d0 */
19, 0, 0, 0, 78, 50, 68, 54, 52, 75, 48, 49, 0, 41, 1, 0, /* 0x 4e0 */
0, 78, 82, 86, 50, 68, 69, 88, 49, 0, 52, 1, 0, 0, 0, 0, /* 0x 4f0 */
0, 0, 55, 1, 0, 0, 78, 82, 86, 50, 68, 69, 88, 51, 0, 6, /* 0x 500 */
0, 0, 0, 0, 0, 0, 0, 61, 1, 0, 0, 78, 82, 86, 50, 68, /* 0x 510 */
69, 88, 51, 0, 15, 0, 0, 0, 0, 0, 0, 0, 67, 1, 0, 0, /* 0x 520 */
78, 82, 86, 50, 68, 69, 88, 57, 0, 4, 0, 0, 0, 0, 0, 0, /* 0x 530 */
0, 71, 1, 0, 0, 78, 82, 86, 50, 68, 69, 88, 50, 0, 13, 0, /* 0x 540 */
0, 0, 78, 50, 68, 88, 56, 54, 48, 49, 0, 71, 1, 0, 0, 78, /* 0x 550 */
50, 68, 50, 56, 54, 48, 49, 0, 77, 1, 0, 0, 78, 82, 86, 50, /* 0x 560 */
68, 69, 88, 50, 0, 80, 1, 0, 0, 0, 0, 0, 0, 96, 1, 0, /* 0x 570 */
0, 78, 82, 86, 50, 68, 69, 88, 51, 0, 15, 0, 0, 0, 0, 0, /* 0x 580 */
0, 0,101, 1, 0, 0, 78, 82, 86, 50, 68, 69, 88, 51, 0, 15, /* 0x 590 */
0, 0, 0, 0, 0, 0, 0,109, 1, 0, 0, 78, 82, 86, 50, 68, /* 0x 5a0 */
69, 88, 51, 0, 6, 0, 0, 0, 0, 0, 0, 0,137, 1, 0, 0, /* 0x 5b0 */
78, 82, 86, 50, 68, 49, 54, 83, 0, 1, 0, 0, 0, 78, 50, 68, /* 0x 5c0 */
88, 56, 54, 48, 50, 0,137, 1, 0, 0, 78, 50, 68, 50, 56, 54, /* 0x 5d0 */
48, 50, 0,151, 1, 0, 0, 78, 82, 86, 50, 68, 69, 88, 51, 0, /* 0x 5e0 */
157, 1, 0, 0, 0, 0, 0, 0,163, 1, 0, 0, 78, 82, 86, 50, /* 0x 5f0 */
68, 69, 88, 50, 0, 47, 0, 0, 0, 0, 0, 0, 0,176, 1, 0, /* 0x 600 */
0, 78, 82, 86, 50, 68, 69, 88, 57, 0, 3, 0, 0, 0, 78, 50, /* 0x 610 */
68, 54, 52, 75, 48, 50, 0,178, 1, 0, 0, 78, 82, 86, 50, 68, /* 0x 620 */
69, 88, 57, 0,189, 1, 0, 0, 78, 82, 86, 50, 68, 49, 54, 69, /* 0x 630 */
0,193, 1, 0, 0, 78, 82, 86, 50, 69, 49, 54, 83, 0,193, 1, /* 0x 640 */
0, 0, 0, 0, 0, 0,201, 1, 0, 0, 78, 82, 86, 50, 69, 69, /* 0x 650 */
88, 51, 0, 19, 0, 0, 0, 78, 50, 69, 54, 52, 75, 48, 49, 0, /* 0x 660 */
206, 1, 0, 0, 78, 82, 86, 50, 69, 69, 88, 49, 0,217, 1, 0, /* 0x 670 */
0, 0, 0, 0, 0,220, 1, 0, 0, 78, 82, 86, 50, 69, 69, 88, /* 0x 680 */
51, 0, 6, 0, 0, 0, 0, 0, 0, 0,226, 1, 0, 0, 78, 82, /* 0x 690 */
86, 50, 69, 69, 88, 51, 0, 15, 0, 0, 0, 0, 0, 0, 0,232, /* 0x 6a0 */
1, 0, 0, 78, 82, 86, 50, 69, 69, 88, 57, 0, 4, 0, 0, 0, /* 0x 6b0 */
0, 0, 0, 0,236, 1, 0, 0, 78, 82, 86, 50, 69, 69, 88, 50, /* 0x 6c0 */
0, 20, 0, 0, 0, 78, 50, 69, 88, 56, 54, 48, 49, 0,236, 1, /* 0x 6d0 */
0, 0, 78, 50, 69, 50, 56, 54, 48, 49, 0,242, 1, 0, 0, 78, /* 0x 6e0 */
82, 86, 50, 69, 69, 88, 50, 0,245, 1, 0, 0, 0, 0, 0, 0, /* 0x 6f0 */
5, 2, 0, 0, 78, 82, 86, 50, 69, 69, 88, 51, 0, 15, 0, 0, /* 0x 700 */
0, 0, 0, 0, 0, 12, 2, 0, 0, 78, 82, 86, 50, 69, 69, 88, /* 0x 710 */
51, 0, 15, 0, 0, 0, 0, 0, 0, 0, 18, 2, 0, 0, 78, 82, /* 0x 720 */
86, 50, 69, 69, 88, 51, 0, 15, 0, 0, 0, 0, 0, 0, 0, 23, /* 0x 730 */
2, 0, 0, 78, 82, 86, 50, 69, 69, 88, 51, 0, 6, 0, 0, 0, /* 0x 740 */
0, 0, 0, 0, 51, 2, 0, 0, 78, 82, 86, 50, 69, 49, 54, 83, /* 0x 750 */
0, 1, 0, 0, 0, 78, 50, 69, 88, 56, 54, 48, 50, 0, 51, 2, /* 0x 760 */
0, 0, 78, 50, 69, 50, 56, 54, 48, 50, 0, 65, 2, 0, 0, 78, /* 0x 770 */
82, 86, 50, 69, 69, 88, 51, 0, 71, 2, 0, 0, 0, 0, 0, 0, /* 0x 780 */
77, 2, 0, 0, 78, 82, 86, 50, 69, 69, 88, 50, 0, 52, 0, 0, /* 0x 790 */
0, 0, 0, 0, 0, 90, 2, 0, 0, 78, 82, 86, 50, 69, 69, 88, /* 0x 7a0 */
57, 0, 3, 0, 0, 0, 78, 50, 69, 54, 52, 75, 48, 50, 0, 92, /* 0x 7b0 */
2, 0, 0, 78, 82, 86, 50, 69, 69, 88, 57, 0,103, 2, 0, 0, /* 0x 7c0 */
78, 82, 86, 50, 69, 49, 54, 69, 0,107, 2, 0, 0, 69, 88, 69, /* 0x 7d0 */
77, 65, 73, 78, 53, 0,107, 2, 0, 0, 69, 88, 69, 82, 69, 76, /* 0x 7e0 */
79, 67, 0,108, 2, 0, 0, 69, 88, 69, 65, 68, 74, 85, 83, 0, /* 0x 7f0 */
108, 2, 0, 0, 69, 88, 69, 78, 79, 65, 68, 74, 0,115, 2, 0, /* 0x 800 */
0, 69, 88, 69, 82, 69, 76, 79, 49, 0,117, 2, 0, 0, 0, 0, /* 0x 810 */
0, 0,144, 2, 0, 0, 69, 88, 69, 82, 69, 76, 79, 50, 0, 0, /* 0x 820 */
0, 0, 0, 69, 88, 69, 82, 69, 76, 57, 65, 0,147, 2, 0, 0, /* 0x 830 */
0, 0, 0, 0,165, 2, 0, 0, 69, 88, 69, 82, 69, 76, 79, 49, /* 0x 840 */
0, 18, 0, 0, 0, 69, 88, 69, 82, 69, 76, 79, 50, 0,165, 2, /* 0x 850 */
0, 0, 69, 88, 69, 82, 69, 66, 73, 71, 0,169, 2, 0, 0, 0, /* 0x 860 */
0, 0, 0,171, 2, 0, 0, 69, 88, 69, 82, 69, 76, 79, 49, 0, /* 0x 870 */
9, 0, 0, 0, 69, 88, 69, 82, 69, 76, 79, 51, 0,171, 2, 0, /* 0x 880 */
0, 0, 0, 0, 0,173, 2, 0, 0, 69, 88, 69, 82, 69, 76, 79, /* 0x 890 */
49, 0, 23, 0, 0, 0, 69, 88, 69, 77, 65, 73, 78, 56, 0,173, /* 0x 8a0 */
2, 0, 0, 68, 69, 86, 73, 67, 69, 69, 78, 68, 0,176, 2, 0, /* 0x 8b0 */
0, 69, 88, 69, 83, 84, 65, 67, 75, 0,195, 2, 0, 0, 69, 88, /* 0x 8c0 */
69, 68, 85, 77, 77, 83, 0,201, 2, 0, 0, 69, 88, 69, 83, 84, /* 0x 8d0 */
65, 83, 80, 0,201, 2, 0, 0, 69, 88, 69, 68, 85, 77, 77, 80, /* 0x 8e0 */
0,204, 2, 0, 0, 69, 88, 69, 74, 85, 77, 80, 70, 0,204, 2, /* 0x 8f0 */
0, 0, 69, 88, 69, 82, 69, 84, 85, 82, 0,209, 2, 0, 0, 69, /* 0x 900 */
88, 69, 82, 67, 83, 80, 79, 0,209, 2, 0, 0, 69, 88, 69, 82, /* 0x 910 */
69, 84, 73, 80, 0,213, 2, 0, 0, 69, 88, 69, 68, 85, 77, 77, /* 0x 920 */
90, 0,219, 2, 0, 0, 69, 88, 69, 84, 72, 69, 78, 68, 0,219, /* 0x 930 */
2, 0, 0,255,255,255,255,219, 2 /* 0x 940 */
};
+13 -9
View File
@@ -268,10 +268,9 @@ xfind_pages(unsigned mflags, Elf32_Phdr const *phdr, int phnum,
lo -= ~PAGE_MASK & lo; // round down to page boundary
hi = PAGE_MASK & (hi - lo - PAGE_MASK -1); // page length
szlo = PAGE_MASK & (szlo - PAGE_MASK -1); // page length
addr = mmap((void *)lo, hi, PROT_READ|PROT_WRITE|PROT_EXEC,
mflags, 0, 0 );
addr = mmap((void *)lo, hi, PROT_NONE, mflags, -1, 0);
*p_brk = hi + addr; // the logical value of brk(0)
munmap(szlo + addr, hi - szlo); // desirable if PT_LOAD non-contiguous
//mprotect(szlo + addr, hi - szlo, PROT_NONE); // no access, but keep the frames!
return (unsigned long)addr - lo;
}
@@ -300,33 +299,38 @@ do_xmap(int const fdi, Elf32_Ehdr const *const ehdr, struct Extent *const xi,
addr -= frag;
// Decompressor can overrun the destination by 3 bytes.
if (addr != mmap(addr, mlen + (xi ? 3 : 0), PROT_READ | PROT_WRITE,
if (addr != mmap(addr, mlen + (xi ? 3 : 0), prot | (xi ? PROT_WRITE : 0),
MAP_FIXED | MAP_PRIVATE | (xi ? MAP_ANONYMOUS : 0),
fdi, phdr->p_offset - frag) ) {
(xi ? -1 : fdi), phdr->p_offset - frag) ) {
err_exit(8);
}
if (xi) {
unpackExtent(xi, &xo, (f_expand *)fdi,
((phdr->p_flags & PF_X) ? (f_unfilter *)(2+ fdi) : 0));
((PROT_EXEC & prot) ? (f_unfilter *)(2+ fdi) : 0));
}
bzero(addr, frag); // fragment at lo end
// Linux does not fixup the low end, so neither do we.
//if (PROT_WRITE & prot) {
// bzero(addr, frag); // fragment at lo end
//}
frag = (-mlen) &~ PAGE_MASK; // distance to next page boundary
if (PROT_WRITE & prot) { // note: read-only .bss not supported here
bzero(mlen+addr, frag); // fragment at hi end
}
if (xi) {
void *const hatch = make_hatch(phdr, reloc);
if (0!=hatch) {
/* always update AT_NULL, especially for compressed PT_INTERP */
auxv_up((Elf32_auxv_t *)(~1 & (int)av), AT_NULL, (unsigned)hatch);
}
}
if (0!=mprotect(addr, mlen, prot)) {
err_exit(10);
ERR_LAB
}
}
addr += mlen + frag; /* page boundary on hi end */
if (addr < haddr) { // need pages for .bss
if (addr != mmap(addr, haddr - addr, prot,
MAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS, 0, 0 ) ) {
MAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS, -1, 0 ) ) {
err_exit(9);
}
}
+30 -5
View File
@@ -58,7 +58,6 @@ PAGE_SIZE= -PAGE_MASK
M_NRV2B_LE32=2 # ../conf.h
M_NRV2E_LE32=8
#define ALIGN(n) .align n
/*__LEXEC000__*/
_start: .globl _start
@@ -127,7 +126,7 @@ ra_setup:
#define getnextbp(reg) call *%r11; adcl reg,reg
#define getnextb(reg) getnextbp(reg)
ALIGN(1<<3)
.p2align 3
getbit:
addl bits,bits; jz refill # Carry= next bit
rep; ret
@@ -169,6 +168,29 @@ eof:
pop %rbx; pop %rbp
ret
/* Temporary until we get the buildLoader stuff working ... */
.ascii "\n$Id: UPX (C) 1996-2006 the UPX Team. "
.asciz "All Rights Reserved. http://upx.sf.net $\n"
/* These from /usr/include/asm-x86_64/unistd.h */
__NR_write = 1
__NR_exit = 60
msg_SELinux:
push $ L71 - L70; pop %arg3 # length
call L71
L70:
.asciz "PROT_EXEC|PROT_WRITE failed.\n"
L71:
pop %arg2 # message text
push $2; pop %arg1 # fd stderr
push $ __NR_write; pop %rax
syscall
die:
push $127; pop %arg1
push $ __NR_exit; pop %rax
syscall
/* Decompress the rest of this loader, and jump to it.
Map a page to hold the decompressed bytes. Logically this could
be done by setting .p_memsz for our first PT_LOAD. But as of 2005-11-09,
@@ -195,7 +217,7 @@ unfold:
subl %arg5l,%arg5l #; subl %arg6l,%arg6l # MAP_ANON ==> ignore offset
push $ SYS_mmap; pop %rax
syscall # %rax= result; trashes %rcx,%r11 only
cmpl %eax,%edi; je 0f; hlt; 0: # XXX: 4GB
cmpl %eax,%edi; jne msg_SELinux # XXX: 4GB
/* Load the addresses and lengths that ::pack3() patched in.
XXX: 2GB Note that PUSH $imm32 sign-extends to 64 bits.
@@ -226,11 +248,14 @@ unfold:
movl %ebx,%esi # %arg2l= &b_info (relocated)
push %rax # ret_addr after decompression
xchgl %eax,%arg3l # %arg3= dst for unfolding XXX: 4GB
lodsl; movl %esi,%arg4l # &len_dst ==> &do_not_care XXX: 4GB
lodsl; push %rax # allocate slot on stack
movq %rsp,%arg4 # &len_dst ==> &do_not_care
lodsl; xchgl %eax,%arg1l # sz_cpr XXX: 4GB
lodsl; movzbl %al,%arg5l # b_method
xchg %arg1l,%arg2l # XXX: 4GB
jmp *%rbp # goto decompress; return to unfolded loader
call *%rbp # decompress
pop %rcx # discard len_dst
ret
main:
# int3 # uncomment for debugging
+22 -13
View File
@@ -1,4 +1,4 @@
/* l_lx_elf64amd.h -- created from l_lx_elf64amd.bin, 560 (0x230) bytes
/* l_lx_elf64amd.h -- created from l_lx_elf64amd.bin, 701 (0x2bd) bytes
This file is part of the UPX executable compressor.
@@ -27,12 +27,12 @@
*/
#define LINUX_ELF64AMD_LOADER_SIZE 560
#define LINUX_ELF64AMD_LOADER_ADLER32 0xdfe11659
#define LINUX_ELF64AMD_LOADER_CRC32 0x1c0a6afb
#define LINUX_ELF64AMD_LOADER_SIZE 701
#define LINUX_ELF64AMD_LOADER_ADLER32 0xf7af3eba
#define LINUX_ELF64AMD_LOADER_CRC32 0x8ec9e668
unsigned char linux_elf64amd_loader[560] = {
232, 37, 2, 0, 0, 85, 83, 81, 82, 72, 1,254, 86, 72,137,254, /* 0x 0 */
unsigned char linux_elf64amd_loader[701] = {
232,178, 2, 0, 0, 85, 83, 81, 82, 72, 1,254, 86, 72,137,254, /* 0x 0 */
72,137,215, 49,219, 49,201, 72,131,205,255,232,129, 1, 0, 0, /* 0x 10 */
1,219,116, 2,243,195,139, 30, 72,131,238,252, 17,219,138, 22, /* 0x 20 */
243,195, 72,141, 4, 47,131,249, 5,138, 16,118, 33, 72,131,253, /* 0x 30 */
@@ -60,11 +60,20 @@ unsigned char linux_elf64amd_loader[560] = {
237, 72,129,253, 0,243,255,255, 17,193,232,147,254,255,255,235, /* 0x 190 */
135,252, 65, 91, 65,131,248, 8, 15,132,202,254,255,255, 65,131, /* 0x 1a0 */
248, 2, 15,132,112,255,255,255, 89, 72,137,240, 72, 41,200, 90, /* 0x 1b0 */
72, 41,215, 89,137, 57, 91, 93,195, 91,191, 65, 68, 82, 77,106, /* 0x 1c0 */
7, 90,190, 76, 69, 78, 77,106, 50, 65, 90, 69, 41,192,106, 9, /* 0x 1d0 */
88, 15, 5, 57,199,116, 1,244,104, 74, 77, 80, 85,104, 65, 68, /* 0x 1e0 */
82, 85,190, 65, 68, 82, 67,104, 76, 69, 78, 85,185, 67, 78, 84, /* 0x 1f0 */
67,104, 65, 68, 82, 88,104, 76, 69, 78, 88,137,250, 41,242, 1, /* 0x 200 */
213, 1,211,252,243, 72,165,151,137,222, 80,146,173,137,241,173, /* 0x 210 */
151,173, 68, 15,182,192,135,254,255,229, 93,232,153,255,255,255 /* 0x 220 */
72, 41,215, 89,137, 57, 91, 93,195, 10, 36, 73,100, 58, 32, 85, /* 0x 1c0 */
80, 88, 32, 40, 67, 41, 32, 49, 57, 57, 54, 45, 50, 48, 48, 54, /* 0x 1d0 */
32,116,104,101, 32, 85, 80, 88, 32, 84,101, 97,109, 46, 32, 65, /* 0x 1e0 */
108,108, 32, 82,105,103,104,116,115, 32, 82,101,115,101,114,118, /* 0x 1f0 */
101,100, 46, 32,104,116,116,112, 58, 47, 47,117,112,120, 46,115, /* 0x 200 */
102, 46,110,101,116, 32, 36, 10, 0,104, 30, 0, 0, 0, 90,232, /* 0x 210 */
30, 0, 0, 0, 80, 82, 79, 84, 95, 69, 88, 69, 67,124, 80, 82, /* 0x 220 */
79, 84, 95, 87, 82, 73, 84, 69, 32,102, 97,105,108,101,100, 46, /* 0x 230 */
10, 0, 94,106, 2, 95,106, 1, 88, 15, 5,106,127, 95,106, 60, /* 0x 240 */
88, 15, 5, 91,191, 65, 68, 82, 77,106, 7, 90,190, 76, 69, 78, /* 0x 250 */
77,106, 50, 65, 90, 69, 41,192,106, 9, 88, 15, 5, 57,199,117, /* 0x 260 */
168,104, 74, 77, 80, 85,104, 65, 68, 82, 85,190, 65, 68, 82, 67, /* 0x 270 */
104, 76, 69, 78, 85,185, 67, 78, 84, 67,104, 65, 68, 82, 88,104, /* 0x 280 */
76, 69, 78, 88,137,250, 41,242, 1,213, 1,211,252,243, 72,165, /* 0x 290 */
151,137,222, 80,146,173, 80, 72,137,225,173,151,173, 68, 15,182, /* 0x 2a0 */
192,135,254,255,213, 89,195, 93,232,150,255,255,255 /* 0x 2b0 */
};
+1 -1
View File
@@ -33,7 +33,7 @@ OUTPUT_ARCH(i386:x86-64)
/*ENTRY(_start)*/
PHDRS
{
text PT_LOAD FILEHDR PHDRS ;
text PT_LOAD FILEHDR PHDRS FLAGS ( 5 ) ; /* r-x (no -w-) */
data PT_LOAD ; /* for setting brk(0) */
}
SECTIONS
+35 -3
View File
@@ -136,6 +136,28 @@ decompress:
%define szElf32_Ehdr 0x34
%define p_memsz 5*4
%define __NR_write 4
%define __NR_exit 1
msg_SELinux:
push byte L71 - L70
pop edx ; length
call L71
L70:
db "PROT_EXEC|PROT_WRITE failed.",10
L71:
pop ecx ; message text
push byte 2 ; fd stderr
pop ebx
push byte __NR_write
pop eax
int 0x80
die:
mov bl, byte 127 ; only low 7 bits matter!
push byte __NR_exit
pop eax ; write to stderr could fail, leaving eax as -EBADF etc.
int 0x80
; Decompress the rest of this loader, and jump to it
unfold:
pop esi ; &{ b_info:{sz_unc, sz_cpr, 4{byte}}, compressed_data...}
@@ -143,14 +165,22 @@ unfold:
lea eax, [ebp - (4+ decompress - _start)] ; 4: sizeof(int)
sub eax, [eax] ; %eax= &Elf32_Ehdr of this program
mov edx, eax ; %edx= &Elf32_Ehdr of this program
add eax, [p_memsz + szElf32_Ehdr + eax] ; page after .text
; Linux requires PF_W in order to create .bss (implied by .p_filesz!=.p_memsz),
; but strict SELinux (or PaX, grSecurity) forbids PF_W with PF_X.
; So first PT_LOAD must be PF_R|PF_X only, and .p_memsz==.p_filesz.
; So we must round up here, instead of pre-rounding .p_memsz.
add eax, [p_memsz + szElf32_Ehdr + eax] ; address after .text
add eax, PAGE_SIZE -1
and eax, -PAGE_SIZE
push eax ; destination for 'ret'
; mmap a page to hold the decompressed fold_elf86
xor ecx, ecx ; %ecx= 0
; MAP_ANONYMOUS ==>offset is ignored, so do not push!
; push ecx ; offset
push ecx ; fd must be in valid range, but then ignored
push byte -1 ; *BSD demands -1==fd for mmap(,,,MAP_ANON,,)
push byte MAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS
mov ch, PAGE_SIZE >> 8 ; %ecx= PAGE_SIZE
push byte PROT_READ | PROT_WRITE | PROT_EXEC
@@ -160,6 +190,8 @@ unfold:
push byte __NR_mmap
pop eax
int 0x80 ; changes only %eax; %edx is live
test eax,eax
js msg_SELinux
xchg eax, edx ; %edx= page after .text; %eax= &Elf32_Ehdr of this program
xchg eax, ebx ; %ebx= &Elf32_Ehdr of this program
@@ -178,7 +210,7 @@ unfold:
main:
pop ebp ; &decompress
call unfold
; compressed fold_elf86 follows
eof:
; __XTHEENDX__
section .data
+262 -258
View File
@@ -1,4 +1,4 @@
/* l_lx_elf86.h -- created from l_lx_elf86.bin, 5285 (0x14a5) bytes
/* l_lx_elf86.h -- created from l_lx_elf86.bin, 5353 (0x14e9) bytes
This file is part of the UPX executable compressor.
@@ -27,11 +27,11 @@
*/
#define LINUX_I386ELF_LOADER_SIZE 5285
#define LINUX_I386ELF_LOADER_ADLER32 0xe35db8a7
#define LINUX_I386ELF_LOADER_CRC32 0x6f1175f8
#define LINUX_I386ELF_LOADER_SIZE 5353
#define LINUX_I386ELF_LOADER_ADLER32 0x73ead289
#define LINUX_I386ELF_LOADER_CRC32 0x30e5b9ec
unsigned char linux_i386elf_loader[5285] = {
unsigned char linux_i386elf_loader[5353] = {
232, 0, 0, 0, 0, 96,106, 63,139,116, 36, 40,139,124, 36, 48, /* 0x 0 */
131,205,255,235, 0,164,235, 0,138, 6, 70,136, 7, 71, 1,219, /* 0x 10 */
117, 7,139, 30,131,238,252, 17,219,114, 0, 49,192, 64,138, 7, /* 0x 20 */
@@ -110,257 +110,261 @@ unsigned char linux_i386elf_loader[5285] = {
119, 6,128,127,254, 15,116, 0, 44,232, 60, 1,119, 0, 56, 23, /* 0x 4b0 */
117, 0,139, 7,102,193,232, 8,193,192, 16,134,196, 41,248, 1, /* 0x 4c0 */
240,137, 7,131,199, 4,131,233, 4,138, 7,131,199, 1,226, 0, /* 0x 4d0 */
131,233, 1,127, 0, 97,195, 94,141, 69,247, 43, 0,137,194, 3, /* 0x 4e0 */
64, 72, 80, 49,201, 81,106, 50,181, 16,106, 7, 81, 80,137,227, /* 0x 4f0 */
106, 90, 88,205,128,146,147,252,173, 80, 84, 82,173, 80,173, 86, /* 0x 500 */
255,213,131,196, 40,195, 93,232,203,255,255,255, 76, 69, 88, 69, /* 0x 510 */
67, 48, 48, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, /* 0x 520 */
0, 76, 69, 88, 69, 67, 48, 50, 48, 0, 47, 0, 0, 0, 76, 69, /* 0x 530 */
88, 69, 67, 48, 48, 57, 0, 5, 0, 0, 0, 76, 69, 88, 69, 67, /* 0x 540 */
48, 49, 48, 0, 5, 0, 0, 0, 78, 50, 66, 83, 77, 65, 49, 48, /* 0x 550 */
0, 19, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 78, 50, 66, /* 0x 560 */
68, 69, 67, 49, 48, 0, 4, 0, 0, 0, 78, 50, 66, 70, 65, 83, /* 0x 570 */
49, 48, 0, 22, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 78, /* 0x 580 */
50, 66, 68, 69, 67, 49, 48, 0, 4, 0, 0, 0, 78, 50, 66, 70, /* 0x 590 */
65, 83, 49, 49, 0, 24, 0, 0, 0, 78, 50, 66, 68, 69, 67, 49, /* 0x 5a0 */
48, 0, 30, 0, 0, 0, 78, 50, 66, 83, 77, 65, 50, 48, 0, 41, /* 0x 5b0 */
0, 0, 0, 0, 0, 0, 0, 43, 0, 0, 0, 78, 50, 66, 83, 77, /* 0x 5c0 */
65, 49, 48, 0, 2, 0, 0, 0, 78, 50, 66, 70, 65, 83, 50, 48, /* 0x 5d0 */
0, 46, 0, 0, 0, 0, 0, 0, 0, 50, 0, 0, 0, 78, 50, 66, /* 0x 5e0 */
70, 65, 83, 49, 49, 0, 0, 0, 0, 0, 78, 50, 66, 68, 69, 67, /* 0x 5f0 */
50, 48, 0, 55, 0, 0, 0, 78, 50, 66, 83, 77, 65, 51, 48, 0, /* 0x 600 */
68, 0, 0, 0, 0, 0, 0, 0, 81, 0, 0, 0, 78, 50, 66, 68, /* 0x 610 */
69, 67, 50, 48, 0, 0, 0, 0, 0, 78, 50, 66, 70, 65, 83, 51, /* 0x 620 */
48, 0, 81, 0, 0, 0, 0, 0, 0, 0, 85, 0, 0, 0, 78, 50, /* 0x 630 */
66, 68, 69, 67, 50, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, /* 0x 640 */
0, 0, 0, 78, 50, 66, 68, 69, 67, 50, 48, 0, 0, 0, 0, 0, /* 0x 650 */
78, 50, 66, 68, 69, 67, 51, 48, 0, 96, 0, 0, 0, 0, 0, 0, /* 0x 660 */
0,114, 0, 0, 0, 78, 50, 66, 68, 69, 67, 54, 48, 0, 0, 0, /* 0x 670 */
0, 0, 0, 0, 0, 0,144, 0, 0, 0, 78, 50, 66, 68, 69, 67, /* 0x 680 */
53, 48, 0, 0, 0, 0, 0, 78, 50, 66, 83, 77, 65, 52, 48, 0, /* 0x 690 */
158, 0, 0, 0, 0, 0, 0, 0,171, 0, 0, 0, 78, 50, 66, 68, /* 0x 6a0 */
69, 67, 51, 48, 0, 49, 0, 0, 0, 78, 50, 66, 70, 65, 83, 52, /* 0x 6b0 */
48, 0,171, 0, 0, 0, 0, 0, 0, 0,175, 0, 0, 0, 78, 50, /* 0x 6c0 */
66, 68, 69, 67, 51, 48, 0, 49, 0, 0, 0, 0, 0, 0, 0,186, /* 0x 6d0 */
0, 0, 0, 78, 50, 66, 68, 69, 67, 51, 48, 0, 49, 0, 0, 0, /* 0x 6e0 */
78, 50, 66, 68, 85, 77, 77, 49, 0,186, 0, 0, 0, 78, 50, 66, /* 0x 6f0 */
83, 77, 65, 53, 48, 0,186, 0, 0, 0, 78, 50, 66, 70, 65, 83, /* 0x 700 */
53, 48, 0,188, 0, 0, 0, 78, 50, 66, 68, 69, 67, 53, 48, 0, /* 0x 710 */
191, 0, 0, 0, 78, 50, 66, 83, 77, 65, 54, 48, 0,200, 0, 0, /* 0x 720 */
0, 0, 0, 0, 0,212, 0, 0, 0, 78, 50, 66, 68, 69, 67, 49, /* 0x 730 */
48, 0, 0, 0, 0, 0, 78, 50, 66, 70, 65, 83, 54, 48, 0,212, /* 0x 740 */
0, 0, 0, 0, 0, 0, 0,223, 0, 0, 0, 78, 50, 66, 70, 65, /* 0x 750 */
83, 54, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0,237, 0, 0, 0, /* 0x 760 */
78, 50, 66, 68, 69, 67, 49, 48, 0, 0, 0, 0, 0, 78, 50, 66, /* 0x 770 */
70, 65, 83, 54, 49, 0,237, 0, 0, 0, 0, 0, 0, 0, 3, 1, /* 0x 780 */
0, 0, 78, 50, 66, 68, 69, 67, 49, 48, 0, 0, 0, 0, 0, 78, /* 0x 790 */
50, 66, 68, 69, 67, 54, 48, 0, 3, 1, 0, 0, 78, 82, 86, 50, /* 0x 7a0 */
66, 69, 78, 68, 0, 3, 1, 0, 0, 78, 50, 68, 83, 77, 65, 49, /* 0x 7b0 */
48, 0, 3, 1, 0, 0, 0, 0, 0, 0, 5, 1, 0, 0, 78, 50, /* 0x 7c0 */
68, 68, 69, 67, 49, 48, 0, 4, 0, 0, 0, 78, 50, 68, 70, 65, /* 0x 7d0 */
83, 49, 48, 0, 6, 1, 0, 0, 0, 0, 0, 0, 8, 1, 0, 0, /* 0x 7e0 */
78, 50, 68, 68, 69, 67, 49, 48, 0, 4, 0, 0, 0, 78, 50, 68, /* 0x 7f0 */
70, 65, 83, 49, 49, 0, 8, 1, 0, 0, 78, 50, 68, 68, 69, 67, /* 0x 800 */
49, 48, 0, 14, 1, 0, 0, 78, 50, 68, 83, 77, 65, 50, 48, 0, /* 0x 810 */
25, 1, 0, 0, 0, 0, 0, 0, 27, 1, 0, 0, 78, 50, 68, 83, /* 0x 820 */
77, 65, 49, 48, 0, 2, 0, 0, 0, 78, 50, 68, 70, 65, 83, 50, /* 0x 830 */
48, 0, 30, 1, 0, 0, 0, 0, 0, 0, 34, 1, 0, 0, 78, 50, /* 0x 840 */
68, 70, 65, 83, 49, 49, 0, 0, 0, 0, 0, 78, 50, 68, 68, 69, /* 0x 850 */
67, 50, 48, 0, 39, 1, 0, 0, 78, 50, 68, 83, 77, 65, 51, 48, /* 0x 860 */
0, 52, 1, 0, 0, 0, 0, 0, 0, 65, 1, 0, 0, 78, 50, 68, /* 0x 870 */
68, 69, 67, 51, 48, 0, 16, 0, 0, 0, 78, 50, 68, 70, 65, 83, /* 0x 880 */
51, 48, 0, 65, 1, 0, 0, 0, 0, 0, 0, 71, 1, 0, 0, 78, /* 0x 890 */
50, 68, 68, 69, 67, 51, 48, 0, 16, 0, 0, 0, 0, 0, 0, 0, /* 0x 8a0 */
80, 1, 0, 0, 78, 50, 68, 68, 69, 67, 51, 48, 0, 16, 0, 0, /* 0x 8b0 */
0, 78, 50, 68, 68, 69, 67, 51, 48, 0, 80, 1, 0, 0, 0, 0, /* 0x 8c0 */
0, 0, 96, 1, 0, 0, 78, 50, 68, 68, 69, 67, 50, 48, 0, 0, /* 0x 8d0 */
0, 0, 0, 0, 0, 0, 0,114, 1, 0, 0, 78, 50, 68, 68, 69, /* 0x 8e0 */
67, 54, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,148, 1, 0, 0, /* 0x 8f0 */
78, 50, 68, 68, 69, 67, 53, 48, 0, 0, 0, 0, 0, 78, 50, 68, /* 0x 900 */
83, 77, 65, 52, 48, 0,162, 1, 0, 0, 0, 0, 0, 0,175, 1, /* 0x 910 */
0, 0, 78, 50, 68, 68, 69, 67, 51, 48, 0, 69, 0, 0, 0, 78, /* 0x 920 */
50, 68, 70, 65, 83, 52, 48, 0,175, 1, 0, 0, 0, 0, 0, 0, /* 0x 930 */
179, 1, 0, 0, 78, 50, 68, 68, 69, 67, 51, 48, 0, 69, 0, 0, /* 0x 940 */
0, 0, 0, 0, 0,190, 1, 0, 0, 78, 50, 68, 68, 69, 67, 51, /* 0x 950 */
48, 0, 69, 0, 0, 0, 78, 50, 68, 68, 85, 77, 77, 49, 0,190, /* 0x 960 */
1, 0, 0, 78, 50, 68, 83, 77, 65, 53, 48, 0,190, 1, 0, 0, /* 0x 970 */
78, 50, 68, 70, 65, 83, 53, 48, 0,192, 1, 0, 0, 78, 50, 68, /* 0x 980 */
68, 69, 67, 53, 48, 0,195, 1, 0, 0, 78, 50, 68, 83, 77, 65, /* 0x 990 */
54, 48, 0,204, 1, 0, 0, 0, 0, 0, 0,216, 1, 0, 0, 78, /* 0x 9a0 */
50, 68, 68, 69, 67, 49, 48, 0, 0, 0, 0, 0, 78, 50, 68, 70, /* 0x 9b0 */
65, 83, 54, 48, 0,216, 1, 0, 0, 0, 0, 0, 0,227, 1, 0, /* 0x 9c0 */
0, 78, 50, 68, 70, 65, 83, 54, 49, 0, 0, 0, 0, 0, 0, 0, /* 0x 9d0 */
0, 0,241, 1, 0, 0, 78, 50, 68, 68, 69, 67, 49, 48, 0, 0, /* 0x 9e0 */
0, 0, 0, 78, 50, 68, 70, 65, 83, 54, 49, 0,241, 1, 0, 0, /* 0x 9f0 */
0, 0, 0, 0, 7, 2, 0, 0, 78, 50, 68, 68, 69, 67, 49, 48, /* 0x a00 */
0, 0, 0, 0, 0, 78, 50, 68, 68, 69, 67, 54, 48, 0, 7, 2, /* 0x a10 */
0, 0, 78, 82, 86, 50, 68, 69, 78, 68, 0, 7, 2, 0, 0, 78, /* 0x a20 */
50, 69, 83, 77, 65, 49, 48, 0, 7, 2, 0, 0, 0, 0, 0, 0, /* 0x a30 */
9, 2, 0, 0, 78, 50, 69, 68, 69, 67, 49, 48, 0, 4, 0, 0, /* 0x a40 */
0, 78, 50, 69, 70, 65, 83, 49, 48, 0, 10, 2, 0, 0, 0, 0, /* 0x a50 */
0, 0, 12, 2, 0, 0, 78, 50, 69, 68, 69, 67, 49, 48, 0, 4, /* 0x a60 */
0, 0, 0, 78, 50, 69, 70, 65, 83, 49, 49, 0, 12, 2, 0, 0, /* 0x a70 */
78, 50, 69, 68, 69, 67, 49, 48, 0, 18, 2, 0, 0, 78, 50, 69, /* 0x a80 */
83, 77, 65, 50, 48, 0, 29, 2, 0, 0, 0, 0, 0, 0, 31, 2, /* 0x a90 */
0, 0, 78, 50, 69, 83, 77, 65, 49, 48, 0, 2, 0, 0, 0, 78, /* 0x aa0 */
50, 69, 70, 65, 83, 50, 48, 0, 34, 2, 0, 0, 0, 0, 0, 0, /* 0x ab0 */
38, 2, 0, 0, 78, 50, 69, 70, 65, 83, 49, 49, 0, 0, 0, 0, /* 0x ac0 */
0, 78, 50, 69, 68, 69, 67, 50, 48, 0, 43, 2, 0, 0, 78, 50, /* 0x ad0 */
69, 83, 77, 65, 51, 48, 0, 56, 2, 0, 0, 0, 0, 0, 0, 69, /* 0x ae0 */
2, 0, 0, 78, 50, 69, 68, 69, 67, 51, 48, 0, 31, 0, 0, 0, /* 0x af0 */
78, 50, 69, 70, 65, 83, 51, 48, 0, 69, 2, 0, 0, 0, 0, 0, /* 0x b00 */
0, 75, 2, 0, 0, 78, 50, 69, 68, 69, 67, 51, 48, 0, 31, 0, /* 0x b10 */
0, 0, 0, 0, 0, 0, 84, 2, 0, 0, 78, 50, 69, 68, 69, 67, /* 0x b20 */
51, 48, 0, 31, 0, 0, 0, 78, 50, 69, 68, 69, 67, 51, 48, 0, /* 0x b30 */
84, 2, 0, 0, 0, 0, 0, 0,100, 2, 0, 0, 78, 50, 69, 68, /* 0x b40 */
69, 67, 50, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,115, 2, 0, /* 0x b50 */
0, 78, 50, 69, 68, 69, 67, 53, 48, 0, 0, 0, 0, 0, 0, 0, /* 0x b60 */
0, 0,133, 2, 0, 0, 78, 50, 69, 68, 69, 67, 54, 48, 0, 0, /* 0x b70 */
0, 0, 0, 78, 50, 69, 83, 77, 65, 52, 48, 0,179, 2, 0, 0, /* 0x b80 */
0, 0, 0, 0,192, 2, 0, 0, 78, 50, 69, 68, 69, 67, 51, 48, /* 0x b90 */
0, 82, 0, 0, 0, 78, 50, 69, 70, 65, 83, 52, 48, 0,192, 2, /* 0x ba0 */
0, 0, 0, 0, 0, 0,196, 2, 0, 0, 78, 50, 69, 68, 69, 67, /* 0x bb0 */
51, 48, 0, 82, 0, 0, 0, 0, 0, 0, 0,207, 2, 0, 0, 78, /* 0x bc0 */
50, 69, 68, 69, 67, 51, 48, 0, 82, 0, 0, 0, 78, 50, 69, 68, /* 0x bd0 */
85, 77, 77, 49, 0,207, 2, 0, 0, 78, 50, 69, 83, 77, 65, 53, /* 0x be0 */
48, 0,207, 2, 0, 0, 78, 50, 69, 70, 65, 83, 53, 48, 0,209, /* 0x bf0 */
2, 0, 0, 78, 50, 69, 68, 69, 67, 53, 48, 0,212, 2, 0, 0, /* 0x c00 */
78, 50, 69, 83, 77, 65, 54, 48, 0,221, 2, 0, 0, 0, 0, 0, /* 0x c10 */
0,233, 2, 0, 0, 78, 50, 69, 68, 69, 67, 49, 48, 0, 0, 0, /* 0x c20 */
0, 0, 78, 50, 69, 70, 65, 83, 54, 48, 0,233, 2, 0, 0, 0, /* 0x c30 */
0, 0, 0,244, 2, 0, 0, 78, 50, 69, 70, 65, 83, 54, 49, 0, /* 0x c40 */
0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 0, 0, 78, 50, 69, 68, /* 0x c50 */
69, 67, 49, 48, 0, 0, 0, 0, 0, 78, 50, 69, 70, 65, 83, 54, /* 0x c60 */
49, 0, 2, 3, 0, 0, 0, 0, 0, 0, 24, 3, 0, 0, 78, 50, /* 0x c70 */
69, 68, 69, 67, 49, 48, 0, 0, 0, 0, 0, 78, 50, 69, 68, 69, /* 0x c80 */
67, 54, 48, 0, 24, 3, 0, 0, 78, 82, 86, 50, 69, 69, 78, 68, /* 0x c90 */
0, 24, 3, 0, 0, 67, 65, 76, 76, 84, 82, 48, 48, 0, 24, 3, /* 0x ca0 */
0, 0, 67, 84, 67, 76, 69, 86, 69, 49, 0, 38, 3, 0, 0, 0, /* 0x cb0 */
0, 0, 0, 43, 3, 0, 0, 67, 65, 76, 76, 84, 82, 48, 48, 0, /* 0x cc0 */
5, 0, 0, 0, 67, 65, 76, 76, 84, 82, 48, 49, 0, 43, 3, 0, /* 0x cd0 */
0, 67, 84, 68, 85, 77, 77, 89, 49, 0, 48, 3, 0, 0, 67, 84, /* 0x ce0 */
66, 83, 72, 82, 48, 49, 0, 48, 3, 0, 0, 67, 84, 66, 82, 79, /* 0x cf0 */
82, 48, 49, 0, 52, 3, 0, 0, 67, 84, 66, 83, 87, 65, 48, 49, /* 0x d00 */
0, 54, 3, 0, 0, 67, 65, 76, 76, 84, 82, 48, 50, 0, 59, 3, /* 0x d10 */
0, 0, 0, 0, 0, 0, 73, 3, 0, 0, 67, 65, 76, 76, 84, 82, /* 0x d20 */
48, 48, 0, 10, 0, 0, 0, 67, 65, 76, 76, 84, 82, 49, 48, 0, /* 0x d30 */
73, 3, 0, 0, 67, 65, 76, 76, 84, 82, 69, 56, 0, 78, 3, 0, /* 0x d40 */
0, 67, 65, 76, 76, 84, 82, 69, 57, 0, 80, 3, 0, 0, 67, 65, /* 0x d50 */
76, 76, 84, 82, 49, 49, 0, 82, 3, 0, 0, 0, 0, 0, 0, 86, /* 0x d60 */
3, 0, 0, 67, 65, 76, 76, 84, 82, 49, 51, 0, 5, 0, 0, 0, /* 0x d70 */
67, 84, 67, 76, 69, 86, 69, 50, 0, 86, 3, 0, 0, 0, 0, 0, /* 0x d80 */
0, 91, 3, 0, 0, 67, 65, 76, 76, 84, 82, 49, 49, 0, 0, 0, /* 0x d90 */
0, 0, 67, 65, 76, 76, 84, 82, 49, 50, 0, 91, 3, 0, 0, 67, /* 0x da0 */
84, 68, 85, 77, 77, 89, 50, 0, 93, 3, 0, 0, 67, 84, 66, 83, /* 0x db0 */
72, 82, 49, 49, 0, 93, 3, 0, 0, 67, 84, 66, 82, 79, 82, 49, /* 0x dc0 */
49, 0, 97, 3, 0, 0, 67, 84, 66, 83, 87, 65, 49, 49, 0, 99, /* 0x dd0 */
3, 0, 0, 67, 65, 76, 76, 84, 82, 49, 51, 0,104, 3, 0, 0, /* 0x de0 */
0, 0, 0, 0,109, 3, 0, 0, 67, 65, 76, 76, 84, 82, 49, 48, /* 0x df0 */
0, 5, 0, 0, 0, 67, 84, 84, 72, 69, 69, 78, 68, 0,109, 3, /* 0x e00 */
0, 0, 76, 69, 88, 69, 67, 48, 49, 53, 0,109, 3, 0, 0, 76, /* 0x e10 */
88, 85, 78, 70, 48, 48, 48, 0,139, 3, 0, 0, 0, 0, 0, 0, /* 0x e20 */
141, 3, 0, 0, 76, 88, 85, 78, 70, 48, 49, 48, 0, 5, 0, 0, /* 0x e30 */
0, 76, 88, 85, 78, 70, 48, 48, 50, 0,141, 3, 0, 0, 77, 82, /* 0x e40 */
85, 66, 89, 84, 69, 48, 0,146, 3, 0, 0, 76, 88, 77, 82, 85, /* 0x e50 */
48, 48, 53, 0,148, 3, 0, 0, 76, 88, 77, 82, 85, 48, 48, 54, /* 0x e60 */
0,153, 3, 0, 0, 76, 88, 77, 82, 85, 48, 48, 55, 0,160, 3, /* 0x e70 */
0, 0, 76, 88, 85, 78, 70, 48, 48, 56, 0,167, 3, 0, 0, 76, /* 0x e80 */
88, 85, 78, 70, 48, 49, 48, 0,171, 3, 0, 0, 0, 0, 0, 0, /* 0x e90 */
176, 3, 0, 0, 76, 88, 85, 78, 70, 48, 52, 50, 0, 0, 0, 0, /* 0x ea0 */
0, 76, 88, 74, 67, 67, 48, 49, 48, 0,176, 3, 0, 0, 76, 88, /* 0x eb0 */
77, 82, 85, 48, 52, 53, 0,179, 3, 0, 0, 76, 88, 77, 82, 85, /* 0x ec0 */
48, 52, 54, 0,182, 3, 0, 0, 76, 88, 74, 67, 67, 48, 50, 48, /* 0x ed0 */
0,184, 3, 0, 0, 0, 0, 0, 0,186, 3, 0, 0, 76, 88, 85, /* 0x ee0 */
78, 70, 48, 51, 52, 0, 0, 0, 0, 0, 76, 88, 74, 67, 67, 48, /* 0x ef0 */
50, 49, 0,186, 3, 0, 0, 0, 0, 0, 0,191, 3, 0, 0, 76, /* 0x f00 */
88, 85, 78, 70, 48, 51, 52, 0, 0, 0, 0, 0, 76, 88, 74, 67, /* 0x f10 */
67, 48, 50, 51, 0,191, 3, 0, 0, 76, 88, 85, 78, 70, 48, 51, /* 0x f20 */
55, 0,198, 3, 0, 0, 76, 88, 85, 78, 70, 51, 56, 54, 0,200, /* 0x f30 */
3, 0, 0, 76, 88, 85, 78, 70, 51, 56, 55, 0,201, 3, 0, 0, /* 0x f40 */
76, 88, 85, 78, 70, 51, 56, 56, 0,210, 3, 0, 0, 0, 0, 0, /* 0x f50 */
0,213, 3, 0, 0, 76, 88, 85, 78, 70, 48, 52, 48, 0, 0, 0, /* 0x f60 */
0, 0, 76, 88, 85, 78, 70, 52, 56, 54, 0,213, 3, 0, 0, 76, /* 0x f70 */
88, 85, 78, 70, 52, 56, 55, 0,217, 3, 0, 0, 0, 0, 0, 0, /* 0x f80 */
219, 3, 0, 0, 76, 88, 85, 78, 70, 48, 52, 48, 0, 0, 0, 0, /* 0x f90 */
0, 76, 88, 77, 82, 85, 48, 54, 53, 0,219, 3, 0, 0, 0, 0, /* 0x fa0 */
0, 0,223, 3, 0, 0, 76, 88, 77, 82, 85, 48, 55, 48, 0, 5, /* 0x fb0 */
0, 0, 0, 77, 82, 85, 66, 89, 84, 69, 51, 0,223, 3, 0, 0, /* 0x fc0 */
77, 82, 85, 65, 82, 66, 51, 48, 0,225, 3, 0, 0, 77, 82, 85, /* 0x fd0 */
66, 73, 84, 83, 51, 0,226, 3, 0, 0, 77, 82, 85, 65, 82, 66, /* 0x fe0 */
52, 48, 0,228, 3, 0, 0, 76, 88, 77, 82, 85, 48, 55, 48, 0, /* 0x ff0 */
232, 3, 0, 0, 0, 0, 0, 0,237, 3, 0, 0, 76, 88, 85, 78, /* 0x1000 */
70, 48, 52, 48, 0, 0, 0, 0, 0, 77, 82, 85, 66, 89, 84, 69, /* 0x1010 */
52, 0,240, 3, 0, 0, 77, 82, 85, 66, 73, 84, 83, 52, 0,243, /* 0x1020 */
3, 0, 0, 77, 82, 85, 65, 82, 66, 53, 48, 0,245, 3, 0, 0, /* 0x1030 */
76, 88, 77, 82, 85, 48, 56, 48, 0,251, 3, 0, 0, 77, 82, 85, /* 0x1040 */
66, 89, 84, 69, 53, 0,254, 3, 0, 0, 77, 82, 85, 65, 82, 66, /* 0x1050 */
54, 48, 0, 0, 4, 0, 0, 77, 82, 85, 66, 73, 84, 83, 53, 0, /* 0x1060 */
1, 4, 0, 0, 77, 82, 85, 65, 82, 66, 55, 48, 0, 3, 4, 0, /* 0x1070 */
0, 76, 88, 77, 82, 85, 48, 57, 48, 0, 7, 4, 0, 0, 0, 0, /* 0x1080 */
0, 0, 14, 4, 0, 0, 76, 88, 77, 82, 85, 49, 48, 48, 0, 10, /* 0x1090 */
0, 0, 0, 77, 82, 85, 66, 89, 84, 69, 54, 0, 18, 4, 0, 0, /* 0x10a0 */
77, 82, 85, 65, 82, 66, 56, 48, 0, 20, 4, 0, 0, 77, 82, 85, /* 0x10b0 */
66, 73, 84, 83, 54, 0, 21, 4, 0, 0, 77, 82, 85, 65, 82, 66, /* 0x10c0 */
57, 48, 0, 23, 4, 0, 0, 76, 88, 77, 82, 85, 49, 48, 48, 0, /* 0x10d0 */
27, 4, 0, 0, 76, 88, 85, 78, 70, 48, 52, 48, 0, 43, 4, 0, /* 0x10e0 */
0, 76, 88, 77, 82, 85, 49, 49, 48, 0, 48, 4, 0, 0, 76, 88, /* 0x10f0 */
77, 82, 85, 49, 49, 49, 0, 51, 4, 0, 0, 76, 88, 85, 78, 70, /* 0x1100 */
48, 52, 49, 0, 53, 4, 0, 0, 0, 0, 0, 0, 60, 4, 0, 0, /* 0x1110 */
76, 88, 85, 78, 70, 48, 51, 52, 0, 0, 0, 0, 0, 76, 88, 85, /* 0x1120 */
78, 70, 48, 52, 50, 0, 60, 4, 0, 0, 76, 69, 88, 69, 67, 48, /* 0x1130 */
49, 54, 0, 60, 4, 0, 0, 0, 0, 0, 0, 62, 4, 0, 0, 76, /* 0x1140 */
88, 85, 78, 70, 48, 52, 50, 0, 0, 0, 0, 0, 76, 88, 77, 82, /* 0x1150 */
85, 48, 49, 48, 0, 62, 4, 0, 0, 76, 88, 74, 77, 80, 65, 48, /* 0x1160 */
48, 0, 63, 4, 0, 0, 76, 88, 67, 65, 76, 76, 66, 48, 0, 65, /* 0x1170 */
4, 0, 0, 76, 88, 85, 78, 70, 48, 50, 49, 0, 67, 4, 0, 0, /* 0x1180 */
76, 88, 77, 82, 85, 48, 50, 50, 0, 73, 4, 0, 0, 76, 88, 74, /* 0x1190 */
77, 80, 65, 48, 49, 0, 76, 4, 0, 0, 76, 88, 67, 65, 76, 76, /* 0x11a0 */
66, 49, 0, 78, 4, 0, 0, 77, 82, 85, 66, 73, 84, 83, 49, 0, /* 0x11b0 */
80, 4, 0, 0, 76, 88, 77, 82, 85, 48, 51, 48, 0, 81, 4, 0, /* 0x11c0 */
0, 77, 82, 85, 66, 89, 84, 69, 49, 0, 83, 4, 0, 0, 77, 82, /* 0x11d0 */
85, 65, 82, 66, 49, 48, 0, 85, 4, 0, 0, 76, 88, 77, 82, 85, /* 0x11e0 */
48, 52, 48, 0, 86, 4, 0, 0, 0, 0, 0, 0, 88, 4, 0, 0, /* 0x11f0 */
76, 88, 77, 82, 85, 48, 51, 48, 0, 0, 0, 0, 0, 76, 88, 85, /* 0x1200 */
78, 70, 48, 51, 48, 0, 88, 4, 0, 0, 76, 88, 74, 67, 67, 48, /* 0x1210 */
48, 48, 0, 94, 4, 0, 0, 0, 0, 0, 0,102, 4, 0, 0, 76, /* 0x1220 */
88, 74, 67, 67, 48, 49, 48, 0, 0, 0, 0, 0, 76, 88, 67, 74, /* 0x1230 */
48, 77, 82, 85, 0,102, 4, 0, 0, 76, 88, 67, 74, 49, 77, 82, /* 0x1240 */
85, 0,104, 4, 0, 0, 76, 88, 67, 65, 76, 74, 77, 80, 0,107, /* 0x1250 */
4, 0, 0, 76, 88, 67, 65, 76, 76, 48, 48, 0,110, 4, 0, 0, /* 0x1260 */
0, 0, 0, 0,112, 4, 0, 0, 76, 88, 85, 78, 70, 48, 51, 55, /* 0x1270 */
0, 0, 0, 0, 0, 76, 88, 67, 65, 76, 76, 48, 49, 0,112, 4, /* 0x1280 */
0, 0, 76, 88, 67, 74, 50, 77, 82, 85, 0,115, 4, 0, 0, 0, /* 0x1290 */
0, 0, 0,117, 4, 0, 0, 76, 88, 85, 78, 70, 48, 51, 55, 0, /* 0x12a0 */
0, 0, 0, 0, 76, 88, 67, 74, 52, 77, 82, 85, 0,117, 4, 0, /* 0x12b0 */
0, 0, 0, 0, 0,119, 4, 0, 0, 76, 88, 85, 78, 70, 48, 51, /* 0x12c0 */
52, 0, 0, 0, 0, 0, 76, 88, 67, 74, 54, 77, 82, 85, 0,119, /* 0x12d0 */
4, 0, 0, 0, 0, 0, 0,121, 4, 0, 0, 76, 88, 67, 74, 56, /* 0x12e0 */
77, 82, 85, 0, 1, 0, 0, 0, 76, 88, 67, 74, 55, 77, 82, 85, /* 0x12f0 */
0,121, 4, 0, 0, 0, 0, 0, 0,123, 4, 0, 0, 76, 88, 67, /* 0x1300 */
74, 56, 77, 82, 85, 0, 1, 0, 0, 0, 76, 88, 67, 74, 56, 77, /* 0x1310 */
82, 85, 0,123, 4, 0, 0, 0, 0, 0, 0,126, 4, 0, 0, 76, /* 0x1320 */
88, 85, 78, 70, 48, 51, 55, 0, 0, 0, 0, 0, 76, 88, 85, 78, /* 0x1330 */
70, 48, 51, 52, 0,126, 4, 0, 0, 0, 0, 0, 0,131, 4, 0, /* 0x1340 */
0, 76, 88, 85, 78, 70, 48, 51, 48, 0, 0, 0, 0, 0, 76, 88, /* 0x1350 */
77, 82, 85, 48, 53, 53, 0,131, 4, 0, 0, 77, 82, 85, 66, 89, /* 0x1360 */
84, 69, 50, 0,133, 4, 0, 0, 77, 82, 85, 66, 73, 84, 83, 50, /* 0x1370 */
0,138, 4, 0, 0, 77, 82, 85, 65, 82, 66, 50, 48, 0,143, 4, /* 0x1380 */
0, 0, 76, 88, 77, 82, 85, 48, 53, 55, 0,148, 4, 0, 0, 76, /* 0x1390 */
88, 77, 82, 85, 48, 53, 56, 0,154, 4, 0, 0, 76, 88, 85, 78, /* 0x13a0 */
70, 48, 51, 53, 0,155, 4, 0, 0, 67, 75, 76, 76, 84, 82, 48, /* 0x13b0 */
48, 0,161, 4, 0, 0, 0, 0, 0, 0,165, 4, 0, 0, 67, 75, /* 0x13c0 */
76, 76, 84, 82, 50, 48, 0, 30, 0, 0, 0, 67, 75, 76, 76, 84, /* 0x13d0 */
82, 49, 48, 0,170, 4, 0, 0, 0, 0, 0, 0,184, 4, 0, 0, /* 0x13e0 */
67, 75, 76, 76, 84, 82, 50, 48, 0, 6, 0, 0, 0, 67, 75, 76, /* 0x13f0 */
76, 84, 82, 50, 48, 0,184, 4, 0, 0, 0, 0, 0, 0,190, 4, /* 0x1400 */
0, 0, 67, 75, 76, 76, 84, 82, 52, 48, 0, 0, 0, 0, 0, 0, /* 0x1410 */
0, 0, 0,194, 4, 0, 0, 67, 75, 76, 76, 84, 82, 52, 48, 0, /* 0x1420 */
0, 0, 0, 0, 67, 75, 76, 76, 84, 82, 51, 48, 0,217, 4, 0, /* 0x1430 */
0, 0, 0, 0, 0,224, 4, 0, 0, 67, 75, 76, 76, 84, 82, 49, /* 0x1440 */
48, 0, 14, 0, 0, 0, 67, 75, 76, 76, 84, 82, 52, 48, 0,224, /* 0x1450 */
4, 0, 0, 0, 0, 0, 0,229, 4, 0, 0, 67, 75, 76, 76, 84, /* 0x1460 */
82, 48, 48, 0, 4, 0, 0, 0, 76, 69, 88, 69, 67, 48, 49, 55, /* 0x1470 */
0,229, 4, 0, 0, 76, 69, 88, 69, 67, 48, 50, 48, 0,231, 4, /* 0x1480 */
0, 0, 88, 84, 72, 69, 69, 78, 68, 88, 0, 28, 5, 0, 0,255, /* 0x1490 */
255,255,255, 28, 5 /* 0x14a0 */
131,233, 1,127, 0, 97,195,106, 29, 90,232, 29, 0, 0, 0, 80, /* 0x 4e0 */
82, 79, 84, 95, 69, 88, 69, 67,124, 80, 82, 79, 84, 95, 87, 82, /* 0x 4f0 */
73, 84, 69, 32,102, 97,105,108,101,100, 46, 10, 89,106, 2, 91, /* 0x 500 */
106, 4, 88,205,128,179,127,106, 1, 88,205,128, 94,141, 69,247, /* 0x 510 */
43, 0,137,194, 3, 64, 72, 5,255, 15, 0, 0, 37, 0,240,255, /* 0x 520 */
255, 80, 49,201,106,255,106, 50,181, 16,106, 7, 81, 80,137,227, /* 0x 530 */
106, 90, 88,205,128,133,192,120,158,146,147,252,173, 80, 84, 82, /* 0x 540 */
173, 80,173, 86,255,213,131,196, 40,195, 93,232,188,255,255,255, /* 0x 550 */
76, 69, 88, 69, 67, 48, 48, 48, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 560 */
0, 5, 0, 0, 0, 76, 69, 88, 69, 67, 48, 50, 48, 0,115, 0, /* 0x 570 */
0, 0, 76, 69, 88, 69, 67, 48, 48, 57, 0, 5, 0, 0, 0, 76, /* 0x 580 */
69, 88, 69, 67, 48, 49, 48, 0, 5, 0, 0, 0, 78, 50, 66, 83, /* 0x 590 */
77, 65, 49, 48, 0, 19, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, /* 0x 5a0 */
0, 78, 50, 66, 68, 69, 67, 49, 48, 0, 4, 0, 0, 0, 78, 50, /* 0x 5b0 */
66, 70, 65, 83, 49, 48, 0, 22, 0, 0, 0, 0, 0, 0, 0, 24, /* 0x 5c0 */
0, 0, 0, 78, 50, 66, 68, 69, 67, 49, 48, 0, 4, 0, 0, 0, /* 0x 5d0 */
78, 50, 66, 70, 65, 83, 49, 49, 0, 24, 0, 0, 0, 78, 50, 66, /* 0x 5e0 */
68, 69, 67, 49, 48, 0, 30, 0, 0, 0, 78, 50, 66, 83, 77, 65, /* 0x 5f0 */
50, 48, 0, 41, 0, 0, 0, 0, 0, 0, 0, 43, 0, 0, 0, 78, /* 0x 600 */
50, 66, 83, 77, 65, 49, 48, 0, 2, 0, 0, 0, 78, 50, 66, 70, /* 0x 610 */
65, 83, 50, 48, 0, 46, 0, 0, 0, 0, 0, 0, 0, 50, 0, 0, /* 0x 620 */
0, 78, 50, 66, 70, 65, 83, 49, 49, 0, 0, 0, 0, 0, 78, 50, /* 0x 630 */
66, 68, 69, 67, 50, 48, 0, 55, 0, 0, 0, 78, 50, 66, 83, 77, /* 0x 640 */
65, 51, 48, 0, 68, 0, 0, 0, 0, 0, 0, 0, 81, 0, 0, 0, /* 0x 650 */
78, 50, 66, 68, 69, 67, 50, 48, 0, 0, 0, 0, 0, 78, 50, 66, /* 0x 660 */
70, 65, 83, 51, 48, 0, 81, 0, 0, 0, 0, 0, 0, 0, 85, 0, /* 0x 670 */
0, 0, 78, 50, 66, 68, 69, 67, 50, 48, 0, 0, 0, 0, 0, 0, /* 0x 680 */
0, 0, 0, 96, 0, 0, 0, 78, 50, 66, 68, 69, 67, 50, 48, 0, /* 0x 690 */
0, 0, 0, 0, 78, 50, 66, 68, 69, 67, 51, 48, 0, 96, 0, 0, /* 0x 6a0 */
0, 0, 0, 0, 0,114, 0, 0, 0, 78, 50, 66, 68, 69, 67, 54, /* 0x 6b0 */
48, 0, 0, 0, 0, 0, 0, 0, 0, 0,144, 0, 0, 0, 78, 50, /* 0x 6c0 */
66, 68, 69, 67, 53, 48, 0, 0, 0, 0, 0, 78, 50, 66, 83, 77, /* 0x 6d0 */
65, 52, 48, 0,158, 0, 0, 0, 0, 0, 0, 0,171, 0, 0, 0, /* 0x 6e0 */
78, 50, 66, 68, 69, 67, 51, 48, 0, 49, 0, 0, 0, 78, 50, 66, /* 0x 6f0 */
70, 65, 83, 52, 48, 0,171, 0, 0, 0, 0, 0, 0, 0,175, 0, /* 0x 700 */
0, 0, 78, 50, 66, 68, 69, 67, 51, 48, 0, 49, 0, 0, 0, 0, /* 0x 710 */
0, 0, 0,186, 0, 0, 0, 78, 50, 66, 68, 69, 67, 51, 48, 0, /* 0x 720 */
49, 0, 0, 0, 78, 50, 66, 68, 85, 77, 77, 49, 0,186, 0, 0, /* 0x 730 */
0, 78, 50, 66, 83, 77, 65, 53, 48, 0,186, 0, 0, 0, 78, 50, /* 0x 740 */
66, 70, 65, 83, 53, 48, 0,188, 0, 0, 0, 78, 50, 66, 68, 69, /* 0x 750 */
67, 53, 48, 0,191, 0, 0, 0, 78, 50, 66, 83, 77, 65, 54, 48, /* 0x 760 */
0,200, 0, 0, 0, 0, 0, 0, 0,212, 0, 0, 0, 78, 50, 66, /* 0x 770 */
68, 69, 67, 49, 48, 0, 0, 0, 0, 0, 78, 50, 66, 70, 65, 83, /* 0x 780 */
54, 48, 0,212, 0, 0, 0, 0, 0, 0, 0,223, 0, 0, 0, 78, /* 0x 790 */
50, 66, 70, 65, 83, 54, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 7a0 */
237, 0, 0, 0, 78, 50, 66, 68, 69, 67, 49, 48, 0, 0, 0, 0, /* 0x 7b0 */
0, 78, 50, 66, 70, 65, 83, 54, 49, 0,237, 0, 0, 0, 0, 0, /* 0x 7c0 */
0, 0, 3, 1, 0, 0, 78, 50, 66, 68, 69, 67, 49, 48, 0, 0, /* 0x 7d0 */
0, 0, 0, 78, 50, 66, 68, 69, 67, 54, 48, 0, 3, 1, 0, 0, /* 0x 7e0 */
78, 82, 86, 50, 66, 69, 78, 68, 0, 3, 1, 0, 0, 78, 50, 68, /* 0x 7f0 */
83, 77, 65, 49, 48, 0, 3, 1, 0, 0, 0, 0, 0, 0, 5, 1, /* 0x 800 */
0, 0, 78, 50, 68, 68, 69, 67, 49, 48, 0, 4, 0, 0, 0, 78, /* 0x 810 */
50, 68, 70, 65, 83, 49, 48, 0, 6, 1, 0, 0, 0, 0, 0, 0, /* 0x 820 */
8, 1, 0, 0, 78, 50, 68, 68, 69, 67, 49, 48, 0, 4, 0, 0, /* 0x 830 */
0, 78, 50, 68, 70, 65, 83, 49, 49, 0, 8, 1, 0, 0, 78, 50, /* 0x 840 */
68, 68, 69, 67, 49, 48, 0, 14, 1, 0, 0, 78, 50, 68, 83, 77, /* 0x 850 */
65, 50, 48, 0, 25, 1, 0, 0, 0, 0, 0, 0, 27, 1, 0, 0, /* 0x 860 */
78, 50, 68, 83, 77, 65, 49, 48, 0, 2, 0, 0, 0, 78, 50, 68, /* 0x 870 */
70, 65, 83, 50, 48, 0, 30, 1, 0, 0, 0, 0, 0, 0, 34, 1, /* 0x 880 */
0, 0, 78, 50, 68, 70, 65, 83, 49, 49, 0, 0, 0, 0, 0, 78, /* 0x 890 */
50, 68, 68, 69, 67, 50, 48, 0, 39, 1, 0, 0, 78, 50, 68, 83, /* 0x 8a0 */
77, 65, 51, 48, 0, 52, 1, 0, 0, 0, 0, 0, 0, 65, 1, 0, /* 0x 8b0 */
0, 78, 50, 68, 68, 69, 67, 51, 48, 0, 16, 0, 0, 0, 78, 50, /* 0x 8c0 */
68, 70, 65, 83, 51, 48, 0, 65, 1, 0, 0, 0, 0, 0, 0, 71, /* 0x 8d0 */
1, 0, 0, 78, 50, 68, 68, 69, 67, 51, 48, 0, 16, 0, 0, 0, /* 0x 8e0 */
0, 0, 0, 0, 80, 1, 0, 0, 78, 50, 68, 68, 69, 67, 51, 48, /* 0x 8f0 */
0, 16, 0, 0, 0, 78, 50, 68, 68, 69, 67, 51, 48, 0, 80, 1, /* 0x 900 */
0, 0, 0, 0, 0, 0, 96, 1, 0, 0, 78, 50, 68, 68, 69, 67, /* 0x 910 */
50, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,114, 1, 0, 0, 78, /* 0x 920 */
50, 68, 68, 69, 67, 54, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 930 */
148, 1, 0, 0, 78, 50, 68, 68, 69, 67, 53, 48, 0, 0, 0, 0, /* 0x 940 */
0, 78, 50, 68, 83, 77, 65, 52, 48, 0,162, 1, 0, 0, 0, 0, /* 0x 950 */
0, 0,175, 1, 0, 0, 78, 50, 68, 68, 69, 67, 51, 48, 0, 69, /* 0x 960 */
0, 0, 0, 78, 50, 68, 70, 65, 83, 52, 48, 0,175, 1, 0, 0, /* 0x 970 */
0, 0, 0, 0,179, 1, 0, 0, 78, 50, 68, 68, 69, 67, 51, 48, /* 0x 980 */
0, 69, 0, 0, 0, 0, 0, 0, 0,190, 1, 0, 0, 78, 50, 68, /* 0x 990 */
68, 69, 67, 51, 48, 0, 69, 0, 0, 0, 78, 50, 68, 68, 85, 77, /* 0x 9a0 */
77, 49, 0,190, 1, 0, 0, 78, 50, 68, 83, 77, 65, 53, 48, 0, /* 0x 9b0 */
190, 1, 0, 0, 78, 50, 68, 70, 65, 83, 53, 48, 0,192, 1, 0, /* 0x 9c0 */
0, 78, 50, 68, 68, 69, 67, 53, 48, 0,195, 1, 0, 0, 78, 50, /* 0x 9d0 */
68, 83, 77, 65, 54, 48, 0,204, 1, 0, 0, 0, 0, 0, 0,216, /* 0x 9e0 */
1, 0, 0, 78, 50, 68, 68, 69, 67, 49, 48, 0, 0, 0, 0, 0, /* 0x 9f0 */
78, 50, 68, 70, 65, 83, 54, 48, 0,216, 1, 0, 0, 0, 0, 0, /* 0x a00 */
0,227, 1, 0, 0, 78, 50, 68, 70, 65, 83, 54, 49, 0, 0, 0, /* 0x a10 */
0, 0, 0, 0, 0, 0,241, 1, 0, 0, 78, 50, 68, 68, 69, 67, /* 0x a20 */
49, 48, 0, 0, 0, 0, 0, 78, 50, 68, 70, 65, 83, 54, 49, 0, /* 0x a30 */
241, 1, 0, 0, 0, 0, 0, 0, 7, 2, 0, 0, 78, 50, 68, 68, /* 0x a40 */
69, 67, 49, 48, 0, 0, 0, 0, 0, 78, 50, 68, 68, 69, 67, 54, /* 0x a50 */
48, 0, 7, 2, 0, 0, 78, 82, 86, 50, 68, 69, 78, 68, 0, 7, /* 0x a60 */
2, 0, 0, 78, 50, 69, 83, 77, 65, 49, 48, 0, 7, 2, 0, 0, /* 0x a70 */
0, 0, 0, 0, 9, 2, 0, 0, 78, 50, 69, 68, 69, 67, 49, 48, /* 0x a80 */
0, 4, 0, 0, 0, 78, 50, 69, 70, 65, 83, 49, 48, 0, 10, 2, /* 0x a90 */
0, 0, 0, 0, 0, 0, 12, 2, 0, 0, 78, 50, 69, 68, 69, 67, /* 0x aa0 */
49, 48, 0, 4, 0, 0, 0, 78, 50, 69, 70, 65, 83, 49, 49, 0, /* 0x ab0 */
12, 2, 0, 0, 78, 50, 69, 68, 69, 67, 49, 48, 0, 18, 2, 0, /* 0x ac0 */
0, 78, 50, 69, 83, 77, 65, 50, 48, 0, 29, 2, 0, 0, 0, 0, /* 0x ad0 */
0, 0, 31, 2, 0, 0, 78, 50, 69, 83, 77, 65, 49, 48, 0, 2, /* 0x ae0 */
0, 0, 0, 78, 50, 69, 70, 65, 83, 50, 48, 0, 34, 2, 0, 0, /* 0x af0 */
0, 0, 0, 0, 38, 2, 0, 0, 78, 50, 69, 70, 65, 83, 49, 49, /* 0x b00 */
0, 0, 0, 0, 0, 78, 50, 69, 68, 69, 67, 50, 48, 0, 43, 2, /* 0x b10 */
0, 0, 78, 50, 69, 83, 77, 65, 51, 48, 0, 56, 2, 0, 0, 0, /* 0x b20 */
0, 0, 0, 69, 2, 0, 0, 78, 50, 69, 68, 69, 67, 51, 48, 0, /* 0x b30 */
31, 0, 0, 0, 78, 50, 69, 70, 65, 83, 51, 48, 0, 69, 2, 0, /* 0x b40 */
0, 0, 0, 0, 0, 75, 2, 0, 0, 78, 50, 69, 68, 69, 67, 51, /* 0x b50 */
48, 0, 31, 0, 0, 0, 0, 0, 0, 0, 84, 2, 0, 0, 78, 50, /* 0x b60 */
69, 68, 69, 67, 51, 48, 0, 31, 0, 0, 0, 78, 50, 69, 68, 69, /* 0x b70 */
67, 51, 48, 0, 84, 2, 0, 0, 0, 0, 0, 0,100, 2, 0, 0, /* 0x b80 */
78, 50, 69, 68, 69, 67, 50, 48, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x b90 */
0,115, 2, 0, 0, 78, 50, 69, 68, 69, 67, 53, 48, 0, 0, 0, /* 0x ba0 */
0, 0, 0, 0, 0, 0,133, 2, 0, 0, 78, 50, 69, 68, 69, 67, /* 0x bb0 */
54, 48, 0, 0, 0, 0, 0, 78, 50, 69, 83, 77, 65, 52, 48, 0, /* 0x bc0 */
179, 2, 0, 0, 0, 0, 0, 0,192, 2, 0, 0, 78, 50, 69, 68, /* 0x bd0 */
69, 67, 51, 48, 0, 82, 0, 0, 0, 78, 50, 69, 70, 65, 83, 52, /* 0x be0 */
48, 0,192, 2, 0, 0, 0, 0, 0, 0,196, 2, 0, 0, 78, 50, /* 0x bf0 */
69, 68, 69, 67, 51, 48, 0, 82, 0, 0, 0, 0, 0, 0, 0,207, /* 0x c00 */
2, 0, 0, 78, 50, 69, 68, 69, 67, 51, 48, 0, 82, 0, 0, 0, /* 0x c10 */
78, 50, 69, 68, 85, 77, 77, 49, 0,207, 2, 0, 0, 78, 50, 69, /* 0x c20 */
83, 77, 65, 53, 48, 0,207, 2, 0, 0, 78, 50, 69, 70, 65, 83, /* 0x c30 */
53, 48, 0,209, 2, 0, 0, 78, 50, 69, 68, 69, 67, 53, 48, 0, /* 0x c40 */
212, 2, 0, 0, 78, 50, 69, 83, 77, 65, 54, 48, 0,221, 2, 0, /* 0x c50 */
0, 0, 0, 0, 0,233, 2, 0, 0, 78, 50, 69, 68, 69, 67, 49, /* 0x c60 */
48, 0, 0, 0, 0, 0, 78, 50, 69, 70, 65, 83, 54, 48, 0,233, /* 0x c70 */
2, 0, 0, 0, 0, 0, 0,244, 2, 0, 0, 78, 50, 69, 70, 65, /* 0x c80 */
83, 54, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 0, 0, /* 0x c90 */
78, 50, 69, 68, 69, 67, 49, 48, 0, 0, 0, 0, 0, 78, 50, 69, /* 0x ca0 */
70, 65, 83, 54, 49, 0, 2, 3, 0, 0, 0, 0, 0, 0, 24, 3, /* 0x cb0 */
0, 0, 78, 50, 69, 68, 69, 67, 49, 48, 0, 0, 0, 0, 0, 78, /* 0x cc0 */
50, 69, 68, 69, 67, 54, 48, 0, 24, 3, 0, 0, 78, 82, 86, 50, /* 0x cd0 */
69, 69, 78, 68, 0, 24, 3, 0, 0, 67, 65, 76, 76, 84, 82, 48, /* 0x ce0 */
48, 0, 24, 3, 0, 0, 67, 84, 67, 76, 69, 86, 69, 49, 0, 38, /* 0x cf0 */
3, 0, 0, 0, 0, 0, 0, 43, 3, 0, 0, 67, 65, 76, 76, 84, /* 0x d00 */
82, 48, 48, 0, 5, 0, 0, 0, 67, 65, 76, 76, 84, 82, 48, 49, /* 0x d10 */
0, 43, 3, 0, 0, 67, 84, 68, 85, 77, 77, 89, 49, 0, 48, 3, /* 0x d20 */
0, 0, 67, 84, 66, 83, 72, 82, 48, 49, 0, 48, 3, 0, 0, 67, /* 0x d30 */
84, 66, 82, 79, 82, 48, 49, 0, 52, 3, 0, 0, 67, 84, 66, 83, /* 0x d40 */
87, 65, 48, 49, 0, 54, 3, 0, 0, 67, 65, 76, 76, 84, 82, 48, /* 0x d50 */
50, 0, 59, 3, 0, 0, 0, 0, 0, 0, 73, 3, 0, 0, 67, 65, /* 0x d60 */
76, 76, 84, 82, 48, 48, 0, 10, 0, 0, 0, 67, 65, 76, 76, 84, /* 0x d70 */
82, 49, 48, 0, 73, 3, 0, 0, 67, 65, 76, 76, 84, 82, 69, 56, /* 0x d80 */
0, 78, 3, 0, 0, 67, 65, 76, 76, 84, 82, 69, 57, 0, 80, 3, /* 0x d90 */
0, 0, 67, 65, 76, 76, 84, 82, 49, 49, 0, 82, 3, 0, 0, 0, /* 0x da0 */
0, 0, 0, 86, 3, 0, 0, 67, 65, 76, 76, 84, 82, 49, 51, 0, /* 0x db0 */
5, 0, 0, 0, 67, 84, 67, 76, 69, 86, 69, 50, 0, 86, 3, 0, /* 0x dc0 */
0, 0, 0, 0, 0, 91, 3, 0, 0, 67, 65, 76, 76, 84, 82, 49, /* 0x dd0 */
49, 0, 0, 0, 0, 0, 67, 65, 76, 76, 84, 82, 49, 50, 0, 91, /* 0x de0 */
3, 0, 0, 67, 84, 68, 85, 77, 77, 89, 50, 0, 93, 3, 0, 0, /* 0x df0 */
67, 84, 66, 83, 72, 82, 49, 49, 0, 93, 3, 0, 0, 67, 84, 66, /* 0x e00 */
82, 79, 82, 49, 49, 0, 97, 3, 0, 0, 67, 84, 66, 83, 87, 65, /* 0x e10 */
49, 49, 0, 99, 3, 0, 0, 67, 65, 76, 76, 84, 82, 49, 51, 0, /* 0x e20 */
104, 3, 0, 0, 0, 0, 0, 0,109, 3, 0, 0, 67, 65, 76, 76, /* 0x e30 */
84, 82, 49, 48, 0, 5, 0, 0, 0, 67, 84, 84, 72, 69, 69, 78, /* 0x e40 */
68, 0,109, 3, 0, 0, 76, 69, 88, 69, 67, 48, 49, 53, 0,109, /* 0x e50 */
3, 0, 0, 76, 88, 85, 78, 70, 48, 48, 48, 0,139, 3, 0, 0, /* 0x e60 */
0, 0, 0, 0,141, 3, 0, 0, 76, 88, 85, 78, 70, 48, 49, 48, /* 0x e70 */
0, 5, 0, 0, 0, 76, 88, 85, 78, 70, 48, 48, 50, 0,141, 3, /* 0x e80 */
0, 0, 77, 82, 85, 66, 89, 84, 69, 48, 0,146, 3, 0, 0, 76, /* 0x e90 */
88, 77, 82, 85, 48, 48, 53, 0,148, 3, 0, 0, 76, 88, 77, 82, /* 0x ea0 */
85, 48, 48, 54, 0,153, 3, 0, 0, 76, 88, 77, 82, 85, 48, 48, /* 0x eb0 */
55, 0,160, 3, 0, 0, 76, 88, 85, 78, 70, 48, 48, 56, 0,167, /* 0x ec0 */
3, 0, 0, 76, 88, 85, 78, 70, 48, 49, 48, 0,171, 3, 0, 0, /* 0x ed0 */
0, 0, 0, 0,176, 3, 0, 0, 76, 88, 85, 78, 70, 48, 52, 50, /* 0x ee0 */
0, 0, 0, 0, 0, 76, 88, 74, 67, 67, 48, 49, 48, 0,176, 3, /* 0x ef0 */
0, 0, 76, 88, 77, 82, 85, 48, 52, 53, 0,179, 3, 0, 0, 76, /* 0x f00 */
88, 77, 82, 85, 48, 52, 54, 0,182, 3, 0, 0, 76, 88, 74, 67, /* 0x f10 */
67, 48, 50, 48, 0,184, 3, 0, 0, 0, 0, 0, 0,186, 3, 0, /* 0x f20 */
0, 76, 88, 85, 78, 70, 48, 51, 52, 0, 0, 0, 0, 0, 76, 88, /* 0x f30 */
74, 67, 67, 48, 50, 49, 0,186, 3, 0, 0, 0, 0, 0, 0,191, /* 0x f40 */
3, 0, 0, 76, 88, 85, 78, 70, 48, 51, 52, 0, 0, 0, 0, 0, /* 0x f50 */
76, 88, 74, 67, 67, 48, 50, 51, 0,191, 3, 0, 0, 76, 88, 85, /* 0x f60 */
78, 70, 48, 51, 55, 0,198, 3, 0, 0, 76, 88, 85, 78, 70, 51, /* 0x f70 */
56, 54, 0,200, 3, 0, 0, 76, 88, 85, 78, 70, 51, 56, 55, 0, /* 0x f80 */
201, 3, 0, 0, 76, 88, 85, 78, 70, 51, 56, 56, 0,210, 3, 0, /* 0x f90 */
0, 0, 0, 0, 0,213, 3, 0, 0, 76, 88, 85, 78, 70, 48, 52, /* 0x fa0 */
48, 0, 0, 0, 0, 0, 76, 88, 85, 78, 70, 52, 56, 54, 0,213, /* 0x fb0 */
3, 0, 0, 76, 88, 85, 78, 70, 52, 56, 55, 0,217, 3, 0, 0, /* 0x fc0 */
0, 0, 0, 0,219, 3, 0, 0, 76, 88, 85, 78, 70, 48, 52, 48, /* 0x fd0 */
0, 0, 0, 0, 0, 76, 88, 77, 82, 85, 48, 54, 53, 0,219, 3, /* 0x fe0 */
0, 0, 0, 0, 0, 0,223, 3, 0, 0, 76, 88, 77, 82, 85, 48, /* 0x ff0 */
55, 48, 0, 5, 0, 0, 0, 77, 82, 85, 66, 89, 84, 69, 51, 0, /* 0x1000 */
223, 3, 0, 0, 77, 82, 85, 65, 82, 66, 51, 48, 0,225, 3, 0, /* 0x1010 */
0, 77, 82, 85, 66, 73, 84, 83, 51, 0,226, 3, 0, 0, 77, 82, /* 0x1020 */
85, 65, 82, 66, 52, 48, 0,228, 3, 0, 0, 76, 88, 77, 82, 85, /* 0x1030 */
48, 55, 48, 0,232, 3, 0, 0, 0, 0, 0, 0,237, 3, 0, 0, /* 0x1040 */
76, 88, 85, 78, 70, 48, 52, 48, 0, 0, 0, 0, 0, 77, 82, 85, /* 0x1050 */
66, 89, 84, 69, 52, 0,240, 3, 0, 0, 77, 82, 85, 66, 73, 84, /* 0x1060 */
83, 52, 0,243, 3, 0, 0, 77, 82, 85, 65, 82, 66, 53, 48, 0, /* 0x1070 */
245, 3, 0, 0, 76, 88, 77, 82, 85, 48, 56, 48, 0,251, 3, 0, /* 0x1080 */
0, 77, 82, 85, 66, 89, 84, 69, 53, 0,254, 3, 0, 0, 77, 82, /* 0x1090 */
85, 65, 82, 66, 54, 48, 0, 0, 4, 0, 0, 77, 82, 85, 66, 73, /* 0x10a0 */
84, 83, 53, 0, 1, 4, 0, 0, 77, 82, 85, 65, 82, 66, 55, 48, /* 0x10b0 */
0, 3, 4, 0, 0, 76, 88, 77, 82, 85, 48, 57, 48, 0, 7, 4, /* 0x10c0 */
0, 0, 0, 0, 0, 0, 14, 4, 0, 0, 76, 88, 77, 82, 85, 49, /* 0x10d0 */
48, 48, 0, 10, 0, 0, 0, 77, 82, 85, 66, 89, 84, 69, 54, 0, /* 0x10e0 */
18, 4, 0, 0, 77, 82, 85, 65, 82, 66, 56, 48, 0, 20, 4, 0, /* 0x10f0 */
0, 77, 82, 85, 66, 73, 84, 83, 54, 0, 21, 4, 0, 0, 77, 82, /* 0x1100 */
85, 65, 82, 66, 57, 48, 0, 23, 4, 0, 0, 76, 88, 77, 82, 85, /* 0x1110 */
49, 48, 48, 0, 27, 4, 0, 0, 76, 88, 85, 78, 70, 48, 52, 48, /* 0x1120 */
0, 43, 4, 0, 0, 76, 88, 77, 82, 85, 49, 49, 48, 0, 48, 4, /* 0x1130 */
0, 0, 76, 88, 77, 82, 85, 49, 49, 49, 0, 51, 4, 0, 0, 76, /* 0x1140 */
88, 85, 78, 70, 48, 52, 49, 0, 53, 4, 0, 0, 0, 0, 0, 0, /* 0x1150 */
60, 4, 0, 0, 76, 88, 85, 78, 70, 48, 51, 52, 0, 0, 0, 0, /* 0x1160 */
0, 76, 88, 85, 78, 70, 48, 52, 50, 0, 60, 4, 0, 0, 76, 69, /* 0x1170 */
88, 69, 67, 48, 49, 54, 0, 60, 4, 0, 0, 0, 0, 0, 0, 62, /* 0x1180 */
4, 0, 0, 76, 88, 85, 78, 70, 48, 52, 50, 0, 0, 0, 0, 0, /* 0x1190 */
76, 88, 77, 82, 85, 48, 49, 48, 0, 62, 4, 0, 0, 76, 88, 74, /* 0x11a0 */
77, 80, 65, 48, 48, 0, 63, 4, 0, 0, 76, 88, 67, 65, 76, 76, /* 0x11b0 */
66, 48, 0, 65, 4, 0, 0, 76, 88, 85, 78, 70, 48, 50, 49, 0, /* 0x11c0 */
67, 4, 0, 0, 76, 88, 77, 82, 85, 48, 50, 50, 0, 73, 4, 0, /* 0x11d0 */
0, 76, 88, 74, 77, 80, 65, 48, 49, 0, 76, 4, 0, 0, 76, 88, /* 0x11e0 */
67, 65, 76, 76, 66, 49, 0, 78, 4, 0, 0, 77, 82, 85, 66, 73, /* 0x11f0 */
84, 83, 49, 0, 80, 4, 0, 0, 76, 88, 77, 82, 85, 48, 51, 48, /* 0x1200 */
0, 81, 4, 0, 0, 77, 82, 85, 66, 89, 84, 69, 49, 0, 83, 4, /* 0x1210 */
0, 0, 77, 82, 85, 65, 82, 66, 49, 48, 0, 85, 4, 0, 0, 76, /* 0x1220 */
88, 77, 82, 85, 48, 52, 48, 0, 86, 4, 0, 0, 0, 0, 0, 0, /* 0x1230 */
88, 4, 0, 0, 76, 88, 77, 82, 85, 48, 51, 48, 0, 0, 0, 0, /* 0x1240 */
0, 76, 88, 85, 78, 70, 48, 51, 48, 0, 88, 4, 0, 0, 76, 88, /* 0x1250 */
74, 67, 67, 48, 48, 48, 0, 94, 4, 0, 0, 0, 0, 0, 0,102, /* 0x1260 */
4, 0, 0, 76, 88, 74, 67, 67, 48, 49, 48, 0, 0, 0, 0, 0, /* 0x1270 */
76, 88, 67, 74, 48, 77, 82, 85, 0,102, 4, 0, 0, 76, 88, 67, /* 0x1280 */
74, 49, 77, 82, 85, 0,104, 4, 0, 0, 76, 88, 67, 65, 76, 74, /* 0x1290 */
77, 80, 0,107, 4, 0, 0, 76, 88, 67, 65, 76, 76, 48, 48, 0, /* 0x12a0 */
110, 4, 0, 0, 0, 0, 0, 0,112, 4, 0, 0, 76, 88, 85, 78, /* 0x12b0 */
70, 48, 51, 55, 0, 0, 0, 0, 0, 76, 88, 67, 65, 76, 76, 48, /* 0x12c0 */
49, 0,112, 4, 0, 0, 76, 88, 67, 74, 50, 77, 82, 85, 0,115, /* 0x12d0 */
4, 0, 0, 0, 0, 0, 0,117, 4, 0, 0, 76, 88, 85, 78, 70, /* 0x12e0 */
48, 51, 55, 0, 0, 0, 0, 0, 76, 88, 67, 74, 52, 77, 82, 85, /* 0x12f0 */
0,117, 4, 0, 0, 0, 0, 0, 0,119, 4, 0, 0, 76, 88, 85, /* 0x1300 */
78, 70, 48, 51, 52, 0, 0, 0, 0, 0, 76, 88, 67, 74, 54, 77, /* 0x1310 */
82, 85, 0,119, 4, 0, 0, 0, 0, 0, 0,121, 4, 0, 0, 76, /* 0x1320 */
88, 67, 74, 56, 77, 82, 85, 0, 1, 0, 0, 0, 76, 88, 67, 74, /* 0x1330 */
55, 77, 82, 85, 0,121, 4, 0, 0, 0, 0, 0, 0,123, 4, 0, /* 0x1340 */
0, 76, 88, 67, 74, 56, 77, 82, 85, 0, 1, 0, 0, 0, 76, 88, /* 0x1350 */
67, 74, 56, 77, 82, 85, 0,123, 4, 0, 0, 0, 0, 0, 0,126, /* 0x1360 */
4, 0, 0, 76, 88, 85, 78, 70, 48, 51, 55, 0, 0, 0, 0, 0, /* 0x1370 */
76, 88, 85, 78, 70, 48, 51, 52, 0,126, 4, 0, 0, 0, 0, 0, /* 0x1380 */
0,131, 4, 0, 0, 76, 88, 85, 78, 70, 48, 51, 48, 0, 0, 0, /* 0x1390 */
0, 0, 76, 88, 77, 82, 85, 48, 53, 53, 0,131, 4, 0, 0, 77, /* 0x13a0 */
82, 85, 66, 89, 84, 69, 50, 0,133, 4, 0, 0, 77, 82, 85, 66, /* 0x13b0 */
73, 84, 83, 50, 0,138, 4, 0, 0, 77, 82, 85, 65, 82, 66, 50, /* 0x13c0 */
48, 0,143, 4, 0, 0, 76, 88, 77, 82, 85, 48, 53, 55, 0,148, /* 0x13d0 */
4, 0, 0, 76, 88, 77, 82, 85, 48, 53, 56, 0,154, 4, 0, 0, /* 0x13e0 */
76, 88, 85, 78, 70, 48, 51, 53, 0,155, 4, 0, 0, 67, 75, 76, /* 0x13f0 */
76, 84, 82, 48, 48, 0,161, 4, 0, 0, 0, 0, 0, 0,165, 4, /* 0x1400 */
0, 0, 67, 75, 76, 76, 84, 82, 50, 48, 0, 30, 0, 0, 0, 67, /* 0x1410 */
75, 76, 76, 84, 82, 49, 48, 0,170, 4, 0, 0, 0, 0, 0, 0, /* 0x1420 */
184, 4, 0, 0, 67, 75, 76, 76, 84, 82, 50, 48, 0, 6, 0, 0, /* 0x1430 */
0, 67, 75, 76, 76, 84, 82, 50, 48, 0,184, 4, 0, 0, 0, 0, /* 0x1440 */
0, 0,190, 4, 0, 0, 67, 75, 76, 76, 84, 82, 52, 48, 0, 0, /* 0x1450 */
0, 0, 0, 0, 0, 0, 0,194, 4, 0, 0, 67, 75, 76, 76, 84, /* 0x1460 */
82, 52, 48, 0, 0, 0, 0, 0, 67, 75, 76, 76, 84, 82, 51, 48, /* 0x1470 */
0,217, 4, 0, 0, 0, 0, 0, 0,224, 4, 0, 0, 67, 75, 76, /* 0x1480 */
76, 84, 82, 49, 48, 0, 14, 0, 0, 0, 67, 75, 76, 76, 84, 82, /* 0x1490 */
52, 48, 0,224, 4, 0, 0, 0, 0, 0, 0,229, 4, 0, 0, 67, /* 0x14a0 */
75, 76, 76, 84, 82, 48, 48, 0, 4, 0, 0, 0, 76, 69, 88, 69, /* 0x14b0 */
67, 48, 49, 55, 0,229, 4, 0, 0, 76, 69, 88, 69, 67, 48, 50, /* 0x14c0 */
48, 0,231, 4, 0, 0, 88, 84, 72, 69, 69, 78, 68, 88, 0, 96, /* 0x14d0 */
5, 0, 0,255,255,255,255, 96, 5 /* 0x14e0 */
};
+2 -2
View File
@@ -38,8 +38,8 @@ PHDRS
}
SECTIONS
{
/* 0x00c00000: 12MB */
. = 0x00c00000 + SIZEOF_HEADERS + 12; /* 12==sizeof(l_info) */
/* 0x00c01000: 12MB+4KB for Fedora Core 5 vDSO at 0xc00000 */
. = 0x00c01000 + SIZEOF_HEADERS + 12; /* 12==sizeof(l_info) */
.text : {
*(.text)
*(.data)
+27 -5
View File
@@ -49,27 +49,49 @@ MAP_PRIVATE= 2
MAP_FIXED= 0x10
MAP_ANONYMOUS= 0x20
SYS_mmap= 90
__NR_mmap= 90
PAGE_SHIFT= 12
PAGE_SIZE = -(~0<<PAGE_SHIFT)
/* Temporary until we get the buildLoader stuff working ... */
.ascii "\n$Id: UPX (C) 1996-2006 the UPX Team. "
.asciz "All Rights Reserved. http://upx.sf.net $\n"
.p2align 2 # (1<<2)
/* /usr/include/asm-ppc/unistd.h */
__NR_write = 4
__NR_exit = 1
msg_SELinux:
call L71
L70:
.asciz "PROT_EXEC|PROT_WRITE failed.\n"
.p2align 2 # (1<<2)
L71:
li a2,L71 - L70 # length
mflr a1 # message text
li a0,2 # fd stderr
li 0,__NR_write; sc
die:
li a0,127
li 0,__NR_exit; sc
/* Decompress the rest of this loader, and jump to it. */
unfold:
mflr r30 # &{ b_info={sz_unc, sz_cpr, {4 char}}, folded_loader...}
li a5,0 # off_t
li a4,0 # fd; ignored, but must be in range?
li a4,-1 # fd; cater to *BSD for MAP_ANON
lwz a0,sz_cpr(r30)
li a3,MAP_PRIVATE | MAP_FIXED | MAP_ANONYMOUS
li a2,PROT_READ | PROT_WRITE | PROT_EXEC
li a1,PAGE_SIZE
add a0,a0,r30
li 0,SYS_mmap
li 0,__NR_mmap
addi a0,a0,sz_b_info+PAGE_SIZE-1
rlwinm a0,a0,0,0,31-PAGE_SHIFT # next page boundary after fold
sc
bns+ 0f; trap # Branch if NoSummary[Overflow] (no failure)
sc; bso- msg_SELinux # Branch if SummaryOverflow (failure)
0:
mtctr r31
lbz meth,b_method(r30)
+22 -13
View File
@@ -1,4 +1,4 @@
/* l_lx_elfppc32.h -- created from l_lx_elfppc32.bin, 460 (0x1cc) bytes
/* l_lx_elfppc32.h -- created from l_lx_elfppc32.bin, 604 (0x25c) bytes
This file is part of the UPX executable compressor.
@@ -27,12 +27,12 @@
*/
#define LINUX_ELFPPC32_LOADER_SIZE 460
#define LINUX_ELFPPC32_LOADER_ADLER32 0xd58495f3
#define LINUX_ELFPPC32_LOADER_CRC32 0x5b115466
#define LINUX_ELFPPC32_LOADER_SIZE 604
#define LINUX_ELFPPC32_LOADER_ADLER32 0x0a8bbdb5
#define LINUX_ELFPPC32_LOADER_CRC32 0xcfe347e7
unsigned char linux_elfppc32_loader[460] = {
72, 0, 1,189,124, 0, 41,236,144,166, 0, 0,124,132, 26, 20, /* 0x 0 */
unsigned char linux_elfppc32_loader[604] = {
72, 0, 2, 77,124, 0, 41,236,144,166, 0, 0,124,132, 26, 20, /* 0x 0 */
60, 0,128, 0, 61, 32,128, 0, 56, 99,255,255, 56,165,255,255, /* 0x 10 */
57, 64,255,255,125,168, 2,166, 72, 0, 1, 12, 57, 32, 0, 1, /* 0x 20 */
125, 41, 28, 44, 56, 99, 0, 4,124, 9, 0, 64,125, 41, 72, 20, /* 0x 30 */
@@ -54,11 +54,20 @@ unsigned char linux_elfppc32_loader[460] = {
66, 0,255,248, 56,224, 1, 0,124, 7, 41,236,124, 7, 26, 44, /* 0x 130 */
75,255,255, 16,128, 6, 0, 0,125,168, 3,166, 56,165, 0, 1, /* 0x 140 */
56, 99, 0, 1,124,160, 40, 80,124,100, 24, 80,144,166, 0, 0, /* 0x 150 */
78,128, 0, 32,127,200, 2,166, 57, 0, 0, 0, 56,224, 0, 0, /* 0x 160 */
128,126, 0, 4, 56,192, 0, 50, 56,160, 0, 7, 56,128, 16, 0, /* 0x 170 */
124, 99,242, 20, 56, 0, 0, 90, 56, 99, 16, 11, 84, 99, 0, 38, /* 0x 180 */
68, 0, 0, 2, 64,163, 0, 8,127,224, 0, 8,127,233, 3,166, /* 0x 190 */
136,254, 0, 8, 56,193, 0,124,124,101, 27,120,124,104, 3,166, /* 0x 1a0 */
128,158, 0, 4, 56,126, 0, 12, 78,128, 4, 32,148, 33,255,128, /* 0x 1b0 */
188, 65, 0, 4,127,232, 2,166, 75,255,255,157 /* 0x 1c0 */
78,128, 0, 32, 10, 36, 73,100, 58, 32, 85, 80, 88, 32, 40, 67, /* 0x 160 */
41, 32, 49, 57, 57, 54, 45, 50, 48, 48, 54, 32,116,104,101, 32, /* 0x 170 */
85, 80, 88, 32, 84,101, 97,109, 46, 32, 65,108,108, 32, 82,105, /* 0x 180 */
103,104,116,115, 32, 82,101,115,101,114,118,101,100, 46, 32,104, /* 0x 190 */
116,116,112, 58, 47, 47,117,112,120, 46,115,102, 46,110,101,116, /* 0x 1a0 */
32, 36, 10, 0, 72, 0, 0, 37, 80, 82, 79, 84, 95, 69, 88, 69, /* 0x 1b0 */
67,124, 80, 82, 79, 84, 95, 87, 82, 73, 84, 69, 32,102, 97,105, /* 0x 1c0 */
108,101,100, 46, 10, 0, 0, 0, 56,160, 0, 32,124,136, 2,166, /* 0x 1d0 */
56, 96, 0, 2, 56, 0, 0, 4, 68, 0, 0, 2, 56, 96, 0,127, /* 0x 1e0 */
56, 0, 0, 1, 68, 0, 0, 2,127,200, 2,166, 57, 0, 0, 0, /* 0x 1f0 */
56,224,255,255,128,126, 0, 4, 56,192, 0, 50, 56,160, 0, 7, /* 0x 200 */
56,128, 16, 0,124, 99,242, 20, 56, 0, 0, 90, 56, 99, 16, 11, /* 0x 210 */
84, 99, 0, 38, 68, 0, 0, 2, 65,163,255,140,127,233, 3,166, /* 0x 220 */
136,254, 0, 8, 56,193, 0,124,124,101, 27,120,124,104, 3,166, /* 0x 230 */
128,158, 0, 4, 56,126, 0, 12, 78,128, 4, 32,148, 33,255,128, /* 0x 240 */
188, 65, 0, 4,127,232, 2,166, 75,255,255,161 /* 0x 250 */
};
+7 -20
View File
@@ -217,21 +217,19 @@ typedef int f_expand(
**************************************************************************/
void upx_main(
f_unfilter *const f_unf,
unsigned cprLen,
struct Extent xi,
f_expand *const f_decompress,
int junk2,
char /*const*/ *cprSrc,
f_unfilter *const f_unf,
char *envp[],
char *argv[],
int argc
) __asm__("upx_main");
void upx_main(
f_unfilter *const f_unf,
unsigned cprLen,
struct Extent xi,
f_expand *const f_decompress,
int junk,
char /*const*/ *cprSrc,
f_unfilter *const f_unf,
char *envp[],
char *argv[],
int argc
@@ -244,10 +242,6 @@ void upx_main(
unsigned char *buf;
char *tmpname;
struct Extent xi = { cprLen, cprSrc };
char *next_unmap = (char *)(PAGE_MASK & (unsigned)xi.buf);
struct p_info header;
// temporary file name
@@ -363,12 +357,12 @@ void upx_main(
// FIXME: packer could set address delta
mmap(buf + (PAGE_MASK & (header.p_filesize + ~PAGE_MASK)),
-PAGE_MASK, PROT_READ | PROT_WRITE,
MAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS, 0, 0 );
MAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS, -1, 0 );
#else
// Temporary decompression buffer.
// FIXME: packer could set length
buf = mmap(0, (header.p_blocksize + OVERHEAD + ~PAGE_MASK) & PAGE_MASK,
PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, 0, 0 );
PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0 );
if ((unsigned long) buf >= (unsigned long) -4095)
goto error;
#endif
@@ -380,7 +374,6 @@ void upx_main(
for (;;)
{
struct b_info h;
int i;
// Read and check block sizes.
{
@@ -412,7 +405,7 @@ void upx_main(
if (h.sz_cpr < h.sz_unc) { // Decompress block.
nrv_uint out_len;
i = (*f_decompress)((unsigned char *)xi.buf, h.sz_cpr, buf, &out_len, h.b_method);
int i = (*f_decompress)((unsigned char *)xi.buf, h.sz_cpr, buf, &out_len, h.b_method);
if (i != 0 || out_len != (nrv_uint)h.sz_unc)
goto error;
// Right now, unfilter is combined with decompression.
@@ -457,14 +450,8 @@ void upx_main(
for (;;)
(void) exit(127);
}
// We will never touch these pages again.
i = (PAGE_MASK & (unsigned)xi.buf) - (unsigned)next_unmap;
munmap(next_unmap, i);
next_unmap += i;
}
//
// ----- Step 5: release resources -----
//
+2 -46
View File
@@ -143,54 +143,10 @@ decompress:
;__LEXEC020__
%define PAGE_SIZE ( 1<<12)
%define MAP_FIXED 0x10
%define MAP_PRIVATE 0x02
%define MAP_ANONYMOUS 0x20
%define PROT_READ 1
%define PROT_WRITE 2
%define PROT_EXEC 4
%define __NR_mmap 90
; Decompress the rest of this loader, and jump to it
unfold:
pop esi ; &{ sz_uncompressed, sz_compressed, compressed_data...}
cld
lodsd
push eax ; sz_uncompressed (junk, actually)
push esp ; &sz_uncompressed
mov eax, 0x400000
push eax ; &destination
; mmap a page to hold the decompressed program
xor ecx, ecx
push ecx
push ecx
mov ch, PAGE_SIZE >> 8
push byte MAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS
push byte PROT_READ | PROT_WRITE | PROT_EXEC
push ecx ; length
push eax ; destination
mov ebx, esp ; address of parameter vector for __NR_mmap
push byte __NR_mmap
pop eax
int 0x80
xchg eax, ebx
mov bh, PAGE_SIZE>>8 ; ebx= 0x401000
add esp, byte 6*4 ; discard args to mmap
lodsd
push eax ; sz_compressed
lodsd ; junk cto8, algo, unused[2]
push esi ; &compressed_data
call ebp ; decompress(&src, srclen, &dst, &dstlen)
pop eax ; discard &compressed_data
pop eax ; discard sz_compressed
ret ; &destination
main:
pop ebp ; &decompress
call unfold
mov ebx, 0x401000 ; &Elf32_Ehdr of this program
;; fall into fold_begin
eof:
; __XTHEENDX__
+256 -259
View File
@@ -1,4 +1,4 @@
/* l_lx_exec86.h -- created from l_lx_exec86.bin, 5323 (0x14cb) bytes
/* l_lx_exec86.h -- created from l_lx_exec86.bin, 5279 (0x149f) bytes
This file is part of the UPX executable compressor.
@@ -27,11 +27,11 @@
*/
#define LINUX_I386EXEC_LOADER_SIZE 5323
#define LINUX_I386EXEC_LOADER_ADLER32 0x1a5ac7ad
#define LINUX_I386EXEC_LOADER_CRC32 0xc5aa06ae
#define LINUX_I386EXEC_LOADER_SIZE 5279
#define LINUX_I386EXEC_LOADER_ADLER32 0xf155b1a6
#define LINUX_I386EXEC_LOADER_CRC32 0x8ea0096c
unsigned char linux_i386exec_loader[5323] = {
unsigned char linux_i386exec_loader[5279] = {
232, 0, 0, 0, 0,184, 78, 77, 82, 85, 96,106, 63,139,116, 36, /* 0x 0 */
40,139,124, 36, 48,131,205,255,235, 0,164,235, 0,138, 6, 70, /* 0x 10 */
136, 7, 71, 1,219,117, 7,139, 30,131,238,252, 17,219,114, 0, /* 0x 20 */
@@ -111,258 +111,255 @@ unsigned char linux_i386exec_loader[5323] = {
128,127,254, 15,116, 0, 44,232, 60, 1,119, 0, 56, 23,117, 0, /* 0x 4c0 */
139, 7,102,193,232, 8,193,192, 16,134,196, 41,248, 1,240,137, /* 0x 4d0 */
7,131,199, 4,131,233, 4,138, 7,131,199, 1,226, 0,131,233, /* 0x 4e0 */
1,127, 0, 97,195, 94,252,173, 80, 84,184, 0, 0, 64, 0, 80, /* 0x 4f0 */
49,201, 81, 81,181, 16,106, 50,106, 7, 81, 80,137,227,106, 90, /* 0x 500 */
88,205,128,147,183, 16,131,196, 24,173, 80,173, 86,255,213, 88, /* 0x 510 */
88,195, 93,232,205,255,255,255, 76, 69, 88, 69, 67, 48, 48, 48, /* 0x 520 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 76, 69, 88, /* 0x 530 */
69, 67, 48, 50, 48, 0, 45, 0, 0, 0, 76, 69, 88, 69, 67, 48, /* 0x 540 */
48, 57, 0, 5, 0, 0, 0, 76, 69, 88, 69, 67, 48, 49, 48, 0, /* 0x 550 */
10, 0, 0, 0, 78, 50, 66, 83, 77, 65, 49, 48, 0, 24, 0, 0, /* 0x 560 */
0, 0, 0, 0, 0, 26, 0, 0, 0, 78, 50, 66, 68, 69, 67, 49, /* 0x 570 */
48, 0, 4, 0, 0, 0, 78, 50, 66, 70, 65, 83, 49, 48, 0, 27, /* 0x 580 */
0, 0, 0, 0, 0, 0, 0, 29, 0, 0, 0, 78, 50, 66, 68, 69, /* 0x 590 */
67, 49, 48, 0, 4, 0, 0, 0, 78, 50, 66, 70, 65, 83, 49, 49, /* 0x 5a0 */
0, 29, 0, 0, 0, 78, 50, 66, 68, 69, 67, 49, 48, 0, 35, 0, /* 0x 5b0 */
0, 0, 78, 50, 66, 83, 77, 65, 50, 48, 0, 46, 0, 0, 0, 0, /* 0x 5c0 */
0, 0, 0, 48, 0, 0, 0, 78, 50, 66, 83, 77, 65, 49, 48, 0, /* 0x 5d0 */
2, 0, 0, 0, 78, 50, 66, 70, 65, 83, 50, 48, 0, 51, 0, 0, /* 0x 5e0 */
0, 0, 0, 0, 0, 55, 0, 0, 0, 78, 50, 66, 70, 65, 83, 49, /* 0x 5f0 */
49, 0, 0, 0, 0, 0, 78, 50, 66, 68, 69, 67, 50, 48, 0, 60, /* 0x 600 */
0, 0, 0, 78, 50, 66, 83, 77, 65, 51, 48, 0, 73, 0, 0, 0, /* 0x 610 */
0, 0, 0, 0, 86, 0, 0, 0, 78, 50, 66, 68, 69, 67, 50, 48, /* 0x 620 */
0, 0, 0, 0, 0, 78, 50, 66, 70, 65, 83, 51, 48, 0, 86, 0, /* 0x 630 */
0, 0, 0, 0, 0, 0, 90, 0, 0, 0, 78, 50, 66, 68, 69, 67, /* 0x 640 */
50, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,101, 0, 0, 0, 78, /* 0x 650 */
50, 66, 68, 69, 67, 50, 48, 0, 0, 0, 0, 0, 78, 50, 66, 68, /* 0x 660 */
69, 67, 51, 48, 0,101, 0, 0, 0, 0, 0, 0, 0,119, 0, 0, /* 0x 670 */
0, 78, 50, 66, 68, 69, 67, 54, 48, 0, 0, 0, 0, 0, 0, 0, /* 0x 680 */
0, 0,149, 0, 0, 0, 78, 50, 66, 68, 69, 67, 53, 48, 0, 0, /* 0x 690 */
0, 0, 0, 78, 50, 66, 83, 77, 65, 52, 48, 0,163, 0, 0, 0, /* 0x 6a0 */
0, 0, 0, 0,176, 0, 0, 0, 78, 50, 66, 68, 69, 67, 51, 48, /* 0x 6b0 */
0, 49, 0, 0, 0, 78, 50, 66, 70, 65, 83, 52, 48, 0,176, 0, /* 0x 6c0 */
0, 0, 0, 0, 0, 0,180, 0, 0, 0, 78, 50, 66, 68, 69, 67, /* 0x 6d0 */
51, 48, 0, 49, 0, 0, 0, 0, 0, 0, 0,191, 0, 0, 0, 78, /* 0x 6e0 */
50, 66, 68, 69, 67, 51, 48, 0, 49, 0, 0, 0, 78, 50, 66, 68, /* 0x 6f0 */
85, 77, 77, 49, 0,191, 0, 0, 0, 78, 50, 66, 83, 77, 65, 53, /* 0x 700 */
48, 0,191, 0, 0, 0, 78, 50, 66, 70, 65, 83, 53, 48, 0,193, /* 0x 710 */
0, 0, 0, 78, 50, 66, 68, 69, 67, 53, 48, 0,196, 0, 0, 0, /* 0x 720 */
78, 50, 66, 83, 77, 65, 54, 48, 0,205, 0, 0, 0, 0, 0, 0, /* 0x 730 */
0,217, 0, 0, 0, 78, 50, 66, 68, 69, 67, 49, 48, 0, 0, 0, /* 0x 740 */
0, 0, 78, 50, 66, 70, 65, 83, 54, 48, 0,217, 0, 0, 0, 0, /* 0x 750 */
0, 0, 0,228, 0, 0, 0, 78, 50, 66, 70, 65, 83, 54, 49, 0, /* 0x 760 */
0, 0, 0, 0, 0, 0, 0, 0,242, 0, 0, 0, 78, 50, 66, 68, /* 0x 770 */
69, 67, 49, 48, 0, 0, 0, 0, 0, 78, 50, 66, 70, 65, 83, 54, /* 0x 780 */
49, 0,242, 0, 0, 0, 0, 0, 0, 0, 8, 1, 0, 0, 78, 50, /* 0x 790 */
66, 68, 69, 67, 49, 48, 0, 0, 0, 0, 0, 78, 50, 66, 68, 69, /* 0x 7a0 */
67, 54, 48, 0, 8, 1, 0, 0, 78, 82, 86, 50, 66, 69, 78, 68, /* 0x 7b0 */
0, 8, 1, 0, 0, 78, 50, 68, 83, 77, 65, 49, 48, 0, 8, 1, /* 0x 7c0 */
0, 0, 0, 0, 0, 0, 10, 1, 0, 0, 78, 50, 68, 68, 69, 67, /* 0x 7d0 */
49, 48, 0, 4, 0, 0, 0, 78, 50, 68, 70, 65, 83, 49, 48, 0, /* 0x 7e0 */
11, 1, 0, 0, 0, 0, 0, 0, 13, 1, 0, 0, 78, 50, 68, 68, /* 0x 7f0 */
69, 67, 49, 48, 0, 4, 0, 0, 0, 78, 50, 68, 70, 65, 83, 49, /* 0x 800 */
49, 0, 13, 1, 0, 0, 78, 50, 68, 68, 69, 67, 49, 48, 0, 19, /* 0x 810 */
1, 0, 0, 78, 50, 68, 83, 77, 65, 50, 48, 0, 30, 1, 0, 0, /* 0x 820 */
0, 0, 0, 0, 32, 1, 0, 0, 78, 50, 68, 83, 77, 65, 49, 48, /* 0x 830 */
0, 2, 0, 0, 0, 78, 50, 68, 70, 65, 83, 50, 48, 0, 35, 1, /* 0x 840 */
0, 0, 0, 0, 0, 0, 39, 1, 0, 0, 78, 50, 68, 70, 65, 83, /* 0x 850 */
49, 49, 0, 0, 0, 0, 0, 78, 50, 68, 68, 69, 67, 50, 48, 0, /* 0x 860 */
44, 1, 0, 0, 78, 50, 68, 83, 77, 65, 51, 48, 0, 57, 1, 0, /* 0x 870 */
0, 0, 0, 0, 0, 70, 1, 0, 0, 78, 50, 68, 68, 69, 67, 51, /* 0x 880 */
48, 0, 16, 0, 0, 0, 78, 50, 68, 70, 65, 83, 51, 48, 0, 70, /* 0x 890 */
1, 0, 0, 0, 0, 0, 0, 76, 1, 0, 0, 78, 50, 68, 68, 69, /* 0x 8a0 */
67, 51, 48, 0, 16, 0, 0, 0, 0, 0, 0, 0, 85, 1, 0, 0, /* 0x 8b0 */
78, 50, 68, 68, 69, 67, 51, 48, 0, 16, 0, 0, 0, 78, 50, 68, /* 0x 8c0 */
68, 69, 67, 51, 48, 0, 85, 1, 0, 0, 0, 0, 0, 0,101, 1, /* 0x 8d0 */
0, 0, 78, 50, 68, 68, 69, 67, 50, 48, 0, 0, 0, 0, 0, 0, /* 0x 8e0 */
0, 0, 0,119, 1, 0, 0, 78, 50, 68, 68, 69, 67, 54, 48, 0, /* 0x 8f0 */
0, 0, 0, 0, 0, 0, 0, 0,153, 1, 0, 0, 78, 50, 68, 68, /* 0x 900 */
69, 67, 53, 48, 0, 0, 0, 0, 0, 78, 50, 68, 83, 77, 65, 52, /* 0x 910 */
48, 0,167, 1, 0, 0, 0, 0, 0, 0,180, 1, 0, 0, 78, 50, /* 0x 920 */
68, 68, 69, 67, 51, 48, 0, 69, 0, 0, 0, 78, 50, 68, 70, 65, /* 0x 930 */
83, 52, 48, 0,180, 1, 0, 0, 0, 0, 0, 0,184, 1, 0, 0, /* 0x 940 */
78, 50, 68, 68, 69, 67, 51, 48, 0, 69, 0, 0, 0, 0, 0, 0, /* 0x 950 */
0,195, 1, 0, 0, 78, 50, 68, 68, 69, 67, 51, 48, 0, 69, 0, /* 0x 960 */
0, 0, 78, 50, 68, 68, 85, 77, 77, 49, 0,195, 1, 0, 0, 78, /* 0x 970 */
50, 68, 83, 77, 65, 53, 48, 0,195, 1, 0, 0, 78, 50, 68, 70, /* 0x 980 */
65, 83, 53, 48, 0,197, 1, 0, 0, 78, 50, 68, 68, 69, 67, 53, /* 0x 990 */
48, 0,200, 1, 0, 0, 78, 50, 68, 83, 77, 65, 54, 48, 0,209, /* 0x 9a0 */
1, 0, 0, 0, 0, 0, 0,221, 1, 0, 0, 78, 50, 68, 68, 69, /* 0x 9b0 */
67, 49, 48, 0, 0, 0, 0, 0, 78, 50, 68, 70, 65, 83, 54, 48, /* 0x 9c0 */
0,221, 1, 0, 0, 0, 0, 0, 0,232, 1, 0, 0, 78, 50, 68, /* 0x 9d0 */
70, 65, 83, 54, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0,246, 1, /* 0x 9e0 */
0, 0, 78, 50, 68, 68, 69, 67, 49, 48, 0, 0, 0, 0, 0, 78, /* 0x 9f0 */
50, 68, 70, 65, 83, 54, 49, 0,246, 1, 0, 0, 0, 0, 0, 0, /* 0x a00 */
12, 2, 0, 0, 78, 50, 68, 68, 69, 67, 49, 48, 0, 0, 0, 0, /* 0x a10 */
0, 78, 50, 68, 68, 69, 67, 54, 48, 0, 12, 2, 0, 0, 78, 82, /* 0x a20 */
86, 50, 68, 69, 78, 68, 0, 12, 2, 0, 0, 78, 50, 69, 83, 77, /* 0x a30 */
65, 49, 48, 0, 12, 2, 0, 0, 0, 0, 0, 0, 14, 2, 0, 0, /* 0x a40 */
78, 50, 69, 68, 69, 67, 49, 48, 0, 4, 0, 0, 0, 78, 50, 69, /* 0x a50 */
70, 65, 83, 49, 48, 0, 15, 2, 0, 0, 0, 0, 0, 0, 17, 2, /* 0x a60 */
0, 0, 78, 50, 69, 68, 69, 67, 49, 48, 0, 4, 0, 0, 0, 78, /* 0x a70 */
50, 69, 70, 65, 83, 49, 49, 0, 17, 2, 0, 0, 78, 50, 69, 68, /* 0x a80 */
69, 67, 49, 48, 0, 23, 2, 0, 0, 78, 50, 69, 83, 77, 65, 50, /* 0x a90 */
48, 0, 34, 2, 0, 0, 0, 0, 0, 0, 36, 2, 0, 0, 78, 50, /* 0x aa0 */
69, 83, 77, 65, 49, 48, 0, 2, 0, 0, 0, 78, 50, 69, 70, 65, /* 0x ab0 */
83, 50, 48, 0, 39, 2, 0, 0, 0, 0, 0, 0, 43, 2, 0, 0, /* 0x ac0 */
78, 50, 69, 70, 65, 83, 49, 49, 0, 0, 0, 0, 0, 78, 50, 69, /* 0x ad0 */
68, 69, 67, 50, 48, 0, 48, 2, 0, 0, 78, 50, 69, 83, 77, 65, /* 0x ae0 */
51, 48, 0, 61, 2, 0, 0, 0, 0, 0, 0, 74, 2, 0, 0, 78, /* 0x af0 */
50, 69, 68, 69, 67, 51, 48, 0, 31, 0, 0, 0, 78, 50, 69, 70, /* 0x b00 */
65, 83, 51, 48, 0, 74, 2, 0, 0, 0, 0, 0, 0, 80, 2, 0, /* 0x b10 */
0, 78, 50, 69, 68, 69, 67, 51, 48, 0, 31, 0, 0, 0, 0, 0, /* 0x b20 */
0, 0, 89, 2, 0, 0, 78, 50, 69, 68, 69, 67, 51, 48, 0, 31, /* 0x b30 */
0, 0, 0, 78, 50, 69, 68, 69, 67, 51, 48, 0, 89, 2, 0, 0, /* 0x b40 */
0, 0, 0, 0,105, 2, 0, 0, 78, 50, 69, 68, 69, 67, 50, 48, /* 0x b50 */
0, 0, 0, 0, 0, 0, 0, 0, 0,120, 2, 0, 0, 78, 50, 69, /* 0x b60 */
68, 69, 67, 53, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,138, 2, /* 0x b70 */
0, 0, 78, 50, 69, 68, 69, 67, 54, 48, 0, 0, 0, 0, 0, 78, /* 0x b80 */
50, 69, 83, 77, 65, 52, 48, 0,184, 2, 0, 0, 0, 0, 0, 0, /* 0x b90 */
197, 2, 0, 0, 78, 50, 69, 68, 69, 67, 51, 48, 0, 82, 0, 0, /* 0x ba0 */
0, 78, 50, 69, 70, 65, 83, 52, 48, 0,197, 2, 0, 0, 0, 0, /* 0x bb0 */
0, 0,201, 2, 0, 0, 78, 50, 69, 68, 69, 67, 51, 48, 0, 82, /* 0x bc0 */
0, 0, 0, 0, 0, 0, 0,212, 2, 0, 0, 78, 50, 69, 68, 69, /* 0x bd0 */
67, 51, 48, 0, 82, 0, 0, 0, 78, 50, 69, 68, 85, 77, 77, 49, /* 0x be0 */
0,212, 2, 0, 0, 78, 50, 69, 83, 77, 65, 53, 48, 0,212, 2, /* 0x bf0 */
0, 0, 78, 50, 69, 70, 65, 83, 53, 48, 0,214, 2, 0, 0, 78, /* 0x c00 */
50, 69, 68, 69, 67, 53, 48, 0,217, 2, 0, 0, 78, 50, 69, 83, /* 0x c10 */
77, 65, 54, 48, 0,226, 2, 0, 0, 0, 0, 0, 0,238, 2, 0, /* 0x c20 */
0, 78, 50, 69, 68, 69, 67, 49, 48, 0, 0, 0, 0, 0, 78, 50, /* 0x c30 */
69, 70, 65, 83, 54, 48, 0,238, 2, 0, 0, 0, 0, 0, 0,249, /* 0x c40 */
2, 0, 0, 78, 50, 69, 70, 65, 83, 54, 49, 0, 0, 0, 0, 0, /* 0x c50 */
0, 0, 0, 0, 7, 3, 0, 0, 78, 50, 69, 68, 69, 67, 49, 48, /* 0x c60 */
0, 0, 0, 0, 0, 78, 50, 69, 70, 65, 83, 54, 49, 0, 7, 3, /* 0x c70 */
0, 0, 0, 0, 0, 0, 29, 3, 0, 0, 78, 50, 69, 68, 69, 67, /* 0x c80 */
49, 48, 0, 0, 0, 0, 0, 78, 50, 69, 68, 69, 67, 54, 48, 0, /* 0x c90 */
29, 3, 0, 0, 78, 82, 86, 50, 69, 69, 78, 68, 0, 29, 3, 0, /* 0x ca0 */
0, 67, 65, 76, 76, 84, 82, 48, 48, 0, 29, 3, 0, 0, 67, 84, /* 0x cb0 */
67, 76, 69, 86, 69, 49, 0, 43, 3, 0, 0, 0, 0, 0, 0, 48, /* 0x cc0 */
3, 0, 0, 67, 65, 76, 76, 84, 82, 48, 48, 0, 5, 0, 0, 0, /* 0x cd0 */
67, 65, 76, 76, 84, 82, 48, 49, 0, 48, 3, 0, 0, 67, 84, 68, /* 0x ce0 */
85, 77, 77, 89, 49, 0, 53, 3, 0, 0, 67, 84, 66, 83, 72, 82, /* 0x cf0 */
48, 49, 0, 53, 3, 0, 0, 67, 84, 66, 82, 79, 82, 48, 49, 0, /* 0x d00 */
57, 3, 0, 0, 67, 84, 66, 83, 87, 65, 48, 49, 0, 59, 3, 0, /* 0x d10 */
0, 67, 65, 76, 76, 84, 82, 48, 50, 0, 64, 3, 0, 0, 0, 0, /* 0x d20 */
0, 0, 78, 3, 0, 0, 67, 65, 76, 76, 84, 82, 48, 48, 0, 10, /* 0x d30 */
0, 0, 0, 67, 65, 76, 76, 84, 82, 49, 48, 0, 78, 3, 0, 0, /* 0x d40 */
67, 65, 76, 76, 84, 82, 69, 56, 0, 83, 3, 0, 0, 67, 65, 76, /* 0x d50 */
76, 84, 82, 69, 57, 0, 85, 3, 0, 0, 67, 65, 76, 76, 84, 82, /* 0x d60 */
49, 49, 0, 87, 3, 0, 0, 0, 0, 0, 0, 91, 3, 0, 0, 67, /* 0x d70 */
65, 76, 76, 84, 82, 49, 51, 0, 5, 0, 0, 0, 67, 84, 67, 76, /* 0x d80 */
69, 86, 69, 50, 0, 91, 3, 0, 0, 0, 0, 0, 0, 96, 3, 0, /* 0x d90 */
0, 67, 65, 76, 76, 84, 82, 49, 49, 0, 0, 0, 0, 0, 67, 65, /* 0x da0 */
76, 76, 84, 82, 49, 50, 0, 96, 3, 0, 0, 67, 84, 68, 85, 77, /* 0x db0 */
77, 89, 50, 0, 98, 3, 0, 0, 67, 84, 66, 83, 72, 82, 49, 49, /* 0x dc0 */
0, 98, 3, 0, 0, 67, 84, 66, 82, 79, 82, 49, 49, 0,102, 3, /* 0x dd0 */
0, 0, 67, 84, 66, 83, 87, 65, 49, 49, 0,104, 3, 0, 0, 67, /* 0x de0 */
65, 76, 76, 84, 82, 49, 51, 0,109, 3, 0, 0, 0, 0, 0, 0, /* 0x df0 */
114, 3, 0, 0, 67, 65, 76, 76, 84, 82, 49, 48, 0, 5, 0, 0, /* 0x e00 */
0, 67, 84, 84, 72, 69, 69, 78, 68, 0,114, 3, 0, 0, 76, 69, /* 0x e10 */
88, 69, 67, 48, 49, 53, 0,114, 3, 0, 0, 76, 69, 88, 69, 67, /* 0x e20 */
49, 49, 48, 0,146, 3, 0, 0, 76, 69, 88, 69, 67, 49, 48, 48, /* 0x e30 */
0,152, 3, 0, 0, 76, 88, 85, 78, 70, 48, 48, 48, 0,153, 3, /* 0x e40 */
0, 0, 0, 0, 0, 0,155, 3, 0, 0, 76, 88, 85, 78, 70, 48, /* 0x e50 */
49, 48, 0, 5, 0, 0, 0, 76, 88, 85, 78, 70, 48, 48, 50, 0, /* 0x e60 */
155, 3, 0, 0, 77, 82, 85, 66, 89, 84, 69, 48, 0,160, 3, 0, /* 0x e70 */
0, 76, 88, 77, 82, 85, 48, 48, 53, 0,162, 3, 0, 0, 76, 88, /* 0x e80 */
77, 82, 85, 48, 48, 54, 0,167, 3, 0, 0, 76, 88, 77, 82, 85, /* 0x e90 */
48, 48, 55, 0,174, 3, 0, 0, 76, 88, 85, 78, 70, 48, 48, 56, /* 0x ea0 */
0,181, 3, 0, 0, 76, 88, 85, 78, 70, 48, 49, 48, 0,185, 3, /* 0x eb0 */
0, 0, 0, 0, 0, 0,190, 3, 0, 0, 76, 88, 85, 78, 70, 48, /* 0x ec0 */
52, 50, 0, 0, 0, 0, 0, 76, 88, 74, 67, 67, 48, 49, 48, 0, /* 0x ed0 */
190, 3, 0, 0, 76, 88, 77, 82, 85, 48, 52, 53, 0,193, 3, 0, /* 0x ee0 */
0, 76, 88, 77, 82, 85, 48, 52, 54, 0,196, 3, 0, 0, 76, 88, /* 0x ef0 */
74, 67, 67, 48, 50, 48, 0,198, 3, 0, 0, 0, 0, 0, 0,200, /* 0x f00 */
3, 0, 0, 76, 88, 85, 78, 70, 48, 51, 52, 0, 0, 0, 0, 0, /* 0x f10 */
76, 88, 74, 67, 67, 48, 50, 49, 0,200, 3, 0, 0, 0, 0, 0, /* 0x f20 */
0,205, 3, 0, 0, 76, 88, 85, 78, 70, 48, 51, 52, 0, 0, 0, /* 0x f30 */
0, 0, 76, 88, 74, 67, 67, 48, 50, 51, 0,205, 3, 0, 0, 76, /* 0x f40 */
88, 85, 78, 70, 48, 51, 55, 0,212, 3, 0, 0, 76, 88, 85, 78, /* 0x f50 */
70, 51, 56, 54, 0,214, 3, 0, 0, 76, 88, 85, 78, 70, 51, 56, /* 0x f60 */
55, 0,215, 3, 0, 0, 76, 88, 85, 78, 70, 51, 56, 56, 0,224, /* 0x f70 */
3, 0, 0, 0, 0, 0, 0,227, 3, 0, 0, 76, 88, 85, 78, 70, /* 0x f80 */
48, 52, 48, 0, 0, 0, 0, 0, 76, 88, 85, 78, 70, 52, 56, 54, /* 0x f90 */
0,227, 3, 0, 0, 76, 88, 85, 78, 70, 52, 56, 55, 0,231, 3, /* 0x fa0 */
0, 0, 0, 0, 0, 0,233, 3, 0, 0, 76, 88, 85, 78, 70, 48, /* 0x fb0 */
52, 48, 0, 0, 0, 0, 0, 76, 88, 77, 82, 85, 48, 54, 53, 0, /* 0x fc0 */
233, 3, 0, 0, 0, 0, 0, 0,237, 3, 0, 0, 76, 88, 77, 82, /* 0x fd0 */
85, 48, 55, 48, 0, 5, 0, 0, 0, 77, 82, 85, 66, 89, 84, 69, /* 0x fe0 */
51, 0,237, 3, 0, 0, 77, 82, 85, 65, 82, 66, 51, 48, 0,239, /* 0x ff0 */
3, 0, 0, 77, 82, 85, 66, 73, 84, 83, 51, 0,240, 3, 0, 0, /* 0x1000 */
77, 82, 85, 65, 82, 66, 52, 48, 0,242, 3, 0, 0, 76, 88, 77, /* 0x1010 */
82, 85, 48, 55, 48, 0,246, 3, 0, 0, 0, 0, 0, 0,251, 3, /* 0x1020 */
0, 0, 76, 88, 85, 78, 70, 48, 52, 48, 0, 0, 0, 0, 0, 77, /* 0x1030 */
82, 85, 66, 89, 84, 69, 52, 0,254, 3, 0, 0, 77, 82, 85, 66, /* 0x1040 */
73, 84, 83, 52, 0, 1, 4, 0, 0, 77, 82, 85, 65, 82, 66, 53, /* 0x1050 */
48, 0, 3, 4, 0, 0, 76, 88, 77, 82, 85, 48, 56, 48, 0, 9, /* 0x1060 */
4, 0, 0, 77, 82, 85, 66, 89, 84, 69, 53, 0, 12, 4, 0, 0, /* 0x1070 */
77, 82, 85, 65, 82, 66, 54, 48, 0, 14, 4, 0, 0, 77, 82, 85, /* 0x1080 */
66, 73, 84, 83, 53, 0, 15, 4, 0, 0, 77, 82, 85, 65, 82, 66, /* 0x1090 */
55, 48, 0, 17, 4, 0, 0, 76, 88, 77, 82, 85, 48, 57, 48, 0, /* 0x10a0 */
21, 4, 0, 0, 0, 0, 0, 0, 28, 4, 0, 0, 76, 88, 77, 82, /* 0x10b0 */
85, 49, 48, 48, 0, 10, 0, 0, 0, 77, 82, 85, 66, 89, 84, 69, /* 0x10c0 */
54, 0, 32, 4, 0, 0, 77, 82, 85, 65, 82, 66, 56, 48, 0, 34, /* 0x10d0 */
4, 0, 0, 77, 82, 85, 66, 73, 84, 83, 54, 0, 35, 4, 0, 0, /* 0x10e0 */
77, 82, 85, 65, 82, 66, 57, 48, 0, 37, 4, 0, 0, 76, 88, 77, /* 0x10f0 */
82, 85, 49, 48, 48, 0, 41, 4, 0, 0, 76, 88, 85, 78, 70, 48, /* 0x1100 */
52, 48, 0, 57, 4, 0, 0, 76, 88, 77, 82, 85, 49, 49, 48, 0, /* 0x1110 */
62, 4, 0, 0, 76, 88, 77, 82, 85, 49, 49, 49, 0, 65, 4, 0, /* 0x1120 */
0, 76, 88, 85, 78, 70, 48, 52, 49, 0, 67, 4, 0, 0, 0, 0, /* 0x1130 */
0, 0, 74, 4, 0, 0, 76, 88, 85, 78, 70, 48, 51, 52, 0, 0, /* 0x1140 */
0, 0, 0, 76, 88, 85, 78, 70, 48, 52, 50, 0, 74, 4, 0, 0, /* 0x1150 */
76, 69, 88, 69, 67, 48, 49, 54, 0, 74, 4, 0, 0, 0, 0, 0, /* 0x1160 */
0, 76, 4, 0, 0, 76, 88, 85, 78, 70, 48, 52, 50, 0, 0, 0, /* 0x1170 */
0, 0, 76, 88, 77, 82, 85, 48, 49, 48, 0, 76, 4, 0, 0, 76, /* 0x1180 */
88, 74, 77, 80, 65, 48, 48, 0, 77, 4, 0, 0, 76, 88, 67, 65, /* 0x1190 */
76, 76, 66, 48, 0, 79, 4, 0, 0, 76, 88, 85, 78, 70, 48, 50, /* 0x11a0 */
49, 0, 81, 4, 0, 0, 76, 88, 77, 82, 85, 48, 50, 50, 0, 87, /* 0x11b0 */
4, 0, 0, 76, 88, 74, 77, 80, 65, 48, 49, 0, 90, 4, 0, 0, /* 0x11c0 */
76, 88, 67, 65, 76, 76, 66, 49, 0, 92, 4, 0, 0, 77, 82, 85, /* 0x11d0 */
66, 73, 84, 83, 49, 0, 94, 4, 0, 0, 76, 88, 77, 82, 85, 48, /* 0x11e0 */
51, 48, 0, 95, 4, 0, 0, 77, 82, 85, 66, 89, 84, 69, 49, 0, /* 0x11f0 */
97, 4, 0, 0, 77, 82, 85, 65, 82, 66, 49, 48, 0, 99, 4, 0, /* 0x1200 */
0, 76, 88, 77, 82, 85, 48, 52, 48, 0,100, 4, 0, 0, 0, 0, /* 0x1210 */
0, 0,102, 4, 0, 0, 76, 88, 77, 82, 85, 48, 51, 48, 0, 0, /* 0x1220 */
0, 0, 0, 76, 88, 85, 78, 70, 48, 51, 48, 0,102, 4, 0, 0, /* 0x1230 */
76, 88, 74, 67, 67, 48, 48, 48, 0,108, 4, 0, 0, 0, 0, 0, /* 0x1240 */
0,116, 4, 0, 0, 76, 88, 74, 67, 67, 48, 49, 48, 0, 0, 0, /* 0x1250 */
0, 0, 76, 88, 67, 74, 48, 77, 82, 85, 0,116, 4, 0, 0, 76, /* 0x1260 */
88, 67, 74, 49, 77, 82, 85, 0,118, 4, 0, 0, 76, 88, 67, 65, /* 0x1270 */
76, 74, 77, 80, 0,121, 4, 0, 0, 76, 88, 67, 65, 76, 76, 48, /* 0x1280 */
48, 0,124, 4, 0, 0, 0, 0, 0, 0,126, 4, 0, 0, 76, 88, /* 0x1290 */
85, 78, 70, 48, 51, 55, 0, 0, 0, 0, 0, 76, 88, 67, 65, 76, /* 0x12a0 */
76, 48, 49, 0,126, 4, 0, 0, 76, 88, 67, 74, 50, 77, 82, 85, /* 0x12b0 */
0,129, 4, 0, 0, 0, 0, 0, 0,131, 4, 0, 0, 76, 88, 85, /* 0x12c0 */
78, 70, 48, 51, 55, 0, 0, 0, 0, 0, 76, 88, 67, 74, 52, 77, /* 0x12d0 */
82, 85, 0,131, 4, 0, 0, 0, 0, 0, 0,133, 4, 0, 0, 76, /* 0x12e0 */
88, 85, 78, 70, 48, 51, 52, 0, 0, 0, 0, 0, 76, 88, 67, 74, /* 0x12f0 */
54, 77, 82, 85, 0,133, 4, 0, 0, 0, 0, 0, 0,135, 4, 0, /* 0x1300 */
0, 76, 88, 67, 74, 56, 77, 82, 85, 0, 1, 0, 0, 0, 76, 88, /* 0x1310 */
67, 74, 55, 77, 82, 85, 0,135, 4, 0, 0, 0, 0, 0, 0,137, /* 0x1320 */
4, 0, 0, 76, 88, 67, 74, 56, 77, 82, 85, 0, 1, 0, 0, 0, /* 0x1330 */
76, 88, 67, 74, 56, 77, 82, 85, 0,137, 4, 0, 0, 0, 0, 0, /* 0x1340 */
0,140, 4, 0, 0, 76, 88, 85, 78, 70, 48, 51, 55, 0, 0, 0, /* 0x1350 */
0, 0, 76, 88, 85, 78, 70, 48, 51, 52, 0,140, 4, 0, 0, 0, /* 0x1360 */
0, 0, 0,145, 4, 0, 0, 76, 88, 85, 78, 70, 48, 51, 48, 0, /* 0x1370 */
0, 0, 0, 0, 76, 88, 77, 82, 85, 48, 53, 53, 0,145, 4, 0, /* 0x1380 */
0, 77, 82, 85, 66, 89, 84, 69, 50, 0,147, 4, 0, 0, 77, 82, /* 0x1390 */
85, 66, 73, 84, 83, 50, 0,152, 4, 0, 0, 77, 82, 85, 65, 82, /* 0x13a0 */
66, 50, 48, 0,157, 4, 0, 0, 76, 88, 77, 82, 85, 48, 53, 55, /* 0x13b0 */
0,162, 4, 0, 0, 76, 88, 77, 82, 85, 48, 53, 56, 0,168, 4, /* 0x13c0 */
0, 0, 76, 88, 85, 78, 70, 48, 51, 53, 0,169, 4, 0, 0, 67, /* 0x13d0 */
75, 76, 76, 84, 82, 48, 48, 0,175, 4, 0, 0, 0, 0, 0, 0, /* 0x13e0 */
179, 4, 0, 0, 67, 75, 76, 76, 84, 82, 50, 48, 0, 30, 0, 0, /* 0x13f0 */
0, 67, 75, 76, 76, 84, 82, 49, 48, 0,184, 4, 0, 0, 0, 0, /* 0x1400 */
0, 0,198, 4, 0, 0, 67, 75, 76, 76, 84, 82, 50, 48, 0, 6, /* 0x1410 */
0, 0, 0, 67, 75, 76, 76, 84, 82, 50, 48, 0,198, 4, 0, 0, /* 0x1420 */
0, 0, 0, 0,204, 4, 0, 0, 67, 75, 76, 76, 84, 82, 52, 48, /* 0x1430 */
0, 0, 0, 0, 0, 0, 0, 0, 0,208, 4, 0, 0, 67, 75, 76, /* 0x1440 */
76, 84, 82, 52, 48, 0, 0, 0, 0, 0, 67, 75, 76, 76, 84, 82, /* 0x1450 */
51, 48, 0,231, 4, 0, 0, 0, 0, 0, 0,238, 4, 0, 0, 67, /* 0x1460 */
75, 76, 76, 84, 82, 49, 48, 0, 14, 0, 0, 0, 67, 75, 76, 76, /* 0x1470 */
84, 82, 52, 48, 0,238, 4, 0, 0, 0, 0, 0, 0,243, 4, 0, /* 0x1480 */
0, 67, 75, 76, 76, 84, 82, 48, 48, 0, 4, 0, 0, 0, 76, 69, /* 0x1490 */
88, 69, 67, 48, 49, 55, 0,243, 4, 0, 0, 76, 69, 88, 69, 67, /* 0x14a0 */
48, 50, 48, 0,245, 4, 0, 0, 88, 84, 72, 69, 69, 78, 68, 88, /* 0x14b0 */
0, 40, 5, 0, 0,255,255,255,255, 40, 5 /* 0x14c0 */
1,127, 0, 97,195, 93,187, 0, 16, 64, 0, 0, 76, 69, 88, 69, /* 0x 4f0 */
67, 48, 48, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, /* 0x 500 */
0, 76, 69, 88, 69, 67, 48, 50, 48, 0, 0, 0, 0, 0, 76, 69, /* 0x 510 */
88, 69, 67, 48, 48, 57, 0, 5, 0, 0, 0, 76, 69, 88, 69, 67, /* 0x 520 */
48, 49, 48, 0, 10, 0, 0, 0, 78, 50, 66, 83, 77, 65, 49, 48, /* 0x 530 */
0, 24, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 78, 50, 66, /* 0x 540 */
68, 69, 67, 49, 48, 0, 4, 0, 0, 0, 78, 50, 66, 70, 65, 83, /* 0x 550 */
49, 48, 0, 27, 0, 0, 0, 0, 0, 0, 0, 29, 0, 0, 0, 78, /* 0x 560 */
50, 66, 68, 69, 67, 49, 48, 0, 4, 0, 0, 0, 78, 50, 66, 70, /* 0x 570 */
65, 83, 49, 49, 0, 29, 0, 0, 0, 78, 50, 66, 68, 69, 67, 49, /* 0x 580 */
48, 0, 35, 0, 0, 0, 78, 50, 66, 83, 77, 65, 50, 48, 0, 46, /* 0x 590 */
0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 0, 78, 50, 66, 83, 77, /* 0x 5a0 */
65, 49, 48, 0, 2, 0, 0, 0, 78, 50, 66, 70, 65, 83, 50, 48, /* 0x 5b0 */
0, 51, 0, 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, 78, 50, 66, /* 0x 5c0 */
70, 65, 83, 49, 49, 0, 0, 0, 0, 0, 78, 50, 66, 68, 69, 67, /* 0x 5d0 */
50, 48, 0, 60, 0, 0, 0, 78, 50, 66, 83, 77, 65, 51, 48, 0, /* 0x 5e0 */
73, 0, 0, 0, 0, 0, 0, 0, 86, 0, 0, 0, 78, 50, 66, 68, /* 0x 5f0 */
69, 67, 50, 48, 0, 0, 0, 0, 0, 78, 50, 66, 70, 65, 83, 51, /* 0x 600 */
48, 0, 86, 0, 0, 0, 0, 0, 0, 0, 90, 0, 0, 0, 78, 50, /* 0x 610 */
66, 68, 69, 67, 50, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,101, /* 0x 620 */
0, 0, 0, 78, 50, 66, 68, 69, 67, 50, 48, 0, 0, 0, 0, 0, /* 0x 630 */
78, 50, 66, 68, 69, 67, 51, 48, 0,101, 0, 0, 0, 0, 0, 0, /* 0x 640 */
0,119, 0, 0, 0, 78, 50, 66, 68, 69, 67, 54, 48, 0, 0, 0, /* 0x 650 */
0, 0, 0, 0, 0, 0,149, 0, 0, 0, 78, 50, 66, 68, 69, 67, /* 0x 660 */
53, 48, 0, 0, 0, 0, 0, 78, 50, 66, 83, 77, 65, 52, 48, 0, /* 0x 670 */
163, 0, 0, 0, 0, 0, 0, 0,176, 0, 0, 0, 78, 50, 66, 68, /* 0x 680 */
69, 67, 51, 48, 0, 49, 0, 0, 0, 78, 50, 66, 70, 65, 83, 52, /* 0x 690 */
48, 0,176, 0, 0, 0, 0, 0, 0, 0,180, 0, 0, 0, 78, 50, /* 0x 6a0 */
66, 68, 69, 67, 51, 48, 0, 49, 0, 0, 0, 0, 0, 0, 0,191, /* 0x 6b0 */
0, 0, 0, 78, 50, 66, 68, 69, 67, 51, 48, 0, 49, 0, 0, 0, /* 0x 6c0 */
78, 50, 66, 68, 85, 77, 77, 49, 0,191, 0, 0, 0, 78, 50, 66, /* 0x 6d0 */
83, 77, 65, 53, 48, 0,191, 0, 0, 0, 78, 50, 66, 70, 65, 83, /* 0x 6e0 */
53, 48, 0,193, 0, 0, 0, 78, 50, 66, 68, 69, 67, 53, 48, 0, /* 0x 6f0 */
196, 0, 0, 0, 78, 50, 66, 83, 77, 65, 54, 48, 0,205, 0, 0, /* 0x 700 */
0, 0, 0, 0, 0,217, 0, 0, 0, 78, 50, 66, 68, 69, 67, 49, /* 0x 710 */
48, 0, 0, 0, 0, 0, 78, 50, 66, 70, 65, 83, 54, 48, 0,217, /* 0x 720 */
0, 0, 0, 0, 0, 0, 0,228, 0, 0, 0, 78, 50, 66, 70, 65, /* 0x 730 */
83, 54, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0,242, 0, 0, 0, /* 0x 740 */
78, 50, 66, 68, 69, 67, 49, 48, 0, 0, 0, 0, 0, 78, 50, 66, /* 0x 750 */
70, 65, 83, 54, 49, 0,242, 0, 0, 0, 0, 0, 0, 0, 8, 1, /* 0x 760 */
0, 0, 78, 50, 66, 68, 69, 67, 49, 48, 0, 0, 0, 0, 0, 78, /* 0x 770 */
50, 66, 68, 69, 67, 54, 48, 0, 8, 1, 0, 0, 78, 82, 86, 50, /* 0x 780 */
66, 69, 78, 68, 0, 8, 1, 0, 0, 78, 50, 68, 83, 77, 65, 49, /* 0x 790 */
48, 0, 8, 1, 0, 0, 0, 0, 0, 0, 10, 1, 0, 0, 78, 50, /* 0x 7a0 */
68, 68, 69, 67, 49, 48, 0, 4, 0, 0, 0, 78, 50, 68, 70, 65, /* 0x 7b0 */
83, 49, 48, 0, 11, 1, 0, 0, 0, 0, 0, 0, 13, 1, 0, 0, /* 0x 7c0 */
78, 50, 68, 68, 69, 67, 49, 48, 0, 4, 0, 0, 0, 78, 50, 68, /* 0x 7d0 */
70, 65, 83, 49, 49, 0, 13, 1, 0, 0, 78, 50, 68, 68, 69, 67, /* 0x 7e0 */
49, 48, 0, 19, 1, 0, 0, 78, 50, 68, 83, 77, 65, 50, 48, 0, /* 0x 7f0 */
30, 1, 0, 0, 0, 0, 0, 0, 32, 1, 0, 0, 78, 50, 68, 83, /* 0x 800 */
77, 65, 49, 48, 0, 2, 0, 0, 0, 78, 50, 68, 70, 65, 83, 50, /* 0x 810 */
48, 0, 35, 1, 0, 0, 0, 0, 0, 0, 39, 1, 0, 0, 78, 50, /* 0x 820 */
68, 70, 65, 83, 49, 49, 0, 0, 0, 0, 0, 78, 50, 68, 68, 69, /* 0x 830 */
67, 50, 48, 0, 44, 1, 0, 0, 78, 50, 68, 83, 77, 65, 51, 48, /* 0x 840 */
0, 57, 1, 0, 0, 0, 0, 0, 0, 70, 1, 0, 0, 78, 50, 68, /* 0x 850 */
68, 69, 67, 51, 48, 0, 16, 0, 0, 0, 78, 50, 68, 70, 65, 83, /* 0x 860 */
51, 48, 0, 70, 1, 0, 0, 0, 0, 0, 0, 76, 1, 0, 0, 78, /* 0x 870 */
50, 68, 68, 69, 67, 51, 48, 0, 16, 0, 0, 0, 0, 0, 0, 0, /* 0x 880 */
85, 1, 0, 0, 78, 50, 68, 68, 69, 67, 51, 48, 0, 16, 0, 0, /* 0x 890 */
0, 78, 50, 68, 68, 69, 67, 51, 48, 0, 85, 1, 0, 0, 0, 0, /* 0x 8a0 */
0, 0,101, 1, 0, 0, 78, 50, 68, 68, 69, 67, 50, 48, 0, 0, /* 0x 8b0 */
0, 0, 0, 0, 0, 0, 0,119, 1, 0, 0, 78, 50, 68, 68, 69, /* 0x 8c0 */
67, 54, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,153, 1, 0, 0, /* 0x 8d0 */
78, 50, 68, 68, 69, 67, 53, 48, 0, 0, 0, 0, 0, 78, 50, 68, /* 0x 8e0 */
83, 77, 65, 52, 48, 0,167, 1, 0, 0, 0, 0, 0, 0,180, 1, /* 0x 8f0 */
0, 0, 78, 50, 68, 68, 69, 67, 51, 48, 0, 69, 0, 0, 0, 78, /* 0x 900 */
50, 68, 70, 65, 83, 52, 48, 0,180, 1, 0, 0, 0, 0, 0, 0, /* 0x 910 */
184, 1, 0, 0, 78, 50, 68, 68, 69, 67, 51, 48, 0, 69, 0, 0, /* 0x 920 */
0, 0, 0, 0, 0,195, 1, 0, 0, 78, 50, 68, 68, 69, 67, 51, /* 0x 930 */
48, 0, 69, 0, 0, 0, 78, 50, 68, 68, 85, 77, 77, 49, 0,195, /* 0x 940 */
1, 0, 0, 78, 50, 68, 83, 77, 65, 53, 48, 0,195, 1, 0, 0, /* 0x 950 */
78, 50, 68, 70, 65, 83, 53, 48, 0,197, 1, 0, 0, 78, 50, 68, /* 0x 960 */
68, 69, 67, 53, 48, 0,200, 1, 0, 0, 78, 50, 68, 83, 77, 65, /* 0x 970 */
54, 48, 0,209, 1, 0, 0, 0, 0, 0, 0,221, 1, 0, 0, 78, /* 0x 980 */
50, 68, 68, 69, 67, 49, 48, 0, 0, 0, 0, 0, 78, 50, 68, 70, /* 0x 990 */
65, 83, 54, 48, 0,221, 1, 0, 0, 0, 0, 0, 0,232, 1, 0, /* 0x 9a0 */
0, 78, 50, 68, 70, 65, 83, 54, 49, 0, 0, 0, 0, 0, 0, 0, /* 0x 9b0 */
0, 0,246, 1, 0, 0, 78, 50, 68, 68, 69, 67, 49, 48, 0, 0, /* 0x 9c0 */
0, 0, 0, 78, 50, 68, 70, 65, 83, 54, 49, 0,246, 1, 0, 0, /* 0x 9d0 */
0, 0, 0, 0, 12, 2, 0, 0, 78, 50, 68, 68, 69, 67, 49, 48, /* 0x 9e0 */
0, 0, 0, 0, 0, 78, 50, 68, 68, 69, 67, 54, 48, 0, 12, 2, /* 0x 9f0 */
0, 0, 78, 82, 86, 50, 68, 69, 78, 68, 0, 12, 2, 0, 0, 78, /* 0x a00 */
50, 69, 83, 77, 65, 49, 48, 0, 12, 2, 0, 0, 0, 0, 0, 0, /* 0x a10 */
14, 2, 0, 0, 78, 50, 69, 68, 69, 67, 49, 48, 0, 4, 0, 0, /* 0x a20 */
0, 78, 50, 69, 70, 65, 83, 49, 48, 0, 15, 2, 0, 0, 0, 0, /* 0x a30 */
0, 0, 17, 2, 0, 0, 78, 50, 69, 68, 69, 67, 49, 48, 0, 4, /* 0x a40 */
0, 0, 0, 78, 50, 69, 70, 65, 83, 49, 49, 0, 17, 2, 0, 0, /* 0x a50 */
78, 50, 69, 68, 69, 67, 49, 48, 0, 23, 2, 0, 0, 78, 50, 69, /* 0x a60 */
83, 77, 65, 50, 48, 0, 34, 2, 0, 0, 0, 0, 0, 0, 36, 2, /* 0x a70 */
0, 0, 78, 50, 69, 83, 77, 65, 49, 48, 0, 2, 0, 0, 0, 78, /* 0x a80 */
50, 69, 70, 65, 83, 50, 48, 0, 39, 2, 0, 0, 0, 0, 0, 0, /* 0x a90 */
43, 2, 0, 0, 78, 50, 69, 70, 65, 83, 49, 49, 0, 0, 0, 0, /* 0x aa0 */
0, 78, 50, 69, 68, 69, 67, 50, 48, 0, 48, 2, 0, 0, 78, 50, /* 0x ab0 */
69, 83, 77, 65, 51, 48, 0, 61, 2, 0, 0, 0, 0, 0, 0, 74, /* 0x ac0 */
2, 0, 0, 78, 50, 69, 68, 69, 67, 51, 48, 0, 31, 0, 0, 0, /* 0x ad0 */
78, 50, 69, 70, 65, 83, 51, 48, 0, 74, 2, 0, 0, 0, 0, 0, /* 0x ae0 */
0, 80, 2, 0, 0, 78, 50, 69, 68, 69, 67, 51, 48, 0, 31, 0, /* 0x af0 */
0, 0, 0, 0, 0, 0, 89, 2, 0, 0, 78, 50, 69, 68, 69, 67, /* 0x b00 */
51, 48, 0, 31, 0, 0, 0, 78, 50, 69, 68, 69, 67, 51, 48, 0, /* 0x b10 */
89, 2, 0, 0, 0, 0, 0, 0,105, 2, 0, 0, 78, 50, 69, 68, /* 0x b20 */
69, 67, 50, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,120, 2, 0, /* 0x b30 */
0, 78, 50, 69, 68, 69, 67, 53, 48, 0, 0, 0, 0, 0, 0, 0, /* 0x b40 */
0, 0,138, 2, 0, 0, 78, 50, 69, 68, 69, 67, 54, 48, 0, 0, /* 0x b50 */
0, 0, 0, 78, 50, 69, 83, 77, 65, 52, 48, 0,184, 2, 0, 0, /* 0x b60 */
0, 0, 0, 0,197, 2, 0, 0, 78, 50, 69, 68, 69, 67, 51, 48, /* 0x b70 */
0, 82, 0, 0, 0, 78, 50, 69, 70, 65, 83, 52, 48, 0,197, 2, /* 0x b80 */
0, 0, 0, 0, 0, 0,201, 2, 0, 0, 78, 50, 69, 68, 69, 67, /* 0x b90 */
51, 48, 0, 82, 0, 0, 0, 0, 0, 0, 0,212, 2, 0, 0, 78, /* 0x ba0 */
50, 69, 68, 69, 67, 51, 48, 0, 82, 0, 0, 0, 78, 50, 69, 68, /* 0x bb0 */
85, 77, 77, 49, 0,212, 2, 0, 0, 78, 50, 69, 83, 77, 65, 53, /* 0x bc0 */
48, 0,212, 2, 0, 0, 78, 50, 69, 70, 65, 83, 53, 48, 0,214, /* 0x bd0 */
2, 0, 0, 78, 50, 69, 68, 69, 67, 53, 48, 0,217, 2, 0, 0, /* 0x be0 */
78, 50, 69, 83, 77, 65, 54, 48, 0,226, 2, 0, 0, 0, 0, 0, /* 0x bf0 */
0,238, 2, 0, 0, 78, 50, 69, 68, 69, 67, 49, 48, 0, 0, 0, /* 0x c00 */
0, 0, 78, 50, 69, 70, 65, 83, 54, 48, 0,238, 2, 0, 0, 0, /* 0x c10 */
0, 0, 0,249, 2, 0, 0, 78, 50, 69, 70, 65, 83, 54, 49, 0, /* 0x c20 */
0, 0, 0, 0, 0, 0, 0, 0, 7, 3, 0, 0, 78, 50, 69, 68, /* 0x c30 */
69, 67, 49, 48, 0, 0, 0, 0, 0, 78, 50, 69, 70, 65, 83, 54, /* 0x c40 */
49, 0, 7, 3, 0, 0, 0, 0, 0, 0, 29, 3, 0, 0, 78, 50, /* 0x c50 */
69, 68, 69, 67, 49, 48, 0, 0, 0, 0, 0, 78, 50, 69, 68, 69, /* 0x c60 */
67, 54, 48, 0, 29, 3, 0, 0, 78, 82, 86, 50, 69, 69, 78, 68, /* 0x c70 */
0, 29, 3, 0, 0, 67, 65, 76, 76, 84, 82, 48, 48, 0, 29, 3, /* 0x c80 */
0, 0, 67, 84, 67, 76, 69, 86, 69, 49, 0, 43, 3, 0, 0, 0, /* 0x c90 */
0, 0, 0, 48, 3, 0, 0, 67, 65, 76, 76, 84, 82, 48, 48, 0, /* 0x ca0 */
5, 0, 0, 0, 67, 65, 76, 76, 84, 82, 48, 49, 0, 48, 3, 0, /* 0x cb0 */
0, 67, 84, 68, 85, 77, 77, 89, 49, 0, 53, 3, 0, 0, 67, 84, /* 0x cc0 */
66, 83, 72, 82, 48, 49, 0, 53, 3, 0, 0, 67, 84, 66, 82, 79, /* 0x cd0 */
82, 48, 49, 0, 57, 3, 0, 0, 67, 84, 66, 83, 87, 65, 48, 49, /* 0x ce0 */
0, 59, 3, 0, 0, 67, 65, 76, 76, 84, 82, 48, 50, 0, 64, 3, /* 0x cf0 */
0, 0, 0, 0, 0, 0, 78, 3, 0, 0, 67, 65, 76, 76, 84, 82, /* 0x d00 */
48, 48, 0, 10, 0, 0, 0, 67, 65, 76, 76, 84, 82, 49, 48, 0, /* 0x d10 */
78, 3, 0, 0, 67, 65, 76, 76, 84, 82, 69, 56, 0, 83, 3, 0, /* 0x d20 */
0, 67, 65, 76, 76, 84, 82, 69, 57, 0, 85, 3, 0, 0, 67, 65, /* 0x d30 */
76, 76, 84, 82, 49, 49, 0, 87, 3, 0, 0, 0, 0, 0, 0, 91, /* 0x d40 */
3, 0, 0, 67, 65, 76, 76, 84, 82, 49, 51, 0, 5, 0, 0, 0, /* 0x d50 */
67, 84, 67, 76, 69, 86, 69, 50, 0, 91, 3, 0, 0, 0, 0, 0, /* 0x d60 */
0, 96, 3, 0, 0, 67, 65, 76, 76, 84, 82, 49, 49, 0, 0, 0, /* 0x d70 */
0, 0, 67, 65, 76, 76, 84, 82, 49, 50, 0, 96, 3, 0, 0, 67, /* 0x d80 */
84, 68, 85, 77, 77, 89, 50, 0, 98, 3, 0, 0, 67, 84, 66, 83, /* 0x d90 */
72, 82, 49, 49, 0, 98, 3, 0, 0, 67, 84, 66, 82, 79, 82, 49, /* 0x da0 */
49, 0,102, 3, 0, 0, 67, 84, 66, 83, 87, 65, 49, 49, 0,104, /* 0x db0 */
3, 0, 0, 67, 65, 76, 76, 84, 82, 49, 51, 0,109, 3, 0, 0, /* 0x dc0 */
0, 0, 0, 0,114, 3, 0, 0, 67, 65, 76, 76, 84, 82, 49, 48, /* 0x dd0 */
0, 5, 0, 0, 0, 67, 84, 84, 72, 69, 69, 78, 68, 0,114, 3, /* 0x de0 */
0, 0, 76, 69, 88, 69, 67, 48, 49, 53, 0,114, 3, 0, 0, 76, /* 0x df0 */
69, 88, 69, 67, 49, 49, 48, 0,146, 3, 0, 0, 76, 69, 88, 69, /* 0x e00 */
67, 49, 48, 48, 0,152, 3, 0, 0, 76, 88, 85, 78, 70, 48, 48, /* 0x e10 */
48, 0,153, 3, 0, 0, 0, 0, 0, 0,155, 3, 0, 0, 76, 88, /* 0x e20 */
85, 78, 70, 48, 49, 48, 0, 5, 0, 0, 0, 76, 88, 85, 78, 70, /* 0x e30 */
48, 48, 50, 0,155, 3, 0, 0, 77, 82, 85, 66, 89, 84, 69, 48, /* 0x e40 */
0,160, 3, 0, 0, 76, 88, 77, 82, 85, 48, 48, 53, 0,162, 3, /* 0x e50 */
0, 0, 76, 88, 77, 82, 85, 48, 48, 54, 0,167, 3, 0, 0, 76, /* 0x e60 */
88, 77, 82, 85, 48, 48, 55, 0,174, 3, 0, 0, 76, 88, 85, 78, /* 0x e70 */
70, 48, 48, 56, 0,181, 3, 0, 0, 76, 88, 85, 78, 70, 48, 49, /* 0x e80 */
48, 0,185, 3, 0, 0, 0, 0, 0, 0,190, 3, 0, 0, 76, 88, /* 0x e90 */
85, 78, 70, 48, 52, 50, 0, 0, 0, 0, 0, 76, 88, 74, 67, 67, /* 0x ea0 */
48, 49, 48, 0,190, 3, 0, 0, 76, 88, 77, 82, 85, 48, 52, 53, /* 0x eb0 */
0,193, 3, 0, 0, 76, 88, 77, 82, 85, 48, 52, 54, 0,196, 3, /* 0x ec0 */
0, 0, 76, 88, 74, 67, 67, 48, 50, 48, 0,198, 3, 0, 0, 0, /* 0x ed0 */
0, 0, 0,200, 3, 0, 0, 76, 88, 85, 78, 70, 48, 51, 52, 0, /* 0x ee0 */
0, 0, 0, 0, 76, 88, 74, 67, 67, 48, 50, 49, 0,200, 3, 0, /* 0x ef0 */
0, 0, 0, 0, 0,205, 3, 0, 0, 76, 88, 85, 78, 70, 48, 51, /* 0x f00 */
52, 0, 0, 0, 0, 0, 76, 88, 74, 67, 67, 48, 50, 51, 0,205, /* 0x f10 */
3, 0, 0, 76, 88, 85, 78, 70, 48, 51, 55, 0,212, 3, 0, 0, /* 0x f20 */
76, 88, 85, 78, 70, 51, 56, 54, 0,214, 3, 0, 0, 76, 88, 85, /* 0x f30 */
78, 70, 51, 56, 55, 0,215, 3, 0, 0, 76, 88, 85, 78, 70, 51, /* 0x f40 */
56, 56, 0,224, 3, 0, 0, 0, 0, 0, 0,227, 3, 0, 0, 76, /* 0x f50 */
88, 85, 78, 70, 48, 52, 48, 0, 0, 0, 0, 0, 76, 88, 85, 78, /* 0x f60 */
70, 52, 56, 54, 0,227, 3, 0, 0, 76, 88, 85, 78, 70, 52, 56, /* 0x f70 */
55, 0,231, 3, 0, 0, 0, 0, 0, 0,233, 3, 0, 0, 76, 88, /* 0x f80 */
85, 78, 70, 48, 52, 48, 0, 0, 0, 0, 0, 76, 88, 77, 82, 85, /* 0x f90 */
48, 54, 53, 0,233, 3, 0, 0, 0, 0, 0, 0,237, 3, 0, 0, /* 0x fa0 */
76, 88, 77, 82, 85, 48, 55, 48, 0, 5, 0, 0, 0, 77, 82, 85, /* 0x fb0 */
66, 89, 84, 69, 51, 0,237, 3, 0, 0, 77, 82, 85, 65, 82, 66, /* 0x fc0 */
51, 48, 0,239, 3, 0, 0, 77, 82, 85, 66, 73, 84, 83, 51, 0, /* 0x fd0 */
240, 3, 0, 0, 77, 82, 85, 65, 82, 66, 52, 48, 0,242, 3, 0, /* 0x fe0 */
0, 76, 88, 77, 82, 85, 48, 55, 48, 0,246, 3, 0, 0, 0, 0, /* 0x ff0 */
0, 0,251, 3, 0, 0, 76, 88, 85, 78, 70, 48, 52, 48, 0, 0, /* 0x1000 */
0, 0, 0, 77, 82, 85, 66, 89, 84, 69, 52, 0,254, 3, 0, 0, /* 0x1010 */
77, 82, 85, 66, 73, 84, 83, 52, 0, 1, 4, 0, 0, 77, 82, 85, /* 0x1020 */
65, 82, 66, 53, 48, 0, 3, 4, 0, 0, 76, 88, 77, 82, 85, 48, /* 0x1030 */
56, 48, 0, 9, 4, 0, 0, 77, 82, 85, 66, 89, 84, 69, 53, 0, /* 0x1040 */
12, 4, 0, 0, 77, 82, 85, 65, 82, 66, 54, 48, 0, 14, 4, 0, /* 0x1050 */
0, 77, 82, 85, 66, 73, 84, 83, 53, 0, 15, 4, 0, 0, 77, 82, /* 0x1060 */
85, 65, 82, 66, 55, 48, 0, 17, 4, 0, 0, 76, 88, 77, 82, 85, /* 0x1070 */
48, 57, 48, 0, 21, 4, 0, 0, 0, 0, 0, 0, 28, 4, 0, 0, /* 0x1080 */
76, 88, 77, 82, 85, 49, 48, 48, 0, 10, 0, 0, 0, 77, 82, 85, /* 0x1090 */
66, 89, 84, 69, 54, 0, 32, 4, 0, 0, 77, 82, 85, 65, 82, 66, /* 0x10a0 */
56, 48, 0, 34, 4, 0, 0, 77, 82, 85, 66, 73, 84, 83, 54, 0, /* 0x10b0 */
35, 4, 0, 0, 77, 82, 85, 65, 82, 66, 57, 48, 0, 37, 4, 0, /* 0x10c0 */
0, 76, 88, 77, 82, 85, 49, 48, 48, 0, 41, 4, 0, 0, 76, 88, /* 0x10d0 */
85, 78, 70, 48, 52, 48, 0, 57, 4, 0, 0, 76, 88, 77, 82, 85, /* 0x10e0 */
49, 49, 48, 0, 62, 4, 0, 0, 76, 88, 77, 82, 85, 49, 49, 49, /* 0x10f0 */
0, 65, 4, 0, 0, 76, 88, 85, 78, 70, 48, 52, 49, 0, 67, 4, /* 0x1100 */
0, 0, 0, 0, 0, 0, 74, 4, 0, 0, 76, 88, 85, 78, 70, 48, /* 0x1110 */
51, 52, 0, 0, 0, 0, 0, 76, 88, 85, 78, 70, 48, 52, 50, 0, /* 0x1120 */
74, 4, 0, 0, 76, 69, 88, 69, 67, 48, 49, 54, 0, 74, 4, 0, /* 0x1130 */
0, 0, 0, 0, 0, 76, 4, 0, 0, 76, 88, 85, 78, 70, 48, 52, /* 0x1140 */
50, 0, 0, 0, 0, 0, 76, 88, 77, 82, 85, 48, 49, 48, 0, 76, /* 0x1150 */
4, 0, 0, 76, 88, 74, 77, 80, 65, 48, 48, 0, 77, 4, 0, 0, /* 0x1160 */
76, 88, 67, 65, 76, 76, 66, 48, 0, 79, 4, 0, 0, 76, 88, 85, /* 0x1170 */
78, 70, 48, 50, 49, 0, 81, 4, 0, 0, 76, 88, 77, 82, 85, 48, /* 0x1180 */
50, 50, 0, 87, 4, 0, 0, 76, 88, 74, 77, 80, 65, 48, 49, 0, /* 0x1190 */
90, 4, 0, 0, 76, 88, 67, 65, 76, 76, 66, 49, 0, 92, 4, 0, /* 0x11a0 */
0, 77, 82, 85, 66, 73, 84, 83, 49, 0, 94, 4, 0, 0, 76, 88, /* 0x11b0 */
77, 82, 85, 48, 51, 48, 0, 95, 4, 0, 0, 77, 82, 85, 66, 89, /* 0x11c0 */
84, 69, 49, 0, 97, 4, 0, 0, 77, 82, 85, 65, 82, 66, 49, 48, /* 0x11d0 */
0, 99, 4, 0, 0, 76, 88, 77, 82, 85, 48, 52, 48, 0,100, 4, /* 0x11e0 */
0, 0, 0, 0, 0, 0,102, 4, 0, 0, 76, 88, 77, 82, 85, 48, /* 0x11f0 */
51, 48, 0, 0, 0, 0, 0, 76, 88, 85, 78, 70, 48, 51, 48, 0, /* 0x1200 */
102, 4, 0, 0, 76, 88, 74, 67, 67, 48, 48, 48, 0,108, 4, 0, /* 0x1210 */
0, 0, 0, 0, 0,116, 4, 0, 0, 76, 88, 74, 67, 67, 48, 49, /* 0x1220 */
48, 0, 0, 0, 0, 0, 76, 88, 67, 74, 48, 77, 82, 85, 0,116, /* 0x1230 */
4, 0, 0, 76, 88, 67, 74, 49, 77, 82, 85, 0,118, 4, 0, 0, /* 0x1240 */
76, 88, 67, 65, 76, 74, 77, 80, 0,121, 4, 0, 0, 76, 88, 67, /* 0x1250 */
65, 76, 76, 48, 48, 0,124, 4, 0, 0, 0, 0, 0, 0,126, 4, /* 0x1260 */
0, 0, 76, 88, 85, 78, 70, 48, 51, 55, 0, 0, 0, 0, 0, 76, /* 0x1270 */
88, 67, 65, 76, 76, 48, 49, 0,126, 4, 0, 0, 76, 88, 67, 74, /* 0x1280 */
50, 77, 82, 85, 0,129, 4, 0, 0, 0, 0, 0, 0,131, 4, 0, /* 0x1290 */
0, 76, 88, 85, 78, 70, 48, 51, 55, 0, 0, 0, 0, 0, 76, 88, /* 0x12a0 */
67, 74, 52, 77, 82, 85, 0,131, 4, 0, 0, 0, 0, 0, 0,133, /* 0x12b0 */
4, 0, 0, 76, 88, 85, 78, 70, 48, 51, 52, 0, 0, 0, 0, 0, /* 0x12c0 */
76, 88, 67, 74, 54, 77, 82, 85, 0,133, 4, 0, 0, 0, 0, 0, /* 0x12d0 */
0,135, 4, 0, 0, 76, 88, 67, 74, 56, 77, 82, 85, 0, 1, 0, /* 0x12e0 */
0, 0, 76, 88, 67, 74, 55, 77, 82, 85, 0,135, 4, 0, 0, 0, /* 0x12f0 */
0, 0, 0,137, 4, 0, 0, 76, 88, 67, 74, 56, 77, 82, 85, 0, /* 0x1300 */
1, 0, 0, 0, 76, 88, 67, 74, 56, 77, 82, 85, 0,137, 4, 0, /* 0x1310 */
0, 0, 0, 0, 0,140, 4, 0, 0, 76, 88, 85, 78, 70, 48, 51, /* 0x1320 */
55, 0, 0, 0, 0, 0, 76, 88, 85, 78, 70, 48, 51, 52, 0,140, /* 0x1330 */
4, 0, 0, 0, 0, 0, 0,145, 4, 0, 0, 76, 88, 85, 78, 70, /* 0x1340 */
48, 51, 48, 0, 0, 0, 0, 0, 76, 88, 77, 82, 85, 48, 53, 53, /* 0x1350 */
0,145, 4, 0, 0, 77, 82, 85, 66, 89, 84, 69, 50, 0,147, 4, /* 0x1360 */
0, 0, 77, 82, 85, 66, 73, 84, 83, 50, 0,152, 4, 0, 0, 77, /* 0x1370 */
82, 85, 65, 82, 66, 50, 48, 0,157, 4, 0, 0, 76, 88, 77, 82, /* 0x1380 */
85, 48, 53, 55, 0,162, 4, 0, 0, 76, 88, 77, 82, 85, 48, 53, /* 0x1390 */
56, 0,168, 4, 0, 0, 76, 88, 85, 78, 70, 48, 51, 53, 0,169, /* 0x13a0 */
4, 0, 0, 67, 75, 76, 76, 84, 82, 48, 48, 0,175, 4, 0, 0, /* 0x13b0 */
0, 0, 0, 0,179, 4, 0, 0, 67, 75, 76, 76, 84, 82, 50, 48, /* 0x13c0 */
0, 30, 0, 0, 0, 67, 75, 76, 76, 84, 82, 49, 48, 0,184, 4, /* 0x13d0 */
0, 0, 0, 0, 0, 0,198, 4, 0, 0, 67, 75, 76, 76, 84, 82, /* 0x13e0 */
50, 48, 0, 6, 0, 0, 0, 67, 75, 76, 76, 84, 82, 50, 48, 0, /* 0x13f0 */
198, 4, 0, 0, 0, 0, 0, 0,204, 4, 0, 0, 67, 75, 76, 76, /* 0x1400 */
84, 82, 52, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,208, 4, 0, /* 0x1410 */
0, 67, 75, 76, 76, 84, 82, 52, 48, 0, 0, 0, 0, 0, 67, 75, /* 0x1420 */
76, 76, 84, 82, 51, 48, 0,231, 4, 0, 0, 0, 0, 0, 0,238, /* 0x1430 */
4, 0, 0, 67, 75, 76, 76, 84, 82, 49, 48, 0, 14, 0, 0, 0, /* 0x1440 */
67, 75, 76, 76, 84, 82, 52, 48, 0,238, 4, 0, 0, 0, 0, 0, /* 0x1450 */
0,243, 4, 0, 0, 67, 75, 76, 76, 84, 82, 48, 48, 0, 4, 0, /* 0x1460 */
0, 0, 76, 69, 88, 69, 67, 48, 49, 55, 0,243, 4, 0, 0, 76, /* 0x1470 */
69, 88, 69, 67, 48, 50, 48, 0,245, 4, 0, 0, 88, 84, 72, 69, /* 0x1480 */
69, 78, 68, 88, 0,251, 4, 0, 0,255,255,255,255,251, 4 /* 0x1490 */
};
+1 -1
View File
@@ -33,7 +33,7 @@ OUTPUT_ARCH(i386)
/*ENTRY(_start)*/
PHDRS /* force exactly 1 ELF32_Phdr: in particular, no PT_GNU_STACK */
{
phdr0 PT_LOAD FILEHDR PHDRS FLAGS(7);
phdr0 PT_LOAD FILEHDR PHDRS FLAGS(5); /* no PF_W: strict SELinux, PaX, grSecurity */
}
SECTIONS
+2 -2
View File
@@ -209,7 +209,7 @@ xfind_pages(unsigned mflags, Elf32_Phdr const *phdr, int phnum)
lo -= ~PAGE_MASK & lo; // round down to page boundary
hi = PAGE_MASK & (hi - lo - PAGE_MASK -1); // page length
szlo = PAGE_MASK & (szlo - PAGE_MASK -1); // page length
addr = mmap((void *)lo, hi, PROT_READ|PROT_WRITE|PROT_EXEC, mflags, 0, 0);
addr = mmap((void *)lo, hi, PROT_READ|PROT_WRITE|PROT_EXEC, mflags, -1, 0);
// Doing this may destroy the brk() that we set so carefully above.
// The munmap() is "needed" only for discontiguous PT_LOAD,
@@ -266,7 +266,7 @@ ERR_LAB
addr += mlen + frag; /* page boundary on hi end */
if (addr < haddr) { // need pages for .bss
if (addr != mmap(addr, haddr - addr, prot,
MAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS, 0, 0 ) ) {
MAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS, -1, 0 ) ) {
err_exit(9);
}
}

Some files were not shown because too many files have changed in this diff Show More