/* FUNCTIONS *****************************************************************/
+PVOID
+NTAPI
+RtlpLookupModuleBase(
+ PVOID Address)
+{
+ PLDR_DATA_TABLE_ENTRY LdrEntry;
+ BOOLEAN InSystem;
+ PVOID p;
+
+ /* Get the base for this file */
+ if ((ULONG_PTR)Address > (ULONG_PTR)MmHighestUserAddress)
+ {
+ /* We are in kernel */
+ p = KiPcToFileHeader(Address, &LdrEntry, FALSE, &InSystem);
+ }
+ else
+ {
+ /* We are in user land */
+ p = KiRosPcToUserFileHeader(Address, &LdrEntry);
+ }
+
+ return p;
+}
+
VOID
NTAPI
RtlInitializeRangeListPackage(VOID)
return FALSE;
}
-#ifndef _ARM_
+#if !defined(_ARM_) && !defined(_AMD64_)
BOOLEAN
NTAPI
#endif
+#ifdef _AMD64_
+VOID
+NTAPI
+RtlpGetStackLimits(
+ OUT PULONG_PTR LowLimit,
+ OUT PULONG_PTR HighLimit)
+{
+ PKTHREAD CurrentThread = KeGetCurrentThread();
+ *HighLimit = (ULONG_PTR)CurrentThread->InitialStack;
+ *LowLimit = (ULONG_PTR)CurrentThread->StackLimit;
+}
+#endif
+
/* RTL Atom Tables ************************************************************/
NTSTATUS