Tutorial Unity Cracking Unity Games - Ultimate Guide for dummies

Uncle Eugene

Member
Modder
Jun 6, 2020
495
4,203
Unity Cracking Tutorial

This guide will teach you how to look inside a code of a Unity game and how to modify it to achieve whatever goal you have
I will explain everything as if I'm teaching the very beginner, so expect oversimplification of heavy tech stuff if you're experienced
I'll try to tell you only the things you need and drop everything that is not required to create a crack

You will learn how to:
  • Remove paywalls
  • Create cheats
  • Add new functionality to the game
  • Analyze how the game works
  • Check if the game is free of malware
However this tutorial will be focused on removing paywalls from an example porn game, but with the skills you'll learn you will be able to do whatever you want
There will be a Unity Game attached to every level of difficulty. You're meant to follow along, download game for each level and crack it with me

You can preamtively download the archive with all the example games: [PIXELDRAIN LINK will be ready later]

Prerequisites:
  • You have to know very basics of programming or be willing to learn it elsewhere, this tutorial won't cover it, we will do basic programming in C#
That's it! Feel free to try even if you can't code, starting levels do not require any skills basically, but further it goes more skills are required. It will also help if you know anything about Unity development, but it's completely ok if you don't

Preparations

Step 0 - Installing tools

Game Link:

DnSpy Link:
Forked DnSpy Link:


To start we will need a game itself and some tools. Our first and most important tool will be , it allows us to "look inside" .dll files that contain C# code. Read and Modify them. So download everything we need and proceed...

You can download either one of provided links here, the official developer of DnSpy stopped supporting it in 2021, so if you want more features use the fork link instead

Step 1 - Figuring out the game engine
Before even starting a game there are some quick steps we should do that will help us understand the game better and know how to approach it.
The first and very obvious step is to make sure our game was made with Unity, let's look at file structure:

1754952770627.png
We have
  • %GameName%.exe
  • %GameName%_Data
  • UnityCrashHandler
  • UnityPlayer
Basic Unity game file structure, I'm sure you feel that this step is too obvious, so let's skip all the useless stuff I can write about that and proceed to the next step

Step 2 - Figuring out scripting backend
Now comes less obvious but very important step
You see, Unity offers two scripting backends to choose from: Mono and il2cpp.
To put it simply:
mono option compiles the game into those .dlls we can freely read and modify, so it will be easy for us
il2cpp option compiles game into assembly code. We can still modify il2cpp game, but it's the topic for later chapters

Let's open %GameName%_Data folder

1754953346865.png
Two options here:
  • If there is Managed folder - it is mono
  • If there is il2cpp_data folder - it is il2cpp
Conveniently for us author compiled this game with mono scripting backend, who would've thought (Like I didn't make this game myself), so we can proceed

Level 0 - First Crack
Game Link:

It is finally time to run the game and see what it has to offer

1754959892238.png

Oh no! Look at that bitch, she wants our money to activate NSFW content, what a shame, $60/month! There is no way we're paying that for a game we already downloaded to our PC with all the content hidden inside

Let's not waste any more time and crack our first game.
Open %GameName%_Data/Managed folder, that is where all the .dlls with game code are located

1754959843108.png

There are bunch of dlls here, each of them contains different code that is used in the game, to make things simplier think of them as "modules" or "folders" for a code. For example UnityEngine.UI.dll is a part of Unity Engine that contains code for UI elements.

The one we're interested in is Assembly-CSharp.dll, that is where Unity puts the developer's code that is not part of Unity itself. By default. There could be exceptions if developer creates his own assemblies, but let's not focus on that for now

Let's open DnSpy

1754954467723.png

Not much to see right now, let's drag our Assembly-CSharp.dll onto Assembly Explorer window or open it via File menu

1754954962854.png

You can click on the assembly to open namespaces and classes it contains. DnSpy will also load other assemblies from the same folder that are being referenced by the code inside of our Assembly-CSharp, just ignore them and focus on Assembly-CSharp

We don't have a ton of code here because it's a small example game, however in real game you may find a lot of stuff inside, so be a good student and just imagine there are lots of classes with too much code to handle

There should be some kind of Patreon check inside the game, having experience with porn games I designed "levels" from the most common and easy to the rarest and more difficult examples of Patreon validations you can find in a wild

So lets do the most easy thing I always start with: open the search window (Ctrl+Shift+K or magnifying lens icon near start button) and search for the word patreon

1754955366710.png

Make sure the option "Search For:" is set to "All of the Above" or you may miss something

Would you look at that! We found a field called _isPatreonVersion inside GameManager class
looks like the very thing we need, double click it to navigate to it's location

1754955628241.png

Here we go. Basic static bool that seems to determine if the version we're running is patreon version or not
You can right click on it and hit "Analyse" to see where it is used. Check "Read By" section

1754955712108.png

You may navigate to the method this _isPatreonVersion field is referenced at and see how exactly it is used. We can skip this part since it's pretty obvious this is what we need. Not to mention I'm running out of available attachments on F95

So lets make it so our bool is set to true instead of false (it is false by default in C#)
For that we right click on this field or somewhere near it and choose "Edit Class (C#)..."
Make it so this bool is set to true like so:

1754955945688.png
We just add = true;

Then click "Compile"

1754955975232.png

We're done! Now we need to save recompiled dll back to where we took it from.
Click "File -> Save All..."

1754956044943.png

You can overwrite original dll or copy it beforehand in case you messed something up.
But we don't do that, we're pros, so destroy it is
Click "OK"

Lets run our game again and see if it made any effect

1754956463532.png

Voila!
Cool, we cracked our first game, lets go!
I've blurred the good parts on purpose so you would have more motivation to follow along and crack the game by yourself, though it's only a simple AI image made for educational purposes

And that's pretty much it for the very basics. Trust me, this is enough to crack at least 25% of the Unity games on F95

We've learned how to:

  • Differentiate between mono and il2cpp scripting backends
  • Use DnSpy to read source code of mono Unity game
  • Modify default values for fields in assembly

Share you thoughts and progress in this thread I'm always happy to answer questions and read feedback
 
Last edited:

Uncle Eugene

Member
Modder
Jun 6, 2020
495
4,203
Level 1 - Unity Basics
Game Link:

You know the basics already, so just do it again

1755035363415.png

We have the Managed folder, so it is mono, nice, we can do our thing

Run the game to see what it's about

1755039544027.png

Her again, but on a different side of the screen, that's new. Lets proceed with the crack

Open Assembly-CSharp.dll in DnSpy

Search for the word patreon
once again

1755037754328.png

We have a hit! Same class, a little bit different name, I didn't change much for this level, LAZY ME! HOW COULD I?

You don't have permission to view the spoiler content. Log in or register now.

So I guess we just do what we've learnt in Level 0 then
Right click on public bool IsPatreon and choose "Edit Class (C#)..."

1755036252937.png

Make it so our bool equals to true by default

and click "Compile"

1755037850863.png

Oops... Seems like we have an error. 'Object' is an ambiguous reference between 'UnityEngine.Object' and 'object'
This is common error when recompiling Unity classes in DnSpy. Developers often use class from Unity called Object and its name matches the same class from default System namespace and DnSpy sometimes loses track of which one exactly it meant to be

Double click on the error, it will show you the line where it occured:
return Object.FindFirstObjectByType<GameManager>();

here. 99.5% of the time developers refer to UnityEngine.Object, so lets fix our line. It should be
return UnityEngine.Object.FindFirstObjectByType<GameManager>();

Try to "Compile" again

1755038352308.png

Seems like we're done, so "File -> Save All -> OK" to save our modified dll

Lets run our game again and see if we've succeeded

1755036462998.png

And... We're not... What happened?

Well, obviously I wouldn't give you the second example if it was exactly the same as first one, so let me explain:

1755036650894.png

Take a look at the class definition: public class GameManager: MonoBehaviour
Notice how it is inherited from MonoBehaviour class (: MonoBehaviour shows that)

Simplified explaination would be that it means this class is used by developer in Unity as Component
On the screenshot I've shown you two examples of fields:
public bool _name_
[SerializeField] private bool _name_

In first case we have public field
in second case we have private (but can be whatever) field with [SerializeField] attribute on top of it

If one of these is put into Component - Unity will initialize it's value to what developer has set in the inspector
this is how it looks for him:

1755037125996.png

So the developer has this little nice checkbox that defines the value of this variable and it will be set later, so changing default value to true does nothing since Unity overrides it afterwards. (So does changing it in constructor, if you know what this means)

What can we do about that? - Actually, it's pretty easy. We just need to set the value to what we need after Unity finishes doing it's serialization stuff

Conveniently for us, there is void Start() method inside this class.
void Start() method is a special method in Unity that will be called once after this component initializes, just what we need!

You don't have permission to view the spoiler content. Log in or register now.

Lets right click on the method Start() and choose "Edit Method"

1755038831502.png

Inside, we will just set isPatreon = true;

1755038924080.png

And compile

1755038966143.png

That's it, lets save our finished dll and replace the one from the Managed folder with it

And check what the game thinks about it now

1755039446504.png

Victory once again!

We've learned:

  • About "magic" methods in Unity that do something
  • About Unity inspector where developer can choose what value that variable will be initialized with
  • How to edit methods in DnSpy
  • How to fix common compilation errors in DnSpy

You don't have permission to view the spoiler content. Log in or register now.
You don't have permission to view the spoiler content. Log in or register now.
Share you thoughts and progress in this thread I'm always happy to answer questions and read feedback
 
Last edited:

Uncle Eugene

Member
Modder
Jun 6, 2020
495
4,203
Level 2 - Password? No, thanks
Game Link:

No time to waste, lets open up the game and see whats new

1755484506805.png

OMG! Eugene actually spent time to do the menu? No way...

The menu! Something new on the table
Check out what happens if we click the "Patreon Key" button

1755482196732.png

What we're doing today is a bit different, but very likely to be found in a real Unity porn game - The password input

I'm sure you've seen some games that require you to input some kind of a password to get something in return, like cheats, gallery, exclusive features etc.
Here's one of them

Our goal is to crack the game so we can somehow input the correct key

See you in DnSpy

1755482403106.png

Yeah... So, I took some time to actually add extra classes so you'd get better idea of what it looks like
Let's search for our favourite word patreon

1755482431390.png

Absolutely no matches this time, damn
What do we do now? - We need to find a code that is connected to some kind of password/key input or validation
Maybe let's try searching for a word key

1755482770373.png

Too many matches inside System libraries. "Key" is a common word
You see that dropdown on a top right saying "All Files"?
Select Assembly-CSharp in Assembly Explorer window on your left and then set this dropdown to Selected Files

1755482905808.png

That's better. We've found a few classes named KeyWindow and KeyButton
Sounds promising. Lets double click on anything from KeyWindow class and see whats inside

1755483257195.png

A lot of stuff in this class to fit into one screenshot, but I can tell you already that this class is what we were looking for. It controls the Patreon Key Input window.

Can you find the line where validation happens? Try to look through the code yourself. If you have any experience with programming I'm sure it will be trivial for you

Do you remember that if the class is inherited from MonoBehaviour then Start is a magic method that will be called from Unity? Good.
So inside this Start developer subscribes OnSubmit method on _submitButton click event. Given the name I'm sure that this button is what we press after inputting the code in game

So we look inside OnSubmit and see that it takes text from Input Field, trims it, checks that it is not null and passes it to PasswordHasher.VerifyPassword
And depending on what VerifyPassword returns it does stuff

Cool, so we found where it happens, now it's time to decide what do we do with it
But first lets navigate to PasswordHasher.VerifyPassword and see what it does
Click on VerifyPassword to do that

1755485371311.png

Uff, some encryption going on, you see that?
Well, unlucky. Seems like developer cared about his password "security" and verifies it by comparing it to hashed encrypted strings. Scary stuff, totally uncrackable

I deliberately made it this way because that is very common in games I crack. I love it and I find it extremely funny.
When I see stuff like this I imagine a picture looking something like that:

image.png

Sorry for messy AI image

A proud developer looking at a huge gate with tons of locks on it made with unbreakable steel, he passionately tries to secure his goods behind it and sure they're safe
BUT THERE IS NO FUCKING WALL AROUND. Not even a tiny fence. That makes me laugh

It happens a lot with different validations, even including networking validations when developer pays for a server, hosts a validation on it so nobody can hack it nor see how validation happens and sends data on the server to validate.
And then I just close validation window...

Thats fun and all, but how we proceed with the crack?

I'd leave that up to you, you already know everything you need to reach our goal
Unfortunately, we really can't figure out the original password because game only contains it's hash and random salt, encryption algorithm developers are smarter then the ones who generally use them
But we can do a lot of other things. Remember - work smart, not hard

One good idea would be making it so password verification always returns true for any password!
Lets do this. Right click on VerifyPassword method and choose "Edit Method (C#)..."

1755485201234.png

Delete all this crap inside and just return true;
Click "Compile"

Done. Now we "File -> Save All... -> OK" to save our recompiled dll
Open the game to check what we've done

1755485609791.png

And try to submit any key

Every key is valid now! Encryption didn't help this time around didn't it? Nice!

But there is still more we could've done. Now people would need to enter a code in the game to get what they wanted. This is ok, it works, but you know... Two extra clicks for lazy ass users!? Do you have any compassion?
Can you make it so user won't even have to enter the code? You can surely figure this out

Some people say "We don't look for easy ways". Well, maybe they should. They're fucking easy
Do not overcomplicate things and they won't be complicated:
Can't get original password? - Get rid of validation entirely
Program opens a window and asks to validate code remotely using API and their server? - Just close the window!
Developer patched an .exe file, built a bunch of protections and obfuscated the assembly? - Replace it with clean Unity .exe file, it's just a launcher for .dll
 
Last edited:

Uncle Eugene

Member
Modder
Jun 6, 2020
495
4,203
Level 3 - "Crack stopped working! Please, update"

Game Link:
BepInEx Link:
Visual Studio Link:

You know everything you need to know to crack pretty much all the games compiled with mono

But you probably have guessed that when developer updates his game he, most likely, will update the code as well. So Assembly-CSharp.dll won't be the same and you would need to patch it once again. And again. And again. After each update.

Maintaining the crack takes too much time, especially if you do a lot of them for different games, so how can we get rid of this burden?
That's where we change our approach a little bit a lot
With the right tools we can keep the original dll unmodified while still applying the changes we need

Do not skip this level if you want to learn how to patch il2cpp builds since we'll be using the same approach

This right tool is is an open source modding framework for Unity games. Created for making mods for popular (and not so popular) games.
Technically it is a hook that injects your dll into Unity process and provides you with some tools to make your life as a modder easier

Preparations - IDE

In this level we will be writing plugin and for that we need an IDE where we'll create our stuff
I do suggest using for that purpose



1756083302067.png

You will be asked by an Installer what modules would you like for your Visual Studio 2022
Install .NET desktop development
and make sure to install .NET 6.0 Runtime (Out of support) as an individual component (you may find it in "Individual components" tab on top)

Preparations - Templates
Now we need to install the BepInEx templates for our visual studio. This is very easy

Press Win+R, enter cmd and click OK
Or open console window in any other way
Code:
dotnet new install BepInEx.Templates::2.0.0-be.4 --nuget-source https://nuget.bepinex.dev/v3/index.json
Paste this command into console and click enter

1756083891795.png

Done, quick and easy, everything's ready
Preparations - BepInEx
BepInEx Link:

The last thing is to download itself
Open the page, go the the last Artifact and download both Unity.Mono-win-x64 and Unity.IL2CPP-win-x64
You will need il2cpp one later probably, so it's nice to have right away

You don't have permission to view the spoiler content. Log in or register now.

Make the Crack as Usual

Finally we're ready. Pretend you didn't just go through a list of programs to download/install and commands to run
You won't have to do that ever again! Unless you format your hard drives and reinstall OS

So, we're ready to do the job. Lets open up our game and see what it has for today

1756086732286.png

So, the developer made some kind of a patch. Probably a file that goes into game folder that we're missing. And this file determines if the version of your game will include extra content

Nothing changes so far, open Assembly-CSharp.dll in DnSpy and see what it wants

Hopefully you did notice that Patreon has nothing to do with todays game and the word we need to look for is probably patch

1756087009104.png

Popular word, huh? Lets search in Assembly-CSharp only

1756087053920.png

GamePatcher and method CheckPatch, sign me in!

1756087152928.png

Simple enough method, checks some file in game directory, loads it as JSON and returns true if we have Unlimited version and false if we don't. You could figure how to create such file and where to place it so it works, but that's not the point of this level

So what do we do? Obviously nice straightforward solution would be to modify this method to always return true and that's it
This is correct and it works, you can test it by yourself. But as I already mentioned you would need to redo this work for every next version of the game which is tedious

Remember: We need to make it so bool CheckPatch() method of GamePatcher class always returns true

Creating BepInEx Plugin

Now that we know what to do lets create BepInEx plugin that does just that!
Open some folder where you'll keep the patch and open console window there

You can do so by Shift+Right click on an empty area and clicking "Open PowerShell window here..." (This option is unavailable without Shift)
Or you can just open console and navigate to this folder using cd


1756088187236.png

In console or PowerShell window run the following command:
Code:
dotnet new bep6plugin_unity_mono -n MyFirstPlugin -T net472
Where MyFirstPlugin is the name of your project and folder that will be created
-T net472 is a target .NET framework, it can be net472, netstandard2.0 or net35 depending on how the game was built. Default is net472, if you run into any troubles try netstandard2.0

After command succesfully executes run this one:
Code:
dotnet restore .\MyFirstPlugin\
Where, once again, MyFirstPlugin is the name of your newly created folder
You can use Tab button to auto-complete the name

1756092391942.png

Done! You can close console now
Look, MyFirstPlugin folder was created with .csproj and Program.cs files in it

Open the .csproj file, it should open in Visual Studio 2022

1756089158515.png

Welcome to Visual Studio. This is where I work, this is where I live, this is where BepInEx plugins are made

On your right you can see "Solution Exploerer" window. Double click on Program.cs to open it

1756089254569.png

Here we have the BepInEx plugin template for Unity mono
You can do anything here, especially when you know that BaseUnityPlugin is inherited from MonoBehaviour
So this script will be spawned in Unity as component on a new Object and method Awake will run. This requires understanding of Unity, of course, and we don't need this now, but just so you know


Finally, the patch!

But first! Our project doesn't yet know anything about the game and what classes or methods it has, so we need to show it what we're working on
For that, navigate to "Solution Explorer" on your right and right click on Dependencies

1756089743442.png

Select "Add Project Reference..."
Click "Browse" and choose the Assembly-CSharp.dll from Managed folder
. The one we were looking at in DnSpy before

Dont forget to click "OK"

Done. Now if we would start to write GamePatcher Visual Studio successfully picks up on what class it is and where it comes from

1756089929133.png

We're almost there, it's time to finally write our plugin

Do you remember our goal? Let me remind you:
We need to make it so bool CheckPatch() method of GamePatcher class always returns true

To achieve that we will use Harmony patcher. It allows us to hook methods that are about to be called and routes the call to us instead, so we can do whatever
Let's add reference to HarmonyLib at the very top

1756090169493.png

I've added using HarmonyLib;

Now, we create static bool method inside our Plugin. You can call it however you want

1756090270257.png

And let's add some Harmony attributes:

1756090415159.png

  • HarmonyPrefix - means that this method should be called before the original
  • HarmonyPatch - contains information about what method we're hooking. Here we reference method CheckPatch in GamePatcher class
There is also HarmonyPostfix attribute if you want to call your method after the original has been executed. Note that in this case your method must be static void instead of bool

Cool. Now we need to override the return value of the original method. For that we add a ref bool __result argument

1756090757905.png

You can find about other "magic" arguments on

Finally lets finish writing our method

1756090854056.png

Since our method is bool we need to return a value
The return value of HarmonyPrefix answers the question: "Should the original method be called after we finished?"

We don't need original CheckPatch to ever run, so we just block it and use our method instead. And in our method we set the result to true

There's one last thing to do and that is to actually patch the game with Harmony
Call Harmony.CreateAndPatchAll(typeof(Plugin)); in Awake()

1756091085778.png

Here is the finished plugin. There is not much, I just tried to explain as much as possible. Hopefully you're not overwhelmed.
We're finally done. Congratulations!

You don't have permission to view the spoiler content. Log in or register now.

Click "Build -> Build Solution"

1756091215026.png

If you don't have any errors the build should succeed

1756091534774.png

If your build failed check the Error List, maybe you did a mistake in code or maybe there are other problems, it will show you what's wrong

Your plugin is located under %YourPluginFolder%/bin/Debug/net472/%PluginName%.dll
Find the output .dll

1756091682087.png


Here it is, your own .dll between a bunch of other stuff that came here along with Assembly-CSharp we included
You only need MyFirstPlugin.dll

Now just unpack the contents of BepInEx-Mono we downloaded before into game folder like so

1756092017234.png

We should've done it way earlier, but whatever. There was too much stuff to discuss

And copy your .dll into BepInEx/plugins folder
If you don't have plugins folder you can create one. Alternatively BepInEx will create it automatically after you launch the game

Run the game!

1756092095944.png

BepInEx console will open along with the game (it may take a little time to load)
And if you did everything right BepInEx should tell you that it's loading 1 plugin and the game should load cracked
Optionally you can disable this console in BepInEx/config/BepInEx.cfg file

Congratulations!
If you've made it this far I'm very proud of you, especially if you didn't have any experience with programming and Visual Studio before


Share you thoughts and progress in this thread I'm always happy to answer questions and read feedback
 
Last edited:
  • Like
Reactions: FaceOfDisgrace

Uncle Eugene

Member
Modder
Jun 6, 2020
495
4,203
Level 2 is out now.
Level 3 will be a transition between mono and il2cpp
And Level 4 will finally be about cracking il2cpp builds

This will conclude the main line for the tutorial and I will consider it done

After that I might throw in some extra "side quests" like a tiny projects with a goal to achieve by patching the game. Not necessarily paywall removal, just so you see and get some practice with different Unity specific stuff
 

lazylazyoni

Member
May 10, 2023
148
310
It is your decision but I would change the dnspy link to this maintained fork or add it as an extra source:

Thank you for the guides. The part I am stuck with is if the metadata of an il2cpp distribution is encrypted. I think if that is the case there is no other way around other than using assembly and trying to find the decryption method to then decrypt the metadata. On a project I tried I could not find the decryption method though. I hope you make a guide for that as well.
 

Uncle Eugene

Member
Modder
Jun 6, 2020
495
4,203
It is your decision but I would change the dnspy link to this maintained fork or add it as an extra source:

Thank you for the guides. The part I am stuck with is if the metadata of an il2cpp distribution is encrypted. I think if that is the case there is no other way around other than using assembly and trying to find the decryption method to then decrypt the metadata. On a project I tried I could not find the decryption method though. I hope you make a guide for that as well.
Never faced such a project before tbh, can you provide a link here or in DM to the game so I can take a look? You're probably right tho, it is definitely out of scope for this guide and it requires individual approach for a project

For literally all the games on F95 writing hooks in BepInEx was always enough for me. Some of the "hardest" games required some analysis with Unity Explorer, but other than that no problems

The only game I "failed" to crack was "my time at sandrock" that costs shit ton of money on steam, does check for an appid swap (obviously) and uses it's own server to communicate with steam to verify if you own a copy. Server works as a relay server with some extra data passed around for multiplayer, so in order to crack that I'd need my own copy of server or to imitate it's functionality, which is unknown, so it just wasn't worth the effort

Don't like to provide links to unofficial stuff in guides, but this one is a good idea, I'll add it as optional
 
Last edited:

Uncle Eugene

Member
Modder
Jun 6, 2020
495
4,203
I think if that is the case there is no other way around other than using assembly and trying to find the decryption method to then decrypt the metadata.
I've been thinking about it for a bit now and here's what I have to say:

I keep repeating - look for easy ways
If you get the reference, it's like building a killbox for enemies in a game like "RimWorld". You're building cool unpassable area with lots of traps, guns and so on... But suddenly all the mobs just turn away from your designed path and break your 2cm wooden wall to get inside.

People get tunnel vision a lot, and that's the case for those who make security as well, not only the ones who break it. Especially considering that if you want your product to be secure from all sides you'd have to spend maybe even more time than is required to crack it

So the idea of using assembly and decrypting data by yourself is straightforward and it will work, but it is hard and time consuming. And that is what developer wanted you to do. That is where "the killbox" is

Instead, we could think about that the meta file is required by unity engine and will be read in runtime (as far as I understand it). So the decrypted file should be passed to unity engine in some way.

Now there are few ways I can think of it getting passed, but let's think about how to retrieve it instead. First thing is to run the game and create a memory dump. Look inside it for the file we need. You'll probably get it.
The other way a bit harder is to imitate it as if we're the unity engine asking for a file
 
Last edited:

lazylazyoni

Member
May 10, 2023
148
310
Never faced such a project before tbh, can you provide a link here or in DM to the game so I can take a look? You're probably right tho, it is definitely out of scope for this guide and it requires individual approach for a project

For literally all the games on F95 writing hooks in BepInEx was always enough for me. Some of the "hardest" games required some analysis with Unity Explorer, but other than that no problems

The only game I "failed" to crack was "my time at sandrock" that costs shit ton of money on steam, does check for an appid swap (obviously) and uses it's own server to communicate with steam to verify if you own a copy. Server works as a relay server with some extra data passed around for multiplayer, so in order to crack that I'd need my own copy of server or to imitate it's functionality, which is unknown, so it just wasn't worth the effort

Don't like to provide links to unofficial stuff in guides, but this one is a good idea, I'll add it as optional
I dont have the files anymore and it was couple months ago I think it was this game https://f95zone.to/threads/everlusting-life-by-pochemu-ltd.254825/

Yeah I read about dumping the code from the memory but I didn't know how to do that. There are tools for like .NET Apps but they don't work on il2cpp.
 

Uncle Eugene

Member
Modder
Jun 6, 2020
495
4,203
I dont have the files anymore and it was couple months ago I think it was this game https://f95zone.to/threads/everlusting-life-by-pochemu-ltd.254825/

Yeah I read about dumping the code from the memory but I didn't know how to do that. There are tools for like .NET Apps but they don't work on il2cpp.
By the way, I had a look at the game. It surely does a lot of stuff trying to protect itself...
There's no original metadata file in memory dump, but it does encrypt/decrypt it, so should be possible to "steal" it by asking the process itself to give you the file

It does look for injectors and deliberately crashes the process when detects one, so one more pain in the ass

The game also is il2cpp and as I understood it devs do host a server to send data back and forth to validate some stuff

So, unless you're COMMITTED AF I would recommend to just drop this game and leave it be, some gacha does not worth so much time and effort. At least for me
 
  • Like
Reactions: lazylazyoni

kullun

Newbie
Aug 11, 2016
29
55
By the way, I had a look at the game. It surely does a lot of stuff trying to protect itself...
There's no original metadata file in memory dump, but it does encrypt/decrypt it, so should be possible to "steal" it by asking the process itself to give you the file

It does look for injectors and deliberately crashes the process when detects one, so one more pain in the ass

The game also is il2cpp and as I understood it devs do host a server to send data back and forth to validate some stuff

So, unless you're COMMITTED AF I would recommend to just drop this game and leave it be, some gacha does not worth so much time and effort. At least for me
If the server communication is not encrypted, a server that could mimic those communications can be written without touching the client.

And some game servers don't even verify the data they are getting from the client and those are always fun lol
 

lazylazyoni

Member
May 10, 2023
148
310
By the way, I had a look at the game. It surely does a lot of stuff trying to protect itself...
There's no original metadata file in memory dump, but it does encrypt/decrypt it, so should be possible to "steal" it by asking the process itself to give you the file

It does look for injectors and deliberately crashes the process when detects one, so one more pain in the ass

The game also is il2cpp and as I understood it devs do host a server to send data back and forth to validate some stuff

So, unless you're COMMITTED AF I would recommend to just drop this game and leave it be, some gacha does not worth so much time and effort. At least for me
Thanks for the response.
I was stuck at this part:
"asking the process itself to give you the file"
I don't know how to dump the metadata from memory and I feel like reverse engineering guides are very scarce.
Didn't really want to patch the whole game and mock the server calls just wanted to know how to deal with il2cpp games that have encrypted metadata. There are no step for step guides for that.
 

Uncle Eugene

Member
Modder
Jun 6, 2020
495
4,203
Thanks for the response.
I was stuck at this part:
"asking the process itself to give you the file"
I don't know how to dump the metadata from memory and I feel like reverse engineering guides are very scarce.
Didn't really want to patch the whole game and mock the server calls just wanted to know how to deal with il2cpp games that have encrypted metadata. There are no step for step guides for that.
Sorry for yet another late response, I didn't want to leave this unsolved

tl;dr; I did retrieve the metadata file through their process, which I assumed to be hooking file reading functions to decrypt the file. It does output the same exact file so either the assumtion is incorrect or the metadata file is not encrypted at all (I bet on the second one).
The game does check for presence of injectors tho, so this might be the only reason for BepInEx crashing. Check is embedded into GameAssembly.dll and is encrypted/obfuscated whatever, so it's not as simple as finding the "version.dll" string in assembly and removing it

The way I did extract the original file is that I remembered that there's UnityCrashHandler64.exe that starts as a subprocess for Unity game, so I just replaced this .exe with mine that does this file thingy

Not gonna mess with this particular game anymore though, sorry