C++ hack detection

Posts 1–2 of 2 · Page 1 of 1
C++ hack detection
Hi

Guys i am beginner and super noob on c++ hacking so i am glad if some one clear me about my questions .
Thank you.

with this code we can detect wieter20 hack.

Code:
// checks for hook point of wieter20
	const char* shouldBe = "\x51\xA1\xBC\x1A\x7E";
	if (memcmp(shouldBe, (void*)0x586E00, 5))
	{
		return 6;
	}
pleas someone explain this code for me.

and my Q2:

if i have some offsets like this:

Code:
GetWeaponSpread..........0x004770F0
GetRandomSpread..........0x005D51A0
ChopperBoxes.............0x0059E710
how i can make new detection like first source i posted?
A simple Google can take you there.. According to MSDN, 'memcmp' function will compare the first parameter with the second (in this case it will compare shouldBe's value with 0x586E00's value). The third parameter is the number of characters to compare.

Returns less than 0 if the first parameter is smaller than the second one; returns 0 if they're both identical; returns bigger than 0 if the first parameter is greater than the second one.

In this case, this:
Code:
if (memcmp(shouldBe, (void*)0x586E00, 5))
is the same as:
Code:
if (memcmp(shouldBe, (void*)0x586E00, 5) == 0)
Sorry for the late answer.
Posts 1–2 of 2 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us