Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Byte Modification

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
dharmang1910
Expert Cheater
Reputation: 0

Joined: 09 May 2010
Posts: 102

PostPosted: Wed Nov 14, 2018 11:52 pm    Post subject: Byte Modification Reply with quote

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
View user's profile Send private message
OldCheatEngineUser
Whateven rank
Reputation: 20

Joined: 01 Feb 2016
Posts: 1586

PostPosted: Thu Nov 15, 2018 6:46 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
dharmang1910
Expert Cheater
Reputation: 0

Joined: 09 May 2010
Posts: 102

PostPosted: Thu Nov 15, 2018 6:55 am    Post subject: Reply with quote

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
View user's profile Send private message
OldCheatEngineUser
Whateven rank
Reputation: 20

Joined: 01 Feb 2016
Posts: 1586

PostPosted: Thu Nov 15, 2018 7:22 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
dharmang1910
Expert Cheater
Reputation: 0

Joined: 09 May 2010
Posts: 102

PostPosted: Thu Nov 15, 2018 7:42 am    Post subject: Reply with quote

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
View user's profile Send private message
OldCheatEngineUser
Whateven rank
Reputation: 20

Joined: 01 Feb 2016
Posts: 1586

PostPosted: Thu Nov 15, 2018 7:55 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
dharmang1910
Expert Cheater
Reputation: 0

Joined: 09 May 2010
Posts: 102

PostPosted: Thu Nov 15, 2018 8:56 am    Post subject: Reply with quote

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
View user's profile Send private message
OldCheatEngineUser
Whateven rank
Reputation: 20

Joined: 01 Feb 2016
Posts: 1586

PostPosted: Thu Nov 15, 2018 9:04 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites