From 1ccf69c1bd6494b8f6d12140d944c9bccfee412d Mon Sep 17 00:00:00 2001 From: pizzaboxer <41478239+pizzaboxer@users.noreply.github.com> Date: Fri, 28 Jan 2022 12:03:19 +0000 Subject: [PATCH] Add hook addresses for 2012 studio beta --- PolygonClientUtilities/Config.h | 7 ++++++- PolygonClientUtilities/RobloxMFCHooks.cpp | 18 +++++++++--------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/PolygonClientUtilities/Config.h b/PolygonClientUtilities/Config.h index 99d403a..c19b1c3 100644 --- a/PolygonClientUtilities/Config.h +++ b/PolygonClientUtilities/Config.h @@ -1,6 +1,6 @@ #pragma once -#define PLAYER2012 +#define MFC2010 #define ARBITERBUILD // when ARBITERBUILD is defined, the following changes occur: @@ -93,6 +93,11 @@ #define ADDRESS_APPLICATION__PARSEARGUMENTS Patches::GetAddressByOffset(0x00004E60) #endif +// RobloxStudioBeta (2012) +#ifdef STUDIO2012 +#define ADDRESS_HTTP__TRUSTCHECK Patches::GetAddressByOffset(0x001931A0) +#define ADDRESS_CRYPT__VERIFYSIGNATUREBASE64 Patches::GetAddressByOffset(0x004CD250) +#endif // RakNet definitions // these are extracted from the 2016 source, but they're probably shifted 2 up compared to 2010 and 2011 diff --git a/PolygonClientUtilities/RobloxMFCHooks.cpp b/PolygonClientUtilities/RobloxMFCHooks.cpp index 928787f..57f891d 100644 --- a/PolygonClientUtilities/RobloxMFCHooks.cpp +++ b/PolygonClientUtilities/RobloxMFCHooks.cpp @@ -146,7 +146,7 @@ BOOL __fastcall Application__ParseArguments_hook(int _this, void*, int a2, const jobId = argslist["-jobId"]; Logger::Initialize(jobId); - // now we have to reconstruct the args to exclude the -jobId arg + // now we have to exclude the -jobId arg from argv // i'm being really lazy here, so don't do this // i'm just gonna erase everything that comes after the -jobId arg // thats gonna cause issues if the joinscript params are after the jobId arg, @@ -191,8 +191,8 @@ BOOL __fastcall CRobloxApp__InitInstance_hook(CRobloxApp* _this) if (hasJoinArg && !joinScriptUrl.empty()) { - // try - // { + try + { // so... i would've wanted to just use CApp::CreateGame instead but there's a few issues // in the typelib, CreateGame is exposed as being IApp::CreateGame(string p) - 'p' is "44340105256" // however internally the function is actually CApp::CreateGame(int something, LPCWSTR p) @@ -201,12 +201,12 @@ BOOL __fastcall CRobloxApp__InitInstance_hook(CRobloxApp* _this) CRobloxDoc* document = CRobloxApp__CreateDocument(_this); CWorkspace__ExecUrlScript(document->workspace, joinScriptUrl.c_str(), VARIANTARG(), VARIANTARG(), VARIANTARG(), VARIANTARG(), nullptr); - // } - // catch (std::runtime_error& exception) - // { - // MessageBoxA(nullptr, exception.what(), nullptr, MB_ICONERROR); - // return FALSE; - // } + } + catch (std::runtime_error& exception) + { + // MessageBoxA(nullptr, exception.what(), nullptr, MB_ICONERROR); + return FALSE; + } } return TRUE;