Use signature utils

This commit is contained in:
Federico Cecchetto
2022-03-26 19:51:51 +01:00
parent 7b995b3348
commit 4ffdb331b4
15 changed files with 246 additions and 7516 deletions
+9 -4
View File
@@ -1,22 +1,27 @@
#include <stdinc.hpp>
#include "loader/component_loader.hpp"
#include "component/signatures.hpp"
BOOL APIENTRY DllMain(HMODULE /*hModule*/, DWORD ul_reason_for_call, LPVOID /*lpReserved*/)
{
if (ul_reason_for_call == DLL_PROCESS_ATTACH)
{
const auto value = *reinterpret_cast<DWORD*>(0x21B00000);
if (value != 0x64AA1902)
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",
"Download the latest dll from here: https://github.com/fedddddd/iw5-gsc-utils/releases",
"ERROR", MB_ICONERROR);
return FALSE;
}
utils::hook::jump(reinterpret_cast<uintptr_t>(&printf), game::plutonium::printf);
if (game::plutonium::printf.get() != nullptr)
{
utils::hook::jump(reinterpret_cast<uintptr_t>(&printf), game::plutonium::printf);
}
component_loader::post_unpack();
}