郁金香逆向 2.便利怪物对象()

#include<Windows.h>
DWORD R4(UINT_PTR 地址)
{
    __try
    {
        return *(DWORD*)地址;//ReadProcessMemory
    }
    __except (1)
    {
        return 0;
    }
}

UINT_PTR 怪物数组地址()
{
    ///[[[fs:[2C]+0]+8]+1C]=2C1DDFF0
    ///[[[2C1DDFF0 + 2 * 0C + 8]+ 964] + 5C]
    DWORD fs2c = 0;
    _asm
    {
        mov eax,dowrd ptr fs:[0x20]
        mov fs2c,eax
    }

    DWORD P = R4(R4(R4(fs2c + 0) + 8) + 0x1c);
    return UINT_PTR(P);
}
UINT_PTR 获取节点对象(int 下标)
{

    UINT_PTR 怪物数组 = 怪物数组地址();
    return R4(怪物数组 + 下标 * 0x0c + 8);

}
————————
#include<Windows.h>
DWORD R4(UINT_PTR 地址)
{
    __try
    {
        return *(DWORD*)地址;//ReadProcessMemory
    }
    __except (1)
    {
        return 0;
    }
}

UINT_PTR 怪物数组地址()
{
    ///[[[fs:[2C]+0]+8]+1C]=2C1DDFF0
    ///[[[2C1DDFF0 + 2 * 0C + 8]+ 964] + 5C]
    DWORD fs2c = 0;
    _asm
    {
        mov eax,dowrd ptr fs:[0x20]
        mov fs2c,eax
    }

    DWORD P = R4(R4(R4(fs2c + 0) + 8) + 0x1c);
    return UINT_PTR(P);
}
UINT_PTR 获取节点对象(int 下标)
{

    UINT_PTR 怪物数组 = 怪物数组地址();
    return R4(怪物数组 + 下标 * 0x0c + 8);

}