crazydoomy / MD-Replay-Editor

replay saving and viewing for master duel via a gui using frida
MIT License
17 stars 2 forks source link

App no longer works since the update to game version 1.9.0. #6

Open RndUser0 opened 5 months ago

RndUser0 commented 5 months ago

Loading/Saving replays and revealing the opponent's hand no longer works.

DarkPointer commented 5 months ago

Can confirm, and tried running it from source, and it apparently encounters an error when trying to execute the following:

    const SystemBytes = mscorlib.classes["System.Byte"];
    const deserializeAsync = il2cpplib.classes["YgomSystem.Network.FormatYgom"].methods.DeserializeAsync;
    const getpubliclevel = il2cpplib.classes["YgomGame.Duel.Util"].methods.GetPublicLevel;
    console.log("attached");

Basically all lines after line 8 in _.js const mscorlib = Il2Cpp.Domain.assemblies["mscorlib"].image; causes it to encounter the following error:

Traceback (most recent call last):
  File "frida\core.py", line 450, in _on_message
  File "script.py", line 30, in on_message
KeyError: 'payload'

I checked the definitions of DeserializeAsync in YgomSystem.Network.FormatYgom and GetPublicLevel in YgomGame.Duel.Util, and nothing seems to have changed regarding these two methods in the new version. The error occurs already when the line const SystemBytes = mscorlib.classes["System.Byte"]; is executed, so I suspect there is some unclear reason for the error. My knowledge of debugging Frida and il2cpp in node and python is limited, so I couldn't investigate further.

DarkPointer commented 5 months ago

After further investigation, it is believed that the error is likely due to this version of the game being built with a newer version of Unity, which is causing the problem.