Skip to content

Commit 9da7ec4

Browse files
committed
恢复到之前的SIG版本,因为之前错误地将DLL加载问题识别为SIG问题。
1 parent 400a57f commit 9da7ec4

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/kcd2db.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,9 @@
88
#define KCD2_ENV_IMPORT
99
#include "db/Database.h"
1010
#include "kcd2/env.h"
11-
#include "kcd2/IConsole.h"
1211
#include "log/log.h"
1312
#include "lua/db.h"
1413

15-
1614
std::optional<uintptr_t> find_env_addr()
1715
{
1816
lm_module_t module;
@@ -22,8 +20,8 @@ std::optional<uintptr_t> find_env_addr()
2220
{
2321
std::this_thread::sleep_for(std::chrono::milliseconds(100));
2422
}
25-
26-
const auto pattern = "48 8B 0D ?? ?? ?? ?? 48 8D 15 ?? ?? ?? ?? 45 33 C9 45 33 C0 4C 8B 11 41 FF 92 ?? ?? ?? ?? 48 85 FF";
23+
// 通常会找到两个地址,不过两个地址其实通过RIP之后的偏移是一样的,都是指向 gEnv->pConsole 的 qword_1848A7C68
24+
const auto pattern = "48 8B 0D ?? ?? ?? ?? 48 8D 15 ?? ?? ?? ?? 45 33 C9 45 33 C0 4C 8B 11";
2725
const auto scan_address = LM_SigScan(pattern, module.base, module.size);
2826
if (!scan_address)
2927
{

0 commit comments

Comments
 (0)