[ERROR]Calling SendAttackPacket()

06/07/2017 04:39 _asm#16
Well, as I mentioned in a previous post, you'll need the this-ptr (ecx) in order to call this function. The send function is declared as a member function inside a class which means it uses the __thiscall calling convention.
the class-instance-ptr (this-ptr) is usually stored in ecx (some compilers store it in general use registers such as edx,eax and then move it to ecx) and is then called with the function call. In your example, EBP-0x18 contains the classptr which can be found easily by either looking around a few instructions prior or by using cross references to search for uses of this function which obviously then require the classptr ^^.

also, don't forget to append the sequence byte to the data which is usually appended in most common packets after the auth phase.
01/26/2018 21:31 EliteHileKontrol#17
Hi, i'm building a small hack but now, i'm having some problems on calling the SendAttackPacket() function.
This is my code for now:

This is the error that is being showed: [Only registered and activated users can see links. Click Here To Register...]

Send Battle : [Only registered and activated users can see links. Click Here To Register...]
Call Func : [Only registered and activated users can see links. Click Here To Register...]



This'is My Code but Not Work
Code:
bool SendBattleAttack(int vId)
{
	DWORD NetPointer = *(DWORD*)0x1268868;
	DWORD BattleCall = 0x055A4D0;
	__asm {
		mov ecx, [NetPointer]
		push vId
		push 0
		call BattleCall
	}
	return 0;

}

DWORD WINAPI MainFunction(LPVOID lpParam) {
	MessageBoxA(NULL, "TarGetDamage", "Info", MB_ICONINFORMATION);
	while (true)
	{
		DWORD GetTargetVID = (*(DWORD*)(*(DWORD*)0x1268868 + 0x0134DC));

		if (GetTargetVID>0)
		{

		SendBattleAttack(GetTargetVID);

		}
		Sleep(1000);
	}

}
Hope somone can help.