From dce47e283a22f14cc2d811053078ee947fc329af Mon Sep 17 00:00:00 2001 From: lightbulblighter <59720715+lightbulblighter@users.noreply.github.com> Date: Tue, 2 Aug 2022 13:49:00 -0700 Subject: [PATCH] Only 2011 --- Tadah.DLL/Hooks/Application.cpp | 33 ------ Tadah.DLL/Hooks/CRoblox.cpp | 21 +--- Tadah.DLL/Hooks/Context.cpp | 4 + Tadah.DLL/Hooks/Crypt.cpp | 6 +- Tadah.DLL/Hooks/ServerReplicator.cpp | 20 +--- Tadah.DLL/Hooks/StandardOut.cpp | 38 +----- Tadah.DLL/Include/Classes.h | 29 ----- Tadah.DLL/Include/Config.h | 131 +-------------------- Tadah.DLL/Include/Hooks/Application.h | 11 -- Tadah.DLL/Include/Hooks/CRoblox.h | 18 +-- Tadah.DLL/Include/Hooks/Context.h | 2 +- Tadah.DLL/Include/Hooks/Crypt.h | 2 +- Tadah.DLL/Include/Hooks/Http.h | 2 +- Tadah.DLL/Include/Hooks/ServerReplicator.h | 4 +- Tadah.DLL/Include/Hooks/StandardOut.h | 2 +- Tadah.DLL/Include/Patches.h | 2 - Tadah.DLL/Patches.cpp | 46 -------- Tadah.DLL/Tadah.DLL.vcxproj | 5 +- Tadah.DLL/Tadah.DLL.vcxproj.filters | 11 +- Tadah.DLL/dllmain.cpp | 15 +-- 20 files changed, 22 insertions(+), 380 deletions(-) delete mode 100644 Tadah.DLL/Hooks/Application.cpp delete mode 100644 Tadah.DLL/Include/Classes.h delete mode 100644 Tadah.DLL/Include/Hooks/Application.h diff --git a/Tadah.DLL/Hooks/Application.cpp b/Tadah.DLL/Hooks/Application.cpp deleted file mode 100644 index 8e9b2df..0000000 --- a/Tadah.DLL/Hooks/Application.cpp +++ /dev/null @@ -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 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 \ No newline at end of file diff --git a/Tadah.DLL/Hooks/CRoblox.cpp b/Tadah.DLL/Hooks/CRoblox.cpp index 729b705..e89e251 100644 --- a/Tadah.DLL/Hooks/CRoblox.cpp +++ b/Tadah.DLL/Hooks/CRoblox.cpp @@ -2,8 +2,6 @@ #include "Hooks/CRoblox.h" -#if defined(MFC2010) || defined(MFC2011) - static bool hasAuthUrlArg = false; static bool hasAuthTicketArg = 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()); } - // DataModel* datamodel = reinterpret_cast(CLASSLOCATION_CAPP); - - // printf("Attempting to create DataModel...\n"); - // char* v27; - // DataModel__createDataModel((int)&v27, 1); - #ifdef PLAYERBUILD if (hasJoinArg && !joinScriptUrl.empty()) { 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); 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; } } @@ -118,6 +103,4 @@ void __fastcall CRobloxCommandLineInfo__ParseParam_hook(CRobloxCommandLineInfo* #endif CRobloxCommandLineInfo__ParseParam(_this, pszParam, bFlag, bLast); -} - -#endif \ No newline at end of file +} \ No newline at end of file diff --git a/Tadah.DLL/Hooks/Context.cpp b/Tadah.DLL/Hooks/Context.cpp index df01454..226f761 100644 --- a/Tadah.DLL/Hooks/Context.cpp +++ b/Tadah.DLL/Hooks/Context.cpp @@ -14,9 +14,13 @@ void __fastcall Context__requirePermission_hook(void* _this, void*, int permissi if (!Context__isInRole(identity, permission)) { if (operation != 0) + { throw std::runtime_error("The current identity (" + std::to_string(identity) + ") cannot " + std::string(operation) + " (requires " + std::to_string(permission) + ")"); + } else + { throw std::runtime_error("The current identity (" + std::to_string(identity) + ") cannot perform the requested operation (requires " + std::to_string(permission) + ")"); + } } } diff --git a/Tadah.DLL/Hooks/Crypt.cpp b/Tadah.DLL/Hooks/Crypt.cpp index ef5c4ff..555bd2a 100644 --- a/Tadah.DLL/Hooks/Crypt.cpp +++ b/Tadah.DLL/Hooks/Crypt.cpp @@ -132,10 +132,6 @@ void __fastcall Crypt__verifySignatureBase64_hook(HCRYPTPROV* _this, void*, int // Verify signature if (!Crypt().verifySignatureBase64(message, signatureBase64, CALG_SHA_256)) { - // Backwards compatibility for sha1 signatures - if (!Crypt().verifySignatureBase64(message, signatureBase64, CALG_SHA1)) - { - throw std::runtime_error(""); - } + throw std::runtime_error(""); } } \ No newline at end of file diff --git a/Tadah.DLL/Hooks/ServerReplicator.cpp b/Tadah.DLL/Hooks/ServerReplicator.cpp index 64c11d2..c34348a 100644 --- a/Tadah.DLL/Hooks/ServerReplicator.cpp +++ b/Tadah.DLL/Hooks/ServerReplicator.cpp @@ -2,7 +2,7 @@ #include "Hooks/ServerReplicator.h" -#if defined(ARBITERBUILD) && defined(MFC2011) +#if defined(ARBITERBUILD) static std::map rakPeers; @@ -13,12 +13,10 @@ void __fastcall ServerReplicator__sendTop_hook(ServerReplicator* _this, void*, R { if (_this->isAuthenticated) { - // printf("ServerReplicator::sendTop called: player is authenticated\n"); ServerReplicator__sendTop(_this, peer); } else if (rakPeers.find(_this) == rakPeers.end()) { - // printf("ServerReplicator::sendTop called: player is not authenticated\n"); rakPeers.insert(std::pair(_this, peer)); } } @@ -27,25 +25,11 @@ void __fastcall ServerReplicator__processTicket_hook(ServerReplicator* _this, vo { 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); - 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); } - else - { - // printf("ServerReplicator::sendTop called: player is not authenticated\n"); - } } #endif \ No newline at end of file diff --git a/Tadah.DLL/Hooks/StandardOut.cpp b/Tadah.DLL/Hooks/StandardOut.cpp index 2eccdb8..737095c 100644 --- a/Tadah.DLL/Hooks/StandardOut.cpp +++ b/Tadah.DLL/Hooks/StandardOut.cpp @@ -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); SetStdHandle(STD_OUTPUT_HANDLE, outputHandle); - printf("PolygonDLL v1.0.0\n"); + printf("Tadah.DLL v1.0.0\n"); #ifdef _DEBUG SetConsoleTextAttribute(outputHandle, FOREGROUND_RED | FOREGROUND_GREEN); printf("Compiled as Debug\n\n"); #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; @@ -37,35 +30,6 @@ void __fastcall StandardOut__print_hook(int _this, void*, int type, std::string* message = reinterpret_cast((int)message + 4); #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) { case RBX__MESSAGE_OUTPUT: diff --git a/Tadah.DLL/Include/Classes.h b/Tadah.DLL/Include/Classes.h deleted file mode 100644 index cdc5851..0000000 --- a/Tadah.DLL/Include/Classes.h +++ /dev/null @@ -1,29 +0,0 @@ -#pragma once - -#include - -#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; - 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(__thiscall*)(bool startHeartbeat))ADDRESS_DATAMODEL__CREATEDATAMODEL; \ No newline at end of file diff --git a/Tadah.DLL/Include/Config.h b/Tadah.DLL/Include/Config.h index 884ee8a..59a3904 100644 --- a/Tadah.DLL/Include/Config.h +++ b/Tadah.DLL/Include/Config.h @@ -1,60 +1,7 @@ #pragma once -#define MFC2010 #define PLAYERBUILD -#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 ARBITERBUILD #define CLASSPADDING_DATAMODEL__JOBID 739 @@ -69,7 +16,6 @@ #define ADDRESS_CONTEXT__REQUIREPERMISSION 0x0 #define ADDRESS_CONTEXT__ISINROLE 0x0 -// MFC specific definitions #define CLASSLOCATION_CROBLOXAPP 0x00CBA8A0 #define CLASSLOCATION_CAPP 0x00406D80 @@ -83,81 +29,6 @@ #define ADDRESS_CROBLOXCOMMANDLINEINFO__PARSEPARAM 0x0045EE50 #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 #define PADDING_STRUCT 1 #else diff --git a/Tadah.DLL/Include/Hooks/Application.h b/Tadah.DLL/Include/Hooks/Application.h deleted file mode 100644 index 5b4eee5..0000000 --- a/Tadah.DLL/Include/Hooks/Application.h +++ /dev/null @@ -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 \ No newline at end of file diff --git a/Tadah.DLL/Include/Hooks/CRoblox.h b/Tadah.DLL/Include/Hooks/CRoblox.h index 87d5b15..c59b593 100644 --- a/Tadah.DLL/Include/Hooks/CRoblox.h +++ b/Tadah.DLL/Include/Hooks/CRoblox.h @@ -1,12 +1,6 @@ #pragma once -#include "Classes.h" - -#if defined(MFC2010) || defined(MFC2011) - -// 2010 struct definitions: -// 0x47E010: CWorkspace->DoExecScript() -// 0x47EC10: CWorkspace->ExecUrlScript() +#include "Config.h" class CWorkspace; @@ -20,14 +14,8 @@ struct CRobloxDoc 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; -// 2010 struct definitions: -// 0x405D20: CRobloxApp->CreateDocument() -// 0x44F6F0: CRobloxApp->ExitInstance() -// 0x452900: CRobloxApp->InitInstance() - struct CRobloxApp; 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); extern CRobloxApp__InitInstance_t CRobloxApp__InitInstance; -extern CRobloxCommandLineInfo__ParseParam_t CRobloxCommandLineInfo__ParseParam; - -#endif \ No newline at end of file +extern CRobloxCommandLineInfo__ParseParam_t CRobloxCommandLineInfo__ParseParam; \ No newline at end of file diff --git a/Tadah.DLL/Include/Hooks/Context.h b/Tadah.DLL/Include/Hooks/Context.h index 80782c1..336f31f 100644 --- a/Tadah.DLL/Include/Hooks/Context.h +++ b/Tadah.DLL/Include/Hooks/Context.h @@ -1,6 +1,6 @@ #pragma once -#include "Classes.h" +#include "Config.h" #ifdef _DEBUG diff --git a/Tadah.DLL/Include/Hooks/Crypt.h b/Tadah.DLL/Include/Hooks/Crypt.h index 97d00bd..87a7d65 100644 --- a/Tadah.DLL/Include/Hooks/Crypt.h +++ b/Tadah.DLL/Include/Hooks/Crypt.h @@ -2,7 +2,7 @@ #include -#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); 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); diff --git a/Tadah.DLL/Include/Hooks/Http.h b/Tadah.DLL/Include/Hooks/Http.h index 76a746f..50ce2d0 100644 --- a/Tadah.DLL/Include/Hooks/Http.h +++ b/Tadah.DLL/Include/Hooks/Http.h @@ -3,7 +3,7 @@ #include #include -#include "Classes.h" +#include "Config.h" struct Http { diff --git a/Tadah.DLL/Include/Hooks/ServerReplicator.h b/Tadah.DLL/Include/Hooks/ServerReplicator.h index 001b751..8eae103 100644 --- a/Tadah.DLL/Include/Hooks/ServerReplicator.h +++ b/Tadah.DLL/Include/Hooks/ServerReplicator.h @@ -1,8 +1,8 @@ #pragma once -#include "Classes.h" +#include "Config.h" -#if defined(ARBITERBUILD) && defined(MFC2011) +#if defined(ARBITERBUILD) struct Packet { diff --git a/Tadah.DLL/Include/Hooks/StandardOut.h b/Tadah.DLL/Include/Hooks/StandardOut.h index afdbd79..fb0d8cf 100644 --- a/Tadah.DLL/Include/Hooks/StandardOut.h +++ b/Tadah.DLL/Include/Hooks/StandardOut.h @@ -1,6 +1,6 @@ #pragma once -#include "Classes.h" +#include "Config.h" void InitializeOutput(); diff --git a/Tadah.DLL/Include/Patches.h b/Tadah.DLL/Include/Patches.h index a2e0bb8..d9c9b81 100644 --- a/Tadah.DLL/Include/Patches.h +++ b/Tadah.DLL/Include/Patches.h @@ -9,8 +9,6 @@ namespace Patches extern std::vector patchList; LONG Apply(); - VOID ResolveOffset(); - INT GetAddressByOffset(int address); } #define START_PATCH_LIST() std::vector Patches::patchList = { diff --git a/Tadah.DLL/Patches.cpp b/Tadah.DLL/Patches.cpp index 99920b3..909d6c9 100644 --- a/Tadah.DLL/Patches.cpp +++ b/Tadah.DLL/Patches.cpp @@ -2,8 +2,6 @@ #include "Patches.h" -int addressOffset; - LONG Patches::Apply() { DetourTransactionBegin(); @@ -14,48 +12,4 @@ LONG Patches::Apply() } 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 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; } \ No newline at end of file diff --git a/Tadah.DLL/Tadah.DLL.vcxproj b/Tadah.DLL/Tadah.DLL.vcxproj index 934ccae..87307dd 100644 --- a/Tadah.DLL/Tadah.DLL.vcxproj +++ b/Tadah.DLL/Tadah.DLL.vcxproj @@ -48,7 +48,7 @@ true Tadah $(SolutionDir)bin\$(Configuration)\ - obj\$(Configuration) + obj\$(Configuration)\ false @@ -126,13 +126,11 @@ - - @@ -146,7 +144,6 @@ Create Create - diff --git a/Tadah.DLL/Tadah.DLL.vcxproj.filters b/Tadah.DLL/Tadah.DLL.vcxproj.filters index 36e1a61..7fc3230 100644 --- a/Tadah.DLL/Tadah.DLL.vcxproj.filters +++ b/Tadah.DLL/Tadah.DLL.vcxproj.filters @@ -39,9 +39,6 @@ Header Files\Hooks - - Header Files\Hooks - Header Files\Hooks @@ -54,9 +51,6 @@ Header Files\Hooks - - Header Files - Header Files @@ -80,9 +74,6 @@ Source Files\Hooks - - Source Files\Hooks - Source Files\Hooks @@ -97,7 +88,7 @@ - + Resource Files diff --git a/Tadah.DLL/dllmain.cpp b/Tadah.DLL/dllmain.cpp index eb7bb37..649854d 100644 --- a/Tadah.DLL/dllmain.cpp +++ b/Tadah.DLL/dllmain.cpp @@ -11,19 +11,10 @@ #if defined(ARBITERBUILD) #include "Hooks/StandardOut.h" +#include "Hooks/ServerReplicator.h" #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" -#endif START_PATCH_LIST() @@ -56,11 +47,7 @@ ADD_PATCH(CRobloxCommandLineInfo__ParseParam, CRobloxCommandLineInfo__ParseParam 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() {} -// #endif BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) {