Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

LZ-DOS 7.1 (Miscellaneous)

posted by sol, 19.11.2007, 21:39
(edited by sol on 19.11.2007, 22:29)

Let's continue, shall we?

Now, clip everything up to 0x205 in IO.SYS, since "mov si, 0205h" refers there.

Clip everything after ~04FFh bytes. You should now have a small file around 1300 bytes. Save it as "DATA". Assemble this [edit: with TASM] and run it. Omg, look, it "decrypted" into the exact same 1279 bytes that are at 0x202 in MS-DOS 7.10 IO.SYS.

What was the point of the LZ-DOS code? There wasn't. It just obfuscated it. If you take 1279 bytes from MS-DOS' IO.SYS at 0x202, and paste it into LZ-DOS at 0x202, over top of the 1279 bytes there...LZ-DOS will boot just fine. Why? LZ-DOS 7.10 is a hacked copy of MS-DOS 7.10.

locals
assume ds:PROGRAM, cs:PROGRAM
PROGRAM segment public word 'CODE'
org 100h
.386p
Start:

cld
mov ax, cs
mov ds, ax
mov es, ax

mov dx, offset sfile
mov ax, 3D00h
int 21h
mov word ptr [shandle], ax

mov dx, offset dfile
mov ah, 3ch
mov cx, 0000h
int 21h
mov word ptr [dhandle], ax

mov bx, word ptr [shandle]            ; read from file
mov cx, 1300
mov dx, offset buffer
mov ah, 3Fh
int 21h

mov di, offset buffer-3
mov si, offset buffer
mov cx, 04FFh
whateverthisdoes:
xor byte ptr cs:[si],cl
movsb
loop whateverthisdoes

mov cx, 1300
mov dx, offset buffer-3
mov ah, 40h
mov bx, word ptr [dhandle]
int 21h

mov ah, 3Eh
mov bx, word ptr [shandle]
int 21h

mov ah, 3Eh
mov bx, word ptr [dhandle]
int 21h

mov ax, 4c00h
int 21h
;---------------------------------------------------------
sfile       db 'DATA',00h
dfile       db 'DECD',00h
shandle     dw ?
dhandle     dw ?
padding     db 100 dup(?)
buffer      db 2000 dup(?)

PROGRAM ends
END Start

Thread locked
 

Complete thread:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 179 users online (0 registered, 179 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum