 |
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
Amami De Kaito Expert Cheater
Reputation: 5
Joined: 06 Feb 2013 Posts: 110 Location: 3/44
|
Posted: Wed Dec 11, 2013 4:44 am Post subject: [HELP] How to use ReadMem? |
|
|
This is code
Code: | [ENABLE]
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)
aobscan(Health,8B 83 80 04 00 00 3D ?? ?? ?? ?? 75 2C)
registersymbol(Health)
readmem(Health,13)
newmem:
mov [ebx+00000480],000003E8
originalcode:
mov eax,[ebx+00000480]
exit:
jmp returnhere
Health:
jmp newmem
nop
returnhere:
[DISABLE]
unregistersymbol(Health)
dealloc(newmem)
Health:
readmem(Health,13) <<< Error code
//db 8B 83 80 04 00 00 |
But I'm click Assign to current cheat table is Error line. Please help. |
|
Back to top |
|
 |
Barrin Newbie cheater
Reputation: 0
Joined: 08 Sep 2008 Posts: 15 Location: The Netherlands
|
Posted: Wed Dec 11, 2013 7:08 am Post subject: |
|
|
2 messages below you there is an explenation Dark Byte gives about readmen or at least a part that it can be used for (I was the topic starter).
forum.cheatengine.org/viewtopic.php?t=570045
*hiss can't post links yet*
As the last post of me says (with a shitload of edits).
Barrin wrote: |
Edit5:
Modified the code again, just added 2 more wildcards, seems like it should always work like this. Again will only be able to tell if it works after further testing but I have more hope in it working than before. Even though it's still telling me Not all code is injectable. Error on Line 9 (Readmem( 00000000, 22)): The memory at 00000000 could not be fully read) Are you sure you wan't to edit it to this. Do not give me such a message if the AA script works and injects without problems as well as restores without problems. |
I want to ask did you ask if the script works since my script works even though it gives that error (which might be the same error your AA gives when you okay it).
Last edited by Barrin on Wed Dec 11, 2013 7:27 am; edited 2 times in total |
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25778 Location: The netherlands
|
Posted: Wed Dec 11, 2013 7:09 am Post subject: |
|
|
Readmem must be done from a valid address. Here you read it into 00000000.
You must allocate some memory to read into.
Code: |
AddressToReceiveBytes:
Readmem(addresstoreadfrom, count)
|
_________________
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 |
|
 |
Amami De Kaito Expert Cheater
Reputation: 5
Joined: 06 Feb 2013 Posts: 110 Location: 3/44
|
Posted: Wed Dec 11, 2013 7:23 am Post subject: |
|
|
Dark Byte wrote: | Readmem must be done from a valid address. Here you read it into 00000000.
You must allocate some memory to read into.
Code: |
AddressToReceiveBytes:
Readmem(addresstoreadfrom, count)
|
|
I don't understand. |
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25778 Location: The netherlands
|
Posted: Wed Dec 11, 2013 7:38 am Post subject: |
|
|
Readmem writes the bytes it reads to the current write pointer.
Your first readmem doesn't have a proper write pointer set yet
Also, your disable section needs to read the original bytes from somewhere. Right now you're reading from the modified bytes into modified bytes(won't do anything) _________________
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 |
|
 |
Amami De Kaito Expert Cheater
Reputation: 5
Joined: 06 Feb 2013 Posts: 110 Location: 3/44
|
Posted: Wed Dec 11, 2013 10:02 am Post subject: |
|
|
Very nice thank you Dark Byte!!!
PS. Cheat table script by SteveAndrew.
Code: | [enable]
alloc(InfiniteMoneyEtc,1024)
aobscan(MoneyEtcAddress,0f 57 c0 0f 29 00 5d c2 04 00 8b 41 x c3 cc)
label(SetMoney)
label(SetBombs)
label(SetPistolAmmo)
label(Exit)
registersymbol(InfiniteMoneyEtc)
registersymbol(MoneyEtcAddress)
InfiniteMoneyEtc+200: // << This is offset?
readmem(MoneyEtcAddress+0a,5)
InfiniteMoneyEtc:
push ebx
mov ebx,InfiniteMoneyEtc
movzx ebx,byte [ebx+202] // <<< This is offset for InfiniteMoneyEtc?
cmp esi,1 //money
je SetMoney
cmp esi,5 //smoke bombs
je SetBombs
cmp esi,b //pistol ammo
je SetPistolAmmo
cmp esi,20
je SetPistolAmmo
cmp esi,29
jb Exit
cmp esi,31
ja Exit
//wood, metal, cloth, rum, sugar, unknown, heavy shot ammo,
//mortar shot ammo, & fire barrels!! :D
mov eax,#9999
mov [ecx+ebx],eax // <<< mov [ecx+ebx],eax originalcode by mov [ecx+0C],eax
pop ebx
ret
Exit:
mov eax,[ecx+ebx] // <<< mov eax,[ecx+ebx] originalcode by mov eax,[ecx+0C]
pop ebx
ret // <<< Return???
SetMoney:
mov eax,#999999999
mov [ecx+ebx],eax
pop ebx
ret
SetBombs:
mov eax,5
mov [ecx+ebx],eax
pop ebx
ret
SetPistolAmmo:
mov eax,0a //10 bullets is a good number if you didn't have any ;)
mov [ecx+ebx],eax
pop ebx
ret
MoneyEtcAddress+0a:
jmp InfiniteMoneyEtc
[disable]
MoneyEtcAddress+0a:
readmem(InfiniteMoneyEtc+200,5)
//db 8b 41 0c c3 cc
//mov eax,[ecx+0c]
//ret
//int 3
dealloc(InfiniteMoneyEtc)
unregistersymbol(InfiniteMoneyEtc)
unregistersymbol(MoneyEtcAddress) |
|
|
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
|
|