9
3

EQPacket.cpp 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623
  1. /*
  2. EQ2Emulator: Everquest II Server Emulator
  3. Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
  4. This file is part of EQ2Emulator.
  5. EQ2Emulator is free software: you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation, either version 3 of the License, or
  8. (at your option) any later version.
  9. EQ2Emulator is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #include "debug.h"
  17. #include <stdio.h>
  18. #include <stdlib.h>
  19. #include <iostream>
  20. #include <iomanip>
  21. #include "EQPacket.h"
  22. #include "misc.h"
  23. #include "op_codes.h"
  24. #include "CRC16.h"
  25. #include "opcodemgr.h"
  26. #include "packet_dump.h"
  27. #include <map>
  28. #include "Log.h"
  29. #include <time.h>
  30. using namespace std;
  31. extern map<int16,OpcodeManager*>EQOpcodeManager;
  32. uint8 EQApplicationPacket::default_opcode_size=2;
  33. EQPacket::EQPacket(const uint16 op, const unsigned char *buf, uint32 len)
  34. {
  35. this->opcode=op;
  36. this->pBuffer=NULL;
  37. this->size=0;
  38. version = 0;
  39. setTimeInfo(0,0);
  40. if (len>0) {
  41. this->size=len;
  42. pBuffer= new unsigned char[this->size];
  43. if (buf) {
  44. memcpy(this->pBuffer,buf,this->size);
  45. } else {
  46. memset(this->pBuffer,0,this->size);
  47. }
  48. }
  49. }
  50. int8 EQ2Packet::PreparePacket(int16 MaxLen){
  51. int16 OpcodeVersion = GetOpcodeVersion(version);
  52. // stops a crash for incorrect version
  53. if(EQOpcodeManager.count(OpcodeVersion) == 0)
  54. {
  55. LogWrite(PACKET__ERROR, 0, "Packet", "Version %i is not listed in the opcodes table.",version);
  56. return -1;
  57. }
  58. packet_prepared = true;
  59. int16 login_opcode = EQOpcodeManager[OpcodeVersion]->EmuToEQ(login_op);
  60. int8 offset = 0;
  61. //one of the int16s is for the seq, other is for the EQ2 opcode and compressed flag (OP_Packet is the header, not the opcode)
  62. int32 new_size = size + sizeof(int16) + sizeof(int8);
  63. bool oversized = false;
  64. if(login_opcode != 2){
  65. new_size+=sizeof(int8); //for opcode
  66. if(login_opcode >= 255){
  67. new_size += sizeof(int16);
  68. oversized = true;
  69. }
  70. else
  71. login_opcode = ntohs(login_opcode);
  72. }
  73. uchar* new_buffer = new uchar[new_size];
  74. memset(new_buffer,0,new_size);
  75. uchar* ptr = new_buffer + sizeof(int16); // sequence is first
  76. if(login_opcode != 2){
  77. if(oversized){
  78. ptr += sizeof(int8); //compressed flag
  79. int8 addon = 0xff;
  80. memcpy(ptr, &addon, sizeof(int8));
  81. ptr += sizeof(int8);
  82. }
  83. memcpy(ptr, &login_opcode, sizeof(int16));
  84. ptr += sizeof(int16);
  85. }
  86. else{
  87. memcpy(ptr, &login_opcode, sizeof(int8));
  88. ptr += sizeof(int8);
  89. }
  90. memcpy(ptr, pBuffer, size);
  91. safe_delete_array(pBuffer);
  92. pBuffer = new_buffer;
  93. offset = new_size - size - 1;
  94. size = new_size;
  95. return offset;
  96. }
  97. uint32 EQProtocolPacket::serialize(unsigned char *dest, int8 offset) const
  98. {
  99. if (opcode>0xff) {
  100. *(uint16 *)dest=opcode;
  101. } else {
  102. *(dest)=0;
  103. *(dest+1)=opcode;
  104. }
  105. memcpy(dest+2,pBuffer+offset,size-offset);
  106. return size+2;
  107. }
  108. uint32 EQApplicationPacket::serialize(unsigned char *dest) const
  109. {
  110. uint8 OpCodeBytes = app_opcode_size;
  111. if (app_opcode_size==1)
  112. *(unsigned char *)dest=opcode;
  113. else
  114. {
  115. // Application opcodes with a low order byte of 0x00 require an extra 0x00 byte inserting prior to the opcode.
  116. if ((opcode & 0x00ff) == 0)
  117. {
  118. *(uint8*)dest = 0;
  119. *(uint16*)(dest + 1) = opcode;
  120. ++OpCodeBytes;
  121. }
  122. else
  123. *(uint16*)dest = opcode;
  124. }
  125. memcpy(dest+app_opcode_size,pBuffer,size);
  126. return size+ OpCodeBytes;
  127. }
  128. EQPacket::~EQPacket()
  129. {
  130. safe_delete_array(pBuffer);
  131. pBuffer=NULL;
  132. }
  133. void EQPacket::DumpRawHeader(uint16 seq, FILE* to) const
  134. {
  135. /*if (timestamp.tv_sec) {
  136. char temp[20];
  137. tm t;
  138. const time_t sec = timestamp.tv_sec;
  139. localtime_s(&t, &sec);
  140. strftime(temp, 20, "%F %T", &t);
  141. fprintf(to, "%s.%06lu ", temp, timestamp.tv_usec);
  142. }*/
  143. DumpRawHeaderNoTime(seq, to);
  144. }
  145. const char* EQPacket::GetOpcodeName(){
  146. int16 OpcodeVersion = GetOpcodeVersion(version);
  147. if(EQOpcodeManager.count(OpcodeVersion) > 0)
  148. return EQOpcodeManager[OpcodeVersion]->EQToName(opcode);
  149. else
  150. return NULL;
  151. }
  152. void EQPacket::DumpRawHeaderNoTime(uint16 seq, FILE *to) const
  153. {
  154. if (src_ip) {
  155. string sIP,dIP;;
  156. sIP=long2ip(src_ip);
  157. dIP=long2ip(dst_ip);
  158. fprintf(to, "[%s:%d->%s:%d] ",sIP.c_str(),src_port,dIP.c_str(),dst_port);
  159. }
  160. if (seq != 0xffff)
  161. fprintf(to, "[Seq=%u] ",seq);
  162. string name;
  163. int16 OpcodeVersion = GetOpcodeVersion(version);
  164. if(EQOpcodeManager.count(OpcodeVersion) > 0)
  165. name = EQOpcodeManager[OpcodeVersion]->EQToName(opcode);
  166. fprintf(to, "[OpCode 0x%04x (%s) Size=%u]\n",opcode,name.c_str(),size);
  167. }
  168. void EQPacket::DumpRaw(FILE *to) const
  169. {
  170. DumpRawHeader();
  171. if (pBuffer && size)
  172. dump_message_column(pBuffer, size, " ", to);
  173. fprintf(to, "\n");
  174. }
  175. EQProtocolPacket::EQProtocolPacket(const unsigned char *buf, uint32 len, int in_opcode)
  176. {
  177. uint32 offset = 0;
  178. if(in_opcode>=0)
  179. opcode = in_opcode;
  180. else{
  181. offset=2;
  182. opcode=ntohs(*(const uint16 *)buf);
  183. }
  184. if (len-offset) {
  185. pBuffer= new unsigned char[len-offset];
  186. size=len-offset;
  187. if(buf)
  188. memcpy(pBuffer,buf+offset,len-offset);
  189. else
  190. memset(pBuffer,0,size);
  191. } else {
  192. pBuffer=NULL;
  193. size=0;
  194. }
  195. version = 0;
  196. eq2_compressed = false;
  197. packet_prepared = false;
  198. packet_encrypted = false;
  199. sent_time = 0;
  200. attempt_count = 0;
  201. sequence = 0;
  202. }
  203. bool EQ2Packet::AppCombine(EQ2Packet* rhs){
  204. bool result = false;
  205. uchar* tmpbuffer = 0;
  206. bool over_sized_packet = false;
  207. int32 new_size = 0;
  208. //bool whee = false;
  209. // DumpPacket(this);
  210. // DumpPacket(rhs);
  211. /*if(rhs->size >= 255){
  212. DumpPacket(this);
  213. DumpPacket(rhs);
  214. whee = true;
  215. }*/
  216. if (opcode==OP_AppCombined && ((size + rhs->size + 3) < 255)){
  217. int16 tmp_size = rhs->size - 2;
  218. if(tmp_size >= 255){
  219. new_size = size+tmp_size+3;
  220. over_sized_packet = true;
  221. }
  222. else
  223. new_size = size+tmp_size+1;
  224. tmpbuffer = new uchar[new_size];
  225. uchar* ptr = tmpbuffer;
  226. memcpy(ptr, pBuffer, size);
  227. ptr += size;
  228. if(over_sized_packet){
  229. memset(ptr, 255, sizeof(int8));
  230. ptr += sizeof(int8);
  231. tmp_size = htons(tmp_size);
  232. memcpy(ptr, &tmp_size, sizeof(int16));
  233. ptr += sizeof(int16);
  234. }
  235. else{
  236. memcpy(ptr, &tmp_size, sizeof(int8));
  237. ptr += sizeof(int8);
  238. }
  239. memcpy(ptr, rhs->pBuffer+2, rhs->size-2);
  240. delete[] pBuffer;
  241. size = new_size;
  242. pBuffer=tmpbuffer;
  243. safe_delete(rhs);
  244. result=true;
  245. }
  246. else if((size + rhs->size + 6) < 255){
  247. int32 tmp_size = size - 2;
  248. int32 tmp_size2 = rhs->size - 2;
  249. opcode=OP_AppCombined;
  250. bool over_sized_packet2 = false;
  251. new_size = size;
  252. if(tmp_size >= 255){
  253. new_size += 5;
  254. over_sized_packet = true;
  255. }
  256. else
  257. new_size += 3;
  258. if(tmp_size2 >= 255){
  259. new_size += tmp_size2+3;
  260. over_sized_packet2 = true;
  261. }
  262. else
  263. new_size += tmp_size2+1;
  264. tmpbuffer = new uchar[new_size];
  265. tmpbuffer[2]=0;
  266. tmpbuffer[3]=0x19;
  267. uchar* ptr = tmpbuffer+4;
  268. if(over_sized_packet){
  269. memset(ptr, 255, sizeof(int8));
  270. ptr += sizeof(int8);
  271. tmp_size = htons(tmp_size);
  272. memcpy(ptr, &tmp_size, sizeof(int16));
  273. ptr += sizeof(int16);
  274. }
  275. else{
  276. memcpy(ptr, &tmp_size, sizeof(int8));
  277. ptr += sizeof(int8);
  278. }
  279. memcpy(ptr, pBuffer+2, size-2);
  280. ptr += (size-2);
  281. if(over_sized_packet2){
  282. memset(ptr, 255, sizeof(int8));
  283. ptr += sizeof(int8);
  284. tmp_size2 = htons(tmp_size2);
  285. memcpy(ptr, &tmp_size2, sizeof(int16));
  286. ptr += sizeof(int16);
  287. }
  288. else{
  289. memcpy(ptr, &tmp_size2, sizeof(int8));
  290. ptr += sizeof(int8);
  291. }
  292. memcpy(ptr, rhs->pBuffer+2, rhs->size-2);
  293. size = new_size;
  294. delete[] pBuffer;
  295. pBuffer=tmpbuffer;
  296. safe_delete(rhs);
  297. result=true;
  298. }
  299. /*if(whee){
  300. DumpPacket(this);
  301. cout << "fsdfsdf";
  302. }*/
  303. //DumpPacket(this);
  304. return result;
  305. }
  306. bool EQProtocolPacket::combine(const EQProtocolPacket *rhs)
  307. {
  308. bool result=false;
  309. //if(dont_combine)
  310. // return false;
  311. //if (opcode==OP_Combined && size+rhs->size+5<256) {
  312. if (opcode == OP_Combined && size + rhs->size + 5 < 256) {
  313. auto tmpbuffer = new unsigned char[size + rhs->size + 3];
  314. memcpy(tmpbuffer, pBuffer, size);
  315. uint32 offset = size;
  316. tmpbuffer[offset++] = rhs->Size();
  317. offset += rhs->serialize(tmpbuffer + offset);
  318. size = offset;
  319. delete[] pBuffer;
  320. pBuffer = tmpbuffer;
  321. result = true;
  322. }
  323. else if (size + rhs->size + 7 < 256) {
  324. auto tmpbuffer = new unsigned char[size + rhs->size + 6];
  325. uint32 offset = 0;
  326. tmpbuffer[offset++] = Size();
  327. offset += serialize(tmpbuffer + offset);
  328. tmpbuffer[offset++] = rhs->Size();
  329. offset += rhs->serialize(tmpbuffer + offset);
  330. size = offset;
  331. delete[] pBuffer;
  332. pBuffer = tmpbuffer;
  333. opcode = OP_Combined;
  334. result = true;
  335. }
  336. return result;
  337. }
  338. EQApplicationPacket::EQApplicationPacket(const unsigned char *buf, uint32 len, uint8 opcode_size)
  339. {
  340. uint32 offset=0;
  341. app_opcode_size=(opcode_size==0) ? EQApplicationPacket::default_opcode_size : opcode_size;
  342. if (app_opcode_size==1) {
  343. opcode=*(const unsigned char *)buf;
  344. offset++;
  345. } else {
  346. opcode=*(const uint16 *)buf;
  347. offset+=2;
  348. }
  349. if ((len-offset)>0) {
  350. pBuffer=new unsigned char[len-offset];
  351. memcpy(pBuffer,buf+offset,len-offset);
  352. size=len-offset;
  353. } else {
  354. pBuffer=NULL;
  355. size=0;
  356. }
  357. emu_opcode = OP_Unknown;
  358. }
  359. bool EQApplicationPacket::combine(const EQApplicationPacket *rhs)
  360. {
  361. cout << "CALLED AP COMBINE!!!!\n";
  362. return false;
  363. }
  364. void EQApplicationPacket::SetOpcode(EmuOpcode emu_op) {
  365. if(emu_op == OP_Unknown) {
  366. opcode = 0;
  367. emu_opcode = OP_Unknown;
  368. return;
  369. }
  370. opcode = EQOpcodeManager[GetOpcodeVersion(version)]->EmuToEQ(emu_op);
  371. if(opcode == OP_Unknown) {
  372. LogWrite(PACKET__DEBUG, 0, "Packet", "Unable to convert Emu opcode %s (%d) into an EQ opcode.", OpcodeNames[emu_op], emu_op);
  373. }
  374. //save the emu opcode we just set.
  375. emu_opcode = emu_op;
  376. }
  377. const EmuOpcode EQApplicationPacket::GetOpcodeConst() const {
  378. if(emu_opcode != OP_Unknown) {
  379. return(emu_opcode);
  380. }
  381. if(opcode == 10000) {
  382. return(OP_Unknown);
  383. }
  384. EmuOpcode emu_op;
  385. emu_op = EQOpcodeManager[GetOpcodeVersion(version)]->EQToEmu(opcode);
  386. if(emu_op == OP_Unknown) {
  387. LogWrite(PACKET__DEBUG, 1, "Packet", "Unable to convert EQ opcode 0x%.4X (%i) to an emu opcode (%s)", opcode, opcode, __FUNCTION__);
  388. }
  389. return(emu_op);
  390. }
  391. EQApplicationPacket *EQProtocolPacket::MakeApplicationPacket(uint8 opcode_size) const {
  392. EQApplicationPacket *res = new EQApplicationPacket;
  393. res->app_opcode_size=(opcode_size==0) ? EQApplicationPacket::default_opcode_size : opcode_size;
  394. if (res->app_opcode_size==1) {
  395. res->pBuffer= new unsigned char[size+1];
  396. memcpy(res->pBuffer+1,pBuffer,size);
  397. *(res->pBuffer)=htons(opcode)&0xff;
  398. res->opcode=opcode&0xff;
  399. res->size=size+1;
  400. } else {
  401. res->pBuffer= new unsigned char[size];
  402. memcpy(res->pBuffer,pBuffer,size);
  403. res->opcode=opcode;
  404. res->size=size;
  405. }
  406. res->copyInfo(this);
  407. return(res);
  408. }
  409. bool EQProtocolPacket::ValidateCRC(const unsigned char *buffer, int length, uint32 Key)
  410. {
  411. bool valid=false;
  412. // OP_SessionRequest, OP_SessionResponse, OP_OutOfSession are not CRC'd
  413. if (buffer[0]==0x00 && (buffer[1]==OP_SessionRequest || buffer[1]==OP_SessionResponse || buffer[1]==OP_OutOfSession)) {
  414. valid=true;
  415. } else if(buffer[2] == 0x00 && buffer[3] == 0x19){
  416. valid = true;
  417. }
  418. else {
  419. uint16 comp_crc=CRC16(buffer,length-2,Key);
  420. uint16 packet_crc=ntohs(*(const uint16 *)(buffer+length-2));
  421. #ifdef EQN_DEBUG
  422. if (packet_crc && comp_crc != packet_crc) {
  423. cout << "CRC mismatch: comp=" << hex << comp_crc << ", packet=" << packet_crc << dec << endl;
  424. }
  425. #endif
  426. valid = (!packet_crc || comp_crc == packet_crc);
  427. }
  428. return valid;
  429. }
  430. uint32 EQProtocolPacket::Decompress(const unsigned char *buffer, const uint32 length, unsigned char *newbuf, uint32 newbufsize)
  431. {
  432. uint32 newlen=0;
  433. uint32 flag_offset=0;
  434. newbuf[0]=buffer[0];
  435. if (buffer[0]==0x00) {
  436. flag_offset=2;
  437. newbuf[1]=buffer[1];
  438. } else
  439. flag_offset=1;
  440. if (length>2 && buffer[flag_offset]==0x5a) {
  441. LogWrite(PACKET__DEBUG, 0, "Packet", "In Decompress 1");
  442. newlen=Inflate(const_cast<unsigned char *>(buffer+flag_offset+1),length-(flag_offset+1)-2,newbuf+flag_offset,newbufsize-flag_offset)+2;
  443. newbuf[newlen++]=buffer[length-2];
  444. newbuf[newlen++]=buffer[length-1];
  445. } else if (length>2 && buffer[flag_offset]==0xa5) {
  446. LogWrite(PACKET__DEBUG, 0, "Packet", "In Decompress 2");
  447. memcpy(newbuf+flag_offset,buffer+flag_offset+1,length-(flag_offset+1));
  448. newlen=length-1;
  449. } else {
  450. memcpy(newbuf,buffer,length);
  451. newlen=length;
  452. }
  453. return newlen;
  454. }
  455. uint32 EQProtocolPacket::Compress(const unsigned char *buffer, const uint32 length, unsigned char *newbuf, uint32 newbufsize) {
  456. uint32 flag_offset=1,newlength;
  457. //dump_message_column(buffer,length,"Before: ");
  458. newbuf[0]=buffer[0];
  459. if (buffer[0]==0) {
  460. flag_offset=2;
  461. newbuf[1]=buffer[1];
  462. }
  463. if (length>30) {
  464. newlength=Deflate(const_cast<unsigned char *>(buffer+flag_offset),length-flag_offset,newbuf+flag_offset+1,newbufsize);
  465. *(newbuf+flag_offset)=0x5a;
  466. newlength+=flag_offset+1;
  467. } else {
  468. memmove(newbuf+flag_offset+1,buffer+flag_offset,length-flag_offset);
  469. *(newbuf+flag_offset)=0xa5;
  470. newlength=length+1;
  471. }
  472. //dump_message_column(newbuf,length,"After: ");
  473. return newlength;
  474. }
  475. void EQProtocolPacket::ChatDecode(unsigned char *buffer, int size, int DecodeKey)
  476. {
  477. if (buffer[1]!=0x01 && buffer[0]!=0x02 && buffer[0]!=0x1d) {
  478. int Key=DecodeKey;
  479. unsigned char *test=(unsigned char *)malloc(size);
  480. buffer+=2;
  481. size-=2;
  482. int i;
  483. for (i = 0 ; i+4 <= size ; i+=4)
  484. {
  485. int pt = (*(int*)&buffer[i])^(Key);
  486. Key = (*(int*)&buffer[i]);
  487. *(int*)&test[i]=pt;
  488. }
  489. unsigned char KC=Key&0xFF;
  490. for ( ; i < size ; i++)
  491. {
  492. test[i]=buffer[i]^KC;
  493. }
  494. memcpy(buffer,test,size);
  495. free(test);
  496. }
  497. }
  498. void EQProtocolPacket::ChatEncode(unsigned char *buffer, int size, int EncodeKey)
  499. {
  500. if (buffer[1]!=0x01 && buffer[0]!=0x02 && buffer[0]!=0x1d) {
  501. int Key=EncodeKey;
  502. char *test=(char*)malloc(size);
  503. int i;
  504. buffer+=2;
  505. size-=2;
  506. for ( i = 0 ; i+4 <= size ; i+=4)
  507. {
  508. int pt = (*(int*)&buffer[i])^(Key);
  509. Key = pt;
  510. *(int*)&test[i]=pt;
  511. }
  512. unsigned char KC=Key&0xFF;
  513. for ( ; i < size ; i++)
  514. {
  515. test[i]=buffer[i]^KC;
  516. }
  517. memcpy(buffer,test,size);
  518. free(test);
  519. }
  520. }
  521. bool EQProtocolPacket::IsProtocolPacket(const unsigned char* in_buff, uint32_t len, bool bTrimCRC) {
  522. bool ret = false;
  523. uint16_t opcode = ntohs(*(uint16_t*)in_buff);
  524. uint32_t offset = 2;
  525. switch (opcode) {
  526. case OP_SessionRequest:
  527. case OP_SessionDisconnect:
  528. case OP_KeepAlive:
  529. case OP_SessionStatResponse:
  530. case OP_Packet:
  531. case OP_Combined:
  532. case OP_Fragment:
  533. case OP_Ack:
  534. case OP_OutOfOrderAck:
  535. case OP_OutOfSession:
  536. {
  537. ret = true;
  538. break;
  539. }
  540. }
  541. return ret;
  542. }
  543. void DumpPacketHex(const EQApplicationPacket* app)
  544. {
  545. DumpPacketHex(app->pBuffer, app->size);
  546. }
  547. void DumpPacketAscii(const EQApplicationPacket* app)
  548. {
  549. DumpPacketAscii(app->pBuffer, app->size);
  550. }
  551. void DumpPacket(const EQProtocolPacket* app) {
  552. DumpPacketHex(app->pBuffer, app->size);
  553. }
  554. void DumpPacket(const EQApplicationPacket* app, bool iShowInfo) {
  555. if (iShowInfo) {
  556. cout << "Dumping Applayer: 0x" << hex << setfill('0') << setw(4) << app->GetOpcode() << dec;
  557. cout << " size:" << app->size << endl;
  558. }
  559. DumpPacketHex(app->pBuffer, app->size);
  560. // DumpPacketAscii(app->pBuffer, app->size);
  561. }
  562. void DumpPacketBin(const EQApplicationPacket* app) {
  563. DumpPacketBin(app->pBuffer, app->size);
  564. }