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 


What does this piece of code signify?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
OmniXBro
Newbie cheater
Reputation: 0

Joined: 20 Sep 2007
Posts: 11

PostPosted: Tue Oct 30, 2007 6:22 am    Post subject: What does this piece of code signify? Reply with quote

Hi there folks, I'm just starting to move on from simple memory editing to actually beating DMA's. Trying to. It would be great if you could help me with this small, simple-looking piece of code. Thanks.
Code:

mov eax,[ebp+08]
mov ecx,[ebp+0c]
sub [eax],ecx
pop ebp


eax at this time is 0D0CEF28, it contains 200, the current ammo
ecx is 2 (each shot uses 2 ammo)
ebp is 0012f314 throughout. It always has this value.

So I've searched for the pointer pointing at 0D0CEF28 and entering that into the address list as a pointer, but this doesn't work when the game reloads.

so....what am I missing here?I tried doing stuff with 0012f314, but I'm just shooting in the dark. A nudge in the right direction, if you would be so kind.

Thanks!
Back to top
View user's profile Send private message
sponge
I'm a spammer
Reputation: 1

Joined: 07 Nov 2006
Posts: 6009

PostPosted: Tue Oct 30, 2007 5:09 pm    Post subject: Reply with quote

EBP is a stack pointer. The value is actually referencing a virtual address. So 2 local variables are loaded into eax and ecx and obviously, your ammo is subtracted.

Anyways, it is probably a multilevel pointer. I find it easier just to hook the function and change ecx to 0.

_________________
Back to top
View user's profile Send private message
Labyrnth
Moderator
Reputation: 9

Joined: 28 Nov 2006
Posts: 6285

PostPosted: Tue Oct 30, 2007 6:05 pm    Post subject: Reply with quote

sub [eax],ecx

All you need is this,

Alter it to add [eax],ecx Your ammo will increase instead of decrease.

You can also do this in an injection.

mov ecx,0
sub [eax],ecx
^ This is something that does the same of what sponge is saying to do.


And last but not least Nop out this instruction and you have infinite ammo.
sub [eax],ecx <----- Nop out this

_________________

Back to top
View user's profile Send private message
OmniXBro
Newbie cheater
Reputation: 0

Joined: 20 Sep 2007
Posts: 11

PostPosted: Tue Oct 30, 2007 6:24 pm    Post subject: Reply with quote

So... i should stop being stuck to traditional value-controlling cheat tables/address list and lern2 assembly hacking instead? I liked traditional memory altering tho, been using it since the ZSNES days. So I guess I have to move on huh?
Back to top
View user's profile Send private message
Labyrnth
Moderator
Reputation: 9

Joined: 28 Nov 2006
Posts: 6285

PostPosted: Tue Oct 30, 2007 6:26 pm    Post subject: Reply with quote

If you want to defeat DMA or CodeShifting, which is getting more popular with todays code yes you will have to make a move.

It not that hard mate.
Look at the sticky here about "insight on AA scripts"
Also take a look at some of the great AA script tutorials a few others have done.

_________________



Last edited by Labyrnth on Tue Oct 30, 2007 7:03 pm; edited 1 time in total
Back to top
View user's profile Send private message
OmniXBro
Newbie cheater
Reputation: 0

Joined: 20 Sep 2007
Posts: 11

PostPosted: Tue Oct 30, 2007 7:02 pm    Post subject: Reply with quote

Will do. Thanks for the protips everyone Smile Much love, hugs and kisses and junk.
Back to top
View user's profile Send private message
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