Posted: Sun Dec 29, 2013 9:51 pm Post subject:
Hex edit patcher tool
I'm interested in writing a tool which automatically applies hex edits using an INI control file. It will be written in C# 2.0 and it will be open-source.
I'm thinking about making the INI file work like this:
[Patches]
0=MyCoolPatch
1=MorePatches
...
[MyCoolPatch]
Offset= ; offset in the binary file, not an offset in memory
OldBytes=
NewBytes=
Might add support for offsets loaded into memory (i.e. the memory location of PE sections) in addition to the offsets in the binary file (which hex edits patch). Any other suggestions? QUICK_EDIT
afaik, several edits include adding new empty areas of space and then having the old address point to the new space where more functions/things are done than only a changed byte. (afaik Hyper added a big area of space into the exe, where he can add his new codes)
so my suggestion
-somehow allow it to add empty space without breaking the exe due to wrong offsets after that empty space
-allow it insert new code blocks into this empty space
e.g.
OldBytes=
NewBytes= NEWADDRESS
[NEWADDRESS]
Offset=
ByteArray=
usually some edits also include multiple changes at different offsets. Not sure how you want to implement this without having many MyCoolPatchA, MyCoolPatchB, MyCoolPatchC sections in the ini.
another thing to think about are different game.exe versions. It might be good to make it work not only on the latest version.
\Edit
if you want to expand this even further, how about an EIP reader?
I know several of the exe hackers have some kind of database where they can check at which offset which operation is done.
Maybe something simpler could be added where a user enters an EIP, and the program then just checks an ini file for a matching section.
e.g.
in the ini you have this
[0046C7E2]
Description=happens when fog of war is enabled
[004D8BF3]
Description=infantry with missing image in rules.ini (same as missing sequence in art.ini)
the ini file with the EIP infos can then be easily expanded by the modders with new infos _________________ SHP Artist of Twisted Insurrection: Nod buildings
>afaik, several edits include adding new empty areas of space and then having the old address point to the new space where more functions/things are done than only a changed byte. (afaik Hyper added a big area of space into the exe, where he can add his new codes)
hifi's tools do this. It's not in the scope for this project.
The EIP stuff is also something different. QUICK_EDIT
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum