 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
EugGNZ Newbie cheater
Reputation: 0
Joined: 14 Dec 2014 Posts: 12
|
Posted: Mon Jul 13, 2015 8:09 am Post subject: Need advice for hacking a binary file |
|
|
Nevermind, solved in here: forum/viewtopic.php?p=5498675&sid=174019403c3434f148142c5c0dc842d4
---------OLD--------------------------------
Hi, I will try to explain (in the best way I can) my situation:
1) I have a game, which I can hack with cheat engine (with auto assemble, e.g. create an space with my instructions then jump, execute and jump back)
2) I found that the parts I want to hack, they are written in a file of the game, like this:
SEE BELOW JPG
What I want:
A permanent hack by changing the file (previously back up), and not to open/load cheat engine every time.
Where I need advice:
I can only hack the file as long as I replace byte by byte (I can't create an space to add more bytes or instructions)
So I was thinking to add the space at the end of the file (36 mb) and hope that I can access via jump (so far i failed to do it)
OR
Create a dll with my assembly code and just make a call to it from the game? (dunno how to do it)
OR
Something else?
by the way the code could be something like this:
| Code: | setCameraValues:
//Get camera value
mov eax,[ecx-2478]
//Compare with float 0x43C80000 = 400
cmp eax,0x43C80000
jg maxValue
//Compare with float 43960000 = 300
cmp eax,0x43960000
jl minValue
//something...
ret
maxValue:
mov [ecx-2478],0x43C80000
movss xmm0,[ecx-2478]
mov [ecx-2478],eax
ret
minValue:
mov [ecx-2478],0x43960000
movss xmm0,[ecx-2478]
mov [ecx-2478],eax
ret
|
| Description: |
|
| Filesize: |
418.84 KB |
| Viewed: |
5676 Time(s) |

|
|
|
| Back to top |
|
 |
Daijobu Master Cheater
Reputation: 13
Joined: 05 Feb 2013 Posts: 301 Location: the Netherlands
|
Posted: Mon Jul 13, 2015 3:13 pm Post subject: |
|
|
I've not done this before but some thoughts:
Find a code cave (I might be abusing the term here since you're not using Virtual Allocation) long enough for you to store your custom code (in order to prevent shifting addresses).
Then create a jump to your new code and back to it's origin.
You want to replace a space inhabited with only null (0x00) as a your code cave.
I might be entirely mistaken here, clevererererer folk than me will probably correct me.
_________________
|
|
| Back to top |
|
 |
EugGNZ Newbie cheater
Reputation: 0
Joined: 14 Dec 2014 Posts: 12
|
Posted: Mon Jul 13, 2015 5:30 pm Post subject: |
|
|
| Daijobu wrote: | I've not done this before but some thoughts:
Find a code cave (I might be abusing the term here since you're not using Virtual Allocation) long enough for you to store your custom code (in order to prevent shifting addresses).
Then create a jump to your new code and back to it's origin.
You want to replace a space inhabited with only null (0x00) as a your code cave.
I might be entirely mistaken here, clevererererer folk than me will probably correct me. |
Thanks for the reply, that is actually what i was doing since a couple of hours, it's all discussed in this forum with this topic:
forum/viewtopic.php?p=5498675&sid=174019403c3434f148142c5c0dc842d4
|
|
| Back to top |
|
 |
|
|
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
|
|