Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 30 additions & 2 deletions Windows/Core/Core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,36 @@ void Core::Init()
Sleep(250);
}

Sleep(2500);

FMemory::_Realloc = Memcury::Scanner::FindPattern("48 89 5C 24 08 48 89 74 24 10 57 48 83 EC 20 48 8B F1 41 8B D8 48 8B 0D ? ? ? ? 48")
.GetAs<decltype(FMemory::_Realloc)>(); // Checked on: 1.8, 12.41, 15.50, 19.10
.GetAs<decltype(FMemory::_Realloc)>(); // checked on: 1.8, 12.41, 15.50, 19.10, 23.50

// This whole RequestExit business sucks but nothing we can do, since when you go in a map on S22+ not connecting to a server it requests exit

auto NoCallSiteRequestExit = Memcury::Scanner::FindPattern<false>("48 89 5C 24 ? 48 89 74 24 ? 57 48 83 EC 20 33 DB 0F B6 F9 80 3D ? ? ? ? ? 48 8B F2 72 27 48 85 D2 48 8D 05"); // 24.40
if (NoCallSiteRequestExit.IsValid())
{
DWORD dwProtection;
VirtualProtect(NoCallSiteRequestExit.GetAs<PVOID>(), 1, PAGE_EXECUTE_READWRITE, &dwProtection);

*(NoCallSiteRequestExit.GetAs<uint8_t*>()) = 0xC3;

DWORD dwTemp;
VirtualProtect(NoCallSiteRequestExit.GetAs<PVOID>(), 1, dwProtection, &dwTemp);
}

auto RequestExit = Memcury::Scanner::FindPattern<false>("88 4C 24 08 53 48 83 EC 20 80 3D ? ? ? ? ? 8A D9 72 0A 4C 8D 4C 24"); // 22.30, 23.50
if (RequestExit.IsValid())
{
DWORD dwProtection;
VirtualProtect(RequestExit.GetAs<PVOID>(), 1, PAGE_EXECUTE_READWRITE, &dwProtection);

*(RequestExit.GetAs<uint8_t*>()) = 0xC3;

DWORD dwTemp;
VirtualProtect(RequestExit.GetAs<PVOID>(), 1, dwProtection, &dwTemp);
}

auto RequestExitRef = Memcury::Scanner::FindStringRef<const wchar_t*, false>(L"FPlatformMisc::RequestExitWithStatus(%i, %i)");

Expand All @@ -24,7 +52,7 @@ void Core::Init()

if (bFound)
{
*(Found + 6) = { 0xC3 };
*(Found + 6) = 0xC3;

auto StringRef = Memcury::Scanner::FindStringRef<const wchar_t*, false>(L"UnsafeEnvironment_Title");

Expand Down
32 changes: 32 additions & 0 deletions Windows/Core/EOS.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#include "../framework.h"

#include "EOS.h"

#include "Unreal/CurlHttp.h"

bool EOS::ProcessRequestHook(FCurlHttpRequest* Request)
{
return _ProcessRequest(Request->RedirectRequest());
}

void EOS::Init()
{
auto EOSHandle = (uintptr_t)GetModuleHandleA("EOSSDK-Win64-Shipping.dll");
if (!EOSHandle) return;

auto ProcessRequestStrRef = Memcury::Scanner::FindStringRef(L"ProcessRequest failed. URL '%s' is not using a whitelisted domain. %p", EOSHandle);

_ProcessRequest = ProcessRequestStrRef
.ScanFor({ 0x48, 0x89, 0x5C }, false)
.GetAs<decltype(_ProcessRequest)>();

auto ProcessRequestRef = Memcury::Scanner::FindPointerRef(_ProcessRequest, EOSHandle);

DWORD dwProtection;
VirtualProtect(ProcessRequestRef.GetAs<PVOID>(), 8, PAGE_EXECUTE_READWRITE, &dwProtection);

*ProcessRequestRef.GetAs<void**>() = ProcessRequestHook;

DWORD dwTemp;
VirtualProtect(ProcessRequestRef.GetAs<PVOID>(), 8, dwProtection, &dwTemp);
}
11 changes: 11 additions & 0 deletions Windows/Core/EOS.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#pragma once

class FCurlHttpRequest;

namespace EOS
{
static bool (*_ProcessRequest)(FCurlHttpRequest*);
static bool ProcessRequestHook(FCurlHttpRequest* Request);

void Init();
}
45 changes: 45 additions & 0 deletions Windows/Core/Unreal/CurlHttp.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#include "../../framework.h"

#include "CurlHttp.h"

FString FCurlHttpRequest::GetURL()
{
FString Result;
return ((FString& (*)(FCurlHttpRequest*, FString&))(*VTable))(this, Result);
}

void FCurlHttpRequest::SetURL(FString URL)
{
((void (*)(FCurlHttpRequest*, FString&))(VTable[10]))(this, URL);
}

FCurlHttpRequest* FCurlHttpRequest::RedirectRequest()
{
std::wstring URL(this->GetURL().c_str());

const std::vector<std::wstring> Domains = {
L"game-social.epicgames.com",
L"ol.epicgames.com",
L"ol.epicgames.net",
L"on.epicgames.com",
L"ak.epicgames.com",
L"epicgames.dev"
};

for (const auto& Domain : Domains)
{
size_t PathIndex = URL.find(Domain);
if (PathIndex != std::wstring::npos)
{
size_t PathStart = PathIndex + Domain.length();

std::wstring Path = URL.substr(PathStart);
std::wstring NewURL = Constants::API_URL + Path;

this->SetURL(NewURL.c_str());
break;
}
}

return this;
}
14 changes: 14 additions & 0 deletions Windows/Core/Unreal/CurlHttp.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#pragma once

class FCurlHttpRequest
{
private:
void** VTable;

public:

class FString GetURL();
void SetURL(FString URL);

FCurlHttpRequest* RedirectRequest();
};
1 change: 1 addition & 0 deletions Windows/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ static void Main()
#endif

Core::Init();
EOS::Init();
Sinum::Init();
}

Expand Down
4 changes: 4 additions & 0 deletions Windows/Sinum.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,10 @@
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="Core\Constants.h" />
<ClInclude Include="Core\EOS.h" />
<ClInclude Include="Core\Unreal\Array.h" />
<ClInclude Include="Core\Core.h" />
<ClInclude Include="Core\Unreal\CurlHttp.h" />
<ClInclude Include="Core\Unreal\Memory.h" />
<ClInclude Include="Core\Unreal\String.h" />
<ClInclude Include="framework.h" />
Expand All @@ -154,6 +156,8 @@
</ItemGroup>
<ItemGroup>
<ClCompile Include="Core\Core.cpp" />
<ClCompile Include="Core\EOS.cpp" />
<ClCompile Include="Core\Unreal\CurlHttp.cpp" />
<ClCompile Include="Main.cpp" />
<ClCompile Include="Sinum\Sinum.cpp" />
</ItemGroup>
Expand Down
12 changes: 12 additions & 0 deletions Windows/Sinum.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@
<ClInclude Include="Utilities\memcury.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Core\EOS.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Core\Unreal\CurlHttp.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Main.cpp">
Expand All @@ -53,5 +59,11 @@
<ClCompile Include="Core\Core.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Core\EOS.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Core\Unreal\CurlHttp.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>
22 changes: 7 additions & 15 deletions Windows/Sinum/Sinum.cpp
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
// Copyright (c) 2025 Project Nova LLC

#include "../framework.h"
#include "../Core/Unreal/CurlHttp.h"

#include "Sinum.h"

bool Sinum::ProcessRequestHook(FCurlHttpRequest* Request)
{
std::wstring URL(Request->GetURL().c_str());
size_t PathIndex = URL.find(L"ol.epicgames.com");

if (PathIndex != std::wstring::npos)
{
auto Path = URL.substr(PathIndex + 16);
auto NewURL = Constants::API_URL + Path;

Request->SetURL(NewURL.c_str());
}

return _ProcessRequest(Request);
return _ProcessRequest(Request->RedirectRequest());
}

void Sinum::Init()
Expand All @@ -25,19 +17,19 @@ void Sinum::Init()
{
bool bFound = false;
_ProcessRequest = StringRef
.ScanFor({ 0x4C, 0x8B, 0xDC }, false, 0, 500, &bFound)
.ScanFor({ 0x4C, 0x8B, 0xDC }, false, 0, 200, &bFound)
.GetAs<decltype(_ProcessRequest)>();

if (!bFound)
{
_ProcessRequest = StringRef
.ScanFor({ 0x40, 0x53, 0x55 }, false, 0, 500, &bFound) // checked on: 12.41
.ScanFor({ 0x40, 0x53, 0x55 }, false, 0, 200, &bFound) // checked on: 12.41
.GetAs<decltype(_ProcessRequest)>();

if (!bFound)
{
_ProcessRequest = StringRef
.ScanFor({ 0x48, 0x8B, 0xC4 }, false, 0, 500, &bFound) // checked on: 16.50, 19.10
.ScanFor({ 0x48, 0x8B, 0xC4 }, false, 0, 200, &bFound) // checked on: 16.50, 19.10, 23.50
.GetAs<decltype(_ProcessRequest)>();
}
}
Expand Down
20 changes: 1 addition & 19 deletions Windows/Sinum/Sinum.h
Original file line number Diff line number Diff line change
@@ -1,26 +1,8 @@
// Copyright (c) 2025 Project Nova LLC

#pragma once
#include "../framework.h"

class FCurlHttpRequest
{
private:
void** VTable;

public:

FString GetURL()
{
FString Result;
return ((FString& (*)(FCurlHttpRequest*, FString&))(*VTable))(this, Result);
}

void SetURL(FString URL)
{
((void (*)(FCurlHttpRequest*, FString&))(VTable[10]))(this, URL);
}
};
class FCurlHttpRequest;

namespace Sinum
{
Expand Down
Loading