Only 2011
This commit is contained in:
parent
e1068bb39c
commit
dce47e283a
|
|
@ -1,33 +0,0 @@
|
||||||
#include "pch.h"
|
|
||||||
|
|
||||||
#include "Patches.h"
|
|
||||||
#include "Util.h"
|
|
||||||
#include "Hooks/Application.h"
|
|
||||||
|
|
||||||
#if defined(ARBITERBUILD) && defined(PLAYER2012)
|
|
||||||
|
|
||||||
Application__ParseArguments_t Application__ParseArguments = (Application__ParseArguments_t)ADDRESS_APPLICATION__PARSEARGUMENTS;
|
|
||||||
|
|
||||||
BOOL __fastcall Application__ParseArguments_hook(int _this, void*, int a2, const char* argv)
|
|
||||||
{
|
|
||||||
std::map<std::string, std::string> argslist = Util::parseArgs(argv);
|
|
||||||
|
|
||||||
if (argslist.count("-jobId"))
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
Erase everything that comes after the -jobId argument.
|
|
||||||
|
|
||||||
Dirty quick hack that *shouldn't* matter in production
|
|
||||||
since the Arbiter starts up the player with arguments in
|
|
||||||
such an order that this won't affect anything.
|
|
||||||
*/
|
|
||||||
|
|
||||||
char* pch = (char*)strstr(argv, " -jobId");
|
|
||||||
if (pch != NULL)
|
|
||||||
strncpy_s(pch, strlen(pch) + 1, "", 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
return Application__ParseArguments(_this, a2, argv);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -2,8 +2,6 @@
|
||||||
|
|
||||||
#include "Hooks/CRoblox.h"
|
#include "Hooks/CRoblox.h"
|
||||||
|
|
||||||
#if defined(MFC2010) || defined(MFC2011)
|
|
||||||
|
|
||||||
static bool hasAuthUrlArg = false;
|
static bool hasAuthUrlArg = false;
|
||||||
static bool hasAuthTicketArg = false;
|
static bool hasAuthTicketArg = false;
|
||||||
static bool hasJoinArg = false;
|
static bool hasJoinArg = false;
|
||||||
|
|
@ -27,29 +25,16 @@ BOOL __fastcall CRobloxApp__InitInstance_hook(CRobloxApp* _this)
|
||||||
CApp__RobloxAuthenticate(app, nullptr, authenticationUrl.c_str(), authenticationTicket.c_str());
|
CApp__RobloxAuthenticate(app, nullptr, authenticationUrl.c_str(), authenticationTicket.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
// DataModel* datamodel = reinterpret_cast<DataModel*>(CLASSLOCATION_CAPP);
|
|
||||||
|
|
||||||
// printf("Attempting to create DataModel...\n");
|
|
||||||
// char* v27;
|
|
||||||
// DataModel__createDataModel((int)&v27, 1);
|
|
||||||
|
|
||||||
#ifdef PLAYERBUILD
|
#ifdef PLAYERBUILD
|
||||||
if (hasJoinArg && !joinScriptUrl.empty())
|
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)
|
|
||||||
// it's obvious that 'something' is a pointer to a class but i have no clue what the class is
|
|
||||||
// until i figure out wtf its supposed to be we've gotta stick to doing CRobloxApp::CreateDocument for now
|
|
||||||
|
|
||||||
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);
|
||||||
}
|
}
|
||||||
catch (std::runtime_error)// & exception)
|
catch (std::runtime_error)
|
||||||
{
|
{
|
||||||
// MessageBoxA(nullptr, exception.what(), nullptr, MB_ICONERROR);
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -118,6 +103,4 @@ void __fastcall CRobloxCommandLineInfo__ParseParam_hook(CRobloxCommandLineInfo*
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CRobloxCommandLineInfo__ParseParam(_this, pszParam, bFlag, bLast);
|
CRobloxCommandLineInfo__ParseParam(_this, pszParam, bFlag, bLast);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -14,9 +14,13 @@ void __fastcall Context__requirePermission_hook(void* _this, void*, int permissi
|
||||||
if (!Context__isInRole(identity, permission))
|
if (!Context__isInRole(identity, permission))
|
||||||
{
|
{
|
||||||
if (operation != 0)
|
if (operation != 0)
|
||||||
|
{
|
||||||
throw std::runtime_error("The current identity (" + std::to_string(identity) + ") cannot " + std::string(operation) + " (requires " + std::to_string(permission) + ")");
|
throw std::runtime_error("The current identity (" + std::to_string(identity) + ") cannot " + std::string(operation) + " (requires " + std::to_string(permission) + ")");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
throw std::runtime_error("The current identity (" + std::to_string(identity) + ") cannot perform the requested operation (requires " + std::to_string(permission) + ")");
|
throw std::runtime_error("The current identity (" + std::to_string(identity) + ") cannot perform the requested operation (requires " + std::to_string(permission) + ")");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -132,10 +132,6 @@ void __fastcall Crypt__verifySignatureBase64_hook(HCRYPTPROV* _this, void*, int
|
||||||
// Verify signature
|
// Verify signature
|
||||||
if (!Crypt().verifySignatureBase64(message, signatureBase64, CALG_SHA_256))
|
if (!Crypt().verifySignatureBase64(message, signatureBase64, CALG_SHA_256))
|
||||||
{
|
{
|
||||||
// Backwards compatibility for sha1 signatures
|
throw std::runtime_error("");
|
||||||
if (!Crypt().verifySignatureBase64(message, signatureBase64, CALG_SHA1))
|
|
||||||
{
|
|
||||||
throw std::runtime_error("");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#include "Hooks/ServerReplicator.h"
|
#include "Hooks/ServerReplicator.h"
|
||||||
|
|
||||||
#if defined(ARBITERBUILD) && defined(MFC2011)
|
#if defined(ARBITERBUILD)
|
||||||
|
|
||||||
static std::map<ServerReplicator*, RakPeerInterface*> rakPeers;
|
static std::map<ServerReplicator*, RakPeerInterface*> rakPeers;
|
||||||
|
|
||||||
|
|
@ -13,12 +13,10 @@ void __fastcall ServerReplicator__sendTop_hook(ServerReplicator* _this, void*, R
|
||||||
{
|
{
|
||||||
if (_this->isAuthenticated)
|
if (_this->isAuthenticated)
|
||||||
{
|
{
|
||||||
// printf("ServerReplicator::sendTop called: player is authenticated\n");
|
|
||||||
ServerReplicator__sendTop(_this, peer);
|
ServerReplicator__sendTop(_this, peer);
|
||||||
}
|
}
|
||||||
else if (rakPeers.find(_this) == rakPeers.end())
|
else if (rakPeers.find(_this) == rakPeers.end())
|
||||||
{
|
{
|
||||||
// printf("ServerReplicator::sendTop called: player is not authenticated\n");
|
|
||||||
rakPeers.insert(std::pair<ServerReplicator*, RakPeerInterface*>(_this, peer));
|
rakPeers.insert(std::pair<ServerReplicator*, RakPeerInterface*>(_this, peer));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -27,25 +25,11 @@ void __fastcall ServerReplicator__processTicket_hook(ServerReplicator* _this, vo
|
||||||
{
|
{
|
||||||
ServerReplicator__processTicket(_this, packet);
|
ServerReplicator__processTicket(_this, packet);
|
||||||
|
|
||||||
// THIS IS TEMPORARY
|
|
||||||
// i literally cant find a way to obtain rakpeerinterface from _this, like it's really damn hard
|
|
||||||
// so i'm cheating on doing that by getting rakpeerinterface from the first sendtop call,
|
|
||||||
// throwing that into a lookup table and then using that here
|
|
||||||
|
|
||||||
auto pos = rakPeers.find(_this);
|
auto pos = rakPeers.find(_this);
|
||||||
if (pos == rakPeers.end())
|
if (_this->isAuthenticated)
|
||||||
{
|
{
|
||||||
// printf("ServerReplicator::sendTop called: could not find rakpeer for %08X\n", (int)_this);
|
|
||||||
}
|
|
||||||
else if (_this->isAuthenticated)
|
|
||||||
{
|
|
||||||
// printf("ServerReplicator::sendTop called: Value of peer: %08X - associated with %08X\n", (int)pos->second, (int)_this);
|
|
||||||
ServerReplicator__sendTop_hook(_this, nullptr, pos->second);
|
ServerReplicator__sendTop_hook(_this, nullptr, pos->second);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
// printf("ServerReplicator::sendTop called: player is not authenticated\n");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -12,18 +12,11 @@ void InitializeOutput()
|
||||||
outputHandle = CreateFileA("CONOUT$", GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
outputHandle = CreateFileA("CONOUT$", GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||||
SetStdHandle(STD_OUTPUT_HANDLE, outputHandle);
|
SetStdHandle(STD_OUTPUT_HANDLE, outputHandle);
|
||||||
|
|
||||||
printf("PolygonDLL v1.0.0\n");
|
printf("Tadah.DLL v1.0.0\n");
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
SetConsoleTextAttribute(outputHandle, FOREGROUND_RED | FOREGROUND_GREEN);
|
SetConsoleTextAttribute(outputHandle, FOREGROUND_RED | FOREGROUND_GREEN);
|
||||||
printf("Compiled as Debug\n\n");
|
printf("Compiled as Debug\n\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// lol
|
|
||||||
// printf("Access key read: \n");
|
|
||||||
// printf("Current Access key: \n");
|
|
||||||
// printf("Service starting...\n");
|
|
||||||
// printf("Intializing Roblox Web Service\n");
|
|
||||||
// printf("Service Started on port 64989\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
StandardOut__print_t StandardOut__print = (StandardOut__print_t)ADDRESS_STANDARDOUT__PRINT;
|
StandardOut__print_t StandardOut__print = (StandardOut__print_t)ADDRESS_STANDARDOUT__PRINT;
|
||||||
|
|
@ -37,35 +30,6 @@ void __fastcall StandardOut__print_hook(int _this, void*, int type, std::string*
|
||||||
message = reinterpret_cast<std::string*>((int)message + 4);
|
message = reinterpret_cast<std::string*>((int)message + 4);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _DEBUG
|
|
||||||
if (message->compare("NewGame") == 0 || message->compare("NewGame2") == 0)
|
|
||||||
{
|
|
||||||
printf("\n");
|
|
||||||
printf("Attempting to create new Game...\n");
|
|
||||||
|
|
||||||
Game* game = new Game();
|
|
||||||
int result = Game__construct(Game__initializeClass(game, 0));
|
|
||||||
|
|
||||||
if (result)
|
|
||||||
{
|
|
||||||
printf("Failed to create new Game! (returned %d)\n", result);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
printf("Successfully created new Game! (%p)\n", game);
|
|
||||||
|
|
||||||
game->dataModel->jobId = "deez nuts";
|
|
||||||
auto scriptContext = ServiceProvider__createScriptContext(game->dataModel.get());
|
|
||||||
|
|
||||||
ScriptContext__execute(scriptContext, 5, "print(\"hi this should be inside the dll's created datamodel i think\")", "hi");
|
|
||||||
ScriptContext__execute(scriptContext, 5, "print(\"job id: \" .. game.jobId)", "hi");
|
|
||||||
ScriptContext__execute(scriptContext, 5, "printidentity()", "hi");
|
|
||||||
|
|
||||||
printf("\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case RBX__MESSAGE_OUTPUT:
|
case RBX__MESSAGE_OUTPUT:
|
||||||
|
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include <oaidl.h>
|
|
||||||
|
|
||||||
#include "Config.h"
|
|
||||||
|
|
||||||
// TODO: These need a place
|
|
||||||
|
|
||||||
struct DataModel
|
|
||||||
{
|
|
||||||
void* padding1[CLASSPADDING_DATAMODEL__JOBID + PADDING_STRUCT];
|
|
||||||
std::string jobId;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct Game
|
|
||||||
{
|
|
||||||
// 2010 has a class size of 104 bytes
|
|
||||||
void* padding1[8];
|
|
||||||
std::shared_ptr<DataModel> dataModel;
|
|
||||||
void* padding2[9];
|
|
||||||
};
|
|
||||||
|
|
||||||
const auto Game__initializeClass = (Game * (__thiscall*)(Game* _this, int a2))0x455D40;
|
|
||||||
const auto Game__construct = (int(__thiscall*)(Game* _this))0x47DBF0;
|
|
||||||
|
|
||||||
const auto ServiceProvider__createScriptContext = (void * (__thiscall*)(void* _this))0x4282E0;
|
|
||||||
const auto ScriptContext__execute = (void (__thiscall*)(void* _this, int identity, const char* script, const char* name))0x617C80;
|
|
||||||
|
|
||||||
// const auto DataModel__createDataModel = (std::shared_ptr<void>(__thiscall*)(bool startHeartbeat))ADDRESS_DATAMODEL__CREATEDATAMODEL;
|
|
||||||
|
|
@ -1,60 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define MFC2010
|
|
||||||
#define PLAYERBUILD
|
#define PLAYERBUILD
|
||||||
#define ARBITERBUILD
|
// #define ARBITERBUILD
|
||||||
// #define DEBUG_SERVERREPLICATOR__PROCESSPACKET
|
|
||||||
|
|
||||||
/*
|
|
||||||
* PLAYERBUILD (2010 and 2012):
|
|
||||||
* - The "-jobId" argument is parsed
|
|
||||||
*
|
|
||||||
* ARBITERBUILD:
|
|
||||||
* - DataModel::getJobId is hooked
|
|
||||||
* - DataModel::~DataModel is hooked
|
|
||||||
* - StandardOut::print is hooked
|
|
||||||
* - Network::RakNetAddressToString is hooked
|
|
||||||
* - The "-jobId" argument becomes available
|
|
||||||
* - HTTP requests and console output is logged to a file
|
|
||||||
*/
|
|
||||||
|
|
||||||
// RobloxApp (2010)
|
|
||||||
#ifdef MFC2010
|
|
||||||
|
|
||||||
#define CLASSPADDING_DATAMODEL__JOBID 728
|
|
||||||
|
|
||||||
#define ADDRESS_STANDARDOUT__PRINT 0x0059F340
|
|
||||||
#define ADDRESS_CRYPT__VERIFYSIGNATUREBASE64 0x0079ECF0
|
|
||||||
#define ADDRESS_SERVERREPLICATOR__SENDTOP 0x00506910
|
|
||||||
#define ADDRESS_SERVERREPLICATOR__PROCESSPACKET 0x00507420
|
|
||||||
#define ADDRESS_SERVERREPLICATOR__PROCESSTICKET 0x0
|
|
||||||
#define ADDRESS_GAME__CONSTRUCT 0x0047DBF0
|
|
||||||
#define ADDRESS_HTTP__HTTPGETPOSTWININET 0x006A9210
|
|
||||||
#define ADDRESS_HTTP__TRUSTCHECK 0x005A2680
|
|
||||||
#define ADDRESS_CONTEXT__REQUIREPERMISSION 0x004A2360
|
|
||||||
#define ADDRESS_CONTEXT__ISINROLE 0x0065E550
|
|
||||||
|
|
||||||
// MFC specific definitions
|
|
||||||
#define CLASSLOCATION_CROBLOXAPP 0x00BFF898
|
|
||||||
#define CLASSLOCATION_CAPP 0x00405D20
|
|
||||||
|
|
||||||
#define CLASSPADDING_CROBLOXDOC__WORKSPACE 40
|
|
||||||
|
|
||||||
#define ADDRESS_CAPP__CREATEGAME 0x00405D20
|
|
||||||
#define ADDRESS_CAPP__ROBLOXAUTHENTICATE 0x00408060
|
|
||||||
#define ADDRESS_CROBLOXAPP__INITINSTANCE 0x00452900
|
|
||||||
#define ADDRESS_CROBLOXAPP__CREATEDOCUMENT 0x0044F6E0
|
|
||||||
#define ADDRESS_CWORKSPACE__EXECURLSCRIPT 0x0047EC10
|
|
||||||
#define ADDRESS_CROBLOXCOMMANDLINEINFO__PARSEPARAM 0x00450AC0
|
|
||||||
#define ADDRESS_CCOMMANDLINEINFO__PARSELAST 0x007A80A0
|
|
||||||
|
|
||||||
// Player specific definitions
|
|
||||||
#define ADDRESS_APPLICATION__PARSEARGUMENTS 0x0
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// RobloxApp (2011)
|
|
||||||
#ifdef MFC2011
|
|
||||||
|
|
||||||
#define CLASSPADDING_DATAMODEL__JOBID 739
|
#define CLASSPADDING_DATAMODEL__JOBID 739
|
||||||
|
|
||||||
|
|
@ -69,7 +16,6 @@
|
||||||
#define ADDRESS_CONTEXT__REQUIREPERMISSION 0x0
|
#define ADDRESS_CONTEXT__REQUIREPERMISSION 0x0
|
||||||
#define ADDRESS_CONTEXT__ISINROLE 0x0
|
#define ADDRESS_CONTEXT__ISINROLE 0x0
|
||||||
|
|
||||||
// MFC specific definitions
|
|
||||||
#define CLASSLOCATION_CROBLOXAPP 0x00CBA8A0
|
#define CLASSLOCATION_CROBLOXAPP 0x00CBA8A0
|
||||||
#define CLASSLOCATION_CAPP 0x00406D80
|
#define CLASSLOCATION_CAPP 0x00406D80
|
||||||
|
|
||||||
|
|
@ -83,81 +29,6 @@
|
||||||
#define ADDRESS_CROBLOXCOMMANDLINEINFO__PARSEPARAM 0x0045EE50
|
#define ADDRESS_CROBLOXCOMMANDLINEINFO__PARSEPARAM 0x0045EE50
|
||||||
#define ADDRESS_CCOMMANDLINEINFO__PARSELAST 0x0081354A
|
#define ADDRESS_CCOMMANDLINEINFO__PARSELAST 0x0081354A
|
||||||
|
|
||||||
// Player specific definitions
|
|
||||||
#define ADDRESS_APPLICATION__PARSEARGUMENTS 0x0
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// RobloxApp/RobloxPlayer/RobloxStudio (2012)
|
|
||||||
#ifdef MFC2012
|
|
||||||
|
|
||||||
#define ADDRESS_HTTP__TRUSTCHECK 0x006D5D20
|
|
||||||
#define ADDRESS_HTTP__TRUSTCHECK 0x006D5D20
|
|
||||||
#define ADDRESS_CRYPT__VERIFYSIGNATUREBASE64 0x009B1D20
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// RobloxPlayerBeta (2012)
|
|
||||||
#ifdef PLAYER2012
|
|
||||||
|
|
||||||
/*
|
|
||||||
2012 is a bit different in that the player executable is protected with
|
|
||||||
VMProtect. VMProtect offsets the memory locations randomly on startup.
|
|
||||||
This causes address definitions (such as the ones below) to look a bit off.
|
|
||||||
|
|
||||||
For example, if the beginning of the program is located at 0x00BF1000 and
|
|
||||||
you have a TrustCheck hook that is at 0x00DF20A0, VMProtect will offset the
|
|
||||||
memory location from 0x00000000 - 0x00FF0000. Thus, the 0x00BF0000 in
|
|
||||||
0x00BF1000 is actually an offset.
|
|
||||||
|
|
||||||
With that offset, the address you'd have to put for your TrustCheck hook will
|
|
||||||
be (0x00DF20A0 - 0x00BF0000) = 0x002020A0. Then, you just put that address
|
|
||||||
into the function.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// MFC specific definitions
|
|
||||||
#define CLASSLOCATION_CROBLOXAPP 0x0
|
|
||||||
#define CLASSLOCATION_CAPP 0x0
|
|
||||||
|
|
||||||
#define CLASSPADDING_CROBLOXDOC__WORKSPACE 40
|
|
||||||
|
|
||||||
#define ADDRESS_CAPP__CREATEGAME 0x0
|
|
||||||
#define ADDRESS_CAPP__ROBLOXAUTHENTICATE 0x0
|
|
||||||
#define ADDRESS_CROBLOXAPP__INITINSTANCE 0x0
|
|
||||||
#define ADDRESS_CROBLOXAPP__CREATEDOCUMENT 0x0
|
|
||||||
#define ADDRESS_CWORKSPACE__EXECURLSCRIPT 0x0
|
|
||||||
#define ADDRESS_CROBLOXCOMMANDLINEINFO__PARSEPARAM 0x0
|
|
||||||
#define ADDRESS_CCOMMANDLINEINFO__PARSELAST 0x0
|
|
||||||
|
|
||||||
#define CLASSPADDING_DATAMODEL__JOBID 762
|
|
||||||
|
|
||||||
#define ADDRESS_DATAMODEL__GETJOBID Patches::GetAddressByOffset(0x002079A0)
|
|
||||||
#define ADDRESS_STANDARDOUT__PRINT Patches::GetAddressByOffset(0x0023A8C0)
|
|
||||||
#define ADDRESS_CRYPT__VERIFYSIGNATUREBASE64 Patches::GetAddressByOffset(0x00526330)
|
|
||||||
#define ADDRESS_SERVERREPLICATOR__SENDTOP 0x0
|
|
||||||
#define ADDRESS_SERVERREPLICATOR__PROCESSTICKET 0x0
|
|
||||||
#define ADDRESS_NETWORK__RAKNETADDRESSTOSTRING 0x0
|
|
||||||
#define ADDRESS_HTTP__TRUSTCHECK Patches::GetAddressByOffset(0x002020A0)
|
|
||||||
#define ADDRESS_HTTP__HTTPGETPOSTWININET 0x0
|
|
||||||
|
|
||||||
// Player specific definitions
|
|
||||||
#define ADDRESS_APPLICATION__PARSEARGUMENTS Patches::GetAddressByOffset(0x00004E60)
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// RobloxStudioBeta (2012)
|
|
||||||
#ifdef STUDIO2012
|
|
||||||
|
|
||||||
#define ADDRESS_HTTP__TRUSTCHECK Patches::GetAddressByOffset(0x001931A0)
|
|
||||||
#define ADDRESS_HTTP__HTTPGETPOSTWININET 0x0
|
|
||||||
#define ADDRESS_CRYPT__VERIFYSIGNATUREBASE64 Patches::GetAddressByOffset(0x004CD250)
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define RR_STOP_PROCESSING_AND_DEALLOCATE 0
|
|
||||||
#define RR_CONTINUE_PROCESSING 1
|
|
||||||
#define RR_STOP_PROCESSING 2
|
|
||||||
|
|
||||||
#ifndef _DEBUG
|
#ifndef _DEBUG
|
||||||
#define PADDING_STRUCT 1
|
#define PADDING_STRUCT 1
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#if defined(ARBITERBUILD) && defined(PLAYER2012)
|
|
||||||
|
|
||||||
#include "Classes.h"
|
|
||||||
|
|
||||||
typedef BOOL(__thiscall* Application__ParseArguments_t)(int _this, int a2, const char* argv);
|
|
||||||
BOOL __fastcall Application__ParseArguments_hook(int _this, void*, int a2, const char* argv);
|
|
||||||
extern Application__ParseArguments_t Application__ParseArguments;
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,12 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Classes.h"
|
#include "Config.h"
|
||||||
|
|
||||||
#if defined(MFC2010) || defined(MFC2011)
|
|
||||||
|
|
||||||
// 2010 struct definitions:
|
|
||||||
// 0x47E010: CWorkspace->DoExecScript()
|
|
||||||
// 0x47EC10: CWorkspace->ExecUrlScript()
|
|
||||||
|
|
||||||
class CWorkspace;
|
class CWorkspace;
|
||||||
|
|
||||||
|
|
@ -20,14 +14,8 @@ struct CRobloxDoc
|
||||||
|
|
||||||
struct CApp;
|
struct CApp;
|
||||||
|
|
||||||
// const auto CApp__CreateGame = (CWorkspace * (__thiscall*)(CApp * _this, int, LPCWSTR))ADDRESS_CAPP__CREATEGAME;
|
|
||||||
const auto CApp__RobloxAuthenticate = (void* (__thiscall*)(CApp * _this, LPVOID, LPCWSTR, LPCWSTR))ADDRESS_CAPP__ROBLOXAUTHENTICATE;
|
const auto CApp__RobloxAuthenticate = (void* (__thiscall*)(CApp * _this, LPVOID, LPCWSTR, LPCWSTR))ADDRESS_CAPP__ROBLOXAUTHENTICATE;
|
||||||
|
|
||||||
// 2010 struct definitions:
|
|
||||||
// 0x405D20: CRobloxApp->CreateDocument()
|
|
||||||
// 0x44F6F0: CRobloxApp->ExitInstance()
|
|
||||||
// 0x452900: CRobloxApp->InitInstance()
|
|
||||||
|
|
||||||
struct CRobloxApp;
|
struct CRobloxApp;
|
||||||
|
|
||||||
const auto CRobloxApp__CreateDocument = (CRobloxDoc * (__thiscall*)(CRobloxApp * _this))ADDRESS_CROBLOXAPP__CREATEDOCUMENT;
|
const auto CRobloxApp__CreateDocument = (CRobloxDoc * (__thiscall*)(CRobloxApp * _this))ADDRESS_CROBLOXAPP__CREATEDOCUMENT;
|
||||||
|
|
@ -49,6 +37,4 @@ BOOL __fastcall CRobloxApp__InitInstance_hook(CRobloxApp* _this);
|
||||||
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);
|
||||||
|
|
||||||
extern CRobloxApp__InitInstance_t CRobloxApp__InitInstance;
|
extern CRobloxApp__InitInstance_t CRobloxApp__InitInstance;
|
||||||
extern CRobloxCommandLineInfo__ParseParam_t CRobloxCommandLineInfo__ParseParam;
|
extern CRobloxCommandLineInfo__ParseParam_t CRobloxCommandLineInfo__ParseParam;
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Classes.h"
|
#include "Config.h"
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#include <wincrypt.h>
|
#include <wincrypt.h>
|
||||||
|
|
||||||
#include "Classes.h"
|
#include "Config.h"
|
||||||
|
|
||||||
typedef void(__thiscall* Crypt__verifySignatureBase64_t)(HCRYPTPROV* _this, int a2, BYTE* pbData, int a4, int a5, int a6, DWORD dwDataLen, int a8, int a9, int a10, int a11, int a12, int a13, int a14, int a15);
|
typedef void(__thiscall* Crypt__verifySignatureBase64_t)(HCRYPTPROV* _this, int a2, BYTE* pbData, int a4, int a5, int a6, DWORD dwDataLen, int a8, int a9, int a10, int a11, int a12, int a13, int a14, int a15);
|
||||||
void __fastcall Crypt__verifySignatureBase64_hook(HCRYPTPROV* _this, void*, int a2, BYTE* pbData, int a4, int a5, int a6, DWORD dwDataLen, int a8, int a9, int a10, int a11, int a12, int a13, int a14, int a15);
|
void __fastcall Crypt__verifySignatureBase64_hook(HCRYPTPROV* _this, void*, int a2, BYTE* pbData, int a4, int a5, int a6, DWORD dwDataLen, int a8, int a9, int a10, int a11, int a12, int a13, int a14, int a15);
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
#include <rapidjson/document.h>
|
#include <rapidjson/document.h>
|
||||||
|
|
||||||
#include "Classes.h"
|
#include "Config.h"
|
||||||
|
|
||||||
struct Http
|
struct Http
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Classes.h"
|
#include "Config.h"
|
||||||
|
|
||||||
#if defined(ARBITERBUILD) && defined(MFC2011)
|
#if defined(ARBITERBUILD)
|
||||||
|
|
||||||
struct Packet
|
struct Packet
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Classes.h"
|
#include "Config.h"
|
||||||
|
|
||||||
void InitializeOutput();
|
void InitializeOutput();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,6 @@ namespace Patches
|
||||||
extern std::vector<Patch> patchList;
|
extern std::vector<Patch> patchList;
|
||||||
|
|
||||||
LONG Apply();
|
LONG Apply();
|
||||||
VOID ResolveOffset();
|
|
||||||
INT GetAddressByOffset(int address);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define START_PATCH_LIST() std::vector<Patches::Patch> Patches::patchList = {
|
#define START_PATCH_LIST() std::vector<Patches::Patch> Patches::patchList = {
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,6 @@
|
||||||
|
|
||||||
#include "Patches.h"
|
#include "Patches.h"
|
||||||
|
|
||||||
int addressOffset;
|
|
||||||
|
|
||||||
LONG Patches::Apply()
|
LONG Patches::Apply()
|
||||||
{
|
{
|
||||||
DetourTransactionBegin();
|
DetourTransactionBegin();
|
||||||
|
|
@ -14,48 +12,4 @@ LONG Patches::Apply()
|
||||||
}
|
}
|
||||||
|
|
||||||
return DetourTransactionCommit();
|
return DetourTransactionCommit();
|
||||||
}
|
|
||||||
|
|
||||||
VOID Patches::ResolveOffset()
|
|
||||||
{
|
|
||||||
// the only surviving fragment of PolygonUtil.dll
|
|
||||||
// RIP 05/08/2021 - 20/01/2022
|
|
||||||
|
|
||||||
MEMORY_BASIC_INFORMATION mbi;
|
|
||||||
DWORD ProcID = GetCurrentProcessId();
|
|
||||||
HANDLE Handle = OpenProcess(PROCESS_ALL_ACCESS, TRUE, ProcID);
|
|
||||||
|
|
||||||
unsigned int Opcode = 0xC7F18B56;
|
|
||||||
int BaseAddress = 0x00001000;
|
|
||||||
|
|
||||||
int Offset = 0x00010000;
|
|
||||||
int Searches = 0xFFF;
|
|
||||||
|
|
||||||
for (int i = 1; i <= Searches; i++)
|
|
||||||
{
|
|
||||||
int SearchAddress = Offset * i;
|
|
||||||
int Address = SearchAddress + BaseAddress;
|
|
||||||
if (VirtualQuery((LPVOID)Address, &mbi, sizeof(mbi)) == 0) continue;
|
|
||||||
|
|
||||||
std::vector<int> buffer(mbi.RegionSize);
|
|
||||||
|
|
||||||
if (!ReadProcessMemory(Handle, (LPCVOID)Address, &buffer[0], buffer.size(), NULL)) continue;
|
|
||||||
|
|
||||||
if (buffer[0] == Opcode)
|
|
||||||
{
|
|
||||||
addressOffset = SearchAddress;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (SearchAddress == Offset * Searches)
|
|
||||||
{
|
|
||||||
ExitProcess(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
INT Patches::GetAddressByOffset(int address)
|
|
||||||
{
|
|
||||||
if (!addressOffset) ResolveOffset();
|
|
||||||
return address + addressOffset;
|
|
||||||
}
|
}
|
||||||
|
|
@ -48,7 +48,7 @@
|
||||||
<EnableManagedIncrementalBuild>true</EnableManagedIncrementalBuild>
|
<EnableManagedIncrementalBuild>true</EnableManagedIncrementalBuild>
|
||||||
<TargetName>Tadah</TargetName>
|
<TargetName>Tadah</TargetName>
|
||||||
<OutDir>$(SolutionDir)bin\$(Configuration)\</OutDir>
|
<OutDir>$(SolutionDir)bin\$(Configuration)\</OutDir>
|
||||||
<IntDir>obj\$(Configuration)</IntDir>
|
<IntDir>obj\$(Configuration)\</IntDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<LinkIncremental>false</LinkIncremental>
|
<LinkIncremental>false</LinkIncremental>
|
||||||
|
|
@ -126,13 +126,11 @@
|
||||||
<ClInclude Include="Include\Config.h" />
|
<ClInclude Include="Include\Config.h" />
|
||||||
<ClInclude Include="Include\Hooks\Context.h" />
|
<ClInclude Include="Include\Hooks\Context.h" />
|
||||||
<ClInclude Include="Include\Hooks\CRoblox.h" />
|
<ClInclude Include="Include\Hooks\CRoblox.h" />
|
||||||
<ClInclude Include="Include\Hooks\Application.h" />
|
|
||||||
<ClInclude Include="Include\Hooks\StandardOut.h" />
|
<ClInclude Include="Include\Hooks\StandardOut.h" />
|
||||||
<ClInclude Include="Include\Hooks\ServerReplicator.h" />
|
<ClInclude Include="Include\Hooks\ServerReplicator.h" />
|
||||||
<ClInclude Include="Include\Hooks\Http.h" />
|
<ClInclude Include="Include\Hooks\Http.h" />
|
||||||
<ClInclude Include="Include\Patches.h" />
|
<ClInclude Include="Include\Patches.h" />
|
||||||
<ClInclude Include="Include\pch.h" />
|
<ClInclude Include="Include\pch.h" />
|
||||||
<ClInclude Include="Include\Classes.h" />
|
|
||||||
<ClInclude Include="Include\Util.h" />
|
<ClInclude Include="Include\Util.h" />
|
||||||
<ClInclude Include="Include\Hooks\Crypt.h" />
|
<ClInclude Include="Include\Hooks\Crypt.h" />
|
||||||
<ClInclude Include="Include\resource.h" />
|
<ClInclude Include="Include\resource.h" />
|
||||||
|
|
@ -146,7 +144,6 @@
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="Hooks\Application.cpp" />
|
|
||||||
<ClCompile Include="Hooks\StandardOut.cpp" />
|
<ClCompile Include="Hooks\StandardOut.cpp" />
|
||||||
<ClCompile Include="Hooks\ServerReplicator.cpp" />
|
<ClCompile Include="Hooks\ServerReplicator.cpp" />
|
||||||
<ClCompile Include="Hooks\Http.cpp" />
|
<ClCompile Include="Hooks\Http.cpp" />
|
||||||
|
|
|
||||||
|
|
@ -39,9 +39,6 @@
|
||||||
<ClInclude Include="Include\Hooks\CRoblox.h">
|
<ClInclude Include="Include\Hooks\CRoblox.h">
|
||||||
<Filter>Header Files\Hooks</Filter>
|
<Filter>Header Files\Hooks</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="Include\Hooks\Application.h">
|
|
||||||
<Filter>Header Files\Hooks</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="Include\Hooks\ServerReplicator.h">
|
<ClInclude Include="Include\Hooks\ServerReplicator.h">
|
||||||
<Filter>Header Files\Hooks</Filter>
|
<Filter>Header Files\Hooks</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
|
@ -54,9 +51,6 @@
|
||||||
<ClInclude Include="Include\Hooks\Context.h">
|
<ClInclude Include="Include\Hooks\Context.h">
|
||||||
<Filter>Header Files\Hooks</Filter>
|
<Filter>Header Files\Hooks</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="Include\Classes.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="Include\resource.h">
|
<ClInclude Include="Include\resource.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
|
@ -80,9 +74,6 @@
|
||||||
<ClCompile Include="Hooks\CRoblox.cpp">
|
<ClCompile Include="Hooks\CRoblox.cpp">
|
||||||
<Filter>Source Files\Hooks</Filter>
|
<Filter>Source Files\Hooks</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="Hooks\Application.cpp">
|
|
||||||
<Filter>Source Files\Hooks</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="Hooks\ServerReplicator.cpp">
|
<ClCompile Include="Hooks\ServerReplicator.cpp">
|
||||||
<Filter>Source Files\Hooks</Filter>
|
<Filter>Source Files\Hooks</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
|
@ -97,7 +88,7 @@
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="PolygonDLL.rc">
|
<ResourceCompile Include="Tadah.DLL.rc">
|
||||||
<Filter>Resource Files</Filter>
|
<Filter>Resource Files</Filter>
|
||||||
</ResourceCompile>
|
</ResourceCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -11,19 +11,10 @@
|
||||||
|
|
||||||
#if defined(ARBITERBUILD)
|
#if defined(ARBITERBUILD)
|
||||||
#include "Hooks/StandardOut.h"
|
#include "Hooks/StandardOut.h"
|
||||||
|
#include "Hooks/ServerReplicator.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ARBITERBUILD) && defined(MFC2011)
|
|
||||||
#include "Hooks/ReplicatorSecurity.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(ARBITERBUILD) && defined(PLAYER2012)
|
|
||||||
#include "Hooks/Application.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(MFC2010) || defined(MFC2011)
|
|
||||||
#include "Hooks/CRoblox.h"
|
#include "Hooks/CRoblox.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
START_PATCH_LIST()
|
START_PATCH_LIST()
|
||||||
|
|
||||||
|
|
@ -56,11 +47,7 @@ ADD_PATCH(CRobloxCommandLineInfo__ParseParam, CRobloxCommandLineInfo__ParseParam
|
||||||
|
|
||||||
END_PATCH_LIST()
|
END_PATCH_LIST()
|
||||||
|
|
||||||
// DLLs for release will be loaded with VMProtect, so this isn't necessary
|
|
||||||
// Arbiter will still use Stud_PE for ease in swapping DLLs however
|
|
||||||
// #ifdef ARBITERBUILD
|
|
||||||
void __declspec(dllexport) import() {}
|
void __declspec(dllexport) import() {}
|
||||||
// #endif
|
|
||||||
|
|
||||||
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
|
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue