IActorSystem:
IActor* GetActor(uint32_t entityId)
{
uint64 v2, v3, v4;
v2 = Memory::read<uint64>((DWORD64)this + 0x30);
v3 = v2;
v4 = Memory::read<uint64>(v2 + 0x8);
while (!Memory::read<BYTE>(v4 + 0x19))
{
if (Memory::read<uint32>(v4 + 0x20) >= entityId)
{
v3 = v4;
v4 = Memory::read<uint64_t>(v4);
}
else
{
v4 = Memory::read<uint64_t>(v4 + 0x10);
}
}
if (v3 == v2 || entityId < Memory::read<uint32_t>(v3 + 0x20))
v3 = v2;
if (v3 != v2)
return Memory::read<IActor*>(v3 + 0x28);
return nullptr;
}
void GetListActorX64(std::vector<ActorMap>& Vector)
{
uintptr_t v1 = 0;
uintptr_t v3 = 0; // eax@1
uintptr_t v4 = 0; // edx@4
uintptr_t j = 0; // edx@5
uintptr_t i = 0; // edx@8
ActorMap Map;
v1 = Memory::read<uintptr_t>((DWORD64)this + 0x30);
v3 = Memory::read<uintptr_t>(v1);
while (v3 != v1)
{
Map.Id = Memory::read<uintptr_t>(v3 + 0x20);
Map.Actor = Memory::read<IActor*>(v3 + 0x28);
Vector.push_back(Map);
v4 = Memory::read<uintptr_t>(v3 + 0x10);
if (Memory::read<uint8_t>(v4 + 0x19))
{
for (i = Memory::read<uintptr_t>(v3 + 8); !Memory::read<uint8_t>(i + 0x19); i = Memory::read<uintptr_t>(i + 8))
{
if (v3 != Memory::read<uintptr_t>(i + 0x10))
break;
v3 = i;
}
v3 = i;
}
else
{
v3 = Memory::read<uintptr_t>(v3 + 0x10);
for (j = Memory::read<uintptr_t>(v4); !Memory::read<uint8_t>(j + 0x19); j = Memory::read<uintptr_t>(j))
v3 = j;
}
}
}