This is a vs project that i tried to crack the game, unfortunately i've been to overwhelmed by my study, and i really don't think it would be possible that i alone move along, so here it is for those who have some experience in dotnet and unity development or Melonloader.
You must be registered to see the links
So here is roughly what i've found: you need to stop the game from exiting and halting itself. And there are several key aspects to focus on:
1. Exit Protection System
- The game uses multiple exit mechanisms including `Application.Quit()`, `OnApplicationQuit`, and low-level Unity exits
- All these need to be intercepted using Harmony patches
- Key files: `ExitProtectionFeature.cs` and `ApplicationPatches.cs`
2. Login Validation
- The game uses an `ITPHPA` component for login validation
- Web requests to validate/login endpoints need to be intercepted
- The verification state needs to be permanently set to true
- Check `LoginPatches.cs` and `LoginHandler.cs` for implementation details
3. File Protection
- Critical game files need to be protected from deletion/modification
- Automatic backup system for important files like save data
- File operations in protected directories need to be monitored
- See `FilePatches.cs` and `FileHandler.cs`
4. Scene Management
- Certain scenes are protected from unloading (Main, Title, Game, Login)
- Scene transitions need to be monitored for validation state persistence
- The game tries to reload/unload scenes as a protection mechanism
5. Input Control
- Block common exit key combinations (Alt+F4, Ctrl+Q, Ctrl+W, Escape)
- Reset input axes when exit attempts are detected
- Implemented in `EventHandler.cs`
The main challenge is that these systems are interconnected - you need to maintain the game state while preventing it from detecting tampering. I've implemented basic patches for these in the codebase, but there's still work to be done on, and my patches would crash the game.
The current project compile sets the output dll to "D:\HC_Win\Plugins\MelonLoaderPluginforHC.dll" and you should use the "D:\HC_Win\Mods\UnityExplorer.ML.IL2CPP.net6preview.interop.dll" & "D:\HC_Win\UserLibs\UniverseLib.IL2CPP.Interop.ML.dll" included.
So i make the game stop at first, and the UnityExplorer can be used to switch scene, with then you need to switch to scene 2-Intro, the 2-Intro works fine, but as soon it load into 4-ReloadScene which then it wanted to load into the main game, it would try to validate the tokens, and if not, it would try to exit, I modified so that it can't exit by itself, but some of the gameobject was already distroied so it would crash it self.
Hoping someone else tries to fix that.
BTW, the ""D:\HC_Win\UserData\Loader.cfg"" should be like this so it can use visual studio to debug unity program.
Code:
[loader]
# Disables MelonLoader. Equivalent to the '--no-mods' launch option
disable = false
# Equivalent to the '--melonloader.debug' launch option
debug_mode = true
# Only use this if the game freezes when trying to quit. Equivalent to the '--quitfix' launch option
force_quit = false
# Disables the start screen. Equivalent to the '--melonloader.disablestartscreen' launch option
disable_start_screen = false
# Starts the dotnet debugger (only for Il2Cpp games). Equivalent to the '--melonloader.launchdebugger' launch option
launch_debugger = true
# Sets the loader theme. Currently, the only available themes are "Normal" and "Lemon". Equivalent to the '--melonloader.consolemode' launch option (0 for Normal, 4 for Lemon)
theme = "Normal"
[console]
# Hides warnings from displaying. Equivalent to the '--melonloader.hidewarnings' launch option
hide_warnings = false
# Hides the console. Equivalent to the '--melonloader.hideconsole' launch option
hide_console = false
# Forces the console to always stay on-top of all other applications. Equivalent to the '--melonloader.consoleontop' launch option
console_on_top = false
# Keeps the console title as original. Equivalent to the '--melonloader.consoledst' launch option
dont_set_title = false
[logs]
# Sets the maximum amount of log files in the Logs folder (Default: 10). Equivalent to the '--melonloader.maxlogs' launch option
max_logs = 10
[unityengine]
# Overrides the detected UnityEngine version. Equivalent to the '--melonloader.unityversion' launch option
version_override = ""
# Disables the console log cleaner (only applies to Il2Cpp games). Equivalent to the '--melonloader.disableunityclc' launch option
disable_console_log_cleaner = false
# Forces the Il2Cpp Assembly Generator to run without contacting the remote API. Equivalent to the '--melonloader.agfoffline' launch option
force_offline_generation = false
# Forces the Il2Cpp Assembly Generator to use the specified regex. Equivalent to the '--melonloader.agfregex' launch option
force_generator_regex = ""
# Forces the Il2Cpp Assembly Generator to use the specified Il2Cpp dumper version. Equivalent to the '--melonloader.agfvdumper' launch option
force_il2cpp_dumper_version = ""
# Forces the Il2Cpp Assembly Generator to always regenerate assemblies. Equivalent to the '--melonloader.agfregenerate' launch option
force_regeneration = false
# Enables the CallAnalyzer processor for Cpp2IL. Equivalent to the '--cpp2il.callanalyzer' launch option
enable_cpp2il_call_analyzer = false
# Enables the NativeMethodDetector processor for Cpp2IL. Equivalent to the '--cpp2il.nativemethoddetector' launch option
enable_cpp2il_native_method_detector = false
And you can see the source code (main logic) of the game in dump.cs.