Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Tue Apr 23, 2024 9:51 am
All times are UTC + 0
Hex edit patcher tool
Moderators: Global Moderators, Tiberian Sun Moderators
Post new topic   Reply to topic Page 1 of 1 [3 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Iran
Pyro Sniper


Joined: 23 Mar 2011

PostPosted: Sun Dec 29, 2013 9:51 pm    Post subject:  Hex edit patcher tool Reply with quote  Mark this post and the followings unread

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?

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Sun Dec 29, 2013 10:32 pm    Post subject: Reply with quote  Mark this post and the followings unread

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

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Iran
Pyro Sniper


Joined: 23 Mar 2011

PostPosted: Sun Dec 29, 2013 10:55 pm    Post subject: Reply with quote  Mark this post and the followings unread

>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.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [3 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
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


Powered by phpBB © phpBB Group

[ Time: 0.1428s ][ Queries: 11 (0.0095s) ][ Debug on ]