|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25287 Location: The netherlands
|
Posted: Wed Dec 07, 2005 10:39 pm Post subject: Using the registersymbol/unregistersymbol functions |
|
|
I am assuming you have read the info about auto assembler scripts in cheat tables: http://forum.cheatengine.org/viewtopic.php?t=4868
Let's continue with explaining the use of registersymbol and unregistersymbol.
When you have registered a symbol by either manually inputting it in the userdefined symbollist in the memory view, or by registering it by auto assemble script, you can then use it as if it is a normal address.
So, if you allocate some memory, and store a address there using the script, you can then easily access it by it's name.
Let's take a look at the auto assembler script of the pinball tutorial, and change it slightly:
Code: |
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
registersymbol(pointertoballs) //add "pointertoballs" to the userdefined symbollist
alloc(newmem,2048) //2kb should be enough
alloc(pointertoballs,4)
label(returnhere)
label(originalcode)
label(exit)
Pinball.exe+175b7:
jmp newmem
nop
returnhere:
newmem: //this is allocated memory, you have read,write,execute access
//place your code here
mov [pointertoballs],esi //store the base address to pointertoballs
originalcode:
mov [esi+00000146],eax
exit:
jmp returnhere
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
unregistersymbol(pointertoballs)
dealloc(newmem)
dealloc(pointertoballs)
Pinball.exe+175b7:
mov [esi+00000146],eax
|
as you see, I allocated 4 extra bytes to store the register value of esi in, and registered that address, and deallocate that memory in the disable part, and unregister it (so it becomes useless after disabling it)
I could have used:
Code: |
push eax
lea eax,[esi+146]
mov [pointertoballs],eax
pop eax
|
to store the exact address, but let's keep it easy for people with only a little assembler knowledge
One downside is of course that after enabling the script, the address doesn't immeadiatly hold the right value, but only after it has been executed. So keep that in mind.
Another thing is that addresses that use the symbolname pointertoballs only get updated after a few seconds, so the first few seconds it may be pointing at a old address. One way to get by this is rightclick and choose "force recheck symbols"
anyhow, when the script has been executed you can use it for all sorts of usefull things, like a base pointer...
Description: |
|
Download |
Filename: |
pinballassembler.CT |
Filesize: |
992 Bytes |
Downloaded: |
3988 Time(s) |
_________________
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 |
|
|
supea Master Cheater Reputation: 0
Joined: 29 Aug 2006 Posts: 323 Location: Finland
|
Posted: Tue Nov 14, 2006 8:11 am Post subject: |
|
|
i understand like half but nice i think ...
|
|
Back to top |
|
|
weirdokidxx How do I cheat? Reputation: 0
Joined: 29 Jan 2008 Posts: 9
|
Posted: Wed Apr 16, 2008 9:46 am Post subject: |
|
|
Thx!! now i know how!! ty ty ty ty ty ty tty ty ty t yyyy!!!
|
|
Back to top |
|
|
Chase Payne Grandmaster Cheater Reputation: 1
Joined: 20 Mar 2008 Posts: 533
|
Posted: Sat Apr 19, 2008 12:22 am Post subject: |
|
|
what does do?
|
|
Back to top |
|
|
elradur How do I cheat? Reputation: 0
Joined: 17 Jan 2007 Posts: 1
|
Posted: Tue Jul 29, 2008 3:23 am Post subject: RE: What does LEA do? |
|
|
Hello Folks, this is my first post
Cause I'm a little lazy I just post a definition / description of LEA
LEA - Load Effective Address
8D / r LEA r16,m Store effective address for m in register r16
8D / r LEA r32,m Store effective address for m in register r32
Description
Computes the effective address of the second operand (the source operand) and stores it in the first operand (destination operand). The source operand is a memory address (offset part) specified with one of the processors addressing modes; the destination operand is a general-purpose register. The address-size and operand-size attributes affect the action performed by this instruction, as shown in the following table. The operand-size attribute of the instruction is determined by the chosen register; the address-size attribute is determined by the attribute of the codesegment.
|
|
Back to top |
|
|
|
|
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
|
|