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 


ASSEMBLY HELP!

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
biex
How do I cheat?
Reputation: 0

Joined: 30 Jan 2012
Posts: 5

PostPosted: Wed Mar 14, 2012 3:51 am    Post subject: ASSEMBLY HELP! Reply with quote

Hello there, I'm converting my LUA script into Assembly because LUA is basically not fast enough for what I'm doing, I have a found a loop in the game that is called quite so often and I have a JMP to a code-cave.

Now I have two questions regarding assembly, the first should be quite straight-forward.

1) How do I read a multi-level pointer in assembly?

Pointer: [[["game.exe"+0053365C]+454]+84]+44

I'd hope something easy like this would work:

mov eax,["game.exe"+0053365C]
mov eax,[eax+454]
mov eax,[eax+84]
mov eax,[eax+44]

and now [eax] should be the value of my pointer?
I'm unable to verify this without a debugger due to the game's anti-cheat



2) How to write to protected memory using assembly?

So I'd like to modify my code-cave during run-time,
but of course this results in an unhandled exception and game closes..

mov eax,[codecaveaddress+0]
mov byte ptr [eax], 01h

I know theres something like VirtualProtect which allows you to write to protected memory, but thats as far as my knowledge goes..

Does anyone know how to write inside the code section of a game? thanks

EDIT: I should also mention that I "probably" cannot use WriteProcessMemory because of the anti-cheat..

EDIT: I found out how to write to protected memory, wasn't that difficult after all, but I'm still unsure about pointers! Any help would be appreciated, thanks!

EDIT: I've finally figured it out.. But of course the game crashes when it reads invalid pointers, so I need to find a way to verify that the pointers are readable without causing a crash. I'm looking into IsBadxxxPtr atm

EDIT: It's hard to explain how happy I am right now, that I finally got LUA out of the equation and now I have an instant auto-shoot script in pure assembly.
Creating the autoshoot script wasn't that difficult with LUA, but converting it into ASM proved unpredictably challenging. All hell broke loose once I had to control multi-level pointers that often pointed to unread-able memory. I'm considering writing a Tutorial as I haven't been able to find any information regarding this problem on the forums nor on google (imagine that!).

If you are about to do the same thing as me, feel free to ask me any questions until I finish my tutorial!
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