Replace offset.bin's header version variable with TimeDateStamp. (#2832)
* Replace offset.bin's header version variable with TimeDateStamp. * Broke out Read Attribute Patch into two signatures.
This commit is contained in:
parent
8d0ce1d306
commit
7ba85de412
@ -44,6 +44,11 @@ namespace memory
|
|||||||
return m_size;
|
return m_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DWORD module::timestamp() const
|
||||||
|
{
|
||||||
|
return m_timestamp;
|
||||||
|
}
|
||||||
|
|
||||||
bool module::wait_for_module(std::optional<std::chrono::high_resolution_clock::duration> time)
|
bool module::wait_for_module(std::optional<std::chrono::high_resolution_clock::duration> time)
|
||||||
{
|
{
|
||||||
const auto giveup_time = time.has_value() ? std::make_optional(std::chrono::high_resolution_clock::now() + time.value()) : std::nullopt;
|
const auto giveup_time = time.has_value() ? std::make_optional(std::chrono::high_resolution_clock::now() + time.value()) : std::nullopt;
|
||||||
@ -72,6 +77,7 @@ namespace memory
|
|||||||
const auto ntHeader = m_base.add(dosHeader->e_lfanew).as<IMAGE_NT_HEADERS*>();
|
const auto ntHeader = m_base.add(dosHeader->e_lfanew).as<IMAGE_NT_HEADERS*>();
|
||||||
|
|
||||||
m_size = ntHeader->OptionalHeader.SizeOfImage;
|
m_size = ntHeader->OptionalHeader.SizeOfImage;
|
||||||
|
m_timestamp = ntHeader->FileHeader.TimeDateStamp;
|
||||||
|
|
||||||
return m_loaded;
|
return m_loaded;
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,7 @@ namespace memory
|
|||||||
|
|
||||||
bool loaded() const;
|
bool loaded() const;
|
||||||
size_t size() const;
|
size_t size() const;
|
||||||
|
DWORD timestamp() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Waits till the given module is loaded.
|
* @brief Waits till the given module is loaded.
|
||||||
|
@ -23,5 +23,6 @@ namespace memory
|
|||||||
protected:
|
protected:
|
||||||
handle m_base;
|
handle m_base;
|
||||||
std::size_t m_size;
|
std::size_t m_size;
|
||||||
|
DWORD m_timestamp;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1813,7 +1813,15 @@ namespace big
|
|||||||
[](memory::handle ptr)
|
[](memory::handle ptr)
|
||||||
{
|
{
|
||||||
g_pointers->m_sc.m_read_attribute_patch = ptr.as<PVOID>();
|
g_pointers->m_sc.m_read_attribute_patch = ptr.as<PVOID>();
|
||||||
g_pointers->m_sc.m_read_attribute_patch_2 = ptr.add(0x72).as<PVOID>();
|
}
|
||||||
|
},
|
||||||
|
// Read Attribute Patch 2
|
||||||
|
{
|
||||||
|
"RAP2",
|
||||||
|
"32 C0 EB ? C7 83",
|
||||||
|
[](memory::handle ptr)
|
||||||
|
{
|
||||||
|
g_pointers->m_sc.m_read_attribute_patch_2 = ptr.as<PVOID>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
>();
|
>();
|
||||||
|
@ -80,7 +80,7 @@ namespace big
|
|||||||
|
|
||||||
cache_file.set_data(std::move(cache_data_ptr), data_size);
|
cache_file.set_data(std::move(cache_data_ptr), data_size);
|
||||||
|
|
||||||
cache_file.set_header_version(mem_region.size());
|
cache_file.set_header_version(mem_region.timestamp());
|
||||||
cache_file.write();
|
cache_file.write();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user