update
This commit is contained in:
parent
9dca06aebf
commit
3b9006d9fe
@ -147,12 +147,12 @@ namespace arxan
|
|||||||
if (game::environment::is_sp()) return;
|
if (game::environment::is_sp()) return;
|
||||||
|
|
||||||
// some of arxan crashes
|
// some of arxan crashes
|
||||||
utils::hook::nop(0xCDEFCAA_b, 6);
|
// utils::hook::nop(0xCDEFCAA_b, 6);
|
||||||
utils::hook::nop(0x930FCAA_b, 6);
|
// utils::hook::nop(0x930FCAA_b, 6);
|
||||||
utils::hook::nop(0x867B66_b, 4);
|
// utils::hook::nop(0x867B66_b, 4);
|
||||||
utils::hook::nop(0x81F0C0_b, 6);
|
// utils::hook::nop(0x81F0C0_b, 6);
|
||||||
utils::hook::nop(0x5813609_b, 6);
|
// utils::hook::nop(0x5813609_b, 6);
|
||||||
utils::hook::nop(0x8DD678_b, 0xEB);
|
// utils::hook::nop(0x8DD678_b, 0xEB);
|
||||||
//utils::hook::nop(0xB3D96_b, 4);
|
//utils::hook::nop(0xB3D96_b, 4);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -111,7 +111,11 @@ namespace game_module
|
|||||||
|
|
||||||
void post_load() override
|
void post_load() override
|
||||||
{
|
{
|
||||||
|
#ifdef INJECT_HOST_AS_LIB
|
||||||
hook_module_resolving();
|
hook_module_resolving();
|
||||||
|
#else
|
||||||
|
assert(get_host_module() == get_game_module());
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ BOOL WINAPI system_parameters_info_a(const UINT uiAction, const UINT uiParam, co
|
|||||||
|
|
||||||
FARPROC WINAPI get_proc_address(const HMODULE hModule, const LPCSTR lpProcName)
|
FARPROC WINAPI get_proc_address(const HMODULE hModule, const LPCSTR lpProcName)
|
||||||
{
|
{
|
||||||
if (lpProcName == "GlobalMemoryStatusEx"s)
|
if (lpProcName == "InitializeCriticalSectionEx"s)
|
||||||
{
|
{
|
||||||
component_loader::post_unpack();
|
component_loader::post_unpack();
|
||||||
}
|
}
|
||||||
@ -50,11 +50,6 @@ launcher::mode detect_mode_from_arguments()
|
|||||||
return launcher::mode::none;
|
return launcher::mode::none;
|
||||||
}
|
}
|
||||||
|
|
||||||
int returning()
|
|
||||||
{
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
FARPROC load_binary(const launcher::mode mode, uint64_t* base_address)
|
FARPROC load_binary(const launcher::mode mode, uint64_t* base_address)
|
||||||
{
|
{
|
||||||
loader loader;
|
loader loader;
|
||||||
@ -79,11 +74,6 @@ FARPROC load_binary(const launcher::mode mode, uint64_t* base_address)
|
|||||||
return get_proc_address;
|
return get_proc_address;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (function == "LoadStringA" || function == "LoadStringW")
|
|
||||||
{
|
|
||||||
return returning;
|
|
||||||
}
|
|
||||||
|
|
||||||
return component_loader::load_import(library, function);
|
return component_loader::load_import(library, function);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -110,7 +100,12 @@ FARPROC load_binary(const launcher::mode mode, uint64_t* base_address)
|
|||||||
binary.data()));
|
binary.data()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef INJECT_HOST_AS_LIB
|
||||||
return loader.load_library(binary, base_address);
|
return loader.load_library(binary, base_address);
|
||||||
|
#else
|
||||||
|
*base_address = 0x140000000;
|
||||||
|
return loader.load(self, data);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void remove_crash_file()
|
void remove_crash_file()
|
||||||
|
@ -1,6 +1,23 @@
|
|||||||
#include <std_include.hpp>
|
#include <std_include.hpp>
|
||||||
|
|
||||||
|
#pragma comment(linker, "/merge:.data=.cld")
|
||||||
|
#pragma comment(linker, "/merge:.rdata=.clr")
|
||||||
|
#pragma comment(linker, "/merge:.cl=.main")
|
||||||
|
#pragma comment(linker, "/merge:.text=.main")
|
||||||
|
#pragma comment(linker, "/stack:0x1000000")
|
||||||
|
|
||||||
|
#ifdef INJECT_HOST_AS_LIB
|
||||||
#pragma comment(linker, "/base:0x160000000")
|
#pragma comment(linker, "/base:0x160000000")
|
||||||
|
#else
|
||||||
|
#pragma comment(linker, "/base:0x140000000")
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language=''\"")
|
||||||
|
|
||||||
|
#ifndef INJECT_HOST_AS_LIB
|
||||||
|
#pragma bss_seg(".payload")
|
||||||
|
char payload_data[BINARY_PAYLOAD_SIZE];
|
||||||
|
#endif
|
||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define BINARY_PAYLOAD_SIZE 0x12000000
|
#define BINARY_PAYLOAD_SIZE 0x14000000
|
||||||
|
|
||||||
|
// Decide whether to load the game as lib or to inject it
|
||||||
|
//#define INJECT_HOST_AS_LIB
|
||||||
|
|
||||||
#pragma warning(push)
|
#pragma warning(push)
|
||||||
#pragma warning(disable: 4100)
|
#pragma warning(disable: 4100)
|
||||||
|
Loading…
Reference in New Issue
Block a user