Looking for Handlers Guides menu

Shout-Out

User Tag List

Results 1 to 4 of 4
  1. #1
    ehsan619's Avatar Member
    Reputation
    1
    Join Date
    Nov 2013
    Posts
    10
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Looking for Handlers Guides

    hi
    i am a C++ developer and i have started to work on mop. since last 2 weeks i had no idea about how to work on a new patch but after reading some articles here i found how to begin! for now i have finished sniffing most of the opcodes and also i have write some handles but my problem is i don't have enough knowledge about the Handles!
    i searched the forum but i couldn't find any good tutorial about that.
    I can give a example about what confuses me in Handles :
    for example we want to handle the CMSG_SET_ACTIVE_MOVER opcode in TC4.3.4 the handler for this opcode is HandleSetActiveMoverOpcode in MovementHandler.cpp and this is a part of code that i dont understand it :
    Code:
        ObjectGuid guid;
    
        guid[7] = recvPacket.ReadBit();
        guid[2] = recvPacket.ReadBit();
        guid[1] = recvPacket.ReadBit();
        guid[0] = recvPacket.ReadBit();
        guid[4] = recvPacket.ReadBit();
        guid[5] = recvPacket.ReadBit();
        guid[6] = recvPacket.ReadBit();
        guid[3] = recvPacket.ReadBit();
    
        recvPacket.ReadByteSeq(guid[3]);
        recvPacket.ReadByteSeq(guid[2]);
        recvPacket.ReadByteSeq(guid[4]);
        recvPacket.ReadByteSeq(guid[0]);
        recvPacket.ReadByteSeq(guid[5]);
        recvPacket.ReadByteSeq(guid[1]);
        recvPacket.ReadByteSeq(guid[6]);
        recvPacket.ReadByteSeq(guid[7]);
    1.where can i find the correct numbers of guid when you recv the bits?
    2.what are they stand for?
    3.also what is the byte seq here?
    4.can i get them using IDA or i need another tools?
    5.is there any tutorial about them?
    please help me
    Last edited by ehsan619; 11-24-2013 at 07:01 AM.

    Looking for Handlers Guides
  2. #2
    ZealX's Avatar Private
    Reputation
    2
    Join Date
    Nov 2013
    Posts
    5
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well Im playing with this in IDA for 2 days now and Ill share what I learned so far.

    All SMSG opcodes seem to be primarily handled by the NetClientDispatcher function inside the client. There is an argument-formula inside the switch-case block that does some bitwise operations with the opcode and then assigns a case to it - that is a handler function for that opcode. Currently in 541 the dispatcher is located at 0x0065261C (not rebased).

    There are also functions inside the client that read from packets, CDataStore_Get*, for bit, byte, int, string etc. You need to identify those first - you can do that by downloading an IDB file for an older version of wow to see its structure - or wait for a 541 version of the IDB.

    When looking inside the opcode handler, it seems to be as simple as looking at the mentioned method calls of CDataStore_Get*. Of course it can get complicated when there are several subroutine calls included.

  3. #3
    ehsan619's Avatar Member
    Reputation
    1
    Join Date
    Nov 2013
    Posts
    10
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    First of all Thanks For your help. but I couldn't find the function NetClientDispatcher in 4.3.4 idb also i looked at the info dump of 4.3.4 in this forum and i couldn't find that function in IDA.

    ----------
    I don't know why i cann't post the code it says it contains forbidden words

  4. #4
    ehsan619's Avatar Member
    Reputation
    1
    Join Date
    Nov 2013
    Posts
    10
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    lets talk about HandlePlayerLoginOpcode that handles CMSG_PLAYER_LOGIN opcode the handle just take the guid of player from packet structure of the opcode and then adds player to world and continues... this handle works on TC 4.3.4 :
    Code:
    playerGuid[2] = recvData.ReadBit();
        playerGuid[3] = recvData.ReadBit();
        playerGuid[0] = recvData.ReadBit();
        playerGuid[6] = recvData.ReadBit();
        playerGuid[4] = recvData.ReadBit();
        playerGuid[5] = recvData.ReadBit();
        playerGuid[1] = recvData.ReadBit();
        playerGuid[7] = recvData.ReadBit();
    
        recvData.ReadByteSeq(playerGuid[2]);
        recvData.ReadByteSeq(playerGuid[7]);
        recvData.ReadByteSeq(playerGuid[0]);
        recvData.ReadByteSeq(playerGuid[3]);
        recvData.ReadByteSeq(playerGuid[5]);
        recvData.ReadByteSeq(playerGuid[6]);
        recvData.ReadByteSeq(playerGuid[1]);
        recvData.ReadByteSeq(playerGuid[4]);
    I searched for that function in IDA and i found sub_625150 function and then i pseudocode the asemmbly code to C code and this is our code now :
    Code:
    int __stdcall ClientConnection__SendPlayerLoginOpcode(int a1, int a2, int a3)
    {
      int result;
      char v4
      int v5; 
      int v6; 
      int v7; 
      int v8; 
      int v9; 
      int v10;
    
      v6 = 0;
      v7 = 0;
      v8 = 0;
      v9 = 0;
      v5 = (int)off_B898C4;
      v10 = -1;
      sub_66D6F0((int)&v4, a1, a2);
      NetClient__Send(&v4, 2);
      result = sub_66BC20(&v4);
      v5 = (int)off_B898C4;
      if ( v8 != -1 )
        result = off_B898C8(&v5, &v6, &v7, &v8);
      return result;
    }
    so the problem is how can i find that packet structure when this function sends it?

    thanks for your helping

Similar Threads

  1. Looking for a guide to getting Epic gear and Heirloom gear.
    By allenflame in forum World of Warcraft General
    Replies: 3
    Last Post: 11-16-2009, 01:06 PM
  2. looking for a guide to set up a linux wow server
    By ridders in forum World of Warcraft General
    Replies: 0
    Last Post: 10-21-2008, 01:23 PM
  3. Looking for a guide! +rep
    By metehan in forum World of Warcraft Emulator Servers
    Replies: 11
    Last Post: 05-27-2008, 10:56 PM
  4. Looking for a Guide
    By shveg in forum WoW ME Questions and Requests
    Replies: 1
    Last Post: 12-11-2007, 02:38 AM
  5. looking for a guide to get me from 300 to 375 in enchanting
    By bait in forum World of Warcraft General
    Replies: 2
    Last Post: 01-22-2007, 06:33 PM
All times are GMT -5. The time now is 04:54 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search