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