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 


Getting stack data
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Sun Mar 15, 2009 6:09 pm    Post subject: Getting stack data Reply with quote

Like..

Code:

push 4000
call Whatever


And I put a jmp from the call to my memory space(codecave). How would I get the stack info?
Back to top
View user's profile Send private message
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Sun Mar 15, 2009 6:17 pm    Post subject: Reply with quote

Grr! I want to get the stack data, how would I do it?
Back to top
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Sun Mar 15, 2009 6:32 pm    Post subject: Reply with quote

ESP
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Sun Mar 15, 2009 6:40 pm    Post subject: Reply with quote

not sure what you mean.. but stack is just a block of memory. two ways you can do it. you could pop it all off into a big array. but it would be quicker to get pointer to top and base of stack ( esp and ebp respectively), this is assuming that you did not just set up stack frame then do MOV instead. since move is a lot faster than push + pop

bear in mind the 'top' of the stack, ie. esp is actually at a lower virtual address than the 'base'
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Sun Mar 15, 2009 7:37 pm    Post subject: Reply with quote

Slugsnack wrote:

bear in mind the 'top' of the stack, ie. esp is actually at a lower virtual address than the 'base'


Depends on what kind of processor he's using, but since he's probably using Intel or AMD then yes it will be like that.

_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Sun Mar 15, 2009 7:52 pm    Post subject: Reply with quote

I'm using AMD Athlon 64 X2 Processor.
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Sun Mar 15, 2009 7:58 pm    Post subject: Reply with quote

Don't worry, the stack will work the way Slugsnack described. You really shouldn't worry about what I said since no one uses motorola or MIPS processors anymore.
_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Mon Mar 16, 2009 6:10 am    Post subject: Reply with quote

wait.. re-reading OP.. what are you trying to do ? copy entire stack ? or read off parameters that a function takes by an inline hook ? ( in this case 0x4000 )
Back to top
View user's profile Send private message
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Mon Mar 16, 2009 8:45 am    Post subject: Reply with quote

Params.
Back to top
View user's profile Send private message
BanMe
Master Cheater
Reputation: 0

Joined: 29 Nov 2005
Posts: 375
Location: Farmington NH, USA

PostPosted: Mon Mar 16, 2009 2:46 pm    Post subject: Reply with quote

yay this is so fucking hard to comprehend..(all this "i dont understand" crap is useless..if you dont understand then dont post..)

original code
Code:

push param
call function


hooked code
Code:

push param
jmp myfunction


myfunction code
Code:

pop TempParam//this the param
push TempParam
jmp function


maybe i'm stupid...but slug could've just said its a FIFO stack.. and S3NS4 coulda googled it..maybe learning a bit more then Slug let on Wink

regards BanMe
Back to top
View user's profile Send private message MSN Messenger
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Mon Mar 16, 2009 5:06 pm    Post subject: Reply with quote

FILO not FIFO surely ? o_O
Back to top
View user's profile Send private message
DoomsDay
Grandmaster Cheater
Reputation: 0

Joined: 06 Jan 2007
Posts: 768
Location: %HomePath%

PostPosted: Mon Mar 16, 2009 5:21 pm    Post subject: Reply with quote

FILO
Back to top
View user's profile Send private message
iNoobHacker
Advanced Cheater
Reputation: 0

Joined: 05 Nov 2006
Posts: 99

PostPosted: Mon Mar 16, 2009 5:30 pm    Post subject: Reply with quote

BanMe wrote:
maybe i'm stupid...but slug could've just said its a FIFO stack..

If it was FIFO it wasn't a stack, it was a queue.

And by the way, say LIFO, FILO is just weird. Rolling Eyes

_________________
"Two things are infinite: the universe and human stupidity, but I'm still not sure about the first one."
Back to top
View user's profile Send private message
BanMe
Master Cheater
Reputation: 0

Joined: 29 Nov 2005
Posts: 375
Location: Farmington NH, USA

PostPosted: Mon Mar 16, 2009 5:54 pm    Post subject: Reply with quote

yes yes acronym semantics it would've lead the OP to a better understanding of stacks...FILO is the correct acronym..yet none of you could come up with the code... hmm why is that?
_________________
don't +rep me..i do not wish to have "status" or "recognition" from you or anyone.. thank you.
Back to top
View user's profile Send private message MSN Messenger
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Mon Mar 16, 2009 6:02 pm    Post subject: Reply with quote

perhaps because i have him on msn and helped him there instead ? why you being a dick all of a sudden.. just because irwin was an asshole to you doesn't mean you have to vent your frustration on everyone else
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 programming All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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