mirror of
https://gitgud.io/yuv420p10le/plexmediaserver_crack
synced 2025-07-04 16:34:47 +00:00
Added str_holder to support <16 length strings.
This commit is contained in:
parent
d4f1d18bac
commit
7d5a79c019
@ -376,9 +376,11 @@ bool process_feature(const char* guid, [[maybe_unused]] uintptr_t caller)
|
||||
return false;
|
||||
}
|
||||
|
||||
uint64_t hook_is_feature_available(uintptr_t user, const char** feature)
|
||||
uint64_t hook_is_feature_available(uintptr_t user, str_holder* feature)
|
||||
{
|
||||
if(process_feature(*feature, reinterpret_cast<uintptr_t>(_ReturnAddress()) - get_current_process_handle()))
|
||||
std::string_view str(feature->obj.length >= 16 ? feature->obj.str : feature->str);
|
||||
|
||||
if(process_feature(str.data(), reinterpret_cast<uintptr_t>(_ReturnAddress()) - get_current_process_handle()))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -386,10 +388,12 @@ uint64_t hook_is_feature_available(uintptr_t user, const char** feature)
|
||||
return _is_feature_available.call<uint64_t>(user, feature);
|
||||
}
|
||||
|
||||
uint64_t* hook_map_find(uintptr_t* rcx, uintptr_t rdx, const char** str)
|
||||
uint64_t* hook_map_find(uintptr_t* rcx, uintptr_t rdx, str_holder* str)
|
||||
{
|
||||
std::string_view feature(str->obj.length >= 16 ? str->obj.str : str->str);
|
||||
|
||||
if(_feature_manager != nullptr && rcx == &_feature_manager->m_feature_map() &&
|
||||
process_feature(*str, reinterpret_cast<uintptr_t>(_ReturnAddress()) - get_current_process_handle()))
|
||||
process_feature(feature.data(), reinterpret_cast<uintptr_t>(_ReturnAddress()) - get_current_process_handle()))
|
||||
{
|
||||
static uint64_t FAKE_PTR = 0;
|
||||
|
||||
|
@ -24,11 +24,23 @@ public:
|
||||
member_at(uintptr_t, m_map_offset, m_feature_map);
|
||||
};
|
||||
|
||||
union str_holder
|
||||
{
|
||||
struct
|
||||
{
|
||||
const char* str;
|
||||
uintptr_t pad[2];
|
||||
size_t length;
|
||||
} obj;
|
||||
|
||||
const char str[16];
|
||||
};
|
||||
|
||||
uintptr_t get_current_process_handle();
|
||||
std::optional<std::tuple<uintptr_t, uintptr_t>> get_section_info(std::string_view name);
|
||||
std::optional<uintptr_t> sig_scan(const uintptr_t start, const uintptr_t end, std::string_view pattern);
|
||||
uint64_t hook_is_feature_available(uintptr_t rcx, const char** guid);
|
||||
uint64_t* hook_map_find(uintptr_t* rcx, uintptr_t rdx, const char** str);
|
||||
uint64_t hook_is_feature_available(uintptr_t rcx, str_holder* guid);
|
||||
uint64_t* hook_map_find(uintptr_t* rcx, uintptr_t rdx, str_holder* str);
|
||||
void hook_bitset_init(uintptr_t rcx, uintptr_t rdx);
|
||||
FeatureManager* hook_feature_manager_init(FeatureManager* rcx);
|
||||
void hook();
|
||||
|
Loading…
x
Reference in New Issue
Block a user