More renaming.
This commit is contained in:
@@ -1,253 +0,0 @@
|
|||||||
; cl1_d32.ash -- cl1_decompress_le32 in 32-bit assembly
|
|
||||||
; schema from ucl/nrv2b_d32.ash
|
|
||||||
;
|
|
||||||
; Copyright (C) 2004-2006 John Reiser
|
|
||||||
; Copyright (C) 1996-2006 Markus Franz Xaver Johannes Oberhumer
|
|
||||||
; All Rights Reserved.
|
|
||||||
;
|
|
||||||
; This file is free software; you can redistribute it and/or
|
|
||||||
; modify it 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 file 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 the UCL library; 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 John Reiser
|
|
||||||
; <markus@oberhumer.com> <jreiser@BitWagon.com>
|
|
||||||
;
|
|
||||||
|
|
||||||
|
|
||||||
; ------------- DECOMPRESSION -------------
|
|
||||||
|
|
||||||
; Input:
|
|
||||||
; esi - source
|
|
||||||
; edi - dest
|
|
||||||
; ebp - -1
|
|
||||||
; cld
|
|
||||||
|
|
||||||
; Output:
|
|
||||||
; eax - 0
|
|
||||||
; ecx - 0
|
|
||||||
|
|
||||||
|
|
||||||
%ifndef jmps
|
|
||||||
%define jmps jmp short
|
|
||||||
%endif
|
|
||||||
%ifndef jmpn
|
|
||||||
%define jmpn jmp near
|
|
||||||
%endif
|
|
||||||
|
|
||||||
|
|
||||||
;; One of these two is instantiated many times by buildLoader
|
|
||||||
%ifdef __CL1SMA1B__
|
|
||||||
call edx
|
|
||||||
%else; __CL1FAS1B__
|
|
||||||
add ebx, ebx
|
|
||||||
db 0x75,2 ;jnz cl1_no_reload
|
|
||||||
call edx
|
|
||||||
;cl1_no_reload:
|
|
||||||
%endif; __CL1GET1B__
|
|
||||||
|
|
||||||
; __CL1ENTER__
|
|
||||||
nop ; 'int3' for debugging
|
|
||||||
call start_cl1 ; pic push address of next instr
|
|
||||||
; __CL1SMA10__
|
|
||||||
getbit_cl1: ; appears only in small version
|
|
||||||
add ebx, ebx
|
|
||||||
jz reload_cl1
|
|
||||||
ret
|
|
||||||
; __CL1RLOAD__
|
|
||||||
reload_cl1: ; for both small and fast version
|
|
||||||
mov ebx, [esi]
|
|
||||||
sub esi, byte -4
|
|
||||||
adc ebx, ebx
|
|
||||||
ret
|
|
||||||
; __CL1WID01__
|
|
||||||
widelit_cl1:
|
|
||||||
sub ecx,ecx ; back to 0
|
|
||||||
; getbit
|
|
||||||
; __CL1WID02__
|
|
||||||
adc ecx,ecx
|
|
||||||
; getbit
|
|
||||||
; __CL1WID03__
|
|
||||||
jc lit89_cl1
|
|
||||||
; getbit
|
|
||||||
; __CL1WID04__
|
|
||||||
adc ecx,ecx
|
|
||||||
; getbit
|
|
||||||
; __CL1WID05__
|
|
||||||
jc lit10_12_cl1
|
|
||||||
; getbit
|
|
||||||
; __CL1WID06__
|
|
||||||
adc ecx,ecx ; 0..7; -1+ (width/2) of length
|
|
||||||
litwidth_cl1: ; ss22 algorithm, counted width<=8 pairs; returns eax= 2..0x15555
|
|
||||||
; getbit
|
|
||||||
; __CL1WID07__
|
|
||||||
adc eax,eax
|
|
||||||
dec eax
|
|
||||||
; getbit
|
|
||||||
; __CL1WID08__
|
|
||||||
adc eax,eax
|
|
||||||
sub ecx, byte 1
|
|
||||||
jnc litwidth_cl1
|
|
||||||
lea ecx,[17 -2 + eax] ; 17: predecessors; ss22 returns 2..
|
|
||||||
cmp eax,0xffff-(17 -2)
|
|
||||||
jb litgo_cl1 ; not maximal range of search
|
|
||||||
lea eax,[esi + ecx] ; esi after copy
|
|
||||||
push eax ; "parameter" to maxlit_cl1
|
|
||||||
jmpn maxlit_cl1 ; can have another literal afterwards
|
|
||||||
lit13_16_cl1:
|
|
||||||
; getbit
|
|
||||||
; __CL1WID09__
|
|
||||||
adc ecx,ecx
|
|
||||||
; getbit
|
|
||||||
; __CL1WID10__
|
|
||||||
adc ecx,ecx
|
|
||||||
add ecx, byte 13
|
|
||||||
jmps litmov_cl1
|
|
||||||
lit10_12_cl1:
|
|
||||||
test ecx,ecx
|
|
||||||
jz lit13_16_cl1
|
|
||||||
inc ecx ; 2,3,4
|
|
||||||
lit89_cl1:
|
|
||||||
add ecx, byte 8
|
|
||||||
litgo_cl1:
|
|
||||||
jmps litmov_cl1
|
|
||||||
; __CL1START__
|
|
||||||
start_cl1:
|
|
||||||
sub ecx,ecx ; 0
|
|
||||||
pop edx ; edx= getbit_cl1 or reload_cl1
|
|
||||||
sub ebx, ebx ; cause reload on first bit
|
|
||||||
|
|
||||||
; __CL1TOP00__
|
|
||||||
top_cl1: ; In: 0==ecx
|
|
||||||
lea eax,[1+ ecx] ; 1: the msb of offset or large width
|
|
||||||
; getbit
|
|
||||||
; __CL1TOP01__
|
|
||||||
jnc match_cl1
|
|
||||||
; getbit
|
|
||||||
; __CL1TOP02__
|
|
||||||
jc lit1_cl1
|
|
||||||
; getbit
|
|
||||||
; __CL1TOP03__
|
|
||||||
jc lit2_cl1
|
|
||||||
; getbit
|
|
||||||
; __CL1TOP04__
|
|
||||||
jc lit3_cl1
|
|
||||||
add ecx, byte 2
|
|
||||||
; getbit
|
|
||||||
; __CL1TOP05__
|
|
||||||
jc lit45_cl1
|
|
||||||
inc ecx
|
|
||||||
; getbit
|
|
||||||
; __CL1TOP06__
|
|
||||||
jc lit67_cl1
|
|
||||||
jmpn widelit_cl1
|
|
||||||
lit67_cl1:
|
|
||||||
lit45_cl1:
|
|
||||||
; getbit
|
|
||||||
; __CL1TOP07__
|
|
||||||
adc ecx,ecx
|
|
||||||
litmov_cl1:
|
|
||||||
db 0xD1,((3<<6)|(5<<3)|1) ;shr ecx,1
|
|
||||||
jnc litmovb_cl1
|
|
||||||
movsb
|
|
||||||
litmovb_cl1:
|
|
||||||
db 0xD1,((3<<6)|(5<<3)|1) ;shr ecx,1
|
|
||||||
jnc litmovw_cl1
|
|
||||||
movsw
|
|
||||||
litmovw_cl1:
|
|
||||||
rep
|
|
||||||
movsd
|
|
||||||
lea eax,[1+ ecx] ; 1: the msb
|
|
||||||
jmps litdone_cl1
|
|
||||||
lit3_cl1:
|
|
||||||
movsb
|
|
||||||
lit2_cl1:
|
|
||||||
movsb
|
|
||||||
lit1_cl1:
|
|
||||||
movsb
|
|
||||||
litdone_cl1:
|
|
||||||
|
|
||||||
match_cl1: ; In: 0==ecx; 1==eax
|
|
||||||
|
|
||||||
offset_cl1: ; ss11 algorithm
|
|
||||||
; getbit
|
|
||||||
; __CL1OFF01__
|
|
||||||
adc eax,eax
|
|
||||||
; getbit
|
|
||||||
; __CL1OFF02__
|
|
||||||
jnc offset_cl1
|
|
||||||
sub eax, byte 3 ; 2.. ==> -1[prev], (0,,<<8)|byte
|
|
||||||
jc prev_off_cl1
|
|
||||||
shl eax,8
|
|
||||||
lodsb
|
|
||||||
xor eax, byte ~0
|
|
||||||
jz done_cl1 ; EOF
|
|
||||||
mov ebp,eax ; -offset
|
|
||||||
prev_off_cl1: ; 1st 2 bits encode (5<=len),2,3,4
|
|
||||||
; getbit
|
|
||||||
; __CL1OFF03__
|
|
||||||
adc ecx,ecx
|
|
||||||
; getbit
|
|
||||||
; __CL1OFF04__
|
|
||||||
adc ecx,ecx
|
|
||||||
jnz wrinkle_cl1
|
|
||||||
; __CL1LEN00__
|
|
||||||
inc ecx ; 1: the msb
|
|
||||||
mlen_cl1:
|
|
||||||
; getbit
|
|
||||||
; __CL1LEN01__
|
|
||||||
adc ecx,ecx
|
|
||||||
; getbit
|
|
||||||
; __CL1LEN02__
|
|
||||||
jnc mlen_cl1
|
|
||||||
add ecx, byte 2 ; 2.. ==> 4..
|
|
||||||
; __CL1COPY0__
|
|
||||||
wrinkle_cl1:
|
|
||||||
cmp ebp,-0xd00
|
|
||||||
adc ecx, byte 1
|
|
||||||
copy_cl1:
|
|
||||||
push esi
|
|
||||||
lea esi,[edi + ebp]
|
|
||||||
cmp ebp, byte -4
|
|
||||||
ja ripple_cl1
|
|
||||||
maxlit_cl1: ; literal copy cannot overlap; omit test for ripple
|
|
||||||
db 0xD1,((3<<6)|(5<<3)|1) ;shr ecx,1
|
|
||||||
jnc maxlitb_cl1
|
|
||||||
movsb
|
|
||||||
maxlitb_cl1:
|
|
||||||
db 0xD1,((3<<6)|(5<<3)|1) ;shr ecx,1
|
|
||||||
jnc maxlitw_cl1
|
|
||||||
movsw
|
|
||||||
maxlitw_cl1:
|
|
||||||
rep
|
|
||||||
movsd
|
|
||||||
popbot_cl1:
|
|
||||||
pop esi
|
|
||||||
bottom_cl1:
|
|
||||||
jmpn top_cl1
|
|
||||||
ripple_cl1:
|
|
||||||
cmp ebp, byte -1
|
|
||||||
jne ripmov_cl1
|
|
||||||
lodsb
|
|
||||||
rep
|
|
||||||
stosb
|
|
||||||
jmps popbot_cl1
|
|
||||||
ripmov_cl1:
|
|
||||||
rep
|
|
||||||
movsb
|
|
||||||
jmps popbot_cl1
|
|
||||||
done_cl1:
|
|
||||||
; __CL1END__
|
|
||||||
|
|
||||||
; vi:ts=8:et
|
|
||||||
|
|
||||||
@@ -1,166 +0,0 @@
|
|||||||
; lzma_d.ash -- 32-bit assembly
|
|
||||||
;
|
|
||||||
; This file is part of the UPX executable compressor.
|
|
||||||
;
|
|
||||||
; Copyright (C) 2006-2006 Markus Franz Xaver Johannes Oberhumer
|
|
||||||
; 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
|
|
||||||
; <markus@oberhumer.com>
|
|
||||||
; http://www.oberhumer.com/opensource/upx/
|
|
||||||
;
|
|
||||||
|
|
||||||
|
|
||||||
; ------------- DECOMPRESSION -------------
|
|
||||||
|
|
||||||
; Input:
|
|
||||||
; esi - source
|
|
||||||
; edi - dest
|
|
||||||
; cld
|
|
||||||
|
|
||||||
; Output:
|
|
||||||
; eax - 0
|
|
||||||
; ecx - 0
|
|
||||||
|
|
||||||
|
|
||||||
%ifndef jmps
|
|
||||||
%define jmps jmp short
|
|
||||||
%endif
|
|
||||||
%ifndef jmpn
|
|
||||||
%define jmpn jmp near
|
|
||||||
%endif
|
|
||||||
|
|
||||||
CPU 386
|
|
||||||
|
|
||||||
;
|
|
||||||
; init
|
|
||||||
; __LZMA_DEC00__
|
|
||||||
;
|
|
||||||
|
|
||||||
; ebx = alloca('UPXa');
|
|
||||||
|
|
||||||
mov ebp, esp ; save stack
|
|
||||||
|
|
||||||
lea ebx, [esp + 'UPXa']
|
|
||||||
xor eax, eax
|
|
||||||
.clearstack1:
|
|
||||||
push eax
|
|
||||||
cmp esp, ebx
|
|
||||||
jnz .clearstack1
|
|
||||||
|
|
||||||
|
|
||||||
inc esi ; skip 2 bytes for properties
|
|
||||||
inc esi
|
|
||||||
|
|
||||||
push ebx ; &outSizeProcessed
|
|
||||||
push 'UPXb' ; outSize
|
|
||||||
push edi ; out
|
|
||||||
add ebx, 4
|
|
||||||
push ebx ; &inSizeProcessed
|
|
||||||
push 'UPXc' ; inSize
|
|
||||||
push esi ; in
|
|
||||||
add ebx, 4
|
|
||||||
push ebx ; &CLzmaDecoderState
|
|
||||||
push eax ; dummy for call
|
|
||||||
|
|
||||||
; hardwired LzmaDecodeProperties()
|
|
||||||
mov dword [ebx], 'UPXd' ; lc, lp, pb, dummy
|
|
||||||
|
|
||||||
|
|
||||||
; __LZMA_ELF00__
|
|
||||||
;
|
|
||||||
LZMA_BASE_SIZE equ 1846
|
|
||||||
LZMA_LIT_SIZE equ 768
|
|
||||||
|
|
||||||
%ifndef O_OUTS ; ELF defines them, others do not care
|
|
||||||
%define O_OUTS 0
|
|
||||||
%define O_INS 0
|
|
||||||
%endif
|
|
||||||
|
|
||||||
mov ebp, esp ; save stack
|
|
||||||
mov edx,[O_INS + ebp] ; inSize
|
|
||||||
|
|
||||||
lodsb ; first byte, replaces LzmaDecodeProperties()
|
|
||||||
dec edx
|
|
||||||
mov cl,al ; cl= ((lit_context_bits + lit_pos_bits)<<3) | pos_bits
|
|
||||||
and al,7 ; al= pos_bits
|
|
||||||
shr cl,3 ; cl= lit_context_bits + lit_pos_bits
|
|
||||||
|
|
||||||
mov ebx, -LZMA_LIT_SIZE
|
|
||||||
shl ebx,cl
|
|
||||||
; /* inSizeProcessed, outSizeProcessed, *_bits, CLzmaDecoderState */
|
|
||||||
lea ebx,[-(2*4 +4) + 2*(-LZMA_BASE_SIZE + ebx) + esp]
|
|
||||||
and ebx, byte (~0<<5) ; 32-byte align
|
|
||||||
.elf_clearstack1:
|
|
||||||
push byte 0
|
|
||||||
cmp esp,ebx
|
|
||||||
jne .elf_clearstack1
|
|
||||||
|
|
||||||
push ebx ; &outSizeProcessed
|
|
||||||
add ebx, 4
|
|
||||||
mov ecx,[O_OUTS + ebp] ; &outSize
|
|
||||||
push dword [ecx] ; outSize
|
|
||||||
push edi ; out
|
|
||||||
push ebx ; &inSizeProcessed
|
|
||||||
add ebx, 4
|
|
||||||
|
|
||||||
mov [2+ ebx],al ; store pos_bits
|
|
||||||
lodsb ; second byte, replaces LzmaDecodeProperties()
|
|
||||||
dec edx
|
|
||||||
mov cl,al ; cl= (lit_pos_bits<<4) | lit_context_bits
|
|
||||||
and al,0xf
|
|
||||||
mov [ ebx],al ; store lit_context_bits
|
|
||||||
shr cl,4
|
|
||||||
mov [1+ ebx],cl ; store lit_pos_bits
|
|
||||||
|
|
||||||
push edx ; inSize -2
|
|
||||||
push esi ; in
|
|
||||||
push ebx ; &CLzmaDecoderState
|
|
||||||
push eax ; return address slot (dummy CALL)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; __LZMA_DEC10__
|
|
||||||
%include "arch/i386/lzma_d_cs.ash"
|
|
||||||
|
|
||||||
; __LZMA_DEC20__
|
|
||||||
%include "arch/i386/lzma_d_cf.ash"
|
|
||||||
|
|
||||||
|
|
||||||
;
|
|
||||||
; cleanup
|
|
||||||
; __LZMA_DEC30__
|
|
||||||
;
|
|
||||||
|
|
||||||
add esi, [ebx - 4] ; inSizeProcessed
|
|
||||||
add edi, [ebx - 8] ; outSizeProcessed
|
|
||||||
xor eax, eax
|
|
||||||
|
|
||||||
lea ecx, [esp - 256]
|
|
||||||
mov esp, ebp ; restore stack
|
|
||||||
.clearstack2:
|
|
||||||
push eax
|
|
||||||
cmp esp, ecx
|
|
||||||
jnz .clearstack2
|
|
||||||
|
|
||||||
mov esp, ebp ; restore stack
|
|
||||||
xor ecx, ecx
|
|
||||||
|
|
||||||
|
|
||||||
; vi:ts=8:et
|
|
||||||
|
|
||||||
@@ -1,169 +0,0 @@
|
|||||||
db 85, 87, 86, 83,131,236,124,139,148, 36,144, 0, 0, 0,199, 68 ; 0x0000
|
|
||||||
db 36,116, 0, 0, 0, 0,198, 68, 36,115, 0,139,172, 36,156, 0 ; 0x0010
|
|
||||||
db 0, 0,141, 66, 4,137, 68, 36,120,184, 1, 0, 0, 0, 15,182 ; 0x0020
|
|
||||||
db 74, 2,137,195,211,227,137,217, 73,137, 76, 36,108, 15,182, 74 ; 0x0030
|
|
||||||
db 1,211,224, 72,137, 68, 36,104,139,132, 36,168, 0, 0, 0, 15 ; 0x0040
|
|
||||||
db 182, 50,199, 69, 0, 0, 0, 0, 0,199, 68, 36, 96, 0, 0, 0 ; 0x0050
|
|
||||||
db 0,199, 0, 0, 0, 0, 0,184, 0, 3, 0, 0,137,116, 36,100 ; 0x0060
|
|
||||||
db 199, 68, 36, 92, 1, 0, 0, 0,199, 68, 36, 88, 1, 0, 0, 0 ; 0x0070
|
|
||||||
db 199, 68, 36, 84, 1, 0, 0, 0,199, 68, 36, 80, 1, 0, 0, 0 ; 0x0080
|
|
||||||
db 15,182, 74, 1, 1,241,211,224,141,136, 54, 7, 0, 0, 57, 76 ; 0x0090
|
|
||||||
db 36,116,115, 14,139, 68, 36,120,102,199, 0, 0, 4,131,192, 2 ; 0x00a0
|
|
||||||
db 226,246,139,156, 36,148, 0, 0, 0, 49,255,199, 68, 36, 72,255 ; 0x00b0
|
|
||||||
db 255,255,255,137,218, 3,148, 36,152, 0, 0, 0,137, 84, 36, 76 ; 0x00c0
|
|
||||||
db 49,210, 59, 92, 36, 76, 15,132,124, 9, 0, 0, 15,182, 3,193 ; 0x00d0
|
|
||||||
db 231, 8, 66, 67, 9,199,131,250, 4,126,231,139,140, 36,164, 0 ; 0x00e0
|
|
||||||
db 0, 0, 57, 76, 36,116, 15,131,100, 9, 0, 0,139,116, 36,116 ; 0x00f0
|
|
||||||
db 35,116, 36,108,139, 68, 36, 96,139, 84, 36,120,193,224, 4,137 ; 0x0100
|
|
||||||
db 116, 36, 68, 1,240,129,124, 36, 72,255,255,255, 0,141, 44, 66 ; 0x0110
|
|
||||||
db 119, 24, 59, 92, 36, 76, 15,132, 44, 9, 0, 0,193,100, 36, 72 ; 0x0120
|
|
||||||
db 8, 15,182, 3,193,231, 8, 67, 9,199,139, 68, 36, 72,102,139 ; 0x0130
|
|
||||||
db 85, 0,193,232, 11, 15,183,202, 15,175,193, 57,199, 15,131,221 ; 0x0140
|
|
||||||
db 1, 0, 0,137, 68, 36, 72,184, 0, 8, 0, 0, 41,200,138, 76 ; 0x0150
|
|
||||||
db 36,100,193,248, 5,190, 1, 0, 0, 0,141, 4, 2, 15,182, 84 ; 0x0160
|
|
||||||
db 36,115,102,137, 69, 0,139, 68, 36,116, 35, 68, 36,104,139,108 ; 0x0170
|
|
||||||
db 36,120,211,224,185, 8, 0, 0, 0, 43, 76, 36,100,211,250, 1 ; 0x0180
|
|
||||||
db 208,105,192, 0, 6, 0, 0,131,124, 36, 96, 6,141,132, 5,108 ; 0x0190
|
|
||||||
db 14, 0, 0,137, 68, 36, 20, 15,142,202, 0, 0, 0,139, 68, 36 ; 0x01a0
|
|
||||||
db 116, 43, 68, 36, 92,139,148, 36,160, 0, 0, 0, 15,182, 4, 2 ; 0x01b0
|
|
||||||
db 137, 68, 36, 64,209,100, 36, 64,139, 76, 36, 64,141, 20, 54,139 ; 0x01c0
|
|
||||||
db 108, 36, 20,129,225, 0, 1, 0, 0,129,124, 36, 72,255,255,255 ; 0x01d0
|
|
||||||
db 0,141, 68, 77, 0,137, 76, 36, 60,141, 44, 16,119, 24, 59, 92 ; 0x01e0
|
|
||||||
db 36, 76, 15,132, 96, 8, 0, 0,193,100, 36, 72, 8, 15,182, 3 ; 0x01f0
|
|
||||||
db 193,231, 8, 67, 9,199,139, 68, 36, 72,102,139,141, 0, 2, 0 ; 0x0200
|
|
||||||
db 0,193,232, 11, 15,183,241, 15,175,198, 57,199,115, 35,137, 68 ; 0x0210
|
|
||||||
db 36, 72,184, 0, 8, 0, 0, 41,240,137,214,193,248, 5,131,124 ; 0x0220
|
|
||||||
db 36, 60, 0,141, 4, 1,102,137,133, 0, 2, 0, 0,116, 34,235 ; 0x0230
|
|
||||||
db 46, 41, 68, 36, 72, 41,199,137,200,141,114, 1,102,193,232, 5 ; 0x0240
|
|
||||||
db 102, 41,193,131,124, 36, 60, 0,102,137,141, 0, 2, 0, 0,116 ; 0x0250
|
|
||||||
db 14,129,254,255, 0, 0, 0, 15,142, 87,255,255,255,235,121,129 ; 0x0260
|
|
||||||
db 254,255, 0, 0, 0,127,113,141, 20, 54,139,108, 36, 20, 1,213 ; 0x0270
|
|
||||||
db 129,124, 36, 72,255,255,255, 0,119, 24, 59, 92, 36, 76, 15,132 ; 0x0280
|
|
||||||
db 196, 7, 0, 0,193,100, 36, 72, 8, 15,182, 3,193,231, 8, 67 ; 0x0290
|
|
||||||
db 9,199,139, 68, 36, 72,102,139, 77, 0,193,232, 11, 15,183,241 ; 0x02a0
|
|
||||||
db 15,175,198, 57,199,115, 25,137, 68, 36, 72,184, 0, 8, 0, 0 ; 0x02b0
|
|
||||||
db 41,240,137,214,193,248, 5,141, 4, 1,102,137, 69, 0,235,159 ; 0x02c0
|
|
||||||
db 41, 68, 36, 72, 41,199,137,200,141,114, 1,102,193,232, 5,102 ; 0x02d0
|
|
||||||
db 41,193,102,137, 77, 0,235,135,139, 84, 36,116,137,240,139,140 ; 0x02e0
|
|
||||||
db 36,160, 0, 0, 0,136, 68, 36,115,136, 4, 10, 66,131,124, 36 ; 0x02f0
|
|
||||||
db 96, 3,137, 84, 36,116,127, 13,199, 68, 36, 96, 0, 0, 0, 0 ; 0x0300
|
|
||||||
db 233, 27, 7, 0, 0,131,124, 36, 96, 9,127, 10,131,108, 36, 96 ; 0x0310
|
|
||||||
db 3,233, 10, 7, 0, 0,131,108, 36, 96, 6,233, 0, 7, 0, 0 ; 0x0320
|
|
||||||
db 139, 76, 36, 72, 41,199,139,116, 36, 96, 41,193,137,208,102,193 ; 0x0330
|
|
||||||
db 232, 5,102, 41,194,129,249,255,255,255, 0,102,137, 85, 0,139 ; 0x0340
|
|
||||||
db 108, 36,120,141,116,117, 0,137,116, 36, 56,119, 22, 59, 92, 36 ; 0x0350
|
|
||||||
db 76, 15,132,241, 6, 0, 0, 15,182, 3,193,231, 8,193,225, 8 ; 0x0360
|
|
||||||
db 67, 9,199,139,108, 36, 56,137,200,193,232, 11,102,139,149,128 ; 0x0370
|
|
||||||
db 1, 0, 0, 15,183,234, 15,175,197, 57,199,115, 82,137,198,184 ; 0x0380
|
|
||||||
db 0, 8, 0, 0, 41,232,139,108, 36, 88,193,248, 5,139, 76, 36 ; 0x0390
|
|
||||||
db 84,141, 4, 2,139, 84, 36, 56,137, 76, 36, 80,139, 76, 36,120 ; 0x03a0
|
|
||||||
db 102,137,130,128, 1, 0, 0,139, 68, 36, 92,137,108, 36, 84,137 ; 0x03b0
|
|
||||||
db 68, 36, 88, 49,192,131,124, 36, 96, 6, 15,159,192,129,193,100 ; 0x03c0
|
|
||||||
db 6, 0, 0,141, 4, 64,137, 68, 36, 96,233,116, 2, 0, 0,137 ; 0x03d0
|
|
||||||
db 206, 41,199, 41,198,137,208,102,193,232, 5,139, 76, 36, 56,102 ; 0x03e0
|
|
||||||
db 41,194,129,254,255,255,255, 0,102,137,145,128, 1, 0, 0,119 ; 0x03f0
|
|
||||||
db 22, 59, 92, 36, 76, 15,132, 77, 6, 0, 0, 15,182, 3,193,231 ; 0x0400
|
|
||||||
db 8,193,230, 8, 67, 9,199,139,108, 36, 56,137,242,193,234, 11 ; 0x0410
|
|
||||||
db 102,139,141,152, 1, 0, 0, 15,183,193, 15,175,208, 57,215, 15 ; 0x0420
|
|
||||||
db 131,227, 0, 0, 0,189, 0, 8, 0, 0,137,214, 41,197,199, 68 ; 0x0430
|
|
||||||
db 36, 52, 0, 8, 0, 0,137,232,193,248, 5,141, 4, 1,139, 76 ; 0x0440
|
|
||||||
db 36, 56,102,137,129,152, 1, 0, 0,139, 68, 36, 96,139, 76, 36 ; 0x0450
|
|
||||||
db 68,193,224, 5, 3, 68, 36,120,129,250,255,255,255, 0,141, 44 ; 0x0460
|
|
||||||
db 72,119, 22, 59, 92, 36, 76, 15,132,219, 5, 0, 0, 15,182, 3 ; 0x0470
|
|
||||||
db 193,231, 8,193,230, 8, 67, 9,199,102,139,149,224, 1, 0, 0 ; 0x0480
|
|
||||||
db 137,240,193,232, 11, 15,183,202, 15,175,193, 57,199,115, 96, 41 ; 0x0490
|
|
||||||
db 76, 36, 52,193,124, 36, 52, 5,139,116, 36, 52,137, 68, 36, 72 ; 0x04a0
|
|
||||||
db 131,124, 36,116, 0,141, 4, 50,102,137,133,224, 1, 0, 0, 15 ; 0x04b0
|
|
||||||
db 132,147, 5, 0, 0, 49,192,131,124, 36, 96, 6,139,172, 36,160 ; 0x04c0
|
|
||||||
db 0, 0, 0,139, 84, 36,116, 15,159,192,141, 68, 0, 9,137, 68 ; 0x04d0
|
|
||||||
db 36, 96,139, 68, 36,116, 43, 68, 36, 92,138, 68, 5, 0,136, 68 ; 0x04e0
|
|
||||||
db 36,115,136, 4, 42, 66,137, 84, 36,116,233, 49, 5, 0, 0, 41 ; 0x04f0
|
|
||||||
db 198, 41,199,137,208,102,193,232, 5,102, 41,194,102,137,149,224 ; 0x0500
|
|
||||||
db 1, 0, 0,233, 31, 1, 0, 0,137,200, 41,214,102,193,232, 5 ; 0x0510
|
|
||||||
db 139,108, 36, 56,102, 41,193, 41,215,129,254,255,255,255, 0,102 ; 0x0520
|
|
||||||
db 137,141,152, 1, 0, 0,119, 22, 59, 92, 36, 76, 15,132, 22, 5 ; 0x0530
|
|
||||||
db 0, 0, 15,182, 3,193,231, 8,193,230, 8, 67, 9,199,139, 76 ; 0x0540
|
|
||||||
db 36, 56,137,240,193,232, 11,102,139,145,176, 1, 0, 0, 15,183 ; 0x0550
|
|
||||||
db 202, 15,175,193, 57,199,115, 35,137,198,184, 0, 8, 0, 0, 41 ; 0x0560
|
|
||||||
db 200,139,108, 36, 56,193,248, 5,141, 4, 2,102,137,133,176, 1 ; 0x0570
|
|
||||||
db 0, 0,139, 68, 36, 88,233,160, 0, 0, 0,137,241, 41,199, 41 ; 0x0580
|
|
||||||
db 193,137,208,102,193,232, 5,102, 41,194,139, 68, 36, 56,129,249 ; 0x0590
|
|
||||||
db 255,255,255, 0,102,137,144,176, 1, 0, 0,119, 22, 59, 92, 36 ; 0x05a0
|
|
||||||
db 76, 15,132,161, 4, 0, 0, 15,182, 3,193,231, 8,193,225, 8 ; 0x05b0
|
|
||||||
db 67, 9,199,139,116, 36, 56,137,200,193,232, 11,102,139,150,200 ; 0x05c0
|
|
||||||
db 1, 0, 0, 15,183,234, 15,175,197, 57,199,115, 32,137,198,184 ; 0x05d0
|
|
||||||
db 0, 8, 0, 0, 41,232,139,108, 36, 56,193,248, 5,141, 4, 2 ; 0x05e0
|
|
||||||
db 102,137,133,200, 1, 0, 0,139, 68, 36, 84,235, 38,137,206, 41 ; 0x05f0
|
|
||||||
db 199, 41,198,137,208,102,193,232, 5,102, 41,194,139, 68, 36, 56 ; 0x0600
|
|
||||||
db 102,137,144,200, 1, 0, 0,139, 84, 36, 84,139, 68, 36, 80,137 ; 0x0610
|
|
||||||
db 84, 36, 80,139, 76, 36, 88,137, 76, 36, 84,139,108, 36, 92,137 ; 0x0620
|
|
||||||
db 68, 36, 92,137,108, 36, 88, 49,192,131,124, 36, 96, 6,139, 76 ; 0x0630
|
|
||||||
db 36,120, 15,159,192,129,193,104, 10, 0, 0,141, 68, 64, 8,137 ; 0x0640
|
|
||||||
db 68, 36, 96,129,254,255,255,255, 0,119, 22, 59, 92, 36, 76, 15 ; 0x0650
|
|
||||||
db 132,243, 3, 0, 0, 15,182, 3,193,231, 8,193,230, 8, 67, 9 ; 0x0660
|
|
||||||
db 199,102,139, 17,137,240,193,232, 11, 15,183,234, 15,175,197, 57 ; 0x0670
|
|
||||||
db 199,115, 47,137, 68, 36, 72,184, 0, 8, 0, 0, 41,232,193,100 ; 0x0680
|
|
||||||
db 36, 68, 4,193,248, 5,199, 68, 36, 44, 0, 0, 0, 0,141, 4 ; 0x0690
|
|
||||||
db 2,102,137, 1,139, 68, 36, 68,141, 76, 1, 4,137, 76, 36, 16 ; 0x06a0
|
|
||||||
db 235,114, 41,198, 41,199,137,208,102,193,232, 5,102, 41,194,129 ; 0x06b0
|
|
||||||
db 254,255,255,255, 0,102,137, 17,119, 22, 59, 92, 36, 76, 15,132 ; 0x06c0
|
|
||||||
db 132, 3, 0, 0, 15,182, 3,193,231, 8,193,230, 8, 67, 9,199 ; 0x06d0
|
|
||||||
db 102,139, 81, 2,137,240,193,232, 11, 15,183,234, 15,175,197, 57 ; 0x06e0
|
|
||||||
db 199,115, 59,137, 68, 36, 72,184, 0, 8, 0, 0, 41,232,193,100 ; 0x06f0
|
|
||||||
db 36, 68, 4,193,248, 5,199, 68, 36, 44, 8, 0, 0, 0,141, 4 ; 0x0700
|
|
||||||
db 2,139, 84, 36, 68,102,137, 65, 2,141,140, 17, 4, 1, 0, 0 ; 0x0710
|
|
||||||
db 137, 76, 36, 16,199, 68, 36, 48, 3, 0, 0, 0,235, 47, 41,198 ; 0x0720
|
|
||||||
db 41,199,137,208,137,116, 36, 72,102,193,232, 5,199, 68, 36, 44 ; 0x0730
|
|
||||||
db 16, 0, 0, 0,102, 41,194,199, 68, 36, 48, 8, 0, 0, 0,102 ; 0x0740
|
|
||||||
db 137, 81, 2,129,193, 4, 2, 0, 0,137, 76, 36, 16,139, 76, 36 ; 0x0750
|
|
||||||
db 48,186, 1, 0, 0, 0,137, 76, 36, 40,141, 44, 18,139,116, 36 ; 0x0760
|
|
||||||
db 16, 1,238,129,124, 36, 72,255,255,255, 0,119, 24, 59, 92, 36 ; 0x0770
|
|
||||||
db 76, 15,132,209, 2, 0, 0,193,100, 36, 72, 8, 15,182, 3,193 ; 0x0780
|
|
||||||
db 231, 8, 67, 9,199,139, 68, 36, 72,102,139, 22,193,232, 11, 15 ; 0x0790
|
|
||||||
db 183,202, 15,175,193, 57,199,115, 24,137, 68, 36, 72,184, 0, 8 ; 0x07a0
|
|
||||||
db 0, 0, 41,200,193,248, 5,141, 4, 2,137,234,102,137, 6,235 ; 0x07b0
|
|
||||||
db 21, 41, 68, 36, 72, 41,199,137,208,102,193,232, 5,102, 41,194 ; 0x07c0
|
|
||||||
db 102,137, 22,141, 85, 1,139,116, 36, 40, 78,137,116, 36, 40,117 ; 0x07d0
|
|
||||||
db 137,138, 76, 36, 48,184, 1, 0, 0, 0,211,224, 41,194, 3, 84 ; 0x07e0
|
|
||||||
db 36, 44,131,124, 36, 96, 3,137, 84, 36, 12, 15,143,231, 1, 0 ; 0x07f0
|
|
||||||
db 0,131, 68, 36, 96, 7,131,250, 3,137,208,126, 5,184, 3, 0 ; 0x0800
|
|
||||||
db 0, 0,139,116, 36,120,193,224, 7,199, 68, 36, 36, 6, 0, 0 ; 0x0810
|
|
||||||
db 0,141,132, 6, 96, 3, 0, 0,137, 68, 36, 8,184, 1, 0, 0 ; 0x0820
|
|
||||||
db 0,141, 44, 0,139,116, 36, 8, 1,238,129,124, 36, 72,255,255 ; 0x0830
|
|
||||||
db 255, 0,119, 24, 59, 92, 36, 76, 15,132, 10, 2, 0, 0,193,100 ; 0x0840
|
|
||||||
db 36, 72, 8, 15,182, 3,193,231, 8, 67, 9,199,139, 68, 36, 72 ; 0x0850
|
|
||||||
db 102,139, 22,193,232, 11, 15,183,202, 15,175,193, 57,199,115, 24 ; 0x0860
|
|
||||||
db 137, 68, 36, 72,184, 0, 8, 0, 0, 41,200,193,248, 5,141, 4 ; 0x0870
|
|
||||||
db 2,102,137, 6,137,232,235, 21, 41, 68, 36, 72, 41,199,137,208 ; 0x0880
|
|
||||||
db 102,193,232, 5,102, 41,194,141, 69, 1,102,137, 22,139,108, 36 ; 0x0890
|
|
||||||
db 36, 77,137,108, 36, 36,117,137,141, 80,192,131,250, 3,137, 20 ; 0x08a0
|
|
||||||
db 36, 15,142, 39, 1, 0, 0,137,208,137,214,209,248,131,230, 1 ; 0x08b0
|
|
||||||
db 141, 72,255,131,206, 2,131,250, 13,137, 76, 36, 32,127, 28,139 ; 0x08c0
|
|
||||||
db 108, 36,120,211,230, 1,210,137, 52, 36,141, 68,117, 0, 41,208 ; 0x08d0
|
|
||||||
db 5, 94, 5, 0, 0,137, 68, 36, 4,235, 86,141, 80,251,129,124 ; 0x08e0
|
|
||||||
db 36, 72,255,255,255, 0,119, 24, 59, 92, 36, 76, 15,132, 86, 1 ; 0x08f0
|
|
||||||
db 0, 0,193,100, 36, 72, 8, 15,182, 3,193,231, 8, 67, 9,199 ; 0x0900
|
|
||||||
db 209,108, 36, 72, 1,246, 59,124, 36, 72,114, 7, 43,124, 36, 72 ; 0x0910
|
|
||||||
db 131,206, 1, 74,117,200,139, 68, 36,120,193,230, 4,137, 52, 36 ; 0x0920
|
|
||||||
db 5, 68, 6, 0, 0,199, 68, 36, 32, 4, 0, 0, 0,137, 68, 36 ; 0x0930
|
|
||||||
db 4,199, 68, 36, 28, 1, 0, 0, 0,184, 1, 0, 0, 0,139,108 ; 0x0940
|
|
||||||
db 36, 4, 1,192,137, 68, 36, 24, 1,197,129,124, 36, 72,255,255 ; 0x0950
|
|
||||||
db 255, 0,119, 24, 59, 92, 36, 76, 15,132,234, 0, 0, 0,193,100 ; 0x0960
|
|
||||||
db 36, 72, 8, 15,182, 3,193,231, 8, 67, 9,199,139, 68, 36, 72 ; 0x0970
|
|
||||||
db 102,139, 85, 0,193,232, 11, 15,183,242, 15,175,198, 57,199,115 ; 0x0980
|
|
||||||
db 27,137, 68, 36, 72,184, 0, 8, 0, 0, 41,240,193,248, 5,141 ; 0x0990
|
|
||||||
db 4, 2,102,137, 69, 0,139, 68, 36, 24,235, 31, 41, 68, 36, 72 ; 0x09a0
|
|
||||||
db 41,199,137,208,102,193,232, 5,102, 41,194,139, 68, 36, 24,102 ; 0x09b0
|
|
||||||
db 137, 85, 0,139, 84, 36, 28, 64, 9, 20, 36,139, 76, 36, 32,209 ; 0x09c0
|
|
||||||
db 100, 36, 28, 73,137, 76, 36, 32, 15,133,112,255,255,255,139, 52 ; 0x09d0
|
|
||||||
db 36, 70,137,116, 36, 92,116, 89,139, 76, 36, 12,139,108, 36,116 ; 0x09e0
|
|
||||||
db 131,193, 2, 57,108, 36, 92,119, 95,139,132, 36,160, 0, 0, 0 ; 0x09f0
|
|
||||||
db 137,234, 43, 68, 36, 92, 3,148, 36,160, 0, 0, 0,141, 52, 40 ; 0x0a00
|
|
||||||
db 138, 6, 70,136, 68, 36,115,136, 2, 66,255, 68, 36,116, 73,116 ; 0x0a10
|
|
||||||
db 15,139,172, 36,164, 0, 0, 0, 57,108, 36,116,114,226,235, 17 ; 0x0a20
|
|
||||||
db 139,132, 36,164, 0, 0, 0, 57, 68, 36,116, 15,130,187,246,255 ; 0x0a30
|
|
||||||
db 255,129,124, 36, 72,255,255,255, 0,119, 21, 59, 92, 36, 76,184 ; 0x0a40
|
|
||||||
db 1, 0, 0, 0,116, 41,235, 7,184, 1, 0, 0, 0,235, 32, 67 ; 0x0a50
|
|
||||||
db 43,156, 36,148, 0, 0, 0, 49,192,139,148, 36,156, 0, 0, 0 ; 0x0a60
|
|
||||||
db 139, 76, 36,116,137, 26,139,156, 36,168, 0, 0, 0,137, 11,131 ; 0x0a70
|
|
||||||
db 196,124, 91, 94, 95, 93 ; 0x0a80
|
|
||||||
@@ -1,169 +0,0 @@
|
|||||||
db 85, 87, 86, 83,131,236,124,139,148, 36,144, 0, 0, 0,199, 68 ; 0x0000
|
|
||||||
db 36,116, 0, 0, 0, 0,198, 68, 36,115, 0,139,172, 36,156, 0 ; 0x0010
|
|
||||||
db 0, 0,141, 66, 4,137, 68, 36,120,184, 1, 0, 0, 0, 15,182 ; 0x0020
|
|
||||||
db 74, 2,137,195,211,227,137,217, 73,137, 76, 36,108, 15,182, 74 ; 0x0030
|
|
||||||
db 1,211,224, 72,137, 68, 36,104,139,132, 36,168, 0, 0, 0, 15 ; 0x0040
|
|
||||||
db 182, 50,199, 69, 0, 0, 0, 0, 0,199, 68, 36, 96, 0, 0, 0 ; 0x0050
|
|
||||||
db 0,199, 0, 0, 0, 0, 0,184, 0, 3, 0, 0,137,116, 36,100 ; 0x0060
|
|
||||||
db 199, 68, 36, 92, 1, 0, 0, 0,199, 68, 36, 88, 1, 0, 0, 0 ; 0x0070
|
|
||||||
db 199, 68, 36, 84, 1, 0, 0, 0,199, 68, 36, 80, 1, 0, 0, 0 ; 0x0080
|
|
||||||
db 15,182, 74, 1, 1,241,211,224,141,136, 54, 7, 0, 0, 57, 76 ; 0x0090
|
|
||||||
db 36,116,115, 14,139, 68, 36,120,102,199, 0, 0, 4,131,192, 2 ; 0x00a0
|
|
||||||
db 226,246,139,156, 36,148, 0, 0, 0, 49,255,199, 68, 36, 72,255 ; 0x00b0
|
|
||||||
db 255,255,255,137,218, 3,148, 36,152, 0, 0, 0,137, 84, 36, 76 ; 0x00c0
|
|
||||||
db 49,210, 59, 92, 36, 76, 15,132,124, 9, 0, 0, 15,182, 3,193 ; 0x00d0
|
|
||||||
db 231, 8, 66, 67, 9,199,131,250, 4,126,231,139,140, 36,164, 0 ; 0x00e0
|
|
||||||
db 0, 0, 57, 76, 36,116, 15,131,100, 9, 0, 0,139,116, 36,116 ; 0x00f0
|
|
||||||
db 35,116, 36,108,139, 68, 36, 96,139, 84, 36,120,193,224, 4,137 ; 0x0100
|
|
||||||
db 116, 36, 68, 1,240,129,124, 36, 72,255,255,255, 0,141, 44, 66 ; 0x0110
|
|
||||||
db 119, 24, 59, 92, 36, 76, 15,132, 44, 9, 0, 0,193,100, 36, 72 ; 0x0120
|
|
||||||
db 8, 15,182, 3,193,231, 8, 67, 9,199,139, 68, 36, 72,102,139 ; 0x0130
|
|
||||||
db 85, 0,193,232, 11, 15,183,202, 15,175,193, 57,199, 15,131,221 ; 0x0140
|
|
||||||
db 1, 0, 0,137, 68, 36, 72,184, 0, 8, 0, 0, 41,200,138, 76 ; 0x0150
|
|
||||||
db 36,100,193,248, 5,190, 1, 0, 0, 0,141, 4, 2, 15,182, 84 ; 0x0160
|
|
||||||
db 36,115,102,137, 69, 0,139, 68, 36,116, 35, 68, 36,104,139,108 ; 0x0170
|
|
||||||
db 36,120,211,224,185, 8, 0, 0, 0, 43, 76, 36,100,211,250, 1 ; 0x0180
|
|
||||||
db 208,105,192, 0, 6, 0, 0,131,124, 36, 96, 6,141,132, 5,108 ; 0x0190
|
|
||||||
db 14, 0, 0,137, 68, 36, 20, 15,142,202, 0, 0, 0,139, 68, 36 ; 0x01a0
|
|
||||||
db 116, 43, 68, 36, 92,139,148, 36,160, 0, 0, 0, 15,182, 4, 2 ; 0x01b0
|
|
||||||
db 137, 68, 36, 64,209,100, 36, 64,139, 76, 36, 64,141, 20, 54,139 ; 0x01c0
|
|
||||||
db 108, 36, 20,129,225, 0, 1, 0, 0,129,124, 36, 72,255,255,255 ; 0x01d0
|
|
||||||
db 0,141, 68, 77, 0,137, 76, 36, 60,141, 44, 16,119, 24, 59, 92 ; 0x01e0
|
|
||||||
db 36, 76, 15,132, 96, 8, 0, 0,193,100, 36, 72, 8, 15,182, 3 ; 0x01f0
|
|
||||||
db 193,231, 8, 67, 9,199,139, 68, 36, 72,102,139,141, 0, 2, 0 ; 0x0200
|
|
||||||
db 0,193,232, 11, 15,183,241, 15,175,198, 57,199,115, 35,137, 68 ; 0x0210
|
|
||||||
db 36, 72,184, 0, 8, 0, 0, 41,240,137,214,193,248, 5,131,124 ; 0x0220
|
|
||||||
db 36, 60, 0,141, 4, 1,102,137,133, 0, 2, 0, 0,116, 34,235 ; 0x0230
|
|
||||||
db 46, 41, 68, 36, 72, 41,199,137,200,141,114, 1,102,193,232, 5 ; 0x0240
|
|
||||||
db 102, 41,193,131,124, 36, 60, 0,102,137,141, 0, 2, 0, 0,116 ; 0x0250
|
|
||||||
db 14,129,254,255, 0, 0, 0, 15,142, 87,255,255,255,235,121,129 ; 0x0260
|
|
||||||
db 254,255, 0, 0, 0,127,113,141, 20, 54,139,108, 36, 20, 1,213 ; 0x0270
|
|
||||||
db 129,124, 36, 72,255,255,255, 0,119, 24, 59, 92, 36, 76, 15,132 ; 0x0280
|
|
||||||
db 196, 7, 0, 0,193,100, 36, 72, 8, 15,182, 3,193,231, 8, 67 ; 0x0290
|
|
||||||
db 9,199,139, 68, 36, 72,102,139, 77, 0,193,232, 11, 15,183,241 ; 0x02a0
|
|
||||||
db 15,175,198, 57,199,115, 25,137, 68, 36, 72,184, 0, 8, 0, 0 ; 0x02b0
|
|
||||||
db 41,240,137,214,193,248, 5,141, 4, 1,102,137, 69, 0,235,159 ; 0x02c0
|
|
||||||
db 41, 68, 36, 72, 41,199,137,200,141,114, 1,102,193,232, 5,102 ; 0x02d0
|
|
||||||
db 41,193,102,137, 77, 0,235,135,139, 84, 36,116,137,240,139,140 ; 0x02e0
|
|
||||||
db 36,160, 0, 0, 0,136, 68, 36,115,136, 4, 10, 66,131,124, 36 ; 0x02f0
|
|
||||||
db 96, 3,137, 84, 36,116,127, 13,199, 68, 36, 96, 0, 0, 0, 0 ; 0x0300
|
|
||||||
db 233, 27, 7, 0, 0,131,124, 36, 96, 9,127, 10,131,108, 36, 96 ; 0x0310
|
|
||||||
db 3,233, 10, 7, 0, 0,131,108, 36, 96, 6,233, 0, 7, 0, 0 ; 0x0320
|
|
||||||
db 139, 76, 36, 72, 41,199,139,116, 36, 96, 41,193,137,208,102,193 ; 0x0330
|
|
||||||
db 232, 5,102, 41,194,129,249,255,255,255, 0,102,137, 85, 0,139 ; 0x0340
|
|
||||||
db 108, 36,120,141,116,117, 0,137,116, 36, 56,119, 22, 59, 92, 36 ; 0x0350
|
|
||||||
db 76, 15,132,241, 6, 0, 0, 15,182, 3,193,231, 8,193,225, 8 ; 0x0360
|
|
||||||
db 67, 9,199,139,108, 36, 56,137,200,193,232, 11,102,139,149,128 ; 0x0370
|
|
||||||
db 1, 0, 0, 15,183,234, 15,175,197, 57,199,115, 82,137,198,184 ; 0x0380
|
|
||||||
db 0, 8, 0, 0, 41,232,139,108, 36, 88,193,248, 5,139, 76, 36 ; 0x0390
|
|
||||||
db 84,141, 4, 2,139, 84, 36, 56,137, 76, 36, 80,139, 76, 36,120 ; 0x03a0
|
|
||||||
db 102,137,130,128, 1, 0, 0,139, 68, 36, 92,137,108, 36, 84,137 ; 0x03b0
|
|
||||||
db 68, 36, 88, 49,192,131,124, 36, 96, 6, 15,159,192,129,193,100 ; 0x03c0
|
|
||||||
db 6, 0, 0,141, 4, 64,137, 68, 36, 96,233,116, 2, 0, 0,137 ; 0x03d0
|
|
||||||
db 206, 41,199, 41,198,137,208,102,193,232, 5,139, 76, 36, 56,102 ; 0x03e0
|
|
||||||
db 41,194,129,254,255,255,255, 0,102,137,145,128, 1, 0, 0,119 ; 0x03f0
|
|
||||||
db 22, 59, 92, 36, 76, 15,132, 77, 6, 0, 0, 15,182, 3,193,231 ; 0x0400
|
|
||||||
db 8,193,230, 8, 67, 9,199,139,108, 36, 56,137,242,193,234, 11 ; 0x0410
|
|
||||||
db 102,139,141,152, 1, 0, 0, 15,183,193, 15,175,208, 57,215, 15 ; 0x0420
|
|
||||||
db 131,227, 0, 0, 0,189, 0, 8, 0, 0,137,214, 41,197,199, 68 ; 0x0430
|
|
||||||
db 36, 52, 0, 8, 0, 0,137,232,193,248, 5,141, 4, 1,139, 76 ; 0x0440
|
|
||||||
db 36, 56,102,137,129,152, 1, 0, 0,139, 68, 36, 96,139, 76, 36 ; 0x0450
|
|
||||||
db 68,193,224, 5, 3, 68, 36,120,129,250,255,255,255, 0,141, 44 ; 0x0460
|
|
||||||
db 72,119, 22, 59, 92, 36, 76, 15,132,219, 5, 0, 0, 15,182, 3 ; 0x0470
|
|
||||||
db 193,231, 8,193,230, 8, 67, 9,199,102,139,149,224, 1, 0, 0 ; 0x0480
|
|
||||||
db 137,240,193,232, 11, 15,183,202, 15,175,193, 57,199,115, 96, 41 ; 0x0490
|
|
||||||
db 76, 36, 52,193,124, 36, 52, 5,139,116, 36, 52,137, 68, 36, 72 ; 0x04a0
|
|
||||||
db 131,124, 36,116, 0,141, 4, 50,102,137,133,224, 1, 0, 0, 15 ; 0x04b0
|
|
||||||
db 132,147, 5, 0, 0, 49,192,131,124, 36, 96, 6,139,172, 36,160 ; 0x04c0
|
|
||||||
db 0, 0, 0,139, 84, 36,116, 15,159,192,141, 68, 0, 9,137, 68 ; 0x04d0
|
|
||||||
db 36, 96,139, 68, 36,116, 43, 68, 36, 92,138, 68, 5, 0,136, 68 ; 0x04e0
|
|
||||||
db 36,115,136, 4, 42, 66,137, 84, 36,116,233, 49, 5, 0, 0, 41 ; 0x04f0
|
|
||||||
db 198, 41,199,137,208,102,193,232, 5,102, 41,194,102,137,149,224 ; 0x0500
|
|
||||||
db 1, 0, 0,233, 31, 1, 0, 0,137,200, 41,214,102,193,232, 5 ; 0x0510
|
|
||||||
db 139,108, 36, 56,102, 41,193, 41,215,129,254,255,255,255, 0,102 ; 0x0520
|
|
||||||
db 137,141,152, 1, 0, 0,119, 22, 59, 92, 36, 76, 15,132, 22, 5 ; 0x0530
|
|
||||||
db 0, 0, 15,182, 3,193,231, 8,193,230, 8, 67, 9,199,139, 76 ; 0x0540
|
|
||||||
db 36, 56,137,240,193,232, 11,102,139,145,176, 1, 0, 0, 15,183 ; 0x0550
|
|
||||||
db 202, 15,175,193, 57,199,115, 35,137,198,184, 0, 8, 0, 0, 41 ; 0x0560
|
|
||||||
db 200,139,108, 36, 56,193,248, 5,141, 4, 2,102,137,133,176, 1 ; 0x0570
|
|
||||||
db 0, 0,139, 68, 36, 88,233,160, 0, 0, 0,137,241, 41,199, 41 ; 0x0580
|
|
||||||
db 193,137,208,102,193,232, 5,102, 41,194,139, 68, 36, 56,129,249 ; 0x0590
|
|
||||||
db 255,255,255, 0,102,137,144,176, 1, 0, 0,119, 22, 59, 92, 36 ; 0x05a0
|
|
||||||
db 76, 15,132,161, 4, 0, 0, 15,182, 3,193,231, 8,193,225, 8 ; 0x05b0
|
|
||||||
db 67, 9,199,139,116, 36, 56,137,200,193,232, 11,102,139,150,200 ; 0x05c0
|
|
||||||
db 1, 0, 0, 15,183,234, 15,175,197, 57,199,115, 32,137,198,184 ; 0x05d0
|
|
||||||
db 0, 8, 0, 0, 41,232,139,108, 36, 56,193,248, 5,141, 4, 2 ; 0x05e0
|
|
||||||
db 102,137,133,200, 1, 0, 0,139, 68, 36, 84,235, 38,137,206, 41 ; 0x05f0
|
|
||||||
db 199, 41,198,137,208,102,193,232, 5,102, 41,194,139, 68, 36, 56 ; 0x0600
|
|
||||||
db 102,137,144,200, 1, 0, 0,139, 84, 36, 84,139, 68, 36, 80,137 ; 0x0610
|
|
||||||
db 84, 36, 80,139, 76, 36, 88,137, 76, 36, 84,139,108, 36, 92,137 ; 0x0620
|
|
||||||
db 68, 36, 92,137,108, 36, 88, 49,192,131,124, 36, 96, 6,139, 76 ; 0x0630
|
|
||||||
db 36,120, 15,159,192,129,193,104, 10, 0, 0,141, 68, 64, 8,137 ; 0x0640
|
|
||||||
db 68, 36, 96,129,254,255,255,255, 0,119, 22, 59, 92, 36, 76, 15 ; 0x0650
|
|
||||||
db 132,243, 3, 0, 0, 15,182, 3,193,231, 8,193,230, 8, 67, 9 ; 0x0660
|
|
||||||
db 199,102,139, 17,137,240,193,232, 11, 15,183,234, 15,175,197, 57 ; 0x0670
|
|
||||||
db 199,115, 47,137, 68, 36, 72,184, 0, 8, 0, 0, 41,232,193,100 ; 0x0680
|
|
||||||
db 36, 68, 4,193,248, 5,199, 68, 36, 44, 0, 0, 0, 0,141, 4 ; 0x0690
|
|
||||||
db 2,102,137, 1,139, 68, 36, 68,141, 76, 1, 4,137, 76, 36, 16 ; 0x06a0
|
|
||||||
db 235,114, 41,198, 41,199,137,208,102,193,232, 5,102, 41,194,129 ; 0x06b0
|
|
||||||
db 254,255,255,255, 0,102,137, 17,119, 22, 59, 92, 36, 76, 15,132 ; 0x06c0
|
|
||||||
db 132, 3, 0, 0, 15,182, 3,193,231, 8,193,230, 8, 67, 9,199 ; 0x06d0
|
|
||||||
db 102,139, 81, 2,137,240,193,232, 11, 15,183,234, 15,175,197, 57 ; 0x06e0
|
|
||||||
db 199,115, 59,137, 68, 36, 72,184, 0, 8, 0, 0, 41,232,193,100 ; 0x06f0
|
|
||||||
db 36, 68, 4,193,248, 5,199, 68, 36, 44, 8, 0, 0, 0,141, 4 ; 0x0700
|
|
||||||
db 2,139, 84, 36, 68,102,137, 65, 2,141,140, 17, 4, 1, 0, 0 ; 0x0710
|
|
||||||
db 137, 76, 36, 16,199, 68, 36, 48, 3, 0, 0, 0,235, 47, 41,198 ; 0x0720
|
|
||||||
db 41,199,137,208,137,116, 36, 72,102,193,232, 5,199, 68, 36, 44 ; 0x0730
|
|
||||||
db 16, 0, 0, 0,102, 41,194,199, 68, 36, 48, 8, 0, 0, 0,102 ; 0x0740
|
|
||||||
db 137, 81, 2,129,193, 4, 2, 0, 0,137, 76, 36, 16,139, 76, 36 ; 0x0750
|
|
||||||
db 48,186, 1, 0, 0, 0,137, 76, 36, 40,141, 44, 18,139,116, 36 ; 0x0760
|
|
||||||
db 16, 1,238,129,124, 36, 72,255,255,255, 0,119, 24, 59, 92, 36 ; 0x0770
|
|
||||||
db 76, 15,132,209, 2, 0, 0,193,100, 36, 72, 8, 15,182, 3,193 ; 0x0780
|
|
||||||
db 231, 8, 67, 9,199,139, 68, 36, 72,102,139, 22,193,232, 11, 15 ; 0x0790
|
|
||||||
db 183,202, 15,175,193, 57,199,115, 24,137, 68, 36, 72,184, 0, 8 ; 0x07a0
|
|
||||||
db 0, 0, 41,200,193,248, 5,141, 4, 2,137,234,102,137, 6,235 ; 0x07b0
|
|
||||||
db 21, 41, 68, 36, 72, 41,199,137,208,102,193,232, 5,102, 41,194 ; 0x07c0
|
|
||||||
db 102,137, 22,141, 85, 1,139,116, 36, 40, 78,137,116, 36, 40,117 ; 0x07d0
|
|
||||||
db 137,138, 76, 36, 48,184, 1, 0, 0, 0,211,224, 41,194, 3, 84 ; 0x07e0
|
|
||||||
db 36, 44,131,124, 36, 96, 3,137, 84, 36, 12, 15,143,231, 1, 0 ; 0x07f0
|
|
||||||
db 0,131, 68, 36, 96, 7,131,250, 3,137,208,126, 5,184, 3, 0 ; 0x0800
|
|
||||||
db 0, 0,139,116, 36,120,193,224, 7,199, 68, 36, 36, 6, 0, 0 ; 0x0810
|
|
||||||
db 0,141,132, 6, 96, 3, 0, 0,137, 68, 36, 8,184, 1, 0, 0 ; 0x0820
|
|
||||||
db 0,141, 44, 0,139,116, 36, 8, 1,238,129,124, 36, 72,255,255 ; 0x0830
|
|
||||||
db 255, 0,119, 24, 59, 92, 36, 76, 15,132, 10, 2, 0, 0,193,100 ; 0x0840
|
|
||||||
db 36, 72, 8, 15,182, 3,193,231, 8, 67, 9,199,139, 68, 36, 72 ; 0x0850
|
|
||||||
db 102,139, 22,193,232, 11, 15,183,202, 15,175,193, 57,199,115, 24 ; 0x0860
|
|
||||||
db 137, 68, 36, 72,184, 0, 8, 0, 0, 41,200,193,248, 5,141, 4 ; 0x0870
|
|
||||||
db 2,102,137, 6,137,232,235, 21, 41, 68, 36, 72, 41,199,137,208 ; 0x0880
|
|
||||||
db 102,193,232, 5,102, 41,194,141, 69, 1,102,137, 22,139,108, 36 ; 0x0890
|
|
||||||
db 36, 77,137,108, 36, 36,117,137,141, 80,192,131,250, 3,137, 20 ; 0x08a0
|
|
||||||
db 36, 15,142, 39, 1, 0, 0,137,208,137,214,209,248,131,230, 1 ; 0x08b0
|
|
||||||
db 141, 72,255,131,206, 2,131,250, 13,137, 76, 36, 32,127, 28,139 ; 0x08c0
|
|
||||||
db 108, 36,120,211,230, 1,210,137, 52, 36,141, 68,117, 0, 41,208 ; 0x08d0
|
|
||||||
db 5, 94, 5, 0, 0,137, 68, 36, 4,235, 86,141, 80,251,129,124 ; 0x08e0
|
|
||||||
db 36, 72,255,255,255, 0,119, 24, 59, 92, 36, 76, 15,132, 86, 1 ; 0x08f0
|
|
||||||
db 0, 0,193,100, 36, 72, 8, 15,182, 3,193,231, 8, 67, 9,199 ; 0x0900
|
|
||||||
db 209,108, 36, 72, 1,246, 59,124, 36, 72,114, 7, 43,124, 36, 72 ; 0x0910
|
|
||||||
db 131,206, 1, 74,117,200,139, 68, 36,120,193,230, 4,137, 52, 36 ; 0x0920
|
|
||||||
db 5, 68, 6, 0, 0,199, 68, 36, 32, 4, 0, 0, 0,137, 68, 36 ; 0x0930
|
|
||||||
db 4,199, 68, 36, 28, 1, 0, 0, 0,184, 1, 0, 0, 0,139,108 ; 0x0940
|
|
||||||
db 36, 4, 1,192,137, 68, 36, 24, 1,197,129,124, 36, 72,255,255 ; 0x0950
|
|
||||||
db 255, 0,119, 24, 59, 92, 36, 76, 15,132,234, 0, 0, 0,193,100 ; 0x0960
|
|
||||||
db 36, 72, 8, 15,182, 3,193,231, 8, 67, 9,199,139, 68, 36, 72 ; 0x0970
|
|
||||||
db 102,139, 85, 0,193,232, 11, 15,183,242, 15,175,198, 57,199,115 ; 0x0980
|
|
||||||
db 27,137, 68, 36, 72,184, 0, 8, 0, 0, 41,240,193,248, 5,141 ; 0x0990
|
|
||||||
db 4, 2,102,137, 69, 0,139, 68, 36, 24,235, 31, 41, 68, 36, 72 ; 0x09a0
|
|
||||||
db 41,199,137,208,102,193,232, 5,102, 41,194,139, 68, 36, 24,102 ; 0x09b0
|
|
||||||
db 137, 85, 0,139, 84, 36, 28, 64, 9, 20, 36,139, 76, 36, 32,209 ; 0x09c0
|
|
||||||
db 100, 36, 28, 73,137, 76, 36, 32, 15,133,112,255,255,255,139, 52 ; 0x09d0
|
|
||||||
db 36, 70,137,116, 36, 92,116, 89,139, 76, 36, 12,139,108, 36,116 ; 0x09e0
|
|
||||||
db 131,193, 2, 57,108, 36, 92,119, 95,139,132, 36,160, 0, 0, 0 ; 0x09f0
|
|
||||||
db 137,234, 43, 68, 36, 92, 3,148, 36,160, 0, 0, 0,141, 52, 40 ; 0x0a00
|
|
||||||
db 138, 6, 70,136, 68, 36,115,136, 2, 66,255, 68, 36,116, 73,116 ; 0x0a10
|
|
||||||
db 15,139,172, 36,164, 0, 0, 0, 57,108, 36,116,114,226,235, 17 ; 0x0a20
|
|
||||||
db 139,132, 36,164, 0, 0, 0, 57, 68, 36,116, 15,130,187,246,255 ; 0x0a30
|
|
||||||
db 255,129,124, 36, 72,255,255,255, 0,119, 21, 59, 92, 36, 76,184 ; 0x0a40
|
|
||||||
db 1, 0, 0, 0,116, 41,235, 7,184, 1, 0, 0, 0,235, 32, 67 ; 0x0a50
|
|
||||||
db 43,156, 36,148, 0, 0, 0, 49,192,139,148, 36,156, 0, 0, 0 ; 0x0a60
|
|
||||||
db 139, 76, 36,116,137, 26,139,156, 36,168, 0, 0, 0,137, 11,131 ; 0x0a70
|
|
||||||
db 196,124, 91, 94, 95, 93 ; 0x0a80
|
|
||||||
@@ -1,520 +0,0 @@
|
|||||||
; macros.ash --
|
|
||||||
;
|
|
||||||
; This file is part of the UPX executable compressor.
|
|
||||||
;
|
|
||||||
; Copyright (C) 1996-2006 Markus Franz Xaver Johannes Oberhumer
|
|
||||||
; Copyright (C) 1996-2006 Laszlo Molnar
|
|
||||||
; All Rights Reserved.
|
|
||||||
;
|
|
||||||
; UPX and the UCL library are free software; you can redistribute them
|
|
||||||
; and/or modify them under the terms of the GNU General Public License as
|
|
||||||
; published by the Free Software Foundation; either version 2 of
|
|
||||||
; the License, or (at your option) any later version.
|
|
||||||
;
|
|
||||||
; This program is distributed in the hope that it will be useful,
|
|
||||||
; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
; GNU General Public License for more details.
|
|
||||||
;
|
|
||||||
; You should have received a copy of the GNU General Public License
|
|
||||||
; along with this program; see the file COPYING.
|
|
||||||
; If not, write to the Free Software Foundation, Inc.,
|
|
||||||
; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
;
|
|
||||||
; Markus F.X.J. Oberhumer Laszlo Molnar
|
|
||||||
; <mfx@users.sourceforge.net> <ml1050@users.sourceforge.net>
|
|
||||||
;
|
|
||||||
|
|
||||||
|
|
||||||
;; =============
|
|
||||||
;; ============= 32-BIT CALLTRICK & JUMPTRICK
|
|
||||||
;; =============
|
|
||||||
|
|
||||||
;; call & jump trick : 2 in 1
|
|
||||||
%macro cjt32 1
|
|
||||||
%ifdef __CALLTR00__
|
|
||||||
mov ecx, 'TEXL'
|
|
||||||
calltrickloop:
|
|
||||||
mov al, [edi]
|
|
||||||
inc edi
|
|
||||||
sub al, 0xE8
|
|
||||||
ct1:
|
|
||||||
cmp al, 1
|
|
||||||
ja calltrickloop
|
|
||||||
%ifdef __CTCLEVE1__
|
|
||||||
cmp byte [edi], '?'
|
|
||||||
jnz calltrickloop
|
|
||||||
%endif; __CALLTR01__
|
|
||||||
mov eax, [edi]
|
|
||||||
mov bl, [edi + 4]
|
|
||||||
%ifdef __CTDUMMY1__
|
|
||||||
%ifdef __CTBSHR01__
|
|
||||||
shr ax, 8
|
|
||||||
%else; __CTBROR01__
|
|
||||||
xchg al, ah
|
|
||||||
%endif; __CTBSWA01__
|
|
||||||
rol eax, 16
|
|
||||||
xchg al, ah
|
|
||||||
%endif; __CALLTR02__
|
|
||||||
sub eax, edi
|
|
||||||
sub bl, 0xE8
|
|
||||||
%ifnidn %1,0
|
|
||||||
add eax, %1
|
|
||||||
%endif
|
|
||||||
mov [edi], eax
|
|
||||||
add edi, byte 5
|
|
||||||
mov al, bl
|
|
||||||
loop ct1
|
|
||||||
%else; __CALLTR10__
|
|
||||||
;; 32-bit call XOR jump trick
|
|
||||||
mov ecx, 'TEXL'
|
|
||||||
ctloop1:
|
|
||||||
%ifdef __CALLTRE8__
|
|
||||||
mov al,0xE8
|
|
||||||
%else; __CALLTRE9__
|
|
||||||
mov al,0xE9
|
|
||||||
%endif; __CALLTR11__
|
|
||||||
ctloop2:
|
|
||||||
repnz
|
|
||||||
scasb
|
|
||||||
jnz ctend
|
|
||||||
%ifdef __CTCLEVE2__
|
|
||||||
cmp byte [edi], '?'
|
|
||||||
jnz ctloop2
|
|
||||||
%endif; __CALLTR12__
|
|
||||||
mov eax, [edi]
|
|
||||||
%ifdef __CTDUMMY2__
|
|
||||||
%ifdef __CTBSHR11__
|
|
||||||
shr ax, 8
|
|
||||||
%else; __CTBROR11__
|
|
||||||
xchg al, ah
|
|
||||||
%endif; __CTBSWA11__
|
|
||||||
rol eax, 16
|
|
||||||
xchg al, ah
|
|
||||||
%endif; __CALLTR13__
|
|
||||||
sub eax, edi
|
|
||||||
%ifnidn %1,0
|
|
||||||
add eax, %1
|
|
||||||
%endif
|
|
||||||
stosd
|
|
||||||
jmps ctloop1
|
|
||||||
ctend:
|
|
||||||
%endif; __CTTHEEND__
|
|
||||||
%endmacro
|
|
||||||
|
|
||||||
|
|
||||||
;; call/jump/jcc trick; also used more than once (and/or optionally), so
|
|
||||||
;; ecx has byte count (not count of applied instances), and
|
|
||||||
;; edi points to buffer.
|
|
||||||
%macro ckt32 2
|
|
||||||
; 1st param: effective addvalue (typically 0 or edi; any rvalue)
|
|
||||||
; 2nd param: where is cto8 (dl, bl, or literal)
|
|
||||||
|
|
||||||
;__CKLLTR00__
|
|
||||||
%ifnidn %1,0
|
|
||||||
mov esi, %1
|
|
||||||
%endif
|
|
||||||
jmps ckstart
|
|
||||||
ckloop3:
|
|
||||||
mov al, [edi]
|
|
||||||
add edi, byte 1
|
|
||||||
;__CKLLTR10__ Jcc only
|
|
||||||
cmp al, 0x80 ; lo of 6-byte Jcc
|
|
||||||
jb ckloop2
|
|
||||||
cmp al, 0x8f ; hi of 6-byte Jcc
|
|
||||||
ja ckloop2
|
|
||||||
cmp byte [edi -2], 0x0F ; prefix of 6-byte Jcc
|
|
||||||
je ckmark
|
|
||||||
ckloop2:
|
|
||||||
;__CKLLTR20__
|
|
||||||
sub al, 0xE8
|
|
||||||
cmp al, 0xE9 - 0xE8
|
|
||||||
ja ckcount
|
|
||||||
ckmark:
|
|
||||||
cmp byte [edi], %2 ; cto8
|
|
||||||
jnz ckcount
|
|
||||||
mov eax, [edi]
|
|
||||||
|
|
||||||
shr ax, 8
|
|
||||||
rol eax, 16
|
|
||||||
xchg al, ah
|
|
||||||
; above 3 instr are equivalent to the following 2 instr:
|
|
||||||
; mov al, 0 ; clear cto8 [setup partial-write stall]
|
|
||||||
; bswap eax ; not on 386: need 486 and up
|
|
||||||
|
|
||||||
sub eax, edi
|
|
||||||
%ifnidn %1,0
|
|
||||||
add eax, esi
|
|
||||||
%endif
|
|
||||||
mov [edi], eax
|
|
||||||
add edi, byte 4
|
|
||||||
ckstart:
|
|
||||||
sub ecx, byte 4
|
|
||||||
;__CKLLTR30__ Jcc only
|
|
||||||
mov al, [edi]
|
|
||||||
add edi, byte 1
|
|
||||||
loop ckloop2 ; prefix cannot overlap previous displacement
|
|
||||||
;__CKLLTR40__
|
|
||||||
ckcount:
|
|
||||||
sub ecx, byte 1
|
|
||||||
jg ckloop3
|
|
||||||
ckend:
|
|
||||||
%endmacro
|
|
||||||
|
|
||||||
;; =============
|
|
||||||
;; ============= 32-BIT RELOCATIONS
|
|
||||||
;; =============
|
|
||||||
|
|
||||||
%macro reloc32 3
|
|
||||||
; __RELOC320__
|
|
||||||
reloc_main:
|
|
||||||
xor eax, eax
|
|
||||||
mov al, [%1]
|
|
||||||
inc %1
|
|
||||||
or eax, eax
|
|
||||||
jz reloc_endx
|
|
||||||
cmp al, 0xEF
|
|
||||||
ja reloc_fx
|
|
||||||
reloc_add:
|
|
||||||
add %2, eax
|
|
||||||
%if 1
|
|
||||||
mov eax, [%2]
|
|
||||||
xchg al, ah
|
|
||||||
rol eax, 16
|
|
||||||
xchg al, ah
|
|
||||||
add eax, %3
|
|
||||||
mov [%2], eax
|
|
||||||
%else
|
|
||||||
add [%2], %3
|
|
||||||
%endif
|
|
||||||
jmps reloc_main
|
|
||||||
reloc_fx:
|
|
||||||
and al, 0x0F
|
|
||||||
shl eax, 16
|
|
||||||
mov ax, [%1]
|
|
||||||
add %1, byte 2
|
|
||||||
%ifdef __REL32BIG__
|
|
||||||
or eax, eax
|
|
||||||
jnz reloc_add
|
|
||||||
mov eax, [%1]
|
|
||||||
add %1, byte 4
|
|
||||||
%endif; __RELOC32J__
|
|
||||||
jmps reloc_add
|
|
||||||
reloc_endx:
|
|
||||||
; __REL32END__
|
|
||||||
%endmacro
|
|
||||||
|
|
||||||
|
|
||||||
;; =============
|
|
||||||
;; ============= 32-BIT CALL TRICK UNFILTER WITH MostRecentlyUsed BUFFER
|
|
||||||
;; =============
|
|
||||||
|
|
||||||
;;;; names of pseudo-sections for addLoader:
|
|
||||||
;; LXUNFnnn Linux unfilter
|
|
||||||
;; LXMRUnnn MostRecentlyUsed recoding of destinations
|
|
||||||
;; MRUARBnn arbitrary number of entries in wheel
|
|
||||||
;; MRUBITSn power of 2 entries in wheel (smaller code)
|
|
||||||
;; MRUBYTEn 256 entries in wheel (smallest code)
|
|
||||||
|
|
||||||
%macro ctojr32 0
|
|
||||||
%push ctojr32
|
|
||||||
|
|
||||||
;; I got confused by the syntactic sugar of the fake %ifdefs.
|
|
||||||
;; I can read the section name more easily when it is at the left margin.
|
|
||||||
;; Also, some of the logic to select the sections is not that simple,
|
|
||||||
;; and any mismatch between the logic and the %ifdefs is very confusing.
|
|
||||||
;; Instead, I use comments after the section name, and blank lines for grouping.
|
|
||||||
|
|
||||||
;__LXUNF000__ enter at +0 for decompression; +2 for unfiltering
|
|
||||||
jmps decompr0
|
|
||||||
;__LXUNF002__
|
|
||||||
;; 2+ address of decompress subroutine
|
|
||||||
;; unfilter(upx_byte *, length, cto8)
|
|
||||||
lxunfilter:
|
|
||||||
pop edx ; return address
|
|
||||||
pop eax ; upx_byte *, same as addvalue
|
|
||||||
pop ecx ; length
|
|
||||||
xchg eax, edi ; edi= pointer; eax= saved_edi
|
|
||||||
pusha ; save C-convention ebx, ebp, esi, edi; also eax, edx
|
|
||||||
|
|
||||||
; at most one of the next 2
|
|
||||||
;__MRUBYTE0__ 256==n_mru
|
|
||||||
xor ebx, ebx ; zero
|
|
||||||
;__LXMRU005__ 0!=n_mru
|
|
||||||
mov ebx, 'NMRU' ; modified N_MRU or N_MRU -1
|
|
||||||
|
|
||||||
;__LXMRU006__ 0!=n_mru
|
|
||||||
push byte 0x0f ; prefix of 6-byte Jcc <d32>
|
|
||||||
pop eax
|
|
||||||
mov ah, [esp + 8*4] ; cto8
|
|
||||||
;__LXMRU007__ 0==n_mru
|
|
||||||
push byte 0x0f ; prefix of 6-byte Jcc <d32>
|
|
||||||
pop ebx
|
|
||||||
mov bh, [esp + 8*4] ; cto8
|
|
||||||
|
|
||||||
;__LXUNF008__
|
|
||||||
mov dl, [esp + 8*4] ; cto8
|
|
||||||
|
|
||||||
;__LXUNF010__
|
|
||||||
jmpn lxunf0
|
|
||||||
decompr0:
|
|
||||||
|
|
||||||
;; These %define are only if 0!=n_mru;
|
|
||||||
;; else 0x0F==bl && cto8==bh==dh && 0xE8==dl && addvalue==esi .
|
|
||||||
%define %$n_mru [esi]
|
|
||||||
%define %$n_mru1 [esi]
|
|
||||||
%define %$tail [esi + 4*1]
|
|
||||||
%define %$cto8_e8e9 [esi + 4*2]
|
|
||||||
%define %$cto8_0f [esi + 4*3]
|
|
||||||
%define %$addvalue [esi + 4*4]
|
|
||||||
%define %$tmp ebp
|
|
||||||
%define %$hand ebx
|
|
||||||
%define %$hand_l bl
|
|
||||||
%define %$kh edx
|
|
||||||
%define %$kh_l dl
|
|
||||||
|
|
||||||
;__LXJCC010__
|
|
||||||
lxunf2: ; have seen 0x80..0x8f of possible recoded 6-byte Jcc <d32>
|
|
||||||
movzx ebp, word [edi] ; 2 bytes, zero-extended
|
|
||||||
|
|
||||||
;__LXMRU045__ 0!=n_mru
|
|
||||||
sub ebp, %$cto8_0f
|
|
||||||
;__LXMRU046__ 0==n_mru
|
|
||||||
sub ebp, ebx
|
|
||||||
|
|
||||||
;__LXJCC020__ 0==n_mru, or Jcc excluded ('sub' of equals clears Carry)
|
|
||||||
jne unfcount
|
|
||||||
;__LXJCC021__ 0!=n_mru and Jcc participates; must set Carry
|
|
||||||
sub ebp, byte 1 ; set Carry iff in range
|
|
||||||
jnb unfcount
|
|
||||||
|
|
||||||
;__LXJCC023__ found Jcc; re-swap 0x8Y opcode and 0x0f prefix
|
|
||||||
mov byte [edi -1], bl ; 0x0f prefix
|
|
||||||
dec ecx ; preserve Carry
|
|
||||||
mov byte [edi], al ; Jcc opcode
|
|
||||||
inc edi ; preserve Carry
|
|
||||||
|
|
||||||
;__LXUNF037__
|
|
||||||
%define %$jc eax
|
|
||||||
|
|
||||||
lxunf: ; in: Carry set iff we should apply mru and 0!=n_mru
|
|
||||||
mov eax, [edi] ; BE32 displacement with cto8 in low 8 bits
|
|
||||||
|
|
||||||
;__LXUNF386__ 0!=n_mru && 386
|
|
||||||
pushf
|
|
||||||
;__LXUNF387__ ==386
|
|
||||||
shr ax, 8
|
|
||||||
rol eax, 16
|
|
||||||
xchg al, ah
|
|
||||||
;__LXUNF388__ 0!=n_mru && 386
|
|
||||||
popf
|
|
||||||
jnc unf_store ; do not apply mru
|
|
||||||
|
|
||||||
;__LXUNF486__ >=486
|
|
||||||
mov al, byte 0
|
|
||||||
CPU 486
|
|
||||||
bswap eax ; preserve Carry (2-byte instruction)
|
|
||||||
CPU 386
|
|
||||||
;__LXUNF487__ 0!=n_mru && >=486
|
|
||||||
jnc unf_store ; do not apply mru
|
|
||||||
|
|
||||||
;__LXMRU065__ 0!=n_mru
|
|
||||||
shr %$jc, 1 ; eax= jc, or mru index
|
|
||||||
jnc mru4 ; not 1st time for this jc
|
|
||||||
;__MRUBYTE3__
|
|
||||||
dec %$hand_l
|
|
||||||
;__MRUARB30__
|
|
||||||
dec %$hand
|
|
||||||
;__MRUBITS3__
|
|
||||||
and %$hand, %$n_mru1
|
|
||||||
;__MRUARB40__
|
|
||||||
jge mru3
|
|
||||||
add %$hand, %$n_mru
|
|
||||||
mru3:
|
|
||||||
;__LXMRU070__
|
|
||||||
|
|
||||||
mov [esp + 4*%$hand], %$jc ; 1st time: mru[hand] = jc
|
|
||||||
jmps unf_store
|
|
||||||
|
|
||||||
mru4: ; not 1st time for this jc
|
|
||||||
lea %$kh, [%$jc + %$hand] ; kh = jc + hand
|
|
||||||
;__MRUBYTE4__
|
|
||||||
movzx %$kh, %$kh_l
|
|
||||||
;__MRUBITS4__
|
|
||||||
and %$kh, %$n_mru1
|
|
||||||
;__MRUARB50__
|
|
||||||
cmp %$kh, %$n_mru
|
|
||||||
jb mru5
|
|
||||||
sub %$kh, %$n_mru
|
|
||||||
mru5:
|
|
||||||
;__LXMRU080__
|
|
||||||
mov %$jc, [esp + 4*%$kh] ; jc = mru[kh]
|
|
||||||
;__MRUBYTE5__
|
|
||||||
dec %$hand_l
|
|
||||||
;__MRUARB60__
|
|
||||||
dec %$hand
|
|
||||||
;__MRUBITS5__
|
|
||||||
and %$hand, %$n_mru1
|
|
||||||
;__MRUARB70__
|
|
||||||
jge mru6
|
|
||||||
add %$hand, %$n_mru
|
|
||||||
mru6:
|
|
||||||
;__LXMRU090__
|
|
||||||
|
|
||||||
mov %$tmp, [esp + 4*%$hand] ; tmp = mru[hand]
|
|
||||||
test %$tmp,%$tmp
|
|
||||||
jnz mru8
|
|
||||||
|
|
||||||
push %$jc ; ran out of registers
|
|
||||||
mov eax, %$tail
|
|
||||||
|
|
||||||
;__MRUBYTE6__
|
|
||||||
dec al
|
|
||||||
;__MRUARB80__
|
|
||||||
dec eax
|
|
||||||
;__MRUBITS6__
|
|
||||||
and eax, %$n_mru1
|
|
||||||
;__MRUARB90__
|
|
||||||
jge mru7
|
|
||||||
add eax, %$n_mru
|
|
||||||
mru7:
|
|
||||||
;__LXMRU100__
|
|
||||||
|
|
||||||
xor %$tmp,%$tmp
|
|
||||||
mov %$tail, eax
|
|
||||||
xchg [4+ esp + 4*eax], %$tmp ; tmp = mru[tail]; mru[tail] = 0
|
|
||||||
pop %$jc
|
|
||||||
mru8:
|
|
||||||
mov [esp + 4*%$kh ], %$tmp ; mru[kh] = tmp
|
|
||||||
mov [esp + 4*%$hand], %$jc ; mru[hand] = jc
|
|
||||||
;__LXUNF040__
|
|
||||||
unf_store:
|
|
||||||
sub eax, edi
|
|
||||||
sub ecx, byte 4
|
|
||||||
|
|
||||||
; one of the next2
|
|
||||||
;__LXMRU110__ 0!=n_mru
|
|
||||||
add eax, %$addvalue
|
|
||||||
;__LXMRU111__ 0==n_mru
|
|
||||||
add eax, esi ; addvalue (same as initial pointer)
|
|
||||||
|
|
||||||
;__LXUNF041__
|
|
||||||
mov [edi], eax
|
|
||||||
add edi, byte 4
|
|
||||||
jmps unfcount
|
|
||||||
;__LXUNF042__
|
|
||||||
lxunf0: ;; continuation of entry prolog for unfilter
|
|
||||||
;__LEXEC016__ bug in APP: jmp and label must be in same .asx/.asy
|
|
||||||
jmp lxunf0 ; this instr does not really go here!
|
|
||||||
|
|
||||||
;__LXMRU010__ 0!=n_mru
|
|
||||||
push eax ; cto8_0f
|
|
||||||
;__LXJMPA00__ only JMP, and not CALL, is filtered
|
|
||||||
mov al, 0xE9
|
|
||||||
;__LXCALLB0__ only CALL, or both CALL and JMP are filtered
|
|
||||||
mov al, 0xE8
|
|
||||||
;__LXUNF021__ common tail
|
|
||||||
push eax ; cto8_e8e9
|
|
||||||
push byte 0 ; tail
|
|
||||||
push ebx ; n_mru or n_mru1
|
|
||||||
mov esi, esp ; flat model "[esi]" saves a byte over "[ebp]"
|
|
||||||
|
|
||||||
;__LXMRU022__ 0==n_mru
|
|
||||||
pop esi ; addvalue
|
|
||||||
mov edx, ebx ; dh= cto8
|
|
||||||
;__LXJMPA01__ only JMP, and not CALL, is filtered
|
|
||||||
mov dl, 0xE9
|
|
||||||
;__LXCALLB1__ only CALL, or both CALL and JMP are filtered
|
|
||||||
mov dl, 0xE8
|
|
||||||
|
|
||||||
|
|
||||||
;__MRUBITS1__
|
|
||||||
inc %$hand ; n_mru1 ==> n_mru
|
|
||||||
;__LXMRU030__
|
|
||||||
lxunf1: ; allocate and clear mru[]
|
|
||||||
push byte 0
|
|
||||||
|
|
||||||
; one of the next 2, if n_mru
|
|
||||||
;__MRUBYTE1__
|
|
||||||
dec %$hand_l
|
|
||||||
;__MRUARB10__
|
|
||||||
dec %$hand
|
|
||||||
|
|
||||||
;__LXMRU040__ 0!=n_mru
|
|
||||||
jnz lxunf1 ; leaves 0=='hand'
|
|
||||||
|
|
||||||
;__LXUNF030__
|
|
||||||
lxctloop:
|
|
||||||
movzx eax, word [edi] ; 2 bytes, zero extended
|
|
||||||
add edi, byte 1
|
|
||||||
;__LXJCC000__
|
|
||||||
cmp al, 0x80 ; lo of Jcc <d32>
|
|
||||||
jb lxct1
|
|
||||||
cmp al, 0x8f ; hi of Jcc <d32>
|
|
||||||
jbe lxunf2
|
|
||||||
lxct1:
|
|
||||||
|
|
||||||
;__LXCJ0MRU__ 0==n_mru
|
|
||||||
sub eax, edx
|
|
||||||
;__LXCJ1MRU__ 0!=n_mru
|
|
||||||
sub eax, %$cto8_e8e9
|
|
||||||
|
|
||||||
; both CALL and JMP are filtered
|
|
||||||
;__LXCALJMP__
|
|
||||||
sub eax, byte 1+ (0xE9 - 0xE8) ; set Carry iff in range (result: -2, -1)
|
|
||||||
|
|
||||||
; only CALL, or only JMP, is filtered
|
|
||||||
;__LXCALL00__ 0==n_mru
|
|
||||||
je lxunf
|
|
||||||
;__LXCALL01__ 0!=n_rmu
|
|
||||||
sub eax, byte 1 ; set Carry iff in range
|
|
||||||
|
|
||||||
;__LXCJ2MRU__ 0==n_mru, or apply mru to all that are filtered here
|
|
||||||
jb lxunf ; only Carry (Borrow) matters
|
|
||||||
;__LXCJ4MRU__ 0!=n_mru, but apply mru only to subset of filtered here
|
|
||||||
jnb unfcount ; was not filtered anyway: do not unfilter
|
|
||||||
|
|
||||||
;we will unfilter, and 0!=n_mru, but should we apply mru?
|
|
||||||
;__LXCJ6MRU__ apply mru to JMP only (0xFF==al)
|
|
||||||
jpe lxct3 ; jump if even number of 1 bits in al
|
|
||||||
;__LXCJ7MRU__ apply mru to CALL only (0xFE==al)
|
|
||||||
jpo lxct3 ; jump if odd number of 1 bits in al
|
|
||||||
;__LXCJ8MRU__ do not apply mru to one or both
|
|
||||||
clc
|
|
||||||
lxct3:
|
|
||||||
jmps lxunf
|
|
||||||
|
|
||||||
;__LXUNF034__
|
|
||||||
unfcount:
|
|
||||||
sub ecx, byte 1
|
|
||||||
jg lxctloop
|
|
||||||
|
|
||||||
;__LXMRU055__
|
|
||||||
mov edi, esp ; clear mru[] portion of stack
|
|
||||||
;__MRUBYTE2__
|
|
||||||
mov ecx, 4+ 256 ; unused, tail, cto8_e8e9, cto8_0f
|
|
||||||
;__MRUBITS2__
|
|
||||||
mov ecx, %$n_mru1
|
|
||||||
add ecx, byte 1+ 4 ; n_mru1, tail, cto8_e8e9, cto8_0f
|
|
||||||
;__MRUARB20__
|
|
||||||
mov ecx, %$n_mru
|
|
||||||
add ecx, byte 4 ; n_mru, tail, cto8_e8e9, cto8_0f
|
|
||||||
;__LXMRU057__
|
|
||||||
xor eax, eax
|
|
||||||
rep
|
|
||||||
stosd
|
|
||||||
mov esp, edi
|
|
||||||
|
|
||||||
;__LXMRU058__ 0==n_mru
|
|
||||||
push esi
|
|
||||||
;__LXUNF035__
|
|
||||||
popa
|
|
||||||
xchg eax, edi
|
|
||||||
push ecx
|
|
||||||
push eax
|
|
||||||
push edx
|
|
||||||
ret
|
|
||||||
%pop
|
|
||||||
%endmacro
|
|
||||||
|
|
||||||
; vi:ts=8:et:nowrap
|
|
||||||
@@ -1,198 +0,0 @@
|
|||||||
; n2b_d32.ash -- ucl_nrv2b_decompress_le32 in 32-bit assembly
|
|
||||||
;
|
|
||||||
; This file is part of the UCL data compression library.
|
|
||||||
;
|
|
||||||
; Copyright (C) 1996-2006 Markus Franz Xaver Johannes Oberhumer
|
|
||||||
; All Rights Reserved.
|
|
||||||
;
|
|
||||||
; The UCL library is free software; you can redistribute it and/or
|
|
||||||
; modify it 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.
|
|
||||||
;
|
|
||||||
; The UCL library 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 the UCL library; 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
|
|
||||||
; <markus@oberhumer.com>
|
|
||||||
; http://www.oberhumer.com/opensource/ucl/
|
|
||||||
;
|
|
||||||
|
|
||||||
|
|
||||||
; ------------- DECOMPRESSION -------------
|
|
||||||
|
|
||||||
; Input:
|
|
||||||
; esi - source
|
|
||||||
; edi - dest
|
|
||||||
; ebp - -1
|
|
||||||
; cld
|
|
||||||
|
|
||||||
; Output:
|
|
||||||
; eax - 0
|
|
||||||
; ecx - 0
|
|
||||||
|
|
||||||
|
|
||||||
%ifndef jmps
|
|
||||||
%define jmps jmp short
|
|
||||||
%endif
|
|
||||||
%ifndef jmpn
|
|
||||||
%define jmpn jmp near
|
|
||||||
%endif
|
|
||||||
|
|
||||||
CPU 386
|
|
||||||
|
|
||||||
|
|
||||||
%macro getbit_n2b 1
|
|
||||||
%if %1==1
|
|
||||||
add ebx, ebx
|
|
||||||
jnz %%gotbit
|
|
||||||
%endif
|
|
||||||
mov ebx, [esi]
|
|
||||||
sub esi, byte -4
|
|
||||||
adc ebx, ebx
|
|
||||||
%%gotbit:
|
|
||||||
%endmacro
|
|
||||||
%undef getbit
|
|
||||||
%define getbit getbit_n2b
|
|
||||||
|
|
||||||
|
|
||||||
%ifdef __N2BSMA10__
|
|
||||||
jmps dcl1_n2b
|
|
||||||
decompr_literals_n2b:
|
|
||||||
movsb
|
|
||||||
%else; __N2BFAS10__
|
|
||||||
jmps dcl1_n2b
|
|
||||||
align 8
|
|
||||||
; __N2BFAS11__
|
|
||||||
decompr_literalb_n2b:
|
|
||||||
mov al, [esi]
|
|
||||||
inc esi
|
|
||||||
mov [edi], al
|
|
||||||
inc edi
|
|
||||||
%endif; __N2BDEC10__
|
|
||||||
|
|
||||||
|
|
||||||
decompr_loop_n2b:
|
|
||||||
add ebx, ebx
|
|
||||||
jnz dcl2_n2b
|
|
||||||
dcl1_n2b:
|
|
||||||
getbit 32
|
|
||||||
dcl2_n2b:
|
|
||||||
%ifdef __N2BSMA20__
|
|
||||||
jc decompr_literals_n2b
|
|
||||||
xor eax, eax
|
|
||||||
inc eax
|
|
||||||
%else; __N2BFAS20__
|
|
||||||
%ifndef UPX102
|
|
||||||
mov al, [edi] ;; force data cache allocate (PentiumPlain or MMX)
|
|
||||||
%endif
|
|
||||||
jc decompr_literalb_n2b
|
|
||||||
mov eax, 1
|
|
||||||
%endif; __N2BDEC20__
|
|
||||||
loop1_n2b:
|
|
||||||
getbit 1
|
|
||||||
adc eax, eax
|
|
||||||
%ifdef __N2BSMA30__
|
|
||||||
getbit 1
|
|
||||||
jnc loop1_n2b
|
|
||||||
%else; __N2BFAS30__
|
|
||||||
add ebx, ebx
|
|
||||||
jnc loop1_n2b
|
|
||||||
jnz loopend1_n2b
|
|
||||||
getbit 32
|
|
||||||
jnc loop1_n2b
|
|
||||||
loopend1_n2b:
|
|
||||||
%endif; __N2BDEC30__
|
|
||||||
xor ecx, ecx
|
|
||||||
sub eax, byte 3
|
|
||||||
jb decompr_ebpeax_n2b
|
|
||||||
shl eax, 8
|
|
||||||
mov al, [esi]
|
|
||||||
inc esi
|
|
||||||
xor eax, byte -1
|
|
||||||
jz decompr_end_n2b
|
|
||||||
mov ebp, eax
|
|
||||||
decompr_ebpeax_n2b:
|
|
||||||
getbit 1
|
|
||||||
adc ecx, ecx
|
|
||||||
getbit 1
|
|
||||||
adc ecx, ecx
|
|
||||||
jnz decompr_got_mlen_n2b
|
|
||||||
inc ecx
|
|
||||||
loop2_n2b:
|
|
||||||
getbit 1
|
|
||||||
adc ecx, ecx
|
|
||||||
%ifdef __N2BSMA40__
|
|
||||||
getbit 1
|
|
||||||
jnc loop2_n2b
|
|
||||||
%else; __N2BFAS40__
|
|
||||||
add ebx, ebx
|
|
||||||
jnc loop2_n2b
|
|
||||||
jnz loopend2_n2b
|
|
||||||
getbit 32
|
|
||||||
jnc loop2_n2b
|
|
||||||
loopend2_n2b:
|
|
||||||
%endif; __N2BDUMM1__
|
|
||||||
%ifdef __N2BSMA50__
|
|
||||||
inc ecx
|
|
||||||
inc ecx
|
|
||||||
%else; __N2BFAS50__
|
|
||||||
add ecx, byte 2
|
|
||||||
%endif; __N2BDEC50__
|
|
||||||
decompr_got_mlen_n2b:
|
|
||||||
cmp ebp, -0xd00
|
|
||||||
adc ecx, byte 1
|
|
||||||
%ifdef __N2BSMA60__
|
|
||||||
%ifndef UPX102
|
|
||||||
push esi
|
|
||||||
%else
|
|
||||||
mov edx, esi
|
|
||||||
%endif
|
|
||||||
lea esi, [edi+ebp]
|
|
||||||
rep
|
|
||||||
movsb
|
|
||||||
%ifndef UPX102
|
|
||||||
pop esi
|
|
||||||
%else
|
|
||||||
mov esi, edx
|
|
||||||
%endif
|
|
||||||
jmpn decompr_loop_n2b
|
|
||||||
%else; __N2BFAS60__
|
|
||||||
lea edx, [edi+ebp]
|
|
||||||
cmp ebp, byte -4
|
|
||||||
%ifndef UPX102
|
|
||||||
mov al, [edi+ecx] ;; force data cache allocate (PentiumPlain or MMX)
|
|
||||||
%endif
|
|
||||||
jbe decompr_copy4_n2b
|
|
||||||
loop3_n2b:
|
|
||||||
mov al, [edx]
|
|
||||||
inc edx
|
|
||||||
mov [edi], al
|
|
||||||
inc edi
|
|
||||||
dec ecx
|
|
||||||
jnz loop3_n2b
|
|
||||||
jmpn decompr_loop_n2b
|
|
||||||
; __N2BFAS61__
|
|
||||||
align 4
|
|
||||||
decompr_copy4_n2b:
|
|
||||||
mov eax, [edx]
|
|
||||||
add edx, byte 4
|
|
||||||
mov [edi], eax
|
|
||||||
add edi, byte 4
|
|
||||||
sub ecx, byte 4
|
|
||||||
ja decompr_copy4_n2b
|
|
||||||
add edi, ecx
|
|
||||||
jmpn decompr_loop_n2b
|
|
||||||
%endif; __N2BDEC60__
|
|
||||||
decompr_end_n2b:
|
|
||||||
; __NRV2BEND__
|
|
||||||
|
|
||||||
; vi:ts=8:et
|
|
||||||
|
|
||||||
@@ -1,206 +0,0 @@
|
|||||||
; n2d_d32.ash -- ucl_nrv2d_decompress_le32 in 32-bit assembly
|
|
||||||
;
|
|
||||||
; This file is part of the UCL data compression library.
|
|
||||||
;
|
|
||||||
; Copyright (C) 1996-2006 Markus Franz Xaver Johannes Oberhumer
|
|
||||||
; All Rights Reserved.
|
|
||||||
;
|
|
||||||
; The UCL library is free software; you can redistribute it and/or
|
|
||||||
; modify it 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.
|
|
||||||
;
|
|
||||||
; The UCL library 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 the UCL library; 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
|
|
||||||
; <markus@oberhumer.com>
|
|
||||||
; http://www.oberhumer.com/opensource/ucl/
|
|
||||||
;
|
|
||||||
|
|
||||||
|
|
||||||
; ------------- DECOMPRESSION -------------
|
|
||||||
|
|
||||||
; Input:
|
|
||||||
; esi - source
|
|
||||||
; edi - dest
|
|
||||||
; ebp - -1
|
|
||||||
; cld
|
|
||||||
|
|
||||||
; Output:
|
|
||||||
; eax - 0
|
|
||||||
; ecx - 0
|
|
||||||
|
|
||||||
|
|
||||||
%ifndef jmps
|
|
||||||
%define jmps jmp short
|
|
||||||
%endif
|
|
||||||
%ifndef jmpn
|
|
||||||
%define jmpn jmp near
|
|
||||||
%endif
|
|
||||||
|
|
||||||
CPU 386
|
|
||||||
|
|
||||||
|
|
||||||
%macro getbit_n2d 1
|
|
||||||
%if %1==1
|
|
||||||
add ebx, ebx
|
|
||||||
jnz %%gotbit
|
|
||||||
%endif
|
|
||||||
mov ebx, [esi]
|
|
||||||
sub esi, byte -4
|
|
||||||
adc ebx, ebx
|
|
||||||
%%gotbit:
|
|
||||||
%endmacro
|
|
||||||
%undef getbit
|
|
||||||
%define getbit getbit_n2d
|
|
||||||
|
|
||||||
|
|
||||||
%ifdef __N2DSMA10__
|
|
||||||
jmps dcl1_n2d
|
|
||||||
decompr_literals_n2d:
|
|
||||||
movsb
|
|
||||||
%else; __N2DFAS10__
|
|
||||||
jmps dcl1_n2d
|
|
||||||
align 8
|
|
||||||
; __N2DFAS11__
|
|
||||||
decompr_literalb_n2d:
|
|
||||||
mov al, [esi]
|
|
||||||
inc esi
|
|
||||||
mov [edi], al
|
|
||||||
inc edi
|
|
||||||
%endif; __N2DDEC10__
|
|
||||||
|
|
||||||
|
|
||||||
decompr_loop_n2d:
|
|
||||||
add ebx, ebx
|
|
||||||
jnz dcl2_n2d
|
|
||||||
dcl1_n2d:
|
|
||||||
getbit 32
|
|
||||||
dcl2_n2d:
|
|
||||||
%ifdef __N2DSMA20__
|
|
||||||
jc decompr_literals_n2d
|
|
||||||
xor eax, eax
|
|
||||||
inc eax
|
|
||||||
%else; __N2DFAS20__
|
|
||||||
%ifndef UPX102
|
|
||||||
mov al, [edi] ;; force data cache allocate (PentiumPlain or MMX)
|
|
||||||
%endif
|
|
||||||
jc decompr_literalb_n2d
|
|
||||||
mov eax, 1
|
|
||||||
%endif; __N2DDEC20__
|
|
||||||
loop1_n2d:
|
|
||||||
getbit 1
|
|
||||||
adc eax, eax
|
|
||||||
%ifdef __N2DSMA30__
|
|
||||||
getbit 1
|
|
||||||
jc loopend1_n2d
|
|
||||||
%else; __N2DFAS30__
|
|
||||||
add ebx, ebx
|
|
||||||
jnc loopcontinue1_n2d
|
|
||||||
jnz loopend1_n2d
|
|
||||||
getbit 32
|
|
||||||
jc loopend1_n2d
|
|
||||||
loopcontinue1_n2d:
|
|
||||||
%endif; __N2DDEC30__
|
|
||||||
dec eax
|
|
||||||
getbit 1
|
|
||||||
adc eax, eax
|
|
||||||
jmps loop1_n2d
|
|
||||||
loopend1_n2d:
|
|
||||||
xor ecx, ecx
|
|
||||||
sub eax, byte 3
|
|
||||||
jb decompr_prev_dist_n2d
|
|
||||||
shl eax, 8
|
|
||||||
mov al, [esi]
|
|
||||||
inc esi
|
|
||||||
xor eax, byte -1
|
|
||||||
jz decompr_end_n2d
|
|
||||||
sar eax, 1 ; shift low-bit into carry
|
|
||||||
mov ebp, eax
|
|
||||||
jmps decompr_ebpeax_n2d
|
|
||||||
decompr_prev_dist_n2d:
|
|
||||||
getbit 1
|
|
||||||
decompr_ebpeax_n2d:
|
|
||||||
adc ecx, ecx
|
|
||||||
getbit 1
|
|
||||||
adc ecx, ecx
|
|
||||||
jnz decompr_got_mlen_n2d
|
|
||||||
inc ecx
|
|
||||||
loop2_n2d:
|
|
||||||
getbit 1
|
|
||||||
adc ecx, ecx
|
|
||||||
%ifdef __N2DSMA40__
|
|
||||||
getbit 1
|
|
||||||
jnc loop2_n2d
|
|
||||||
%else; __N2DFAS40__
|
|
||||||
add ebx, ebx
|
|
||||||
jnc loop2_n2d
|
|
||||||
jnz loopend2_n2d
|
|
||||||
getbit 32
|
|
||||||
jnc loop2_n2d
|
|
||||||
loopend2_n2d:
|
|
||||||
%endif; __N2DDUMM1__
|
|
||||||
%ifdef __N2DSMA50__
|
|
||||||
inc ecx
|
|
||||||
inc ecx
|
|
||||||
%else; __N2DFAS50__
|
|
||||||
add ecx, byte 2
|
|
||||||
%endif; __N2DDEC50__
|
|
||||||
decompr_got_mlen_n2d:
|
|
||||||
cmp ebp, -0x500
|
|
||||||
adc ecx, byte 1
|
|
||||||
%ifdef __N2DSMA60__
|
|
||||||
%ifndef UPX102
|
|
||||||
push esi
|
|
||||||
%else
|
|
||||||
mov edx, esi
|
|
||||||
%endif
|
|
||||||
lea esi, [edi+ebp]
|
|
||||||
rep
|
|
||||||
movsb
|
|
||||||
%ifndef UPX102
|
|
||||||
pop esi
|
|
||||||
%else
|
|
||||||
mov esi, edx
|
|
||||||
%endif
|
|
||||||
jmpn decompr_loop_n2d
|
|
||||||
%else; __N2DFAS60__
|
|
||||||
lea edx, [edi+ebp]
|
|
||||||
cmp ebp, byte -4
|
|
||||||
%ifndef UPX102
|
|
||||||
mov al, [edi+ecx] ;; force data cache allocate (PentiumPlain or MMX)
|
|
||||||
%endif
|
|
||||||
jbe decompr_copy4_n2d
|
|
||||||
loop3_n2d:
|
|
||||||
mov al, [edx]
|
|
||||||
inc edx
|
|
||||||
mov [edi], al
|
|
||||||
inc edi
|
|
||||||
dec ecx
|
|
||||||
jnz loop3_n2d
|
|
||||||
jmpn decompr_loop_n2d
|
|
||||||
; __N2DFAS61__
|
|
||||||
align 4
|
|
||||||
decompr_copy4_n2d:
|
|
||||||
mov eax, [edx]
|
|
||||||
add edx, byte 4
|
|
||||||
mov [edi], eax
|
|
||||||
add edi, byte 4
|
|
||||||
sub ecx, byte 4
|
|
||||||
ja decompr_copy4_n2d
|
|
||||||
add edi, ecx
|
|
||||||
jmpn decompr_loop_n2d
|
|
||||||
%endif; __N2DDEC60__
|
|
||||||
decompr_end_n2d:
|
|
||||||
; __NRV2DEND__
|
|
||||||
|
|
||||||
; vi:ts=8:et
|
|
||||||
|
|
||||||
@@ -1,211 +0,0 @@
|
|||||||
; n2e_d32.ash -- ucl_nrv2e_decompress_le32 in 32-bit assembly
|
|
||||||
;
|
|
||||||
; This file is part of the UCL data compression library.
|
|
||||||
;
|
|
||||||
; Copyright (C) 1996-2006 Markus Franz Xaver Johannes Oberhumer
|
|
||||||
; All Rights Reserved.
|
|
||||||
;
|
|
||||||
; The UCL library is free software; you can redistribute it and/or
|
|
||||||
; modify it 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.
|
|
||||||
;
|
|
||||||
; The UCL library 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 the UCL library; 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
|
|
||||||
; <markus@oberhumer.com>
|
|
||||||
; http://www.oberhumer.com/opensource/ucl/
|
|
||||||
;
|
|
||||||
|
|
||||||
|
|
||||||
; ------------- DECOMPRESSION -------------
|
|
||||||
|
|
||||||
; Input:
|
|
||||||
; esi - source
|
|
||||||
; edi - dest
|
|
||||||
; ebp - -1
|
|
||||||
; cld
|
|
||||||
|
|
||||||
; Output:
|
|
||||||
; eax - 0
|
|
||||||
; ecx - 0
|
|
||||||
|
|
||||||
|
|
||||||
%ifndef jmps
|
|
||||||
%define jmps jmp short
|
|
||||||
%endif
|
|
||||||
%ifndef jmpn
|
|
||||||
%define jmpn jmp near
|
|
||||||
%endif
|
|
||||||
|
|
||||||
CPU 386
|
|
||||||
|
|
||||||
|
|
||||||
%macro getbit_n2e 1
|
|
||||||
%if %1==1
|
|
||||||
add ebx, ebx
|
|
||||||
jnz %%gotbit
|
|
||||||
%endif
|
|
||||||
mov ebx, [esi]
|
|
||||||
sub esi, byte -4
|
|
||||||
adc ebx, ebx
|
|
||||||
%%gotbit:
|
|
||||||
%endmacro
|
|
||||||
%undef getbit
|
|
||||||
%define getbit getbit_n2e
|
|
||||||
|
|
||||||
|
|
||||||
%ifdef __N2ESMA10__
|
|
||||||
jmps dcl1_n2e
|
|
||||||
decompr_literals_n2e:
|
|
||||||
movsb
|
|
||||||
%else; __N2EFAS10__
|
|
||||||
jmps dcl1_n2e
|
|
||||||
align 8
|
|
||||||
; __N2EFAS11__
|
|
||||||
decompr_literalb_n2e:
|
|
||||||
mov al, [esi]
|
|
||||||
inc esi
|
|
||||||
mov [edi], al
|
|
||||||
inc edi
|
|
||||||
%endif; __N2EDEC10__
|
|
||||||
|
|
||||||
|
|
||||||
decompr_loop_n2e:
|
|
||||||
add ebx, ebx
|
|
||||||
jnz dcl2_n2e
|
|
||||||
dcl1_n2e:
|
|
||||||
getbit 32
|
|
||||||
dcl2_n2e:
|
|
||||||
%ifdef __N2ESMA20__
|
|
||||||
jc decompr_literals_n2e
|
|
||||||
xor eax, eax
|
|
||||||
inc eax
|
|
||||||
%else; __N2EFAS20__
|
|
||||||
%ifndef UPX102
|
|
||||||
mov al, [edi] ;; force data cache allocate (PentiumPlain or MMX)
|
|
||||||
%endif
|
|
||||||
jc decompr_literalb_n2e
|
|
||||||
mov eax, 1
|
|
||||||
%endif; __N2EDEC20__
|
|
||||||
loop1_n2e:
|
|
||||||
getbit 1
|
|
||||||
adc eax, eax
|
|
||||||
%ifdef __N2ESMA30__
|
|
||||||
getbit 1
|
|
||||||
jc loopend1_n2e
|
|
||||||
%else; __N2EFAS30__
|
|
||||||
add ebx, ebx
|
|
||||||
jnc loopcontinue1_n2e
|
|
||||||
jnz loopend1_n2e
|
|
||||||
getbit 32
|
|
||||||
jc loopend1_n2e
|
|
||||||
loopcontinue1_n2e:
|
|
||||||
%endif; __N2EDEC30__
|
|
||||||
dec eax
|
|
||||||
getbit 1
|
|
||||||
adc eax, eax
|
|
||||||
jmps loop1_n2e
|
|
||||||
|
|
||||||
decompr_mlen1_n2e:
|
|
||||||
getbit 1
|
|
||||||
adc ecx, ecx
|
|
||||||
jmps decompr_got_mlen_n2e
|
|
||||||
|
|
||||||
loopend1_n2e:
|
|
||||||
xor ecx, ecx
|
|
||||||
sub eax, byte 3
|
|
||||||
jb decompr_prev_dist_n2e
|
|
||||||
shl eax, 8
|
|
||||||
mov al, [esi]
|
|
||||||
inc esi
|
|
||||||
xor eax, byte -1
|
|
||||||
jz decompr_end_n2e
|
|
||||||
sar eax, 1 ; shift low-bit into carry
|
|
||||||
mov ebp, eax
|
|
||||||
jmps decompr_ebpeax_n2e
|
|
||||||
decompr_prev_dist_n2e:
|
|
||||||
getbit 1
|
|
||||||
decompr_ebpeax_n2e:
|
|
||||||
jc decompr_mlen1_n2e
|
|
||||||
inc ecx
|
|
||||||
getbit 1
|
|
||||||
jc decompr_mlen1_n2e
|
|
||||||
loop2_n2e:
|
|
||||||
getbit 1
|
|
||||||
adc ecx, ecx
|
|
||||||
%ifdef __N2ESMA40__
|
|
||||||
getbit 1
|
|
||||||
jnc loop2_n2e
|
|
||||||
%else; __N2EFAS40__
|
|
||||||
add ebx, ebx
|
|
||||||
jnc loop2_n2e
|
|
||||||
jnz loopend2_n2e
|
|
||||||
getbit 32
|
|
||||||
jnc loop2_n2e
|
|
||||||
loopend2_n2e:
|
|
||||||
%endif; __N2EDUMM1__
|
|
||||||
%ifdef __N2ESMA50__
|
|
||||||
inc ecx
|
|
||||||
inc ecx
|
|
||||||
%else; __N2EFAS50__
|
|
||||||
add ecx, byte 2
|
|
||||||
%endif; __N2EDEC50__
|
|
||||||
decompr_got_mlen_n2e:
|
|
||||||
cmp ebp, -0x500
|
|
||||||
adc ecx, byte 2
|
|
||||||
%ifdef __N2ESMA60__
|
|
||||||
%ifndef UPX102
|
|
||||||
push esi
|
|
||||||
%else
|
|
||||||
mov edx, esi
|
|
||||||
%endif
|
|
||||||
lea esi, [edi+ebp]
|
|
||||||
rep
|
|
||||||
movsb
|
|
||||||
%ifndef UPX102
|
|
||||||
pop esi
|
|
||||||
%else
|
|
||||||
mov esi, edx
|
|
||||||
%endif
|
|
||||||
jmpn decompr_loop_n2e
|
|
||||||
%else; __N2EFAS60__
|
|
||||||
lea edx, [edi+ebp]
|
|
||||||
cmp ebp, byte -4
|
|
||||||
%ifndef UPX102
|
|
||||||
mov al, [edi+ecx] ;; force data cache allocate (PentiumPlain or MMX)
|
|
||||||
%endif
|
|
||||||
jbe decompr_copy4_n2e
|
|
||||||
loop3_n2e:
|
|
||||||
mov al, [edx]
|
|
||||||
inc edx
|
|
||||||
mov [edi], al
|
|
||||||
inc edi
|
|
||||||
dec ecx
|
|
||||||
jnz loop3_n2e
|
|
||||||
jmpn decompr_loop_n2e
|
|
||||||
; __N2EFAS61__
|
|
||||||
align 4
|
|
||||||
decompr_copy4_n2e:
|
|
||||||
mov eax, [edx]
|
|
||||||
add edx, byte 4
|
|
||||||
mov [edi], eax
|
|
||||||
add edi, byte 4
|
|
||||||
sub ecx, byte 4
|
|
||||||
ja decompr_copy4_n2e
|
|
||||||
add edi, ecx
|
|
||||||
jmpn decompr_loop_n2e
|
|
||||||
%endif; __N2EDEC60__
|
|
||||||
decompr_end_n2e:
|
|
||||||
; __NRV2EEND__
|
|
||||||
|
|
||||||
; vi:ts=8:et
|
|
||||||
|
|
||||||
@@ -27,13 +27,14 @@
|
|||||||
;
|
;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
// ------------- ADDBITS -------------
|
// ------------- ADDBITS -------------
|
||||||
|
|
||||||
macro(ADDBITS)
|
macro(ADDBITS)
|
||||||
#if (NRV_BB == 8)
|
#if (NRV_BB == 8)
|
||||||
add.b d0,d0 // sets Z, C and X // 4
|
add.b d0,d0 // sets Z, C and X // 4
|
||||||
#elif (NRV_BB == 32)
|
#elif (NRV_BB == 32)
|
||||||
add.l d0,d0 // sets Z, C and X // 6
|
add.l d0,d0 // sets Z, C and X // 6
|
||||||
#endif
|
#endif
|
||||||
endm
|
endm
|
||||||
|
|
||||||
@@ -41,9 +42,9 @@ macro(ADDBITS)
|
|||||||
#if 0
|
#if 0
|
||||||
macro(ADDXBITS)
|
macro(ADDXBITS)
|
||||||
#if (NRV_BB == 8)
|
#if (NRV_BB == 8)
|
||||||
addx.b d0,d0 // sets C and X // 4
|
addx.b d0,d0 // sets C and X // 4
|
||||||
#elif (NRV_BB == 32)
|
#elif (NRV_BB == 32)
|
||||||
addx.l d0,d0 // sets C and X // 8
|
addx.l d0,d0 // sets C and X // 8
|
||||||
#endif
|
#endif
|
||||||
endm
|
endm
|
||||||
#endif
|
#endif
|
||||||
@@ -55,7 +56,7 @@ macro(ADDXBITS)
|
|||||||
macro(FILLBYTES_8)
|
macro(FILLBYTES_8)
|
||||||
// note: we shift the X flag through -> must init d0.b with $80
|
// note: we shift the X flag through -> must init d0.b with $80
|
||||||
move.b (a0)+,d0 // 8
|
move.b (a0)+,d0 // 8
|
||||||
addx.b d0,d0 // sets C and X // 4
|
addx.b d0,d0 // sets C and X // 4
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
|
||||||
@@ -70,8 +71,8 @@ macro(FILLBYTES_LE32)
|
|||||||
ror.l #8,d0 // 24
|
ror.l #8,d0 // 24
|
||||||
move.b (a0)+,d0 // 8
|
move.b (a0)+,d0 // 8
|
||||||
ror.l #8,d0 // 24
|
ror.l #8,d0 // 24
|
||||||
add.l d0,d0 // sets C and X // 6
|
add.l d0,d0 // sets C and X // 6
|
||||||
bset #0,d0 // only changes Z // 12
|
bset #0,d0 // only changes Z // 12
|
||||||
// -----
|
// -----
|
||||||
// 146
|
// 146
|
||||||
#elif 1
|
#elif 1
|
||||||
@@ -82,9 +83,9 @@ macro(FILLBYTES_LE32)
|
|||||||
move.b 1(a0),d0 // 12
|
move.b 1(a0),d0 // 12
|
||||||
lsl.w #8,d0 // 22
|
lsl.w #8,d0 // 22
|
||||||
move.b (a0),d0 // 8
|
move.b (a0),d0 // 8
|
||||||
addq.l #4,a0 // does not affect flags // 8
|
addq.l #4,a0 // does not affect flags// 8
|
||||||
add.l d0,d0 // sets C and X // 6
|
add.l d0,d0 // sets C and X // 6
|
||||||
bset #0,d0 // only changes Z // 12
|
bset #0,d0 // only changes Z // 12
|
||||||
// -----
|
// -----
|
||||||
// 118
|
// 118
|
||||||
#elif 1
|
#elif 1
|
||||||
@@ -97,8 +98,8 @@ macro(FILLBYTES_LE32)
|
|||||||
move.b 1(a0),d0 // 12
|
move.b 1(a0),d0 // 12
|
||||||
ror.w #8,d0 // 22
|
ror.w #8,d0 // 22
|
||||||
move.b (a0),d0 // 8
|
move.b (a0),d0 // 8
|
||||||
addq.l #4,a0 // does not affect flags // 8
|
addq.l #4,a0 // does not affect flags// 8
|
||||||
addx.l d0,d0 // sets C and X // 8
|
addx.l d0,d0 // sets C and X // 8
|
||||||
// -----
|
// -----
|
||||||
// 108
|
// 108
|
||||||
#else
|
#else
|
||||||
@@ -107,13 +108,13 @@ macro(FILLBYTES_LE32)
|
|||||||
// note: we shift the X flag through -> must init d0.l with $80000000
|
// note: we shift the X flag through -> must init d0.l with $80000000
|
||||||
// note: must use dc.l because of a bug in the pasm assembler
|
// note: must use dc.l because of a bug in the pasm assembler
|
||||||
// note: may access past the end of the input// this is ok for UPX
|
// note: may access past the end of the input// this is ok for UPX
|
||||||
dc.l $01080003 // movep.w 3(a0),d0 // 16
|
dc.l $01080003 // movep.w 3(a0),d0 // 16
|
||||||
move.b 2(a0),d0 // 12
|
move.b 2(a0),d0 // 12
|
||||||
swap d0 // 4
|
swap d0 // 4
|
||||||
dc.l $01080001 // movep.w 1(a0),d0 // 16
|
dc.l $01080001 // movep.w 1(a0),d0 // 16
|
||||||
move.b (a0),d0 // 8
|
move.b (a0),d0 // 8
|
||||||
addq.l #4,a0 // does not affect flags // 8
|
addq.l #4,a0 // does not affect flags// 8
|
||||||
addx.l d0,d0 // sets C and X // 8
|
addx.l d0,d0 // sets C and X // 8
|
||||||
// -----
|
// -----
|
||||||
// 72
|
// 72
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ decompr_got_mlen:
|
|||||||
sub.l d6,d1
|
sub.l d6,d1
|
||||||
addx.w d7,d2
|
addx.w d7,d2
|
||||||
|
|
||||||
// TODO: partly unroll this loop// could use some magic with d7 for address
|
// TODO: partly unroll this loop; could use some magic with d7 for address
|
||||||
// computations, then compute a nice `jmp yyy(pc,dx.w)'
|
// computations, then compute a nice `jmp yyy(pc,dx.w)'
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
|
|||||||
@@ -206,7 +206,7 @@ decompr_got_mlen:
|
|||||||
sub.l d6,d1
|
sub.l d6,d1
|
||||||
addx.w d7,d2
|
addx.w d7,d2
|
||||||
|
|
||||||
// TODO: partly unroll this loop// could use some magic with d7 for address
|
// TODO: partly unroll this loop; could use some magic with d7 for address
|
||||||
// computations, then compute a nice `jmp yyy(pc,dx.w)'
|
// computations, then compute a nice `jmp yyy(pc,dx.w)'
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
|
|||||||
@@ -205,7 +205,7 @@ decompr_got_mlen:
|
|||||||
sub.l d6,d1
|
sub.l d6,d1
|
||||||
addx.w d7,d2
|
addx.w d7,d2
|
||||||
|
|
||||||
// TODO: partly unroll this loop// could use some magic with d7 for address
|
// TODO: partly unroll this loop; could use some magic with d7 for address
|
||||||
// computations, then compute a nice `jmp yyy(pc,dx.w)'
|
// computations, then compute a nice `jmp yyy(pc,dx.w)'
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
|
|||||||
@@ -71,17 +71,12 @@
|
|||||||
#define ELSE .else
|
#define ELSE .else
|
||||||
#define ENDIF .endif
|
#define ENDIF .endif
|
||||||
|
|
||||||
#define DW .word
|
|
||||||
#define DB .byte
|
|
||||||
|
|
||||||
.macro subiu reg, p1, p2
|
.macro subiu reg, p1, p2
|
||||||
|
|
||||||
.ifnb p2
|
.ifnb p2
|
||||||
addiu \reg, p1, -p2
|
addiu \reg, p1, -p2
|
||||||
.else
|
.else
|
||||||
addiu \reg, -p1
|
addiu \reg, -p1
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
#ifndef DEBUG
|
#ifndef DEBUG
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
#define COM 1
|
#define COM 1
|
||||||
#define CJT16 1
|
#define CJT16 1
|
||||||
#include "arch/i086/macros.ash"
|
#include "arch/i086/macros.S"
|
||||||
|
|
||||||
CPU 8086
|
CPU 8086
|
||||||
|
|
||||||
@@ -69,7 +69,7 @@ section COMMAIN2
|
|||||||
|
|
||||||
section COMCUTPO
|
section COMCUTPO
|
||||||
|
|
||||||
#include "arch/i086/nrv2b_d16.ash" /* decompressor & calltrick */
|
#include "arch/i086/nrv2b_d16.S" /* decompressor & calltrick */
|
||||||
|
|
||||||
section CORETURN
|
section CORETURN
|
||||||
ret
|
ret
|
||||||
|
|||||||
@@ -27,8 +27,8 @@
|
|||||||
;
|
;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define EXE
|
#define EXE 1
|
||||||
#include "arch/i086/macros.ash"
|
#include "arch/i086/macros.S"
|
||||||
|
|
||||||
CPU 8086
|
CPU 8086
|
||||||
|
|
||||||
@@ -116,9 +116,9 @@ section EXEMAIN4
|
|||||||
|
|
||||||
section EXECUTPO
|
section EXECUTPO
|
||||||
|
|
||||||
#include "arch/i086/nrv2b_d8.ash"
|
#include "arch/i086/nrv2b_d8.S"
|
||||||
#include "arch/i086/nrv2d_d8.ash"
|
#include "arch/i086/nrv2d_d8.S"
|
||||||
#include "arch/i086/nrv2e_d8.ash"
|
#include "arch/i086/nrv2e_d8.S"
|
||||||
|
|
||||||
section EXEMAIN5
|
section EXEMAIN5
|
||||||
pop bp
|
pop bp
|
||||||
|
|||||||
@@ -27,11 +27,10 @@
|
|||||||
;
|
;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#define SYS 1
|
#define SYS 1
|
||||||
#define COM 0
|
#define COM 0
|
||||||
#define CJT16 1
|
#define CJT16 1
|
||||||
#include "arch/i086/macros.ash"
|
#include "arch/i086/macros.S"
|
||||||
|
|
||||||
CPU 8086
|
CPU 8086
|
||||||
|
|
||||||
@@ -90,7 +89,7 @@ section SYSMAIN3
|
|||||||
|
|
||||||
section SYSCUTPO
|
section SYSCUTPO
|
||||||
|
|
||||||
#include "arch/i086/nrv2b_d16.ash"
|
#include "arch/i086/nrv2b_d16.S"
|
||||||
|
|
||||||
section SYSMAIN5
|
section SYSMAIN5
|
||||||
pop es
|
pop es
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
; header.ash --
|
; header.S --
|
||||||
;
|
;
|
||||||
; This file is part of the UPX executable compressor.
|
; This file is part of the UPX executable compressor.
|
||||||
;
|
;
|
||||||
@@ -27,38 +27,34 @@
|
|||||||
;
|
;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define db .byte
|
|
||||||
#define dw .short
|
|
||||||
#define dd .long
|
|
||||||
|
|
||||||
|
|
||||||
section UPX1HEAD
|
section UPX1HEAD
|
||||||
|
|
||||||
db 85,80,88,33 // 0 UPX_MAGIC_LE32
|
.byte 85,80,88,33 // 0 UPX_MAGIC_LE32
|
||||||
db 161,216,208,213 // UPX_MAGIC2_LE32
|
.byte 161,216,208,213 // UPX_MAGIC2_LE32
|
||||||
dd 0 // 8 uncompressed adler32
|
.long 0 // 8 uncompressed adler32
|
||||||
dd 0 // 12 compressed adler32
|
.long 0 // 12 compressed adler32
|
||||||
|
|
||||||
#ifdef COM
|
#ifdef COM
|
||||||
dw 0 // 16 uncompressed len
|
.short 0 // 16 uncompressed len
|
||||||
dw 0 // 18 compressed len
|
.short 0 // 18 compressed len
|
||||||
db 0 // 20 filter
|
.byte 0 // 20 filter
|
||||||
db 45 // 21 header checksum
|
.byte 45 // 21 header checksum
|
||||||
#elif defined(EXE)
|
#elif defined(EXE)
|
||||||
db 0,0,0 // 16 uncompressed len
|
.byte 0,0,0 // 16 uncompressed len
|
||||||
db 0,0,0 // 19 compressed len
|
.byte 0,0,0 // 19 compressed len
|
||||||
db 0,0,0 // 22 original file size
|
.byte 0,0,0 // 22 original file size
|
||||||
db 0 // 25 filter
|
.byte 0 // 25 filter
|
||||||
db 45 // 26 header checksum
|
.byte 45 // 26 header checksum
|
||||||
#else
|
#else
|
||||||
dd 0 // 16 uncompressed len
|
.long 0 // 16 uncompressed len
|
||||||
dd 0 // 20 compressed len
|
.long 0 // 20 compressed len
|
||||||
dd 0 // 24 original file size
|
.long 0 // 24 original file size
|
||||||
db 0 // 28 filter id
|
.byte 0 // 28 filter id
|
||||||
db 0 // 29 filter cto
|
.byte 0 // 29 filter cto
|
||||||
db 0 // unused
|
.byte 0 // unused
|
||||||
db 45 // 31 header checksum
|
.byte 45 // 31 header checksum
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* vi:ts=8:et:nowrap */
|
// vi:ts=8:et:nowrap
|
||||||
|
|||||||
Reference in New Issue
Block a user