mirror of https://github.com/nmlgc/ReC98.git
364 lines
8.2 KiB
NASM
364 lines
8.2 KiB
NASM
|
;
|
|||
|
; +-------------------------------------------------------------------------+
|
|||
|
; | This file has been generated by The Interactive Disassembler (IDA) |
|
|||
|
; | Copyright (c) 2009 by Hex-Rays, <support@hex-rays.com> |
|
|||
|
; +-------------------------------------------------------------------------+
|
|||
|
;
|
|||
|
; Input MD5 : E22366913B7288F2EC82E280B386C86D
|
|||
|
|
|||
|
; File Name : th04/ZUN.COM:ZUNINIT (-I)
|
|||
|
; Format : MS-DOS COM-file
|
|||
|
; Base Address: 0h Range: 100h-4F1h Loaded length: 3F1h
|
|||
|
; OS type : MS DOS
|
|||
|
; Application type: Executable 16bit
|
|||
|
|
|||
|
.386
|
|||
|
.model tiny
|
|||
|
.code
|
|||
|
org 100h
|
|||
|
|
|||
|
; =============== S U B R O U T I N E =======================================
|
|||
|
|
|||
|
; Attributes: noreturn thunk
|
|||
|
|
|||
|
public start
|
|||
|
start proc near
|
|||
|
jmp start_0
|
|||
|
start endp
|
|||
|
even
|
|||
|
|
|||
|
|
|||
|
; =============== S U B R O U T I N E =======================================
|
|||
|
|
|||
|
|
|||
|
sub_104 proc far
|
|||
|
cmp cs:byte_2EB, 0
|
|||
|
jnz short locret_115
|
|||
|
mov cs:byte_2EB, 1
|
|||
|
call sub_128
|
|||
|
|
|||
|
locret_115:
|
|||
|
iret
|
|||
|
sub_104 endp
|
|||
|
|
|||
|
|
|||
|
; =============== S U B R O U T I N E =======================================
|
|||
|
|
|||
|
|
|||
|
sub_116 proc far
|
|||
|
cmp cs:byte_2EB, 0
|
|||
|
jnz short locret_127
|
|||
|
mov cs:byte_2EB, 2
|
|||
|
call sub_128
|
|||
|
|
|||
|
locret_127:
|
|||
|
iret
|
|||
|
sub_116 endp
|
|||
|
|
|||
|
|
|||
|
; =============== S U B R O U T I N E =======================================
|
|||
|
|
|||
|
|
|||
|
sub_128 proc near
|
|||
|
pushf
|
|||
|
pusha
|
|||
|
push ds
|
|||
|
push es
|
|||
|
mov ah, 41h
|
|||
|
int 18h
|
|||
|
mov di, offset aVVtvVVrvsvnvog ; "<22>ނ<EFBFBD><DE82>݂ɂr<C982>s<EFBFBD>n<EFBFBD>o<EFBFBD>L<EFBFBD>[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>肵<EFBFBD>Ȃ<EFBFBD>$"
|
|||
|
cmp cs:byte_2EB, 1
|
|||
|
jz short loc_13E
|
|||
|
mov di, offset aVV ; "<22>Ȃ<EFBFBD><C882>łb<C582>n<EFBFBD>o<EFBFBD>x<EFBFBD>L<EFBFBD>[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>肵<EFBFBD>Ă<EFBFBD><C482><EFBFBD>$"
|
|||
|
|
|||
|
loc_13E:
|
|||
|
mov ax, 650h
|
|||
|
call sub_1AE
|
|||
|
add di, offset asc_219 - offset aVVtvVVrvsvnvog ; "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǝv<C68E><76><EFBFBD>́B<CC81>i<EFBFBD>Q<EFBFBD>[<5B><><EFBFBD><EFBFBD><EFBFBD>͂ˁj$"
|
|||
|
mov ax, 6F0h
|
|||
|
call sub_1AE
|
|||
|
add di, offset aBivrvsvnvoglbV - offset asc_219 ; "<22>i<EFBFBD>r<EFBFBD>s<EFBFBD>n<EFBFBD>o<EFBFBD>L<EFBFBD>[<5B>Ŗ߂<C596><DF82><EFBFBD><EFBFBD><EFBFBD><EFBFBD>A<EFBFBD>˂<EFBFBD><CB82>j<EFBFBD>@$"
|
|||
|
mov ax, 790h
|
|||
|
call sub_1AE
|
|||
|
mov bl, cs:byte_2EB
|
|||
|
|
|||
|
loc_15B:
|
|||
|
call sub_192
|
|||
|
jnz short loc_15B
|
|||
|
|
|||
|
loc_160:
|
|||
|
call sub_192
|
|||
|
jz short loc_160
|
|||
|
|
|||
|
loc_165:
|
|||
|
call sub_192
|
|||
|
jnz short loc_165
|
|||
|
mov ah, 40h
|
|||
|
int 18h
|
|||
|
mov di, offset aB@b@b@b@b@b@b@ ; "<22>@<40>@<40>@<40>@<40>@<40>@<40>@<40>@<40>@<40>@<40>@<40>@<40>@<40>@<40>@<40>@<40>@$"
|
|||
|
mov ax, 650h
|
|||
|
call sub_1AE
|
|||
|
mov ax, 6F0h
|
|||
|
call sub_1AE
|
|||
|
mov ax, 790h
|
|||
|
call sub_1AE
|
|||
|
mov ah, 6
|
|||
|
int 18h
|
|||
|
pop es
|
|||
|
pop ds
|
|||
|
popa
|
|||
|
popf
|
|||
|
mov cs:byte_2EB, 0
|
|||
|
retn
|
|||
|
sub_128 endp
|
|||
|
|
|||
|
|
|||
|
; =============== S U B R O U T I N E =======================================
|
|||
|
|
|||
|
|
|||
|
sub_192 proc near
|
|||
|
mov ah, 4
|
|||
|
mov al, 0Ch
|
|||
|
int 18h
|
|||
|
test ah, bl
|
|||
|
retn
|
|||
|
sub_192 endp
|
|||
|
even
|
|||
|
|
|||
|
; =============== S U B R O U T I N E =======================================
|
|||
|
|
|||
|
|
|||
|
sub_19C proc near
|
|||
|
shl ah, 1
|
|||
|
cmp al, 9Fh
|
|||
|
jnb short loc_1A7
|
|||
|
cmp al, 80h
|
|||
|
adc ax, 0FEDFh
|
|||
|
|
|||
|
loc_1A7:
|
|||
|
sbb ax, 0DFFEh
|
|||
|
and ax, 7F7Fh
|
|||
|
retn
|
|||
|
sub_19C endp
|
|||
|
|
|||
|
|
|||
|
; =============== S U B R O U T I N E =======================================
|
|||
|
|
|||
|
|
|||
|
sub_1AE proc near
|
|||
|
push di
|
|||
|
mov bx, di
|
|||
|
mov dx, 0A000h
|
|||
|
mov es, dx
|
|||
|
assume es:nothing
|
|||
|
mov di, ax
|
|||
|
mov dx, ax
|
|||
|
xor ax, ax
|
|||
|
xor cx, cx
|
|||
|
|
|||
|
loc_1BE:
|
|||
|
mov ax, cs:[bx]
|
|||
|
cmp al, 24h
|
|||
|
jz short loc_1DB
|
|||
|
xchg ah, al
|
|||
|
call sub_19C
|
|||
|
xchg ah, al
|
|||
|
sub al, 20h
|
|||
|
stosw
|
|||
|
or ah, 80h
|
|||
|
stosw
|
|||
|
add bx, 2
|
|||
|
add cl, 2
|
|||
|
jmp short loc_1BE
|
|||
|
; ---------------------------------------------------------------------------
|
|||
|
|
|||
|
loc_1DB:
|
|||
|
mov ax, 0A200h
|
|||
|
mov es, ax
|
|||
|
assume es:nothing
|
|||
|
mov di, dx
|
|||
|
mov ax, 41h
|
|||
|
|
|||
|
loc_1E5:
|
|||
|
stosw
|
|||
|
loop loc_1E5
|
|||
|
pop di
|
|||
|
retn
|
|||
|
sub_1AE endp
|
|||
|
|
|||
|
; ---------------------------------------------------------------------------
|
|||
|
ZUNP dw 'ZU', 'NP'
|
|||
|
dword_1EE dd 0
|
|||
|
dword_1F2 dd 0
|
|||
|
aVVtvVVrvsvnvog db '<27>ނ<EFBFBD><DE82>݂ɂr<C982>s<EFBFBD>n<EFBFBD>o<EFBFBD>L<EFBFBD>[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>肵<EFBFBD>Ȃ<EFBFBD>$'
|
|||
|
asc_219 db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǝv<C68E><76><EFBFBD>́B<CC81>i<EFBFBD>Q<EFBFBD>[<5B><><EFBFBD><EFBFBD><EFBFBD>͂ˁj$'
|
|||
|
aBivrvsvnvoglbV db '<27>i<EFBFBD>r<EFBFBD>s<EFBFBD>n<EFBFBD>o<EFBFBD>L<EFBFBD>[<5B>Ŗ߂<C596><DF82><EFBFBD><EFBFBD><EFBFBD><EFBFBD>A<EFBFBD>˂<EFBFBD><CB82>j<EFBFBD>@$'
|
|||
|
aVV db '<27>Ȃ<EFBFBD><C882>łb<C582>n<EFBFBD>o<EFBFBD>x<EFBFBD>L<EFBFBD>[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>肵<EFBFBD>Ă<EFBFBD><C482><EFBFBD>$'
|
|||
|
aVivBBbvVVmbBbb db '<27><><EFBFBD>ȁ`<60>B<EFBFBD>ӂ<EFBFBD><D382><EFBFBD><EFBFBD>`<60>B<EFBFBD>@<40>@<40>i<EFBFBD><69><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>x<EFBFBD>A$'
|
|||
|
aVbvnvovxglbIqv db '<27>b<EFBFBD>n<EFBFBD>o<EFBFBD>x<EFBFBD>L<EFBFBD>[<5B><><EFBFBD><EFBFBD><EFBFBD>Ζ߂<CE96><DF82><EFBFBD><EFBFBD><EFBFBD><EFBFBD>A<EFBFBD>˂<EFBFBD><CB82>j$'
|
|||
|
aB@b@b@b@b@b@b@ db '<27>@<40>@<40>@<40>@<40>@<40>@<40>@<40>@<40>@<40>@<40>@<40>@<40>@<40>@<40>@<40>@<40>@$'
|
|||
|
byte_2EB db 0
|
|||
|
|
|||
|
; =============== S U B R O U T I N E =======================================
|
|||
|
|
|||
|
|
|||
|
sub_2EC proc near
|
|||
|
mov dx, offset aIntvectorSetPr ; "\r\nINTvector set program zuninit.com "...
|
|||
|
mov ah, 9
|
|||
|
int 21h ; DOS - PRINT STRING
|
|||
|
; DS:DX -> string terminated by "$"
|
|||
|
mov ax, 3506h
|
|||
|
int 21h ; DOS - 2+ - GET INTERRUPT VECTOR
|
|||
|
; AL = interrupt number
|
|||
|
; Return: ES:BX = value of interrupt vector
|
|||
|
xor ax, ax
|
|||
|
cmp es:ZUNP+0, 'ZU'
|
|||
|
jnz short locret_30D
|
|||
|
cmp es:ZUNP+2, 'NP'
|
|||
|
jnz short locret_30D
|
|||
|
inc ax
|
|||
|
|
|||
|
locret_30D:
|
|||
|
retn
|
|||
|
sub_2EC endp
|
|||
|
|
|||
|
|
|||
|
; =============== S U B R O U T I N E =======================================
|
|||
|
|
|||
|
start_0 proc near
|
|||
|
mov si, 81h
|
|||
|
|
|||
|
loc_311:
|
|||
|
lodsb
|
|||
|
cmp al, 0Dh
|
|||
|
jz short loc_322
|
|||
|
cmp al, '/'
|
|||
|
jz short loc_32C
|
|||
|
cmp al, '-'
|
|||
|
jz short loc_32C
|
|||
|
cmp al, ' '
|
|||
|
jbe short loc_311
|
|||
|
|
|||
|
loc_322:
|
|||
|
call sub_2EC
|
|||
|
test ax, ax
|
|||
|
jz short loc_344
|
|||
|
jmp loc_3B0
|
|||
|
; ---------------------------------------------------------------------------
|
|||
|
|
|||
|
loc_32C:
|
|||
|
lodsb
|
|||
|
cmp al, ' '
|
|||
|
jbe loc_3BA
|
|||
|
and al, 0DFh
|
|||
|
cmp al, 'R'
|
|||
|
jnz loc_3BA
|
|||
|
call sub_2EC
|
|||
|
test ax, ax
|
|||
|
jnz short loc_381
|
|||
|
jmp short loc_3B5
|
|||
|
; ---------------------------------------------------------------------------
|
|||
|
|
|||
|
loc_344:
|
|||
|
mov ax, 3506h
|
|||
|
int 21h ; DOS - 2+ - GET INTERRUPT VECTOR
|
|||
|
; AL = interrupt number
|
|||
|
; Return: ES:BX = value of interrupt vector
|
|||
|
mov word ptr dword_1F2, bx
|
|||
|
mov word ptr dword_1F2+2, es
|
|||
|
mov dx, offset sub_104
|
|||
|
mov ax, 2506h
|
|||
|
int 21h ; DOS - SET INTERRUPT VECTOR
|
|||
|
; AL = interrupt number
|
|||
|
; DS:DX = new vector to be used for specified interrupt
|
|||
|
mov ax, 3505h
|
|||
|
int 21h ; DOS - 2+ - GET INTERRUPT VECTOR
|
|||
|
; AL = interrupt number
|
|||
|
; Return: ES:BX = value of interrupt vector
|
|||
|
mov word ptr dword_1EE, bx
|
|||
|
mov word ptr dword_1EE+2, es
|
|||
|
mov dx, offset sub_116
|
|||
|
mov ax, 2505h
|
|||
|
int 21h ; DOS - SET INTERRUPT VECTOR
|
|||
|
; AL = interrupt number
|
|||
|
; DS:DX = new vector to be used for specified interrupt
|
|||
|
mov dx, offset aVVxvVVVixfiovi ; "<22><><EFBFBD>傱<EFBFBD><E582B1><EFBFBD>Ƃ<EFBFBD><C682><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˁ<EFBFBD>\r\n\r\n$"
|
|||
|
mov ah, 9
|
|||
|
int 21h ; DOS - PRINT STRING
|
|||
|
; DS:DX -> string terminated by "$"
|
|||
|
mov dx, offset sub_2EC
|
|||
|
shr dx, 4
|
|||
|
inc dx
|
|||
|
mov ax, 3100h
|
|||
|
int 21h ; DOS - DOS 2+ - TERMINATE BUT STAY RESIDENT
|
|||
|
; AL = exit code, DX = program size, in paragraphs
|
|||
|
; ---------------------------------------------------------------------------
|
|||
|
|
|||
|
loc_381:
|
|||
|
push ds
|
|||
|
lds dx, es:dword_1F2
|
|||
|
mov ax, 2506h
|
|||
|
int 21h ; DOS - SET INTERRUPT VECTOR
|
|||
|
; AL = interrupt number
|
|||
|
; DS:DX = new vector to be used for specified interrupt
|
|||
|
lds dx, es:dword_1EE
|
|||
|
mov ax, 2505h
|
|||
|
int 21h ; DOS - SET INTERRUPT VECTOR
|
|||
|
; AL = interrupt number
|
|||
|
; DS:DX = new vector to be used for specified interrupt
|
|||
|
pop ds
|
|||
|
push es
|
|||
|
mov es, word ptr es:2Ch
|
|||
|
assume es:nothing
|
|||
|
mov ah, 49h
|
|||
|
int 21h ; DOS - 2+ - FREE MEMORY
|
|||
|
; ES = segment address of area to be freed
|
|||
|
pop es
|
|||
|
mov ah, 49h
|
|||
|
int 21h ; DOS - 2+ - FREE MEMORY
|
|||
|
; ES = segment address of area to be freed
|
|||
|
mov dx, offset aOVsvVVixfiov ; "<22><EFBFBD><D882>Ă<EFBFBD><C482><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ԃ<EFBFBD><D482><EFBFBD><EFBFBD>܂<EFBFBD><DC82>ˁB<CB81><42><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?"...
|
|||
|
jnb short loc_3BD
|
|||
|
mov dx, offset aGbgvgki ; "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>G<EFBFBD><47><EFBFBD>[<5B>ł<EFBFBD>\r\n$"
|
|||
|
jmp short loc_3BD
|
|||
|
; ---------------------------------------------------------------------------
|
|||
|
|
|||
|
loc_3B0:
|
|||
|
mov dx, offset aVVVPatuvVVVB ; "<22><><EFBFBD>łɏ풓<C98F><ED9293><EFBFBD>Ă܂<C482><DC82>`\r\n\r\n$"
|
|||
|
jmp short loc_3BD
|
|||
|
; ---------------------------------------------------------------------------
|
|||
|
|
|||
|
loc_3B5:
|
|||
|
mov dx, offset aVVBapatuvVVVvv ; "<22>܂<EFBFBD><DC82>A<EFBFBD>풓<EFBFBD><ED9293><EFBFBD>ĂȂ<C482><C882>ł<EFBFBD>\r\n\r\n$"
|
|||
|
jmp short loc_3BD
|
|||
|
; ---------------------------------------------------------------------------
|
|||
|
|
|||
|
loc_3BA:
|
|||
|
mov dx, offset aICbxscVGigvgvg ; "<22>Ӗ<EFBFBD><D396>s<EFBFBD><73><EFBFBD>ȃI<C883>v<EFBFBD>V<EFBFBD><56><EFBFBD><EFBFBD><EFBFBD>悧<EFBFBD>i<EFBFBD>I<EFBFBD>v<EFBFBD>V<EFBFBD><56><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "...
|
|||
|
|
|||
|
loc_3BD:
|
|||
|
mov ah, 9
|
|||
|
int 21h ; DOS - PRINT STRING
|
|||
|
; DS:DX -> string terminated by "$"
|
|||
|
mov ax, 4C00h
|
|||
|
int 21h ; DOS - 2+ - QUIT WITH EXIT CODE (EXIT)
|
|||
|
start_0 endp ; AL = exit code
|
|||
|
|
|||
|
; ---------------------------------------------------------------------------
|
|||
|
aIntvectorSetPr db 0Dh,0Ah
|
|||
|
db 'INTvector set program zuninit.com Version1.02 (c)zun 1998',0Dh,0Ah,'$'
|
|||
|
aVVxvVVVixfiovi db '<27><><EFBFBD>傱<EFBFBD><E582B1><EFBFBD>Ƃ<EFBFBD><C682><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˁ<EFBFBD>',0Dh,0Ah
|
|||
|
db 0Dh,0Ah,'$'
|
|||
|
aVVVPatuvVVVB db '<27><><EFBFBD>łɏ풓<C98F><ED9293><EFBFBD>Ă܂<C482><DC82>`',0Dh,0Ah
|
|||
|
db 0Dh,0Ah,'$'
|
|||
|
aOVsvVVixfiov db '<27><EFBFBD><D882>Ă<EFBFBD><C482><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ԃ<EFBFBD><D482><EFBFBD><EFBFBD>܂<EFBFBD><DC82>ˁB<CB81><42><EFBFBD><EFBFBD><EFBFBD>ł͂܂<CD82><DC82><EFBFBD>',0Dh,0Ah
|
|||
|
|
|||
|
db 0Dh,0Ah,'$'
|
|||
|
aVVBapatuvVVVvv db '<27>܂<EFBFBD><DC82>A<EFBFBD>풓<EFBFBD><ED9293><EFBFBD>ĂȂ<C482><C882>ł<EFBFBD>',0Dh,0Ah
|
|||
|
db 0Dh,0Ah,'$'
|
|||
|
aICbxscVGigvgvg db '<27>Ӗ<EFBFBD><D396>s<EFBFBD><73><EFBFBD>ȃI<C883>v<EFBFBD>V<EFBFBD><56><EFBFBD><EFBFBD><EFBFBD>悧<EFBFBD>i<EFBFBD>I<EFBFBD>v<EFBFBD>V<EFBFBD><56><EFBFBD><EFBFBD><EFBFBD><EFBFBD> -R : <20><><EFBFBD><EFBFBD> <20>̂݁j',0Dh,0Ah,'$'
|
|||
|
|
|||
|
aGbgvgki db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>G<EFBFBD><47><EFBFBD>[<5B>ł<EFBFBD>',0Dh,0Ah,'$'
|
|||
|
|
|||
|
end start
|