// USAGE:
// 1. Install Lucky Patcher
// 2. Put this file into /storage/emulated/0/Android/data/(lucky patcher package name)/files/LuckyPatcher/CustomPatches
// 3. In Lucky Patcher, select CrossDuel, run "Menu of Patches" > "Custom Patch" and select "Apply"

[BEGIN]
Yu-Gi-Oh! Cross Duel signature & license check patch

- Allows the game to run without a Google Play account (you still need Google Play Services!)
- Disables the signature checking in pairip to allow APK modding

[CLASSES]
// Disables signature checks
// force return-void on com.pairip.SignatureCheck.verifyIntegrity()
{"classes_name":"classes2.dex"}
{"original":"6E 10 D8 00 02 00 0C 00 6E 10 D9 00 02 00 0C 02"}
{"replaced":"0E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"}

// Force-pass license check
// remove branches on com.pairip.licensecheck3.LicenseClientV3.processResponse()
{"classes_name":"classes2.dex"}
{"original":"32 06 41 00 39 06 19 00 54 50 FF 14 6E 10 21 00 00 00 0C 00 71 20"}
{"replaced":"00 00 00 00 00 00 00 00 54 50 FF 14 6E 10 21 00 00 00 0C 00 71 20"}

// Kill the license error dialog
// force return-void on com.pairip.licensecheck3.LicenseClientV3.showErrorDialog()
{"classes_name":"classes2.dex"}
{"original":"62 00 F2 14 69 00 01 15 54 40 FF 14 22 01 27 0E 70 20 D0 31 41 00"}
{"replaced":"0E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"}

// Enable VMRunner debug log
{"classes_name":"classes2.dex"}
{"original":"1A 00 A2 39 62 01 F0 14 6E 20 7B 33 10 00 0A 00 0F 00"}
{"replaced":"00 00 00 00 00 00 00 00 00 00 00 00 00 00 12 10 0F 00"}

// The following patches prevent the VM from initializing the game memory, so don't use them until you figure out that part

// Disables license check
// force return-void on com.pairip.licensecheck3.LicenseClientV3.initializeLicenseCheck()
// {"classes_name":"classes2.dex"}
// {"original":"62 00 F1 14 62 01 01 15 6E 10 D8 31 01 00 0A 01"}
// {"replaced":"0E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"}

// Disables license check in MainActivity
// skip straight from jp.konami.unity.MainActivity.onCreate() to com.unity3d.player.UnityPlayerActivity.onCreate()
// {"classes_name":"classes3.dex"}
// {"original":"71 10 02 36 01 00 54 10 68 1A 38 00 0A 00 54 10 68 1A 6E 10 70 36 00 00 12 00 5B 10 68 1A"}
// {"replaced":"00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"}

[END]
Done.