| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- .Model Huge
- .386
- .Stack 100h
- .Code
- mov ax,cs
- mov ds,ax
- mov es,ax
- mov ax,3d02h
- mov dx,offset cs:fname ; DX=*FileName
- int 21h ; DOS/FileOpen
- jc errorlbl ; Jump On Errors
- mov word ptr [offset cs:fname],ax ; BX=Handle
- mov bx,ax
- mov ax,4200h
- xor cx,cx ; Segment
- mov dx,36dfh ; Offset
- int 21h ; DOS/FileSeekSet
- jc errorlbl ; Error !
- mov ax,4000h
- mov bx,word ptr [offset fname] ; BX=Handle
- mov cx,1 ; Lenght
- mov dx,offset patch1 ; Buffer
- int 21h ; DOS/WriteFile
- jc errorlbl
- mov ax,4200h
- xor cx,cx ; Segment
- mov dx,0E31Ah ; Offset
- int 21h ; DOS/FileSeekSet
- jc errorlbl ; Error !
- mov ax,4000h
- mov bx,word ptr [offset fname] ; BX=Handle
- mov cx,1 ; Lenght
- mov dx,offset patch2 ; Buffer
- int 21h ; DOS/WriteFile
- jc errorlbl
- mov ax,3e00h
- mov bx,word ptr [offset fname] ; BX=Handle
- int 21h ; DOS/CloseFile
- jc errorlbl
- mov dx,offset cs:text2
- jmp getout
- errorlbl:
- mov dx,offset cs:text1 ; Print
- getout: mov ah,9
- int 21h
- mov ah,4ch ; Get Out Of Here !
- int 21h
- patch2 db 084H; MOV EAX,00000001 - NOP
- patch1 db 074H; MOV EAX,00000001 - NOP
- fname db 'dsp_wt.dll',0
- text1 db 0ah,0dh,'Error Handling File'
- text2 db 0ah,0dh,'Patch By Rod',0ah,0dh,'$'
- end;
|