Send packet C++

02/24/2017 20:42 derleyvolt#1
I want to know what the problem with my function...

void Packet()
{
DWORD chamar = 0x7B8970;
byte rato1[2];
rato1[0] = 0x2E;
rato1[1] = 0x00;
byte*point ;
point = rato1;
__asm
{
PUSHAD
MOV ECX, 0xDA433C
MOV ECX, DWORD PTR DS:[ECX]
MOV ECX, DWORD PTR DS:[ECX + 0x20]
PUSH 2
PUSH point
CALL chamar
POPAD
}
}

This function run perfectly , but when i try to send it sequence ...

void Packet()
{
DWORD chamar = 0x7B8970;
byte rato1[7];
rato1[0] = 0x0E;
rato1[1] = 0x00;
rato1[2] = 0x00;
rato1[3] = 0x01;
rato1[4] = 0x00;
rato1[5] = 0x00;
rato1[6] = 0x00;
byte*point ;
point = rato1;
__asm
{
PUSHAD
MOV ECX, 0xDA433C
MOV ECX, DWORD PTR DS:[ECX]
MOV ECX, DWORD PTR DS:[ECX + 0x20]
PUSH 7
PUSH point
CALL chamar
POPAD
}
}

it run but my game crash ... if my sequence is bigger than 4 bytes , the crash happen... why ? thx
03/10/2017 22:08 gnitargetnisid#2
works fine for me with unsigned char, what's byte for you?