diff --git a/kernel.py b/kernel.py index 3c23dde..0dcb56b 100644 --- a/kernel.py +++ b/kernel.py @@ -258,7 +258,7 @@ class CodeHandler: packet = tools.read_uint32(self.geckoCodes.codeList) self.geckoCodes.codeList.seek(-4, 1) tools.write_uint32(self.geckoCodes.codeList, (packet^key) & 0xFFFFFFFF) - key += (i ^ key) & 0xFFFFFFFF + key += (i << 3) & 0xFFFFFFFF if key > 0xFFFFFFFF: key -= 0x100000000 i += 1 diff --git a/loader.cpp b/loader.cpp index aef3a45..cea6536 100644 --- a/loader.cpp +++ b/loader.cpp @@ -289,7 +289,7 @@ namespace Memory { for (u32 i = 0; i < size; ++i) { dest[i] = buffer[i] ^ key; - key += i ^ key; + key += i << 3; } } };