07/21/00
An article known by Chilliwilli

Fed up of not being able to load large files into notepad?
This program which i found in some hacking tuts should do it.

All in 100% QB. Pretty neat.. i was speak to a few crackers and they were all saying they liked to use QB to knock up quick patchers... i think i've found my calling.

DEFINT A-Z
CONST NumOffset = 12 ' Number of offsets
CONST FileName = "NOTEPAD.EXE" ' Filename
CONST True = -1
CONST False = 0
TYPE CrackType
Offset AS INTEGER ' The offset
Original AS INTEGER ' Original code
ChangeTo AS INTEGER ' Change it to
END TYPE
DIM Crack(1 TO NumOffset) AS CrackType, Byte AS INTEGER
RANDOMIZE TIMER

SCREEN 0, 0, 0, 0 ' Draw logo
COLOR 7, 0
CLS
COLOR 14, 1

PRINT " "
PRINT " -= Created By =- "
PRINT " "
PRINT " ______ "
PRINT " / ___ \ ______ ______ ______ ______ ______ _ _ ______ "
PRINT " | / \| / ___ \ / __ \ / __ \ / ___ \ / __ \ / \ / \ / ___ \ "
PRINT " | | | | / \| | / \ | | / \ | | / \| | / \ | | | | | | / \| "
PRINT " | | | |_ | | \__/ | | \__/ | | |_ | | \__/ | | | | | | \____ "
PRINT " | | | \ | __ / | __ / | \ | __ / | | | | \____ \ "
PRINT " | | | | _/ | | / \ \ | / \ \ | _/ | | / \ \ | | | | \ | "
PRINT " | \___/| | \___/| | | | | | \__/ | | \___/| | | | | | \__/ | |\___/ | "
PRINT " \______/ \______/ \_/ \_/ \______/ \______/ \_/ \_/ \______/ \_____/ "
PRINT " "
PRINT " cerberus_x@hotmail.com "
PRINT " "
COLOR 7, 0
FOR Count = 1 TO NumOffset ' Read DATA into Crack()
READ Ofs, Ori, Cha
Crack(Count).Offset = Ofs + 1 ' Offset
Crack(Count).Original = Ori ' Original code
Crack(Count).ChangeTo = Cha ' Change it to
NEXT Count
ON ERROR GOTO NotValid
OPEN FileName FOR INPUT AS #1: CLOSE
ON ERROR GOTO 0

OPEN FileName FOR BINARY AS #1 ' Open file
FOR Count = 1 TO NumOffset ' Check if file
Ofs = Crack(Count).Offset ' is a valid Notepad
Ori = Crack(Count).Original
Bytes$ = " "
GET #1, Ofs, Bytes$
Byte = ASC(Bytes$)
IF Byte <> Ori THEN GOTO NotValid ' If not, goto NotValid
NEXT

PRINT
PRINT "Creating BackUp [NOTEPAD.CBS]..."
SHELL "COPY NOTEPAD.EXE NOTEPAD.CBS > Null" ' Create BackUp
GOSUB Pause

PRINT
PRINT "Patching...";
LOCATE CSRLIN - 1, 1
FOR Count = 1 TO NumOffset ' Apply patch
Ofs = Crack(Count).Offset
Cha = Crack(Count).ChangeTo
Bytes$ = CHR$(Cha)
PUT #1, Ofs, Bytes$
GOSUB Pause
NEXT

PRINT
PRINT "NotePad successfully patched!" ' Message if OK
GOTO Quit

NotValid:
PRINT
PRINT "NotePad.EXE isn't valid!" ' Message if not OK
BEEP

Quit:
CLOSE
END

Pause: ' This routine sets a
t! = TIMER + RND / 6 ' delay, so it seems
DO WHILE TIMER <= t!: LOOP ' as if it is a difficult
RETURN ' task

'DATA acquired from the compare made with File Compare
'Offset, Original, Change the byte to

DATA &H33B1, &HFF, &H41
DATA &H33B2, &H15, &H42
DATA &H33B3, &HA8, &H49
DATA &H33B4, &H64, &H4A
DATA &H33B5, &H40, &H40
DATA &H33B6, &H00, &H48

DATA &H33BA, &H0F, &H48
DATA &H33BB, &H85, &H40
DATA &H33BC, &HA7, &H41
DATA &H33BD, &H00, &H49
DATA &H33BE, &H00, &H4A
DATA &H33BF, &H00, &H42