1
0
mirror of https://github.com/upx/upx synced 2025-09-28 19:06:07 +08:00

Disabled the new filter for now.

committer: mfx <mfx> 977230259 +0000
This commit is contained in:
Markus F.X.J. Oberhumer 2000-12-19 12:50:59 +00:00
parent 82eb15c670
commit e5647cb0aa
2 changed files with 6 additions and 14 deletions

View File

@ -102,7 +102,7 @@ endif
default: default:
@echo "UPX info: type 'make all' if you have all the needed build tools." @echo "UPX info: type 'make all' if you have all the needed build tools."
all: stubs upxb upxd all: stubs ## upxb upxd
stubs: $(STUBS) stubs: $(STUBS)

View File

@ -95,25 +95,17 @@ cjt16_L2:
;; ============= 32-BIT CALLTRICK & JUMPTRICK ;; ============= 32-BIT CALLTRICK & JUMPTRICK
;; ============= ;; =============
;; call & jump & Jxx trick : 3 in 1 ;; call & jump trick : 2 in 1
%macro cjt32 1 %macro cjt32 1
%ifdef __CALLTR00__ %ifdef __CALLTR00__
mov bh, 0x0f ; avoid displ and literal in same instr
mov ecx, 'TEXL' mov ecx, 'TEXL'
calltrickloop: calltrickloop:
mov al, [edi] mov al, [edi]
inc edi inc edi
sub al, 0x80 ; base of Jxx <d32> sub al, 0xE8
cmp al, 0x8f - 0x80 ; span of Jxx <d32>
ja ct2 ; not Jxx <d32>
cmp byte [edi -2], bh ; prefix opcode of Jxx <d32>
je ct3
ct2:
sub al, 0xE8 - 0x80 ; base of JMP/CALL <d32>
ct1: ct1:
cmp al, 0xE9 - 0xE8 ; span of JMP/CALL <d32> cmp al, 1
ja calltrickloop ja calltrickloop
ct3:
%ifdef __CTCLEVE1__ %ifdef __CTCLEVE1__
cmp byte [edi], '?' cmp byte [edi], '?'
jnz calltrickloop jnz calltrickloop
@ -130,14 +122,14 @@ ct3:
xchg al, ah xchg al, ah
%endif; __CALLTR02__ %endif; __CALLTR02__
sub eax, edi sub eax, edi
sub bl, 0xE8 ; base of JMP/CALL <d32> sub bl, 0xE8
%ifnidn %1,0 %ifnidn %1,0
add eax, %1 add eax, %1
%endif %endif
mov [edi], eax mov [edi], eax
add edi, byte 5 add edi, byte 5
mov al, bl mov al, bl
loop ct1 ; no Jxx <d32> next: needs 0x0f prefix first loop ct1
%else; __CALLTR10__ %else; __CALLTR10__
;; 32-bit call XOR jump trick ;; 32-bit call XOR jump trick
mov ecx, 'TEXL' mov ecx, 'TEXL'