diff --git a/PolygonClientUtilities/Config.h b/PolygonClientUtilities/Config.h
index 7c90197..5e73e92 100644
--- a/PolygonClientUtilities/Config.h
+++ b/PolygonClientUtilities/Config.h
@@ -6,6 +6,7 @@
// RobloxApp (2010)
#ifdef MFC2010
#define ADDRESS_STANDARDOUT__PRINT 0x0059F340
+#define ADDRESS_NETWORK__RAKNETADDRESSTOSTRING 0x004FC1A0
#define ADDRESS_HTTP__TRUSTCHECK 0x005A2680
#define ADDRESS_CAPP__CREATEGAME 0x00405D20
#define ADDRESS_CAPP__ROBLOXAUTHENTICATE 0x00408060
@@ -19,6 +20,7 @@
// RobloxApp (2011)
#ifdef MFC2011
#define ADDRESS_STANDARDOUT__PRINT 0x005B25E0
+#define ADDRESS_HTTP__TRUSTCHECK 0x005B7050
#define ADDRESS_CAPP__CREATEGAME 0x0
#define ADDRESS_CAPP__ROBLOXAUTHENTICATE 0x0
#define ADDRESS_CROBLOXAPP__INITINSTANCE 0x004613C0
diff --git a/PolygonClientUtilities/Debug/PolygonClientUtilities.ilk b/PolygonClientUtilities/Debug/PolygonClientUtilities.ilk
index 56220e6..652d90a 100644
Binary files a/PolygonClientUtilities/Debug/PolygonClientUtilities.ilk and b/PolygonClientUtilities/Debug/PolygonClientUtilities.ilk differ
diff --git a/PolygonClientUtilities/PolygonClientUtilities.vcxproj b/PolygonClientUtilities/PolygonClientUtilities.vcxproj
index 1414d16..8a47a15 100644
--- a/PolygonClientUtilities/PolygonClientUtilities.vcxproj
+++ b/PolygonClientUtilities/PolygonClientUtilities.vcxproj
@@ -104,13 +104,15 @@
Level3
true
- true
+ false
true
WIN32;NDEBUG;POLYGONCLIENTUTILITIES_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)
true
Use
pch.h
$(SolutionDir)Detours\include
+ Disabled
+ false
Windows
diff --git a/PolygonClientUtilities/RobloxMFCClasses.h b/PolygonClientUtilities/RobloxMFCClasses.h
index efa6893..64e64a9 100644
--- a/PolygonClientUtilities/RobloxMFCClasses.h
+++ b/PolygonClientUtilities/RobloxMFCClasses.h
@@ -4,6 +4,7 @@
#include
+#if defined(MFC2010) || defined(MFC2011)
class CWorkspace;
// 2010 struct definitions:
@@ -40,4 +41,5 @@ struct CCommandLineInfo
class CRobloxCommandLineInfo : public CCommandLineInfo {};
-const auto CCommandLineInfo__ParseLast = (void(__thiscall*)(CCommandLineInfo * _this, BOOL bLast))ADDRESS_CCOMMANDLINEINFO__PARSELAST;
\ No newline at end of file
+const auto CCommandLineInfo__ParseLast = (void(__thiscall*)(CCommandLineInfo * _this, BOOL bLast))ADDRESS_CCOMMANDLINEINFO__PARSELAST;
+#endif
\ No newline at end of file
diff --git a/PolygonClientUtilities/RobloxMFCHooks.cpp b/PolygonClientUtilities/RobloxMFCHooks.cpp
index 164426a..0db30c5 100644
--- a/PolygonClientUtilities/RobloxMFCHooks.cpp
+++ b/PolygonClientUtilities/RobloxMFCHooks.cpp
@@ -3,6 +3,7 @@
#include "Logger.h"
#include "Config.h"
#include "LUrlParser.h"
+
static bool hasAuthUrlArg = false;
static bool hasAuthTicketArg = false;
static bool hasJoinArg = false;
@@ -13,6 +14,7 @@ static std::wstring authenticationTicket;
static std::wstring joinScriptUrl;
static std::string jobId;
+#if defined(MFC2010) || defined(MFC2011)
CRobloxApp__InitInstance_t CRobloxApp__InitInstance = (CRobloxApp__InitInstance_t)ADDRESS_CROBLOXAPP__INITINSTANCE;
BOOL __fastcall CRobloxApp__InitInstance_hook(CRobloxApp* _this)
@@ -32,10 +34,6 @@ BOOL __fastcall CRobloxApp__InitInstance_hook(CRobloxApp* _this)
// TODO: use CApp__CreateGame instead
CRobloxDoc* document = CRobloxApp__CreateDocument(_this);
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)
{
@@ -126,6 +124,7 @@ void __fastcall CRobloxCommandLineInfo__ParseParam_hook(CRobloxCommandLineInfo*
CRobloxCommandLineInfo__ParseParam(_this, pszParam, bFlag, bLast);
}
+#endif
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)
{
+ if (!Logger::handle) return;
+
switch (type)
{
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);
}
+
+// 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
\ No newline at end of file
diff --git a/PolygonClientUtilities/RobloxMFCHooks.h b/PolygonClientUtilities/RobloxMFCHooks.h
index 9cd0d2f..68d21f1 100644
--- a/PolygonClientUtilities/RobloxMFCHooks.h
+++ b/PolygonClientUtilities/RobloxMFCHooks.h
@@ -2,6 +2,7 @@
#include "RobloxMFCClasses.h"
+#if defined(MFC2010) || defined(MFC2011)
typedef BOOL(__thiscall* CRobloxApp__InitInstance_t)(CRobloxApp* _this);
extern CRobloxApp__InitInstance_t CRobloxApp__InitInstance;
@@ -11,6 +12,7 @@ typedef void(__thiscall* CRobloxCommandLineInfo__ParseParam_t)(CRobloxCommandLin
extern CRobloxCommandLineInfo__ParseParam_t CRobloxCommandLineInfo__ParseParam;
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);
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;
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
\ No newline at end of file
diff --git a/PolygonClientUtilities/dllmain.cpp b/PolygonClientUtilities/dllmain.cpp
index 01c6fa6..41ab72c 100644
--- a/PolygonClientUtilities/dllmain.cpp
+++ b/PolygonClientUtilities/dllmain.cpp
@@ -5,19 +5,18 @@
START_PATCH_LIST()
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
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
END_PATCH_LIST()
-// DLLs for release will be attached with VMProtect, so this isn't necessary
-// Arbiter will still use Stud_PE for ease in swapping DLLs
+// 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) doNothing() {}
#endif
diff --git a/README.md b/README.md
index 6cddcee..fdcf334 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,3 @@
# PolygonDLLUtilities
-Manages DLLs for extending game client/server functionality
+Manages DLLs for extending game client/server functionality
Based off [ndoesstuff/JoinScriptUrlImpl](https://github.com/ndoesstuff/JoinScriptUrlImpl) as per the MIT license
\ No newline at end of file