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 


GetAsyncKeyState in CE

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
JohnT
Expert Cheater
Reputation: 0

Joined: 24 May 2011
Posts: 130
Location: Next To Osama

PostPosted: Wed Jul 27, 2011 10:27 pm    Post subject: GetAsyncKeyState in CE Reply with quote

Well i saw a script like that

pushfd
pushad
push '1'
call GetAsyncKeyState
shr ax,#15
cmp ax,1
popad
jne originalcode
add [eax+08],5000

originalcode:
popfd
cmp [eax+08],ebx
setg al

well i want to ask something
the call GetAsyncKeyState

the GetAsyncKeyState it has an address which when i restart a game it changes
Could someone tell me how to make it not to change because i need to put it in my trainer

_________________
<a href="http://forgifs.com" target="_blank"><img src="http://forgifs.com/gallery/d/168503-3/Rocket_launcher_reaction.gif?" alt="forgifs.com" /></a>
Back to top
View user's profile Send private message Yahoo Messenger
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25785
Location: The netherlands

PostPosted: Wed Jul 27, 2011 10:36 pm    Post subject: Reply with quote

if it is a cheat engine trainer you won't have to as ce knows what you mean with GetAsyncKeyState

But if you really want to find the base address of user32.dll in the target process and your own process (usually the same, but if your exe loads at the address user32.dll is loaded it will be different)

Now find the address of GetAsyncKeyState in your own app and substract the base address of your user32.dll base

add that difference to the target app's user32.dll and you'll have the address

Now adjust the relative call to point to the address you have calculated, or use a non relative call (10 bytes instead of just 5)

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
JohnT
Expert Cheater
Reputation: 0

Joined: 24 May 2011
Posts: 130
Location: Next To Osama

PostPosted: Wed Jul 27, 2011 11:23 pm    Post subject: Reply with quote

didnt get it

i enable the cheat and then i had those bytes
E8 91C05872

this address
7742C09A

this address in the begging of the GetAsyncKeyState ?
if yes then why when i go to address user32.dll it shows me ordinal xxx
with the address

77420000

_________________
<a href="http://forgifs.com" target="_blank"><img src="http://forgifs.com/gallery/d/168503-3/Rocket_launcher_reaction.gif?" alt="forgifs.com" /></a>
Back to top
View user's profile Send private message Yahoo Messenger
Geri
Moderator
Reputation: 111

Joined: 05 Feb 2010
Posts: 5636

PostPosted: Thu Jul 28, 2011 2:39 am    Post subject: Reply with quote

If you want to see the address of GetAsyncKeyState, just open the memory view, right-click in the disassembler view or in the hex view, choose Go to address and type in "getasynckeystate" (lower case doesn't matter). CE will jump there.

Another method is to use the "Memory View -> View -> Enumerate DLLs and Symbols" option in CE. It will open up a new window where you can see the symbols that are detected by CE, inlcuding GetAsyncKeyState. Just press CTRL+F, type in the name and CE will jump there in the tree. Then if you double-click on it, it will jump there in the disassembler view.

Anyway, regardless which method do you use, the hex view will show the module name where the API is (as well as the DLL list with the address of the dll) and if you type in user32.dll in the goto address field, CE will jump there.

So on the attached picture, the base address of user32.dll is 7E360000 and GetAsyncKeyState is at 7E37A78F and if you calculate the offset, you get "USER32.dll"+1A78F.



enumerate_dlls.jpg
 Description:
 Filesize:  383.46 KB
 Viewed:  7076 Time(s)

enumerate_dlls.jpg



_________________
My trainers can be found here: http://www.szemelyesintegracio.hu/cheats

If you are interested in any of my crappy articles/tutorials about CE and game hacking, you can find them here:
http://www.szemelyesintegracio.hu/cheats/41-game-hacking-articles

Don't request cheats or updates.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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