mirror of
https://github.com/fedddddd/iw5-gsc-utils.git
synced 2025-07-03 17:51:55 +00:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
1d94fdd88d | |||
0af6b1cb13 |
@ -2,8 +2,6 @@
|
|||||||
#include "signatures.hpp"
|
#include "signatures.hpp"
|
||||||
#include <utils/hook.hpp>
|
#include <utils/hook.hpp>
|
||||||
|
|
||||||
#define PAYLOAD_SIZE 0x20000000
|
|
||||||
|
|
||||||
namespace signatures
|
namespace signatures
|
||||||
{
|
{
|
||||||
size_t load_image_size()
|
size_t load_image_size()
|
||||||
@ -34,7 +32,8 @@ namespace signatures
|
|||||||
{
|
{
|
||||||
const char* string_ptr = nullptr;
|
const char* string_ptr = nullptr;
|
||||||
std::string mask(string.size(), 'x');
|
std::string mask(string.size(), 'x');
|
||||||
utils::hook::signature signature(PAYLOAD_SIZE, get_image_size() - PAYLOAD_SIZE);
|
const auto base = reinterpret_cast<size_t>(GetModuleHandle("plutonium-bootstrapper-win32.exe"));
|
||||||
|
utils::hook::signature signature(base, get_image_size() - base);
|
||||||
|
|
||||||
signature.add({
|
signature.add({
|
||||||
string,
|
string,
|
||||||
@ -54,7 +53,7 @@ namespace signatures
|
|||||||
char bytes[4] = {0};
|
char bytes[4] = {0};
|
||||||
const auto string_ptr = find_string_ptr(string);
|
const auto string_ptr = find_string_ptr(string);
|
||||||
memcpy(bytes, &string_ptr, sizeof(bytes));
|
memcpy(bytes, &string_ptr, sizeof(bytes));
|
||||||
return find_string_ptr(bytes);
|
return find_string_ptr({bytes, 4});
|
||||||
}
|
}
|
||||||
|
|
||||||
bool process_maps()
|
bool process_maps()
|
||||||
@ -89,7 +88,6 @@ namespace signatures
|
|||||||
bool process()
|
bool process()
|
||||||
{
|
{
|
||||||
load_function_tables();
|
load_function_tables();
|
||||||
process_printf();
|
return process_printf() && process_maps();
|
||||||
return process_maps();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user