I am taking on a new project, this one should be a lot smaller than the previous. I want to take an exe file (a game executable), and change the memory addresses that it reads files from in memory. For instance, when you run the game executable it opens a file called dataPY.bar. I want to open a different dataPY.bar from a different location. Where would I want to read in on doing this? Or should I look into a different method? Ty.

Recommended Answers

Not clear what you mean by different memory address. Perhaps read each dataPY.bar into a different instance of a DataPY class?

Jump to Post

if you know the memory address, you can do stuff like this.

char *p = (char *)0xEF8921;

http://stackoverflow.com/questions/3934775/how-to-initialize-a-pointer-to-a-specific-memory-address-in-c

Jump to Post

All 8 Replies

Not clear what you mean by different memory address. Perhaps read each dataPY.bar into a different instance of a DataPY class?

Lets say the following memory addresses hold information that I need

0xEF8921 - d
0xEF8922 - a
0xEF8923 - t
0xEF8924 - a
0xEF8925 - P
0xEF8926 - Y
0xEF8927 - .
0xEF8928 - b
0xEF8929 - a
0xEF8930 - r

How could I change it to dataVY.bar for instance in memory.

Lets say the following memory addresses hold information that I need

0xEF8921 - d
0xEF8922 - a
0xEF8923 - t
0xEF8924 - a
0xEF8925 - P
0xEF8926 - Y
0xEF8927 - .
0xEF8928 - b
0xEF8929 - a
0xEF8930 - r

How could I change it to dataVY.bar for instance in memory.

Just curious, why would you want to know exact memory address?

Not totaly clear what he is trying to do,
If I understand this correctly, It looks like he is trying to patch something...

Trying to patch a game exe to change the location in which it looks for some files. Any good ideas on how to go about this?

Trying to patch a game exe to change the location in which it looks for some files. Any good ideas on how to go about this?

Are you doing reverse engineering?

Yeah, there is this "patch launcher" which just copies files from one directory to another and overwrites the original files. I want to patch the exe (i think its in the exe) instead to look for different files instead. SO i could re-name them all with a slightly different name could change the last letter in all of them to V instead of the previous letter for instance:

DataPY.bar -> DataPV.bar

I scanned the exe and couldn't find the DataPY.bar file in there, so it maybe in a diff file for loading.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.