aboutsummaryrefslogtreecommitdiff
path: root/Patcher.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Patcher.cpp')
-rw-r--r--Patcher.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/Patcher.cpp b/Patcher.cpp
new file mode 100644
index 0000000..c37c631
--- /dev/null
+++ b/Patcher.cpp
@@ -0,0 +1,31 @@
+#include <iostream>
+#include <filesystem>
+#include <fstream>
+#include <array>
+#include <iterator>
+
+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];
+
+ std::fstream wow_exe(wow, std::ios::in | std::ios::out | std::ios::binary);
+ if (!wow_exe)
+ {
+ std::cout << "World of Warcraft exe not found!\n";
+ return 1;
+ }
+
+ // replace binary in exe (offset: 0xE94)
+ wow_exe.seekp(0xE94);
+ wow_exe << static_cast<char>(0xEB);
+
+ std::cout << "World of Warcraft exe has been patched!\n";
+ return 0;
+}