2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 17:44:56 +00:00

Add Kawasedo deobfuscation tool

This commit is contained in:
Jack Andersen
2017-01-01 21:01:33 -10:00
parent 386e40de83
commit 9df924ef84
3 changed files with 1024 additions and 4 deletions

View File

@@ -436,7 +436,7 @@ class CKawasedoChallenge
bool F25(u8 status)
{
if (status != GBA_READY || *x10_statusPtr != KawasedoLUT[0x25] ||
if (status != GBA_READY || *x10_statusPtr != GBA_JSTAT_SEND ||
GBAGetStatus(m_chan, x10_statusPtr) != GBA_READY)
{
x28_ticksAfterXf = 0;
@@ -449,7 +449,7 @@ class CKawasedoChallenge
bool F27(u8 status)
{
if (status != GBA_READY || *x10_statusPtr != KawasedoLUT[0x0] ||
if (status != GBA_READY || *x10_statusPtr != (GBA_JSTAT_PSF0 | GBA_JSTAT_SEND) ||
GBARead(m_chan, x18_readBuf, x10_statusPtr) != GBA_READY)
{
x28_ticksAfterXf = 0;
@@ -526,8 +526,8 @@ class CKawasedoChallenge
}
else
{
if (!(*x10_statusPtr & KawasedoLUT[0x14]) ||
(*x10_statusPtr & KawasedoLUT[0x2a]) >> KawasedoLUT[0x21] !=
if (!(*x10_statusPtr & GBA_JSTAT_PSF1) ||
(*x10_statusPtr & GBA_JSTAT_PSF0) >> KawasedoLUT[0x21] !=
(x34_secret & KawasedoLUT[0x21]) >> KawasedoLUT[0x1f])
return false;
x34_secret -= (KawasedoLUT[0x19] - KawasedoLUT[0x17]);