sorry i forgot to post the second part, so, full code :Quote:
@forsatus
Why he should take care about this? Since he set the char* i don't see any profits from know the char size
@blackout617
Please post fully code on pastebin, with the DLLMain and the CreateThread if you can.
EDIT:
@forsatus
It's not about this, there isn't only one function that you have to call if you want send packet.
Code:
DWORD sendpacketfunc = 0x052BC0C
void Send(CHAR* packet)
{
DWORD _i32_SendPacketFunc = 0x0052BBC0;
__asm
{
MOV EAX, DWORD PTR DS : [0x0068120C]
MOV EAX, DWORD PTR DS : [EAX]
MOV EDX, packet
CALL sendpacketfunc
}
}
class NostaleString
{
private:
CHAR* _i8_string;
DWORD _i32_length;
public:
NostaleString(CHAR* _i8_string)
{
this->_i32_length = strlen(_i8_string);
this->_i8_string = (CHAR*)malloc(this->_i32_length + 8 + 1);
*(DWORD*)(this->_i8_string + 0x00) = 1;
*(DWORD*)(this->_i8_string + 0x04) = this->_i32_length;
memcpy(this->_i8_string + 0x08, _i8_string, this->_i32_length);
*(this->_i8_string + this->_i32_length + 8) = '\0';
}
CHAR* get()
{
return this->_i8_string + 0x08;
}
DWORD length()
{
return this->_i32_length;
}
};
char packettosend[50] = "say hello";
NostaleString str = packettosend;
Send(str.get());