Busted Posted May 16, 2009 Posted May 16, 2009 Hi all,Whilst I am coding my first keygen me, I thought I might experiment with a bit of simple xor encryption. I have done a bit of research and want to double check to see if I understand this, example code below:mov eax, 15mov ecx, 20xor eax, ecxmov eax, offset Bufferxor eax, eaxxor ecx, ecxNow... 15 xor 20 = 27, therefore would 27 be stored in the buffer according to this code?!?Cheers, Tipidy
evlncrn8 Posted May 16, 2009 Posted May 16, 2009 Hi all,Whilst I am coding my first keygen me, I thought I might experiment with a bit of simple xor encryption. I have done a bit of research and want to double check to see if I understand this, example code below: mov eax, 15mov ecx, 20xor eax, ecxmov eax, offset Bufferxor eax, eaxxor ecx, ecx Now... 15 xor 20 = 27, therefore would 27 be stored in the buffer according to this code?!? Cheers, Tipidy erm nope it wont... considering you haven't even written to the buffer mov eax, 15 ; eax now 15mov ecx, 20 ; ecx now 20xor eax, ecx ; eax now is 15 ^ 20mov eax, offset Buffer ; eax is now pointing to the buffer (you just killed the xor result here)xor eax, eax ; eax = 0xor ecx, ecx ; ecx = 0 you to write it into the buffer (assuming the buffer is 4kb or more..) like this mov eax, offset Buffermov dword ptr [eax], (15 xor 20); this is the hard coded way think you need to learn assembly code a bit more
Busted Posted May 16, 2009 Author Posted May 16, 2009 @evlncrn8 Thank you, I should of tested some code before posting it my bad. But yeah your right, I do still have a bit to learn on assembly but I am getting there slowly mov eax, offset buffermov dword ptr [eax], (15 xor 20) Cheers, Tipidy
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now