Code:
Procedure SendPacketDLL(Packet: Array of Byte; Size: Integer);
asm
PUSH SIZE
PUSH PACKET
CALL ADDR_SENDPACKET
ADD ESP, 08H
end;
Original Packet:
Code:
18 00 2D 32 7E 01 0F 03 02 B3 01 02 15 08 00 00 EA 02 00 00 F9 0B 00 00
Decrypted by Analiser2
Code:
18 00 2D 32 8D 01 0F 03 12 B2 01 02 31 08 00 00 0E 00 00 00 6D 0C 00 00
18 00 //Size
8D 01 //Player ID,the send packet fills this automatically;
0F 03 //Opcode
31 08 //Npc ID
Code:
procedure TForm2.btnClick(Sender: TObject);
begin
SetLength(Buffer, $18);//Put the Size
PWORD(Integer(Buffer) + 00)^ := $18;//SIZE
PWORD(Integer(Buffer) + 06)^ := $30F; //OPCODE
PWORD(Integer(Buffer) + 12)^ := $831;//Npc ID
PWORD(Integer(Buffer) + 16)^ := $0E; //This byte is for evolution the pran, I don't know what to call it.
SendPacketDll(Buffer, $18);//Put the size
end;