// namespace waveshield_silentaim_bypass {
// static uint8_t shellcode[] = {
// 0x30, 0xC0,
// 0xC3
// };
//
// static uintptr_t m_has_entity_been_damaged_by_weapon = 0;
// static std::vector<uint8_t> m_original_instruction;
// static std::atomic<bool> m_is_patched{ false };
//
// inline bool initialize() {
// if (m_has_entity_been_damaged_by_weapon)
// return true;
// if (!Game.hProcess || !Offsets.GameBase) return false;
//
// std::vector<uint8_t> pattern1 = Pattern2Vector("48 89 5C 24 08 48 89 74 24 10 57 48 83 EC ? 41 8B F8 8B F2 E8 ? ? ? ? 33 DB");
// m_has_entity_been_damaged_by_weapon = FindSignature(pattern1, Offsets.GameBase, 0x10000000);
//
// if (!m_has_entity_been_damaged_by_weapon) return false;
//
// m_original_instruction.resize(sizeof(shellcode));
// SIZE_T bytesRead = 0;
// if (!ReadProcessMemory(Game.hProcess, (LPCVOID)m_has_entity_been_damaged_by_weapon, m_original_instruction.data(), sizeof(shellcode), &bytesRead)) {
// return false;
// }
// return bytesRead == sizeof(shellcode);
// }
//
// inline void patch(bool activate) {
// if (!Game.hProcess) return;
//
// if (!activate && !m_is_patched.load())
// return;
//
// if (!m_has_entity_been_damaged_by_weapon)
// return;
//
// if (activate) {
// WriteBytes(m_has_entity_been_damaged_by_weapon, &shellcode[0], sizeof(shellcode));
// m_is_patched.store(true);
// }
// else {
// if (!m_original_instruction.empty()) {
// WriteBytes(m_has_entity_been_damaged_by_weapon, &m_original_instruction[0], m_original_instruction.size());
// }
// m_is_patched.store(false);
// }
// }
//
// inline void shutdown() {
// patch(false);
// }
// }