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 


Hi, regarding 'XOR'

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Stacktrace
Expert Cheater
Reputation: 1

Joined: 04 Jul 2015
Posts: 105

PostPosted: Thu May 12, 2016 12:47 pm    Post subject: Hi, regarding 'XOR' Reply with quote

Hello, I'm having some problems understanding the xor instructions. I heard it can encrypt values, is that right? I can't seem to add on what it actually does. Let's say the game uses 50 as health, there's a xor instruction under it. Would I then not be able to search for it? How does this all work..? Thanks! Razz
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4702

PostPosted: Thu May 12, 2016 2:58 pm    Post subject: Reply with quote

From wikipedia:
Quote:
A bitwise XOR takes two bit patterns of equal length and performs the logical exclusive OR operation on each pair of corresponding bits. The result in each position is 1 if only the first bit is 1 or only the second bit is 1, but will be 0 if both are 0 or both are 1. In this we perform the comparison of two bits, being 1 if the two bits are different, and 0 if they are the same. For example:
Code:
    0101 (decimal 5)
XOR 0011 (decimal 3)
  = 0110 (decimal 6)


This is sometimes used to encrypt values by using xor with a value and a constant number. For example, let's say your health is at 50 and you take 10 damage:
Code:
//get the value:
  mov edx,[esi+1C]    // edx == 3,007,978,837 (dec)
  xor edx,B34A1D67    // edx == 50 (dec)

//do something with it:
  sub edx,A          // edx == 40 (dec)

//store the value:
  xor edx,B34A1D67    // edx == 3,007,978,831 (dec)
  mov [esi+1C],edx

The value as it is stored in memory does not even closely resemble the value as it is treated by the game, and changes to said value in memory don't always reflect the changes the game actually makes to it. While this makes directly finding it more difficult, even beginners would still be able to easily figure it out if this is the only thing you do to encrypt a value.

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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