Exemple #1
0
 public bool InvokeAfterCall(UnmanagedContext ctx, UnmanagedStack stck)
 {
     if (afterCall != null)
     {
         return(afterCall(ctx, stck));
     }
     return(true);
 }
Exemple #2
0
        private static bool ActualLateHook(uint pAddress)
        {
            LocalHook        curhook;
            UnmanagedBuffer  buff;
            UnmanagedContext ctx;
            UnmanagedStack   stck;
            uint             esp;

            if (m_Hooks.ContainsKey(pAddress))
            {
                curhook = m_Hooks[pAddress];
                esp     = curhook.m_EspBackup.ReadAt <uint>(0);
                buff    = new UnmanagedBuffer((IntPtr)esp);
                ctx     = buff.ReadAt <UnmanagedContext>(0);
                stck    = new UnmanagedStack(esp + 40);
                buff.WriteAt <uint>(curhook.m_ReturnAddresses.Pop(), 36);
                return(curhook.InvokeAfterCall(ctx, stck));
            }
            return(true);
        }