|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
lolAnonymous Expert Cheater Reputation: 1
Joined: 19 Jul 2015 Posts: 154
|
Posted: Thu Aug 03, 2017 11:46 am Post subject: Assembly question (while hacking a game) |
|
|
Hey guys, I am learning Assembly and I just found something odd while hacking a game...
well here is a assembly of coins in a game :-
Code: |
"game.exe 2.s86"+E1E7B: 8B 51 0C - mov edx,[ecx+0C]
// ---------- INJECTING HERE ----------
"game.exe 2.s86"+E1E7E: 8B 71 08 - mov esi,[ecx+08] - coins
"game.exe 2.s86"+E1E81: 89 45 DC - mov [ebp-24],eax
// ---------- DONE INJECTING ----------
"game.exe 2.s86"+E1E84: 8B 41 14 - mov eax,[ecx+14]
"game.exe 2.s86"+E1E87: 89 75 E4 - mov [ebp-1C],esi
"game.exe 2.s86"+E1E8A: 89 55 0C - mov [ebp+0C],edx
|
and if I make these changes the game will give me gems instead of coins
Code: |
game.exe 2.s86+E1E7B - 8B 51 0C - mov edx,[ecx+0C]
game.exe 2.s86+E1E7E - C7 45 E4 5A220000 - mov [ebp-1C],0000225A { 8794 }
game.exe 2.s86+E1E85 - 90 - nop
game.exe 2.s86+E1E86 - 90 - nop
game.exe 2.s86+E1E87 - 90 - nop
game.exe 2.s86+E1E88 - 90 - nop
game.exe 2.s86+E1E89 - 90 - nop
game.exe 2.s86+E1E8A - 89 55 0C - mov [ebp+0C],edx
|
I am still learning assembly as a beginner but for me this change makes no sense...I don't know if it's a programming question or game hacking...
|
|
Back to top |
|
|
OldCheatEngineUser Whateven rank Reputation: 20
Joined: 01 Feb 2016 Posts: 1587
|
Posted: Thu Aug 03, 2017 12:09 pm Post subject: |
|
|
its pretty much clear, injecting point here:
Code: | "game.exe 2.s86"+E1E7E: 8B 71 08 - mov esi,[ecx+08] - coins
"game.exe 2.s86"+E1E81: 89 45 DC - mov [ebp-24],eax |
after injecting:
Code: | game.exe 2.s86+E1E7E - C7 45 E4 5A220000 - mov [ebp-1C],0000225A { 8794 } |
"game.exe 2.s86"+E1E7E: 8B 71 08 - mov esi,[ecx+08] - coins
this module address holding coins instruction, source index is holding your coin address.
and ecx+08 is the total money (after subtraction or addition) to be added to your address.
see after injection "game.exe 2.s86"+E1E7E:
mov [ebp-1C],0000225A
is totally different than the original one.
if you want coins then modify the value of [ecx+08] under newmem or above first instruction in code section.
for example:
2710h equal 10000d
_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
STN wrote: | i am a sweetheart. |
|
|
Back to top |
|
|
lolAnonymous Expert Cheater Reputation: 1
Joined: 19 Jul 2015 Posts: 154
|
Posted: Thu Aug 03, 2017 12:24 pm Post subject: |
|
|
Hello OldCheatEngineUser thanks for replying...
But I think you didn't get my question because I think I didn't explained it correctly...
Well my question is that by changing this : Code: | "game.exe 2.s86"+E1E7B: 8B 51 0C - mov edx,[ecx+0C]
// ---------- INJECTING HERE ----------
"game.exe 2.s86"+E1E7E: 8B 71 08 - mov esi,[ecx+08] - coins
"game.exe 2.s86"+E1E81: 89 45 DC - mov [ebp-24],eax
// ---------- DONE INJECTING ----------
"game.exe 2.s86"+E1E84: 8B 41 14 - mov eax,[ecx+14]
"game.exe 2.s86"+E1E87: 89 75 E4 - mov [ebp-1C],esi
"game.exe 2.s86"+E1E8A: 89 55 0C - mov [ebp+0C],edx |
to this : Code: | game.exe 2.s86+E1E7B - 8B 51 0C - mov edx,[ecx+0C]
game.exe 2.s86+E1E7E - C7 45 E4 5A220000 - mov [ebp-1C],0000225A { 8794 }
game.exe 2.s86+E1E85 - 90 - nop
game.exe 2.s86+E1E86 - 90 - nop
game.exe 2.s86+E1E87 - 90 - nop
game.exe 2.s86+E1E88 - 90 - nop
game.exe 2.s86+E1E89 - 90 - nop
game.exe 2.s86+E1E8A - 89 55 0C - mov [ebp+0C],edx |
gives me gems instead of coins and I love gems :p but why? what is changed in the assembly which tell the game to give gems "with" coins.. ?
Should I make a video?
Thanks in advance
|
|
Back to top |
|
|
OldCheatEngineUser Whateven rank Reputation: 20
Joined: 01 Feb 2016 Posts: 1587
|
Posted: Thu Aug 03, 2017 12:29 pm Post subject: |
|
|
track the stack then.
maybe base pointer/stack frame rate minus 1C is the location that stack point go to get gems value/amount.
EDIT HERE:
and mov [ebp-24],eax the location in stack for coins?
or ebp-0C
i think that make sense.
i apologize for misunderstanding.
_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
STN wrote: | i am a sweetheart. |
Last edited by OldCheatEngineUser on Thu Aug 03, 2017 1:33 pm; edited 2 times in total |
|
Back to top |
|
|
lolAnonymous Expert Cheater Reputation: 1
Joined: 19 Jul 2015 Posts: 154
|
Posted: Thu Aug 03, 2017 12:39 pm Post subject: |
|
|
nop I don't think so... tomorrow I will make a video and pm you
|
|
Back to top |
|
|
OldCheatEngineUser Whateven rank Reputation: 20
Joined: 01 Feb 2016 Posts: 1587
|
Posted: Thu Aug 03, 2017 12:42 pm Post subject: |
|
|
fine, i have also edited my post, copied&pasted wrong code.
_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
STN wrote: | i am a sweetheart. |
|
|
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
|
|