| View previous topic :: View next topic |
| Author |
Message |
dharmang1910 Expert Cheater
Reputation: 0
Joined: 09 May 2010 Posts: 102
|
Posted: Wed Nov 14, 2018 11:52 pm Post subject: Byte Modification |
|
|
Hi,
I am playing Rise of Industry game, which is 64 bit unity game. In this game i am fetching a money pointer from a code but the address i'm getting is 02153ED69810BB49 instead of 000002153ED69810. So is there any way to remove last 2 byte from the fetched address which is BB49?
|
|
| Back to top |
|
 |
OldCheatEngineUser Whateven rank
Reputation: 20
Joined: 01 Feb 2016 Posts: 1586
|
Posted: Thu Nov 15, 2018 6:46 am Post subject: |
|
|
| Code: | mov rax,02153ED69810BB49
and rax,ffffffffffff0000
mov [pointer],rax // must be qword |
_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
| STN wrote: | | i am a sweetheart. |
|
|
| Back to top |
|
 |
dharmang1910 Expert Cheater
Reputation: 0
Joined: 09 May 2010 Posts: 102
|
Posted: Thu Nov 15, 2018 6:55 am Post subject: |
|
|
| OldCheatEngineUser wrote: | | Code: | mov rax,02153ED69810BB49
and rax,ffffffffffff0000
mov [pointer],rax // must be qword |
|
Thanks for reply but i got result as 02153ED698100000 instead of 000002153ED69810 or just 2153ED69810 . Can you help me to do that?
|
|
| Back to top |
|
 |
OldCheatEngineUser Whateven rank
Reputation: 20
Joined: 01 Feb 2016 Posts: 1586
|
Posted: Thu Nov 15, 2018 7:22 am Post subject: |
|
|
| OldCheatEngineUser wrote: | | Code: | mov rax,02153ED69810BB49
and rax,ffffffffffff0000
shr rax,10
mov [pointer],rax // must be qword |
|
| Code: | mov rax,02153ED69810BB49
shr rax,10
mov [pointer],rax // must be qword |
no need to AND the address, shifting the bits is enough.
_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
| STN wrote: | | i am a sweetheart. |
|
|
| Back to top |
|
 |
dharmang1910 Expert Cheater
Reputation: 0
Joined: 09 May 2010 Posts: 102
|
Posted: Thu Nov 15, 2018 7:42 am Post subject: |
|
|
| OldCheatEngineUser wrote: | | OldCheatEngineUser wrote: | | Code: | mov rax,02153ED69810BB49
and rax,ffffffffffff0000
shr rax,10
mov [pointer],rax // must be qword |
|
| Code: | mov rax,02153ED69810BB49
shr rax,10
mov [pointer],rax // must be qword |
no need to AND the address, shifting the bits is enough. |
Thank you, it works. I got what i wanted. I think shr is used to half the amount for every shift but here it works as differently. Can you please explain this instruction or any suggestion where can i get complete info with example for shr??
|
|
| Back to top |
|
 |
OldCheatEngineUser Whateven rank
Reputation: 20
Joined: 01 Feb 2016 Posts: 1586
|
Posted: Thu Nov 15, 2018 7:55 am Post subject: |
|
|
you are pretty much welcome, and sorry for not reading carefully. (i thought you want last 16bits to be 0)
you can read intel's sofrware developer manual, SHR means shift bits to right.
it accept both register and memory location as destination operand, and CL register or immediate byte as source operand.
you said: half the amount, what do you mean?
_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
| STN wrote: | | i am a sweetheart. |
|
|
| Back to top |
|
 |
dharmang1910 Expert Cheater
Reputation: 0
Joined: 09 May 2010 Posts: 102
|
Posted: Thu Nov 15, 2018 8:56 am Post subject: |
|
|
| OldCheatEngineUser wrote: | | you said: half the amount, what do you mean? |
means shr 4,1 can gives you 2 so it can do half the amount of destination.
|
|
| Back to top |
|
 |
OldCheatEngineUser Whateven rank
Reputation: 20
Joined: 01 Feb 2016 Posts: 1586
|
Posted: Thu Nov 15, 2018 9:04 am Post subject: |
|
|
yes, SHR performs Unsigned-Divide by 2.
| OldCheatEngineUser wrote: | | it accept both register and memory location as destination operand, and CL register or immediate byte as source operand. |
it also accept one-operand-form
| Code: | | shr rax // if RAX is 8 then it will be 4 |
_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
| STN wrote: | | i am a sweetheart. |
|
|
| Back to top |
|
 |
|