;-------------------------------------------------------------------- ; Copyright (C) 2001 Jimmy Thrasher ; ; This program is free software; you can redistribute it and/or modify ; it under the terms of the GNU General Public License as published by ; the Free Software Foundation; either version 2 of the License, or ; (at your option) any later version. ; ; This program is distributed in the hope that it will be useful, ; but WITHOUT ANY WARRANTY; without even the implied warranty of ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ; GNU General Public License for more details. ; ; You should have received a copy of the GNU General Public License ; along with this program; if not, write to the Free Software ; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ;-------------------------------------------------------------------- ; Compile with: nasm -o antiYomip.com ; Does very little error-checking. Requires a file called 'file.pdb' ; to be in the current directory, and generates 'FILE.GZ' ;-------------------------------------------------------------------- %define msdos 0x21 %define quit 0x20 %macro open_file 0 mov ah, 0x3D mov al, 0x12 int msdos %endmacro %macro open_new_file 0 mov ah, 0x3C mov cx, 0 int msdos %endmacro %macro write_to_file 0 mov ah, 0x40 int msdos %endmacro ;-------------------------------------------------------------------- org 0x100 section .text start: mov dx, infile open_file jc quitty mov [infile], ax mov bx, [infile] mov cx, 0108h ; must skip first 0x108 bytes mov dx, buffer call read_to_buffer mov dx, outfile open_new_file mov [outfile], ax loopy: mov bx, [infile] mov cx, 0400h ; 1024 bytes mov dx, buffer call read_to_buffer jc quitty cmp ax, 0 jz quitty mov cx, ax mov bx, [outfile] ;mov dx, buffer write_to_file jmp loopy quitty: mov ax, 0x4C00 int msdos read_to_buffer: ; in: BX->filehandle, DS:DX->buffer, CX->amount to read, out: contents in buffer, AX->amount read mov ah, 0x3F int msdos ret section .data infile: db 'file.pdb',0 outfile: db 'file.gz',0 section .bss buffer: resb 1024