 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
Betcha Expert Cheater
Reputation: 4
Joined: 13 Aug 2015 Posts: 232 Location: Somewhere In Space
|
Posted: Mon Nov 02, 2015 4:05 am Post subject: Can't Assign Injection. |
|
|
Hello.
In GTA 3 have one address of money and it's base address.
When press , What writes to this address .. It show's like always results, but in this case, when do code injection can't assign to table, cause of this line -->
originalcode:
add [ebp*4+gta3.exe+54139C],eax
How can i edit this Code, to make any changes and assign it to table..?
This injection is picking up money, from dead body's.. And yeah, i waned to increase the stack drop rate or just amount of the value it picks up.
| Code: |
[ENABLE]
alloc(newmem,1024)
label(returnhere)
label(originalcode)
label(exit)
newmem:
originalcode:
add [ebp*4+gta3.exe+54139C],eax
exit:
jmp returnhere
"gta3.exe"+3132C:
jmp newmem
nop
nop
returnhere:
[DISABLE]
dealloc(newmem)
"gta3.exe"+3132C:
add [ebp*4+gta3.exe+54139C],eax
//Alt: db 01 04 AD 9C 13 94 00
|
|
|
| Back to top |
|
 |
Cake-san Grandmaster Cheater
Reputation: 8
Joined: 18 Dec 2014 Posts: 541 Location: Semenanjung
|
Posted: Mon Nov 02, 2015 6:36 am Post subject: |
|
|
ohh.. this problem,
I only have this problem when writing script for 32bit but not 64bit,strange
you can type it like this
| Code: |
originalcode:
imul ebp,4
add ebp,gta3.exe+54139C
add [ebp],eax
|
or this
| Code: |
originalcode:
push edx
mov edx,4
mul edx
mov edx,ebp
add edx,gta3.exe+54139C
add [edx],eax
pop edx
|
liked what Zanzer replied to my previous post
don't know if I'm typing it right -_-
or you can type it like this
| Code: |
originalcode:
db 01 04 AD 9C 13 94 00
|
liked what STN suggest in replying to my previous post
you can change the disassembly output in view setting inside memory viewer.
don't know if it solve your problem  _________________
...
Last edited by Cake-san on Mon Nov 02, 2015 8:19 am; edited 1 time in total |
|
| Back to top |
|
 |
Betcha Expert Cheater
Reputation: 4
Joined: 13 Aug 2015 Posts: 232 Location: Somewhere In Space
|
Posted: Mon Nov 02, 2015 7:42 am Post subject: |
|
|
With this
| Code: |
originalcode:
push edx
mov edx,4
mul edx
mov edx,ebp
add edx,gta3.exe+54139C
add [edx],eax
pop edx
|
Works if at the end i nop ''add [ebp*4+gta3.exe+54139C],eax'' and replace with ''db 01 04 AD 9C 13 94 00''
| Code: |
[DISABLE]
dealloc(newmem)
"gta3.exe"+3132C:
db 01 04 AD 9C 13 94 00
//add [ebp*4+gta3.exe+54139C],eax
//Alt: db 01 04 AD 9C 13 94 00
|
But i don't see how to modify that drop value.. Hmm..
------------------------------------------------------------------
This doesn't work.. if i add it .. in game while pick up money it doesn't count it, like i didn't even picked it up.
| Code: |
originalcode:
imul ebp,4
add ebp,gta3.exe+54139C
add [ebp],eax
|
|
|
| Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Mon Nov 02, 2015 7:58 am Post subject: |
|
|
It would actually be better if you moved your injection point up two instructions.
| Code: | imul ebp,ebp,4F
movzx eax,word ptr [esi+02]
mov eax,#1000 // set the money value; or
add eax,#123 // add to the money value |
Otherwise, you'll need to use the following to rewrite the original instruction:
| Code: | | reassemble("gta3.exe"+3132C) |
|
|
| Back to top |
|
 |
Betcha Expert Cheater
Reputation: 4
Joined: 13 Aug 2015 Posts: 232 Location: Somewhere In Space
|
Posted: Mon Nov 02, 2015 8:25 am Post subject: |
|
|
| Zanzer wrote: | It would actually be better if you moved your injection point up two instructions.
| Code: | imul ebp,ebp,4F
movzx eax,word ptr [esi+02]
mov eax,#1000 // set the money value; or
add eax,#123 // add to the money value |
Otherwise, you'll need to use the following to rewrite the original instruction:
| Code: | | reassemble("gta3.exe"+3132C) |
|
OHhhh.. I moved two instructions up, did changes, and it works....
Now each money stack comes with 2k bonus.
Maybe there is something i can read/watch about, to not be confused next time with similar problem? |
|
| Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Mon Nov 02, 2015 8:36 am Post subject: |
|
|
You would need to learn assembly language.
Notice the original bytes of the instruction: 01 04 AD 9C 13 94 00
The last 4 tell the computer where to find the address: gta3.exe+3132C
Those bytes are based on the current memory address of the instruction.
So you can't simply copy the bytes because you're changing the location of the instruction.
I'm assuming Cheat Engine couldn't interpret your script because of a little parsing bug. |
|
| Back to top |
|
 |
STN I post too much
Reputation: 43
Joined: 09 Nov 2005 Posts: 2676
|
Posted: Mon Nov 02, 2015 8:40 am Post subject: |
|
|
I don't know why CE has problems calculating complex offsets. Instead of writing (module+offset)"gta3.exe"+3132C, calculate the address of "gta3.exe"+3132C yourself and it should work.
To do that, just go to (CTRL+G in mem viewer) "gta3.exe"+3132C and when there, press CTRL+C and manually select and copy the address from the From field.
Or disable Showing Module Addresses (CTRL+M) and CE should copy the address then.
By the way, like Zanzer said you should use the earlier instructions if you plan to use AOB and make your trainer work for several versions. _________________
|
|
| Back to top |
|
 |
Betcha Expert Cheater
Reputation: 4
Joined: 13 Aug 2015 Posts: 232 Location: Somewhere In Space
|
Posted: Mon Nov 02, 2015 9:20 am Post subject: |
|
|
Thank you Cake-san, Zanzer, STN , For nice replay's.
Really Good information.  |
|
| Back to top |
|
 |
mgr.inz.Player I post too much
Reputation: 222
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Mon Nov 02, 2015 12:34 pm Post subject: |
|
|
Use double quotation mark around module name:
| Code: | | add [ebp*4+"gta3.exe"+54139C],eax |
CheatEngine's disassembler sometimes forgets it for certain instructions.
So, you have to fix that in ENABLE and DISABLE section.
Like this one:
| Code: | [ENABLE]
alloc(newmem,1024)
label(returnhere)
newmem:
mov eax,#10000
add [ebp*4+"gta3.exe"+54139C],eax
jmp returnhere
"gta3.exe"+3132C:
jmp newmem
nop
nop
returnhere:
[DISABLE]
dealloc(newmem)
"gta3.exe"+3132C:
add [ebp*4+"gta3.exe"+54139C],eax
|
_________________
|
|
| 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
|
|