Created
March 31, 2019 04:52
-
-
Save levwu/23751fe47f83d42ed6a63280a4f2aaaa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from struct import pack, unpack | |
with open('memdump_AF0_01C90000_19a00.bin', 'rb') as f: | |
raw = f.read() | |
size = 0x19a00 | |
plain = "" | |
i = 0 | |
while i < size: | |
c = raw[i:i+4] | |
k = i + 0x3e9 | |
_c = (unpack("<I", c)[0] + i) & 0xFFFFFFFF | |
plain += pack("<I", _c ^ k) | |
i += 4 | |
print plain |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment