To encrypt it back, just reverse what you done to encrypt it.Quote:
Originally posted by Nitrometano@Dec 9 2005, 06:17
is it able to decrypt/encrypt back with new data?
-Get byte from location CounterA from Monster.txt (ByteA)
-Let ByteC = ByteA
-Bitwise Shift right ByteA by (8 - CounterC)
-Bitwise Shift left ByteC by CounterC
-ByteA = ByteA + ByteC
-Get byte from location CounterB from the decryption key (ByteB).
-XOR ByteA, ByteB
-Result = ByteA
or in asm
Code:
Dencrypt: xor ByteA, ByteB ror ByteA, CounterC Encrypt: rol, ByteA, CounterC xor ByteA, ByteB