aboutsummaryrefslogtreecommitdiff
path: root/Patcher
diff options
context:
space:
mode:
authorrobinsch <hello@robinsch.com>2023-12-02 12:27:51 +0100
committerrobinsch <hello@robinsch.com>2023-12-02 12:27:51 +0100
commitab8f949c697c7e7d105fa1c02b282d02a14d116c (patch)
treed1e16dfdde9debd3c88eee104bd2bcd42f97f650 /Patcher
parent2545ee0127818680876fb9e82ecb0e1128690ca1 (diff)
Added .sln
Diffstat (limited to 'Patcher')
-rw-r--r--Patcher/Patcher.cpp95
-rw-r--r--Patcher/Patcher.vcxproj136
-rw-r--r--Patcher/Patcher.vcxproj.filters6
-rw-r--r--Patcher/Patcher.vcxproj.user4
4 files changed, 241 insertions, 0 deletions
diff --git a/Patcher/Patcher.cpp b/Patcher/Patcher.cpp
new file mode 100644
index 0000000..496d948
--- /dev/null
+++ b/Patcher/Patcher.cpp
@@ -0,0 +1,95 @@
+#include <iostream>
+#include <filesystem>
+#include <fstream>
+#include <array>
+#include <iterator>
+#include <vector>
+
+// wow base = 50 0C00
+
+static std::fstream wow_exe;
+
+void write_pos(std::streampos pos, uint8_t value)
+{
+ wow_exe.clear();
+ wow_exe.seekg(0);
+ wow_exe.seekp(pos);
+ wow_exe << value;
+}
+
+void write_pos(std::streampos pos, std::vector<uint8_t> const& values)
+{
+ wow_exe.clear();
+ wow_exe.seekg(0);
+ wow_exe.seekp(pos);
+ for (uint8_t v : values)
+ wow_exe << v;
+}
+
+void write_pos_n(std::streampos pos, uint8_t value, size_t n)
+{
+ wow_exe.clear();
+ wow_exe.seekg(0);
+ wow_exe.seekp(pos);
+ for (size_t i = 0; i < n; ++i)
+ wow_exe << value;
+}
+
+int main(int argc, char** argv)
+{
+ std::string wow;
+ if (argc < 2)
+ {
+ std::cout << "World of Warcraft exe not found!\n";
+ return 1;
+ }
+
+ wow = argv[1];
+
+ wow_exe = std::fstream(wow, std::ios::in | std::ios::out | std::ios::binary);
+
+ if (!wow_exe)
+ {
+ std::cout << "World of Warcraft exe not found!\n";
+ return 1;
+ }
+
+ // windowed mode to full screen
+ write_pos(0xE94, 0xEB);
+
+ // melee swing on right-click
+ write_pos_n(0x2E1C67, 0x90, 11);
+
+ // NPC attack animation when turning
+ write_pos(0x33D7C9, 0xEB);
+
+ // "ghost" attack when NPC evades from combat
+ write_pos(0x355BF, 0xEB);
+
+ // missing pre cast animation when canceling channeled spells
+ write_pos_n(0x33E0D6, 0x90, 22);
+
+ // mouse flickering and camera snapping issue when mouse has high report rate
+ // credits to bonbigz
+ //{
+ // write_pos(0x369A2F, { 0x8B, 0x15, 0xF8, 0x13, 0xD4, 0x00, 0x8B, 0x1D, 0xFC, 0x13, 0xD4, 0x00 });
+ // write_pos(0x369A2C, { 0xE9, 0x71, 0xF0, 0x0B, 0x00 });
+ // write_pos(0x428AA2, { 0x8D, 0x4D, 0xF0, 0x51, 0x57, 0xFF, 0x15, 0xDC, 0xF5, 0x9D, 0x00, 0x8B, 0x45, 0xF0, 0x8B, 0x15, 0xF8, 0x13, 0xD4, 0x00, 0xE9, 0x7A, 0x0F, 0xF4, 0xFF });
+ // write_pos(0x3691B0, { 0x55, 0x89, 0xE5, 0x8B, 0x05, 0xFC, 0x13, 0xD4, 0x00, 0x8B, 0x0D, 0xF8, 0x13, 0xD4, 0x00, 0xEB, 0xC2, 0x7D, 0x03, 0x83, 0xC1, 0x01, 0x83, 0xC0, 0x32, 0x83, 0xC1, 0x32, 0x3B, 0x0D, 0xEC, 0xBC, 0xCA, 0x00, 0x7E, 0x03, 0x83, 0xE9, 0x01, 0x3B, 0x05, 0xF0, 0xBC, 0xCA, 0x00, 0x7E, 0x03, 0x83, 0xE8, 0x01, 0x83, 0xE9, 0x32, 0x83, 0xE8, 0x32, 0x89, 0x0D, 0xF8, 0x13, 0xD4, 0x00, 0x89, 0x05, 0xFC, 0x13, 0xD4, 0x00, 0x89, 0xEC, 0x5D, 0xE9, 0xB4, 0xF7, 0xFF, 0xFF });
+ // write_pos(0x369183, { 0x83, 0xF8, 0x32, 0x7D, 0x03, 0x83, 0xC0, 0x01, 0x83, 0xF9, 0x32, 0xEB, 0x31 });
+ //}
+
+ //// naked character issue
+ write_pos(0x1DDC5D, 0xEB);
+
+ // patches missiles impacting with terrain
+ write_pos(0x1FC99E, 0x00);
+ write_pos(0x1FC8C7, 0x00);
+ write_pos(0x1FC735, 0x00);
+
+ // patch mail request timeout
+ write_pos(0x6D899, { 0x05, 0x01, 0x00, 0x00, 0x00 });
+
+ std::cout << "World of Warcraft exe has been patched!\n";
+ return 0;
+}
diff --git a/Patcher/Patcher.vcxproj b/Patcher/Patcher.vcxproj
new file mode 100644
index 0000000..78dbb4d
--- /dev/null
+++ b/Patcher/Patcher.vcxproj
@@ -0,0 +1,136 @@
+<?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>
+ <ItemGroup>
+ <ClCompile Include="Patcher.cpp" />
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <VCProjectVersion>16.0</VCProjectVersion>
+ <Keyword>Win32Proj</Keyword>
+ <ProjectGuid>{7e09d295-638f-4c7d-a990-094ebad5bd00}</ProjectGuid>
+ <RootNamespace>Patcher</RootNamespace>
+ <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v143</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v143</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v143</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</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;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ConformanceMode>true</ConformanceMode>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <SDLCheck>true</SDLCheck>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ConformanceMode>true</ConformanceMode>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <SDLCheck>true</SDLCheck>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ConformanceMode>true</ConformanceMode>
+ <LanguageStandard>stdcpp17</LanguageStandard>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <SDLCheck>true</SDLCheck>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ConformanceMode>true</ConformanceMode>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/Patcher/Patcher.vcxproj.filters b/Patcher/Patcher.vcxproj.filters
new file mode 100644
index 0000000..755b3b4
--- /dev/null
+++ b/Patcher/Patcher.vcxproj.filters
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <ClCompile Include="Patcher.cpp" />
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/Patcher/Patcher.vcxproj.user b/Patcher/Patcher.vcxproj.user
new file mode 100644
index 0000000..88a5509
--- /dev/null
+++ b/Patcher/Patcher.vcxproj.user
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup />
+</Project> \ No newline at end of file