Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Assembly question (while hacking a game)

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
lolAnonymous
Expert Cheater
Reputation: 1

Joined: 19 Jul 2015
Posts: 154

PostPosted: Thu Aug 03, 2017 11:46 am    Post subject: Assembly question (while hacking a game) Reply with quote

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
View user's profile Send private message
OldCheatEngineUser
Whateven rank
Reputation: 20

Joined: 01 Feb 2016
Posts: 1587

PostPosted: Thu Aug 03, 2017 12:09 pm    Post subject: Reply with quote

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:
Code:
mov [ecx+08],2710

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
View user's profile Send private message Visit poster's website
lolAnonymous
Expert Cheater
Reputation: 1

Joined: 19 Jul 2015
Posts: 154

PostPosted: Thu Aug 03, 2017 12:24 pm    Post subject: Reply with quote

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 Smile
Back to top
View user's profile Send private message
OldCheatEngineUser
Whateven rank
Reputation: 20

Joined: 01 Feb 2016
Posts: 1587

PostPosted: Thu Aug 03, 2017 12:29 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
lolAnonymous
Expert Cheater
Reputation: 1

Joined: 19 Jul 2015
Posts: 154

PostPosted: Thu Aug 03, 2017 12:39 pm    Post subject: Reply with quote

nop I don't think so... tomorrow I will make a video and pm you
Back to top
View user's profile Send private message
OldCheatEngineUser
Whateven rank
Reputation: 20

Joined: 01 Feb 2016
Posts: 1587

PostPosted: Thu Aug 03, 2017 12:42 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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 © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites