From b85547544625636147ed5780f005d46b037961b2 Mon Sep 17 00:00:00 2001 From: BillyCool Date: Sat, 7 Mar 2026 16:41:47 +1100 Subject: [PATCH] Update hooks to make the home menu visible. Update server to return correct user data. --- frida/hooks.js | 33 +++++++++++++++++++++++++++++++-- src/Services/DataService.cs | 15 +++++++++++++-- 2 files changed, 44 insertions(+), 4 deletions(-) diff --git a/frida/hooks.js b/frida/hooks.js index 6771d69..8958005 100644 --- a/frida/hooks.js +++ b/frida/hooks.js @@ -307,8 +307,11 @@ function DarkClient_InvokeAsync(offset) { const func_ptr = libil2cpp.add(offset); Interceptor.attach(func_ptr, { onEnter(args) { - this.path = readString(args[1]); - onEnterLogWrapper(DarkClient_InvokeAsync.name, `path=${this.path}`); + var path = readString(args[1]); + onEnterLogWrapper(DarkClient_InvokeAsync.name, `path=${path}`); + }, + onLeave(result) { + onLeaveLogWrapper(DarkClient_InvokeAsync.name); } }); } @@ -380,6 +383,30 @@ function DataManager_ApplyToDatabase(offset) { }); } +var isInitMenuButton = false; +function TitleScreen_InitializeMenuButton(offset) { + const func_ptr = libil2cpp.add(offset); + Interceptor.attach(func_ptr, { + onEnter(args) { + isInitMenuButton = true; + }, + onLeave(result) { + isInitMenuButton = false; + } + }); +} + +function CanvasGroupExtensions_SetActive(offset) { + const func_ptr = libil2cpp.add(offset); + Interceptor.attach(func_ptr, { + onEnter(args) { + if (isInitMenuButton) { + args[1] = ptr(1); + } + } + }); +} + //#endregion const SERVER_ADDRESS = 'humbly-tops-calf.ngrok-free.app'; @@ -396,6 +423,8 @@ awaitLibil2cpp(() => { callbackWrapper(HandleNet_Decrypt, 0x279420C); // Bypass GRPC decryption callbackWrapper(DarkClient_InvokeAsync, 0x38AC274); // GRPC requests logging callbackWrapper(OctoAPI_DecryptAes, 0x4C27410); + callbackWrapper(TitleScreen_InitializeMenuButton, 0x2F11900); // Make menu visible + callbackWrapper(CanvasGroupExtensions_SetActive, 0x2D257DC); // Make menu visible //callbackWrapper(DataManager_SetUrls, 0x3DA0170); //callbackWrapper(DataManager_ApplyToDatabase, 0x3D9F5EC); }); diff --git a/src/Services/DataService.cs b/src/Services/DataService.cs index 38354a6..622ee43 100644 --- a/src/Services/DataService.cs +++ b/src/Services/DataService.cs @@ -9,6 +9,9 @@ public class DataService : Art.Framework.ApiNetwork.Grpc.Api.Data.DataService.Da private const string LatestMasterDataVersion = "20240404193219"; private const string UserDataBasePath = @"path\to\user\data"; + private const string TablePrefix = "Entity"; + private const string TableSuffix = "Table"; + public override Task GetLatestMasterDataVersion(Empty request, ServerCallContext context) { return Task.FromResult(new MasterDataGetLatestVersionResponse @@ -21,7 +24,15 @@ public class DataService : Art.Framework.ApiNetwork.Grpc.Api.Data.DataService.Da { UserDataGetNameResponseV2 response = new(); TableNameList tableNameList = new(); - tableNameList.TableName.AddRange(Directory.EnumerateFiles(UserDataBasePath, "*.json").Select(x => Path.GetFileNameWithoutExtension(x))); + var names = Directory + .EnumerateFiles(UserDataBasePath, "*.json") + .Select(path => + { + var name = Path.GetFileNameWithoutExtension(path); // e.g. "EntityIUserTable" + return name.Substring(TablePrefix.Length, name.Length - TablePrefix.Length - TableSuffix.Length); // result for "EntityIUserTable" -> "IUser" + }); + + tableNameList.TableName.AddRange(names); response.TableNameList.Add(tableNameList); return Task.FromResult(response); @@ -33,7 +44,7 @@ public class DataService : Art.Framework.ApiNetwork.Grpc.Api.Data.DataService.Da foreach (var tableName in request.TableName) { - var filePath = Path.Combine(UserDataBasePath, tableName + ".json"); + var filePath = Path.Combine(UserDataBasePath, TablePrefix + tableName + TableSuffix + ".json"); var jsonContent = File.ReadAllText(filePath); response.UserDataJson.Add(tableName, jsonContent); }