Post Reply 
Hex Patches 4U!
May. 18, 2014, 04:33 AM (This post was last modified: May. 18, 2014 04:34 AM by Stone-D.)
Post: #22
RE: Hex Patches 4U!
Hex editing looks scary, but honestly it's not.

A quick googlyoogly shows numerous hex editing tutorials, but unfortunately most are gaming related or full-on cracking howtos. There are very few that talk about offsets, so I'll write a quick primer.

Think of exe files as just another document type: photos need a photo editor, text files need a text editor, word docs need Word or whatever, and exe files need a hex editor.

i.Hex seems to be a fairly decent and free hex editor, though I haven't tested it beyond a quick glance. A popular one is Hex Workshop, but that's not free.

Things you need to understand:
  1. 'Hex' means hexadecimal. That's base 16, instead of base 10 for decimal. The range is 0-F, instead of 0-10. The number 12 is 0C in hex. For clarity, hex numbers are usually prefixed with 0x: so, that would be 0x0C.
  2. There are two address 'styles': real offsets, and virtual offsets. Virtual offsets are long, and usually start with a '4', like 00409248. This is an address in virtual memory, which is how Windows works with gigabytes of RAM. Real offsets are relative to the start of the code in the binary. This is what we want, and is usually a short address like 00002348. Notice how the code sections of my patches use virtual offsets whereas the initial patch lines are using real offsets.

If you look near the top of my initial post, you'll see:

Quote:All are for Naoko 4.5j (June release). Yes, you can apply them to any such copy, whether or not they've had a GUI patch[1]. The first column is the offset, the second is the changed byte, and the third is the original byte:

ADDRESS: NEW OLD

This refers to:

REAL_OFFSET: NEW_VALUE ORIGINAL_VALUE

That's all you need to implement the changes. The mystery code (assembler) is there only for reference and proof.

Now... always work on a copy of the exe, not the original. When you're happy with the results, zip/archive the original and replace it with your edited copy. This is a good habit to get into and will save you many annoyances down the road.
Add Thank You Quote this message in a reply
[-] The following 1 user says Thank You to Stone-D for this post:
Styx
Post Reply 


Messages In This Thread
Hex Patches 4U! - Stone-D - May. 07, 2014, 05:32 PM
RE: Hex Patches 4U! - JJoe - May. 08, 2014, 02:22 AM
RE: Hex Patches 4U! - ProxRocks - May. 08, 2014, 03:23 AM
RE: Hex Patches 4U! - Stone-D - May. 08, 2014, 03:38 AM
RE: Hex Patches 4U! - ProxRocks - May. 08, 2014, 04:05 AM
RE: Hex Patches 4U! - Stone-D - May. 08, 2014, 05:49 AM
RE: Hex Patches 4U! - Stone-D - May. 08, 2014, 05:17 PM
RE: Hex Patches 4U! - ProxRocks - May. 09, 2014, 12:30 AM
RE: Hex Patches 4U! - Stone-D - May. 09, 2014, 02:43 AM
RE: Hex Patches 4U! - JJoe - May. 09, 2014, 04:03 AM
RE: Hex Patches 4U! - Stone-D - May. 09, 2014, 05:35 AM
RE: Hex Patches 4U! - JJoe - May. 09, 2014, 03:04 PM
RE: Hex Patches 4U! - Stone-D - May. 09, 2014, 03:46 PM
RE: Hex Patches 4U! - Oddysey - May. 09, 2014, 08:30 PM
RE: Hex Patches 4U! - Stone-D - May. 10, 2014, 03:12 PM
RE: Hex Patches 4U! - Oddysey - May. 10, 2014, 05:33 PM
RE: Hex Patches 4U! - ProxRocks - May. 10, 2014, 08:40 PM
RE: Hex Patches 4U! - Stone-D - May. 11, 2014, 06:15 AM
RE: Hex Patches 4U! - Stone-D - May. 11, 2014, 07:27 AM
RE: Hex Patches 4U! - Styx - May. 17, 2014, 03:35 PM
RE: Hex Patches 4U! - JJoe - May. 18, 2014, 12:02 AM
RE: Hex Patches 4U! - Stone-D - May. 18, 2014 04:33 AM
RE: Hex Patches 4U! - Styx - May. 18, 2014, 07:40 PM
RE: Hex Patches 4U! - Stone-D - May. 18, 2014, 07:50 PM
RE: Hex Patches 4U! - Styx - May. 28, 2014, 12:27 AM
RE: Hex Patches 4U! - Stone-D - May. 28, 2014, 02:33 AM
RE: Hex Patches 4U! - GunGunGun - Jan. 28, 2015, 03:43 AM
RE: Hex Patches 4U! - JJoe - Jan. 28, 2015, 04:03 AM
RE: Hex Patches 4U! - ProxRocks - Jan. 28, 2015, 11:47 AM
RE: Hex Patches 4U! - GunGunGun - Jan. 29, 2015, 02:45 AM
RE: Hex Patches 4U! - JJoe - Jan. 29, 2015, 03:48 AM
RE: Hex Patches 4U! - herbalist - Jan. 28, 2015, 05:49 PM
RE: Hex Patches 4U! - herbalist - Jan. 28, 2015, 05:53 PM
RE: Hex Patches 4U! - JJoe - Jan. 29, 2015, 03:35 AM
RE: Hex Patches 4U! - herbalist - Jan. 29, 2015, 04:31 AM
RE: Hex Patches 4U! - ProxRocks - Jan. 29, 2015, 10:08 AM
RE: Hex Patches 4U! - JJoe - Jan. 29, 2015, 03:08 PM
RE: Hex Patches 4U! - GunGunGun - Jan. 29, 2015, 11:58 AM
RE: Hex Patches 4U! - GunGunGun - Jan. 29, 2015, 03:25 PM
RE: Hex Patches 4U! - JJoe - Jan. 29, 2015, 07:03 PM
RE: Hex Patches 4U! - GunGunGun - Jan. 30, 2015, 03:28 AM
RE: Hex Patches 4U! - JJoe - Jan. 30, 2015, 03:55 AM
RE: Hex Patches 4U! - GunGunGun - Jan. 30, 2015, 05:52 AM
RE: Hex Patches 4U! - JJoe - Jan. 30, 2015, 03:14 PM

Forum Jump: