Removed bruteforce_scan as it is no longer needed (#492)
This commit is contained in:
parent
70d604a535
commit
edc52ccf2e
@ -107,23 +107,6 @@ namespace memory
|
||||
return true;
|
||||
}
|
||||
|
||||
handle range::bruteforce_scan(pattern const& sig)
|
||||
{
|
||||
auto data = sig.m_bytes.data();
|
||||
auto length = sig.m_bytes.size();
|
||||
|
||||
const auto scan_end = m_size - length;
|
||||
for (std::uintptr_t i{}; i != scan_end; ++i)
|
||||
{
|
||||
if (pattern_matches(m_base.add(i).as<std::uint8_t*>(), data, length))
|
||||
{
|
||||
return m_base.add(i);
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::vector<handle> range::scan_all(pattern const &sig)
|
||||
{
|
||||
std::vector<handle> result{};
|
||||
|
@ -17,7 +17,6 @@ namespace memory
|
||||
bool contains(handle h);
|
||||
|
||||
handle scan(pattern const& sig);
|
||||
handle bruteforce_scan(pattern const& sig);
|
||||
std::vector<handle> scan_all(pattern const& sig);
|
||||
protected:
|
||||
handle m_base;
|
||||
|
@ -424,13 +424,13 @@ namespace big
|
||||
/**
|
||||
* Freemode thread restorer through VM patch
|
||||
*/
|
||||
if (auto pat1 = mem_region.bruteforce_scan("3b 0a 0f 83 ? ? ? ? 48 ff c7"))
|
||||
if (auto pat1 = mem_region.scan("3b 0a 0f 83 ? ? ? ? 48 ff c7"))
|
||||
{
|
||||
memory::byte_patch::make(pat1.add(2).as<uint32_t*>(), 0xc9310272);
|
||||
memory::byte_patch::make(pat1.add(6).as<uint16_t*>(), 0x9090);
|
||||
}
|
||||
|
||||
if (auto pat2 = mem_region.bruteforce_scan("3b 0a 0f 83 ? ? ? ? 49 03 fa"))
|
||||
if (auto pat2 = mem_region.scan("3b 0a 0f 83 ? ? ? ? 49 03 fa"))
|
||||
{
|
||||
memory::byte_patch::make(pat2.add(2).as<uint32_t*>(), 0xc9310272);
|
||||
memory::byte_patch::make(pat2.add(6).as<uint16_t*>(), 0x9090);
|
||||
|
Reference in New Issue
Block a user