2011 trust check and preprocessor definitions
Set the address for 2011 trust check Set preprocessor definitions for MFC-specific hooks
This commit is contained in:
parent
f432851d98
commit
e4224542e5
|
|
@ -6,6 +6,7 @@
|
||||||
// RobloxApp (2010)
|
// RobloxApp (2010)
|
||||||
#ifdef MFC2010
|
#ifdef MFC2010
|
||||||
#define ADDRESS_STANDARDOUT__PRINT 0x0059F340
|
#define ADDRESS_STANDARDOUT__PRINT 0x0059F340
|
||||||
|
#define ADDRESS_NETWORK__RAKNETADDRESSTOSTRING 0x004FC1A0
|
||||||
#define ADDRESS_HTTP__TRUSTCHECK 0x005A2680
|
#define ADDRESS_HTTP__TRUSTCHECK 0x005A2680
|
||||||
#define ADDRESS_CAPP__CREATEGAME 0x00405D20
|
#define ADDRESS_CAPP__CREATEGAME 0x00405D20
|
||||||
#define ADDRESS_CAPP__ROBLOXAUTHENTICATE 0x00408060
|
#define ADDRESS_CAPP__ROBLOXAUTHENTICATE 0x00408060
|
||||||
|
|
@ -19,6 +20,7 @@
|
||||||
// RobloxApp (2011)
|
// RobloxApp (2011)
|
||||||
#ifdef MFC2011
|
#ifdef MFC2011
|
||||||
#define ADDRESS_STANDARDOUT__PRINT 0x005B25E0
|
#define ADDRESS_STANDARDOUT__PRINT 0x005B25E0
|
||||||
|
#define ADDRESS_HTTP__TRUSTCHECK 0x005B7050
|
||||||
#define ADDRESS_CAPP__CREATEGAME 0x0
|
#define ADDRESS_CAPP__CREATEGAME 0x0
|
||||||
#define ADDRESS_CAPP__ROBLOXAUTHENTICATE 0x0
|
#define ADDRESS_CAPP__ROBLOXAUTHENTICATE 0x0
|
||||||
#define ADDRESS_CROBLOXAPP__INITINSTANCE 0x004613C0
|
#define ADDRESS_CROBLOXAPP__INITINSTANCE 0x004613C0
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -104,13 +104,15 @@
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>false</IntrinsicFunctions>
|
||||||
<SDLCheck>true</SDLCheck>
|
<SDLCheck>true</SDLCheck>
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;POLYGONCLIENTUTILITIES_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;NDEBUG;POLYGONCLIENTUTILITIES_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<ConformanceMode>true</ConformanceMode>
|
<ConformanceMode>true</ConformanceMode>
|
||||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir)Detours\include</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir)Detours\include</AdditionalIncludeDirectories>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
#include <oaidl.h>
|
#include <oaidl.h>
|
||||||
|
|
||||||
|
#if defined(MFC2010) || defined(MFC2011)
|
||||||
class CWorkspace;
|
class CWorkspace;
|
||||||
|
|
||||||
// 2010 struct definitions:
|
// 2010 struct definitions:
|
||||||
|
|
@ -41,3 +42,4 @@ struct CCommandLineInfo
|
||||||
class CRobloxCommandLineInfo : public CCommandLineInfo {};
|
class CRobloxCommandLineInfo : public CCommandLineInfo {};
|
||||||
|
|
||||||
const auto CCommandLineInfo__ParseLast = (void(__thiscall*)(CCommandLineInfo * _this, BOOL bLast))ADDRESS_CCOMMANDLINEINFO__PARSELAST;
|
const auto CCommandLineInfo__ParseLast = (void(__thiscall*)(CCommandLineInfo * _this, BOOL bLast))ADDRESS_CCOMMANDLINEINFO__PARSELAST;
|
||||||
|
#endif
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
#include "Logger.h"
|
#include "Logger.h"
|
||||||
#include "Config.h"
|
#include "Config.h"
|
||||||
#include "LUrlParser.h"
|
#include "LUrlParser.h"
|
||||||
|
|
||||||
static bool hasAuthUrlArg = false;
|
static bool hasAuthUrlArg = false;
|
||||||
static bool hasAuthTicketArg = false;
|
static bool hasAuthTicketArg = false;
|
||||||
static bool hasJoinArg = false;
|
static bool hasJoinArg = false;
|
||||||
|
|
@ -13,6 +14,7 @@ static std::wstring authenticationTicket;
|
||||||
static std::wstring joinScriptUrl;
|
static std::wstring joinScriptUrl;
|
||||||
static std::string jobId;
|
static std::string jobId;
|
||||||
|
|
||||||
|
#if defined(MFC2010) || defined(MFC2011)
|
||||||
CRobloxApp__InitInstance_t CRobloxApp__InitInstance = (CRobloxApp__InitInstance_t)ADDRESS_CROBLOXAPP__INITINSTANCE;
|
CRobloxApp__InitInstance_t CRobloxApp__InitInstance = (CRobloxApp__InitInstance_t)ADDRESS_CROBLOXAPP__INITINSTANCE;
|
||||||
|
|
||||||
BOOL __fastcall CRobloxApp__InitInstance_hook(CRobloxApp* _this)
|
BOOL __fastcall CRobloxApp__InitInstance_hook(CRobloxApp* _this)
|
||||||
|
|
@ -32,10 +34,6 @@ BOOL __fastcall CRobloxApp__InitInstance_hook(CRobloxApp* _this)
|
||||||
// TODO: use CApp__CreateGame instead
|
// TODO: use CApp__CreateGame instead
|
||||||
CRobloxDoc* document = CRobloxApp__CreateDocument(_this);
|
CRobloxDoc* document = CRobloxApp__CreateDocument(_this);
|
||||||
CWorkspace__ExecUrlScript(document->workspace, joinScriptUrl.c_str(), VARIANTARG(), VARIANTARG(), VARIANTARG(), VARIANTARG(), nullptr);
|
CWorkspace__ExecUrlScript(document->workspace, joinScriptUrl.c_str(), VARIANTARG(), VARIANTARG(), VARIANTARG(), VARIANTARG(), nullptr);
|
||||||
|
|
||||||
// CApp__CreateGame(NULL, L"", L"44340105256");
|
|
||||||
// CApp__RobloxAuthenticate(_this->app, L"http://polygondev.pizzaboxer.xyz/", L"test");
|
|
||||||
// CRobloxApp__CreateDocument(_this);
|
|
||||||
}
|
}
|
||||||
catch (std::runtime_error& exception)
|
catch (std::runtime_error& exception)
|
||||||
{
|
{
|
||||||
|
|
@ -126,6 +124,7 @@ void __fastcall CRobloxCommandLineInfo__ParseParam_hook(CRobloxCommandLineInfo*
|
||||||
|
|
||||||
CRobloxCommandLineInfo__ParseParam(_this, pszParam, bFlag, bLast);
|
CRobloxCommandLineInfo__ParseParam(_this, pszParam, bFlag, bLast);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
Http__trustCheck_t Http__trustCheck = (Http__trustCheck_t)ADDRESS_HTTP__TRUSTCHECK;
|
Http__trustCheck_t Http__trustCheck = (Http__trustCheck_t)ADDRESS_HTTP__TRUSTCHECK;
|
||||||
|
|
||||||
|
|
@ -185,6 +184,8 @@ StandardOut__print_t StandardOut__print = (StandardOut__print_t)ADDRESS_STANDARD
|
||||||
|
|
||||||
void __fastcall StandardOut__print_hook(void* _this, void*, int type, const std::string& message)
|
void __fastcall StandardOut__print_hook(void* _this, void*, int type, const std::string& message)
|
||||||
{
|
{
|
||||||
|
if (!Logger::handle) return;
|
||||||
|
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case 1: // RBX::MESSAGE_OUTPUT:
|
case 1: // RBX::MESSAGE_OUTPUT:
|
||||||
|
|
@ -209,4 +210,12 @@ void __fastcall StandardOut__print_hook(void* _this, void*, int type, const std:
|
||||||
|
|
||||||
StandardOut__print(_this, type, message);
|
StandardOut__print(_this, type, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Network__RakNetAddressToString_t Network__RakNetAddressToString = (Network__RakNetAddressToString_t)ADDRESS_NETWORK__RAKNETADDRESSTOSTRING;
|
||||||
|
|
||||||
|
// std::string __fastcall Network__RakNetAddressToString_hook(int raknetAddress, bool writePort, char portDelineator)
|
||||||
|
// {
|
||||||
|
// Network__RakNetAddressToString(raknetAddress, writePort, portDelineator);
|
||||||
|
// return std::string("hi");
|
||||||
|
// }
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
#include "RobloxMFCClasses.h"
|
#include "RobloxMFCClasses.h"
|
||||||
|
|
||||||
|
#if defined(MFC2010) || defined(MFC2011)
|
||||||
typedef BOOL(__thiscall* CRobloxApp__InitInstance_t)(CRobloxApp* _this);
|
typedef BOOL(__thiscall* CRobloxApp__InitInstance_t)(CRobloxApp* _this);
|
||||||
extern CRobloxApp__InitInstance_t CRobloxApp__InitInstance;
|
extern CRobloxApp__InitInstance_t CRobloxApp__InitInstance;
|
||||||
|
|
||||||
|
|
@ -11,6 +12,7 @@ typedef void(__thiscall* CRobloxCommandLineInfo__ParseParam_t)(CRobloxCommandLin
|
||||||
extern CRobloxCommandLineInfo__ParseParam_t CRobloxCommandLineInfo__ParseParam;
|
extern CRobloxCommandLineInfo__ParseParam_t CRobloxCommandLineInfo__ParseParam;
|
||||||
|
|
||||||
void __fastcall CRobloxCommandLineInfo__ParseParam_hook(CRobloxCommandLineInfo* _this, void*, const char* pszParam, BOOL bFlag, BOOL bLast);
|
void __fastcall CRobloxCommandLineInfo__ParseParam_hook(CRobloxCommandLineInfo* _this, void*, const char* pszParam, BOOL bFlag, BOOL bLast);
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef void(__thiscall* Http__trustCheck_t)(const char* url);
|
typedef void(__thiscall* Http__trustCheck_t)(const char* url);
|
||||||
extern Http__trustCheck_t Http__trustCheck;
|
extern Http__trustCheck_t Http__trustCheck;
|
||||||
|
|
@ -22,4 +24,9 @@ typedef void(__thiscall* StandardOut__print_t)(void* _this, int type, const std:
|
||||||
extern StandardOut__print_t StandardOut__print;
|
extern StandardOut__print_t StandardOut__print;
|
||||||
|
|
||||||
void __fastcall StandardOut__print_hook(void* _this, void*, int type, const std::string& message);
|
void __fastcall StandardOut__print_hook(void* _this, void*, int type, const std::string& message);
|
||||||
|
|
||||||
|
// typedef void(__thiscall* Network__RakNetAddressToString_t)(int raknetAddress, bool writePort, char portDelineator);
|
||||||
|
// extern Network__RakNetAddressToString_t Network__RakNetAddressToString;
|
||||||
|
|
||||||
|
// std::string __fastcall Network__RakNetAddressToString_hook(int raknetAddress, bool writePort, char portDelineator);
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -5,19 +5,18 @@
|
||||||
|
|
||||||
START_PATCH_LIST()
|
START_PATCH_LIST()
|
||||||
ADD_PATCH(Http__trustCheck, Http__trustCheck_hook)
|
ADD_PATCH(Http__trustCheck, Http__trustCheck_hook)
|
||||||
#ifdef ADDRESS_CROBLOXAPP__INITINSTANCE
|
|
||||||
ADD_PATCH(CRobloxApp__InitInstance, CRobloxApp__InitInstance_hook)
|
|
||||||
#endif
|
|
||||||
#ifdef ADDRESS_CROBLOXCOMMANDLINEINFO__PARSEPARAM
|
|
||||||
ADD_PATCH(CRobloxCommandLineInfo__ParseParam, CRobloxCommandLineInfo__ParseParam_hook)
|
|
||||||
#endif
|
|
||||||
#ifdef ARBITERBUILD
|
#ifdef ARBITERBUILD
|
||||||
ADD_PATCH(StandardOut__print, StandardOut__print_hook)
|
ADD_PATCH(StandardOut__print, StandardOut__print_hook)
|
||||||
|
// ADD_PATCH(Network__RakNetAddressToString, Network__RakNetAddressToString_hook)
|
||||||
|
#endif
|
||||||
|
#if defined(MFC2010) || defined(MFC2011)
|
||||||
|
ADD_PATCH(CRobloxApp__InitInstance, CRobloxApp__InitInstance_hook)
|
||||||
|
ADD_PATCH(CRobloxCommandLineInfo__ParseParam, CRobloxCommandLineInfo__ParseParam_hook)
|
||||||
#endif
|
#endif
|
||||||
END_PATCH_LIST()
|
END_PATCH_LIST()
|
||||||
|
|
||||||
// DLLs for release will be attached with VMProtect, so this isn't necessary
|
// DLLs for release will be loaded with VMProtect, so this isn't necessary
|
||||||
// Arbiter will still use Stud_PE for ease in swapping DLLs
|
// Arbiter will still use Stud_PE for ease in swapping DLLs however
|
||||||
#ifdef ARBITERBUILD
|
#ifdef ARBITERBUILD
|
||||||
void __declspec(dllexport) doNothing() {}
|
void __declspec(dllexport) doNothing() {}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue