; ; +-------------------------------------------------------------------------+ ; | This file has been generated by The Interactive Disassembler (IDA) | ; | Copyright (c) 2009 by Hex-Rays, | ; +-------------------------------------------------------------------------+ ; ; Input MD5 : AD4E53E1F1A042FBDA82F86B9BD6728C ; File Name : th01/OP.EXE ; Format : MS-DOS executable (EXE) ; Base Address: 0h Range: 0h-14040h Loaded length: 13418h ; Entry Point : 0:0 ; OS type : MS DOS ; Application type: Executable 16bit CGROUP00 group seg000 CGROUP01 group seg001 CGROUP02 group seg002 CGROUP03 group seg003 CGROUP04 group seg004 CGROUP05 group seg005 CGROUP06 group seg006 CGROUP07 group seg007 CGROUP08 group seg008 CGROUP09 group seg009 CGROUP10 group seg010 CGROUP11 group seg011 CGROUP12 group seg012 CGROUP13 group E87_PROG CGROUP14 group EMU_PROG CGROUP15 group seg015 .286 ; Force the .model directive to create 16-bit default segments... .model large __LARGE__ equ 1 .386 ; ... then switch to what we actually need. ; And yes, we can't move this to an include file for some reason. include ReC98.inc include th01/th01.asm include libs/BorlandC/regs.inc ; =========================================================================== ; Segment type: Pure code seg000 segment word public 'CODE' use16 assume cs:seg000 assume es:nothing, ss:_STACK, ds:dseg, fs:nothing, gs:nothing include libs/BorlandC/c0.asm db 0 include libs/piloadc/piloadc.asm include libs/master.lib/graph_400line.asm include libs/master.lib/graph_clear.asm include libs/master.lib/graph_show.asm include libs/master.lib/graph_start.asm include libs/master.lib/palette_show.asm include libs/master.lib/palette_init.asm include libs/master.lib/respal_exist.asm include libs/master.lib/respal_free.asm include libs/master.lib/resdata.asm include libs/master.lib/file_read.asm include libs/master.lib/file_close.asm include libs/master.lib/file_ropen.asm include libs/master.lib/file_seek.asm include libs/master.lib/dos_free.asm include libs/master.lib/keystart.asm include libs/master.lib/keybios.asm include libs/master.lib/dos_ropen.asm include libs/master.lib/egc.asm include libs/master.lib/random.asm include libs/BorlandC/emu/nec_fpinit.asm include libs/BorlandC/math/realcvt.asm include libs/BorlandC/math/xcvt.asm include libs/BorlandC/math/fperr.asm include libs/BorlandC/math/_pow10.asm include libs/BorlandC/math/pow10d.asm include libs/BorlandC/math/ftol.asm include libs/BorlandC/_abort.asm include libs/BorlandC/stpcpy.asm include libs/BorlandC/abort.asm include libs/BorlandC/atexit.asm include libs/BorlandC/del.asm include libs/BorlandC/delarray.asm include libs/BorlandC/dosenv.asm include libs/BorlandC/dosfattr.asm include libs/BorlandC/dosgdriv.asm include libs/BorlandC/errormsg.asm include libs/BorlandC/exit.asm include libs/BorlandC/f_scopy.asm include libs/BorlandC/getvect.asm include libs/BorlandC/H_LDIV.ASM include libs/BorlandC/H_LLSH.ASM include libs/BorlandC/H_PADD.ASM include libs/BorlandC/ioerror.asm include libs/BorlandC/_isatty.asm include libs/BorlandC/longtoa.asm include libs/BorlandC/lseek.asm include libs/BorlandC/mkname.asm include libs/BorlandC/new.asm include libs/BorlandC/newarray.asm include libs/BorlandC/N_LXMUL.ASM include libs/BorlandC/N_PCMP.ASM include libs/BorlandC/reada.asm include libs/BorlandC/segread.asm include libs/BorlandC/setupio.asm include libs/BorlandC/cconv.asm include libs/BorlandC/toupper.asm include libs/BorlandC/unlink.asm include libs/BorlandC/vprinter.asm include libs/BorlandC/xclose.asm include libs/BorlandC/xxas.asm include libs/BorlandC/xxv.asm include libs/BorlandC/cputype.asm include libs/BorlandC/FARHEAP.ASM include libs/BorlandC/fbrk.asm include libs/BorlandC/int86.asm include libs/BorlandC/intdos.asm include libs/BorlandC/ioctl.asm include libs/BorlandC/signal.asm include libs/BorlandC/_access.asm include libs/BorlandC/pathops.asm include libs/BorlandC/atol.asm include libs/BorlandC/chmoda.asm include libs/BorlandC/close.asm include libs/BorlandC/closea.asm include libs/BorlandC/eof.asm include libs/BorlandC/fclose.asm include libs/BorlandC/fflush.asm include libs/BorlandC/flength.asm include libs/BorlandC/flushall.asm include libs/BorlandC/fopen.asm include libs/BorlandC/fprintf.asm include libs/BorlandC/fputs.asm include libs/BorlandC/fread.asm include libs/BorlandC/fseek.asm include libs/BorlandC/fullpath.asm include libs/BorlandC/getc.asm include libs/BorlandC/getdcwd.asm include libs/BorlandC/getenv.asm include libs/BorlandC/memcmp.asm include libs/BorlandC/memcpy.asm include libs/BorlandC/memset.asm include libs/BorlandC/movmem.asm include libs/BorlandC/open.asm include libs/BorlandC/opena.asm include libs/BorlandC/printf.asm include libs/BorlandC/putc.asm include libs/BorlandC/read.asm include libs/BorlandC/srchenv.asm include libs/BorlandC/srchstr.asm include libs/BorlandC/setvbuf.asm include libs/BorlandC/sprintf.asm include libs/BorlandC/_strcat.asm include libs/BorlandC/_strcmp.asm include libs/BorlandC/_strcpy.asm include libs/BorlandC/_stricmp.asm include libs/BorlandC/_strlen.asm include libs/BorlandC/strrchr.asm include libs/BorlandC/write.asm include libs/BorlandC/writea.asm include libs/BorlandC/xfclose.asm include libs/BorlandC/xfflush.asm include libs/BorlandC/xalloc.asm include libs/BorlandC/xmsg.asm include libs/BorlandC/xx.asm include libs/BorlandC/cvtfak.asm include libs/BorlandC/doscmd.asm include libs/BorlandC/exec.asm include libs/BorlandC/execl.asm include libs/BorlandC/realcvt.asm include libs/BorlandC/setargv.asm include libs/BorlandC/setblock.asm include libs/BorlandC/setenvp.asm include libs/BorlandC/ctor2.asm include libs/BorlandC/ctor3.asm include libs/BorlandC/strings.asm include libs/BorlandC/ccomdely.asm include libs/BorlandC/cibmdely.asm include libs/BorlandC/cnecdely.asm include libs/BorlandC/conioini.asm include libs/BorlandC/mbjmsjis.asm include libs/BorlandC/loadprog.asm seg000 ends ; --------------------------------------------------------------------------- ; =========================================================================== ; Segment type: Pure code seg001 segment byte public 'CODE' use16 assume cs:seg001 ;org 4 assume es:nothing, ss:nothing, ds:dseg, fs:nothing, gs:nothing enter 2, 0 push si push di xor si, si jmp short loc_A1E5 ; --------------------------------------------------------------------------- loc_A1CE: push 190h call @$bnwa$qui pop cx mov bx, si shl bx, 2 mov [bx+118Eh], dx mov [bx+118Ch], ax inc si loc_A1E5: cmp si, 50h ; 'P' jl short loc_A1CE push 4 call sub_B9C0 push 1 call sub_B943 add sp, 4 xor si, si jmp short loc_A22A ; --------------------------------------------------------------------------- loc_A1FF: xor di, di mov [bp-2], si jmp short loc_A223 ; --------------------------------------------------------------------------- loc_A206: les bx, dword_13672 add bx, [bp-2] mov al, es:[bx] mov bx, si shl bx, 2 les bx, [bx+118Ch] add bx, di mov es:[bx], al inc di add word ptr [bp-2], 50h ; 'P' loc_A223: cmp di, 190h jl short loc_A206 inc si loc_A22A: cmp si, 50h ; 'P' jl short loc_A1FF call sub_BA0A push 0 call sub_B943 pop cx pop di pop si leave retf ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_A240 proc far _ptr = byte ptr -12h var_B = byte ptr -0Bh var_A = byte ptr -0Ah var_9 = byte ptr -9 var_8 = byte ptr -8 stream = dword ptr -6 var_1 = byte ptr -1 enter 12h, 0 mov [bp+var_1], 0 push ds push offset mode ; "rb" push ds push offset path ; "reiiden.cfg" call _fopen add sp, 8 mov word ptr [bp+stream+2], dx mov word ptr [bp+stream], ax or ax, dx jnz short loc_A266 loc_A262: mov [bp+var_1], 1 loc_A266: cmp [bp+var_1], 0 jnz short loc_A2CE pushd [bp+stream] ; stream push 0B0001h ; size push ss lea ax, [bp+_ptr] push ax ; ptr call _fread add sp, 0Ch push 7 ; n push ds push offset s ; "REIIDEN" push ss lea ax, [bp+_ptr] push ax ; s1 call _memcmp add sp, 0Ah or ax, ax jz short loc_A2A8 pushd [bp+stream] ; stream call _fclose add sp, 4 jmp short loc_A262 ; --------------------------------------------------------------------------- loc_A2A8: mov al, [bp+var_B] mov byte ptr word_12320, al mov al, [bp+var_A] mov byte ptr word_12320+1, al mov al, [bp+var_9] mov byte ptr word_12322, al mov al, [bp+var_8] mov byte ptr word_12322+1, al pushd [bp+stream] ; stream call _fclose add sp, 4 leave retf ; --------------------------------------------------------------------------- loc_A2CE: mov byte ptr word_12320, 1 mov byte ptr word_12320+1, 1 mov byte ptr word_12322, 1 mov byte ptr word_12322+1, 2 leave retf sub_A240 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_A2E4 proc far stream = dword ptr -6 var_1 = byte ptr -1 enter 6, 0 mov [bp+var_1], 0 push ds push offset aWb ; "wb" push ds push offset path ; "reiiden.cfg" call _fopen add sp, 8 mov word ptr [bp+stream+2], dx mov word ptr [bp+stream], ax or ax, dx jnz short loc_A30A mov [bp+var_1], 1 loc_A30A: cmp [bp+var_1], 0 jnz short locret_A361 pushd [bp+stream] ; stream push ds push offset s ; "REIIDEN" call _fputs pushd [bp+stream] ; stream mov al, byte ptr word_12320 cbw push ax ; c call _fputc pushd [bp+stream] ; stream mov al, byte ptr word_12320+1 cbw push ax ; c call _fputc pushd [bp+stream] ; stream mov al, byte ptr word_12322 cbw push ax ; c call _fputc pushd [bp+stream] ; stream mov al, byte ptr word_12322+1 cbw push ax ; c call _fputc pushd [bp+stream] ; stream call _fclose add sp, 24h locret_A361: leave retf sub_A2E4 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_A363 proc far var_30 = byte ptr -30h var_2F = byte ptr -2Fh outregs = REGS ptr -20h inregs = REGS ptr -10h enter 30h, 0 mov byte ptr [bp+inregs+1], 4 mov byte ptr [bp+inregs], 7 push ss lea ax, [bp+outregs] push ax ; outregs push ss lea ax, [bp+inregs] push ax ; inregs push 18h ; intno call _int86 mov byte ptr [bp+inregs+1], 4 mov byte ptr [bp+inregs], 8 push ss lea ax, [bp+var_30] push ax ; outregs push ss lea ax, [bp+inregs] push ax ; inregs push 18h ; intno call _int86 add sp, 14h test byte ptr [bp+outregs+1], 4 jnz short loc_A3A8 test [bp+var_2F], 8 jz short loc_A3C9 loc_A3A8: cmp word_12334, 0 jnz short loc_A3CF mov al, byte_12325 dec al mov byte_12325, al cbw or ax, ax jge short loc_A3C1 mov byte_12325, 3 loc_A3C1: mov word_12334, 1 jmp short loc_A3CF ; --------------------------------------------------------------------------- loc_A3C9: mov word_12334, 0 loc_A3CF: mov byte ptr [bp+inregs+1], 4 mov byte ptr [bp+inregs], 9 push ss lea ax, [bp+var_30] push ax ; outregs push ss lea ax, [bp+inregs] push ax ; inregs push 18h ; intno call _int86 add sp, 0Ah test byte ptr [bp+outregs+1], 20h jnz short loc_A3F7 test [bp+var_2F], 8 jz short loc_A419 loc_A3F7: cmp word_12336, 0 jnz short loc_A41F mov al, byte_12325 inc al mov byte_12325, al cbw cmp ax, 3 jle short loc_A411 mov byte_12325, 0 loc_A411: mov word_12336, 1 jmp short loc_A41F ; --------------------------------------------------------------------------- loc_A419: mov word_12336, 0 loc_A41F: mov byte ptr [bp+inregs+1], 4 mov byte ptr [bp+inregs], 3 push ss lea ax, [bp+outregs] push ax ; outregs push ss lea ax, [bp+inregs] push ax ; inregs push 18h ; intno call _int86 add sp, 0Ah test byte ptr [bp+outregs+1], 10h jz short loc_A448 mov byte_12327, 1 jmp short loc_A44D ; --------------------------------------------------------------------------- loc_A448: mov byte_12327, 0 loc_A44D: mov byte ptr [bp+inregs+1], 4 mov byte ptr [bp+inregs], 5 push ss lea ax, [bp+outregs] push ax ; outregs push ss lea ax, [bp+inregs] push ax ; inregs push 18h ; intno call _int86 add sp, 0Ah test byte ptr [bp+outregs+1], 2 jz short loc_A476 mov byte_12328, 1 jmp short loc_A47B ; --------------------------------------------------------------------------- loc_A476: mov byte_12328, 0 loc_A47B: mov byte ptr [bp+inregs+1], 4 mov byte ptr [bp+inregs], 0 push ss lea ax, [bp+outregs] push ax ; outregs push ss lea ax, [bp+inregs] push ax ; inregs push 18h ; intno call _int86 add sp, 0Ah test byte ptr [bp+outregs+1], 1 jz short loc_A4A4 mov byte_12329, 1 leave retf ; --------------------------------------------------------------------------- loc_A4A4: mov byte_12329, 0 leave retf sub_A363 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_A4AB proc far var_30 = byte ptr -30h var_2F = byte ptr -2Fh outregs = REGS ptr -20h inregs = REGS ptr -10h enter 30h, 0 mov byte ptr [bp+inregs+1], 4 mov byte ptr [bp+inregs], 7 push ss lea ax, [bp+outregs] push ax ; outregs push ss lea ax, [bp+inregs] push ax ; inregs push 18h ; intno call _int86 mov byte ptr [bp+inregs+1], 4 mov byte ptr [bp+inregs], 8 push ss lea ax, [bp+var_30] push ax ; outregs push ss lea ax, [bp+inregs] push ax ; inregs push 18h ; intno call _int86 add sp, 14h test byte ptr [bp+outregs+1], 4 jnz short loc_A4F0 test [bp+var_2F], 8 jz short loc_A512 loc_A4F0: cmp word_12339, 0 jnz short loc_A518 mov al, byte_12325 dec al mov byte_12325, al cbw or ax, ax jge short loc_A50A mov al, byte_12338 mov byte_12325, al loc_A50A: mov word_12339, 1 jmp short loc_A518 ; --------------------------------------------------------------------------- loc_A512: mov word_12339, 0 loc_A518: test byte ptr [bp+outregs+1], 8 jnz short loc_A524 test [bp+var_2F], 40h jz short loc_A52B loc_A524: mov byte_12326, 1 jmp short loc_A530 ; --------------------------------------------------------------------------- loc_A52B: mov byte_12326, 0 loc_A530: mov byte ptr [bp+inregs+1], 4 mov byte ptr [bp+inregs], 9 push ss lea ax, [bp+var_30] push ax ; outregs push ss lea ax, [bp+inregs] push ax ; inregs push 18h ; intno call _int86 add sp, 0Ah test byte ptr [bp+outregs+1], 20h jnz short loc_A558 test [bp+var_2F], 8 jz short loc_A57F loc_A558: cmp word_1233B, 0 jnz short loc_A585 mov al, byte_12325 inc al mov byte_12325, al cbw mov dl, byte_12338 mov dh, 0 cmp ax, dx jle short loc_A577 mov byte_12325, 0 loc_A577: mov word_1233B, 1 jmp short loc_A585 ; --------------------------------------------------------------------------- loc_A57F: mov word_1233B, 0 loc_A585: test byte ptr [bp+outregs+1], 10h jnz short loc_A591 test [bp+var_2F], 1 jz short loc_A598 loc_A591: mov byte_1232B, 1 jmp short loc_A59D ; --------------------------------------------------------------------------- loc_A598: mov byte_1232B, 0 loc_A59D: mov byte ptr [bp+inregs+1], 4 mov byte ptr [bp+inregs], 3 push ss lea ax, [bp+outregs] push ax ; outregs push ss lea ax, [bp+inregs] push ax ; inregs push 18h ; intno call _int86 add sp, 0Ah test byte ptr [bp+outregs+1], 10h jz short loc_A5C6 mov byte_12327, 1 jmp short loc_A5CB ; --------------------------------------------------------------------------- loc_A5C6: mov byte_12327, 0 loc_A5CB: mov byte ptr [bp+inregs+1], 4 mov byte ptr [bp+inregs], 5 push ss lea ax, [bp+outregs] push ax ; outregs push ss lea ax, [bp+inregs] push ax ; inregs push 18h ; intno call _int86 add sp, 0Ah test byte ptr [bp+outregs+1], 2 jz short loc_A5F4 mov byte_12328, 1 jmp short loc_A5F9 ; --------------------------------------------------------------------------- loc_A5F4: mov byte_12328, 0 loc_A5F9: mov byte ptr [bp+inregs+1], 4 mov byte ptr [bp+inregs], 0 push ss lea ax, [bp+outregs] push ax ; outregs push ss lea ax, [bp+inregs] push ax ; inregs push 18h ; intno call _int86 add sp, 0Ah test byte ptr [bp+outregs+1], 1 jz short loc_A622 mov byte_12329, 1 leave retf ; --------------------------------------------------------------------------- loc_A622: mov byte_12329, 0 leave retf sub_A4AB endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_A629 proc far arg_0 = word ptr 6 push bp mov bp, sp push si push di mov ax, [bp+arg_0] shl ax, 6 mov dx, [bp+arg_0] shl dx, 4 add ax, dx mov si, ax push 0Fh call sub_B976 pop cx xor di, di jmp short loc_A65C ; --------------------------------------------------------------------------- loc_A64A: les bx, dword_13672 add bx, si mov dword ptr es:[bx], 0FFFFFFFFh inc di add si, 4 loc_A65C: cmp di, 14h jl short loc_A64A call sub_BA0A pop di pop si pop bp retf sub_A629 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_A66A proc far var_192 = byte ptr -192h var_2 = word ptr -2 enter 192h, 0 push si push di mov [bp+var_2], 0 xor si, si xor di, di lea ax, [bp+var_192] push ss push ax push ds push offset unk_1233D mov cx, 190h call SCOPY@ jmp short loc_A6F5 ; --------------------------------------------------------------------------- loc_A68D: push 10280h push si push 0 call sub_D338 add sp, 8 push 10280h push di push 0 call sub_D338 add sp, 8 loc_A6AF: call IRand mov bx, 190h cwd idiv bx mov si, dx cmp [bp+si+var_192], 0 jnz short loc_A6AF mov [bp+si+var_192], 1 loc_A6C8: call IRand mov bx, 190h cwd idiv bx mov di, dx cmp [bp+di+var_192], 0 jnz short loc_A6C8 mov [bp+di+var_192], 1 push si call sub_A629 pop cx push di call sub_A629 pop cx push 1 call sub_B269 pop cx loc_A6F5: mov ax, [bp+var_2] inc [bp+var_2] cmp ax, 64h ; 'd' jb short loc_A68D push 1 call sub_B943 pop cx call sub_BB85 push 0 call sub_B943 pop cx pop di pop si leave retf sub_A66A endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_A719 proc far push bp mov bp, sp push ds push offset aReimu_mdt ; "reimu.mdt" call sub_E4D9 add sp, 4 call sub_E4F9 push 1 call sub_B943 pop cx push ds push offset aReiiden2_grp ; "REIIDEN2.grp" call sub_DAEC add sp, 4 call sub_BC6D call sub_BB85 push ds push offset aReiiden3_grp ; "REIIDEN3.grp" call sub_DB6F add sp, 4 push 0 call sub_B943 pop cx call sub_BC8B push 64h ; 'd' call sub_B269 pop cx call sub_A66A pop bp retf sub_A719 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_A772 proc far push bp mov bp, sp push 1 call sub_B943 pop cx call sub_BB85 push 0 call sub_B943 pop cx push ds push offset aOp_win_grp ; "op_win.grp" call sub_DBAF add sp, 4 call sub_BB85 pop bp retf sub_A772 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_A79D proc far push bp mov bp, sp mov al, byte_1232F cbw cmp ax, 1 jnz short loc_A7AE call sub_E3C5 loc_A7AE: call key_end pop bp retf sub_A79D endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_A7B5 proc far push bp mov bp, sp push si call sub_A2E4 pushd [dword_13418] push word_12322+1 push word_12322 push word_12320+1 push word_12320 call sub_E27C add sp, 0Ch call sub_A79D call sub_E519 call sub_B757 mov al, byte_12324 cbw cmp ax, 2 jnz short loc_A7FC les bx, dword_13EE6 mov byte ptr es:[bx+18h], 1 jmp short loc_A820 ; --------------------------------------------------------------------------- loc_A7FC: mov al, byte_12324 cbw cmp ax, 3 jnz short loc_A810 les bx, dword_13EE6 mov byte ptr es:[bx+18h], 3 jmp short loc_A820 ; --------------------------------------------------------------------------- loc_A810: cmp byte_12324, 0 jnz short loc_A820 les bx, dword_13EE6 mov byte ptr es:[bx+18h], 0 loc_A820: les bx, dword_13EE6 mov byte ptr es:[bx+14h], 0 mov word ptr es:[bx+3Fh], 0 mov al, byte ptr word_12322+1 add al, 2 mov es:[bx+15h], al mov word ptr es:[bx+49h], 0 xor si, si jmp short loc_A867 ; --------------------------------------------------------------------------- loc_A842: mov ax, si add ax, ax les bx, dword_13EE6 add bx, ax mov word ptr es:[bx+27h], 0 mov ax, si shl ax, 2 mov bx, word ptr dword_13EE6 add bx, ax mov dword ptr es:[bx+2Fh], 0 inc si loc_A867: cmp si, 4 jl short loc_A842 les bx, dword_13EE6 mov dword ptr es:[bx+45h], 0 mov dword ptr es:[bx+23h], 0 mov byte ptr es:[bx+12h], 0 mov byte ptr es:[bx+13h], 0 mov byte ptr es:[bx+16h], 1 mov word ptr es:[bx+19h], 0FFFCh pushd 0 push ds push offset aReiiden_0 ; "reiiden" push ds push offset aReiiden_0 ; "reiiden" call _execl add sp, 0Ch pop si pop bp retf sub_A7B5 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_A8AD proc far push bp mov bp, sp call sub_A2E4 pushd [dword_13418] push word_12322+1 push word_12322 push word_12320+1 push word_12320 call sub_E27C add sp, 0Ch les bx, dword_13EE6 cmp word ptr es:[bx+3Fh], 0 jnz short loc_A8E1 mov ax, seg seg001 mov es, ax assume es:seg001 loc_A8E1: call sub_A79D call sub_E519 call sub_B757 les bx, dword_13EE6 assume es:nothing mov byte ptr es:[bx+18h], 0 mov byte ptr es:[bx+16h], 1 mov al, byte ptr word_12322+1 add al, 2 mov es:[bx+15h], al mov byte ptr es:[bx+13h], 0 mov word ptr es:[bx+19h], 0FFFCh mov word ptr es:[bx+49h], 0 pushd 0 push ds push offset s ; "REIIDEN" push ds push offset s ; "REIIDEN" call _execl add sp, 0Ch pop bp retf sub_A8AD endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_A92C proc far arg_0 = word ptr 6 push bp mov bp, sp mov ax, [bp+arg_0] mov bx, 46h ; 'F' cwd idiv bx cmp dx, 32h ; '2' jge short loc_A954 push ds push offset aVgvhvsb@vjvdvx ; " HIT KEY" push 2F0132h push 0F4h call sub_C948 add sp, 0Ah pop bp retf ; --------------------------------------------------------------------------- loc_A954: push 100080h push 13200F4h call sub_D338 add sp, 8 pop bp retf sub_A92C endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_A96A proc far var_14 = byte ptr -14h var_4 = word ptr -4 var_2 = word ptr -2 arg_0 = word ptr 6 arg_2 = word ptr 8 enter 14h, 0 push si mov si, [bp+arg_0] lea ax, [bp+var_14] push ss push ax push ds push offset off_124CD mov cx, 10h call SCOPY@ mov [bp+var_2], 0F4h mov ax, si imul ax, 14h add ax, 114h mov [bp+var_4], ax mov bx, si shl bx, 2 lea ax, [bp+var_14] add bx, ax pushd dword ptr ss:[bx] mov ax, [bp+arg_2] or ax, 30h push ax push [bp+var_4] push [bp+var_2] call sub_C948 add sp, 0Ah pop si leave retf sub_A96A endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_A9B9 proc far var_42 = byte ptr -42h var_2E = byte ptr -2Eh var_1E = byte ptr -1Eh var_A = word ptr -0Ah var_8 = byte ptr -8 arg_0 = word ptr 6 arg_2 = word ptr 8 enter 42h, 0 push si push di mov si, [bp+arg_0] lea ax, [bp+var_1E] push ss push ax push ds push offset off_124DD mov cx, 14h call SCOPY@ lea ax, [bp+var_2E] push ss push ax push ds push offset off_124F1 mov cx, 10h call SCOPY@ lea ax, [bp+var_8] push ss push ax push ds push offset off_12501 mov cx, 8 call SCOPY@ lea ax, [bp+var_42] push ss push ax push ds push offset off_12509 mov cx, 14h call SCOPY@ mov di, 0E4h mov ax, si imul ax, 14h add ax, 10Ah mov [bp+var_A], ax push 1000B0h push ax push di call sub_D338 add sp, 8 or si, si jnz short loc_AA34 mov al, byte ptr word_12320 cbw shl ax, 2 lea dx, [bp+var_2E] jmp short loc_AA54 ; --------------------------------------------------------------------------- loc_AA34: cmp si, 1 jnz short loc_AA45 mov al, byte ptr word_12320+1 cbw shl ax, 2 lea dx, [bp+var_8] jmp short loc_AA54 ; --------------------------------------------------------------------------- loc_AA45: cmp si, 2 jnz short loc_AA83 mov al, byte ptr word_12322+1 cbw shl ax, 2 lea dx, [bp+var_42] loc_AA54: add ax, dx mov bx, ax pushd dword ptr ss:[bx] mov bx, si shl bx, 2 lea ax, [bp+var_1E] add bx, ax pushd dword ptr ss:[bx] ; arglist push ds push offset aSS ; "%s%s" mov ax, [bp+arg_2] or ax, 30h push ax ; int push [bp+var_A] ; int push di ; int call sub_D5F8 add sp, 12h jmp short loc_AAB2 ; --------------------------------------------------------------------------- loc_AA83: cmp si, 3 jz short loc_AA8D cmp si, 4 jnz short loc_AAB2 loc_AA8D: mov bx, si shl bx, 2 lea ax, [bp+var_1E] add bx, ax pushd dword ptr ss:[bx] ; arglist push ds push (offset aSS+2) ; format mov ax, [bp+arg_2] or ax, 30h push ax ; int push [bp+var_A] ; int push di ; int call sub_D5F8 add sp, 0Eh loc_AAB2: pop di pop si leave retf sub_A9B9 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_AAB6 proc far var_46 = byte ptr -46h var_A = word ptr -0Ah var_8 = byte ptr -8 arg_0 = word ptr 6 arg_2 = word ptr 8 enter 46h, 0 push si push di mov si, [bp+arg_0] lea ax, [bp+var_8] push ss push ax push ds push offset off_1251E mov cx, 8 call SCOPY@ lea ax, [bp+var_46] push ss push ax push ds push offset off_12526 mov cx, 3Ch ; '<' call SCOPY@ mov di, 0E4h mov ax, si imul ax, 28h add ax, 11Eh mov [bp+var_A], ax push 1000B0h push ax push di call sub_D338 add sp, 8 or si, si jnz short loc_AB69 push 1000C0h mov ax, [bp+var_A] add ax, 14h push ax push di call sub_D338 add sp, 8 mov al, byte_1251D cbw push ax mov bx, si shl bx, 2 lea ax, [bp+var_8] add bx, ax pushd dword ptr ss:[bx] ; arglist push ds push offset aS_2d ; "%s%.2d" mov ax, [bp+arg_2] or ax, 30h push ax ; int push [bp+var_A] ; int push di ; int call sub_D5F8 add sp, 10h mov al, byte_1251D cbw shl ax, 2 lea dx, [bp+var_46] add ax, dx mov bx, ax pushd dword ptr ss:[bx] push ds push (offset aSS+2) mov ax, [bp+arg_2] or ax, 30h push ax mov ax, [bp+var_A] add ax, 14h push ax jmp short loc_AB8A ; --------------------------------------------------------------------------- loc_AB69: cmp si, 1 jnz short loc_AB93 mov bx, si shl bx, 2 lea ax, [bp+var_8] add bx, ax pushd dword ptr ss:[bx] ; arglist push ds push (offset aSS+2) ; format mov ax, [bp+arg_2] or ax, 30h push ax ; int push [bp+var_A] ; int loc_AB8A: push di ; int call sub_D5F8 add sp, 0Eh loc_AB93: pop di pop si leave retf sub_AAB6 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_AB97 proc far push bp mov bp, sp cmp word_12564, 0 jnz short loc_AC04 push 6400B0h push 10A00DCh call sub_D338 add sp, 8 push 50000h call sub_A96A add sp, 4 push 50001h call sub_A96A add sp, 4 push 50002h call sub_A96A add sp, 4 push 50003h call sub_A96A add sp, 4 push 0Fh mov al, byte_12325 cbw push ax call sub_A96A add sp, 4 mov word_12564, 1 mov al, byte_12325 cbw mov word_12562, ax loc_AC04: mov al, byte_12325 cbw cmp ax, word_12562 jz short loc_AC30 push 5 push word_12562 call sub_A96A add sp, 4 push 0Fh mov al, byte_12325 cbw push ax call sub_A96A add sp, 4 mov al, byte_12325 cbw mov word_12562, ax loc_AC30: cmp byte_12327, 0 jnz short loc_AC3E cmp byte_12328, 0 jz short loc_AC6E loc_AC3E: mov al, byte_12325 cbw mov bx, ax cmp bx, 3 ja short loc_AC6E add bx, bx jmp cs:off_AC7C[bx] loc_AC50: call sub_A7B5 jmp short loc_AC6E ; --------------------------------------------------------------------------- loc_AC56: call sub_A8AD jmp short loc_AC6E ; --------------------------------------------------------------------------- loc_AC5C: mov byte_1232A, 1 mov word_12564, 0 jmp short loc_AC6E ; --------------------------------------------------------------------------- loc_AC69: mov byte_1232C, 1 loc_AC6E: cmp byte_12329, 0 jz short loc_AC7A mov byte_1232C, 1 loc_AC7A: pop bp retf sub_AB97 endp ; --------------------------------------------------------------------------- off_AC7C dw offset loc_AC50 dw offset loc_AC56 dw offset loc_AC5C dw offset loc_AC69 ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_AC84 proc far push bp mov bp, sp cmp word_12566, 0 jnz short loc_ACF9 mov byte_12325, 0 mov word_12568, 0 mov word_12566, 1 mov byte_12338, 4 push 5000B0h push 11400DCh call sub_D338 add sp, 8 push 0F0000h call sub_A9B9 add sp, 4 push 50001h call sub_A9B9 add sp, 4 push 50002h call sub_A9B9 add sp, 4 push 50003h call sub_A9B9 add sp, 4 push 50004h call sub_A9B9 add sp, 4 loc_ACF9: mov al, byte_12325 cbw cmp ax, word_12568 jz short loc_AD25 push 5 push word_12568 call sub_A9B9 add sp, 4 push 0Fh mov al, byte_12325 cbw push ax call sub_A9B9 add sp, 4 mov al, byte_12325 cbw mov word_12568, ax loc_AD25: mov al, byte_12326 cbw cmp ax, 1 jnz short loc_AD96 cmp word_1256A, 0 jnz short loc_AD9C mov al, byte_12325 cbw or ax, ax jz short loc_AD49 cmp ax, 1 jz short loc_AD5C cmp ax, 2 jz short loc_AD6F jmp short loc_AD80 ; --------------------------------------------------------------------------- loc_AD49: dec byte ptr word_12320 mov al, byte ptr word_12320 cbw or ax, ax jge short loc_AD80 mov byte ptr word_12320, 3 jmp short loc_AD80 ; --------------------------------------------------------------------------- loc_AD5C: dec byte ptr word_12320+1 mov al, byte ptr word_12320+1 cbw or ax, ax jge short loc_AD80 mov byte ptr word_12320+1, 1 jmp short loc_AD80 ; --------------------------------------------------------------------------- loc_AD6F: dec byte ptr word_12322+1 mov al, byte ptr word_12322+1 cbw or ax, ax jge short loc_AD80 mov byte ptr word_12322+1, 4 loc_AD80: push 0Fh mov al, byte_12325 cbw push ax call sub_A9B9 add sp, 4 mov word_1256A, 1 jmp short loc_AD9C ; --------------------------------------------------------------------------- loc_AD96: mov word_1256A, 0 loc_AD9C: mov al, byte_1232B cbw cmp ax, 1 jnz short loc_AE10 cmp word_1256C, 0 jnz short loc_AE16 mov al, byte_12325 cbw or ax, ax jz short loc_ADC0 cmp ax, 1 jz short loc_ADD4 cmp ax, 2 jz short loc_ADE8 jmp short loc_ADFA ; --------------------------------------------------------------------------- loc_ADC0: inc byte ptr word_12320 mov al, byte ptr word_12320 cbw cmp ax, 3 jle short loc_ADFA mov byte ptr word_12320, 0 jmp short loc_ADFA ; --------------------------------------------------------------------------- loc_ADD4: inc byte ptr word_12320+1 mov al, byte ptr word_12320+1 cbw cmp ax, 1 jle short loc_ADFA mov byte ptr word_12320+1, 0 jmp short loc_ADFA ; --------------------------------------------------------------------------- loc_ADE8: inc byte ptr word_12322+1 mov al, byte ptr word_12322+1 cbw cmp ax, 4 jle short loc_ADFA mov byte ptr word_12322+1, 0 loc_ADFA: push 0Fh mov al, byte_12325 cbw push ax call sub_A9B9 add sp, 4 mov word_1256C, 1 jmp short loc_AE16 ; --------------------------------------------------------------------------- loc_AE10: mov word_1256C, 0 loc_AE16: cmp byte_12327, 0 jnz short loc_AE24 cmp byte_12328, 0 jz short loc_AE2D loc_AE24: mov al, byte_12325 cbw cmp ax, 4 jz short loc_AE34 loc_AE2D: cmp byte_12329, 0 jz short loc_AE44 loc_AE34: mov byte_1232A, 3 mov word_12566, 0 mov byte_12325, 2 loc_AE44: cmp byte_12327, 0 jnz short loc_AE52 cmp byte_12328, 0 jz short loc_AE6B loc_AE52: mov al, byte_12325 cbw cmp ax, 3 jnz short loc_AE6B mov byte_1232A, 2 mov word_12566, 0 mov byte_12325, 0 loc_AE6B: pop bp retf sub_AC84 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_AE6D proc far var_3C = byte ptr -3Ch enter 3Ch, 0 lea ax, [bp+var_3C] push ss push ax push ds push offset off_1256E mov cx, 3Ch ; '<' call SCOPY@ call sub_E509 mov al, byte_1251D cbw shl ax, 2 lea dx, [bp+var_3C] add ax, dx mov bx, ax pushd dword ptr ss:[bx] ; path call sub_E4D9 add sp, 4 call sub_E4F9 leave retf sub_AE6D endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_AEA8 proc far push bp mov bp, sp cmp word_125AA, 0 jnz short loc_AF00 mov byte_12325, 0 mov word_125AC, 0 mov word_125AA, 1 mov byte_12327, 0 mov byte_12328, 0 mov byte_12338, 1 push 6400B0h push 10A00DCh call sub_D338 add sp, 8 push 0F0000h call sub_AAB6 add sp, 4 push 50001h call sub_AAB6 add sp, 4 loc_AF00: mov al, byte_12325 cbw cmp ax, word_125AC jz short loc_AF2C push 5 push word_125AC call sub_AAB6 add sp, 4 push 0Fh mov al, byte_12325 cbw push ax call sub_AAB6 add sp, 4 mov al, byte_12325 cbw mov word_125AC, ax loc_AF2C: mov al, byte_12326 cbw cmp ax, 1 jnz short loc_AF69 cmp word_125AE, 0 jnz short loc_AF6F cmp byte_12325, 0 jnz short loc_AF53 dec byte_1251D cmp byte_1251D, 0 jge short loc_AF53 mov byte_1251D, 0Eh loc_AF53: push 0Fh mov al, byte_12325 cbw push ax call sub_AAB6 add sp, 4 mov word_125AE, 1 jmp short loc_AF6F ; --------------------------------------------------------------------------- loc_AF69: mov word_125AE, 0 loc_AF6F: mov al, byte_1232B cbw cmp ax, 1 jnz short loc_AFAC cmp word_125B0, 0 jnz short loc_AFB2 cmp byte_12325, 0 jnz short loc_AF96 inc byte_1251D cmp byte_1251D, 0Fh jl short loc_AF96 mov byte_1251D, 0 loc_AF96: push 0Fh mov al, byte_12325 cbw push ax call sub_AAB6 add sp, 4 mov word_125B0, 1 jmp short loc_AFB2 ; --------------------------------------------------------------------------- loc_AFAC: mov word_125B0, 0 loc_AFB2: cmp byte_12327, 0 jnz short loc_AFC0 cmp byte_12328, 0 jz short loc_AFC9 loc_AFC0: mov al, byte_12325 cbw cmp ax, 1 jz short loc_AFD0 loc_AFC9: cmp byte_12329, 0 jz short loc_AFE0 loc_AFD0: mov byte_1232A, 4 mov word_125AA, 0 mov byte_12325, 3 loc_AFE0: cmp byte_12327, 0 jnz short loc_AFEE cmp byte_12328, 0 jz short loc_AFF9 loc_AFEE: cmp byte_12325, 0 jnz short loc_AFF9 call sub_AE6D loc_AFF9: pop bp retf sub_AEA8 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame ; int __cdecl main(int argc, const char **argv, const char **envp) _main proc far outregs = REGS ptr -2Ch inregs = REGS ptr -1Ch var_C = word ptr -0Ch var_9 = byte ptr -9 var_8 = dword ptr -8 var_4 = dword ptr -4 _argc = word ptr 4 _argv = dword ptr 6 _envp = dword ptr 0Ah enter 2Ch, 0 push si push di xor si, si xor di, di call sub_E3E5 or ax, ax jnz short loc_B015 push ds push offset aGogbgGtg@gcglv ; "バッチファイルから起動してよ" jmp loc_B25D ; --------------------------------------------------------------------------- loc_B015: mov byte_1232D, 0 mov dword_12330, 0 mov byte_1232E, 0 cmp word ptr [bp+_argv], 1 jle loc_B0D6 les bx, [bp+_argv+2] les bx, es:[bx+4] mov al, es:[bx] cbw cmp ax, 73h ; 's' jnz short loc_B045 mov byte_12324, 1 loc_B045: les bx, [bp+_argv+2] les bx, es:[bx+4] mov al, es:[bx] cbw cmp ax, 74h ; 't' jnz short loc_B05A mov byte_12324, 2 loc_B05A: les bx, [bp+_argv+2] les bx, es:[bx+4] mov al, es:[bx] cbw cmp ax, 64h ; 'd' jnz short loc_B06F mov byte_12324, 3 loc_B06F: push 3 ; n push ds push offset aCon ; "CON" les bx, [bp+_argv+2] pushd dword ptr es:[bx+4] ; s1 call _memcmp add sp, 0Ah or ax, ax jnz short loc_B0D6 les bx, [bp+_argv+2] mov eax, es:[bx+8] mov [bp+var_4], eax pushd [bp+var_4] call _atol add sp, 4 mov byte_1232D, al les bx, [bp+_argv+2] pushd dword ptr es:[bx+0Ch] call _atol add sp, 4 mov word ptr dword_12330+2, dx mov word ptr dword_12330, ax les bx, [bp+_argv+2] mov eax, es:[bx+10h] mov [bp+var_8], eax pushd [bp+var_8] call _atol add sp, 4 mov byte_1232E, al loc_B0D6: call sub_E549 call sub_B6E9 call sub_A240 mov al, byte ptr word_12320+1 cbw mov si, ax mov byte ptr [bp+inregs+1], 3 push ss lea ax, [bp+outregs] push ax ; outregs push ss lea ax, [bp+inregs] push ax ; inregs push 18h ; intno call _int86 add sp, 0Ah call key_start call sub_A719 xor ax, ax mov es, ax mov al, es:0500h or al, 20h mov [bp+var_9], al xor ax, ax mov dl, [bp+var_9] mov es, ax mov es:0500h, dl jmp short loc_B135 ; --------------------------------------------------------------------------- loc_B126: push 1 call sub_B269 pop cx push di call sub_A92C pop cx inc di loc_B135: call key_sense_bios or ax, ax jz short loc_B126 call sub_A772 mov eax, dword_13418 mov random_seed, eax jmp loc_B21A ; --------------------------------------------------------------------------- loc_B14D: cmp byte_1232A, 0 jnz short loc_B15F call sub_A363 call sub_AB97 jmp loc_B1EE ; --------------------------------------------------------------------------- loc_B15F: mov al, byte_1232A cbw cmp ax, 1 jnz short loc_B172 call sub_A4AB call sub_AC84 jmp short loc_B1EE ; --------------------------------------------------------------------------- loc_B172: mov al, byte_1232A cbw cmp ax, 2 jnz short loc_B185 call sub_A4AB call sub_AEA8 jmp short loc_B1EE ; --------------------------------------------------------------------------- loc_B185: mov al, byte_1232A cbw cmp ax, 3 jnz short loc_B1D8 mov al, byte ptr word_12320+1 cbw cmp ax, si jz short loc_B1C9 cmp byte ptr word_12320+1, 0 jnz short loc_B1A4 call sub_E509 jmp short loc_B1C3 ; --------------------------------------------------------------------------- loc_B1A4: mov al, byte ptr word_12320+1 cbw cmp ax, 1 jnz short loc_B1C3 call sub_E509 push ds push offset aReimu_mdt ; "reimu.mdt" call sub_E4D9 add sp, 4 call sub_E4F9 loc_B1C3: mov al, byte ptr word_12320+1 cbw mov si, ax loc_B1C9: push 0Fh call sub_B269 pop cx mov byte_1232A, 0 jmp short loc_B1EE ; --------------------------------------------------------------------------- loc_B1D8: mov al, byte_1232A cbw cmp ax, 4 jnz short loc_B1EE push 0Fh call sub_B269 pop cx mov byte_1232A, 1 loc_B1EE: xor ax, ax mov es, ax mov ax, word ptr es:[0524h] mov [bp+var_C], ax xor ax, ax mov dx, [bp+var_C] mov es, ax mov word ptr es:[0526h], dx mov es, ax mov byte ptr es:[0528h], 0 inc dword_13418 push 1 call sub_B269 pop cx loc_B21A: cmp byte_1232C, 0 jz loc_B14D call sub_A2E4 mov byte_1232F, 1 call sub_E509 call sub_A79D push 1 call sub_B943 pop cx call sub_BB12 push 0 call sub_B943 pop cx call sub_BB12 call sub_B73C call sub_E509 push ds push offset format ; "おつかれさまでした!!\n" loc_B25D: call _printf _main endp ; sp-analysis failed add sp, 4 pop di pop si leave retf seg001 ends ; =========================================================================== ; Segment type: Pure code seg002 segment byte public 'CODE' use16 assume cs:seg002 ;org 9 assume es:nothing, ss:nothing, ds:dseg, fs:nothing, gs:nothing ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_B269 proc far arg_0 = word ptr 6 push bp mov bp, sp loc_B26C: mov ax, word_1355C cmp ax, [bp+arg_0] jb short loc_B26C mov word_1355C, 0 pop bp retf sub_B269 endp seg002 ends ; =========================================================================== ; Segment type: Pure code seg003 segment byte public 'CODE' use16 assume cs:seg003 ;org 0Ch assume es:nothing, ss:nothing, ds:dseg, fs:nothing, gs:nothing ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame ; void __interrupt isr() isr proc far var_4 = word ptr -4 var_2 = word ptr -2 push ax push bx push cx push dx push es push ds push si push di push bp mov bp, seg dseg mov ds, bp mov bp, sp sub sp, 4 mov ax, word_1290D mov [bp+var_2], ax mov ax, word_1290F mov [bp+var_4], ax inc word_1355C inc word_1355E cmp word_12903, 0 jz short loc_B2AE call farfp_13564 loc_B2AE: xor dx, dx mov al, 20h ; ' ' out dx, al mov dx, 64h ; 'd' mov al, 0 out dx, al ; AT Keyboard controller 8042. leave pop di pop si pop ds pop es pop dx pop cx pop bx pop ax iret isr endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_B2C3 proc far push bp mov bp, sp cmp byte_12902, 0 jnz short loc_B303 mov byte_12902, 1 cli push 0Ah ; interruptno call _getvect pop cx mov word_13562, dx mov off_13560, ax push seg seg003 push offset isr ; isr push 0Ah ; interruptno call _setvect add sp, 6 mov dx, 2 in al, dx ; DMA controller, 8237A-5. ; channel 1 current address and al, 0FBh mov dx, 2 out dx, al ; DMA controller, 8237A-5. ; channel 1 base address ; (also sets current address) mov dx, 64h ; 'd' mov al, 0 out dx, al ; AT Keyboard controller 8042. sti loc_B303: pop bp retf sub_B2C3 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_B305 proc far push bp mov bp, sp cmp byte_12902, 1 jnz short loc_B332 mov byte_12902, 0 cli mov dx, 2 in al, dx ; DMA controller, 8237A-5. ; channel 1 current address or al, 4 mov dx, 2 out dx, al ; DMA controller, 8237A-5. ; channel 1 base address ; (also sets current address) push word_13562 push off_13560 ; isr push 0Ah ; interruptno call _setvect add sp, 6 sti loc_B332: pop bp retf sub_B305 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_B334 proc far push bp mov bp, sp loc_B337: mov dx, 60h in al, dx ; AT Keyboard controller 8042. test al, 20h jnz short loc_B337 loc_B33F: mov dx, 60h in al, dx ; AT Keyboard controller 8042. test al, 20h jz short loc_B33F pop bp retf sub_B334 endp ; --------------------------------------------------------------------------- push bp mov bp, sp mov word_12903, 0 mov dx, [bp+8] mov ax, [bp+6] mov word ptr farfp_13564+2, dx mov word ptr farfp_13564, ax mov word_12903, 1 pop bp retf ; --------------------------------------------------------------------------- push bp mov bp, sp mov word_12903, 0 pop bp retf seg003 ends ; =========================================================================== ; Segment type: Pure code seg004 segment byte public 'CODE' use16 assume cs:seg004 ;org 2 assume es:nothing, ss:nothing, ds:dseg, fs:nothing, gs:nothing ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_B372 proc far inregs = REGS ptr -10h enter 10h, 0 mov byte ptr [bp+inregs+1], 0Eh mov word ptr [bp+inregs+6], 0 push ss lea ax, [bp+inregs] push ax ; outregs push ss lea ax, [bp+inregs] push ax ; inregs push 18h ; intno call _int86 nopcall sub_B3D1 nopcall sub_B404 push 0 nopcall sub_B462 add sp, 0Ch nopcall sub_B415 nopcall sub_B426 leave retf sub_B372 endp ; --------------------------------------------------------------------------- push bp mov bp, sp nopcall sub_B3D1 nopcall sub_B3F3 push 1 nopcall sub_B462 pop cx nopcall sub_B415 nopcall sub_B426 pop bp retf ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_B3D1 proc far push bp mov bp, sp push ds push offset a3l ; "\x1B[>3l" nopcall sub_B683 add sp, 4 pop bp retf sub_B3D1 endp ; --------------------------------------------------------------------------- push bp mov bp, sp push ds push offset a3h ; "\x1B[>3h" nopcall sub_B683 add sp, 4 pop bp retf ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_B3F3 proc far push bp mov bp, sp push ds push offset a1l ; "\x1B[>1l" nopcall sub_B683 add sp, 4 pop bp retf sub_B3F3 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_B404 proc far push bp mov bp, sp push ds push offset a1h ; "\x1B[>1h" nopcall sub_B683 add sp, 4 pop bp retf sub_B404 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_B415 proc far push bp mov bp, sp push ds push offset a2j ; "\x1B[2J" nopcall sub_B683 add sp, 4 pop bp retf sub_B415 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_B426 proc far inregs = REGS ptr -10h enter 10h, 0 mov byte ptr [bp+inregs+1], 0Ch push ss lea ax, [bp+inregs] push ax ; outregs push ss lea ax, [bp+inregs] push ax ; inregs push 18h ; intno call _int86 add sp, 0Ah leave retf sub_B426 endp ; --------------------------------------------------------------------------- enter 10h, 0 mov byte ptr [bp-0Fh], 0Dh push ss lea ax, [bp-10h] push ax push ss lea ax, [bp-10h] push ax push 18h call _int86 add sp, 0Ah leave retf ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_B462 proc far arg_0 = word ptr 6 push bp mov bp, sp xor ax, ax mov es, ax assume es:seg000 mov al, byte ptr es:[053Bh] cbw mov bx, ax mov dx, 62h ; 'b' mov al, 4Bh ; 'K' out dx, al ; PC/XT PPI port C. Bits: ; 0-3: values of DIP switches ; 5: 1=Timer 2 channel out ; 6: 1=I/O channel check ; 7: 1=RAM parity check error occurred. mov al, bl or al, 80h mov dx, 60h out dx, al ; AT Keyboard controller 8042. mov ax, [bp+arg_0] or ax, ax jz short loc_B491 cmp ax, 1 jz short loc_B498 cmp ax, 2 jz short loc_B49F jmp short loc_B4A7 ; --------------------------------------------------------------------------- loc_B491: mov dx, 60h mov al, 9Fh jmp short loc_B4A6 ; --------------------------------------------------------------------------- loc_B498: mov dx, 60h mov al, 80h jmp short loc_B4A6 ; --------------------------------------------------------------------------- loc_B49F: mov al, bl add al, 7Dh ; '}' mov dx, 60h loc_B4A6: out dx, al ; AT Keyboard controller 8042. loc_B4A7: mov al, bl shl al, 3 add al, 2 mov dx, 60h out dx, al ; AT Keyboard controller 8042. pop bp retf sub_B462 endp ; --------------------------------------------------------------------------- enter 10h, 0 mov byte ptr [bp-0Ch], 10h mov byte ptr [bp-0Fh], 3 mov al, [bp+8] mov [bp-9], al mov al, [bp+6] mov [bp-0Ah], al push ss lea ax, [bp-10h] push ax push ss lea ax, [bp-10h] push ax push 0DCh call _int86 add sp, 0Ah leave retf ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_B4E3 proc far var_2 = word ptr -2 arg_0 = word ptr 6 arg_2 = word ptr 8 arg_4 = byte ptr 0Ah arg_5 = byte ptr 0Bh arg_6 = dword ptr 0Ch enter 2, 0 push si push di mov ax, [bp+arg_2] imul ax, 50h add ax, [bp+arg_0] add ax, ax mov si, ax mov di, 1 test [bp+arg_4], 1 jz short loc_B502 add di, 20h ; ' ' loc_B502: test [bp+arg_4], 4 jz short loc_B50B add di, 40h loc_B50B: test [bp+arg_4], 2 jz short loc_B515 add di, 80h loc_B515: test [bp+arg_5], 8 jz short loc_B51E add di, 10h loc_B51E: test [bp+arg_5], 4 jz short loc_B527 add di, 8 loc_B527: test [bp+arg_5], 2 jz short loc_B530 add di, 4 loc_B530: test [bp+arg_5], 1 jz short loc_B539 add di, 2 loc_B539: mov ax, di shl ax, 8 add di, ax jmp loc_B637 ; --------------------------------------------------------------------------- loc_B543: les bx, [bp+arg_6] assume es:nothing mov al, es:[bx] mov ah, 0 mov bx, ax test byte ptr [bx+1013h], 4 jnz short loc_B557 jmp loc_B60E ; --------------------------------------------------------------------------- loc_B557: les bx, [bp+arg_6] mov al, es:[bx] cbw shl ax, 8 les bx, [bp+arg_6] mov dl, es:[bx+1] mov dh, 0 add ax, dx push ax call __mbcjmstojis pop cx mov [bp+var_2], ax add word ptr [bp+arg_6], 2 cmp [bp+var_2], 2921h jb short loc_B5A8 cmp [bp+var_2], 2B7Eh ja short loc_B5A8 mov ax, [bp+var_2] shr ax, 8 add al, 0E0h or al, 80h mov dx, 0A000h mov es, dx assume es:nothing mov es:[si], al mov ax, 0A000h mov dl, byte ptr [bp+var_2] mov es, ax mov es:[si+1], dl jmp short loc_B621 ; --------------------------------------------------------------------------- loc_B5A8: cmp [bp+arg_0], 4Fh ; 'O' jnz short loc_B5BA mov ax, 0A000h mov es, ax mov word ptr es:[si], 20h ; ' ' jmp short loc_B621 ; --------------------------------------------------------------------------- loc_B5BA: mov ax, [bp+var_2] shr ax, 8 add al, 0E0h mov dx, 0A000h mov es, dx mov es:[si], al mov ax, 0A000h mov dl, byte ptr [bp+var_2] mov es, ax mov es:[si+1], dl mov ax, [bp+var_2] shr ax, 8 add al, 0E0h or al, 80h mov dx, 0A000h mov es, dx mov es:[si+2], al mov ax, 0A000h mov dl, byte ptr [bp+var_2] mov es, ax mov es:[si+3], dl mov ax, 0A200h mov es, ax assume es:nothing mov es:[si], di mov ax, 0A200h mov es, ax mov es:[si+2], di add si, 2 inc [bp+arg_0] jmp short loc_B629 ; --------------------------------------------------------------------------- loc_B60E: les bx, [bp+arg_6] assume es:nothing mov al, es:[bx] mov ah, 0 mov dx, 0A000h mov es, dx assume es:nothing mov es:[si], ax inc word ptr [bp+arg_6] loc_B621: mov ax, 0A200h mov es, ax assume es:nothing mov es:[si], di loc_B629: add si, 2 inc [bp+arg_0] mov ax, [bp+arg_0] cmp ax, 50h ; 'P' jge short loc_B643 loc_B637: les bx, [bp+arg_6] assume es:nothing cmp byte ptr es:[bx], 0 jz short loc_B643 jmp loc_B543 ; --------------------------------------------------------------------------- loc_B643: pop di pop si leave retf sub_B4E3 endp ; --------------------------------------------------------------------------- enter 104h, 0 lea ax, [bp+10h] mov word ptr [bp-2], ss mov [bp-4], ax push word ptr [bp-2] push word ptr [bp-4] push word ptr [bp+0Eh] push word ptr [bp+0Ch] push ss lea ax, [bp-104h] push ax call _vsprintf push ss lea ax, [bp-104h] push ax push word ptr [bp+0Ah] push word ptr [bp+8] push word ptr [bp+6] call sub_B4E3 add sp, 16h leave retf ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_B683 proc far inregs = REGS ptr -10h arg_0 = dword ptr 6 enter 10h, 0 mov byte ptr [bp+inregs+4], 10h mov byte ptr [bp+inregs+1], 0 jmp short loc_B6B2 ; --------------------------------------------------------------------------- loc_B691: les bx, [bp+arg_0] mov al, es:[bx] mov byte ptr [bp+inregs+6], al inc word ptr [bp+arg_0] push ss lea ax, [bp+inregs] push ax ; outregs push ss lea ax, [bp+inregs] push ax ; inregs push 0DCh ; intno call _int86 add sp, 0Ah loc_B6B2: les bx, [bp+arg_0] cmp byte ptr es:[bx], 0 jnz short loc_B691 mov dx, 64h ; 'd' mov al, 0 out dx, al ; AT Keyboard controller 8042. leave retf sub_B683 endp seg004 ends ; =========================================================================== ; Segment type: Pure code seg005 segment byte public 'CODE' use16 assume cs:seg005 ;org 3 assume es:nothing, ss:nothing, ds:dseg, fs:nothing, gs:nothing ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame ; void __interrupt sub_B6C3() sub_B6C3 proc far push eax push ebx push ecx push edx push es push ds push esi push edi push bp mov bp, seg dseg mov ds, bp mov bp, sp pop bp pop edi pop esi pop ds pop es pop edx pop ecx pop ebx pop eax iret sub_B6C3 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_B6E9 proc far push bp mov bp, sp cmp byte_12978, 0 jnz short loc_B73A mov byte_12978, 1 push 6 ; interruptno call _getvect pop cx mov word_1366A, dx mov word_13667+1, ax push seg seg005 push offset sub_B7C3 ; isr push 6 ; interruptno call _setvect add sp, 6 call sub_B2C3 call sub_B372 call egc_start call graph_start call respal_create call sub_D1C0 call sub_D2DB loc_B73A: pop bp retf sub_B6E9 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_B73C proc far push bp mov bp, sp cmp byte_12978, 1 jnz short loc_B755 mov byte_12978, 0 nopcall sub_B784 call respal_free loc_B755: pop bp retf sub_B73C endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_B757 proc far push bp mov bp, sp cmp byte_12978, 1 jnz short loc_B782 nopcall sub_B784 call sub_B3D1 push 0 call sub_B462 pop cx call sub_B415 call sub_B426 mov byte_12978, 0 loc_B782: pop bp retf sub_B757 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_B784 proc far push bp mov bp, sp mov byte_12978, 0 push seg seg005 push offset sub_B6C3 ; isr push 6 ; interruptno call _setvect call sub_B305 call sub_B415 call sub_BD3A call sub_B8D0 call egc_start pushd [dword ptr word_13667+1] ; isr push 6 ; interruptno call _setvect add sp, 0Ch pop bp retf sub_B784 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: noreturn bp-based frame ; void __interrupt sub_B7C3() sub_B7C3 proc near push eax push ebx push ecx push edx push es push ds push esi push edi push bp mov bp, seg dseg mov ds, bp mov bp, sp call sub_B73C push 0 ; status call _exit sub_B7C3 endp ; --------------------------------------------------------------------------- pop cx pop bp pop edi pop esi pop ds pop es pop edx pop ecx pop ebx pop eax iret ; --------------------------------------------------------------------------- enter 104h, 0 lea ax, [bp+0Ah] mov word ptr [bp-2], ss mov [bp-4], ax push word ptr [bp-2] push ax pushd dword ptr [bp+6] push ss lea ax, [bp-104h] push ax call _vsprintf call sub_B73C push ss lea ax, [bp-104h] push ax call sub_B683 push 1 call _exit ; --------------------------------------------------------------------------- add sp, 12h leave retf seg005 ends ; --------------------------------------------------------------------------- ; =========================================================================== ; Segment type: Pure code seg006 segment byte public 'CODE' use16 assume cs:seg006 assume es:nothing, ss:nothing, ds:dseg, fs:nothing, gs:nothing enter 10h, 0 nopcall sub_B91C mov byte ptr [bp-0Fh], 42h ; 'B' mov byte ptr [bp-0Bh], 0C0h push ss lea ax, [bp-10h] push ax push ss push ax push 18h call _int86 mov dx, 6Ah ; 'j' mov al, 1 out dx, al ; PC-98 GDC (6a): ; push ds push offset unk_1297A nopcall sub_BA15 push 0 nopcall sub_B943 push 0 nopcall sub_B937 add sp, 12h nopcall sub_BB3C mov dx, 68h ; 'h' mov al, 0Ah out dx, al mov dx, 7Ch ; '|' mov al, 0 out dx, al nopcall sub_B901 leave retf ; --------------------------------------------------------------------------- enter 10h, 0 nopcall sub_B91C mov byte ptr [bp-0Fh], 42h ; 'B' mov byte ptr [bp-0Bh], 0C0h push ss lea ax, [bp-10h] push ax push ss push ax push 18h call _int86 mov dx, 6Ah ; 'j' mov al, 1 out dx, al ; PC-98 GDC (6a): ; push 0 nopcall sub_B943 push 0 nopcall sub_B937 add sp, 0Eh mov dx, 68h ; 'h' mov al, 0Ah out dx, al mov dx, 7Ch ; '|' mov al, 0 out dx, al nopcall sub_B901 leave retf ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_B8D0 proc far push bp mov bp, sp nopcall sub_BC6D nopcall sub_BB3C push 0 nopcall sub_B943 push 0 nopcall sub_B937 add sp, 4 nopcall sub_B901 mov dx, 68h ; 'h' mov al, 0Ah out dx, al mov dx, 7Ch ; '|' mov al, 0 out dx, al pop bp retf sub_B8D0 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_B901 proc far inregs = REGS ptr -10h enter 10h, 0 mov byte ptr [bp+inregs+1], 40h push ss lea ax, [bp+inregs] push ax ; outregs push ss push ax ; inregs push 18h ; intno call _int86 add sp, 0Ah leave retf sub_B901 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_B91C proc far inregs = REGS ptr -10h enter 10h, 0 mov byte ptr [bp+inregs+1], 41h ; 'A' push ss lea ax, [bp+inregs] push ax ; outregs push ss push ax ; inregs push 18h ; intno call _int86 add sp, 0Ah leave retf sub_B91C endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_B937 proc far arg_0 = byte ptr 6 push bp mov bp, sp mov dx, 0A4h mov al, [bp+arg_0] out dx, al pop bp retf sub_B937 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_B943 proc far arg_0 = word ptr 6 push bp mov bp, sp mov bx, [bp+arg_0] mov byte_13671, bl mov dx, 0A6h ; 'ヲ' mov al, bl out dx, al pop bp retf sub_B943 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_B955 proc far arg_0 = byte ptr 6 arg_2 = byte ptr 8 arg_4 = byte ptr 0Ah arg_6 = byte ptr 0Ch push bp mov bp, sp mov dx, 0A8h ; 'ィ' mov al, [bp+arg_0] out dx, al mov dx, 0AAh ; 'ェ' mov al, [bp+arg_4] out dx, al mov dx, 0ACh ; 'ャ' mov al, [bp+arg_2] out dx, al mov dx, 0AEh mov al, [bp+arg_6] out dx, al pop bp retf sub_B955 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_B976 proc far arg_0 = word ptr 6 push bp mov bp, sp mov bx, [bp+arg_0] mov dx, 7Ch ; '|' mov al, 0C0h out dx, al test bl, 1 jz short loc_B98B mov al, 0FFh jmp short loc_B98D ; --------------------------------------------------------------------------- loc_B98B: mov al, 0 loc_B98D: mov dx, 7Eh ; '~' out dx, al test bl, 2 jz short loc_B99A mov al, 0FFh jmp short loc_B99C ; --------------------------------------------------------------------------- loc_B99A: mov al, 0 loc_B99C: mov dx, 7Eh ; '~' out dx, al test bl, 4 jz short loc_B9A9 mov al, 0FFh jmp short loc_B9AB ; --------------------------------------------------------------------------- loc_B9A9: mov al, 0 loc_B9AB: mov dx, 7Eh ; '~' out dx, al test bl, 8 jz short loc_B9B8 mov al, 0FFh jmp short loc_B9BA ; --------------------------------------------------------------------------- loc_B9B8: mov al, 0 loc_B9BA: mov dx, 7Eh ; '~' out dx, al pop bp retf sub_B976 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_B9C0 proc far arg_0 = word ptr 6 push bp mov bp, sp mov bx, [bp+arg_0] mov dx, 7Ch ; '|' mov al, 80h out dx, al test bl, 1 jz short loc_B9D5 mov al, 0FFh jmp short loc_B9D7 ; --------------------------------------------------------------------------- loc_B9D5: mov al, 0 loc_B9D7: mov dx, 7Eh ; '~' out dx, al test bl, 2 jz short loc_B9E4 mov al, 0FFh jmp short loc_B9E6 ; --------------------------------------------------------------------------- loc_B9E4: mov al, 0 loc_B9E6: mov dx, 7Eh ; '~' out dx, al test bl, 4 jz short loc_B9F3 mov al, 0FFh jmp short loc_B9F5 ; --------------------------------------------------------------------------- loc_B9F3: mov al, 0 loc_B9F5: mov dx, 7Eh ; '~' out dx, al test bl, 8 jz short loc_BA02 mov al, 0FFh jmp short loc_BA04 ; --------------------------------------------------------------------------- loc_BA02: mov al, 0 loc_BA04: mov dx, 7Eh ; '~' out dx, al pop bp retf sub_B9C0 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_BA0A proc far push bp mov bp, sp mov dx, 7Ch ; '|' mov al, 0 out dx, al pop bp retf sub_BA0A endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_BA15 proc far arg_0 = dword ptr 6 push bp mov bp, sp push si xor si, si jmp short loc_BA56 ; --------------------------------------------------------------------------- loc_BA1D: mov ax, si imul ax, 3 les bx, [bp+arg_0] add bx, ax mov al, es:[bx+2] cbw push ax mov ax, si imul ax, 3 mov bx, word ptr [bp+arg_0] add bx, ax mov al, es:[bx+1] cbw push ax mov ax, si imul ax, 3 mov bx, word ptr [bp+arg_0] add bx, ax mov al, es:[bx] cbw push ax push si nopcall sub_BA5E add sp, 8 inc si loc_BA56: cmp si, 10h jl short loc_BA1D pop si pop bp retf sub_BA15 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_BA5E proc far arg_0 = word ptr 6 arg_2 = word ptr 8 arg_4 = word ptr 0Ah arg_6 = word ptr 0Ch push bp mov bp, sp push si mov si, [bp+arg_0] cmp [bp+arg_2], 0Fh jge short loc_BA70 mov ax, [bp+arg_2] jmp short loc_BA73 ; --------------------------------------------------------------------------- loc_BA70: mov ax, 0Fh loc_BA73: or ax, ax jle short loc_BA87 cmp [bp+arg_2], 0Fh jge short loc_BA82 mov ax, [bp+arg_2] jmp short loc_BA85 ; --------------------------------------------------------------------------- loc_BA82: mov ax, 0Fh loc_BA85: jmp short loc_BA89 ; --------------------------------------------------------------------------- loc_BA87: xor ax, ax loc_BA89: mov [bp+arg_2], ax cmp [bp+arg_4], 0Fh jge short loc_BA97 mov ax, [bp+arg_4] jmp short loc_BA9A ; --------------------------------------------------------------------------- loc_BA97: mov ax, 0Fh loc_BA9A: or ax, ax jle short loc_BAAE cmp [bp+arg_4], 0Fh jge short loc_BAA9 mov ax, [bp+arg_4] jmp short loc_BAAC ; --------------------------------------------------------------------------- loc_BAA9: mov ax, 0Fh loc_BAAC: jmp short loc_BAB0 ; --------------------------------------------------------------------------- loc_BAAE: xor ax, ax loc_BAB0: mov [bp+arg_4], ax cmp [bp+arg_6], 0Fh jge short loc_BABE mov ax, [bp+arg_6] jmp short loc_BAC1 ; --------------------------------------------------------------------------- loc_BABE: mov ax, 0Fh loc_BAC1: or ax, ax jle short loc_BAD5 cmp [bp+arg_6], 0Fh jge short loc_BAD0 mov ax, [bp+arg_6] jmp short loc_BAD3 ; --------------------------------------------------------------------------- loc_BAD0: mov ax, 0Fh loc_BAD3: jmp short loc_BAD7 ; --------------------------------------------------------------------------- loc_BAD5: xor ax, ax loc_BAD7: mov [bp+arg_6], ax mov bx, si imul bx, 3 mov al, byte ptr [bp+arg_2] mov [bx+6EAh], al mov bx, si imul bx, 3 mov al, byte ptr [bp+arg_4] mov [bx+6EBh], al mov bx, si imul bx, 3 mov al, byte ptr [bp+arg_6] mov [bx+6ECh], al push [bp+arg_6] push [bp+arg_4] push [bp+arg_2] push si call sub_B955 add sp, 8 pop si pop bp retf sub_BA5E endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_BB12 proc far _s = dword ptr -4 enter 4, 0 mov [bp+_s], 0A8000000h push 0 call sub_B976 push 7D0000FFh ; c pushd [bp+_s] ; s call _memset add sp, 0Ah call sub_BA0A leave retf sub_BB12 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_BB3C proc far push bp mov bp, sp push 2 call sub_B943 call sub_BB12 push 2 call sub_B943 add sp, 4 call sub_BB12 pop bp retf sub_BB3C endp ; --------------------------------------------------------------------------- enter 4, 0 mov dword ptr [bp-4], 0A8000000h mov al, [bp+6] cbw push ax call sub_B976 push 7D0000FFh pushd dword ptr [bp-4] call _memset add sp, 0Ah call sub_BA0A leave retf ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_BB85 proc far var_152 = byte ptr -152h var_102 = byte ptr -102h var_B2 = byte ptr -0B2h dest = byte ptr -62h var_11 = byte ptr -11h var_10 = dword ptr -10h var_C = dword ptr -0Ch var_8 = dword ptr -8 src = dword ptr -4 enter 152h, 0 push si mov [bp+src], 0A8000000h mov [bp+var_8], 0B0000000h mov [bp+var_C], 0B8000000h mov [bp+var_10], 0E0000000h mov al, byte_13671 xor al, 1 mov [bp+var_11], al xor si, si jmp loc_BC62 ; --------------------------------------------------------------------------- loc_BBB7: push 50h ; 'P' ; n pushd [bp+src] ; src push ss lea ax, [bp+dest] push ax ; dest call _memcpy push 50h ; 'P' ; n pushd [bp+var_8] ; src push ss lea ax, [bp+var_B2] push ax ; dest call _memcpy push 50h ; 'P' ; n pushd [bp+var_C] ; src push ss lea ax, [bp+var_102] push ax ; dest call _memcpy push 50h ; 'P' ; n pushd [bp+var_10] ; src push ss lea ax, [bp+var_152] push ax ; dest call _memcpy mov dx, 0A6h ; 'ヲ' mov al, [bp+var_11] out dx, al push 50h ; 'P' ; n push ss lea ax, [bp+dest] push ax ; src pushd [bp+src] ; dest call _memcpy add sp, 32h push 50h ; 'P' ; n push ss lea ax, [bp+var_B2] push ax ; src pushd [bp+var_8] ; dest call _memcpy push 50h ; 'P' ; n push ss lea ax, [bp+var_102] push ax ; src pushd [bp+var_C] ; dest call _memcpy push 50h ; 'P' ; n push ss lea ax, [bp+var_152] push ax ; src pushd [bp+var_10] ; dest call _memcpy add sp, 1Eh mov dx, 0A6h ; 'ヲ' mov al, byte_13671 out dx, al add word ptr [bp+src], 50h ; 'P' add word ptr [bp+var_8], 50h ; 'P' add word ptr [bp+var_C], 50h ; 'P' add word ptr [bp+var_10], 50h ; 'P' inc si loc_BC62: cmp si, 190h jl loc_BBB7 pop si leave retf sub_BB85 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_BC6D proc far push bp mov bp, sp push si xor si, si jmp short loc_BC83 ; --------------------------------------------------------------------------- loc_BC75: pushd 0 push 0 push si call sub_B955 add sp, 8 inc si loc_BC83: cmp si, 10h jl short loc_BC75 pop si pop bp retf sub_BC6D endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_BC8B proc far _s = byte ptr -32h var_31 = byte ptr -31h var_30 = byte ptr -30h var_2 = word ptr -2 enter 32h, 0 push si push di push 300000h ; c push ss lea ax, [bp+_s] push ax ; s call _memset add sp, 8 mov [bp+var_2], 0 jmp loc_BD2E ; --------------------------------------------------------------------------- loc_BCAC: call sub_B334 xor si, si jmp short loc_BD1E ; --------------------------------------------------------------------------- loc_BCB5: xor di, di jmp short loc_BCE3 ; --------------------------------------------------------------------------- loc_BCB9: mov bx, si imul bx, 3 add bx, di lea ax, [bp+_s] add bx, ax mov al, ss:[bx] mov bx, si imul bx, 3 cmp al, [bx+di+6EAh] jge short loc_BCE2 mov bx, si imul bx, 3 add bx, di lea ax, [bp+_s] add bx, ax inc byte ptr ss:[bx] loc_BCE2: inc di loc_BCE3: cmp di, 3 jl short loc_BCB9 mov bx, si imul bx, 3 lea ax, [bp+var_30] add bx, ax mov al, ss:[bx] cbw push ax mov bx, si imul bx, 3 lea ax, [bp+var_31] add bx, ax mov al, ss:[bx] cbw push ax mov bx, si imul bx, 3 lea ax, [bp+_s] add bx, ax mov al, ss:[bx] cbw push ax push si call sub_B955 add sp, 8 inc si loc_BD1E: cmp si, 10h jl short loc_BCB5 push 0Ah call _delay pop cx inc [bp+var_2] loc_BD2E: cmp [bp+var_2], 10h jl loc_BCAC pop di pop si leave retf sub_BC8B endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_BD3A proc far dest = byte ptr -32h var_31 = byte ptr -31h var_30 = byte ptr -30h var_2 = word ptr -2 enter 32h, 0 push si push di push 30h ; '0' ; n push ds push offset unk_1297A ; src push ss lea ax, [bp+dest] push ax ; dest call _memcpy add sp, 0Ah mov [bp+var_2], 0 jmp short loc_BDD1 ; --------------------------------------------------------------------------- loc_BD5A: call sub_B334 xor si, si jmp short loc_BDC1 ; --------------------------------------------------------------------------- loc_BD63: xor di, di jmp short loc_BD86 ; --------------------------------------------------------------------------- loc_BD67: mov bx, si imul bx, 3 add bx, di lea ax, [bp+dest] add bx, ax cmp byte ptr ss:[bx], 0 jle short loc_BD85 mov bx, si imul bx, 3 add bx, di add bx, ax dec byte ptr ss:[bx] loc_BD85: inc di loc_BD86: cmp di, 3 jl short loc_BD67 mov bx, si imul bx, 3 lea ax, [bp+var_30] add bx, ax mov al, ss:[bx] cbw push ax mov bx, si imul bx, 3 lea ax, [bp+var_31] add bx, ax mov al, ss:[bx] cbw push ax mov bx, si imul bx, 3 lea ax, [bp+dest] add bx, ax mov al, ss:[bx] cbw push ax push si call sub_B955 add sp, 8 inc si loc_BDC1: cmp si, 10h jl short loc_BD63 push 0Ah call _delay pop cx inc [bp+var_2] loc_BDD1: cmp [bp+var_2], 10h jl short loc_BD5A pop di pop si leave retf sub_BD3A endp ; --------------------------------------------------------------------------- push bp mov bp, sp push si xor si, si jmp short loc_BDF4 ; --------------------------------------------------------------------------- loc_BDE3: push 0F000Fh push 0Fh push si call sub_B955 add sp, 8 inc si loc_BDF4: cmp si, 10h jl short loc_BDE3 pop si pop bp retf ; --------------------------------------------------------------------------- enter 32h, 0 push si push di push 30000Fh push ss lea ax, [bp-32h] push ax call _memset add sp, 8 mov word ptr [bp-2], 0 jmp loc_BE9F ; --------------------------------------------------------------------------- loc_BE1D: call sub_B334 xor si, si jmp short loc_BE8F ; --------------------------------------------------------------------------- loc_BE26: xor di, di jmp short loc_BE54 ; --------------------------------------------------------------------------- loc_BE2A: mov bx, si imul bx, 3 add bx, di lea ax, [bp-32h] add bx, ax mov al, ss:[bx] mov bx, si imul bx, 3 cmp al, [bx+di+6EAh] jle short loc_BE53 mov bx, si imul bx, 3 add bx, di lea ax, [bp-32h] add bx, ax dec byte ptr ss:[bx] loc_BE53: inc di loc_BE54: cmp di, 3 jl short loc_BE2A mov bx, si imul bx, 3 lea ax, [bp-30h] add bx, ax mov al, ss:[bx] cbw push ax mov bx, si imul bx, 3 lea ax, [bp-31h] add bx, ax mov al, ss:[bx] cbw push ax mov bx, si imul bx, 3 lea ax, [bp-32h] add bx, ax mov al, ss:[bx] cbw push ax push si call sub_B955 add sp, 8 inc si loc_BE8F: cmp si, 10h jl short loc_BE26 push 0Ah call _delay pop cx inc word ptr [bp-2] loc_BE9F: cmp word ptr [bp-2], 10h jl loc_BE1D pop di pop si leave retf ; --------------------------------------------------------------------------- enter 32h, 0 push si push di push 30h ; '0' push ds push offset unk_1297A push ss lea ax, [bp-32h] push ax call _memcpy add sp, 0Ah mov word ptr [bp-2], 0 jmp short loc_BF42 ; --------------------------------------------------------------------------- loc_BECB: call sub_B334 xor si, si jmp short loc_BF32 ; --------------------------------------------------------------------------- loc_BED4: xor di, di jmp short loc_BEF7 ; --------------------------------------------------------------------------- loc_BED8: mov bx, si imul bx, 3 add bx, di lea ax, [bp-32h] add bx, ax cmp byte ptr ss:[bx], 0Fh jge short loc_BEF6 mov bx, si imul bx, 3 add bx, di add bx, ax inc byte ptr ss:[bx] loc_BEF6: inc di loc_BEF7: cmp di, 3 jl short loc_BED8 mov bx, si imul bx, 3 lea ax, [bp-30h] add bx, ax mov al, ss:[bx] cbw push ax mov bx, si imul bx, 3 lea ax, [bp-31h] add bx, ax mov al, ss:[bx] cbw push ax mov bx, si imul bx, 3 lea ax, [bp-32h] add bx, ax mov al, ss:[bx] cbw push ax push si call sub_B955 add sp, 8 inc si loc_BF32: cmp si, 10h jl short loc_BED4 push 0Ah call _delay pop cx inc word ptr [bp-2] loc_BF42: cmp word ptr [bp-2], 10h jl short loc_BECB pop di pop si leave retf ; --------------------------------------------------------------------------- push bp mov bp, sp push si xor si, si jmp short loc_BF7E ; --------------------------------------------------------------------------- loc_BF54: mov bx, si imul bx, 3 mov al, [bx+6ECh] cbw push ax mov bx, si imul bx, 3 mov al, [bx+6EBh] cbw push ax mov bx, si imul bx, 3 mov al, [bx+6EAh] cbw push ax push si call sub_B955 add sp, 8 inc si loc_BF7E: cmp si, 10h jl short loc_BF54 pop si pop bp retf ; --------------------------------------------------------------------------- push bp mov bp, sp push word ptr [bp+0Ah] call sub_B976 pop cx mov bx, [bp+8] imul bx, 50h mov ax, [bp+6] sar ax, 3 add bx, ax mov ax, 0A800h mov cl, [bp+6] and cl, 7 mov dx, 80h sar dx, cl mov es, ax assume es:nothing mov es:[bx], dl call sub_BA0A pop bp retf ; --------------------------------------------------------------------------- enter 2, 0 push si push di mov ax, [bp+8] imul ax, 50h mov dx, [bp+6] sar dx, 3 add ax, dx mov di, ax mov cl, [bp+6] and cl, 7 mov ax, 80h sar ax, cl mov [bp-2], ax xor si, si mov ax, 0A800h mov es, ax mov al, es:[di] cbw test [bp-2], ax jz short loc_BFEF or si, 1 loc_BFEF: mov ax, 0B000h mov es, ax assume es:nothing mov al, es:[di] cbw test [bp-2], ax jz short loc_C000 or si, 2 loc_C000: mov ax, 0B800h mov es, ax assume es:nothing mov al, es:[di] cbw test [bp-2], ax jz short loc_C011 or si, 4 loc_C011: mov ax, 0E000h mov es, ax assume es:nothing mov al, es:[di] cbw test [bp-2], ax jz short loc_C022 or si, 8 loc_C022: mov ax, si pop di pop si leave retf ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_C028 proc far var_A = dword ptr -0Ah var_6 = byte ptr -6 var_5 = byte ptr -5 var_4 = word ptr -4 var_2 = word ptr -2 arg_0 = word ptr 6 arg_2 = word ptr 8 arg_4 = word ptr 0Ah arg_6 = word ptr 0Ch enter 0Ah, 0 push si push di mov di, [bp+arg_4] mov ax, [bp+arg_0] cmp ax, [bp+arg_2] jle short loc_C048 mov [bp+var_4], ax mov ax, [bp+arg_2] mov [bp+arg_0], ax mov ax, [bp+var_4] mov [bp+arg_2], ax loc_C048: cmp [bp+arg_0], 0 jge short loc_C05B cmp [bp+arg_2], 0 jl loc_C137 mov [bp+arg_0], 0 loc_C05B: cmp [bp+arg_2], 27Fh jle short loc_C070 cmp [bp+arg_0], 27Fh jg loc_C137 mov [bp+arg_2], 27Fh loc_C070: mov ax, [bp+arg_2] mov word_1366C, ax mov word_1366E, di mov ax, di imul ax, 50h push ax mov ax, [bp+arg_0] mov bx, 8 cwd idiv bx pop dx add dx, ax mov word ptr [bp+var_A+2], 0A800h mov word ptr [bp+var_A], dx mov ax, [bp+arg_2] cwd idiv bx push ax mov ax, [bp+arg_0] cwd idiv bx pop dx sub dx, ax mov [bp+var_2], dx mov cl, byte ptr [bp+arg_0] and cl, 7 mov ax, 0FFh sar ax, cl mov [bp+var_5], al mov al, byte ptr [bp+arg_2] and al, 7 mov cl, 7 sub cl, al mov al, 0FFh shl al, cl mov [bp+var_6], al cmp byte_129AA, 0 jnz short loc_C0D4 push [bp+arg_6] call sub_B976 pop cx loc_C0D4: cmp byte_129AA, 0 jz short loc_C0F2 push 1 mov ax, 280h sub ax, [bp+arg_0] push ax push di push [bp+arg_0] call sub_D338 add sp, 8 jmp short loc_C12C ; --------------------------------------------------------------------------- loc_C0F2: cmp [bp+var_2], 0 jnz short loc_C103 mov al, [bp+var_5] and al, [bp+var_6] les bx, [bp+var_A] assume es:nothing jmp short loc_C129 ; --------------------------------------------------------------------------- loc_C103: les bx, [bp+var_A] mov al, [bp+var_5] mov es:[bx], al mov si, 1 jmp short loc_C11B ; --------------------------------------------------------------------------- loc_C111: les bx, [bp+var_A] add bx, si mov byte ptr es:[bx], 0FFh inc si loc_C11B: cmp si, [bp+var_2] jl short loc_C111 les bx, [bp+var_A] add bx, [bp+var_2] mov al, [bp+var_6] loc_C129: mov es:[bx], al loc_C12C: cmp byte_129AA, 0 jnz short loc_C137 call sub_BA0A loc_C137: pop di pop si leave retf sub_C028 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_C13B proc far var_8 = word ptr -8 var_6 = word ptr -6 var_4 = word ptr -4 var_2 = word ptr -2 arg_0 = word ptr 6 arg_2 = word ptr 8 arg_4 = word ptr 0Ah arg_6 = word ptr 0Ch enter 8, 0 push si push di mov si, [bp+arg_2] mov di, [bp+arg_4] cmp si, di jle short loc_C153 mov [bp+var_4], si mov si, di mov di, [bp+var_4] loc_C153: or si, si jge short loc_C15F or di, di jl loc_C1F6 xor si, si loc_C15F: cmp di, 18Fh jle short loc_C170 cmp si, 18Fh jg loc_C1F6 mov di, 18Fh loc_C170: mov ax, [bp+arg_0] mov word_1366C, ax mov word_1366E, di cmp byte_129AA, 0 jz short loc_C196 mov ax, di sub ax, si push ax push 10h push si push [bp+arg_0] call sub_D338 add sp, 8 jmp short loc_C1F6 ; --------------------------------------------------------------------------- loc_C196: mov ax, [bp+arg_0] sar ax, 3 mov dx, si shl dx, 6 add ax, dx mov dx, si shl dx, 4 add ax, dx mov [bp+var_8], ax mov cl, byte ptr [bp+arg_0] and cl, 7 mov ax, word_129AB shr ax, cl mov [bp+var_6], ax mov al, byte ptr [bp+arg_0] and al, 7 mov cl, 10h sub cl, al mov ax, word_129AB shl ax, cl or [bp+var_6], ax push [bp+arg_6] call sub_B976 pop cx mov [bp+var_2], si jmp short loc_C1ED ; --------------------------------------------------------------------------- loc_C1D9: les bx, dword_13672 add bx, [bp+var_8] mov ax, [bp+var_6] mov es:[bx], ax add [bp+var_8], 50h ; 'P' inc [bp+var_2] loc_C1ED: cmp [bp+var_2], di jle short loc_C1D9 call sub_BA0A loc_C1F6: pop di pop si leave retf sub_C13B endp ; --------------------------------------------------------------------------- push bp mov bp, sp mov byte_129AA, 1 push 7 push word ptr [bp+0Ch] push word ptr [bp+0Ah] push word ptr [bp+8] push word ptr [bp+6] nopcall sub_C247 add sp, 0Ah mov byte_129AA, 0 pop bp retf ; --------------------------------------------------------------------------- push bp mov bp, sp mov ax, [bp+10h] mov word_129AB, ax push word ptr [bp+0Eh] push word ptr [bp+0Ch] push word ptr [bp+0Ah] push word ptr [bp+8] push word ptr [bp+6] nopcall sub_C247 add sp, 0Ah mov word_129AB, 80h pop bp retf ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_C247 proc far var_28 = dword ptr -28h var_24 = dword ptr -24h var_20 = dword ptr -20h var_1C = dword ptr -1Ch var_18 = word ptr -18h var_16 = word ptr -16h var_14 = word ptr -14h var_12 = word ptr -12h var_10 = word ptr -10h var_E = word ptr -0Eh var_C = word ptr -0Ch var_A = word ptr -0Ah var_8 = word ptr -8 var_6 = word ptr -6 var_4 = word ptr -4 var_2 = word ptr -2 arg_0 = word ptr 6 arg_2 = word ptr 8 arg_4 = word ptr 0Ah arg_6 = word ptr 0Ch arg_8 = word ptr 0Eh enter 28h, 0 push si push di mov di, [bp+arg_2] cmp byte_129AA, 0 jnz short loc_C26D mov ax, [bp+arg_0] cmp ax, [bp+arg_4] jnz short loc_C26D push [bp+arg_8] push [bp+arg_6] push di push ax call sub_C13B jmp short loc_C287 ; --------------------------------------------------------------------------- loc_C26D: cmp byte_129AA, 0 jnz short loc_C28D cmp di, [bp+arg_6] jnz short loc_C28D push [bp+arg_8] push di push [bp+arg_4] push [bp+arg_0] call sub_C028 loc_C287: add sp, 8 jmp loc_C772 ; --------------------------------------------------------------------------- loc_C28D: mov ax, [bp+arg_0] cmp ax, [bp+arg_4] jle short loc_C2B0 mov [bp+var_10], ax mov ax, [bp+arg_4] mov [bp+arg_0], ax mov ax, [bp+var_10] mov [bp+arg_4], ax mov [bp+var_10], di mov di, [bp+arg_6] mov ax, [bp+var_10] mov [bp+arg_6], ax loc_C2B0: cmp [bp+arg_0], 0 jge short loc_C2EE cmp [bp+arg_4], 0 jl loc_C772 mov ax, [bp+arg_6] sub ax, di mov bx, [bp+arg_4] sub bx, [bp+arg_0] cwd idiv bx mov [bp+var_18], ax ; Hack (fild [bp+var_18]) db 0cdh db 03bh db 046h db 0e8h xor ax, ax sub ax, [bp+arg_0] mov [bp+var_18], ax ; Hack (fild [bp+var_18]) db 0cdh db 03bh db 046h db 0e8h ; Hack (fmulp st(1), st) db 0cdh db 03ah db 0c9h call ftol@ add di, ax mov [bp+arg_0], 0 loc_C2EE: cmp [bp+arg_4], 27Fh jle short loc_C330 cmp [bp+arg_0], 27Fh jg loc_C772 mov ax, [bp+arg_6] sub ax, di mov bx, [bp+arg_4] sub bx, [bp+arg_0] cwd idiv bx mov [bp+var_18], ax ; Hack (fild [bp+var_18]) db 0cdh db 03bh db 046h db 0e8h mov ax, [bp+arg_4] add ax, 0FD81h mov [bp+var_18], ax ; Hack (fild [bp+var_18]) db 0cdh db 03bh db 046h db 0e8h ; Hack (fmulp st(1), st) db 0cdh db 03ah db 0c9h call ftol@ sub [bp+arg_6], ax mov [bp+arg_4], 27Fh loc_C330: or di, di jge short loc_C369 cmp [bp+arg_6], 0 jl loc_C772 mov ax, [bp+arg_4] sub ax, [bp+arg_0] mov bx, [bp+arg_6] sub bx, di cwd idiv bx mov [bp+var_18], ax ; Hack (fild [bp+var_18]) db 0cdh db 03bh db 046h db 0e8h xor ax, ax sub ax, di mov [bp+var_18], ax ; Hack (fild [bp+var_18]) db 0cdh db 03bh db 046h db 0e8h ; Hack (fmulp st(1), st) db 0cdh db 03ah db 0c9h call ftol@ add [bp+arg_0], ax xor di, di loc_C369: cmp [bp+arg_6], 18Fh jle short loc_C3AA cmp di, 18Fh jg loc_C772 mov ax, [bp+arg_4] sub ax, [bp+arg_0] mov bx, [bp+arg_6] sub bx, di cwd idiv bx mov [bp+var_18], ax ; Hack (fild [bp+var_18]) db 0cdh db 03bh db 046h db 0e8h mov ax, [bp+arg_6] add ax, 0FE71h mov [bp+var_18], ax ; Hack (fild [bp+var_18]) db 0cdh db 03bh db 046h db 0e8h ; Hack (fmulp st(1), st) db 0cdh db 03ah db 0c9h call ftol@ sub [bp+arg_4], ax mov [bp+arg_6], 18Fh loc_C3AA: cmp [bp+arg_6], 0 jge short loc_C3E1 mov ax, [bp+arg_4] sub ax, [bp+arg_0] mov bx, [bp+arg_6] sub bx, di cwd idiv bx mov [bp+var_18], ax ; Hack (fild [bp+var_18]) db 0cdh db 03bh db 046h db 0e8h xor ax, ax sub ax, [bp+arg_6] mov [bp+var_18], ax ; Hack (fild [bp+var_18]) db 0cdh db 03bh db 046h db 0e8h ; Hack (fmulp st(1), st) db 0cdh db 03ah db 0c9h call ftol@ add [bp+arg_4], ax mov [bp+arg_6], 0 loc_C3E1: cmp di, 18Fh jle short loc_C415 mov ax, [bp+arg_4] sub ax, [bp+arg_0] mov bx, [bp+arg_6] sub bx, di cwd idiv bx mov [bp+var_18], ax ; Hack (fild [bp+var_18]) db 0cdh db 03bh db 046h db 0e8h lea ax, [di-18Fh] mov [bp+var_18], ax ; Hack (fild [bp+var_18]) db 0cdh db 03bh db 046h db 0e8h ; Hack (fmulp st(1), st) db 0cdh db 03ah db 0c9h call ftol@ sub [bp+arg_0], ax mov di, 18Fh loc_C415: mov ax, [bp+arg_4] mov word_1366C, ax mov ax, [bp+arg_6] mov word_1366E, ax mov ax, [bp+arg_0] mov [bp+var_4], ax mov [bp+var_6], di cmp di, [bp+arg_6] jge short loc_C434 mov ax, 1 jmp short loc_C437 ; --------------------------------------------------------------------------- loc_C434: mov ax, 0FFFFh loc_C437: mov [bp+var_E], ax mov ax, [bp+arg_4] sub ax, [bp+arg_0] mov [bp+var_8], ax mov ax, [bp+arg_6] sub ax, di imul [bp+var_E] mov [bp+var_A], ax mov [bp+var_16], 0 mov ax, [bp+var_4] sar ax, 3 mov [bp+var_12], ax mov ax, [bp+var_6] mov [bp+var_14], ax cmp byte_129AA, 0 jnz short loc_C471 push [bp+arg_8] call sub_B976 pop cx loc_C471: mov ax, [bp+var_8] cmp ax, [bp+var_A] jle loc_C5A5 sar ax, 1 mov [bp+var_C], ax mov [bp+var_2], 0 jmp loc_C58F ; --------------------------------------------------------------------------- loc_C488: mov ax, [bp+var_4] sar ax, 3 cmp ax, [bp+var_12] jnz short loc_C49D mov ax, [bp+var_14] cmp ax, [bp+var_6] jz loc_C552 loc_C49D: mov ax, [bp+var_14] imul ax, 50h add ax, [bp+var_12] mov si, ax cmp byte_129AA, 0 jnz short loc_C4C3 les bx, dword_13672 add bx, si mov ax, [bp+var_16] mov es:[bx], ax mov [bp+var_16], 0 jmp loc_C543 ; --------------------------------------------------------------------------- loc_C4C3: dec si push 1 call sub_B943 les bx, dword_13672 add bx, si mov eax, es:[bx] mov [bp+var_28], eax les bx, dword_13676 add bx, si mov eax, es:[bx] mov [bp+var_24], eax les bx, dword_1367A add bx, si mov eax, es:[bx] mov [bp+var_20], eax les bx, dword_1367E add bx, si mov eax, es:[bx] mov [bp+var_1C], eax push 0 call sub_B943 add sp, 4 les bx, dword_13672 add bx, si mov eax, [bp+var_28] mov es:[bx], eax les bx, dword_13676 add bx, si mov eax, [bp+var_24] mov es:[bx], eax les bx, dword_1367A add bx, si mov eax, [bp+var_20] mov es:[bx], eax les bx, dword_1367E add bx, si mov eax, [bp+var_1C] mov es:[bx], eax loc_C543: mov ax, [bp+var_6] mov [bp+var_14], ax mov ax, [bp+var_4] sar ax, 3 mov [bp+var_12], ax loc_C552: mov cl, byte ptr [bp+var_4] and cl, 7 mov ax, word_129AB shr ax, cl or [bp+var_16], ax mov al, byte ptr [bp+var_4] and al, 7 mov cl, 10h sub cl, al mov ax, word_129AB shl ax, cl or [bp+var_16], ax mov ax, [bp+var_A] sub [bp+var_C], ax inc [bp+var_4] cmp [bp+var_C], 0 jge short loc_C58C mov ax, [bp+var_8] add [bp+var_C], ax mov ax, [bp+var_E] add [bp+var_6], ax loc_C58C: inc [bp+var_2] loc_C58F: mov ax, [bp+var_2] cmp ax, [bp+var_8] jle loc_C488 cmp byte_129AA, 0 jz loc_C767 jmp loc_C6CF ; --------------------------------------------------------------------------- loc_C5A5: mov ax, [bp+var_A] sar ax, 1 mov [bp+var_C], ax mov [bp+var_2], 0 jmp loc_C6BC ; --------------------------------------------------------------------------- loc_C5B5: mov ax, [bp+var_4] sar ax, 3 cmp ax, [bp+var_12] jnz short loc_C5CA mov ax, [bp+var_14] cmp ax, [bp+var_6] jz loc_C67F loc_C5CA: mov ax, [bp+var_14] imul ax, 50h add ax, [bp+var_12] mov si, ax cmp byte_129AA, 0 jnz short loc_C5F0 les bx, dword_13672 add bx, si mov ax, [bp+var_16] mov es:[bx], ax mov [bp+var_16], 0 jmp loc_C670 ; --------------------------------------------------------------------------- loc_C5F0: dec si push 1 call sub_B943 les bx, dword_13672 add bx, si mov eax, es:[bx] mov [bp+var_28], eax les bx, dword_13676 add bx, si mov eax, es:[bx] mov [bp+var_24], eax les bx, dword_1367A add bx, si mov eax, es:[bx] mov [bp+var_20], eax les bx, dword_1367E add bx, si mov eax, es:[bx] mov [bp+var_1C], eax push 0 call sub_B943 add sp, 4 les bx, dword_13672 add bx, si mov eax, [bp+var_28] mov es:[bx], eax les bx, dword_13676 add bx, si mov eax, [bp+var_24] mov es:[bx], eax les bx, dword_1367A add bx, si mov eax, [bp+var_20] mov es:[bx], eax les bx, dword_1367E add bx, si mov eax, [bp+var_1C] mov es:[bx], eax loc_C670: mov ax, [bp+var_6] mov [bp+var_14], ax mov ax, [bp+var_4] sar ax, 3 mov [bp+var_12], ax loc_C67F: mov cl, byte ptr [bp+var_4] and cl, 7 mov ax, word_129AB shr ax, cl or [bp+var_16], ax mov al, byte ptr [bp+var_4] and al, 7 mov cl, 10h sub cl, al mov ax, word_129AB shl ax, cl or [bp+var_16], ax mov ax, [bp+var_8] sub [bp+var_C], ax mov ax, [bp+var_E] add [bp+var_6], ax cmp [bp+var_C], 0 jge short loc_C6B9 mov ax, [bp+var_A] add [bp+var_C], ax inc [bp+var_4] loc_C6B9: inc [bp+var_2] loc_C6BC: mov ax, [bp+var_2] cmp ax, [bp+var_A] jle loc_C5B5 cmp byte_129AA, 0 jz loc_C767 loc_C6CF: mov ax, [bp+var_4] sar ax, 3 mov dx, [bp+var_6] shl dx, 6 add ax, dx mov dx, [bp+var_6] shl dx, 4 add ax, dx dec ax mov si, ax push 1 call sub_B943 les bx, dword_13672 add bx, si mov eax, es:[bx] mov [bp+var_28], eax les bx, dword_13676 add bx, si mov eax, es:[bx] mov [bp+var_24], eax les bx, dword_1367A add bx, si mov eax, es:[bx] mov [bp+var_20], eax les bx, dword_1367E add bx, si mov eax, es:[bx] mov [bp+var_1C], eax push 0 call sub_B943 add sp, 4 les bx, dword_13672 add bx, si mov eax, [bp+var_28] mov es:[bx], eax les bx, dword_13676 add bx, si mov eax, [bp+var_24] mov es:[bx], eax les bx, dword_1367A add bx, si mov eax, [bp+var_20] mov es:[bx], eax les bx, dword_1367E add bx, si mov eax, [bp+var_1C] mov es:[bx], eax loc_C767: cmp byte_129AA, 0 jnz short loc_C772 call sub_BA0A loc_C772: pop di pop si leave retf sub_C247 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_C776 proc far var_E = dword ptr -0Eh var_A = byte ptr -0Ah var_9 = byte ptr -9 var_8 = word ptr -8 var_6 = word ptr -6 var_4 = word ptr -4 var_2 = word ptr -2 arg_0 = word ptr 6 arg_2 = word ptr 8 arg_4 = word ptr 0Ah arg_6 = word ptr 0Ch arg_8 = word ptr 0Eh enter 0Eh, 0 push si push di mov si, [bp+arg_2] mov di, [bp+arg_6] mov ax, [bp+arg_0] cmp ax, [bp+arg_4] jle short loc_C799 mov [bp+var_8], ax mov ax, [bp+arg_4] mov [bp+arg_0], ax mov ax, [bp+var_8] mov [bp+arg_4], ax loc_C799: cmp si, di jle short loc_C7A5 mov [bp+var_8], si mov si, di mov di, [bp+var_8] loc_C7A5: cmp [bp+arg_0], 0 jge short loc_C7B8 cmp [bp+arg_4], 0 jl loc_C88D mov [bp+arg_0], 0 loc_C7B8: cmp [bp+arg_4], 27Fh jle short loc_C7CD cmp [bp+arg_0], 27Fh jg loc_C88D mov [bp+arg_4], 27Fh loc_C7CD: or si, si jge short loc_C7D9 or di, di jl loc_C88D xor si, si loc_C7D9: cmp di, 18Fh jle short loc_C7EA cmp si, 18Fh jg loc_C88D mov di, 18Fh loc_C7EA: push [bp+arg_8] call sub_B976 pop cx mov ax, si imul ax, 50h mov dx, [bp+arg_0] sar dx, 3 add ax, dx mov word ptr [bp+var_E+2], 0A800h mov word ptr [bp+var_E], ax mov [bp+var_4], si jmp short loc_C884 ; --------------------------------------------------------------------------- loc_C80C: mov ax, [bp+arg_4] sar ax, 3 mov dx, [bp+arg_0] sar dx, 3 sub ax, dx mov [bp+var_6], ax mov cl, byte ptr [bp+arg_0] and cl, 7 mov ax, 0FFh sar ax, cl mov [bp+var_9], al mov al, byte ptr [bp+arg_4] and al, 7 mov cl, 7 sub cl, al mov al, 0FFh shl al, cl mov [bp+var_A], al cmp [bp+var_6], 0 jnz short loc_C84C mov al, [bp+var_9] and al, [bp+var_A] les bx, [bp+var_E] jmp short loc_C87A ; --------------------------------------------------------------------------- loc_C84C: les bx, [bp+var_E] mov al, [bp+var_9] mov es:[bx], al mov [bp+var_2], 1 jmp short loc_C869 ; --------------------------------------------------------------------------- loc_C85C: les bx, [bp+var_E] add bx, [bp+var_2] mov byte ptr es:[bx], 0FFh inc [bp+var_2] loc_C869: mov ax, [bp+var_2] cmp ax, [bp+var_6] jl short loc_C85C les bx, [bp+var_E] add bx, [bp+var_6] mov al, [bp+var_A] loc_C87A: mov es:[bx], al add word ptr [bp+var_E], 50h ; 'P' inc [bp+var_4] loc_C884: cmp [bp+var_4], di jle short loc_C80C call sub_BA0A loc_C88D: pop di pop si leave retf sub_C776 endp ; --------------------------------------------------------------------------- push bp mov bp, sp push si push di mov di, [bp+6] mov si, [bp+0Eh] push si push word ptr [bp+8] push word ptr [bp+0Ah] push di call sub_C028 push si push word ptr [bp+0Ch] push word ptr [bp+8] push di call sub_C13B push si push word ptr [bp+0Ch] push word ptr [bp+8] push word ptr [bp+0Ah] call sub_C13B push si push word ptr [bp+0Ch] push word ptr [bp+0Ah] push di call sub_C028 add sp, 20h pop di pop si pop bp retf ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_C8D5 proc far arg_0 = word ptr 6 arg_2 = dword ptr 8 push bp mov bp, sp push si push di xor cx, cx mov ax, [bp+arg_0] mov bx, 40h cwd idiv bx mov bx, 8 cwd idiv bx mov si, dx jmp short loc_C937 ; --------------------------------------------------------------------------- loc_C8EF: les bx, [bp+arg_2] mov al, es:[bx] mov ah, 0 mov bx, ax test byte ptr [bx+1013h], 4 jz short loc_C92F mov bx, word ptr [bp+arg_2] mov al, es:[bx] cbw shl ax, 8 mov dl, es:[bx] mov dh, 0 add ax, dx mov di, ax inc word ptr [bp+arg_2] inc word ptr [bp+arg_2] cmp di, 8540h jb short loc_C925 cmp di, 869Eh jbe short loc_C92A loc_C925: add cx, 10h jmp short loc_C935 ; --------------------------------------------------------------------------- loc_C92A: add cx, 8 jmp short loc_C935 ; --------------------------------------------------------------------------- loc_C92F: add cx, 8 inc word ptr [bp+arg_2] loc_C935: add cx, si loc_C937: les bx, [bp+arg_2] cmp byte ptr es:[bx], 0 jnz short loc_C8EF mov ax, cx sub ax, si pop di pop si pop bp retf sub_C8D5 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_C948 proc far var_3A = byte ptr -3Ah var_1A = word ptr -1Ah var_18 = word ptr -18h var_16 = word ptr -16h var_14 = word ptr -14h var_12 = word ptr -12h var_10 = word ptr -10h var_E = word ptr -0Eh var_C = word ptr -0Ch var_A = word ptr -0Ah var_8 = dword ptr -8 var_4 = word ptr -4 var_2 = word ptr -2 arg_0 = word ptr 6 arg_2 = word ptr 8 arg_4 = word ptr 0Ah arg_6 = dword ptr 0Ch enter 3Ah, 0 push si push di mov si, [bp+arg_0] mov ax, [bp+arg_4] mov bx, 10h cwd idiv bx mov bx, 4 cwd idiv bx mov [bp+var_E], dx mov ax, [bp+arg_4] mov bx, 40h cwd idiv bx mov bx, 8 cwd idiv bx mov [bp+var_10], dx mov ax, [bp+arg_4] and ax, 200h mov [bp+var_12], ax mov ax, [bp+arg_4] and ax, 400h mov [bp+var_14], ax mov ax, [bp+arg_4] and ax, 800h mov [bp+var_16], ax cmp [bp+var_12], 0 jz short loc_C9E7 pushd [bp+arg_6] push [bp+arg_4] call sub_C8D5 add sp, 6 mov [bp+var_18], ax cmp [bp+var_14], 0 jz short loc_C9CA push 0 mov ax, [bp+arg_2] add ax, 11h push ax mov ax, si add ax, [bp+var_18] dec ax push ax push [bp+arg_2] push si call sub_C776 add sp, 0Ah jmp short loc_C9FE ; --------------------------------------------------------------------------- loc_C9CA: push 0 mov ax, [bp+arg_2] add ax, 0Fh push ax mov ax, si add ax, [bp+var_18] dec ax push ax push [bp+arg_2] push si call sub_C776 add sp, 0Ah jmp short loc_CA16 ; --------------------------------------------------------------------------- loc_C9E7: cmp [bp+var_14], 0 jz short loc_CA16 pushd [bp+arg_6] push [bp+arg_4] call sub_C8D5 add sp, 6 mov [bp+var_18], ax loc_C9FE: push 7 mov ax, [bp+arg_2] add ax, 11h push ax mov ax, si add ax, [bp+var_18] dec ax push ax push si call sub_C028 add sp, 8 loc_CA16: push [bp+arg_4] call sub_B976 pop cx mov dx, 68h ; 'h' mov al, 0Bh out dx, al jmp loc_CC4E ; --------------------------------------------------------------------------- loc_CA27: mov ax, [bp+arg_2] imul ax, 50h push ax mov ax, si mov bx, 8 cwd idiv bx pop dx add dx, ax mov word ptr [bp+var_8+2], 0A800h mov word ptr [bp+var_8], dx mov ax, si cwd idiv bx mov [bp+var_C], dx les bx, [bp+arg_6] mov al, es:[bx] mov ah, 0 mov bx, ax test byte ptr [bx+1013h], 4 jz short loc_CA7C mov bx, word ptr [bp+arg_6] mov al, es:[bx] cbw shl ax, 8 mov dl, es:[bx+1] mov dh, 0 add ax, dx push ax call __mbcjmstojis pop cx mov [bp+var_2], ax add word ptr [bp+arg_6], 2 jmp short loc_CAC2 ; --------------------------------------------------------------------------- loc_CA7C: les bx, [bp+arg_6] mov al, es:[bx] mov ah, 0 mov bx, ax test byte ptr [bx+1013h], 3 jz short loc_CA9A mov bx, word ptr [bp+arg_6] mov al, es:[bx] mov ah, 0 add ax, 2980h jmp short loc_CAB5 ; --------------------------------------------------------------------------- loc_CA9A: les bx, [bp+arg_6] mov al, es:[bx] cbw mov bx, ax test byte ptr [bx+0C3Bh], 5Eh jz short loc_CABA mov bx, word ptr [bp+arg_6] mov al, es:[bx] mov ah, 0 add ax, 2900h loc_CAB5: mov [bp+var_2], ax jmp short loc_CABF ; --------------------------------------------------------------------------- loc_CABA: mov [bp+var_2], 2B21h loc_CABF: inc word ptr [bp+arg_6] loc_CAC2: mov al, byte ptr [bp+var_2] and al, 0FFh mov dx, 0A1h out dx, al mov ax, [bp+var_2] shr ax, 8 sub al, 20h ; ' ' mov dx, 0A3h ; '」' out dx, al cmp [bp+var_2], 2921h jb short loc_CB23 cmp [bp+var_2], 2B7Eh ja short loc_CB23 cmp si, 278h jg loc_CC59 mov [bp+var_1A], 0 jmp short loc_CB16 ; --------------------------------------------------------------------------- loc_CAF4: mov al, byte ptr [bp+var_1A] or al, 20h mov dx, 0A5h out dx, al mov dx, 0A9h in al, dx mov ah, 0 shl ax, 8 mov bx, [bp+var_1A] add bx, bx lea dx, [bp+var_3A] add bx, dx mov ss:[bx], ax inc [bp+var_1A] loc_CB16: cmp [bp+var_1A], 10h jl short loc_CAF4 mov [bp+var_A], 0 jmp short loc_CB79 ; --------------------------------------------------------------------------- loc_CB23: cmp si, 270h jg loc_CC59 mov [bp+var_1A], 0 jmp short loc_CB6E ; --------------------------------------------------------------------------- loc_CB32: mov al, byte ptr [bp+var_1A] or al, 20h mov dx, 0A5h out dx, al mov dx, 0A9h in al, dx mov ah, 0 shl ax, 8 mov bx, [bp+var_1A] add bx, bx lea dx, [bp+var_3A] add bx, dx mov ss:[bx], ax mov dx, 0A5h mov al, byte ptr [bp+var_1A] out dx, al mov dx, 0A9h in al, dx mov ah, 0 mov bx, [bp+var_1A] add bx, bx lea dx, [bp+var_3A] add bx, dx add ss:[bx], ax inc [bp+var_1A] loc_CB6E: cmp [bp+var_1A], 10h jl short loc_CB32 mov [bp+var_A], 1 loc_CB79: mov [bp+var_1A], 0 jmp loc_CC35 ; --------------------------------------------------------------------------- loc_CB81: mov bx, [bp+var_1A] add bx, bx lea ax, [bp+var_3A] add bx, ax mov ax, ss:[bx] mov [bp+var_4], ax mov ax, [bp+var_E] cmp ax, 1 jz short loc_CBA5 cmp ax, 2 jz short loc_CBBB cmp ax, 3 jz short loc_CBB1 jmp short loc_CBD1 ; --------------------------------------------------------------------------- loc_CBA5: mov di, [bp+var_4] mov ax, di add ax, ax or [bp+var_4], ax jmp short loc_CBD1 ; --------------------------------------------------------------------------- loc_CBB1: mov di, [bp+var_4] mov ax, di add ax, ax or [bp+var_4], ax loc_CBBB: mov di, [bp+var_4] mov ax, di add ax, ax or [bp+var_4], ax xor di, [bp+var_4] mov ax, di add ax, ax not ax and [bp+var_4], ax loc_CBD1: cmp [bp+var_16], 0 jz short loc_CBE8 cmp [bp+var_A], 0 jz short loc_CBE3 xor [bp+var_4], 0FFFFh jmp short loc_CBE8 ; --------------------------------------------------------------------------- loc_CBE3: xor [bp+var_4], 0FF00h loc_CBE8: cmp [bp+var_C], 0 jz short loc_CC1B mov cl, byte ptr [bp+var_C] add cl, 8 mov ax, [bp+var_4] shr ax, cl les bx, [bp+var_8] mov es:[bx], al mov ax, [bp+var_4] mov cl, byte ptr [bp+var_C] shr ax, cl mov es:[bx+1], al mov cl, 8 sub cl, byte ptr [bp+var_C] mov al, byte ptr [bp+var_4] shl al, cl mov es:[bx+2], al jmp short loc_CC2E ; --------------------------------------------------------------------------- loc_CC1B: mov ax, [bp+var_4] shr ax, 8 les bx, [bp+var_8] mov es:[bx], al mov al, byte ptr [bp+var_4] mov es:[bx+1], al loc_CC2E: add word ptr [bp+var_8], 50h ; 'P' inc [bp+var_1A] loc_CC35: cmp [bp+var_1A], 10h jl loc_CB81 cmp [bp+var_A], 0 jz short loc_CC46 add si, 8 loc_CC46: mov ax, [bp+var_10] add ax, 8 add si, ax loc_CC4E: les bx, [bp+arg_6] cmp byte ptr es:[bx], 0 jnz loc_CA27 loc_CC59: mov dx, 68h ; 'h' mov al, 0Ah out dx, al call sub_BA0A pop di pop si leave retf sub_C948 endp ; --------------------------------------------------------------------------- enter 156h, 0 push si push di mov di, [bp+6] mov ax, [bp+0Ah] sub ax, di mov bx, 8 cwd idiv bx mov si, ax mov ax, [bp+0Ch] sub ax, [bp+8] mov [bp-2], ax mov dword ptr [bp-6], 0A8000000h mov dword ptr [bp-0Ah], 0B0000000h mov dword ptr [bp-0Eh], 0B8000000h mov dword ptr [bp-12h], 0E0000000h mov al, byte_13671 xor al, 1 mov [bp-13h], al mov ax, di cwd idiv bx mov dx, [bp+8] imul dx, 50h add ax, dx add [bp-6], ax mov ax, di cwd idiv bx mov dx, [bp+8] imul dx, 50h add ax, dx add [bp-0Ah], ax mov ax, di cwd idiv bx mov dx, [bp+8] imul dx, 50h add ax, dx add [bp-0Eh], ax mov ax, di cwd idiv bx mov dx, [bp+8] imul dx, 50h add ax, dx add [bp-12h], ax mov word ptr [bp-16h], 0 jmp loc_CD9B ; --------------------------------------------------------------------------- loc_CCF6: push si pushd dword ptr [bp-6] push ss lea ax, [bp-66h] push ax call _memcpy push si pushd dword ptr [bp-0Ah] push ss lea ax, [bp-0B6h] push ax call _memcpy push si pushd dword ptr [bp-0Eh] push ss lea ax, [bp-106h] push ax call _memcpy push si pushd dword ptr [bp-12h] push ss lea ax, [bp-156h] push ax call _memcpy mov dx, 0A6h ; 'ヲ' mov al, [bp-13h] out dx, al push si push ss lea ax, [bp-66h] push ax pushd dword ptr [bp-6] call _memcpy add sp, 32h push si push ss lea ax, [bp-0B6h] push ax pushd dword ptr [bp-0Ah] call _memcpy push si push ss lea ax, [bp-106h] push ax pushd dword ptr [bp-0Eh] call _memcpy push si push ss lea ax, [bp-156h] push ax pushd dword ptr [bp-12h] call _memcpy add sp, 1Eh mov dx, 0A6h ; 'ヲ' mov al, byte_13671 out dx, al add word ptr [bp-6], 50h ; 'P' add word ptr [bp-0Ah], 50h ; 'P' add word ptr [bp-0Eh], 50h ; 'P' add word ptr [bp-12h], 50h ; 'P' inc word ptr [bp-16h] loc_CD9B: mov ax, [bp-16h] cmp ax, [bp-2] jl loc_CCF6 pop di pop si leave retf ; --------------------------------------------------------------------------- enter 164h, 0 push si push di mov di, [bp+6] mov ax, [bp+0Ah] sub ax, di mov bx, 8 cwd idiv bx mov si, ax mov ax, [bp+0Ch] sub ax, [bp+8] mov [bp-2], ax mov dword ptr [bp-6], 0A8000000h mov dword ptr [bp-0Ah], 0B0000000h mov dword ptr [bp-0Eh], 0B8000000h mov dword ptr [bp-12h], 0E0000000h mov dword ptr [bp-16h], 0A8000000h mov dword ptr [bp-1Ah], 0B0000000h mov dword ptr [bp-1Eh], 0B8000000h mov dword ptr [bp-22h], 0E0000000h mov ax, di cwd idiv bx mov dx, [bp+8] imul dx, 50h add ax, dx add [bp-6], ax mov ax, di cwd idiv bx mov dx, [bp+8] imul dx, 50h add ax, dx add [bp-0Ah], ax mov ax, di cwd idiv bx mov dx, [bp+8] imul dx, 50h add ax, dx add [bp-0Eh], ax mov ax, di cwd idiv bx mov dx, [bp+8] imul dx, 50h add ax, dx add [bp-12h], ax mov ax, [bp+0Eh] cwd idiv bx mov dx, [bp+10h] imul dx, 50h add ax, dx add [bp-16h], ax mov ax, [bp+0Eh] cwd idiv bx mov dx, [bp+10h] imul dx, 50h add ax, dx add [bp-1Ah], ax mov ax, [bp+0Eh] cwd idiv bx mov dx, [bp+10h] imul dx, 50h add ax, dx add [bp-1Eh], ax mov ax, [bp+0Eh] cwd idiv bx mov dx, [bp+10h] imul dx, 50h add ax, dx add [bp-22h], ax mov word ptr [bp-24h], 0 jmp loc_CF49 ; --------------------------------------------------------------------------- loc_CE94: push si pushd dword ptr [bp-6] push ss lea ax, [bp-74h] push ax call _memcpy push si pushd dword ptr [bp-0Ah] push ss lea ax, [bp-0C4h] push ax call _memcpy push si pushd dword ptr [bp-0Eh] push ss lea ax, [bp-114h] push ax call _memcpy push si pushd dword ptr [bp-12h] push ss lea ax, [bp-164h] push ax call _memcpy mov dx, 0A6h ; 'ヲ' mov al, [bp+14h] out dx, al push si push ss lea ax, [bp-74h] push ax pushd dword ptr [bp-16h] call _memcpy add sp, 32h push si push ss lea ax, [bp-0C4h] push ax pushd dword ptr [bp-1Ah] call _memcpy push si push ss lea ax, [bp-114h] push ax pushd dword ptr [bp-1Eh] call _memcpy push si push ss lea ax, [bp-164h] push ax pushd dword ptr [bp-22h] call _memcpy add sp, 1Eh mov dx, 0A6h ; 'ヲ' mov al, [bp+12h] out dx, al add word ptr [bp-6], 50h ; 'P' add word ptr [bp-0Ah], 50h ; 'P' add word ptr [bp-0Eh], 50h ; 'P' add word ptr [bp-12h], 50h ; 'P' add word ptr [bp-16h], 50h ; 'P' add word ptr [bp-1Ah], 50h ; 'P' add word ptr [bp-1Eh], 50h ; 'P' add word ptr [bp-22h], 50h ; 'P' inc word ptr [bp-24h] loc_CF49: mov ax, [bp-24h] cmp ax, [bp-2] jl loc_CE94 mov dx, 0A6h ; 'ヲ' mov al, byte_13671 out dx, al pop di pop si leave retf ; --------------------------------------------------------------------------- enter 34h, 0 push si push di push 300000h push ss lea ax, [bp-34h] push ax call _memset add sp, 8 xor di, di jmp loc_CFFD ; --------------------------------------------------------------------------- loc_CF7C: mov ax, di add ax, ax les bx, [bp+0Ch] add bx, ax cmp word ptr es:[bx], 0 jnz short loc_CFBA mov bx, di imul bx, 3 lea ax, [bp-34h] add bx, ax mov al, [bp+6] mov ss:[bx], al mov bx, di imul bx, 3 lea ax, [bp-33h] add bx, ax mov al, [bp+8] mov ss:[bx], al mov bx, di imul bx, 3 lea ax, [bp-32h] add bx, ax mov al, [bp+0Ah] jmp short loc_CFF9 ; --------------------------------------------------------------------------- loc_CFBA: mov bx, di imul bx, 3 lea ax, [bp-34h] add bx, ax mov si, di imul si, 3 mov al, [si+6EAh] mov ss:[bx], al mov bx, di imul bx, 3 lea ax, [bp-33h] add bx, ax mov si, di imul si, 3 mov al, [si+6EBh] mov ss:[bx], al mov bx, di imul bx, 3 lea ax, [bp-32h] add bx, ax mov si, di imul si, 3 mov al, [si+6ECh] loc_CFF9: mov ss:[bx], al inc di loc_CFFD: cmp di, 10h jl loc_CF7C xor di, di jmp loc_D0DA ; --------------------------------------------------------------------------- loc_D009: call sub_B334 mov word ptr [bp-2], 0 jmp loc_D0C8 ; --------------------------------------------------------------------------- loc_D016: mov word ptr [bp-4], 0 jmp short palette_show5 ; --------------------------------------------------------------------------- loc_D01D: mov bx, [bp-2] imul bx, 3 add bx, [bp-4] lea ax, [bp-34h] add bx, ax mov al, ss:[bx] mov bx, [bp-2] imul bx, 3 add bx, [bp-4] cmp al, [bx+6EAh] jz short palette_show2 mov bx, [bp-2] imul bx, 3 add bx, [bp-4] lea ax, [bp-34h] add bx, ax mov al, ss:[bx] mov bx, [bp-2] imul bx, 3 add bx, [bp-4] cmp al, [bx+6EAh] jge short loc_D061 mov al, 1 jmp short loc_D063 ; --------------------------------------------------------------------------- loc_D061: mov al, 0FFh loc_D063: mov bx, [bp-2] imul bx, 3 add bx, [bp-4] lea dx, [bp-34h] add bx, dx add al, ss:[bx] mov bx, [bp-2] imul bx, 3 add bx, [bp-4] add bx, dx mov ss:[bx], al palette_show2: inc word ptr [bp-4] palette_show5: cmp word ptr [bp-4], 3 jl short loc_D01D mov bx, [bp-2] imul bx, 3 lea ax, [bp-32h] add bx, ax mov al, ss:[bx] cbw push ax mov bx, [bp-2] imul bx, 3 lea ax, [bp-33h] add bx, ax mov al, ss:[bx] cbw push ax mov bx, [bp-2] imul bx, 3 lea ax, [bp-34h] add bx, ax mov al, ss:[bx] cbw push ax push word ptr [bp-2] call sub_B955 add sp, 8 inc word ptr [bp-2] loc_D0C8: cmp word ptr [bp-2], 10h jl loc_D016 push word ptr [bp+10h] call _delay pop cx inc di loc_D0DA: cmp di, 10h jl loc_D009 pop di pop si leave retf ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_D0E5 proc far inregs = REGS ptr -22h var_12 = byte ptr -12h segp = SREGS ptr -8 enter 22h, 0 push si push di lea ax, [bp+var_12] push ss push ax push ds push offset aPal98Grb ; "pal98 grb" mov cx, 0Ah call SCOPY@ push ss lea ax, [bp+segp] push ax ; segp call _segread add sp, 4 mov byte ptr [bp+inregs+1], 52h ; 'R' push ss lea ax, [bp+segp] push ax ; segregs push ss lea ax, [bp+inregs] push ax ; outregs push ss push ax ; inregs call _intdosx add sp, 0Ch mov bx, word ptr [bp+inregs+2] sub bx, 2 mov es, [bp+segp+SREGS._es] mov si, es:[bx] loc_D12D: mov es, si cmp word ptr es:1, 0 jz short loc_D156 xor di, di jmp short loc_D147 ; --------------------------------------------------------------------------- loc_D13B: mov es, si mov al, es:[di+10h] cmp al, [bp+di+var_12] jnz short loc_D14C inc di loc_D147: cmp di, 0Ah jl short loc_D13B loc_D14C: cmp di, 0Ah jnz short loc_D156 lea ax, [si+1] jmp short loc_D16F ; --------------------------------------------------------------------------- loc_D156: mov es, si cmp byte ptr es:0, 4Dh ; 'M' jz short loc_D164 xor ax, ax jmp short loc_D16F ; --------------------------------------------------------------------------- loc_D164: mov es, si mov ax, es:3 inc ax add si, ax jmp short loc_D12D ; --------------------------------------------------------------------------- loc_D16F: pop di pop si leave retf sub_D0E5 endp ; --------------------------------------------------------------------------- enter 4, 0 push si push di call sub_D0E5 mov di, ax or di, di jz short loc_D1B9 mov [bp-2], di mov word ptr [bp-4], 10h xor si, si jmp short loc_D1B0 ; --------------------------------------------------------------------------- loc_D18F: les bx, [bp-4] mov al, es:[bx+2] cbw push ax mov al, es:[bx] cbw push ax mov al, es:[bx+1] cbw push ax push si call sub_BA5E add sp, 8 add word ptr [bp-4], 3 inc si loc_D1B0: cmp si, 10h jl short loc_D18F xor ax, ax jmp short loc_D1BC ; --------------------------------------------------------------------------- loc_D1B9: mov ax, 1 loc_D1BC: pop di pop si leave retf ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_D1C0 proc far var_4 = dword ptr -4 enter 4, 0 push si push di call sub_D0E5 mov di, ax or di, di jz short loc_D219 mov word ptr [bp+var_4+2], di mov word ptr [bp+var_4], 10h xor si, si jmp short loc_D210 ; --------------------------------------------------------------------------- loc_D1DC: mov bx, si imul bx, 3 mov al, [bx+6EBh] les bx, [bp+var_4] mov es:[bx], al mov bx, si imul bx, 3 mov al, [bx+6EAh] mov bx, word ptr [bp+var_4] mov es:[bx+1], al mov bx, si imul bx, 3 mov al, [bx+6ECh] mov bx, word ptr [bp+var_4] mov es:[bx+2], al add word ptr [bp+var_4], 3 inc si loc_D210: cmp si, 10h jl short loc_D1DC xor ax, ax jmp short loc_D21C ; --------------------------------------------------------------------------- loc_D219: mov ax, 1 loc_D21C: pop di pop si leave retf sub_D1C0 endp seg006 ends ; --------------------------------------------------------------------------- ; =========================================================================== ; Segment type: Pure code seg007 segment byte public 'CODE' use16 assume cs:seg007 assume es:nothing, ss:nothing, ds:dseg, fs:nothing, gs:nothing enter 10h, 0 push si push di mov ax, [bp+6] sar ax, 3 mov dx, [bp+8] shl dx, 6 add ax, dx mov dx, [bp+8] shl dx, 4 add ax, dx mov si, ax xor di, di jmp loc_D2C8 ; --------------------------------------------------------------------------- loc_D243: push 0 call sub_B943 les bx, dword_13672 add bx, si mov eax, es:[bx] mov [bp-10h], eax les bx, dword_13676 add bx, si mov eax, es:[bx] mov [bp-0Ch], eax les bx, dword_1367A add bx, si mov eax, es:[bx] mov [bp-8], eax les bx, dword_1367E add bx, si mov eax, es:[bx] mov [bp-4], eax push 1 call sub_B943 add sp, 4 les bx, dword_13672 add bx, si mov eax, [bp-10h] mov es:[bx], eax les bx, dword_13676 add bx, si mov eax, [bp-0Ch] mov es:[bx], eax les bx, dword_1367A add bx, si mov eax, [bp-8] mov es:[bx], eax les bx, dword_1367E add bx, si mov eax, [bp-4] mov es:[bx], eax add si, 50h ; 'P' inc di loc_D2C8: cmp di, 20h ; ' ' jl loc_D243 push 0 call sub_B943 pop cx pop di pop si leave retf ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_D2DB proc far push bp mov bp, sp mov dword_13672, 0A8000000h mov dword_13676, 0B0000000h mov dword_1367A, 0B8000000h mov dword_1367E, 0E0000000h pop bp retf sub_D2DB endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_D304 proc far push bp mov bp, sp call egc_on mov ax, 0FFF0h mov dx, 4A0h out dx, ax mov ax, 0FFh mov dx, 4A2h out dx, ax mov ax, 3100h mov dx, 4A4h out dx, ax mov ax, 0FFFFh mov dx, 4A8h out dx, ax mov ax, 0 mov dx, 4ACh out dx, ax mov ax, 0Fh mov dx, 4AEh out dx, ax pop bp retf sub_D304 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_D338 proc far var_A = word ptr -0Ah var_8 = word ptr -8 var_6 = word ptr -6 var_4 = word ptr -4 var_2 = word ptr -2 arg_0 = word ptr 6 arg_2 = word ptr 8 arg_4 = word ptr 0Ah arg_6 = word ptr 0Ch enter 0Ah, 0 push si push di mov si, [bp+arg_0] mov di, si add si, [bp+arg_4] and di, 0FFF0h mov ax, di sar ax, 3 mov dx, [bp+arg_2] shl dx, 6 add ax, dx mov dx, [bp+arg_2] shl dx, 4 add ax, dx mov [bp+var_6], ax call sub_D304 mov [bp+var_2], 0 jmp short loc_D3B6 ; --------------------------------------------------------------------------- loc_D36C: mov [bp+var_4], di mov ax, [bp+var_6] mov [bp+var_A], ax jmp short loc_D3AA ; --------------------------------------------------------------------------- loc_D377: push 1 call sub_B943 les bx, dword_13672 add bx, [bp+var_A] mov ax, es:[bx] mov [bp+var_8], ax push 0 call sub_B943 add sp, 4 les bx, dword_13672 add bx, [bp+var_A] mov ax, [bp+var_8] mov es:[bx], ax add [bp+var_A], 2 add [bp+var_4], 10h loc_D3AA: cmp [bp+var_4], si jl short loc_D377 add [bp+var_6], 50h ; 'P' inc [bp+var_2] loc_D3B6: mov ax, [bp+var_2] cmp ax, [bp+arg_6] jl short loc_D36C call egc_off pop di pop si leave retf sub_D338 endp ; --------------------------------------------------------------------------- enter 4, 0 push si push di mov di, [bp+0Ah] mov ax, [bp+8] imul ax, 50h push ax mov ax, [bp+6] mov bx, 8 cwd idiv bx pop dx add dx, ax mov si, dx mov ax, di mov bx, 40h cwd idiv bx shl ax, 2 mov bx, ax mov ax, [bx+1474h] mov dx, [bx+1472h] push ax mov ax, di mov bx, 40h push dx cwd idiv bx imul dx, 281h pop ax add ax, dx pop dx mov [bp-2], dx mov [bp-4], ax xor cx, cx jmp short loc_D481 ; --------------------------------------------------------------------------- loc_D416: les bx, dword_13672 add bx, si mov eax, es:[bx] mov dx, cx shl dx, 2 les bx, [bp-4] add bx, dx mov es:[bx+1], eax les bx, dword_13676 add bx, si mov eax, es:[bx] mov dx, cx shl dx, 2 les bx, [bp-4] add bx, dx mov es:[bx+81h], eax les bx, dword_1367A add bx, si mov eax, es:[bx] mov dx, cx shl dx, 2 les bx, [bp-4] add bx, dx mov es:[bx+101h], eax les bx, dword_1367E add bx, si mov eax, es:[bx] mov dx, cx shl dx, 2 les bx, [bp-4] add bx, dx mov es:[bx+181h], eax add si, 50h ; 'P' inc cx loc_D481: cmp cx, 20h ; ' ' jl short loc_D416 pop di pop si leave retf ; --------------------------------------------------------------------------- enter 0Eh, 0 push si push di mov ax, [bp+8] imul ax, 50h push ax mov ax, [bp+6] mov bx, 8 cwd idiv bx pop dx add dx, ax mov di, dx mov ax, [bp+0Ah] mov bx, 40h cwd idiv bx shl ax, 2 mov bx, ax mov ax, [bx+1474h] mov dx, [bx+1472h] push ax mov ax, [bp+0Ah] mov bx, 40h push dx cwd idiv bx imul dx, 281h pop ax add ax, dx pop dx mov [bp-0Ch], dx mov [bp-0Eh], ax test byte ptr [bp+0Ch], 2 jz short loc_D4DF mov ax, 10h jmp short loc_D4E1 ; --------------------------------------------------------------------------- loc_D4DF: xor ax, ax loc_D4E1: mov [bp-2], ax test byte ptr [bp+0Ch], 1 jz short loc_D4F2 mov eax, 0FFFFh jmp short loc_D4F8 ; --------------------------------------------------------------------------- loc_D4F2: mov eax, 0FFFF0000h loc_D4F8: mov [bp-6], eax test byte ptr [bp+0Ch], 1 jz short loc_D507 mov ax, 10h jmp short loc_D509 ; --------------------------------------------------------------------------- loc_D507: xor ax, ax loc_D509: cwde mov [bp-0Ah], eax mov si, [bp-2] jmp loc_D5E8 ; --------------------------------------------------------------------------- loc_D515: mov ax, si shl ax, 2 les bx, [bp-0Eh] add bx, ax mov eax, [bp-6] and es:[bx+1], eax les bx, dword_13672 add bx, di mov eax, es:[bx] mov cl, [bp-0Ah] shl eax, cl mov edx, [bp-6] not edx and eax, edx mov dx, si shl dx, 2 les bx, [bp-0Eh] add bx, dx or es:[bx+1], eax mov eax, [bp-6] and es:[bx+81h], eax les bx, dword_13676 add bx, di mov eax, es:[bx] shl eax, cl mov edx, [bp-6] not edx and eax, edx mov dx, si shl dx, 2 les bx, [bp-0Eh] add bx, dx or es:[bx+81h], eax mov eax, [bp-6] and es:[bx+101h], eax les bx, dword_1367A add bx, di mov eax, es:[bx] shl eax, cl mov edx, [bp-6] not edx and eax, edx mov dx, si shl dx, 2 les bx, [bp-0Eh] add bx, dx or es:[bx+101h], eax mov eax, [bp-6] and es:[bx+181h], eax les bx, dword_1367E add bx, di mov eax, es:[bx] shl eax, cl mov edx, [bp-6] not edx and eax, edx mov dx, si shl dx, 2 les bx, [bp-0Eh] add bx, dx or es:[bx+181h], eax add di, 50h ; 'P' inc si loc_D5E8: mov ax, [bp-2] add ax, 10h cmp ax, si jg loc_D515 pop di pop si leave retf seg007 ends ; =========================================================================== ; Segment type: Pure code seg008 segment byte public 'CODE' use16 assume cs:seg008 ;org 8 assume es:nothing, ss:nothing, ds:dseg, fs:nothing, gs:nothing ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame ; int __cdecl __far sub_D5F8(int, int, int, char *format, char arglist) sub_D5F8 proc far @@buffer = byte ptr -104h var_4 = word ptr -4 var_2 = word ptr -2 arg_0 = word ptr 6 arg_2 = word ptr 8 arg_4 = word ptr 0Ah _format = dword ptr 0Ch arglist = byte ptr 10h enter 104h, 0 lea ax, [bp+arglist] mov [bp+var_2], ss mov [bp+var_4], ax push [bp+var_2] push ax ; arglist pushd [bp+_format] ; format push ss lea ax, [bp+@@buffer] push ax ; buffer call _vsprintf push ss lea ax, [bp+@@buffer] push ax push [bp+arg_4] push [bp+arg_2] push [bp+arg_0] call sub_C948 add sp, 16h leave retf sub_D5F8 endp seg008 ends ; =========================================================================== ; Segment type: Pure code seg009 segment byte public 'CODE' use16 assume cs:seg009 ;org 1 assume es:nothing, ss:nothing, ds:dseg, fs:nothing, gs:nothing ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_D631 proc far var_38 = byte ptr -38h var_33 = byte ptr -33h var_8 = dword ptr -8 var_4 = word ptr -4 var_2 = word ptr -2 arg_0 = word ptr 6 arg_2 = dword ptr 8 enter 38h, 0 push si push di mov di, [bp+arg_0] pushd [bp+arg_2] call sub_E783 push ss lea ax, [bp+var_38] push ax push 6 call sub_E889 mov al, [bp+var_33] cbw mov [bp+var_4], ax mov bx, di shl bx, 2 mov ax, [bx+1472h] or ax, [bx+1474h] jz short loc_D677 mov bx, di shl bx, 2 pushd dword ptr [bx+1472h] ; font call @$bdla$qnv add sp, 4 loc_D677: mov ax, [bp+var_4] imul ax, 281h push ax call @$bnwa$qui pop cx mov bx, di shl bx, 2 mov [bx+1474h], dx mov [bx+1472h], ax mov bx, di shl bx, 2 mov ax, [bx+1472h] or ax, [bx+1474h] jnz short loc_D6A7 mov ax, 0FFFDh jmp loc_D74E ; --------------------------------------------------------------------------- loc_D6A7: push ss lea ax, [bp+var_38] push ax push 30h ; '0' call sub_E889 cmp word_129B8, 0 jz short loc_D6C7 push ss lea ax, [bp+var_38] push ax call sub_BA15 add sp, 4 loc_D6C7: mov al, byte ptr [bp+var_4] mov [di+72Fh], al mov bx, di shl bx, 2 mov ax, [bx+1474h] mov dx, [bx+1472h] mov word ptr [bp+var_8+2], ax mov word ptr [bp+var_8], dx mov [bp+var_2], 0 jmp short loc_D73F ; --------------------------------------------------------------------------- loc_D6E8: pushd [bp+var_8] push 1 call sub_E889 mov ax, word ptr [bp+var_8] inc ax push word ptr [bp+var_8+2] push ax push 200h call sub_E889 xor si, si jmp short loc_D732 ; --------------------------------------------------------------------------- loc_D707: mov ax, si shl ax, 2 les bx, [bp+var_8] add bx, ax mov eax, es:[bx+1] and eax, es:[bx+81h] and eax, es:[bx+101h] and eax, es:[bx+181h] not eax mov es:[bx+201h], eax inc si loc_D732: cmp si, 20h ; ' ' jl short loc_D707 inc [bp+var_2] add word ptr [bp+var_8], 281h loc_D73F: mov ax, [bp+var_2] cmp ax, [bp+var_4] jl short loc_D6E8 call sub_E8D9 xor ax, ax loc_D74E: pop di pop si leave retf sub_D631 endp ; --------------------------------------------------------------------------- push bp mov bp, sp push si mov si, [bp+6] cmp word ptr [bp+8], 0 jle short loc_D765 cmp word ptr [bp+8], 40h jle short loc_D76A loc_D765: mov ax, 0FFF7h jmp short loc_D7C3 ; --------------------------------------------------------------------------- loc_D76A: mov bx, si shl bx, 2 mov ax, [bx+1472h] or ax, [bx+1474h] jz short loc_D78B mov bx, si shl bx, 2 pushd dword ptr [bx+1472h] call @$bdla$qnv add sp, 4 loc_D78B: mov al, [bp+8] mov [si+72Fh], al mov ax, [bp+8] imul ax, 281h push ax call @$bnwa$qui pop cx mov bx, si shl bx, 2 mov [bx+1474h], dx mov [bx+1472h], ax mov bx, si shl bx, 2 mov ax, [bx+1472h] or ax, [bx+1474h] jnz short loc_D7C1 mov ax, 0FFFDh jmp short loc_D7C3 ; --------------------------------------------------------------------------- loc_D7C1: xor ax, ax loc_D7C3: pop si pop bp retf ; --------------------------------------------------------------------------- enter 2, 0 mov word_129B8, 0 pushd dword ptr [bp+8] push word ptr [bp+6] call sub_D631 add sp, 6 mov [bp-2], ax mov word_129B8, 1 leave retf ; --------------------------------------------------------------------------- push bp mov bp, sp push si mov si, [bp+6] mov bx, si shl bx, 2 mov ax, [bx+1472h] or ax, [bx+1474h] jz short loc_D827 mov bx, si shl bx, 2 pushd dword ptr [bx+1472h] call @$bdla$qnv add sp, 4 mov bx, si shl bx, 2 mov word ptr [bx+1474h], 0 mov word ptr [bx+1472h], 0 mov byte ptr [si+72Fh], 0 loc_D827: pop si pop bp retf ; --------------------------------------------------------------------------- enter 4, 0 push si push di mov di, [bp+8] mov ax, [bp+6] sar ax, 3 mov dx, di shl dx, 6 add ax, dx mov dx, di shl dx, 4 add ax, dx mov si, ax mov ax, [bp+0Ah] mov bx, 40h cwd idiv bx shl ax, 2 mov bx, ax mov ax, [bx+1474h] mov dx, [bx+1472h] push ax mov ax, [bp+0Ah] mov bx, 40h push dx cwd idiv bx imul dx, 281h pop ax add ax, dx pop dx mov [bp-2], dx mov [bp-4], ax xor cx, cx jmp short loc_D8E7 ; --------------------------------------------------------------------------- loc_D87C: mov ax, cx shl ax, 2 les bx, [bp-4] add bx, ax mov eax, es:[bx+1] les bx, dword_13672 add bx, si mov es:[bx], eax mov ax, cx shl ax, 2 les bx, [bp-4] add bx, ax mov eax, es:[bx+81h] les bx, dword_13676 add bx, si mov es:[bx], eax mov ax, cx shl ax, 2 les bx, [bp-4] add bx, ax mov eax, es:[bx+101h] les bx, dword_1367A add bx, si mov es:[bx], eax mov ax, cx shl ax, 2 les bx, [bp-4] add bx, ax mov eax, es:[bx+181h] les bx, dword_1367E add bx, si mov es:[bx], eax add si, 50h ; 'P' inc cx loc_D8E7: cmp cx, 20h ; ' ' jl short loc_D87C pop di pop si leave retf ; --------------------------------------------------------------------------- enter 8, 0 push si push di mov ax, [bp+8] imul ax, 50h push ax mov ax, [bp+6] mov bx, 8 cwd idiv bx pop dx add dx, ax mov di, dx mov ax, [bp+0Ah] mov bx, 40h cwd idiv bx shl ax, 2 mov bx, ax mov ax, [bx+1474h] mov dx, [bx+1472h] push ax mov ax, [bp+0Ah] mov bx, 40h push dx cwd idiv bx imul dx, 281h pop ax add ax, dx pop dx mov [bp-6], dx mov [bp-8], ax test byte ptr [bp+0Ch], 2 jz short loc_D945 mov ax, 10h jmp short loc_D947 ; --------------------------------------------------------------------------- loc_D945: xor ax, ax loc_D947: mov [bp-2], ax test byte ptr [bp+0Ch], 1 jz short loc_D955 mov ax, 10h jmp short loc_D957 ; --------------------------------------------------------------------------- loc_D955: xor ax, ax loc_D957: mov [bp-4], ax mov si, [bp-2] jmp short loc_D9D5 ; --------------------------------------------------------------------------- loc_D95F: mov ax, si shl ax, 2 les bx, [bp-8] add bx, ax mov eax, es:[bx+1] mov cl, [bp-4] shr eax, cl les bx, dword_13672 add bx, di mov es:[bx], ax mov ax, si shl ax, 2 les bx, [bp-8] add bx, ax mov eax, es:[bx+81h] shr eax, cl les bx, dword_13676 add bx, di mov es:[bx], ax mov ax, si shl ax, 2 les bx, [bp-8] add bx, ax mov eax, es:[bx+101h] shr eax, cl les bx, dword_1367A add bx, di mov es:[bx], ax mov ax, si shl ax, 2 les bx, [bp-8] add bx, ax mov eax, es:[bx+181h] shr eax, cl les bx, dword_1367E add bx, di mov es:[bx], ax add di, 50h ; 'P' inc si loc_D9D5: mov ax, [bp-2] add ax, 10h cmp ax, si jg short loc_D95F pop di pop si leave retf ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_D9E3 proc far arg_0 = dword ptr 6 push bp mov bp, sp pushd [bp+arg_0] call file_ropen or ax, ax jnz short loc_D9F8 mov ax, 1 pop bp retf ; --------------------------------------------------------------------------- loc_D9F8: pushd 12h push 0 call file_seek push ds push offset unk_136D2 push 30h ; '0' call file_read push ds push offset unk_136D2 call sub_BA15 add sp, 4 call file_close xor ax, ax pop bp retf sub_D9E3 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_DA22 proc far arg_0 = dword ptr 6 push bp mov bp, sp pushd [bp+arg_0] call file_ropen or ax, ax jnz short loc_DA37 mov ax, 1 pop bp retf ; --------------------------------------------------------------------------- loc_DA37: pushd 12h push 0 call file_seek push ds push offset unk_136D2 push 30h ; '0' call file_read call file_close xor ax, ax pop bp retf sub_DA22 endp ; --------------------------------------------------------------------------- push bp mov bp, sp push si push di les bx, [bp+6] dec word ptr es:[bx] jl short loc_DA77 mov ax, es:[bx+0Eh] mov si, es:[bx+0Ch] inc word ptr es:[bx+0Ch] mov es, ax mov al, es:[si] mov ah, 0 jmp short loc_DA83 ; --------------------------------------------------------------------------- loc_DA77: pushd dword ptr [bp+6] call __fgetc add sp, 4 loc_DA83: mov di, ax les bx, [bp+6] dec word ptr es:[bx] jl short loc_DAA2 mov ax, es:[bx+0Eh] mov si, es:[bx+0Ch] inc word ptr es:[bx+0Ch] mov es, ax mov al, es:[si] mov ah, 0 jmp short loc_DAAE ; --------------------------------------------------------------------------- loc_DAA2: pushd dword ptr [bp+6] call __fgetc add sp, 4 loc_DAAE: shl ax, 8 add di, ax mov ax, di pop di pop si pop bp retf ; --------------------------------------------------------------------------- push bp mov bp, sp xor dx, dx jmp short loc_DAE5 ; --------------------------------------------------------------------------- loc_DAC0: xor cx, cx jmp short loc_DADF ; --------------------------------------------------------------------------- loc_DAC4: mov ax, dx imul ax, 3 les bx, [bp+6] add bx, ax add bx, cx mov al, es:[bx] mov bx, dx imul bx, 3 add bx, cx mov [bx+1442h], al inc cx loc_DADF: cmp cx, 3 jl short loc_DAC4 inc dx loc_DAE5: cmp dx, 10h jl short loc_DAC0 pop bp retf ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_DAEC proc far var_1 = byte ptr -1 arg_0 = dword ptr 6 enter 2, 0 push si xor si, si push 4000h call @$bnwa$qui pop cx mov word ptr font+2, dx mov word ptr font, ax cmp word_129B8, 1 jnz short loc_DB0D or si, 2 loc_DB0D: cmp byte_129C7, 1 jnz short loc_DB17 mov si, 0F40h loc_DB17: cmp word_129BA, 1 jnz short loc_DB3F push si push 640000h pushd 4000h pushd [font] pushd [bp+arg_0] call _PiLoadL add sp, 12h mov [bp+var_1], al loc_DB3F: cmp word_129B8, 1 jnz short loc_DB50 pushd [bp+arg_0] call sub_D9E3 jmp short loc_DB58 ; --------------------------------------------------------------------------- loc_DB50: pushd [bp+arg_0] call sub_DA22 loc_DB58: add sp, 4 pushd [font] ; font call @$bdla$qnv add sp, 4 mov al, [bp+var_1] cbw pop si leave retf sub_DAEC endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_DB6F proc far var_2 = word ptr -2 arg_0 = dword ptr 6 enter 2, 0 mov word_129B8, 0 pushd [bp+arg_0] call sub_DAEC add sp, 4 mov [bp+var_2], ax mov word_129B8, 1 leave retf sub_DB6F endp ; --------------------------------------------------------------------------- enter 2, 0 mov word_129BA, 0 pushd dword ptr [bp+6] call sub_DAEC add sp, 4 mov [bp-2], ax mov word_129BA, 1 leave retf ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_DBAF proc far var_2 = word ptr -2 arg_0 = dword ptr 6 enter 2, 0 mov byte_129C7, 1 mov word_129B8, 0 pushd [bp+arg_0] call sub_DAEC add sp, 4 mov [bp+var_2], ax mov word_129B8, 1 mov byte_129C7, 0 leave retf sub_DBAF endp ; --------------------------------------------------------------------------- push bp mov bp, sp push si mov si, [bp+6] mov al, [si+18D2h] mov ah, 0 cmp ax, [bp+8] jle short loc_DBFD mov al, [bp+8] mov byte_129C8, al push si nopcall sub_DC1B pop cx mov byte_129C8, 0 loc_DBFD: pop si pop bp retf ; --------------------------------------------------------------------------- push bp mov bp, sp mov al, [bp+8] inc al mov byte_129C9, al push word ptr [bp+6] nopcall sub_DC1B pop cx mov byte_129C9, 0 pop bp retf ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_DC1B proc far var_2E = word ptr -2Eh var_2C = word ptr -2Ch var_29 = byte ptr -29h var_28 = word ptr -28h var_25 = byte ptr -25h var_24 = word ptr -24h var_21 = byte ptr -21h var_20 = word ptr -20h var_1D = byte ptr -1Dh var_1C = word ptr -1Ch var_1A = word ptr -1Ah var_17 = byte ptr -17h var_16 = word ptr -16h var_13 = byte ptr -13h var_12 = word ptr -12h var_F = byte ptr -0Fh var_E = word ptr -0Eh var_B = byte ptr -0Bh var_A = dword ptr -0Ah var_6 = dword ptr -6 var_2 = byte ptr -2 var_1 = byte ptr -1 arg_0 = word ptr 6 enter 2Eh, 0 push si push di mov di, [bp+arg_0] mov bx, di shl bx, 2 mov ax, [bx+1494h] mov dx, [bx+1492h] mov word ptr [bp+var_6+2], ax mov word ptr [bp+var_6], dx mov bx, di shl bx, 6 mov al, byte_129C8 cbw shl ax, 2 add bx, ax mov ax, [bx+14D4h] mov dx, [bx+14D2h] mov word ptr [bp+var_A+2], ax mov word ptr [bp+var_A], dx cmp byte_129C9, 0 jz short loc_DC66 mov al, byte_129C9 cbw dec ax push ax call sub_B976 pop cx loc_DC66: xor si, si jmp loc_DDDC ; --------------------------------------------------------------------------- loc_DC6B: les bx, [bp+var_6] mov al, es:[bx] mov [bp+var_1], al inc word ptr [bp+var_6] cmp [bp+var_1], 1 jnz loc_DD47 les bx, [bp+var_6] mov al, es:[bx] mov [bp+var_2], al inc word ptr [bp+var_6] cmp [bp+var_2], 0 jz loc_DD47 les bx, [bp+var_6] mov al, es:[bx] mov [bp+var_1], al inc word ptr [bp+var_6] jmp loc_DD3B ; --------------------------------------------------------------------------- loc_DCA2: cmp [bp+var_1], 0 jnz loc_DD3A cmp byte_129C9, 0 jnz short loc_DD28 les bx, [bp+var_A] mov al, es:[bx] mov [bp+var_B], al inc word ptr [bp+var_A] mov [bp+var_E], si mov ax, 0A800h mov bx, [bp+var_E] mov dl, [bp+var_B] mov es, ax assume es:nothing mov es:[bx], dl les bx, [bp+var_A] assume es:nothing mov al, es:[bx] mov [bp+var_F], al inc word ptr [bp+var_A] mov [bp+var_12], si mov ax, 0B000h mov bx, [bp+var_12] mov dl, [bp+var_F] mov es, ax assume es:nothing mov es:[bx], dl les bx, [bp+var_A] assume es:nothing mov al, es:[bx] mov [bp+var_13], al inc word ptr [bp+var_A] mov [bp+var_16], si mov ax, 0B800h mov bx, [bp+var_16] mov dl, [bp+var_13] mov es, ax assume es:nothing mov es:[bx], dl les bx, [bp+var_A] assume es:nothing mov al, es:[bx] mov [bp+var_17], al inc word ptr [bp+var_A] mov [bp+var_1A], si inc si mov ax, 0E000h mov bx, [bp+var_1A] mov dl, [bp+var_17] mov es, ax assume es:nothing mov es:[bx], dl jmp short loc_DD3B ; --------------------------------------------------------------------------- loc_DD28: mov [bp+var_1C], si inc si mov ax, 0A800h mov bx, [bp+var_1C] mov es, ax assume es:nothing mov byte ptr es:[bx], 0FFh jmp short loc_DD3B ; --------------------------------------------------------------------------- loc_DD3A: inc si loc_DD3B: mov al, [bp+var_2] dec [bp+var_2] or al, al jnz loc_DCA2 loc_DD47: cmp [bp+var_1], 0 jnz loc_DDDB cmp byte_129C9, 0 jnz short loc_DDCC les bx, [bp+var_A] assume es:nothing mov al, es:[bx] mov [bp+var_1D], al inc word ptr [bp+var_A] mov [bp+var_20], si mov ax, 0A800h mov bx, [bp+var_20] mov dl, [bp+var_1D] mov es, ax assume es:nothing mov es:[bx], dl les bx, [bp+var_A] assume es:nothing mov al, es:[bx] mov [bp+var_21], al inc word ptr [bp+var_A] mov [bp+var_24], si mov ax, 0B000h mov bx, [bp+var_24] mov dl, [bp+var_21] mov es, ax assume es:nothing mov es:[bx], dl les bx, [bp+var_A] assume es:nothing mov al, es:[bx] mov [bp+var_25], al inc word ptr [bp+var_A] mov [bp+var_28], si mov ax, 0B800h mov bx, [bp+var_28] mov dl, [bp+var_25] mov es, ax assume es:nothing mov es:[bx], dl les bx, [bp+var_A] assume es:nothing mov al, es:[bx] mov [bp+var_29], al inc word ptr [bp+var_A] mov [bp+var_2C], si mov ax, 0E000h mov bx, [bp+var_2C] mov dl, [bp+var_29] mov es, ax assume es:nothing mov es:[bx], dl jmp short loc_DDDB ; --------------------------------------------------------------------------- loc_DDCC: mov [bp+var_2E], si mov ax, 0A800h mov bx, [bp+var_2E] mov es, ax assume es:nothing mov byte ptr es:[bx], 0FFh loc_DDDB: inc si loc_DDDC: cmp si, 7D00h jb loc_DC6B cmp byte_129C9, 0 jz short loc_DDF0 call sub_BA0A loc_DDF0: pop di pop si leave retf sub_DC1B endp ; --------------------------------------------------------------------------- enter 0Ah, 0 push si push di mov di, [bp+6] pushd dword ptr [bp+8] call file_ropen or ax, ax jz loc_DEEF push 64h ; 'd' call @$bnwa$qui pop cx mov [bp-6], dx mov [bp-8], ax push dx push ax push 40h call file_read push 4 push ds push offset aHgrx ; "HGRX" pushd dword ptr [bp-8] call _memcmp add sp, 0Ah or ax, ax jz short loc_DE41 call file_close jmp loc_DEEF ; --------------------------------------------------------------------------- loc_DE41: les bx, [bp-8] assume es:nothing cmp byte ptr es:[bx+4], 1 jnb short loc_DE53 call file_close jmp loc_DEEF ; --------------------------------------------------------------------------- loc_DE53: les bx, [bp-8] mov al, es:[bx+4] mov [di+18D2h], al mov ax, es:[bx+8] mov [bp-2], ax mov ax, es:[bx+0Ah] mov [bp-4], ax mov bx, di shl bx, 2 mov ax, [bx+1492h] or ax, [bx+1494h] jz short loc_DE82 push di nopcall sub_E02B pop cx loc_DE82: push word ptr [bp-2] call @$bnwa$qui pop cx mov bx, di shl bx, 2 mov [bx+1494h], dx mov [bx+1492h], ax or ax, dx jnz short loc_DEA3 call file_close jmp short loc_DEEF ; --------------------------------------------------------------------------- loc_DEA3: mov word ptr [bp-0Ah], 0 jmp short loc_DEF7 ; --------------------------------------------------------------------------- loc_DEAA: mov bx, di shl bx, 6 mov ax, [bp-0Ah] shl ax, 2 add bx, ax mov ax, [bx+14D2h] or ax, [bx+14D4h] jz short loc_DEC8 push di nopcall sub_E02B pop cx loc_DEC8: push word ptr [bp-4] call @$bnwa$qui pop cx mov bx, di shl bx, 6 mov si, [bp-0Ah] shl si, 2 add bx, si mov [bx+14D4h], dx mov [bx+14D2h], ax or ax, dx jnz short loc_DEF4 call file_close loc_DEEF: mov ax, 1 jmp short loc_DF5C ; --------------------------------------------------------------------------- loc_DEF4: inc word ptr [bp-0Ah] loc_DEF7: les bx, [bp-8] mov al, es:[bx+4] mov ah, 0 cmp ax, [bp-0Ah] jg short loc_DEAA mov bx, di shl bx, 2 pushd dword ptr [bx+1492h] push word ptr [bp-2] call file_read mov word ptr [bp-0Ah], 0 jmp short loc_DF3B ; --------------------------------------------------------------------------- loc_DF1E: mov bx, di shl bx, 6 mov ax, [bp-0Ah] shl ax, 2 add bx, ax pushd dword ptr [bx+14D2h] push word ptr [bp-4] call file_read inc word ptr [bp-0Ah] loc_DF3B: les bx, [bp-8] mov al, es:[bx+4] mov ah, 0 cmp ax, [bp-0Ah] jg short loc_DF1E push word ptr [bp-6] push bx call @$bdla$qnv add sp, 4 call file_close xor ax, ax loc_DF5C: pop di pop si leave retf ; --------------------------------------------------------------------------- enter 4, 0 push si push di mov si, [bp+6] pushd dword ptr [bp+8] call file_ropen or ax, ax jz loc_DFFF push 64h ; 'd' call @$bnwa$qui pop cx mov [bp-2], dx mov [bp-4], ax push dx push ax push 40h call file_read push 4 push ds push offset aHgrx ; "HGRX" pushd dword ptr [bp-4] call _memcmp add sp, 0Ah or ax, ax jz short loc_DFAC call file_close jmp short loc_DFFF ; --------------------------------------------------------------------------- loc_DFAC: les bx, [bp-4] cmp byte ptr es:[bx+4], 1 jnb short loc_DFBD call file_close jmp short loc_DFFF ; --------------------------------------------------------------------------- loc_DFBD: les bx, [bp-4] mov al, es:[bx+4] mov [si+18D2h], al mov di, es:[bx+8] mov bx, si shl bx, 2 mov ax, [bx+1492h] or ax, [bx+1494h] jz short loc_DFE2 push si nopcall sub_E02B pop cx loc_DFE2: push di call @$bnwa$qui pop cx mov bx, si shl bx, 2 mov [bx+1494h], dx mov [bx+1492h], ax or ax, dx jnz short loc_E004 call file_close loc_DFFF: mov ax, 1 jmp short loc_E027 ; --------------------------------------------------------------------------- loc_E004: mov bx, si shl bx, 2 pushd dword ptr [bx+1492h] push di call file_read pushd dword ptr [bp-4] call @$bdla$qnv add sp, 4 call file_close xor ax, ax loc_E027: pop di pop si leave retf ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_E02B proc far arg_0 = word ptr 6 push bp mov bp, sp push si push di mov si, [bp+arg_0] mov bx, si shl bx, 2 mov ax, [bx+1492h] or ax, [bx+1494h] jz short loc_E065 mov bx, si shl bx, 2 pushd dword ptr [bx+1492h] ; font call @$bdla$qnv add sp, 4 mov bx, si shl bx, 2 mov word ptr [bx+1494h], 0 mov word ptr [bx+1492h], 0 loc_E065: xor di, di jmp short loc_E0B1 ; --------------------------------------------------------------------------- loc_E069: mov bx, si shl bx, 6 mov ax, di shl ax, 2 add bx, ax mov ax, [bx+14D2h] or ax, [bx+14D4h] jz short loc_E0B0 mov bx, si shl bx, 6 mov ax, di shl ax, 2 add bx, ax pushd dword ptr [bx+14D2h] ; font call @$bdla$qnv add sp, 4 mov bx, si shl bx, 6 mov ax, di shl ax, 2 add bx, ax mov word ptr [bx+14D4h], 0 mov word ptr [bx+14D2h], 0 loc_E0B0: inc di loc_E0B1: cmp di, 10h jl short loc_E069 pop di pop si pop bp retf sub_E02B endp ; --------------------------------------------------------------------------- enter 0Eh, 0 push si push di pushd dword ptr [bp+8] call file_ropen or ax, ax jz loc_E213 push 64h ; 'd' call @$bnwa$qui pop cx mov [bp-6], dx mov [bp-8], ax push dx push ax push 60h call file_read push 4 push ds push offset aHgrz ; "HGRZ" pushd dword ptr [bp-8] call _memcmp add sp, 0Ah or ax, ax jz short loc_E104 call file_close jmp loc_E213 ; --------------------------------------------------------------------------- loc_E104: les bx, [bp-8] mov al, es:[bx+4] mov [bp-9], al mov ah, 0 cmp ax, [bp+0Ch] jle loc_E265 mov ax, [bp+0Ch] shl ax, 2 add ax, 8 mov di, ax add bx, di mov eax, es:[bx] mov [bp-0Eh], eax push eax push 0 call file_seek pushd dword ptr [bp-8] push 40h call file_read push 4 push ds push offset aHgrx ; "HGRX" pushd dword ptr [bp-8] call _memcmp add sp, 0Ah or ax, ax jz short loc_E15E call file_close jmp loc_E213 ; --------------------------------------------------------------------------- loc_E15E: les bx, [bp-8] cmp byte ptr es:[bx+4], 1 jnb short loc_E170 call file_close jmp loc_E213 ; --------------------------------------------------------------------------- loc_E170: les bx, [bp-8] mov al, es:[bx+4] mov bx, [bp+6] mov [bx+18D2h], al mov bx, [bp-8] mov ax, es:[bx+8] mov [bp-2], ax mov ax, es:[bx+0Ah] mov [bp-4], ax mov bx, [bp+6] shl bx, 2 mov ax, [bx+1492h] or ax, [bx+1494h] jz short loc_E1A7 push word ptr [bp+6] call sub_E02B pop cx loc_E1A7: push word ptr [bp-2] call @$bnwa$qui pop cx mov bx, [bp+6] shl bx, 2 mov [bx+1494h], dx mov [bx+1492h], ax or ax, dx jnz short loc_E1C9 call file_close jmp short loc_E213 ; --------------------------------------------------------------------------- loc_E1C9: xor di, di jmp short loc_E219 ; --------------------------------------------------------------------------- loc_E1CD: mov bx, [bp+6] shl bx, 6 mov ax, di shl ax, 2 add bx, ax mov ax, [bx+14D2h] or ax, [bx+14D4h] jz short loc_E1EC push word ptr [bp+6] call sub_E02B pop cx loc_E1EC: push word ptr [bp-4] call @$bnwa$qui pop cx mov bx, [bp+6] shl bx, 6 mov si, di shl si, 2 add bx, si mov [bx+14D4h], dx mov [bx+14D2h], ax or ax, dx jnz short loc_E218 call file_close loc_E213: mov ax, 1 jmp short loc_E278 ; --------------------------------------------------------------------------- loc_E218: inc di loc_E219: les bx, [bp-8] mov al, es:[bx+4] mov ah, 0 cmp ax, di jg short loc_E1CD mov bx, [bp+6] shl bx, 2 pushd dword ptr [bx+1492h] push word ptr [bp-2] call file_read xor di, di jmp short loc_E258 ; --------------------------------------------------------------------------- loc_E23D: mov bx, [bp+6] shl bx, 6 mov ax, di shl ax, 2 add bx, ax pushd dword ptr [bx+14D2h] push word ptr [bp-4] call file_read inc di loc_E258: les bx, [bp-8] mov al, es:[bx+4] mov ah, 0 cmp ax, di jg short loc_E23D loc_E265: pushd dword ptr [bp-8] call @$bdla$qnv add sp, 4 call file_close xor ax, ax loc_E278: pop di pop si leave retf seg009 ends ; =========================================================================== ; Segment type: Pure code seg010 segment byte public 'CODE' use16 assume cs:seg010 ;org 0Ch assume es:nothing, ss:nothing, ds:dseg, fs:nothing, gs:nothing ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_E27C proc far arg_0 = byte ptr 6 arg_2 = byte ptr 8 arg_4 = byte ptr 0Ah arg_6 = byte ptr 0Ch arg_8 = word ptr 0Eh arg_A = word ptr 10h push bp mov bp, sp push si push ds push offset aReiidenconfig ; "ReiidenConfig" push 0Dh push 5 call resdata_exist mov si, ax or si, si jnz short loc_E2C6 push ds push offset aReiidenconfig ; "ReiidenConfig" push 0Dh push 5 call resdata_create mov si, ax mov word ptr dword_13EE6+2, si mov word ptr dword_13EE6, 0 les bx, dword_13EE6 mov word ptr es:[bx+3Fh], 0 les bx, dword_13EE6 mov word ptr es:[bx+25h], 0 mov word ptr es:[bx+23h], 0 loc_E2C6: or si, si jz short loc_E322 mov word ptr dword_13EE6+2, si mov word ptr dword_13EE6, 0 les bx, dword_13EE6 mov al, [bp+arg_0] mov es:[bx+0Eh], al les bx, dword_13EE6 mov al, [bp+arg_2] mov es:[bx+0Fh], al les bx, dword_13EE6 mov al, [bp+arg_4] mov es:[bx+10h], al les bx, dword_13EE6 mov al, [bp+arg_6] mov es:[bx+11h], al les bx, dword_13EE6 mov dx, [bp+arg_A] mov ax, [bp+arg_8] mov es:[bx+1Dh], dx mov es:[bx+1Bh], ax les bx, dword_13EE6 mov word ptr es:[bx+21h], 0 mov word ptr es:[bx+1Fh], 0 loc_E322: pop si pop bp retf sub_E27C endp ; --------------------------------------------------------------------------- push bp mov bp, sp push si push ds push offset aReiidenconfig ; "ReiidenConfig" push 0Dh push 5 call resdata_exist mov si, ax or si, si jnz short loc_E33F jmp loc_E3BF ; --------------------------------------------------------------------------- loc_E33F: mov word ptr dword_13EE6+2, si mov word ptr dword_13EE6, 0 les bx, dword_13EE6 mov al, es:[bx+0Eh] les bx, [bp+6] mov es:[bx], al les bx, dword_13EE6 mov al, es:[bx+0Fh] les bx, [bp+0Ah] mov es:[bx], al les bx, dword_13EE6 mov al, es:[bx+10h] les bx, [bp+0Eh] mov es:[bx], al les bx, dword_13EE6 mov al, es:[bx+11h] les bx, [bp+12h] mov es:[bx], al les bx, dword_13EE6 mov dx, es:[bx+1Dh] mov ax, es:[bx+1Bh] les bx, [bp+16h] mov es:[bx+2], dx mov es:[bx], ax les bx, dword_13EE6 mov dx, es:[bx+25h] mov ax, es:[bx+23h] les bx, [bp+1Ah] mov es:[bx+2], dx mov es:[bx], ax les bx, dword_13EE6 mov ax, es:[bx+3Fh] les bx, [bp+1Eh] mov es:[bx], ax xor ax, ax jmp short loc_E3C2 ; --------------------------------------------------------------------------- loc_E3BF: mov ax, 1 loc_E3C2: pop si pop bp retf ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_E3C5 proc far push bp mov bp, sp push si push ds push offset aReiidenconfig ; "ReiidenConfig" push 0Dh push 5 call resdata_exist mov si, ax or si, si jz short loc_E3E2 push si call dos_free loc_E3E2: pop si pop bp retf sub_E3C5 endp seg010 ends ; =========================================================================== ; Segment type: Pure code seg011 segment byte public 'CODE' use16 assume cs:seg011 ;org 5 assume es:nothing, ss:nothing, ds:dseg, fs:nothing, gs:nothing ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_E3E5 proc far s2 = byte ptr -1Ch s1 = byte ptr -10h var_4 = dword ptr -4 enter 1Ch, 0 push si lea ax, [bp+s2] push ss push ax push ds push offset aMdrv2system ; "Mdrv2System" mov cx, 0Ch call SCOPY@ xor ax, ax mov es, ax movsx eax, word ptr es:[03CAh] shl eax, 10h add eax, 102h shld edx, eax, 10h mov word ptr [bp+var_4+2], dx mov word ptr [bp+var_4], ax xor si, si jmp short loc_E42B ; --------------------------------------------------------------------------- loc_E41F: les bx, [bp+var_4] assume es:nothing add bx, si mov al, es:[bx] mov [bp+si+s1], al inc si loc_E42B: cmp si, 0Ch jl short loc_E41F push ss lea ax, [bp+s2] push ax ; s2 push ss lea ax, [bp+s1] push ax ; s1 call _strcmp add sp, 8 or ax, ax jz short loc_E44A xor ax, ax jmp short loc_E44D ; --------------------------------------------------------------------------- loc_E44A: mov ax, 1 loc_E44D: pop si leave retf sub_E3E5 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame ; int __stdcall sub_E450(char, char *path) sub_E450 proc near var_C = word ptr -0Ch var_A = word ptr -0Ah var_8 = word ptr -8 var_6 = word ptr -6 var_4 = word ptr -4 handle = word ptr -2 arg_0 = byte ptr 4 _path = dword ptr 6 enter 0Ch, 0 push si cmp byte_12B0E, 0 jz short loc_E4D4 push 8001h ; access push word ptr [bp+_path+2] push word ptr [bp+_path] ; path call _open add sp, 6 mov [bp+handle], ax push [bp+handle] ; handle call _filelength pop cx mov [bp+var_4], ax movsx eax, [bp+var_4] push eax call _farmalloc add sp, 4 mov [bp+var_A], dx mov [bp+var_C], ax mov ax, [bp+var_A] mov [bp+var_6], ax mov ax, [bp+var_C] mov [bp+var_8], ax push ds mov ax, 3F00h mov bx, [bp+handle] mov cx, [bp+var_4] mov ds, [bp+var_6] mov dx, [bp+var_8] int 21h ; DOS - 2+ - READ FROM FILE WITH HANDLE ; BX = file handle, CX = number of bytes to read ; DS:DX -> buffer pop ds push [bp+handle] ; handle call _close pop cx push ds mov ah, [bp+arg_0] mov ds, [bp+var_6] mov si, [bp+var_8] int 0F2h pop ds push [bp+var_A] push [bp+var_C] call _farfree add sp, 4 loc_E4D4: pop si leave retn 6 sub_E450 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame ; int __cdecl __far sub_E4D9(char *path) sub_E4D9 proc far _path = dword ptr 6 push bp mov bp, sp push word ptr [bp+_path+2] push word ptr [bp+_path] ; path push 6 ; char call sub_E450 pop bp retf sub_E4D9 endp ; --------------------------------------------------------------------------- push bp mov bp, sp push word ptr [bp+8] push word ptr [bp+6] push 7 call sub_E450 pop bp retf ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_E4F9 proc far push bp mov bp, sp cmp byte_12B0E, 0 jz short loc_E507 mov ah, 0 int 0F2h loc_E507: pop bp retf sub_E4F9 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_E509 proc far push bp mov bp, sp cmp byte_12B0E, 0 jz short loc_E517 mov ah, 3 int 0F2h loc_E517: pop bp retf sub_E509 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_E519 proc far push bp mov bp, sp cmp byte_12B0E, 0 jz short loc_E527 mov ah, 2 int 0F2h loc_E527: pop bp retf sub_E519 endp ; --------------------------------------------------------------------------- push bp mov bp, sp cmp byte_12B0E, 0 jz short loc_E537 mov ah, 1 int 0F2h loc_E537: pop bp retf ; --------------------------------------------------------------------------- push bp mov bp, sp cmp byte_12B0E, 0 jz short loc_E547 mov ah, 0Fh int 0F2h loc_E547: pop bp retf ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_E549 proc far push bp mov bp, sp mov ah, 9 int 0F2h mov byte_12B0E, al mov al, byte_12B0E cbw pop bp retf sub_E549 endp ; --------------------------------------------------------------------------- push bp mov bp, sp cmp word ptr [bp+6], 0 jz short loc_E573 cmp byte_12B0E, 0 jz short loc_E573 add word ptr [bp+6], 400h mov ax, [bp+6] int 0F2h loc_E573: pop bp retf seg011 ends ; --------------------------------------------------------------------------- ; =========================================================================== ; Segment type: Pure code seg012 segment byte public 'CODE' use16 assume cs:seg012 ;org 5 assume es:nothing, ss:nothing, ds:dseg, fs:nothing, gs:nothing push bp mov bp, sp push si push di push 800h call @$bnwa$qui pop cx mov word ptr dword_13EEA+2, dx mov word ptr dword_13EEA, ax pushd dword ptr [bp+6] call file_ropen xor si, si jmp short loc_E5AF ; --------------------------------------------------------------------------- loc_E597: les bx, [bp+6] add bx, si mov al, es:[bx] mov [si+1C70h], al mov bx, [bp+6] add bx, si cmp byte ptr es:[bx], 0 jz short loc_E5B4 inc si loc_E5AF: cmp si, 0Dh jl short loc_E597 loc_E5B4: pushd [dword_13EEA] push 800h call file_read call file_close xor si, si jmp short loc_E60D ; --------------------------------------------------------------------------- loc_E5CA: mov ax, si shl ax, 5 les bx, dword_13EEA add bx, ax cmp byte ptr es:[bx], 0 jz short loc_E612 xor di, di jmp short loc_E607 ; --------------------------------------------------------------------------- loc_E5DF: mov ax, si shl ax, 5 les bx, dword_13EEA add bx, ax cmp byte ptr es:[bx+di+3], 0 jz short loc_E60C mov ax, si shl ax, 5 les bx, dword_13EEA add bx, ax mov al, es:[bx+di+3] not al mov es:[bx+di+3], al inc di loc_E607: cmp di, 0Dh jl short loc_E5DF loc_E60C: inc si loc_E60D: cmp si, 40h jl short loc_E5CA loc_E612: mov word_13EF4, si pop di pop si pop bp retf 4 ; --------------------------------------------------------------------------- push bp mov bp, sp pushd [dword_13EEA] call @$bdla$qnv add sp, 4 pop bp retf ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_E62E proc near arg_0 = dword ptr 4 push bp mov bp, sp push si xor si, si jmp short loc_E66F ; --------------------------------------------------------------------------- loc_E636: les bx, [bp+arg_0] add bx, si mov al, es:[bx] cbw push ax ; ch call _toupper pop cx mov dx, word_13EF2 shl dx, 5 les bx, dword_13EEA add bx, dx push ax mov al, es:[bx+si+3] cbw pop dx cmp dx, ax jnz short loc_E674 les bx, [bp+arg_0] add bx, si cmp byte ptr es:[bx], 0 jnz short loc_E66E mov ax, 1 jmp short loc_E676 ; --------------------------------------------------------------------------- loc_E66E: inc si loc_E66F: cmp si, 0Dh jl short loc_E636 loc_E674: xor ax, ax loc_E676: pop si pop bp retn 4 sub_E62E endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_E67B proc near arg_0 = word ptr 4 arg_2 = dword ptr 6 push bp mov bp, sp xor dx, dx jmp short loc_E68E ; --------------------------------------------------------------------------- loc_E682: les bx, [bp+arg_2] add bx, dx mov al, byte_13EF7 xor es:[bx], al inc dx loc_E68E: cmp dx, [bp+arg_0] jb short loc_E682 pop bp retn 6 sub_E67B endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_E697 proc near var_1 = byte ptr -1 enter 2, 0 cmp word_13F0F, 0 jnz short loc_E6AF pushd [off_13EFC] push 100h call file_read loc_E6AF: les bx, off_13EFC add bx, word_13F0F mov al, es:[bx] mov [bp+var_1], al mov al, byte_13EF7 xor [bp+var_1], al inc word_13F0F cmp word_13F0F, 100h jb short loc_E6D5 mov word_13F0F, 0 loc_E6D5: mov al, [bp+var_1] leave retn sub_E697 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_E6DA proc near var_C = dword ptr -0Ch var_8 = dword ptr -8 var_3 = byte ptr -3 var_2 = byte ptr -2 var_1 = byte ptr -1 arg_0 = word ptr 4 enter 0Ch, 0 mov [bp+var_8], 0 mov [bp+var_C], 0 call sub_E697 mov [bp+var_3], al inc [bp+var_8] jmp short loc_E772 ; --------------------------------------------------------------------------- loc_E6FA: les bx, off_13EF8 add bx, word ptr [bp+var_C] mov al, [bp+var_3] mov es:[bx], al mov [bp+var_1], al inc [bp+var_C] call sub_E697 mov [bp+var_3], al inc [bp+var_8] mov al, [bp+var_1] cmp al, [bp+var_3] jnz short loc_E6FA les bx, off_13EF8 add bx, word ptr [bp+var_C] mov al, [bp+var_3] loc_E72A: mov es:[bx], al inc [bp+var_C] call sub_E697 mov [bp+var_2], al inc [bp+var_8] jmp short loc_E751 ; --------------------------------------------------------------------------- loc_E73D: les bx, off_13EF8 add bx, word ptr [bp+var_C] mov al, [bp+var_1] mov es:[bx], al inc [bp+var_C] dec [bp+var_2] loc_E751: cmp [bp+var_2], 0 ja short loc_E73D call sub_E697 mov [bp+var_3], al inc [bp+var_8] cmp al, [bp+var_1] jnz short loc_E772 les bx, off_13EF8 add bx, word ptr [bp+var_C] mov al, [bp+var_1] jmp short loc_E72A ; --------------------------------------------------------------------------- loc_E772: movzx eax, [bp+arg_0] cmp eax, [bp+var_8] jg loc_E6FA leave retn 2 sub_E6DA endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_E783 proc far var_4 = byte ptr -4 var_3 = byte ptr -3 arg_0 = dword ptr 6 enter 4, 0 push si lea ax, [bp+var_4] push ss push ax push ds push offset aXx ; "封" mov cx, 3 call SCOPY@ mov word_13EF2, 0 xor si, si jmp short loc_E7B3 ; --------------------------------------------------------------------------- loc_E7A3: pushd [bp+arg_0] call sub_E62E or ax, ax jnz short loc_E7B9 inc word_13EF2 inc si loc_E7B3: cmp si, word_13EF4 jl short loc_E7A3 loc_E7B9: mov ax, word_13EF2 shl ax, 5 mov dx, word ptr dword_13EEA+2 mov bx, word ptr dword_13EEA add bx, ax mov word ptr dword_13EEE+2, dx mov word ptr dword_13EEE, bx push ds push offset unk_13F00 call file_ropen les bx, dword_13EEE pushd dword ptr es:[bx+18h] push 0 call file_seek les bx, dword_13EEE mov al, es:[bx] cmp al, [bp+var_4] jnz short loc_E806 mov al, es:[bx+1] cmp al, [bp+var_3] jnz short loc_E806 mov byte_13EF6, 1 jmp short loc_E80B ; --------------------------------------------------------------------------- loc_E806: mov byte_13EF6, 0 loc_E80B: mov word_13F0D, 0 les bx, dword_13EEE push word ptr es:[bx+14h] call @$bnwa$qui pop cx mov word ptr off_13EF8+2, dx mov word ptr off_13EF8, ax cmp byte_13EF6, 0 jz short loc_E85D push 100h call @$bnwa$qui pop cx mov word ptr off_13EFC+2, dx mov word ptr off_13EFC, ax mov word_13F0F, 0 les bx, dword_13EEE push word ptr es:[bx+10h] call sub_E6DA pushd [off_13EFC] ; font call @$bdla$qnv add sp, 4 jmp short loc_E87F ; --------------------------------------------------------------------------- loc_E85D: pushd [off_13EF8] les bx, dword_13EEE push word ptr es:[bx+10h] call file_read pushd [off_13EF8] les bx, dword_13EEE push word ptr es:[bx+10h] call sub_E67B loc_E87F: call file_close pop si leave retf 4 sub_E783 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_E889 proc far var_4 = dword ptr -4 arg_0 = word ptr 6 arg_2 = dword ptr 8 enter 4, 0 mov eax, [bp+arg_2] mov [bp+var_4], eax xor dx, dx jmp short loc_E8C2 ; --------------------------------------------------------------------------- loc_E899: movzx eax, word_13F0D les bx, dword_13EEE cmp eax, es:[bx+14h] jge short locret_E8C7 les bx, off_13EF8 add bx, word_13F0D mov al, es:[bx] les bx, [bp+var_4] add bx, dx mov es:[bx], al inc word_13F0D inc dx loc_E8C2: cmp dx, [bp+arg_0] jb short loc_E899 locret_E8C7: leave retf 6 sub_E889 endp ; --------------------------------------------------------------------------- push bp mov bp, sp mov al, [bp+6] cbw mov word_13F0D, ax pop bp retf 2 ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_E8D9 proc far push bp mov bp, sp pushd [off_13EF8] ; font call @$bdla$qnv add sp, 4 pop bp retf sub_E8D9 endp ; --------------------------------------------------------------------------- push bp mov bp, sp les bx, dword_13EEE mov ax, es:[bx+14h] pop bp retf seg012 ends include libs/BorlandC/emu/e87trap.asm E87_PROG segment para public 'CODE' use16 assume cs:E87_PROG assume es:nothing, ss:nothing, ds:_STACK, fs:nothing, gs:nothing ; Hack. Let's better use bytes for accuracy here. tbyte_EAF0 db 035h, 0c2h, 068h, 021h, 0a2h, 0dah, 00fh, 0c9h, 0feh, 03fh tbyte_EAFA db 035h, 0c2h, 068h, 021h, 0a2h, 0dah, 00fh, 0c9h, 0ffh, 03fh flt_EB04 dd 0FFC04200r flt_EB08 dd 0FFC04800r db 0, 4Ah, 0C0h, 0FFh flt_EB10 dd 0.5 tbyte_EB14 db 085h, 064h, 0deh, 0f9h, 033h, 0f3h, 004h, 0b5h, 0ffh, 03fh flt_EB1E dd 7F800000R ; --------------------------------------------------------------------------- mov cl, 0 jmp short loc_EB2C ; --------------------------------------------------------------------------- mov cl, 2 jmp short loc_EB2C ; --------------------------------------------------------------------------- mov cl, 4 loc_EB2C: wait fxam push bp mov bp, sp lea sp, [bp-2] fstsw word ptr [bp-2] wait mov ah, [bp-1] sahf jb short loc_EB4F jnz short loc_EB70 cmp cl, 2 jnz short loc_EB4D wait fstp st wait fld1 loc_EB4D: jmp short loc_EB6D ; --------------------------------------------------------------------------- loc_EB4F: jz short loc_EB5F jnp short loc_EB5F wait fstp st wait fld cs:flt_EB04 wait ftst loc_EB5F: jmp short loc_EB6D ; --------------------------------------------------------------------------- loc_EB61: wait fcompp wait fld cs:flt_EB04 wait ftst loc_EB6D: jmp loc_EC17 ; --------------------------------------------------------------------------- loc_EB70: wait fabs wait fld tbyte ptr cs:tbyte_EAF0 wait fxch st(1) wait fprem mov ch, 2 and ch, ah shr ch, 1 fstsw word ptr [bp-2] wait mov ah, [bp-1] sahf jp short loc_EB61 mov al, 3 and al, ah shl ah, 1 shl ah, 1 rcl al, 1 add al, 0FCh rcl al, 1 cmp cl, 2 jnz short loc_EBA7 add al, cl mov ch, 0 loc_EBA7: and al, 7 test al, 1 jz short loc_EBB2 wait fsubp st(1), st jmp short loc_EBB5 ; --------------------------------------------------------------------------- loc_EBB2: wait fstp st(1) loc_EBB5: wait fptan cmp cl, 4 jz short loc_EBE6 test al, 3 jp short loc_EBC4 wait fxch st(1) loc_EBC4: wait fld st(1) wait fmul st, st wait fxch st(1) wait fmul st, st wait faddp st(1), st wait fsqrt shr al, 1 shr al, 1 xor al, ch jz short loc_EBE1 wait fchs loc_EBE1: wait fdivp st(1), st jmp short loc_EC17 ; --------------------------------------------------------------------------- loc_EBE6: mov ah, al shr ah, 1 and ah, 1 xor ah, ch jz short loc_EBF4 wait fchs loc_EBF4: test al, 3 jp short loc_EC14 wait fxch st(1) wait ftst fstsw word ptr [bp-2] wait test byte ptr [bp-1], 40h jz short loc_EC14 wait fcompp wait fld cs:flt_EB1E jmp short loc_EC17 ; --------------------------------------------------------------------------- loc_EC14: wait fdivp st(1), st loc_EC17: mov sp, bp pop bp retn ; --------------------------------------------------------------------------- wait fxam push bp mov bp, sp lea sp, [bp-2] fstsw word ptr [bp-2] wait mov ah, [bp-1] sahf xchg ax, cx jb short loc_EC34 jnz short loc_EC4E jmp short loc_EC80 ; --------------------------------------------------------------------------- loc_EC34: jz short loc_EC80 jnp short loc_EC80 wait fstp st wait fld tbyte ptr cs:tbyte_EAFA jmp short loc_EC78 ; --------------------------------------------------------------------------- loc_EC43: wait fcompp wait fld tbyte ptr cs:tbyte_EAF0 jmp short loc_EC78 ; --------------------------------------------------------------------------- loc_EC4E: wait fabs wait fld1 wait fcom st(1) fstsw word ptr [bp-2] wait mov ah, [bp-1] sahf jz short loc_EC43 jnb short loc_EC67 wait fxch st(1) loc_EC67: wait fpatan jnb short loc_EC78 wait fld tbyte ptr cs:tbyte_EAFA wait fsubp st(1), st xor ch, 2 loc_EC78: test ch, 2 jz short loc_EC80 wait fchs loc_EC80: mov sp, bp pop bp retn ; --------------------------------------------------------------------------- wait fld1 jmp short loc_EC91 ; --------------------------------------------------------------------------- wait fldlg2 jmp short loc_EC91 ; --------------------------------------------------------------------------- wait fldln2 loc_EC91: wait fxch st(1) push bp mov bp, sp wait fxam lea sp, [bp-0Ah] fstsw word ptr [bp-0Ah] wait mov ah, [bp-9] sahf jb short loc_ECB4 jz short loc_ECAF test ah, 2 jz short loc_ECD1 loc_ECAF: wait fstp st jmp short loc_ECC3 ; --------------------------------------------------------------------------- loc_ECB4: jz short loc_ECCC wait fstp st(1) jnp short loc_ECCC wait fstp st(1) test ah, 2 jz short loc_ECF5 loc_ECC3: wait fstp st wait fld cs:flt_EB08 loc_ECCC: wait ftst jmp short loc_ECF5 ; --------------------------------------------------------------------------- loc_ECD1: wait fld st wait fstp tbyte ptr [bp-0Ah] wait cmp word ptr [bp-2], 3FFFh jnz short loc_ECF2 cmp word ptr [bp-4], 8000h jnz short loc_ECF2 wait fld1 wait fsubp st(1), st wait fyl2xp1 jmp short loc_ECF5 ; --------------------------------------------------------------------------- loc_ECF2: wait fyl2x loc_ECF5: mov sp, bp pop bp retn ; --------------------------------------------------------------------------- sub cx, cx jmp short loc_ED0F ; --------------------------------------------------------------------------- wait fldl2t mov cl, 1 wait fxch st(1) jmp short loc_ED0F ; --------------------------------------------------------------------------- wait fldl2e mov cl, 1 wait fxch st(1) loc_ED0F: wait fxam push bp mov bp, sp lea sp, [bp-4] fstsw word ptr [bp-4] jcxz short loc_ED21 wait fxch st(1) loc_ED21: wait mov ah, [bp-3] sahf jb short loc_ED38 jnz short loc_ED53 wait fstp st jcxz short loc_ED32 wait fstp st loc_ED32: wait fld1 jmp loc_EDDC ; --------------------------------------------------------------------------- loc_ED38: jcxz short loc_ED3D wait fstp st loc_ED3D: jz short loc_ED4D jnp short loc_ED4D wait fstp st wait fld cs:flt_EB1E jmp loc_EDD1 ; --------------------------------------------------------------------------- loc_ED4D: wait ftst jmp loc_EDDC ; --------------------------------------------------------------------------- loc_ED53: jcxz short loc_ED58 wait fmulp st(1), st loc_ED58: wait fabs wait fcom cs:flt_EB10 fstsw word ptr [bp-4] wait test byte ptr [bp-3], 41h jz short loc_ED77 wait f2xm1 wait fld1 wait faddp st(1), st jmp short loc_EDD1 ; --------------------------------------------------------------------------- loc_ED77: wait fld1 wait fld st(1) fstcw word ptr [bp-4] wait fscale or byte ptr [bp-3], 0Fh wait fldcw word ptr [bp-4] wait frndint and byte ptr [bp-3], 0F3h wait fldcw word ptr [bp-4] wait fist word ptr [bp-2] wait fxch st(1) wait fchs wait fxch st(1) wait fscale wait fstp st(1) wait fsubp st(1), st wait f2xm1 wait fld1 wait faddp st(1), st shr word ptr [bp-2], 1 jnb short loc_EDC4 wait fld tbyte ptr cs:tbyte_EB14 wait fmulp st(1), st loc_EDC4: wait fild word ptr [bp-2] wait fxch st(1) wait fscale wait fstp st(1) loc_EDD1: test ah, 2 jz short loc_EDDC wait fld1 wait fdivrp st(1), st loc_EDDC: mov sp, bp pop bp retn ; =============== S U B R O U T I N E ======================================= ; Attributes: library function bp-based frame e087_Entry proc far var_2 = word ptr -2 arg_1 = byte ptr 7 push bp mov bp, sp push ax push si push ds test [bp+arg_1], 2 jz short loc_EDED sti loc_EDED: lds si, [bp+2] mov ax, ds xor ax, ss:27h mov ds, ax mov ax, [si-1] sub al, 34h ; '4' cmp al, 8 jnb short loc_EE57 cmp ax, 0E303h jz short loc_EE2C cmp ax, 0E007h jnz short loc_EE1D cmp byte ptr ss:26h, 2 jge short loc_EE1D fstsw [bp+var_2] inc word ptr [bp+2] jmp short loc_EE7A ; --------------------------------------------------------------------------- loc_EE1D: sub si, 2 mov byte ptr [si], 9Bh add byte ptr [si+1], 0A4h loc_EE27: mov [bp+2], si jmp short loc_EE7A ; --------------------------------------------------------------------------- loc_EE2C: fninit inc word ptr [bp+2] mov word ptr ss:20h, 4100h mov word ptr ss:22h, 3Fh ; '?' mov word ptr ss:45h, 0 mov ax, ss:31h mov ss:2Dh, ax mov word ptr ss:24h, 0 jmp short loc_EE7A ; --------------------------------------------------------------------------- loc_EE57: ja short loc_EE7F test ah, 20h jnz short loc_EE8C sub si, 2 mov [bp+2], si mov byte ptr [si], 9Bh inc si mov al, ah and ax, 7C0h shr al, 1 shr al, 1 shr al, 1 xor al, 18h add ax, 0D826h mov [si], ax loc_EE7A: pop ds pop si pop ax pop bp iret ; --------------------------------------------------------------------------- loc_EE7F: cmp al, 9 ja short loc_EE8C sub si, 2 mov word ptr [si], 9B90h jmp short loc_EE27 ; --------------------------------------------------------------------------- loc_EE8C: int 3 ; Trap to Debugger jmp short loc_EE7A e087_Entry endp ; --------------------------------------------------------------------------- db 22h, 2, 26h, 2, 2Ah, 2, 1Bh, 3, 8Eh, 3, 84h, 3, 89h db 3, 7, 4, 0F9h, 3, 0FDh, 3 ; --------------------------------------------------------------------------- e087_Shortcut: sti push ax push si push es push bp mov bp, sp les si, [bp+8] lods byte ptr es:[si] mov [bp+8], si cbw xchg ax, si push cx call word ptr cs:[si+5A3h] pop cx pop bp pop es pop si pop ax iret E87_PROG ends include libs/BorlandC/emu/emu086.asm ; Segment type: Pure code seg015 segment para public 'CODE' use16 assume cs:seg015 assume es:nothing, ss:nothing, ds:dseg, fs:nothing, gs:nothing include libs/BorlandC/ctor2[textc].asm include libs/BorlandC/ctor3[textc].asm include libs/BorlandC/strings[textc].asm dd 0, 0 seg015 ends ; =========================================================================== ; Segment type: Pure data dseg segment para public 'DATA' use16 assume cs:dseg include libs/BorlandC/c0[data].asm word_12320 dw 101h word_12322 dw 201h byte_12324 db 0 byte_12325 db 0 byte_12326 db 0 byte_12327 db 0 byte_12328 db 0 byte_12329 db 0 byte_1232A db 0 byte_1232B db 0 byte_1232C db 0 byte_1232D db 0 byte_1232E db 0 byte_1232F db 0 dword_12330 dd 0 word_12334 dw 0 word_12336 dw 0 byte_12338 db 3 word_12339 dw 0 word_1233B dw 0 unk_1233D db 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 db 0 db 0 word_123C0 dw 0 word_123C2 dw 0 word_123C4 dw 0 word_123C6 dw 0 byte_123C8 db 0 word_123C9 dw 0 byte_123CB db 0 word_123CC dw 0 word_123CE dw 0 word_123D0 dw 0 word_123D2 dw 0 word_123D4 dw 0 word_123D6 dw 0 db 0 db 0 word_123DA dw 0 word_123DC dw 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 dd 0 db 0 db 0 db 0 off_124CD dd aVrvsvVqvs ; " START " dd aVbvnvmvsvhvmvt ; "CONTINUE" dd aB@vnvovsvhvnvm ; " OPTION " dd aB@b@vpvtvhvsb@ ; "  QUIT  " off_124DD dd aB@vqvVmvjb@ ; " RANK  " dd aVlvtvrvhvb ; " MUSIC " dd aVovkvVxvdvq ; "PLAYER " dd aVlbdvsvdvrvs ; "M.TEST " dd aB@vpvtvhvsb@ ; " QUIT  " off_124F1 dd aEasy ; " EASY " dd aNormal ; "NORMAL" dd aHard ; " HARD " dd aLunatic ; "LUNATIC" off_12501 dd aOff ; " OFF " dd aFm ; " FM " off_12509 dd a3 ; " 3 " dd a4 ; " 4 " dd a5 ; " 5 " dd a6 ; " 6 " dd a7 ; " 7 " byte_1251D db 0 off_1251E dd aVlvtvrvhvbb@vm ; "MUSIC No." dd aB@b@vpvxvivf ; "  Quit " off_12526 dd aASacretLot ; " A Sacret Lot" dd aXcvR_o ; " 風の神社 " dd aIiiuvIPc ; " 永遠の巫女 " dd aHighlyResponsi ; " Highly Responsive" dd aUmx dd aOrientalMagici ; " Oriental Magician" dd aB@FjoVPmsUbb@ ; "  破邪の小太刀  " dd aTheLegendOfKag ; " The Legend of KAGE" dd aPositiveAndNeg ; "Positive and Negative" dd aB@b@UvoguRrb@b ; "   天使伝説   " dd aB@b@b@CvlB@b@b ; "    魔鏡    " dd aVvvUVRVnvVOuvV ; "いざ倒れ逝くその時まで" dd aB@b@oavVVrvivV ; "  死なばもろとも  " dd aB@b@Rpchmxom ; "   星幽剣士" dd aB@b@b@gagcgkgx ; "   アイリス" word_12562 dw 63h word_12564 dw 0 word_12566 dw 0 word_12568 dw 0 word_1256A dw 0 word_1256C dw 0 off_1256E dd aReimu_mdt ; "reimu.mdt" dd aZipangu_mdt ; "ZIPANGU.mdt" dd aSt0_mdt ; "st0.mdt" dd aSt1_mdt ; "st1.mdt" dd aSt2_mdt ; "st2.mdt" dd aSt3_mdt ; "st3.mdt" dd aSt4_mdt ; "st4.mdt" dd aSt5_mdt ; "st5.mdt" dd aPositive_mdt ; "positive.mdt" dd aLegend_mdt ; "legend.mdt" dd aKami_mdt ; "kami.mdt" dd aTensi_mdt ; "tensi.mdt" dd aSyugen_mdt ; "syugen.mdt" dd aAlice_mdt ; "alice.mdt" dd aIris_mdt ; "iris.mdt" word_125AA dw 0 word_125AC dw 0 word_125AE dw 0 word_125B0 dw 0 ; char path[] path db 'reiiden.cfg',0 ; char mode[3] mode db 'rb',0 ; char s[] s db 'REIIDEN',0 ; char aWb[] aWb db 'wb',0 ; char aReimu_mdt[] aReimu_mdt db 'reimu.mdt',0 aReiiden2_grp db 'REIIDEN2.grp',0 aReiiden3_grp db 'REIIDEN3.grp',0 aOp_win_grp db 'op_win.grp',0 ; char aReiiden_0[] aReiiden_0 db 'reiiden',0 aVgvhvsb@vjvdvx db ' HIT KEY',0 aVrvsvVqvs db ' START ',0 aVbvnvmvsvhvmvt db 'CONTINUE',0 aB@vnvovsvhvnvm db ' OPTION ',0 aB@b@vpvtvhvsb@ db '  QUIT  ',0 aB@vqvVmvjb@ db ' RANK  ',0 aVlvtvrvhvb db ' MUSIC ',0 aVovkvVxvdvq db 'PLAYER ',0 aVlbdvsvdvrvs db 'M.TEST ',0 aB@vpvtvhvsb@ db ' QUIT  ',0 aEasy db ' EASY ',0 aNormal db 'NORMAL',0 aHard db ' HARD ',0 aLunatic db 'LUNATIC',0 aOff db ' OFF ',0 aFm db ' FM ',0 a3 db ' 3 ',0 a4 db ' 4 ',0 a5 db ' 5 ',0 a6 db ' 6 ',0 a7 db ' 7 ',0 ; char aSS[] aSS db '%s%s',0 aVlvtvrvhvbb@vm db 'MUSIC No.',0 aB@b@vpvxvivf db '  Quit ',0 aASacretLot db ' A Sacret Lot',0 aXcvR_o db ' 風の神社 ',0 aIiiuvIPc db ' 永遠の巫女 ',0 aHighlyResponsi db ' Highly Responsive',0 aUmx db ' 東方怪奇談 ',0 aOrientalMagici db ' Oriental Magician',0 aB@FjoVPmsUbb@ db '  破邪の小太刀  ',0 aTheLegendOfKag db ' The Legend of KAGE',0 aPositiveAndNeg db 'Positive and Negative',0 aB@b@UvoguRrb@b db '   天使伝説   ',0 aB@b@b@CvlB@b@b db '    魔鏡    ',0 aVvvUVRVnvVOuvV db 'いざ倒れ逝くその時まで',0 aB@b@oavVVrvivV db '  死なばもろとも  ',0 aB@b@Rpchmxom db '   星幽剣士',0 aB@b@b@gagcgkgx db '   アイリス',0 ; char aS_2d[] aS_2d db '%s%.2d',0 aZipangu_mdt db 'ZIPANGU.mdt',0 aSt0_mdt db 'st0.mdt',0 aSt1_mdt db 'st1.mdt',0 aSt2_mdt db 'st2.mdt',0 aSt3_mdt db 'st3.mdt',0 aSt4_mdt db 'st4.mdt',0 aSt5_mdt db 'st5.mdt',0 aPositive_mdt db 'positive.mdt',0 aLegend_mdt db 'legend.mdt',0 aKami_mdt db 'kami.mdt',0 aTensi_mdt db 'tensi.mdt',0 aSyugen_mdt db 'syugen.mdt',0 aAlice_mdt db 'alice.mdt',0 aIris_mdt db 'iris.mdt',0 aGogbgGtg@gcglv db 'バッチファイルから起動してよ',0 aCon db 'CON',0 ; char format[] format db 'おつかれさまでした!!',0Ah,0 byte_12902 db 0 word_12903 dw 0 db 7 dd 0 db 0 db 0 db 0 word_1290D dw 140h word_1290F dw 0C8h dd 0 db 7Fh db 2 db 8Fh db 1 db 0 db 0C0h db 0 db 0E0h db 0 db 0F0h db 0 db 0F8h db 0 db 0FCh db 0 db 0FEh db 0 db 0FFh db 80h db 0FFh db 0C0h db 0FFh db 0E0h db 0FFh db 0 db 0FEh db 0 db 0EFh db 0 db 0CFh db 80h db 7 db 80h db 7 db 0 db 3 db 0 db 0 db 0 db 40h db 0 db 60h db 0 db 70h ; p db 0 db 78h ; x db 0 db 7Ch ; | db 0 db 7Eh ; ~ db 0 db 7Fh db 80h db 7Fh db 0 db 7Ch ; | db 0 db 6Ch ; l db 0 db 46h ; F db 0 db 6 db 0 db 3 db 0 db 3 db 0 db 0 db 0 a3l db 1Bh,'[>3l',0 a3h db 1Bh,'[>3h',0 a1l db 1Bh,'[>1l',0 a1h db 1Bh,'[>1h',0 a2j db 1Bh,'[2J',0 db 0 byte_12978 db 0 db 0 unk_1297A db 0 dd 0 db 0Fh db 0 db 0Fh db 0 db 0 db 0Fh db 0Fh db 0Fh db 0 db 0 db 0Fh db 0 db 0Fh db 0Fh db 0Fh db 0 db 0Fh db 0Fh db 0Fh db 8 db 8 db 8 db 0 db 0 db 0Ah db 0 db 0Ah db 0 db 0 db 0Ah db 0Ah db 0Ah db 0 db 0 db 0Ah db 0 db 0Ah db 0Ah db 0Ah db 0 db 0Ch db 0Ch db 0Ch byte_129AA db 0 word_129AB dw 80h aPal98Grb db 'pal98 grb',0 db 0 word_129B8 dw 1 word_129BA dw 1 dd 0 dd 0 db 0 db 0 db 0 byte_129C7 db 0 byte_129C8 db 0 byte_129C9 db 0 aHgrx db 'HGRX',0 aHgrz db 'HGRZ',0 include libs/master.lib/version[data].asm include libs/master.lib/grp[data].asm include libs/master.lib/pal[data].asm include libs/master.lib/respal_exist[data].asm include libs/master.lib/resdata[data].asm include libs/master.lib/fil[data].asm include libs/master.lib/keytable[data].asm include libs/master.lib/keystart[data].asm include libs/master.lib/keyback[data].asm include libs/master.lib/dos_ropen[data].asm include libs/master.lib/clip[data].asm include libs/master.lib/rand[data].asm aReiidenconfig db 'ReiidenConfig',0 byte_12B0E db 0 db 0 aMdrv2system db 'Mdrv2System',0 aXx db '封',0 db 0 include libs/BorlandC/deflt87[data].asm include libs/BorlandC/protflag[data].asm include libs/BorlandC/flag8087[data].asm include libs/BorlandC/math/fperr[data].asm include libs/BorlandC/math/_pow10[data].asm include libs/BorlandC/_abort[data].asm include libs/BorlandC/atexit[data].asm include libs/BorlandC/exit[data].asm include libs/BorlandC/files[data].asm include libs/BorlandC/fmode[data].asm include libs/BorlandC/fpstklen[data].asm include libs/BorlandC/ioerror[data].asm include libs/BorlandC/mkname[data].asm include libs/BorlandC/new[data].asm include libs/BorlandC/stklen[data].asm include libs/BorlandC/ctype[data].asm include libs/BorlandC/cconv[data].asm include libs/BorlandC/vprinter[data].asm include libs/BorlandC/xxv[data].asm include libs/BorlandC/cputype[data].asm include libs/BorlandC/fbrk[data].asm include libs/BorlandC/signal[data].asm include libs/BorlandC/pathops[data].asm include libs/BorlandC/putc[data].asm include libs/BorlandC/srchenv[data].asm include libs/BorlandC/srchstr[data].asm include libs/BorlandC/setvbuf[data].asm include libs/BorlandC/sysnerr[data].asm include libs/BorlandC/xx[data].asm include libs/BorlandC/cvtfak[data].asm include libs/BorlandC/setargv[data].asm include libs/BorlandC/setenvp[data].asm include libs/BorlandC/strings[data].asm include libs/BorlandC/cibmdely[data].asm include libs/BorlandC/coniotyp[data].asm include libs/BorlandC/mbctype[data].asm include libs/BorlandC/loadprog[data].asm include libs/BorlandC/math/realcvt[cvtseg].asm include libs/BorlandC/cvtfak[cvtseg].asm include libs/BorlandC/cvtfak[scnseg].asm InitStart label byte include libs/BorlandC/emu/fpinit[initdata].asm include libs/BorlandC/new[initdata].asm include libs/BorlandC/setupio[initdata].asm include libs/BorlandC/cputype[initdata].asm include libs/BorlandC/pathops[initdata].asm include libs/BorlandC/setargv[initdata].asm include libs/BorlandC/setenvp[initdata].asm include libs/BorlandC/cibmdely[initdata].asm include libs/BorlandC/conioini[initdata].asm InitEnd label byte ExitStart label byte include libs/BorlandC/emu/fpinit[exitdata].asm include libs/BorlandC/new[exitdata].asm ExitEnd label byte bdata@ label byte ; TODO: Missing clip[bss].asm (8 bytes) somewhere in there... dword_13418 dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? word_1355C dw ? word_1355E dw ? ; void (__interrupt far *off_13560)() off_13560 dw ? word_13562 dw ? farfp_13564 dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? db ? ; db ? ; db ? ; word_13627 dw ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? word_13665 dw ? word_13667 dw ? db ? word_1366A dw ? word_1366C dw ? word_1366E dw ? db ? ; byte_13671 db ? dword_13672 dd ? dword_13676 dd ? dword_1367A dd ? dword_1367E dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? unk_136D2 db ? ; dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? dd ? db ? ; db ? ; db ? ; ; void (*font)(void) font dd ? include libs/master.lib/pal[bss].asm include libs/master.lib/fil[bss].asm include libs/master.lib/keystart[bss].asm dd ? dd ? dd ? dd ? dword_13EE6 dd ? dword_13EEA dd ? dword_13EEE dd ? word_13EF2 dw ? word_13EF4 dw ? byte_13EF6 db ? byte_13EF7 db ? ; void (*off_13EF8)(void) off_13EF8 dd ? ; void (*off_13EFC)(void) off_13EFC dd ? unk_13F00 db ? ; dd ? dd ? dd ? word_13F0D dw ? word_13F0F dw ? db ? ; include libs/BorlandC/atexit[bss].asm include libs/BorlandC/mkname[bss].asm include libs/BorlandC/sigdata[bss].asm include libs/BorlandC/xxv[bss].asm include libs/BorlandC/signal[bss].asm include libs/BorlandC/getc[bss].asm include libs/BorlandC/putc[bss].asm include libs/BorlandC/xx[bss].asm edata@ label byte dseg ends include libs/BorlandC/stack.asm end startx