diff --git a/src/client/loader/loader.cpp b/src/client/loader/loader.cpp index dadc9f1..9f2f241 100644 --- a/src/client/loader/loader.cpp +++ b/src/client/loader/loader.cpp @@ -188,7 +188,7 @@ void loader::load_tls(const utils::nt::library& target, const utils::nt::library const auto tls_size = source_tls->EndAddressOfRawData - source_tls->StartAddressOfRawData; const auto tls_index = *reinterpret_cast(target_tls->AddressOfIndex); - *reinterpret_cast(source_tls->AddressOfIndex) = tls_index; + utils::hook::set(source_tls->AddressOfIndex, tls_index); DWORD old_protect; VirtualProtect(PVOID(target_tls->StartAddressOfRawData),