Quote:
Originally Posted by Sᴡoosh
No, it's due to the fact that byte length isn't a byte, it'S a CUInt (packed int). After 127, it is two bytes long with a special encoding.
|
Hey, thanks for your answer. However, I'm still lost as to how to pass two bytes as packet length. Here, in the opcode:
PHP Code:
0x60, //PUSHAD
0xB8, 0x00, 0x00, 0x00, 0x00, //MOV EAX, SendPacketAddress
0x8B, 0x0D, 0x00, 0x00, 0x00, 0x00, //MOV ECX, DWORD PTR [realBaseAddress]
0x8B, 0x49, 0x20, //MOV ECX, DWORD PTR [ECX+20]
0xBF, 0x00, 0x00, 0x00, 0x00, //MOV EDI, packetAddress
0x6A, 0x00, <-- //PUSH packetSize
0x57, //PUSH EDI
0xFF, 0xD0, //CALL EAX
0x61, //POPAD
0xC3 //RET
There's only place for one byte to write. I tried adding an additional byte and encoding the length in 128 base, but that produces the same result - crashes the client. Sorry if this is really easy and I'm missing something obvious, but I've tried to do this for a good few hours and I can't seem to figure it out myself. :(