Thread: Retour Function

Results 1 to 14 of 14
  1. #1
    supercarz1991's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    6,285
    Reputation
    435
    Thanks
    3,715
    My Mood
    Doh

    Retour Function

    I've been working on learning about Detours and such lately cuz i wanna learn more about hacking and D3D and i came across something called "retour functions"

    i didn't read it all yet, but i'll post what i learned from it. This may be useless for now on CA, but maybe in the future it will be useful


    Main.h
    Code:
    bool RetourFunc(BYTE *src, BYTE *restore, const int len);

    Main.cpp
    Code:
    bool RetourFunc(BYTE *src, BYTE *restore, const int len)
    {
    	DWORD dwback;
    		
    	if(!VirtualProtect(src, len, PAGE_READWRITE, &dwback))	{ return false; }
    	if(!memcpy(src, restore, len))							{ return false; }
    
    	restore[0] = 0xE9;
    	*(DWORD*)(restore+1) = (DWORD)(src - restore) - 5;
    
    	if(!VirtualProtect(src, len, dwback, &dwback))			{ return false; }
    	
    	return true;
    }

    commando: You're probably the best non-coder coder I know LOL


  2. The Following 2 Users Say Thank You to supercarz1991 For This Useful Post:

    FR1GHT (05-31-2012),pDevice (05-31-2012)

  3. #2
    AKICHEATS's Avatar
    Join Date
    Jan 2012
    Gender
    male
    Posts
    65
    Reputation
    10
    Thanks
    56
    My Mood
    Aggressive
    God job xD

  4. #3
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Hey dumbfuck, that's just a jmp hook with a different name.

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  5. The Following 8 Users Say Thank You to Jason For This Useful Post:

    ac1d_buRn (06-01-2012),flameswor10 (05-31-2012),[MPGH]Flengo (05-31-2012),[MPGH]master131 (06-01-2012),Saltine (05-31-2012),TokolocoSK (05-31-2012),topblast (06-01-2012),Xipher (05-31-2012)

  6. #4
    Xipher's Avatar
    Join Date
    Jul 2011
    Gender
    male
    Location
    Melbourne, AU.
    Posts
    1,780
    Reputation
    472
    Thanks
    1,690
    My Mood
    Innocent
    Quote Originally Posted by Jason View Post
    Hey dumbfuck, that's just a jmp hook with a different name.
    I love your in your face attitude.

  7. #5
    speedforyou's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    735
    Reputation
    -59
    Thanks
    108
    My Mood
    Happy
    Quote Originally Posted by Jason View Post
    Hey dumbfuck, that's just a jmp hook with a different name.
    why are you so pissed all the time. he said he was learning at least he isn't begging. so bro for real chill out.

    steel o-o's sig =
    = Done , = Not Done

    Leecher 0 =
    Newbie 25 =
    Member 50 =
    Advanced Member 100 =
    H4X0R Member 150 =
    Dual-Keyboard Member 250 =
    Expert Member 500 =
    's Trainer 750 =
    MPGH Expert 1000 =
    Synthetic Hacker 1250 =
    Blackhat Hacker 1500 =
    Whitehat Hacker 2000 =
    's Guardian 2500 =
    Upcoming MPGHiean 3000 =
    MPGH Addict 3500 =
    MPGHiean 4000 =
    MPGH Knight 4500 =
    MPGH Lord 5000 =
    MPGH Champion 5500 =
    MPGH King 6000 =
    MPGH Legend 6500 =
    MPGH God 7000 =
    MPGH God II 7500 =
    MPGH God III 8000 =
    MPGH God IV 8500 =
    MPGH God V 9000 =
    Arun's Slave 9500 =
    Dave's Slave 10000 =

  8. #6
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Quote Originally Posted by speedforyou View Post


    why are you so pissed all the time. he said he was learning at least he isn't begging. so bro for real chill out.
    'Cos Ari Gold is my idol. 'Nuff said.

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  9. #7
    pDevice's Avatar
    Join Date
    Feb 2012
    Gender
    male
    Location
    d3d9.h
    Posts
    1,306
    Reputation
    15
    Thanks
    420
    My Mood
    Stressed
    Nice man !



  10. #8
    demtrios's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    MPGH.Net
    Posts
    870
    Reputation
    10
    Thanks
    1,056
    My Mood
    Amused
    Good Job Bro ! ;D


    Cock CS since 26•03•2013

  11. #9
    realnigger's Avatar
    Join Date
    Apr 2012
    Gender
    male
    Posts
    17
    Reputation
    9
    Thanks
    1
    how does this even relate to combat arms?
    and why did did you rename it to retour it doesn't make sense

  12. #10
    supercarz1991's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    6,285
    Reputation
    435
    Thanks
    3,715
    My Mood
    Doh
    Quote Originally Posted by Jason View Post
    Hey dumbfuck, that's just a jmp hook with a different name.
    at least i'm sharing you shit face cock master

    /south park for the win LOL

    commando: You're probably the best non-coder coder I know LOL


  13. #11
    flameswor10's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    12,528
    Reputation
    981
    Thanks
    10,409
    My Mood
    In Love
    If you want the detour to be removed, Just copy the bytes before you add the detour, then Memcpy it back
    No I do not make game hacks anymore, please stop asking.

  14. The Following User Says Thank You to flameswor10 For This Useful Post:

    Departure (06-02-2012)

  15. #12
    supercarz1991's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    6,285
    Reputation
    435
    Thanks
    3,715
    My Mood
    Doh
    ^^^ ohhhh XD

    commando: You're probably the best non-coder coder I know LOL


  16. #13
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Quote Originally Posted by supercarz1991 View Post
    he's talking about your dumbass comment, at least i share. i know a lot of people here who just take n take n take and never give credits, then they find something new, and never share.


    i share and take, so stfu
    I share also. Better still; my sharing isn't a repost of existing code with a new name :3

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  17. #14
    Xipher's Avatar
    Join Date
    Jul 2011
    Gender
    male
    Location
    Melbourne, AU.
    Posts
    1,780
    Reputation
    472
    Thanks
    1,690
    My Mood
    Innocent
    Ladies please, calm down.

Similar Threads

  1. How do u define function in VB6
    By ilovepie21 in forum WarRock - International Hacks
    Replies: 5
    Last Post: 03-02-2008, 12:20 PM
  2. How can i kill a function in vb
    By HeXel in forum Visual Basic Programming
    Replies: 5
    Last Post: 02-15-2008, 04:56 PM
  3. hack function idea
    By l0ngcat in forum WarRock - International Hacks
    Replies: 6
    Last Post: 10-02-2007, 06:01 AM
  4. Replies: 8
    Last Post: 07-09-2007, 03:15 PM
  5. Disable some of punkbuster's functions.
    By System79 in forum Game Hacking Tutorials
    Replies: 3
    Last Post: 09-06-2006, 11:32 PM