View Full Version : C++ patch code
loanshark666
June 21st, 2002, 22:28
ok,, can someone give me some simple c/c++ code to get me started,,, i've already patched some program in a hex editor, now i'd like to make an .exe that would automatically make the same patch for others,, any help? thanks.
naides
June 22nd, 2002, 09:48
If you look in protools or exetools, you will find a collection of patcher generators, from the very simple to the very sophisticated. I have not examined each one of them, but I vaguely remember some came with source code.
If what you want is a coding excercise, you may also find inspiration in their methodologies: Open the unpathched file, open the patched file, compare byte by byte, list the offset and the position of the changed bytes. Then, generate a stub of code that will open an unpatched file, write the bytes at the right offsets, plus add checks, bells and ribbons.
peterg70
June 22nd, 2002, 11:29
Actually I could use something like this so if someone wants to program please go ahead.
Also Don't forget you want a small window for some text file which has to be incorporated into the exe and also a Patch/Unpatch Button to return the original file back to the correct format
This could become a mini project for all.
jsteed
June 22nd, 2002, 15:06
Try PatchEngine 4.5 by ArthaXerXes. I've used it quite a bit and find that it works very well.
Risotto
June 23rd, 2002, 22:49
If you want to make a patcher, you can go the ways described above (by comparing every byte), but also if you know what bytes should be patched, an you must know it, you may make a patcher without checking every byte but checking only that bytes you want to alter, and maybe check some other values. If the check isn't completed successfully, the patch routine won't be applied.
peterg70
June 24th, 2002, 10:05
Risotto
I think that the byte by byte comparison is at the start when generating the actual patch exe.
When actually applying the patch I would agree with your above comments
peterg
loanshark666
June 27th, 2002, 16:16
thanks for all the replies,, i think i'll get something working soon, and post it back on here for anyone interested,, thanks again.
Zero
July 1st, 2002, 11:38
You can find a small hex-dump-tool in C-Source here:
(This may help if you want to code an own patcher. Donīt use ready made ones... you will not learn

)
www.anticrack.de/modules.php?op=modload&name=News&file=article&sid=2441&mode=&order=0&thold=0
Powered by vBulletin® Version 4.2.2 Copyright © 2018 vBulletin Solutions, Inc. All rights reserved.