@The One:
Would not jump to an address...
Within __ASM you shouldn't know the addresses
You should really push address onto stack and ret or
move the address into register (e.g. EAX) but that way is more detectable since your leaving modified register
You should really use some Code-Injection for your hacks instead of writting to memory with:
Microsoft MSDetours ? If so it leaves behind 0xE8 bytes which are detectable by Anti-Cheating software.
You have direct access to memory you don't have to call this internal function.
Tip/advise: You could made a function which backup previous bytes before modifying them.. which makes it easier to toogle options.
Finally your DLL code is very messy:
e.g.
Why not just write it like:
Your not dealing with attach/deattach thread messages in your DLL
why not disable them? save you more memory
There is alot of other things i could suggest but i hope these have being helpful :)
Code
DWORD PCross = NULL;
_declspec(naked) void PremCross()
{
__asm
{
jmp PCross;
}
}Would not jump to an address...
Within __ASM you shouldn't know the addresses
You should really push address onto stack and ret or
move the address into register (e.g. EAX) but that way is more detectable since your leaving modified register
You should really use some Code-Injection for your hacks instead of writting to memory with:
Code
*(float*)(ADR_SPEED) = 200;Microsoft MSDetours ? If so it leaves behind 0xE8 bytes which are detectable by Anti-Cheating software.
Code
DetourFuncCode
memcpy((LPBYTE*)ADR_PREMIUMCROSSHAIR1, (BYTE*)"\x0F\x84\x86\x01\x00\x00",6); // Function will be turned offYou have direct access to memory you don't have to call this internal function.
Tip/advise: You could made a function which backup previous bytes before modifying them.. which makes it easier to toogle options.
Finally your DLL code is very messy:
e.g.
Code
void HackThread() // HackThread makes the hack inject
{
for(;; )
{
SpeedHack(); // This puts the hack on.
}
Sleep(200); // Protect from overload
}Why not just write it like:
Code
void HackThread() // HackThread makes the hack inject
{
for(;;Sleep(200))
{
// Your hack here instead of calling a function
}Your not dealing with attach/deattach thread messages in your DLL
why not disable them? save you more memory
There is alot of other things i could suggest but i hope these have being helpful :)

