This commit is contained in:
alice
2025-12-03 05:45:25 +01:00
parent 54226a0e56
commit 8d4fa65e3b
16 changed files with 163 additions and 45 deletions
+10 -15
View File
@@ -1,28 +1,23 @@
#include <stdinc.hpp>
#include "loader/component_loader.hpp"
#include "component/signatures.hpp"
#include "plugin.hpp"
PLUTONIUM_API plutonium::sdk::plugin* PLUTONIUM_CALLBACK on_initialize()
{
return plugin::get();
}
BOOL APIENTRY DllMain(HMODULE /*hModule*/, DWORD ul_reason_for_call, LPVOID /*lpReserved*/)
{
if (ul_reason_for_call == DLL_PROCESS_ATTACH)
{
if (!signatures::process())
{
MessageBoxA(NULL,
"This version of iw5-gsc-utils is outdated.\n" \
"Download the latest dll from here: https://github.com/fedddddd/iw5-gsc-utils/releases",
"ERROR", MB_ICONERROR);
return FALSE;
}
}
if (game::plutonium::printf.get() != nullptr)
{
utils::hook::jump(reinterpret_cast<uintptr_t>(&printf), game::plutonium::printf);
}
component_loader::post_unpack();
if (ul_reason_for_call == DLL_PROCESS_DETACH)
{
component_loader::pre_destroy();
}
return TRUE;