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 _________________
Joined: 09 May 2003 Posts: 25785 Location: The netherlands
Posted: Wed Jul 27, 2011 10:36 pm Post subject:
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
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.
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