View previous topic :: View next topic |
Author |
Message |
lamafao Expert Cheater
Reputation: 1
Joined: 17 Apr 2013 Posts: 130
|
Posted: Mon May 05, 2014 8:30 pm Post subject: Instruction can't be compiled |
|
|
Why am i getting an error? everything look good? It's a 64bit game.
Also i can add an address with 1 offset, if theres more it wont let me compile!
Edit: Just tried to inject a code without doing this, and my script doesn't turn on, like it can't find the address, but i know i have the right address.
Edit2: I realize that edi is not the thing to use, right now when i use this it moves the right value to X but some of it goes to y, or it's just a weird thing. I have never used assembler with 64bit, how do i move double into x?
Code: | [ENABLE]
alloc(newmem,2048,"sir_v1.0.exe"+6CADE9) //why is there an address in mem alloc?
label(returnhere)
label(originalcode)
label(x)
label(y)
label(z)
registersymbol(x)
registersymbol(y)
registersymbol(z)
newmem:
push rdx
mov rdx,["sir_v1.0.exe"+00CE0428]
mov rdx,[rdx+28]
mov rdx,[rdx+F8]
mov rdx,[rdx+0]
mov rdx,[rdx+150]
mov [x],rdx
pop rdx
jmp originalcode
originalcode:
mov rax,[rsi+00000150]
jmp returnhere
x:
dd 0
y:
dd 0
z:
dd 0
"sir_v1.0.exe"+6CADE9:
jmp newmem
nop
nop
returnhere:
[DISABLE]
dealloc(newmem)
unregistersymbol(x)
unregistersymbol(y)
unregistersymbol(z)
"sir_v1.0.exe"+6CADE9:
mov rax,[rsi+00000150]
|
|
|
Back to top |
|
 |
foxfire9 Advanced Cheater
Reputation: 0
Joined: 23 Mar 2012 Posts: 57
|
Posted: Tue May 06, 2014 12:40 am Post subject: |
|
|
I hope the new version of CE accepts the multiple brackets.
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25788 Location: The netherlands
|
Posted: Tue May 06, 2014 1:34 am Post subject: |
|
|
You could just write the address of rsi+150 and then use a pointer to read it out
Anyhow, mov [x],rdx writes the 8 byte value in rdx into x
A double is 8 bytes so that is fine.
Note though that dd only reserves 4 bytes. You probably want to use dq instead
Quote: |
I hope the new version of CE accepts the multiple brackets.
|
It does support it but most likely there is one bracket too many (the last +xxx must not have a bracket unless the last one is actually +0)
Also, bracket addresses are useless as they will not update during runtime, which defeats the purpose of them. Use code to update it dynamically
_________________
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 |
|
 |
foxfire9 Advanced Cheater
Reputation: 0
Joined: 23 Mar 2012 Posts: 57
|
Posted: Tue May 06, 2014 2:34 am Post subject: |
|
|
O_O So, that's why it doesn't compile.
|
|
Back to top |
|
 |
lamafao Expert Cheater
Reputation: 1
Joined: 17 Apr 2013 Posts: 130
|
Posted: Tue May 06, 2014 9:44 am Post subject: |
|
|
Thanks for the answers i tried mov rdx,[[[["sir_v1.0.exe+00CE0428"]+28]+F8]+0]+140, but it still doesn't work.
Code: | Works
["sir_v1.0.exe"+00CE0428]+28
and
[["sir_v1.0.exe"+00CE0428]+28]
Doesn't work
[["sir_v1.0.exe"+00CE0428]+28]+F8
and
[[["sir_v1.0.exe"+00CE0428]+28]+F8]
|
Dark Byte wrote: | You could just write the address of rsi+150 and then use a pointer to read it out
Also, bracket addresses are useless as they will not update during runtime, which defeats the purpose of them. Use code to update it dynamically |
Could you tell me more about this? Maybe a simple example?
|
|
Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Tue May 06, 2014 11:17 am Post subject: |
|
|
|
|
Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Tue May 06, 2014 11:25 am Post subject: |
|
|
Try adding extra 0's to the hex values. I have issues with it sometimes when a leading 0 is not present. Like this:
Code: |
[["sir_v1.0.exe"+00CE0428]+028]+0F8
[[["sir_v1.0.exe"+00CE0428]+028]+0F8]
|
_________________
- Retired. |
|
Back to top |
|
 |
lamafao Expert Cheater
Reputation: 1
Joined: 17 Apr 2013 Posts: 130
|
Posted: Tue May 06, 2014 11:49 am Post subject: |
|
|
atom0s wrote: | Try adding extra 0's to the hex values. I have issues with it sometimes when a leading 0 is not present. Like this:
Code: |
[["sir_v1.0.exe"+00CE0428]+028]+0F8
[[["sir_v1.0.exe"+00CE0428]+028]+0F8]
|
|
Just tried that, still doesn't work.
I decided to use aobscan and just compare player/mob for now
|
|
Back to top |
|
 |
STN I post too much
Reputation: 43
Joined: 09 Nov 2005 Posts: 2676
|
Posted: Tue May 06, 2014 12:14 pm Post subject: |
|
|
Quote: | Edit2: I realize that edi is not the thing to use, right now when i use this it moves the right value to X but some of it goes to y, or it's just a weird thing. I have never used assembler with 64bit, how do i move double into x?
|
Because the value is double so the rest of the value is written into y because it is right after x in memory. Do as DB suggested, use DQ like
x:
dq 0 or you could just reserve two double dwords
x:
dd 0
dd 0
You write to double like any other datatype except its double dword so you have to write to both dwords. Add an address as double in CE then open the hex viewer at that location and notice how the hex changes in CE hex viewer to get an idea how you need to write to a double. Its basically like this
mov [x], dwordval
mov [x+4], dwordval
Can't be arsed to give a proper example but thats basically it. You have to consider little endian format.
As for your first problem, asm mov only allows one indirect memory access (the inside brackets thing) and CE calculates that automatically for you but the result is a hard-coded address (static address!) which will fail upon restart of game etc. The solution as DB suggested is to read the value and use it dynamically.
I don't know what you are trying to do exactly but your brackets problem ([[["sir_v1.0.exe"+00CE0428]+28]+F8] ) can be solved simply with this
push eax - update to 64bit registers, i am just giving an example
mov eax, ["sir_v1.0.exe"+00CE0428]
mov eax, [eax+28]
and so on until you reach the desired offset
...
pop eax
Make sure you check for dead pointers or there will be nasty crashes as you try to read from an empty address.
I wish CE was more strict in asm syntax then we will not have questions like these but then it wouldn't be so noob friendly.
_________________
|
|
Back to top |
|
 |
lamafao Expert Cheater
Reputation: 1
Joined: 17 Apr 2013 Posts: 130
|
Posted: Tue May 06, 2014 1:29 pm Post subject: |
|
|
STN wrote: | I don't know what you are trying to do exactly but your brackets problem ([[["sir_v1.0.exe"+00CE0428]+28]+F8] ) can be solved simply with this
push eax - update to 64bit registers, i am just giving an example
mov eax, ["sir_v1.0.exe"+00CE0428]
mov eax, [eax+28]
and so on until you reach the desired offset
...
pop eax
Make sure you check for dead pointers or there will be nasty crashes as you try to read from an empty address. |
I am trying to save my x/y/z so im able to save my coordinates and then move enemies into my coordinates.
I have tried your method, and yes it works. But for now i am using aobscan and comparing player/enemy, but as always it's incredibly hard to find differences and it's very annoying..
|
|
Back to top |
|
 |
|