diff --git a/src/hooking.cpp b/src/hooking.cpp index 9fde31f6..e7ce8226 100644 --- a/src/hooking.cpp +++ b/src/hooking.cpp @@ -97,6 +97,8 @@ namespace big detour_hook_helper::add("WBGH", g_pointers->m_write_bitbuffer_gamer_handle); detour_hook_helper::add("RBGH", g_pointers->m_read_bitbuffer_gamer_handle); + detour_hook_helper::add("QD", g_pointers->m_queue_dependency); + g_hooking = this; } diff --git a/src/hooking.hpp b/src/hooking.hpp index bbf425c8..621531be 100644 --- a/src/hooking.hpp +++ b/src/hooking.hpp @@ -134,6 +134,7 @@ namespace big 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 void queue_dependency(void* dependency); }; class minhook_keepalive diff --git a/src/hooks/misc/queue_dependency.cpp b/src/hooks/misc/queue_dependency.cpp new file mode 100644 index 00000000..5338372b --- /dev/null +++ b/src/hooks/misc/queue_dependency.cpp @@ -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()(dependency); + } +} \ No newline at end of file diff --git a/src/pointers.cpp b/src/pointers.cpp index 028fe9b2..78132e6d 100644 --- a/src/pointers.cpp +++ b/src/pointers.cpp @@ -732,6 +732,18 @@ namespace big m_save_json_data = ptr.as(); }); + // 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(); + }); + + // 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(); + }); + auto mem_region = memory::module("GTA5.exe"); main_batch.run(mem_region); diff --git a/src/pointers.hpp b/src/pointers.hpp index 37126c5a..38f27cd8 100644 --- a/src/pointers.hpp +++ b/src/pointers.hpp @@ -197,6 +197,9 @@ namespace big memory::byte_patch* m_broadcast_patch; rage::atSingleton* m_security; + + PVOID m_queue_dependency; + PVOID m_interval_check_func; PVOID m_send_session_matchmaking_attributes; diff --git a/src/views/esp/view_esp.cpp b/src/views/esp/view_esp.cpp index 53ddac4c..4cd5f8ac 100644 --- a/src/views/esp/view_esp.cpp +++ b/src/views/esp/view_esp.cpp @@ -18,10 +18,12 @@ namespace big 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) { - if (g->esp.hide_self && plyr->is_valid() && plyr->id() == g_player_service->get_self()->id() || - !plyr->is_valid() || + if (!plyr->is_valid() || !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();