Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; 830 bytes 16-bit DOS patch.
- ; \masm32\bin\ml /c K4SCREEN.asm
- ; \masm32\bin\link16 K4SCREEN.obj;
- .MODEL small
- .STACK 500h
- .DATA
- .CODE
- PatchL EQU 6
- Buffer Db PatchL Dup(1)
- handle dw ?
- intro db "The Penguins Little Crack Patch",0dh,0ah,"For 4screens$" ;<---- Insert program name here
- FileName db "4screens.EXE",0 ;<------- Filename to be patched
- notfound db 0dh,0ah,"File not found! Make sure Crack Patch is in program directory.$"
- cracked db 0dh,0ah,"File successfully patched. Enjoy!$"
- Cant db 0dh,0ah,"Can't write to file.$"
- Done db "File has been made.$"
- String db 085h,0 ;<------------- Byte e.g "85" to be patched
- START:
- mov ax,cs
- mov ds,ax
- mov dx,offset intro ;<-------point to the time prompt
- mov ah,9 ;<------------------DOS: print string
- int 21h
- jmp openfile
- openfile:
- mov ax,cs
- mov ds,ax
- mov ax,3d02h
- mov dx,offset FileName
- int 21h
- mov handle,ax
- cmp ax,02h
- je filedontexist
- jmp write
- filedontexist:
- mov ax,cs
- mov ds,ax
- mov dx,offset notfound
- mov ah,9 ;<------------------DOS: print string
- int 21h ;<-------------------Display the time prompt
- jmp exit
- Write:
- mov bx,handle
- mov cx,0000h
- mov dx,07D6h ;<------------- Insert offset e.g "07d6" you want to Patch
- mov ax,4200h
- int 21h
- mov cx,patchl
- mov dx,offset String
- mov ah,40h
- mov cx,01h
- int 21h
- mov ax,cs
- mov ds,ax
- mov dx,offset cracked
- mov ah,9 ;<------------------DOS: print string
- int 21h ;<-------------------Display the time prompt
- jmp exit
- Exit:
- mov ah,3eh
- int 21h
- mov ax,4c00h
- int 21h
- END START
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement