Пример #1
0
        public static ulong GetIndirectFunctionAddress(ulong address, ulong entryAddress)
        {
            TranslatedFunction function = _context.Translator.GetOrTranslate(address, GetContext().ExecutionMode);
            ulong ptr = (ulong)function.GetPointer().ToInt64();

            if (function.HighCq)
            {
                // Rewrite the host function address in the table to point to the highCq function.
                Marshal.WriteInt64((IntPtr)entryAddress, 8, (long)ptr);
            }
            return(ptr);
        }
Пример #2
0
        public static ulong GetFunctionAddress(ulong address)
        {
            TranslatedFunction function = _context.Translator.GetOrTranslate(address, GetContext().ExecutionMode);

            return((ulong)function.GetPointer().ToInt64());
        }