HelpYep another freakin kid needs help.

Posts 1–15 of 26 · Page 1 of 2
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?
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
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.
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:

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...
Screenshot - 7_28_2012 , 4_20_07 PM.png13 KB · 5 downloads Screenshot - 7_28_2012 , 4_21_06 PM.png6 KB · 4 downloads
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:

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)?
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.
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:
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.
Quote Originally Posted by Reflex- 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?
Change the Text of CreateDev into CreateDevice, now you have Two Errors. Erase hk from Present/Reset. now you have no errors job.
Quote Originally Posted by Reflex- 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.
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.
Quote Originally Posted by Reflex- 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.
Posts 1–15 of 26 · Page 1 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us