写在前面
1.通过前面的文章,相信各位已经能够自己找到GNames并使用DUMP工具导出GNames了。
2.本篇文章将介绍各种所需数据的查找方法。
一、准备工作
1.CheatEngine,本篇以及后续篇幅的重要工具。
2.一个记事本,保证你能记录下关键信息。
二、代码分析/字符串关键词
a.代码分析/引用的字符串
1.首先,打开CE并附加游戏。
2.点击浏览内存/查看内存,或随便搜索一个数值选中后按下CTRL+B快捷键。
3.在浏览内存区域窗口中选择视图菜单->引用的字符串(快捷键CTRL+ALT+R)。

4.如果没有打开过,会询问你是否分析代码,点击是,进行分析。
5.等待分析完成。
三.FNamePool

1.代码分析完成后,按下CTRL+F键打开查找窗口,输入 Duplicated 进行查找。
2.笔者这里搜索到了一个名为:DuplicatedHardcodedName 的字符串。
3.选中搜索到的字符串,在窗口右边有一个地址,双击它:

来到了汇编窗口:

4.现在,在当前位置(蓝色) 按下鼠标右键,选中当前函数:


5.这样,整个函数就被选中了,现在往上翻到函数顶部双击调用:

来到此处:

现在,注意当前位置(CALL)的上一行,将它的地址拿出来:

扔到数据结构分析器中看一看:

非常规律,那么这大概率就是我们需要的东西了。
1.记录地址并设置特征码

1.选中一行后按住shift键点击要批量选中的位置,然后右键复制到剪贴板(字节+操作码) 。
2.别忘了把之前的地址也一块记录下来。
=====FNamePool=====
字符串关键词:Duplicated、DuplicatedHardcodedName
7FF77C04C600
GameBase + D20C600 -> Current FNamePool Addr.
48 8D 0D ?? ?? ?? ?? E8 ?? ?? ?? ?? 48 8B D8 C6 05 ?? ?? ?? ?? 01 0F 28 ?? ?? ?? -> Init FNamePool Signature.
DeadByDaylight-Win64-Shipping.exe+396458B - 48 8D 0D 6E808A09 - lea rcx,[DeadByDaylight-Win64-Shipping.exe+D20C600]
DeadByDaylight-Win64-Shipping.exe+3964592 - E8 C9D64702 - call DeadByDaylight-Win64-Shipping.exe+5DE1C60
DeadByDaylight-Win64-Shipping.exe+3964597 - 48 8B D8 - mov rbx,rax
DeadByDaylight-Win64-Shipping.exe+396459A - C6 05 57808A09 01 - mov byte ptr [DeadByDaylight-Win64-Shipping.exe+D20C5F8],01
DeadByDaylight-Win64-Shipping.exe+39645A1 - 0F28 44 24 20 - movaps xmm0,[rsp+20]
3.需要注意的是,特征码需要将操作码中会变动的内容以??代替。
4.尝试使用CE搜索特征码:

出来了4个地址,依次加入地址列表:

5.需要注意的是加入地址列表后需要编辑地址,将其地址后面+3(因为特征码前面3个字节我们是不需要的,只需要看里面的地址),并修改类型为4字节。
6.结果如下:

- 使用FNamePool Addr:
cpp
NamePool = (FNamePool*)(game_base + 0x0D20C600);
四、FUObjectArray
1.同样的,与查找FNamePool一样的方法。
2.关键词:ShowPendingKills,查找后出现结果:

出现了2个地址,可以依次尝试,双击第一个地址后来到此处:

- 这时候,我们要向下翻:

1.记录地址并设置特征码
1.同样的,记录下它的地址以及操作码等信息:


2.使用CE搜索特征码看看:

=====FUObjectArray=====
字符串关键词:ShowPendingKills
7FF77C0A4C30
GameBase + D264C30 -> Current GObjects Addr.
48 8B 0D ?? ?? ?? ?? 48 98 4C 8B 04 D1 -> GObject Signature.
DeadByDaylight-Win64-Shipping.exe+7B550C0 - 48 8B 0D 69FB7005 - mov rcx,[DeadByDaylight-Win64-Shipping.exe+D264C30]
DeadByDaylight-Win64-Shipping.exe+7B550C7 - 48 98 - cdqe
DeadByDaylight-Win64-Shipping.exe+7B550C9 - 4C 8B 04 D1 - mov r8,[rcx+rdx*8]
- 使用FUObjectArray Addr:
cpp
ObjectArray = (TUObjectArray*)(game_base + 0x0D264C30);
五、PostRender
1.这个东西其实就是引擎自身的绘制。
2.关键词:LoadingMessage,相似的流程:

双击地址来到此处:

选中整个函数:

3.来到头部以后,下一个断点等待断下:


4.游戏断下后,注意右下角堆栈窗口,选择第一个双击过去:

跳过去后,注意上面一行:
5.这个偏移就是我们需要的东西了,记录下来并计算一下:
6.需要注意,这里是16进制。同时因为8字节的关系所以除以0x08而不是0x04。
7.得到了0x65:
=====PostRender=====
字符串关键词:LoadingMessage
DeadByDaylight-Win64-Shipping.exe+7B4B782 - FF 90 28030000 - call qword ptr [rax+00000328] -> Call PostRender.
0x328 / 0x08 = 0x65
cpp
int post_render_index = 0x65;
六、ProcessEvent
1.关键词:bad or,操作流程大同小异:


当然,这次需要往上翻,翻到哪里呢?
找红框中类似的汇编指令,向上找8次就差不多了:

第一次:

第二次:

第三次:

第四次:

第五次:

第六次:

第七次:

第八次:


这就找到了,同样的,记录下来计算:

得到结果为0x44。
cpp
int process_event_index = 0x44;
=====ProcessEvent=====
字符串关键词:bad or
DeadByDaylight-Win64-Shipping.exe+5FEE840 - FF 90 20020000 - call qword ptr [rax+00000220] -> Process Event Vtable Offset.
0x220 / 0x08 = 0x44
七、UWorld
cpp
//Init World
world = *(UWorld**)(game_base + 0x00000000); //未知的World偏移
1.首先需要下载游戏对应版本的UE4源代码,怎么下载在前文中有稍微提及,具体可以查看EPIC官网。
2.使用IDA+源码的方式找到UWorld。
3.由于篇幅限制,此处不再过多解释。