[Kernel] add object type stub functions, export object types

This commit is contained in:
disjtqz
2023-10-14 15:48:32 -04:00
committed by Radosław Gliński
parent 6a08208dc8
commit 9b3601c6fa
6 changed files with 277 additions and 28 deletions

View File

@@ -218,6 +218,23 @@ XboxkrnlModule::XboxkrnlModule(Emulator* emulator, KernelState* kernel_state)
export_resolver_->SetVariableMapping("xboxkrnl.exe",
ordinals::KeTimeStampBundle,
kernel_state->GetKeTimestampBundle());
#define EXPORT_KVAR(typ) \
export_resolver_->SetVariableMapping("xboxkrnl.exe", ordinals::typ, \
kernel_state->GetKernelGuestGlobals() + \
offsetof(KernelGuestGlobals, typ))
EXPORT_KVAR(ExThreadObjectType);
EXPORT_KVAR(ExEventObjectType);
EXPORT_KVAR(ExMutantObjectType);
EXPORT_KVAR(ExSemaphoreObjectType);
EXPORT_KVAR(ExTimerObjectType);
EXPORT_KVAR(IoCompletionObjectType);
EXPORT_KVAR(IoDeviceObjectType);
EXPORT_KVAR(IoFileObjectType);
EXPORT_KVAR(ObDirectoryObjectType);
EXPORT_KVAR(ObSymbolicLinkObjectType);
EXPORT_KVAR(UsbdBootEnumerationDoneEvent);
#undef EXPORT_KVAR
}
static auto& get_xboxkrnl_exports() {