@r ysf |= 4000
a ss:sp - 10
 cmp ax, 20
 jae (sp)
 .
s cs:ip l 200 range ss:sp - 10 aao - 2
if (src == 1) then goto :found
if (src == 0) then goto :notfound
r ysf clr= 4000
; Error: Multiple patch sites found
@goto :eof

:notfound
a ss:sp - 10
 cmp ax, 20
 jmp short (sp)
 .
s cs:ip l 200 range ss:sp - 10 aao - 2
if (src == 1) then goto :alreadypatched
if (src == 0) then goto :notfound2
r ysf clr= 4000
; Error: Multiple already patched patch sites found
@goto :eof

:notfound2
r ysf clr= 4000
; Patch site not found
@goto :eof

:alreadypatched
r ysf clr= 4000
; Patch site found, but is already patched
@goto :eof

:found
a srs:sro
 cmp ax, 20
 db EB
 .
r ysf clr= 4000
; File patched, don't forget to run W command
