feat(Protections): Constraint attachment crash (#673)
This commit is contained in:
parent
2ae76e0b14
commit
0bbdacbfa3
@ -64,6 +64,7 @@ namespace big
|
||||
detour_hook_helper::add<hooks::format_metric_for_sending>("FMFS", g_pointers->m_format_metric_for_sending);
|
||||
|
||||
detour_hook_helper::add<hooks::invalid_mods_crash_detour>("IMCD", g_pointers->m_invalid_mods_crash_detour);
|
||||
detour_hook_helper::add<hooks::constraint_attachment_crash>("CAC", g_pointers->m_constraint_attachment_crash);
|
||||
|
||||
detour_hook_helper::add<hooks::update_presence_attribute_int>("UPAI", g_pointers->m_update_presence_attribute_int);
|
||||
detour_hook_helper::add<hooks::update_presence_attribute_string>("UPAS", g_pointers->m_update_presence_attribute_string);
|
||||
|
@ -98,6 +98,7 @@ namespace big
|
||||
static bool write_player_game_state_data_node(rage::netObject* player, CPlayerGameStateDataNode* node);
|
||||
|
||||
static void invalid_mods_crash_detour(int64_t a1, int64_t a2, int a3, char a4);
|
||||
static std::int64_t constraint_attachment_crash(std::uintptr_t a1);
|
||||
|
||||
static bool update_presence_attribute_int(void* presence_data, int profile_index, char* attr, std::uint64_t value);
|
||||
static bool update_presence_attribute_string(void* presence_data, int profile_index, char* attr, char* value);
|
||||
|
12
src/hooks/protections/constraint_attachment_crash.cpp
Normal file
12
src/hooks/protections/constraint_attachment_crash.cpp
Normal file
@ -0,0 +1,12 @@
|
||||
#include "hooking.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
std::int64_t hooks::constraint_attachment_crash(std::uintptr_t a1)
|
||||
{
|
||||
if (!*reinterpret_cast<void**>(a1 + 0x38))
|
||||
return 0;
|
||||
|
||||
return g_hooking->get_original<hooks::constraint_attachment_crash>()(a1);
|
||||
}
|
||||
}
|
@ -665,6 +665,11 @@ namespace big
|
||||
m_read_bitbuffer_gamer_handle = ptr.as<PVOID>();
|
||||
});
|
||||
|
||||
main_batch.add("CAC", "40 53 48 83 EC 20 48 8B D9 48 8B 49 38 48 8B 01", [this](memory::handle ptr)
|
||||
{
|
||||
m_constraint_attachment_crash = ptr.as<PVOID>();
|
||||
});
|
||||
|
||||
auto mem_region = memory::module("GTA5.exe");
|
||||
main_batch.run(mem_region);
|
||||
|
||||
|
@ -148,6 +148,7 @@ namespace big
|
||||
const char* m_online_version;
|
||||
|
||||
PVOID m_invalid_mods_crash_detour{};
|
||||
PVOID m_constraint_attachment_crash{};
|
||||
|
||||
int64_t** m_send_chat_ptr{};
|
||||
functions::send_chat_message m_send_chat_message{};
|
||||
|
Reference in New Issue
Block a user