Page 3 of 3 FirstFirst 123
Results 31 to 32 of 32

Thread: Cross-platform x86 detours

  1. #31
    Join Date
    Nov 2011
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: Cross-platform x86 detours

    thanks


  2. #32
    Join Date
    May 2008
    Posts
    11
    Thanks
    2
    Thanked 2 Times in 1 Post
    Rep Power
    0

    Re: Cross-platform x86 detours

    Hello,
    I have a problem using your detour class :s

    Let me explain, I am working on a 64bit Windows 7, I am just trying to hook a function

    0x425560 is the adress of the function i want to detour.

    so I debug :
    Code:
    00000000`00425560 e9573d770c      jmp     00000000`0cb992bc // here is the jum to the trampoline
    Code:
    00000000`0cb992bc fd              std
    00000000`0cb992bd fd              std
    00000000`0cb992be fd              std
    00000000`0cb992bf fd              std
    00000000`0cb992c0 e9407e0aef      jmp     ffffffff`fbc41105 // <-  here is the problem (accses viloation of course)
    00000000`0cb992c5 fe07            inc     byte ptr [rdi]
    00000000`0cb992c7 0000            add     byte ptr [rax],al
    00000000`0cb992c9 fd              std
    look like the trampoline jmp to ffffffff`fbc41105 but it should jmp to my function at 000007fe`fbc41105 (inside my dll 000007fe`fbc40000 000007fe`fbc60000 )

    the jos is done like this :
    Code:
    *reinterpret_cast<address_pointer_type>(trampoline_ + 1) = reinterpret_cast<address_type>(pDetour_) - reinterpret_cast<address_type>(trampoline_) - MOLOGIE_DETOURS_DETOUR_SIZE;
    so I think it's because E9 is a relative jump of max 4Byte, is there a way to jump to a 6byte adresse like i need to ?

    EDIT :
    Code:
    	                trampoline_ = new boost::uint8_t[MOLOGIE_DETOURS_DETOUR_SIZE];
    			trampoline_[0] = 0x48;
    			trampoline_[1] = 0xb8;
    			*reinterpret_cast<PDWORD_PTR>(trampoline_ + 2) = reinterpret_cast<DWORD_PTR>(pDetour_);
    			trampoline_[10] = 0xff;
    			trampoline_[11] = 0xe0;

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [WoW]: Cross faction talk
    By bobbysing in forum Version Independent
    Replies: 3
    Last Post: 04-08-2008, 06:29 AM
  2. Cross ESP
    By illuzionz in forum Gold Source/HL1 Engine
    Replies: 2
    Last Post: 04-13-2004, 11:31 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •