 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
SwaggaJackin' Master Cheater
Reputation: 2
Joined: 06 Nov 2009 Posts: 312
|
Posted: Sat Jul 23, 2011 5:05 pm Post subject: Auto assemble script help, AOB scan adding a register addres |
|
|
I'm working with a few .NET games, however it's difficult for me to find exact pointers to memory addresses because there are so many and I'm unable to run the pointer scanner without my system coming to a screeching hault from the ram being used.
However, I have found a work around. I can AOB scan for the instruction that writes to the address I want. While this works fine, I have to manually toggle a breakpoint at the instruction, and manually add the address that is located in the register address. I'm wondering if there is a way to automate this using Cheat Engine's assembly script or the lua engine.
E.G.
I do a AOB scan for:
| Code: |
aobscan(my_instruction,66 0F D6 07 xx xx xx xx xx 3B 58 04)
|
'my_instruction' returns the address 03D66640 with the following instruction:
Now my question is, is it possible to add the pointer address that is given by EDI+2C either through assembly script or the Lua engine to cheat address list and if so, how is this done?
Hope I explained my dilemma well enough, thanks.
|
|
| Back to top |
|
 |
Geri Moderator
Reputation: 112
Joined: 05 Feb 2010 Posts: 5627
|
Posted: Sat Jul 23, 2011 6:18 pm Post subject: |
|
|
You can save the address on an allocated memory location so you will not have to search for it. You can use globalalloc for example. Allocate 4 or 8 bytes depending on how much you need, save the address on your allocated memory and add your allocated memory to the table which will always show the address in your code.
_________________
|
|
| Back to top |
|
 |
SwaggaJackin' Master Cheater
Reputation: 2
Joined: 06 Nov 2009 Posts: 312
|
Posted: Sat Jul 23, 2011 6:19 pm Post subject: |
|
|
| Example of this? Still not understanding how to grab the address from the register without manually breaking and looking at the register with what you described. Thanks.
|
|
| Back to top |
|
 |
Geri Moderator
Reputation: 112
Joined: 05 Feb 2010 Posts: 5627
|
Posted: Sat Jul 23, 2011 8:35 pm Post subject: |
|
|
I mean like add this to the general part
| Code: | | globalalloc(youraddress,4) |
then in the newmem section
| Code: | push eax
lea eax,[edi+2C]
mov [youraddress],eax
pop eax |
And if you have enabled the script, add a new address to your table and instead of address, type in "youraddress". If you save that table, you will just need to enable the script and if the code has ran at least once, youraddress will store the address that you need. Of course only if the code is not shared. And if the address is 8 bytes, modify the script according to that.
_________________
|
|
| Back to top |
|
 |
SwaggaJackin' Master Cheater
Reputation: 2
Joined: 06 Nov 2009 Posts: 312
|
Posted: Sat Jul 23, 2011 9:54 pm Post subject: |
|
|
I'll have to add the address as a pointer correct?
Seems to work that way.
EDIT:
Ah, forgot to registersymbol(gold_address) so cheat engine would recognize it.
Thanks.
Here's what I came up with:
| Code: |
[enable]
alloc(newmem,2048) //2kb should be enough
alloc(gold_address,4)
label(memjump)
label(returnhere)
registersymbol(memjump)
registersymbol(gold_address)
aobscan(gold_dec,29 50 2C 8B 85 74 C0 FF FF 8B 88 28 01 00 00 39)
newmem:
push eax
lea eax,[eax+2c]
mov [gold_address],eax
pop eax
sub [eax+2C],edx
mov eax,[ebp-00003F8C]
jmp returnhere
gold_dec:
memjump:
jmp newmem
nop
nop
nop
nop
returnhere:
[disable]
memjump:
sub [eax+2C],edx
mov eax,[ebp-00003F8C]
unregistersymbol(memjump)
|
|
|
| Back to top |
|
 |
Geri Moderator
Reputation: 112
Joined: 05 Feb 2010 Posts: 5627
|
Posted: Sat Jul 23, 2011 10:45 pm Post subject: |
|
|
Globalalloc is doing an alloc + a registersymbol in one command. That's why I didn't say it. So if you use globalalloc for an allocation, you don't need to use registersymbol. But both solution is just fine.
_________________
|
|
| Back to top |
|
 |
SwaggaJackin' Master Cheater
Reputation: 2
Joined: 06 Nov 2009 Posts: 312
|
Posted: Sat Jul 23, 2011 10:49 pm Post subject: |
|
|
| Oh, I missed that, okay well thanks!
|
|
| Back to top |
|
 |
Pingo Grandmaster Cheater
Reputation: 8
Joined: 12 Jul 2007 Posts: 571
|
Posted: Sun Jul 24, 2011 5:32 am Post subject: |
|
|
Plus you wont need to allocate more memory.
alloc(newmem,2048)//not needed
alloc(gold_address,4) //Will actually allocate enough to do whatever is needed.
I dont use ce for scripts anymore but to clean up your script alittle, you could try something like
| Code: | [Enable]
globalalloc(Storage,128)
aobscan(iResult,29502C8B8574C0FFFF8B882801000039)
label(iDefault)
registersymbol(iDefault)
iResult:
iDefault:
jmp Storage
db 90 90 90 90
Storage:
mov [Storage+14],eax
sub [eax+2C],edx
mov eax,[ebp-00003F8C]
jmp iDefault+9
[Disable]
iDefault:
sub [eax+2C],edx
mov eax,[ebp-00003F8C]
unregistersymbol(iDefault) |
So your pointer would be
Storage+14 offset 2C
Or push pop so you wont need to add the offset like geri suggested.
_________________
|
|
| 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
|
|