Activating cheat menu in shadow fight 2

Sbenny.com is trusted by 1,323,799 happy users since 2014.
Register

TheInfinityUser

Lurker Lv0️⃣
Member for 3 years
I found this portion of code in dnSpy when I opened the assemblycsharp dummy dll file after using il2cpp dumper to dump the il2cpp.so of shadow fight 2.
JavaScript:
// Token: 0x0200020C RID: 524

    [Token(Token = "0x200020C")]

    public class CheatsPanel : MonoBehaviour

    {

        // Token: 0x06000E4C RID: 3660 RVA: 0x00002050 File Offset: 0x00000250

        [Token(Token = "0x6000E4C")]

        [Address(RVA = "0x13F2D98", Offset = "0x13F2D98", VA = "0x13F2D98")]

        public void ShowCheats()

        {

        }



        // Token: 0x06000E4D RID: 3661 RVA: 0x00002050 File Offset: 0x00000250

        [Token(Token = "0x6000E4D")]

        [Address(RVA = "0x13F2E80", Offset = "0x13F2E80", VA = "0x13F2E80")]

        public void HideCheats()

        {

        }



        // Token: 0x06000E4E RID: 3662 RVA: 0x00002050 File Offset: 0x00000250

        [Token(Token = "0x6000E4E")]

        [Address(RVA = "0x13F2F30", Offset = "0x13F2F30", VA = "0x13F2F30")]

        public void AddMoney()

        {

        }



        // Token: 0x06000E4F RID: 3663 RVA: 0x00002050 File Offset: 0x00000250

        [Token(Token = "0x6000E4F")]

        [Address(RVA = "0x13F3070", Offset = "0x13F3070", VA = "0x13F3070")]

        public void AddBonus()

        {

        }



        // Token: 0x06000E50 RID: 3664 RVA: 0x00002050 File Offset: 0x00000250

        [Token(Token = "0x6000E50")]

        [Address(RVA = "0x13F31B8", Offset = "0x13F31B8", VA = "0x13F31B8")]

        public void AddLevel()

        {

        }



        // Token: 0x06000E51 RID: 3665 RVA: 0x00002050 File Offset: 0x00000250

        [Token(Token = "0x6000E51")]

        [Address(RVA = "0x13F3358", Offset = "0x13F3358", VA = "0x13F3358")]

        public void AddCurrency()

        {

        }



        // Token: 0x06000E52 RID: 3666 RVA: 0x00002050 File Offset: 0x00000250

        [Token(Token = "0x6000E52")]

        [Address(RVA = "0x13F335C", Offset = "0x13F335C", VA = "0x13F335C")]

        public void OpenItems()

        {

        }



        // Token: 0x06000E53 RID: 3667 RVA: 0x00002050 File Offset: 0x00000250

        [Token(Token = "0x6000E53")]

        [Address(RVA = "0x13F36F8", Offset = "0x13F36F8", VA = "0x13F36F8")]

        public void ResetProgress()

        {

        }



        // Token: 0x06000E54 RID: 3668 RVA: 0x00002050 File Offset: 0x00000250

        [Token(Token = "0x6000E54")]

        [Address(RVA = "0x13F3758", Offset = "0x13F3758", VA = "0x13F3758")]

        public CheatsPanel()

        {

        }



        // Token: 0x0400087F RID: 2175

        [Token(Token = "0x400087F")]

        [FieldOffset(Offset = "0x18")]

        [SerializeField]

        private int addMoneyCount;



        // Token: 0x04000880 RID: 2176

        [Token(Token = "0x4000880")]

        [FieldOffset(Offset = "0x1C")]

        [SerializeField]

        private int addBonusCount;



        // Token: 0x04000881 RID: 2177

        [Token(Token = "0x4000881")]

        [FieldOffset(Offset = "0x20")]

        [SerializeField]

        private int addCurrencyCount;



        // Token: 0x04000882 RID: 2178

        [Token(Token = "0x4000882")]

        [FieldOffset(Offset = "0x28")]

        [SerializeField]

        private GameObject cheatsButtons;



        // Token: 0x04000883 RID: 2179

        [Token(Token = "0x4000883")]

        [FieldOffset(Offset = "0x30")]

        public UnityEvent OnShowCheats;



        // Token: 0x04000884 RID: 2180

        [Token(Token = "0x4000884")]

        [FieldOffset(Offset = "0x38")]

        public UnityEvent OnHideCheats;



        // Token: 0x04000885 RID: 2181

        [Token(Token = "0x4000885")]

        [FieldOffset(Offset = "0x40")]

        public UnityEvent OnAddLevel;

    }
This seems to be the code for a cheat menu in-game. But I don't know how to activate it. Can anyone please help me?
 

Sbenny

A crazy scientist
Staff member
Admin
SB Mod Squad ⭐
✔ Approved Releaser
Active User
This is quite advanced, but if you're experienced enough, you can do it.

You should call the "ShowCheats" function from another function which you can easily call when you want (for example, a function like OpenSettings, or ShowCredits or similar - THESE ARE ONLY EXAMPLES).

Once you find the function, you can call ShowCheats by doing so:

BL sub_13F2D98

If you use armconverter, you'll have to type:

BL 0x13F2D98

and fill the box at the bottom-left of the page with the offset of the LINE where you're going to put this line into.
 

Sbenny

A crazy scientist
Staff member
Admin
SB Mod Squad ⭐
✔ Approved Releaser
Active User
If you're making such questions, it means you're definitely not ready for it :p

My suggestion is to search in the Modding University about how to add mod menus or how to hook, as a single post wouldn't be enough to answer all your questions ;)
 

Gourov

Dimitri Petrenko
✌️ Community Team
Member for 5 years
This is quite advanced, but if you're experienced enough, you can do it.

You should call the "ShowCheats" function from another function which you can easily call when you want (for example, a function like OpenSettings, or ShowCredits or similar - THESE ARE ONLY EXAMPLES).

Once you find the function, you can call ShowCheats by doing so:

BL sub_13F2D98

If you use armconverter, you'll have to type:

BL 0x13F2D98

and fill the box at the bottom-left of the page with the offset of the LINE where you're going to put this line into.
I I didn't knew that , is it really possible to do it from Ida ??? I mean yeah as you said its possible. But as those are not static you need to pass a context (or whatever it called on C) right ?
 

Sbenny

A crazy scientist
Staff member
Admin
SB Mod Squad ⭐
✔ Approved Releaser
Active User
The branch line is enough, as these methods don't require any variables to be passed in order to be called without errors. The only "tricky" thing might be finding out where to put the line inside the function you want to edit, but when you're unsure, you can just replace everything with just the Branch line and the BX LR right under it, so that the original function will not do anything else besides calling the ShowCheats function. This isn't a problem if you're, for example, editing functions like "FacebookLike" or "ShowCredits" as they're not useful/required functions.
 

Gourov

Dimitri Petrenko
✌️ Community Team
Member for 5 years
The branch line is enough, as these methods don't require any variables to be passed in order to be called without errors. The only "tricky" thing might be finding out where to put the line inside the function you want to edit, but when you're unsure, you can just replace everything with just the Branch line and the BX LR right under it, so that the original function will not do anything else besides calling the ShowCheats function. This isn't a problem if you're, for example, editing functions like "FacebookLike" or "ShowCredits" as they're not useful/required functions.
I prefer hook lol 😅
 
Top