TRAP 1.26 unpacking script v1.1 for TR 2.03 by Independent (IND)
5 of 5 files
vag
-
This download is an executable MS-DOS program that will not run on a modern computer.
It needs a DOS emulator such as DOSBox-X, Staging;
or a virtualized MS-DOS or FreeDOS system.
Browsers may flag this download as unwanted or malicious. If unsure, scan it with VirusTotal. -
Last modified Dec 3, 2017 7:32:43 PM
MD5 checksum 22a5709e8c898618b516a16c2f669726
Mime type Zip archive data
Download xtrap.126-vag.zip
Size 4 kB
2000
- Zip - DOS / Computer tool
- Vag, program credits
3 items in the archive
- UNTRP126.INC
- U_TRAP26.TR
- U_TRAP26.TR1
;───────────────────────────────────────────────────────────────────────────;
; TRAP 1.26 unpacking script v1.1 for TR 2.03-
; (c) by VAG, [email protected], Moscow, Russia, 31-Mar-2000 21:12
;───────────────────────────────────────────────────────────────────────────;
; Written todays within few hours (in fact, it's my first script for TR ;)
;
; Usage:
; Start TR <traped_file> , and type `do untrp126.inc` . Wait...
; After unpacking quit from TR and launch MkExe to create valid executable.
;
; Known problems:
; TR 2.03 (or lower?) required because 2.52 works wrong.
; I don't know how to provide correct length of image to wexe command, so
; file will be bigger than it must be... Read comments near the end of this
; script to get some info about real file size.
; Unpacking of big files is VERY slow!
;
;───────────────────────────────────────────────────────────────────────────;
;These two commands for debugging purposes only
r32
autojmp off
;###########################################################################;
;Real unpacking starts here
;###########################################################################;
;First pass
exe1
reload
;Look for polymorphic BSR-trick
goxb 66,0f,bd
e $+2 01,e3
;Emulate BSR
goxb 8a,ca
a
mov cl,1f
;#
;Look for jecxz trick
goxb 67,e3,03,eb,05
;Bypass them
r ip ip+3
;#
;Bypass few tricks
e ds:1 '7'
;#
;Bypass another jecxz trick
goxb 67,e3,06,b8
r ip ip+3
;#
;FS-trick
goxb 66,0f,a0
tt
t
t
tt
;Big decryption loop
r fs cs+300
t
m $+10ld4 cs:2000
m $+dl1 cs:2032
e cs:2033 90,90,90,90
e cs:20b6 a8
e cs:20d4 c3
push ip+e4
r ip 2000
gg cs:20d4
t
;Finalize loop
r ip ip+8
tt
;#
;Yet another jecxz
goxb 67,e3,02
r ip ip+3
;#
;Flags trick
goxb 66,9c,66,58
t
t
r al 2
;#
;And another jecxz ;)
goxb 67,e3,03
r ip ip+3
;#
;And yet another jecxz ;)
goxb 67,e3,03
r ip ip+3
;#
;LazyCall trick
goxb 26,c6,07,cb,26,80
r ip ip+12
;#
goxb 55,17,fb,33
goxb ea
t
wexe1
;###########################################################################;
;First pass completed.
;Here is the second one, absolutelly identical previous, just exe2 & wexe2
;###########################################################################;
exe2
reload
;Look for polymorphic BSR-trick
goxb 66,0f,bd
e $+2 01,e3
;Emulate BSR
goxb 8a,ca
a
mov cl,1f
;#
;Look for jecxz trick
goxb 67,e3,03,eb,05
;Bypass them
r ip ip+3
;#
;Bypass few tricks
e ds:1 '7'
;#
;Bypass another jecxz trick
goxb 67,e3,06,b8
r ip ip+3
;#
;FS-trick
goxb 66,0f,a0
tt
t
t
tt
;Big decryption loop
r fs cs+300
t
m $+10ld4 cs:2000
m $+dl1 cs:2032
e cs:2033 90,90,90,90
e cs:20b6 a8
e cs:20d4 c3
push ip+e4
r ip 2000
gg cs:20d4
t
;Finalize loop
r ip ip+8
tt
;#
;Yet another jecxz
goxb 67,e3,02
r ip ip+3
;#
;Flags trick
goxb 66,9c,66,58
t
t
r al 2
;#
;And another jecxz ;)
goxb 67,e3,03
r ip ip+3
;#
;And yet another jecxz ;)
goxb 67,e3,03
r ip ip+3
;#
;LazyCall trick
goxb 26,c6,07,cb,26,80
r ip ip+12
;#
;────────────────── Important info! ──────────────────────────
;At this point we can remember original size of image,
;but I don't know how to use it with wexe command :(((
;Uncomment following lines to do this.
;goxb 67,e3,03
;;Here is it
;m $+5l4 cs:2000
;─────────────────────────────────────────────────────────────
;#
;Final steps to entrypoint
goxb 55,17,fb,33
goxb ea
t
wexe2
;###########################################################################;
;Ta-da! Unpacking complete (I hope so ;) Type Q to quit and use MkExe
;Hi Chris! How about prize for me? ;)