void set_raw(std::uintptr_t address, const char* RawData, std::size_t size, bool protect) {
DWORD oldProt;
if (protect) VirtualProtect(reinterpret_cast<void*>(address), size, PAGE_READWRITE, &oldProt);
memcpy(reinterpret_cast<void*>(address), RawData, size);
if (protect) VirtualProtect(reinterpret_cast<void*>(address), size, oldProt, &oldProt);
}
template <typename T>
inline void write_memory(std::uintptr_t address, T value, bool protect = true) {
unsigned long oldProt;
if (protect) VirtualProtect(reinterpret_cast<void*>(address), sizeof(T), PAGE_READWRITE, &oldProt);
*reinterpret_cast<T*>(address) = value;
if (protect) VirtualProtect(reinterpret_cast<void*>(address), sizeof(T), oldProt, &oldProt);
}
set_raw(0x53C136, "\xE8\x65\x04\x1C\x00", 5, true);
set_raw(0xC1BFD0, "\x01", 1, true); // or WriteMemory(0xC1BFD0, char(1), true);