Page 1 of 2 12 LastLast
Results 1 to 15 of 26
  1. #1
    Broseff's Avatar
    Join Date
    Feb 2012
    Gender
    male
    Posts
    21
    Reputation
    10
    Thanks
    1

    Yep another freakin kid needs help.

    Yes I need help again.

    I've already bugged 2 certain coders with my endless need for assistance, which they have kindly provided, now I would rather not pester them further with the cries for help. So instead I ask the forum as a whole,

    I am already done with the menu, everything is fine, the hacks are working, the only problem is I need a detour function.

    Code:
    void *DetourCreate(BYTE *src, const BYTE *dst, const int len)
    {
    	BYTE *jmp = (BYTE*)malloc(len+5);
    	DWORD dwBack;
    
    	VirtualProtect(src, len, PAGE_EXECUTE_READWRITE, &dwBack);
    	memcpy(jmp, src, len);	
    	jmp += len;
    	jmp[0] = 0xE9;
    	*(DWORD*)(jmp+1) = (DWORD)(src+len - jmp) - 5;
    	src[0] = 0xE9;
    	*(DWORD*)(src+1) = (DWORD)(dst - src) - 5;
    	for (int i=5; i<len; i++)  src[i]=0x90;
    	VirtualProtect(src, len, dwBack, &dwBack);
    	return (jmp-len);
    }
    -Credits to Azorbix

    Great... now I have the function, but I don't know what the hell to do with it. I'm completely stumped.

    I tried a tutorial: http://www.progamercity.net/code-tut...functions.html
    But that tutorial is so confusing, it made me frustrated trying to figure it out lol.

    So I ask, please, can someone lend a helping hand?

  2. #2
    Ch40zz-C0d3r's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    839
    Reputation
    44
    Thanks
    400
    My Mood
    Twisted
    Hey sky, whats up.......
    As I said, its not the detours if you want to see it this way:
    If you do a simple midfunction hook on present / endscene and reset, all is done...
    Hook after the first 5 bytes, HS doesnt scan further

    Progress with my game - "Disbanded"
    • Fixed FPS lag on spawning entities due to the ent_preload buffer!
    • Edit the AI code to get some better pathfinding
    • Fixed the view bug within the sniper scope view. The mirror entity is invisible now!
    • Added a new silencer for ALL weapons. Also fixed the rotation bugs
    • Added a ton of new weapons and the choice to choose a silencer for every weapon
    • Created a simple AntiCheat, noobs will cry like hell xD
    • The name will be Disbanded, the alpha starts on the 18th august 2014



    Some new physics fun (Serversided, works on every client)



    My new AI
    http://www.youtube.com/watch?v=EMSB1GbBVl8

    And for sure my 8 months old gameplay with 2 friends
    http://www.youtube.com/watch?v=Na2kUdu4d_k

  3. #3
    Broseff's Avatar
    Join Date
    Feb 2012
    Gender
    male
    Posts
    21
    Reputation
    10
    Thanks
    1
    Quote Originally Posted by Ch40zz-C0d3r View Post
    Hey sky, whats up.......
    As I said, its not the detours if you want to see it this way:
    If you do a simple midfunction hook on present / endscene and reset, all is done...
    Hook after the first 5 bytes, HS doesnt scan further
    OK, how do I do that?!

    I'm new and very inexperienced. Which is why I need so much assistance.

  4. #4
    Shadow`'s Avatar
    Join Date
    Nov 2011
    Gender
    male
    Location
    MN
    Posts
    643
    Reputation
    74
    Thanks
    2,999
    My Mood
    Relaxed
    Wait... am I understanding that you have a detour but don't know what to do with it? If so, just use it in your hook. Here's an example:



    Once you have something similar to that, just do this in your DllMain:


  5. #5
    Broseff's Avatar
    Join Date
    Feb 2012
    Gender
    male
    Posts
    21
    Reputation
    10
    Thanks
    1
    Quote Originally Posted by Shadow` View Post
    Wait... am I understanding that you have a detour but don't know what to do with it? If so, just use it in your hook. Here's an example:



    Once you have something similar to that, just do this in your DllMain:

    OK well this is what I have as far as my hook goes:

    and then I tried to follow what you were saying as best I could... so here's what I tried doing following your screenshots :\.



    But it still crashes...
    Attached Thumbnails Attached Thumbnails
    Screenshot - 7_28_2012 , 4_20_07 PM.png  

    Screenshot - 7_28_2012 , 4_21_06 PM.png  

    Last edited by Broseff; 07-28-2012 at 07:28 PM.

  6. #6
    Shadow`'s Avatar
    Join Date
    Nov 2011
    Gender
    male
    Location
    MN
    Posts
    643
    Reputation
    74
    Thanks
    2,999
    My Mood
    Relaxed
    Quote Originally Posted by Broseff View Post
    OK well this is what I have as far as my hook goes:

    and then I tried to follow what you were saying as best I could... so here's what I tried doing following your screenshots :\.



    But it still crashes...
    Change your hook to the hook I have, yours is detected if I'm right.

    I personally would do it like this:



    right under the previous picture:

    Last edited by Shadow`; 07-28-2012 at 07:40 PM.

  7. #7
    Broseff's Avatar
    Join Date
    Feb 2012
    Gender
    male
    Posts
    21
    Reputation
    10
    Thanks
    1
    Quote Originally Posted by Shadow` View Post
    Change your hook to the hook I have, yours is detected if I'm right.

    I personally would do it like this:



    right under the previous picture:



    So does that mean I have to define it? And if so, can I have the definition(s)?

  8. #8
    Shadow`'s Avatar
    Join Date
    Nov 2011
    Gender
    male
    Location
    MN
    Posts
    643
    Reputation
    74
    Thanks
    2,999
    My Mood
    Relaxed
    Quote Originally Posted by Broseff View Post
    OK well this is what I have as far as my hook goes:

    and then I tried to follow what you were saying as best I could... so here's what I tried doing following your screenshots :\.



    But it still crashes...
    Change your hook to the hook I have, yours is detected if I'm right.

    Createdevice:



    I thought you said you had your menu working... you need a present and reset unless you want it to fail.

  9. #9
    Broseff's Avatar
    Join Date
    Feb 2012
    Gender
    male
    Posts
    21
    Reputation
    10
    Thanks
    1
    Quote Originally Posted by Shadow` View Post
    Change your hook to the hook I have, yours is detected if I'm right.

    Createdevice:



    I thought you said you had your menu working... you need a present and reset unless you want it to fail.
    I do have my menu working. Problem is when I go in game I crash.

    Now my menu isn't working because I can't build. When I try to build I get the following error:

  10. #10
    Reflex-'s Avatar
    Join Date
    Mar 2011
    Gender
    male
    Location
    192.168.1.01
    Posts
    6,633
    Reputation
    584
    Thanks
    2,261
    My Mood
    Dead
    Quote Originally Posted by Broseff View Post
    I do have my menu working. Problem is when I go in game I crash.

    Now my menu isn't working because I can't build. When I try to build I get the following error:
    Read them carefully and look over your base, now find what you're missing.

  11. #11
    Broseff's Avatar
    Join Date
    Feb 2012
    Gender
    male
    Posts
    21
    Reputation
    10
    Thanks
    1
    Quote Originally Posted by Entourage View Post


    Read them carefully and look over your base, now find what you're missing.
    I'm missing hkPresent, hkReset, and CreateDevice. However, I don't know which file to define them in.

    I assume this is what I need to put in: but which file? and where?

    top? bottom? After a certain line of code?

  12. #12
    Reflex-'s Avatar
    Join Date
    Mar 2011
    Gender
    male
    Location
    192.168.1.01
    Posts
    6,633
    Reputation
    584
    Thanks
    2,261
    My Mood
    Dead
    Change the Text of CreateDev into CreateDevice, now you have Two Errors. Erase hk from Present/Reset. now you have no errors job.

  13. #13
    Broseff's Avatar
    Join Date
    Feb 2012
    Gender
    male
    Posts
    21
    Reputation
    10
    Thanks
    1
    Quote Originally Posted by Entourage View Post
    Change the Text of CreateDev into CreateDevice, now you have Two Errors. Erase hk from Present/Reset. now you have no errors job.
    OK I really appreciate the help but what text? The hook? It was never CreateDev, it's always been CreateDevice. So error; not fixed.

    I tried erasing the hk, on both of those, still get the same errors.

  14. #14
    Reflex-'s Avatar
    Join Date
    Mar 2011
    Gender
    male
    Location
    192.168.1.01
    Posts
    6,633
    Reputation
    584
    Thanks
    2,261
    My Mood
    Dead
    Quote Originally Posted by Broseff View Post
    OK I really appreciate the help but what text? The hook? It was never CreateDev, it's always been CreateDevice. So error; not fixed.

    I tried erasing the hk, on both of those, still get the same errors.
    PM me your TV info.

  15. #15
    Broseff's Avatar
    Join Date
    Feb 2012
    Gender
    male
    Posts
    21
    Reputation
    10
    Thanks
    1
    Quote Originally Posted by Entourage View Post


    PM me your TV info.
    Done.. I think.

    If not:


    227 516 811
    4713

    ---------- Post added at 08:48 PM ---------- Previous post was at 08:08 PM ----------

    LOL @ussr editting some shit in my project then leaving once it failed.

    Fixed it bro. But nice try.

Page 1 of 2 12 LastLast

Similar Threads

  1. i just a new kid ! need dbased help :)
    By rbchacking in forum Mission Against Terror Help
    Replies: 2
    Last Post: 02-18-2012, 03:52 AM
  2. [Help Request] need help with modding
    By BayBee Alyn in forum Combat Arms Help
    Replies: 0
    Last Post: 04-27-2011, 10:06 PM
  3. Kid Needs Help
    By Swiftdude in forum CrossFire Discussions
    Replies: 14
    Last Post: 09-06-2010, 01:25 AM
  4. System freakin error, need help.
    By Thisisuber in forum Combat Arms Help
    Replies: 1
    Last Post: 05-30-2010, 12:26 AM
  5. NEED HELP WITH SOMETHING ANOTHERS PLS READ! URGENT!
    By xweetok59 in forum C++/C Programming
    Replies: 0
    Last Post: 06-28-2009, 10:22 AM