Results 1 to 8 of 8

Thread: C++ patch code

  1. #1
    loanshark666
    Guest

    C++ patch code

    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.
    I promise that I have read the FAQ and tried to use the Search to answer my question.

  2. #2
    Naides is Nobody
    Join Date
    Jan 2002
    Location
    Planet Earth
    Posts
    1,647
    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.

  3. #3
    Lost in Lala Land peterg70's Avatar
    Join Date
    Oct 2001
    Location
    Down Under
    Posts
    195
    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.

  4. #4
    Registered User
    Join Date
    Nov 2001
    Location
    U.K.
    Posts
    29
    Try PatchEngine 4.5 by ArthaXerXes. I've used it quite a bit and find that it works very well.

  5. #5
    Risotto
    Guest
    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.
    I promise that I have read the FAQ and tried to use the Search to answer my question.

  6. #6
    Lost in Lala Land peterg70's Avatar
    Join Date
    Oct 2001
    Location
    Down Under
    Posts
    195
    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

  7. #7
    loanshark666
    Guest

    thanks!

    thanks for all the replies,, i think i'll get something working soon, and post it back on here for anyone interested,, thanks again.
    I promise that I have read the FAQ and tried to use the Search to answer my question.

  8. #8
    Registered User
    Join Date
    Dec 2001
    Location
    The Matrix
    Posts
    108
    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
    The dark side of the force is the pathway to many abilities, some considered to be unnatural
    Is it possible to learn this power?
    Not for a Jedi...

Similar Threads

  1. DbgView patch
    By deroko in forum Blogs Forum
    Replies: 0
    Last Post: January 22nd, 2011, 21:16
  2. How do I patch?
    By illenda in forum The Newbie Forum
    Replies: 10
    Last Post: February 28th, 2010, 22:03
  3. Using drivers to patch and hook other code
    By dELTA in forum Off Topic
    Replies: 12
    Last Post: February 12th, 2003, 19:58
  4. How to patch a VB3 exe?
    By Solomon in forum Malware Analysis and Unpacking Forum
    Replies: 7
    Last Post: November 6th, 2001, 06:34
  5. Laz's vb5 dll patch?
    By 4oh4 in forum Advanced Reversing and Programming
    Replies: 3
    Last Post: November 18th, 2000, 18:34

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •