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 


[Delphi] Spying a value in an API (without hooking)

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
h4c0r-BG
Master Cheater
Reputation: 0

Joined: 29 Nov 2006
Posts: 449
Location: The yogurt country

PostPosted: Sun Nov 23, 2008 11:24 am    Post subject: [Delphi] Spying a value in an API (without hooking) Reply with quote

I want to spy permanently the value of glDisable which it holds without hooking the function itself because it makes FPS LAG in the game.

I've been wondering if there is a nicer way to do do it like "only spying it" without modifying the original API code.

The function holds only one cardinal value.

void glDisable(
GLenum cap
);



Any sugestions?

_________________

Back to top
View user's profile Send private message
Flyte
Peanuts!!!!
Reputation: 6

Joined: 19 Apr 2006
Posts: 1887
Location: Canada

PostPosted: Sun Nov 23, 2008 6:06 pm    Post subject: Reply with quote

The only way I can think of off hand would be to scan the stack of the target process for an address that would be the return from the call.

i.e:
Code:
push cap
call glDisable
blah blah blah // Find this return address on stack


You can then pull the value off the stack based on that assumption. Keep in mind the stack gets overwritten a lot, and as a whole this method is just a novelty. You did ask for a way other than hooking, amirite?
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 Nov 24, 2008 12:34 pm    Post subject: Reply with quote

Code:

*(WORD*)GlDisable = 0xcc;
WaitForDebugEvent();
Back to top
View user's profile Send private message MSN Messenger
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Mon Nov 24, 2008 2:25 pm    Post subject: Reply with quote

BanMe wrote:
Code:

*(WORD*)GlDisable = 0xcc;
WaitForDebugEvent();

* ( BYTE * ) ?

_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
Back to top
View user's profile Send private message
Flyte
Peanuts!!!!
Reputation: 6

Joined: 19 Apr 2006
Posts: 1887
Location: Canada

PostPosted: Mon Nov 24, 2008 10:03 pm    Post subject: Reply with quote

samuri25404 wrote:
BanMe wrote:
Code:

*(WORD*)GlDisable = 0xcc;
WaitForDebugEvent();

* ( BYTE * ) ?


This is still hooking, so shouldn't even be considered.
Back to top
View user's profile Send private message
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Tue Nov 25, 2008 12:52 pm    Post subject: Reply with quote

Read the stacks of the call.
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
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