mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-06-17 23:07:26 +08:00
feat(Protection): Add bypass for rare report metric (#715)
This commit is contained in:
parent
ac94dd5311
commit
b74dd7516c
@ -97,6 +97,8 @@ namespace big
|
|||||||
detour_hook_helper::add<hooks::write_bitbuffer_gamer_handle>("WBGH", g_pointers->m_write_bitbuffer_gamer_handle);
|
detour_hook_helper::add<hooks::write_bitbuffer_gamer_handle>("WBGH", g_pointers->m_write_bitbuffer_gamer_handle);
|
||||||
detour_hook_helper::add<hooks::read_bitbuffer_gamer_handle>("RBGH", g_pointers->m_read_bitbuffer_gamer_handle);
|
detour_hook_helper::add<hooks::read_bitbuffer_gamer_handle>("RBGH", g_pointers->m_read_bitbuffer_gamer_handle);
|
||||||
|
|
||||||
|
detour_hook_helper::add<hooks::queue_dependency>("QD", g_pointers->m_queue_dependency);
|
||||||
|
|
||||||
g_hooking = this;
|
g_hooking = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,6 +134,7 @@ namespace big
|
|||||||
static bool read_bitbuffer_gamer_handle(rage::datBitBuffer* buffer, rage::rlGamerHandle* handle);
|
static bool read_bitbuffer_gamer_handle(rage::datBitBuffer* buffer, rage::rlGamerHandle* handle);
|
||||||
|
|
||||||
static int nt_query_virtual_memory(void* _this, HANDLE handle, PVOID base_addr, int info_class, MEMORY_BASIC_INFORMATION* info, int size, size_t* return_len);
|
static int nt_query_virtual_memory(void* _this, HANDLE handle, PVOID base_addr, int info_class, MEMORY_BASIC_INFORMATION* info, int size, size_t* return_len);
|
||||||
|
static void queue_dependency(void* dependency);
|
||||||
};
|
};
|
||||||
|
|
||||||
class minhook_keepalive
|
class minhook_keepalive
|
||||||
|
17
src/hooks/misc/queue_dependency.cpp
Normal file
17
src/hooks/misc/queue_dependency.cpp
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#include "hooking.hpp"
|
||||||
|
#include "pointers.hpp"
|
||||||
|
|
||||||
|
namespace big
|
||||||
|
{
|
||||||
|
void hooks::queue_dependency(void* dependency)
|
||||||
|
{
|
||||||
|
if (dependency == g_pointers->m_interval_check_func)
|
||||||
|
{
|
||||||
|
LOG(INFO) << "Prevent attempt to queue a report to R*.";
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
return g_hooking->get_original<hooks::queue_dependency>()(dependency);
|
||||||
|
}
|
||||||
|
}
|
@ -732,6 +732,18 @@ namespace big
|
|||||||
m_save_json_data = ptr.as<functions::save_json_data>();
|
m_save_json_data = ptr.as<functions::save_json_data>();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Queue Dependency
|
||||||
|
main_batch.add("QD", "48 89 5C 24 ? 57 48 83 EC ? 0F B6 99", [this](memory::handle ptr)
|
||||||
|
{
|
||||||
|
m_queue_dependency = ptr.as<PVOID>();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Interval Check Function
|
||||||
|
main_batch.add("ICF", "48 8D 0D ? ? ? ? 88 05 ? ? ? ? 48 8D 05", [this](memory::handle ptr)
|
||||||
|
{
|
||||||
|
m_interval_check_func = ptr.add(3).rip().as<PVOID>();
|
||||||
|
});
|
||||||
|
|
||||||
auto mem_region = memory::module("GTA5.exe");
|
auto mem_region = memory::module("GTA5.exe");
|
||||||
main_batch.run(mem_region);
|
main_batch.run(mem_region);
|
||||||
|
|
||||||
|
@ -197,6 +197,9 @@ namespace big
|
|||||||
memory::byte_patch* m_broadcast_patch;
|
memory::byte_patch* m_broadcast_patch;
|
||||||
|
|
||||||
rage::atSingleton<rage::RageSecurity>* m_security;
|
rage::atSingleton<rage::RageSecurity>* m_security;
|
||||||
|
|
||||||
|
PVOID m_queue_dependency;
|
||||||
|
PVOID m_interval_check_func;
|
||||||
|
|
||||||
PVOID m_send_session_matchmaking_attributes;
|
PVOID m_send_session_matchmaking_attributes;
|
||||||
|
|
||||||
|
@ -18,10 +18,12 @@ namespace big
|
|||||||
static ImColor health_red = ImColor(0.69f, 0.29f, 0.29f, 1.f);
|
static ImColor health_red = ImColor(0.69f, 0.29f, 0.29f, 1.f);
|
||||||
|
|
||||||
void esp::draw_player(const player_ptr& plyr, ImDrawList* const draw_list) {
|
void esp::draw_player(const player_ptr& plyr, ImDrawList* const draw_list) {
|
||||||
if (g->esp.hide_self && plyr->is_valid() && plyr->id() == g_player_service->get_self()->id() ||
|
if (!plyr->is_valid() ||
|
||||||
!plyr->is_valid() ||
|
|
||||||
!plyr->get_ped() ||
|
!plyr->get_ped() ||
|
||||||
!plyr->get_ped()->m_navigation) return;
|
!plyr->get_ped()->m_navigation)
|
||||||
|
return;
|
||||||
|
if (g->esp.hide_self && plyr->is_valid() && plyr->id() == g_player_service->get_self()->id())
|
||||||
|
return;
|
||||||
|
|
||||||
auto& player_pos = *plyr->get_ped()->m_navigation->get_position();
|
auto& player_pos = *plyr->get_ped()->m_navigation->get_position();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user