Apply relocations

This commit is contained in:
momo5502
2024-08-30 18:16:21 +02:00
parent ce7fc8b07d
commit f56090898a
3 changed files with 161 additions and 62 deletions

View File

@@ -95,6 +95,8 @@ namespace
context.teb.access([&](TEB& teb)
{
teb.ClientId.UniqueProcess = reinterpret_cast<HANDLE>(1);
teb.ClientId.UniqueThread = reinterpret_cast<HANDLE>(2);
teb.NtTib.StackLimit = reinterpret_cast<void*>(STACK_ADDRESS);
teb.NtTib.StackBase = reinterpret_cast<void*>((STACK_ADDRESS + STACK_SIZE));
teb.NtTib.Self = &context.teb.ptr()->NtTib;