Skip to content

Commit 4407b1c

Browse files
committed
Upload ReenableAssetUncooking project and gitignore
1 parent 0469fa7 commit 4407b1c

13 files changed

+1385
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.vs
2+
ReenableAssetUncooking/x64
3+
desktop.ini
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.11.35222.181
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ReenableAssetUncooking", "ReenableAssetUncooking.vcxproj", "{3EB442A1-9174-4CAB-ABEB-8C7C21E725BE}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|x64 = Debug|x64
11+
Debug|x86 = Debug|x86
12+
Release|x64 = Release|x64
13+
Release|x86 = Release|x86
14+
EndGlobalSection
15+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
16+
{3EB442A1-9174-4CAB-ABEB-8C7C21E725BE}.Debug|x64.ActiveCfg = Debug|x64
17+
{3EB442A1-9174-4CAB-ABEB-8C7C21E725BE}.Debug|x64.Build.0 = Debug|x64
18+
{3EB442A1-9174-4CAB-ABEB-8C7C21E725BE}.Debug|x86.ActiveCfg = Debug|Win32
19+
{3EB442A1-9174-4CAB-ABEB-8C7C21E725BE}.Debug|x86.Build.0 = Debug|Win32
20+
{3EB442A1-9174-4CAB-ABEB-8C7C21E725BE}.Release|x64.ActiveCfg = Release|x64
21+
{3EB442A1-9174-4CAB-ABEB-8C7C21E725BE}.Release|x64.Build.0 = Release|x64
22+
{3EB442A1-9174-4CAB-ABEB-8C7C21E725BE}.Release|x86.ActiveCfg = Release|Win32
23+
{3EB442A1-9174-4CAB-ABEB-8C7C21E725BE}.Release|x86.Build.0 = Release|Win32
24+
EndGlobalSection
25+
GlobalSection(SolutionProperties) = preSolution
26+
HideSolutionNode = FALSE
27+
EndGlobalSection
28+
GlobalSection(ExtensibilityGlobals) = postSolution
29+
SolutionGuid = {4ECD0D77-423E-4692-A540-13E5E549605E}
30+
EndGlobalSection
31+
EndGlobal
Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|Win32">
5+
<Configuration>Debug</Configuration>
6+
<Platform>Win32</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Release|Win32">
9+
<Configuration>Release</Configuration>
10+
<Platform>Win32</Platform>
11+
</ProjectConfiguration>
12+
<ProjectConfiguration Include="Debug|x64">
13+
<Configuration>Debug</Configuration>
14+
<Platform>x64</Platform>
15+
</ProjectConfiguration>
16+
<ProjectConfiguration Include="Release|x64">
17+
<Configuration>Release</Configuration>
18+
<Platform>x64</Platform>
19+
</ProjectConfiguration>
20+
</ItemGroup>
21+
<PropertyGroup Label="Globals">
22+
<VCProjectVersion>17.0</VCProjectVersion>
23+
<Keyword>Win32Proj</Keyword>
24+
<ProjectGuid>{3eb442a1-9174-4cab-abeb-8c7c21e725be}</ProjectGuid>
25+
<RootNamespace>ReenableAssetUncooking</RootNamespace>
26+
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
27+
</PropertyGroup>
28+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
29+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
30+
<ConfigurationType>DynamicLibrary</ConfigurationType>
31+
<UseDebugLibraries>true</UseDebugLibraries>
32+
<PlatformToolset>v143</PlatformToolset>
33+
<CharacterSet>Unicode</CharacterSet>
34+
</PropertyGroup>
35+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
36+
<ConfigurationType>DynamicLibrary</ConfigurationType>
37+
<UseDebugLibraries>false</UseDebugLibraries>
38+
<PlatformToolset>v143</PlatformToolset>
39+
<WholeProgramOptimization>true</WholeProgramOptimization>
40+
<CharacterSet>Unicode</CharacterSet>
41+
</PropertyGroup>
42+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
43+
<ConfigurationType>DynamicLibrary</ConfigurationType>
44+
<UseDebugLibraries>true</UseDebugLibraries>
45+
<PlatformToolset>v143</PlatformToolset>
46+
<CharacterSet>Unicode</CharacterSet>
47+
</PropertyGroup>
48+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
49+
<ConfigurationType>DynamicLibrary</ConfigurationType>
50+
<UseDebugLibraries>false</UseDebugLibraries>
51+
<PlatformToolset>v143</PlatformToolset>
52+
<WholeProgramOptimization>true</WholeProgramOptimization>
53+
<CharacterSet>Unicode</CharacterSet>
54+
</PropertyGroup>
55+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
56+
<ImportGroup Label="ExtensionSettings">
57+
</ImportGroup>
58+
<ImportGroup Label="Shared">
59+
</ImportGroup>
60+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
61+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
62+
</ImportGroup>
63+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
64+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
65+
</ImportGroup>
66+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
67+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
68+
</ImportGroup>
69+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
70+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
71+
</ImportGroup>
72+
<PropertyGroup Label="UserMacros" />
73+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
74+
<OutDir>$(SolutionDir)\$(Platform)\$(Configuration)\</OutDir>
75+
<IntDir>$(SolutionDir)\$(Platform)\$(Configuration)\</IntDir>
76+
</PropertyGroup>
77+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
78+
<OutDir>$(SolutionDir)\$(Platform)\$(Configuration)\</OutDir>
79+
<IntDir>$(SolutionDir)\$(Platform)\$(Configuration)\</IntDir>
80+
</PropertyGroup>
81+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
82+
<ClCompile>
83+
<WarningLevel>Level3</WarningLevel>
84+
<SDLCheck>true</SDLCheck>
85+
<PreprocessorDefinitions>WIN32;_DEBUG;REENABLEASSETUNCOOKING_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
86+
<ConformanceMode>true</ConformanceMode>
87+
<PrecompiledHeader>Use</PrecompiledHeader>
88+
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
89+
</ClCompile>
90+
<Link>
91+
<SubSystem>Windows</SubSystem>
92+
<GenerateDebugInformation>true</GenerateDebugInformation>
93+
<EnableUAC>false</EnableUAC>
94+
</Link>
95+
</ItemDefinitionGroup>
96+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
97+
<ClCompile>
98+
<WarningLevel>Level3</WarningLevel>
99+
<FunctionLevelLinking>true</FunctionLevelLinking>
100+
<IntrinsicFunctions>true</IntrinsicFunctions>
101+
<SDLCheck>true</SDLCheck>
102+
<PreprocessorDefinitions>WIN32;NDEBUG;REENABLEASSETUNCOOKING_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
103+
<ConformanceMode>true</ConformanceMode>
104+
<PrecompiledHeader>Use</PrecompiledHeader>
105+
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
106+
</ClCompile>
107+
<Link>
108+
<SubSystem>Windows</SubSystem>
109+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
110+
<OptimizeReferences>true</OptimizeReferences>
111+
<GenerateDebugInformation>true</GenerateDebugInformation>
112+
<EnableUAC>false</EnableUAC>
113+
</Link>
114+
</ItemDefinitionGroup>
115+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
116+
<ClCompile>
117+
<WarningLevel>Level3</WarningLevel>
118+
<SDLCheck>true</SDLCheck>
119+
<PreprocessorDefinitions>_DEBUG;REENABLEASSETUNCOOKING_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
120+
<ConformanceMode>true</ConformanceMode>
121+
<PrecompiledHeader>Use</PrecompiledHeader>
122+
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
123+
<LanguageStandard>stdcpp20</LanguageStandard>
124+
</ClCompile>
125+
<Link>
126+
<SubSystem>Windows</SubSystem>
127+
<GenerateDebugInformation>true</GenerateDebugInformation>
128+
<EnableUAC>false</EnableUAC>
129+
</Link>
130+
</ItemDefinitionGroup>
131+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
132+
<ClCompile>
133+
<WarningLevel>Level3</WarningLevel>
134+
<FunctionLevelLinking>true</FunctionLevelLinking>
135+
<IntrinsicFunctions>true</IntrinsicFunctions>
136+
<SDLCheck>true</SDLCheck>
137+
<PreprocessorDefinitions>NDEBUG;REENABLEASSETUNCOOKING_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
138+
<ConformanceMode>true</ConformanceMode>
139+
<PrecompiledHeader>Create</PrecompiledHeader>
140+
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
141+
<LanguageStandard>stdcpp20</LanguageStandard>
142+
<Optimization>MaxSpeed</Optimization>
143+
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
144+
<FavorSizeOrSpeed>Neither</FavorSizeOrSpeed>
145+
</ClCompile>
146+
<Link>
147+
<SubSystem>Windows</SubSystem>
148+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
149+
<OptimizeReferences>true</OptimizeReferences>
150+
<GenerateDebugInformation>true</GenerateDebugInformation>
151+
<EnableUAC>false</EnableUAC>
152+
</Link>
153+
</ItemDefinitionGroup>
154+
<ItemGroup>
155+
<ClCompile Include="dllmain.cpp" />
156+
<ClCompile Include="patterns.cpp" />
157+
<ClCompile Include="pch.cpp" />
158+
<ClCompile Include="utils.cpp" />
159+
</ItemGroup>
160+
<ItemGroup>
161+
<ClInclude Include="memorymgr.h" />
162+
<ClInclude Include="patterns.h" />
163+
<ClInclude Include="pch.h" />
164+
<ClInclude Include="utils.h" />
165+
</ItemGroup>
166+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
167+
<ImportGroup Label="ExtensionTargets">
168+
</ImportGroup>
169+
</Project>
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup>
4+
<Filter Include="Source Files">
5+
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
6+
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
7+
</Filter>
8+
<Filter Include="Header Files">
9+
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
10+
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
11+
</Filter>
12+
<Filter Include="Resource Files">
13+
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
14+
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
15+
</Filter>
16+
</ItemGroup>
17+
<ItemGroup>
18+
<ClCompile Include="dllmain.cpp">
19+
<Filter>Source Files</Filter>
20+
</ClCompile>
21+
<ClCompile Include="patterns.cpp">
22+
<Filter>Source Files</Filter>
23+
</ClCompile>
24+
<ClCompile Include="pch.cpp">
25+
<Filter>Source Files</Filter>
26+
</ClCompile>
27+
<ClCompile Include="utils.cpp">
28+
<Filter>Source Files</Filter>
29+
</ClCompile>
30+
</ItemGroup>
31+
<ItemGroup>
32+
<ClInclude Include="memorymgr.h">
33+
<Filter>Header Files</Filter>
34+
</ClInclude>
35+
<ClInclude Include="patterns.h">
36+
<Filter>Header Files</Filter>
37+
</ClInclude>
38+
<ClInclude Include="pch.h">
39+
<Filter>Header Files</Filter>
40+
</ClInclude>
41+
<ClInclude Include="utils.h">
42+
<Filter>Header Files</Filter>
43+
</ClInclude>
44+
</ItemGroup>
45+
</Project>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup />
4+
</Project>

ReenableAssetUncooking/dllmain.cpp

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#include "pch.h"
2+
3+
#include "memorymgr.h"
4+
#include "patterns.h"
5+
#include "utils.h"
6+
#include <string>
7+
8+
constexpr const char* ASI_VERSION = "1.0";
9+
10+
const char* pJumpIfCooked = "74 1A 45 8D ? ? 48 8D 15 ? ? ? ? 48 8D 4D ? FF 15 ? ? ? ? E9";
11+
12+
using namespace Memory::VP;
13+
14+
bool DisableCookedDataCheck()
15+
{
16+
uint64_t* pattern = FindPattern(GetModuleHandleA("UnrealEditor-UnrealEd.dll"), pJumpIfCooked);
17+
if (!pattern) return false;
18+
uint64_t address = (uint64_t)pattern;
19+
Patch<uint8_t>(GetGameAddr(address), 0xEB);
20+
return true;
21+
}
22+
23+
BOOL APIENTRY DllMain(HMODULE hModule, DWORD reason, LPVOID lpReserved)
24+
{
25+
if (reason == DLL_PROCESS_ATTACH)
26+
{
27+
if (!DisableCookedDataCheck())
28+
{
29+
MessageBoxA(NULL, "Instruction to patch was not found in executable memory, patching has been skipped.", "ReenableAssetUncooking", MB_ICONEXCLAMATION);
30+
return false;
31+
}
32+
else
33+
{
34+
MessageBoxA(NULL, "Instruction patched, asset uncooking has been reenabled!", "ReenableAssetUncooking", MB_ICONEXCLAMATION);
35+
}
36+
}
37+
return true;
38+
}

0 commit comments

Comments
 (0)