Instance, class decriptors, property descriptors + cleanup
This commit is contained in:
+16
-4
@@ -1,16 +1,28 @@
|
||||
#include "xrbx/engine/instance.h"
|
||||
#include "xrbx/xrbx.h"
|
||||
#include "xrbx/engine/scheduler.h"
|
||||
#include <cstdio>
|
||||
#include <format>
|
||||
#include <iostream>
|
||||
|
||||
void depth_first_print(RBX::Instance inst, int depth = 0) {
|
||||
printf("%*s-> %s @ %llx (class %s @ %llx)\n", depth, "", inst.getName().c_str(), uintptr_t(inst.VA()), inst.getClassName().c_str(), uintptr_t(inst.getClassDescriptor().VA()));
|
||||
for (const auto &prop : inst.getClassDescriptor().getPropertyDescriptors()) {
|
||||
printf("%*s-> %s @ %llx\n", depth + 3, "", prop.getName().c_str(), uintptr_t(prop.VA()));
|
||||
}
|
||||
for (const auto &child : inst.getChildren()) {
|
||||
depth_first_print(child, depth + 1);
|
||||
}
|
||||
}
|
||||
|
||||
int main() {
|
||||
Process rbx(L"RobloxPlayerBeta.exe");
|
||||
std::cout << std::format("Image Base: {:X}", uintptr_t(rbx.imageBase())) << std::endl;
|
||||
RBX::Scheduler sched(rbx.Read<BYTE *>(rbx.VA(RVA_TASK_SCHEDULER)), rbx);
|
||||
RBX::Scheduler sched(rbx.read<BYTE *>(rbx.VA(RVA_TASK_SCHEDULER)), rbx);
|
||||
try {
|
||||
for (const auto &job : sched.getJobs()) {
|
||||
std::cout << std::format("Job {} @ {:x}", job.getName(), uintptr_t(job.VA())) << std::endl;
|
||||
}
|
||||
RBX::Scheduler::Job heartbeat = sched.getJob("Heartbeat(Heartbeat;LuaApp)");
|
||||
RBX::Instance runservice = heartbeat.getRunService();
|
||||
depth_first_print(runservice.getParent().value());
|
||||
} catch (std::exception &e) {
|
||||
std::cout << "err: " << e.what() << std::endl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user