mirror of
https://github.com/Auties00/Reboot-Launcher.git
synced 2026-01-13 11:12:23 +01:00
Switched to sinum
This commit is contained in:
13
redirect/Core/Constants.h
Normal file
13
redirect/Core/Constants.h
Normal file
@@ -0,0 +1,13 @@
|
||||
// Copyright (c) 2024 Project Nova LLC
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace Constants
|
||||
{
|
||||
constexpr auto API_URL = L"http://localhost:3551";
|
||||
|
||||
constexpr auto ProcessRequest = L"Could not set libcurl options for easy handle, processing HTTP request failed. Increase verbosity for additional information.";
|
||||
constexpr auto ProcessRequest_C2 = L"STAT_FCurlHttpRequest_ProcessRequest";
|
||||
constexpr auto URLOffset = L"ProcessRequest failed. URL '%s' is not a valid HTTP request. %p";
|
||||
constexpr auto Realloc = L"AbilitySystem.Debug.NextTarget";
|
||||
}
|
||||
11
redirect/Core/Core.cpp
Normal file
11
redirect/Core/Core.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
// Copyright (c) 2024 Project Nova LLC
|
||||
|
||||
#include "Core.h"
|
||||
|
||||
void Core::Init()
|
||||
{
|
||||
FMemory::_Realloc = Memcury::Scanner::FindStringRef(Constants::Realloc)
|
||||
.ScanFor({ Memcury::ASM::MNEMONIC::CALL })
|
||||
.RelativeOffset(1)
|
||||
.GetAs<decltype(FMemory::_Realloc)>();
|
||||
}
|
||||
16
redirect/Core/Core.h
Normal file
16
redirect/Core/Core.h
Normal file
@@ -0,0 +1,16 @@
|
||||
// Copyright (c) 2024 Project Nova LLC
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "..\Utilities\memcury.h"
|
||||
|
||||
#include "Constants.h"
|
||||
|
||||
#include "Unreal\Memory.h"
|
||||
#include "Unreal\Array.h"
|
||||
#include "Unreal\String.h"
|
||||
|
||||
namespace Core
|
||||
{
|
||||
void Init();
|
||||
}
|
||||
143
redirect/Core/Unreal/Array.h
Normal file
143
redirect/Core/Unreal/Array.h
Normal file
@@ -0,0 +1,143 @@
|
||||
// Copyright (c) 2024 Project Nova LLC
|
||||
|
||||
#pragma once
|
||||
#include <functional>
|
||||
#include "Memory.h"
|
||||
|
||||
template <typename T>
|
||||
class TArray
|
||||
{
|
||||
friend class FString;
|
||||
|
||||
T* Data;
|
||||
int32_t NumElements;
|
||||
int32_t MaxElements;
|
||||
|
||||
public:
|
||||
|
||||
inline TArray()
|
||||
{
|
||||
Data = nullptr;
|
||||
NumElements = 0;
|
||||
MaxElements = 0;
|
||||
};
|
||||
|
||||
inline void Free()
|
||||
{
|
||||
FMemory::Free(Data);
|
||||
Data = nullptr;
|
||||
NumElements = 0;
|
||||
MaxElements = 0;
|
||||
}
|
||||
|
||||
inline void Reset()
|
||||
{
|
||||
Free();
|
||||
}
|
||||
|
||||
inline auto GetData()
|
||||
{
|
||||
return Data;
|
||||
}
|
||||
|
||||
inline int GetCount() const
|
||||
{
|
||||
return NumElements;
|
||||
}
|
||||
|
||||
inline int Num() const
|
||||
{
|
||||
return NumElements;
|
||||
}
|
||||
|
||||
inline auto& Get(const int Index)
|
||||
{
|
||||
return Data[Index];
|
||||
}
|
||||
|
||||
inline auto& First()
|
||||
{
|
||||
return Get(0);
|
||||
}
|
||||
|
||||
inline auto GetRef(const int Index, int Size = sizeof(T))
|
||||
{
|
||||
return (T*)((uint8_t*)Data + (Index * Size));
|
||||
}
|
||||
|
||||
inline T& operator[](int i)
|
||||
{
|
||||
return Get(i);
|
||||
};
|
||||
|
||||
inline const T& operator[](int i) const
|
||||
{
|
||||
return Get(i);
|
||||
};
|
||||
|
||||
inline bool Remove(const int Index, int Size = sizeof(T))
|
||||
{
|
||||
if (Index < NumElements)
|
||||
{
|
||||
if (Index != NumElements - 1)
|
||||
Get(Index) = Get(NumElements - 1);
|
||||
|
||||
--NumElements;
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
inline bool Any(std::function<bool(T)> Func)
|
||||
{
|
||||
for (int i = 0; i < NumElements; ++i)
|
||||
{
|
||||
if (Func(Get(i)))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
inline T Select(std::function<bool(T)> Func)
|
||||
{
|
||||
for (int i = 0; i < NumElements; ++i)
|
||||
{
|
||||
if (Func(Get(i)))
|
||||
return Get(i);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
inline void ForEach(std::function<void(T)> Func)
|
||||
{
|
||||
for (int i = 0; i < NumElements; ++i)
|
||||
{
|
||||
Func(Get(i));
|
||||
}
|
||||
}
|
||||
|
||||
inline int Count(std::function<bool(T)> Func)
|
||||
{
|
||||
int Num = 0;
|
||||
|
||||
for (int i = 0; i < NumElements; ++i)
|
||||
{
|
||||
if (Func(Get(i)))
|
||||
Num++;
|
||||
}
|
||||
return Num;
|
||||
}
|
||||
|
||||
inline int Find(const T& Item)
|
||||
{
|
||||
for (int i = 0; i < NumElements; i++)
|
||||
{
|
||||
if (this->operator[](i) == Item)
|
||||
return i;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
};
|
||||
92
redirect/Core/Unreal/Memory.h
Normal file
92
redirect/Core/Unreal/Memory.h
Normal file
@@ -0,0 +1,92 @@
|
||||
// Copyright (c) 2024 Project Nova LLC
|
||||
|
||||
#pragma once
|
||||
#include <Windows.h>
|
||||
#include <cstdint>
|
||||
|
||||
class FMemory
|
||||
{
|
||||
public:
|
||||
static inline void* (*_Realloc)(void*, size_t, int64_t);
|
||||
|
||||
static void Free(void* Data)
|
||||
{
|
||||
_Realloc(Data, 0, 0);
|
||||
}
|
||||
|
||||
static void* Malloc(size_t Size)
|
||||
{
|
||||
return _Realloc(0, Size, 0);
|
||||
}
|
||||
|
||||
static void* Realloc(void* Data, size_t NewSize)
|
||||
{
|
||||
return _Realloc(Data, NewSize, 0);
|
||||
}
|
||||
|
||||
static void* Memmove(void* Dest, const void* Src, size_t Count)
|
||||
{
|
||||
return memmove(Dest, Src, Count);
|
||||
}
|
||||
|
||||
static int Memcmp(const void* Buf1, const void* Buf2, size_t Count)
|
||||
{
|
||||
return memcmp(Buf1, Buf2, Count);
|
||||
}
|
||||
|
||||
static void* Memset(void* Dest, uint8_t Char, size_t Count)
|
||||
{
|
||||
return memset(Dest, Char, Count);
|
||||
}
|
||||
|
||||
template< class T >
|
||||
static void Memset(T& Src, uint8_t ValueToSet)
|
||||
{
|
||||
Memset(&Src, ValueToSet, sizeof(T));
|
||||
}
|
||||
|
||||
static void* Memzero(void* Dest, size_t Count)
|
||||
{
|
||||
return ZeroMemory(Dest, Count);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
static void Memzero(T& Src)
|
||||
{
|
||||
Memzero(&Src, sizeof(T));
|
||||
}
|
||||
|
||||
static void* Memcpy(void* Dest, const void* Src, size_t Count)
|
||||
{
|
||||
return memcpy(Dest, Src, Count);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
static void Memcpy(T& Dest, const T& Src)
|
||||
{
|
||||
Memcpy(&Dest, &Src, sizeof(T));
|
||||
}
|
||||
|
||||
static void* Calloc(size_t NumElements, size_t ElementSize)
|
||||
{
|
||||
auto TotalSize = NumElements * ElementSize;
|
||||
auto Data = FMemory::Malloc(TotalSize);
|
||||
|
||||
if (!Data)
|
||||
return NULL;
|
||||
|
||||
FMemory::Memzero(Data, TotalSize);
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
static char* Strdup(const char* Str)
|
||||
{
|
||||
auto StrLen = strlen(Str) + 1;
|
||||
auto StrDup = (char*)FMemory::Malloc(StrLen);
|
||||
|
||||
FMemory::Memcpy(StrDup, Str, StrLen);
|
||||
|
||||
return StrDup;
|
||||
}
|
||||
};
|
||||
54
redirect/Core/Unreal/String.h
Normal file
54
redirect/Core/Unreal/String.h
Normal file
@@ -0,0 +1,54 @@
|
||||
// Copyright (c) 2024 Project Nova LLC
|
||||
|
||||
#pragma once
|
||||
#include "Array.h"
|
||||
#include "Memory.h"
|
||||
|
||||
class FString : private TArray<wchar_t>
|
||||
{
|
||||
public:
|
||||
|
||||
inline FString()
|
||||
{
|
||||
Data = nullptr;
|
||||
NumElements = 0;
|
||||
MaxElements = 0;
|
||||
}
|
||||
|
||||
inline FString(const char* Other)
|
||||
{
|
||||
if (Other)
|
||||
{
|
||||
auto NumCharacters = (int)std::strlen(Other);
|
||||
MaxElements = NumElements = NumCharacters + 1;
|
||||
|
||||
Data = static_cast<wchar_t*>(FMemory::Malloc(NumElements * sizeof(wchar_t)));
|
||||
|
||||
size_t ConvertedChars = 0;
|
||||
mbstowcs_s(&ConvertedChars, Data, NumElements, Other, _TRUNCATE);
|
||||
}
|
||||
else
|
||||
{
|
||||
MaxElements = NumElements = 0;
|
||||
Data = nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
inline FString(const wchar_t* Other)
|
||||
{
|
||||
MaxElements = NumElements = *Other ? (int)std::wcslen(Other) + 1 : 0;
|
||||
|
||||
if (NumElements && Other)
|
||||
{
|
||||
Data = static_cast<wchar_t*>(FMemory::Malloc(NumElements * 2));
|
||||
|
||||
memcpy_s(Data, NumElements * 2, Other, NumElements * 2);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
inline auto c_str()
|
||||
{
|
||||
return Data;
|
||||
}
|
||||
};
|
||||
21
redirect/Main.cpp
Normal file
21
redirect/Main.cpp
Normal file
@@ -0,0 +1,21 @@
|
||||
// Copyright (c) 2024 Project Nova LLC
|
||||
|
||||
#include "framework.h"
|
||||
|
||||
static void Main()
|
||||
{
|
||||
Sleep(7500);
|
||||
|
||||
Core::Init();
|
||||
Sinum::Init();
|
||||
}
|
||||
|
||||
bool DllMain(HMODULE hModule, DWORD dwReason, void* lpReserved)
|
||||
{
|
||||
if (dwReason == DLL_PROCESS_ATTACH)
|
||||
{
|
||||
Windows::Thread::Create(Main);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
5
redirect/README.md
Normal file
5
redirect/README.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# Sinum Windows
|
||||
|
||||
https://github.com/projectnovafn/Sinum/tree/main/Windows
|
||||
|
||||
Modified to point to http://localhost:3551
|
||||
22
redirect/Sinum.sln
Normal file
22
redirect/Sinum.sln
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.7.34031.279
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Sinum", "Sinum.vcxproj", "{E7291B57-1B5B-497C-9C2E-C78A556A06CF}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{E7291B57-1B5B-497C-9C2E-C78A556A06CF}.Release|x64.ActiveCfg = Release|x64
|
||||
{E7291B57-1B5B-497C-9C2E-C78A556A06CF}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {7975A2E1-0078-4AF8-AB10-0A71112857A5}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
162
redirect/Sinum.vcxproj
Normal file
162
redirect/Sinum.vcxproj
Normal file
@@ -0,0 +1,162 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>17.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{e7291b57-1b5b-497c-9c2e-c78a556a06cf}</ProjectGuid>
|
||||
<RootNamespace>Sinum</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;SINUM_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;SINUM_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<LanguageStandard>stdcpplatest</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>_DEBUG;SINUM_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;SINUM_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<LanguageStandard>stdcpplatest</LanguageStandard>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Core\Constants.h" />
|
||||
<ClInclude Include="Core\Unreal\Array.h" />
|
||||
<ClInclude Include="Core\Core.h" />
|
||||
<ClInclude Include="Core\Unreal\Memory.h" />
|
||||
<ClInclude Include="Core\Unreal\String.h" />
|
||||
<ClInclude Include="framework.h" />
|
||||
<ClInclude Include="Sinum\Sinum.h" />
|
||||
<ClInclude Include="Utilities\memcury.h" />
|
||||
<ClInclude Include="Utilities\Windows.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Core\Core.cpp" />
|
||||
<ClCompile Include="Main.cpp" />
|
||||
<ClCompile Include="Sinum\Sinum.cpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets" />
|
||||
</Project>
|
||||
57
redirect/Sinum.vcxproj.filters
Normal file
57
redirect/Sinum.vcxproj.filters
Normal file
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="framework.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Utilities\Windows.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Core\Unreal\Array.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Core\Constants.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Core\Unreal\String.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Core\Unreal\Memory.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Core\Core.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Sinum\Sinum.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Utilities\memcury.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Main.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Sinum\Sinum.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Core\Core.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
4
redirect/Sinum.vcxproj.user
Normal file
4
redirect/Sinum.vcxproj.user
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
</Project>
|
||||
40
redirect/Sinum/Sinum.cpp
Normal file
40
redirect/Sinum/Sinum.cpp
Normal file
@@ -0,0 +1,40 @@
|
||||
// Copyright (c) 2024 Project Nova LLC
|
||||
|
||||
#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);
|
||||
}
|
||||
|
||||
void Sinum::Init()
|
||||
{
|
||||
auto StringRef = Memcury::Scanner::FindStringRef(Constants::ProcessRequest);
|
||||
if (StringRef.IsValid())
|
||||
{
|
||||
_ProcessRequest = StringRef
|
||||
.ScanFor({ 0x48, 0x81, 0xEC }, false)
|
||||
.ScanFor({ 0x40 }, false)
|
||||
.GetAs<decltype(_ProcessRequest)>();
|
||||
}
|
||||
else
|
||||
{
|
||||
_ProcessRequest = Memcury::Scanner::FindStringRef(Constants::ProcessRequest_C2)
|
||||
.ScanFor({ 0x4C, 0x8B, 0xDC }, false)
|
||||
.GetAs<decltype(_ProcessRequest)>();
|
||||
}
|
||||
|
||||
*Memcury::Scanner::FindPointerRef(_ProcessRequest)
|
||||
.GetAs<void**>() = ProcessRequestHook;
|
||||
}
|
||||
31
redirect/Sinum/Sinum.h
Normal file
31
redirect/Sinum/Sinum.h
Normal file
@@ -0,0 +1,31 @@
|
||||
// Copyright (c) 2024 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);
|
||||
}
|
||||
};
|
||||
|
||||
namespace Sinum
|
||||
{
|
||||
static bool (*_ProcessRequest)(FCurlHttpRequest*);
|
||||
static bool ProcessRequestHook(FCurlHttpRequest* Request);
|
||||
|
||||
void Init();
|
||||
}
|
||||
15
redirect/Utilities/Windows.h
Normal file
15
redirect/Utilities/Windows.h
Normal file
@@ -0,0 +1,15 @@
|
||||
// Copyright (c) 2024 Project Nova LLC
|
||||
|
||||
#pragma once
|
||||
#include "../framework.h"
|
||||
|
||||
namespace Windows
|
||||
{
|
||||
namespace Thread
|
||||
{
|
||||
static HANDLE Create(void* Routine, void* Param = NULL)
|
||||
{
|
||||
return CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)Routine, Param, 0, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
1210
redirect/Utilities/memcury.h
Normal file
1210
redirect/Utilities/memcury.h
Normal file
File diff suppressed because it is too large
Load Diff
10
redirect/framework.h
Normal file
10
redirect/framework.h
Normal file
@@ -0,0 +1,10 @@
|
||||
// Copyright (c) 2024 Project Nova LLC
|
||||
|
||||
#pragma once
|
||||
#include <Windows.h>
|
||||
|
||||
#include "Utilities\memcury.h"
|
||||
#include "Utilities\Windows.h"
|
||||
|
||||
#include "Core\Core.h"
|
||||
#include "Sinum\Sinum.h"
|
||||
Reference in New Issue
Block a user