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 


Cheat Engine Crash - troubleshooting

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
crislivinitup
Cheat Engineer
Reputation: 0

Joined: 08 Feb 2007
Posts: 19

PostPosted: Wed Feb 21, 2007 3:37 am    Post subject: Cheat Engine Crash - troubleshooting Reply with quote

I learned some stuff about assembly and gamehacking and I have been trying to make a trainer for titan quest. I have decided to go about hacking it in a very interesting way - though some of you may have seen it before, I haven't. To defeat DMA I have tried to find the base pointer however this was to no avail so I have a different approach:
first I found the address of xp by changing some values. Then I searched what writes to that value and came up with 009d80cb add [esi+34], eax.
Through other investigations I found that attribute points is stored at [ecx+38] and skill points at [ecx+3c]. I'm gonna organize it better to help you help me.
experience [esi+34] @ address 009d80cb
attribute pts [ecx+38]
skill pts. [ecx+3c]
in all cases, esi and ecx are the same value. the pointer. so I figure if I find esi for experience, I can add 38 to get to attribute points because attribute points are harder to modify to narrow a search.
What I've done is modify the code at 009d80cb to jump to a code cave and in the code cave I wrote the following:
add [esi+34],eax ; keep the original code there
mov [known address], esi
jmp 009d80ce ; the address where I need to return
the point of this cave was to write the value of the pointer to a location which is static and that I could find easily.
The problem is when I run this code the game crashes
HOWEVER
Mr. Dark Byte's Cheat Engine has an option in memory view that when you right click you can select "make page writable" from the drop down options. when I do this the trainer works fine. I want to know how this "make page writable" button works. I notice it changes the region size. If you could tell me I'd be very appreciate. The thing is that the trainer doesn't write the value of the pointer to the location, the program does by itself from the code I wrote and when it tries to do this the program will crash if this "make page writable" option has not been clicked. The trainer is for my father and he does not know how to use CE. I would like to make my trainer independent completely.

1. How can I mimic "make page writable" feature in my trainer?

2. Can I make my trainer allocate memory in a specific known location that I can write code to write to?


-Any help on this matter is greatly welcome and appreciated Smile.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 475

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

PostPosted: Wed Feb 21, 2007 4:26 am    Post subject: Reply with quote

is it a ce generated trainer or one written by yourself? (aa scripts support (fullacess(address) and alloc(xxx,xx))

for a self written trainer make use of virtualprotectex to make a memory region writable and even executable
and use virtualallocex to allocate a region of memory for your own code (don't forget to set it to executable)

_________________
Tools give you results. Knowledge gives you control.

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

Joined: 08 Feb 2007
Posts: 19

PostPosted: Wed Feb 21, 2007 4:28 am    Post subject: Reply with quote

one generated by ce.

anyway to mimic that button "make page writable"?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 475

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

PostPosted: Wed Feb 21, 2007 4:36 am    Post subject: Reply with quote

let it execute a script with the line fullaccess(address)

also, I recommend using alloc(mycodecave,1024) instead of picking one out of memory yourself.

_________________
Tools give you results. Knowledge gives you control.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Dark Byte
Site Admin
Reputation: 475

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

PostPosted: Wed Feb 21, 2007 4:42 am    Post subject: Re: Cheat Engine Crash - troubleshooting Reply with quote

Actually, I see your real problem
crislivinitup wrote:

009d80cb add [esi+34], eax.

What I've done is modify the code at 009d80cb to jump to a code cave and in the code cave I wrote the following:
add [esi+34],eax ; keep the original code there
mov [known address], esi
jmp 009d80ce ; the address where I need to return


The jump is probably 5 bytes long (unless you found a cave big enough within 128 byte radius)
so the jmp 009d80ce will jump INSIDE the jmp to the codecave (and executing whatever stuff is in there)
I recommend selecting 009d80cb , go to autoassembler->template->code injection, and click ok (that address should be filled in)
That will generate a script for you with the proper ammount of instructions saved needed for the 5 bytes, and even jump for you and allocate memory

and do fullaccess(knownaddress) to make sure that the address you're writing to is writable. Or even use alloc(knownaddress,4) followed by registersymbol(knownaddress) so that word can be used as a address

_________________
Tools give you results. Knowledge gives you control.

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

Joined: 08 Feb 2007
Posts: 19

PostPosted: Wed Feb 21, 2007 4:50 am    Post subject: Reply with quote

Quote:
with the line fullaccess(address)

I'm not sure what you mean is "fullaccess(address)" a vb instruction:S. I would like to know how to do this in asm because i am more familiar with that and I could add some opcodes to my codecave to fix this. i also don't know how to do it with ce's trainer maker. if there is a tutorial to help me out with that then feel free to direct me, I'm here to learn. also is there any way to allocate memory in the trainer at a fixed address so I can write the pointer value to a known address and reference it for the other part of my code (to modify attribute and skill points).
Can you explain more to me about what "make page writable" does and about page writing access? As much detail as possible would be appreciated and it would help me learn.

Quote:
jmp 009d80ce

that is a typo, I was too lazy to go back to my trainer and actually see where I jumped back to. I actually jumped somewhere completely different because the command right after 009d80cb jumps to a different location to I jumped to that location instead. my mistake. Can you elaborate on fullaccess(knownaddress)? What language is it (so I can do a little research later) and can it be written in asm/opcodes?

-Thank you for your time Smile
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 475

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

PostPosted: Wed Feb 21, 2007 6:15 am    Post subject: Reply with quote

it's part of ce's autoassembler language.
it makes the page writable.

and no, ce can not allocate memory at fixed addresses, it only gets random addresses.
I really recommend using the template for this though and use makewritable on 00400500 and make that your known address

_________________
Tools give you results. Knowledge gives you control.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
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