blob: c37c631beec035bf7665de90838fbb40ada03f1e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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;
}
|