UltraDebug

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: A C D R G Y M Z X S P
公益项目,接受捐赠
查看: 1740|回复: 0
收起左侧

[游戏安全] UE4逆向笔记之GObjectArray

[复制链接]
Gemstone

主题

0

回帖

UD

新手上路

UID
39
积分
23
注册时间
2022-5-15
最后登录
1970-1-1
2023-1-11 19:10:27 | 显示全部楼层 |阅读模式

GObjectArray逆向:

首先查看源代码:
UE4逆向笔记之GObjectArray - Gemstone_UltraDebug

此处上面存在字符串特征:

Cannot Cancel Async Loading while async loading is suspended.

直接搜索该字符串就可以定位到GUObjectArray.GetObjectArrayNum():
UE4逆向笔记之GObjectArray - Gemstone_UltraDebug

然后查看GetObjectArrayNum的源代码:

FORCEINLINE int32 GetObjectArrayNum() const 
{ 
             return ObjObjects.Num();
}

跟进ObjObjects发现定义如下:

TUObjectArray ObjObjects;

继续跟进:

typedef FChunkedFixedUObjectArray TUObjectArray;

得到如下类:

class FChunkedFixedUObjectArray
{
    enum
    {
        NumElementsPerChunk = 64 * 1024,
    };

    /** Master table to chunks of pointers **/
    FUObjectItem** Objects;
    /** If requested, a contiguous memory where all objects are allocated **/
    FUObjectItem* PreAllocatedObjects;
    /** Maximum number of elements **/
    int32 MaxElements;
    /** Number of elements we currently have **/
    int32 NumElements;
    /** Maximum number of chunks **/
    int32 MaxChunks;
    /** Number of chunks we currently have **/
    int32 NumChunks;

找到方法的定义如下:

FORCEINLINE int32 Num() const
{
                    return NumElements;
}

发现返回的就是NumElements这个,所以7FF78E0D11A4该地址其实就是ObjObjects.NumElements,而上面存在5个元素,5*4=0x14,所以该地址-0x14就可以得到GObjectArray:
UE4逆向笔记之GObjectArray - Gemstone_UltraDebug

此时的第一个元素为:

class FUObjectItem
{
// Pointer to the allocated object
class UObjectBase* Object;
// Internal flags
int32 Flags;
// UObject Owner Cluster Index
int32 ClusterRootIndex;
// Weak Object Pointer Serial number associated with the object
int32 SerialNumber;
}

UE4逆向笔记之GObjectArray - Gemstone_UltraDebug

继续查看第一个元素就是UObject:

class UObject
{
还有更多的精彩内容,作者设置为付费后可见
UltraDebug免责声明
✅以上内容均来自网友转发或原创,如存在侵权请发送到站方邮件9003554@qq.com处理。
✅The above content is forwarded or original by netizens. If there is infringement, please send the email to the destination 9003554@qq.com handle.
回复 打印

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|Archiver|站点地图|UltraDebug ( 滇ICP备2022002049号-2 滇公网安备 53032102000034号)

GMT+8, 2025-6-21 01:05 , Processed in 0.029625 second(s), 9 queries , Redis On.

Powered by Discuz X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表