MatchServer:: MMatchObject Class

Results 1 to 19 of 19
  1. #1
    Account Upgraded | Title Enabled! cerealnp is offline
    MemberRank
    Apr 2006 Join Date
    BrazilLocation
    441Posts

    MatchServer:: MMatchObject Class

    Hey guys, here I am, willing for help again =D

    I was currently trying to get player's name, and I noticed that most time, players are defined by their UID, or by the MMatchObject class. So, I'm trying to look if there is a pointer to the player's name inside the MMatchObject class, or if there is any other way to get the player name by the UID. I'm not really good at reversing, the only thing i found for now is the player UGradeID (located at MMatchObject + 0x44). Help would be really appreciated. Thanks


  2. #2
    Programming Addict Lambda is offline
    MemberRank
    Sep 2007 Join Date
    SpainLocation
    393Posts

    Re: MatchServer:: MMatchObject Class

    The player name should be a bit before the UGradeID, since the UGradeID is in the MMatchAccountInfo struct you can access it.

  3. #3
    Account Upgraded | Title Enabled! cerealnp is offline
    MemberRank
    Apr 2006 Join Date
    BrazilLocation
    441Posts

    Re: MatchServer:: MMatchObject Class

    Quote Originally Posted by Lambda View Post
    The player name should be a bit before the UGradeID, since the UGradeID is in the MMatchAccountInfo struct you can access it.
    You mean a bit before the UGradeID inside the MMatchObject class?

  4. #4
    Programming Addict Lambda is offline
    MemberRank
    Sep 2007 Join Date
    SpainLocation
    393Posts

    Re: MatchServer:: MMatchObject Class

    Yes, the MMatchAccountInfo struct is inside the MMatchObject class, the first member is the UserID, so the userid would be.

    Code:
    const char* szUserID = ( const char* )( pMatchObject + 0x2C )

  5. #5
    Account Upgraded | Title Enabled! cerealnp is offline
    MemberRank
    Apr 2006 Join Date
    BrazilLocation
    441Posts

    Re: MatchServer:: MMatchObject Class

    Quote Originally Posted by Lambda View Post
    Yes, the MMatchAccountInfo struct is inside the MMatchObject class, the first member is the UserID, so the userid would be.

    Code:
    const char* szUserID = ( const char* )( pMatchObject + 0x2C )
    Ok, I'll give it a try. Big thanks =D

    Edit: It's returning nothing, but may be some mistake i did while calling the function, I'll take a look later.
    Last edited by cerealnp; 02-01-10 at 05:59 PM.

  6. #6
    Praise the Sun! Solaire is offline
    MemberRank
    Dec 2007 Join Date
    Undead BurgLocation
    2,862Posts

    Re: MatchServer:: MMatchObject Class

    + 2C => UserID
    + 60 or 6C (not sure) is the character name

    I'll look it up next week if I need to.

  7. #7
    Account Upgraded | Title Enabled! cerealnp is offline
    MemberRank
    Apr 2006 Join Date
    BrazilLocation
    441Posts

    Re: MatchServer:: MMatchObject Class

    Thanks for the help, but it's weirdly crashing/returning random stuff, depends on the function that I'm hooking...

    Take a look at the code:
    Code:
    const char* GetUserID(const struct MUID &uidObject)
    {
    	DWORD pObject;
    	__asm
    	{
    		pushad
    
    		mov eax, MMATCHSERVER_GETINSTANCE // Class instance
                    call eax
                    mov ecx, eax
    
    		push uidObject
    		mov eax, ZGetObjectA // MMatchServer::ZGetObjectA
    		call eax
    		mov pObject,eax
    
    		popad
    	}
    	const char* szUserID = (const char *) (pObject + 0x2C);
    	return szUserID;
    }

  8. #8
    Programming Addict Lambda is offline
    MemberRank
    Sep 2007 Join Date
    SpainLocation
    393Posts

    Re: MatchServer:: MMatchObject Class

    Try this, im not totally sure if it will work, but since the other method is giving you garbage, maybe that one works.

    Code:
    const char* GetUserID(const struct MUID &uidObject)
    {
        const char* p = NULL;
    
        __asm
        {
            pushad
    
            mov eax, MMATCHSERVER_GETINSTANCE // Class instance
            call eax
            mov ecx, eax
    
            push uidObject
            mov eax, ZGetObjectA // MMatchServer::ZGetObjectA
            call eax
            mov eax, dword ptr ds:[eax+0x2C]
            mov p, eax
    
            popad
        }
    
        return p;
    }

  9. #9
    GunZ Developer dacharles is offline
    MemberRank
    Oct 2006 Join Date
    476Posts

    Re: MatchServer:: MMatchObject Class

    but that is for..2007 matchserver...right?

  10. #10
    Account Upgraded | Title Enabled! PenguinGuys is offline
    MemberRank
    Sep 2009 Join Date
    AlabamaLocation
    261Posts

    Re: MatchServer:: MMatchObject Class

    Quote Originally Posted by dacharles View Post
    but that is for..2007 matchserver...right?
    More than likely, all that's changed was the offset. Update that and you're good.

  11. #11
    Account Upgraded | Title Enabled! cerealnp is offline
    MemberRank
    Apr 2006 Join Date
    BrazilLocation
    441Posts

    Re: MatchServer:: MMatchObject Class

    Quote Originally Posted by Lambda View Post
    Try this, im not totally sure if it will work, but since the other method is giving you garbage, maybe that one works.

    Code:
    const char* GetUserID(const struct MUID &uidObject)
    {
        const char* p = NULL;
    
        __asm
        {
            pushad
    
            mov eax, MMATCHSERVER_GETINSTANCE // Class instance
            call eax
            mov ecx, eax
    
            push uidObject
            mov eax, ZGetObjectA // MMatchServer::ZGetObjectA
            call eax
            mov eax, dword ptr ds:[eax+0x2C]
            mov p, eax
    
            popad
        }
    
        return p;
    }
    Thanks, but I already tried that, it keeps crashing... I really don't have any idea anymore.

  12. #12
    Programming Addict Lambda is offline
    MemberRank
    Sep 2007 Join Date
    SpainLocation
    393Posts

    Re: MatchServer:: MMatchObject Class

    Meh, i dont think that the values have changed since im using it right now and works fine.

  13. #13
    Account Upgraded | Title Enabled! cerealnp is offline
    MemberRank
    Apr 2006 Join Date
    BrazilLocation
    441Posts

    Re: MatchServer:: MMatchObject Class

    Quote Originally Posted by Lambda View Post
    Meh, i dont think that the values have changed since im using it right now and works fine.
    Dunno what's the problem then. Take a look:

    Code:
    void __stdcall OnChannelChatHook(const struct MUID &uidPlayer,const struct MUID &uidChannel,char *szText)
    {
    	try
    	{
    		char szBuff[128];
    		sprintf( szBuff,"UserID: %s",GetUserID(uidPlayer) );
    		ConsoleOutput(szBuff);
    	}
    	catch(...)
    	{
    		ConsoleOutput("Error!");
    	}
    }
    Code:
    const char* GetUserID(const struct MUID &uidObject)
    {
        const char* szUserID = NULL;
        __asm
        {
            pushad
    
            mov eax, MMATCHSERVER_GETINSTANCE // Class instance
            call eax
            mov ecx, eax
    
            push uidObject
            mov eax, ZGetObjectA // MMatchServer::ZGetObjectA
            call eax
            mov eax, dword ptr ds:[eax+0x2C]
            mov szUserID, eax
    
            popad
        }
    
        return szUserID;
    }
    BTW, Thanks for the help you're giving =D
    Last edited by cerealnp; 03-01-10 at 09:16 PM.

  14. #14
    Programming Addict Lambda is offline
    MemberRank
    Sep 2007 Join Date
    SpainLocation
    393Posts

    Re: MatchServer:: MMatchObject Class

    Oh, i was wrong, the first member is the AID, so the UserID would be 0x30.

    So this should finally work.

    Code:
    const char* GetUserID(const struct MUID &uidObject)
    {
        const char* p = NULL;
    
        __asm
        {
            pushad
    
            mov eax, MMATCHSERVER_GETINSTANCE // Class instance
            call eax
            mov ecx, eax
    
            push uidObject
            mov eax, ZGetObjectA // MMatchServer::ZGetObjectA
            call eax
            add eax, 0x30
            mov p, eax
    
            popad
        }
    
        return p;
    }

  15. #15
    Account Upgraded | Title Enabled! cerealnp is offline
    MemberRank
    Apr 2006 Join Date
    BrazilLocation
    441Posts

    Re: MatchServer:: MMatchObject Class

    Quote Originally Posted by Lambda View Post
    Oh, i was wrong, the first member is the AID, so the UserID would be 0x30.

    So this should finally work.

    Code:
    const char* GetUserID(const struct MUID &uidObject)
    {
        const char* p = NULL;
    
        __asm
        {
            pushad
    
            mov eax, MMATCHSERVER_GETINSTANCE // Class instance
            call eax
            mov ecx, eax
    
            push uidObject
            mov eax, ZGetObjectA // MMatchServer::ZGetObjectA
            call eax
            add eax, 0x30
            mov p, eax
    
            popad
        }
    
        return p;
    }
    Yaay, it worked now, big Thanks <3

  16. #16
    Account Upgraded | Title Enabled! alfredao is offline
    MemberRank
    Jan 2008 Join Date
    Coronel FabriciLocation
    705Posts

    Re: MatchServer:: MMatchObject Class

    Have you found the pointer to the charname?

  17. #17
    Account Upgraded | Title Enabled! cerealnp is offline
    MemberRank
    Apr 2006 Join Date
    BrazilLocation
    441Posts

    Re: MatchServer:: MMatchObject Class

    Quote Originally Posted by alfredao View Post
    Have you found the pointer to the charname?
    Not yet, I'm still trying to find it.

  18. #18
    GunZ Developer dacharles is offline
    MemberRank
    Oct 2006 Join Date
    476Posts

    Re: MatchServer:: MMatchObject Class

    if I'm not wrong..this can work.

    Code:
    const char* GetCharName(const struct MUID &uidObject)
    {
        const char* p = NULL;
    
        __asm
        {
            pushad
    
            mov eax, MMATCHSERVER__GETINSTANCE // Class instance
            call eax
            mov ecx, eax
    
            push uidObject
            mov eax, MMATCHSERVER__GETOBJECTA // MMatchServer::ZGetObjectA
            call eax
            mov eax, dword ptr ds:[eax+0x58]
            add eax,4
            mov p,eax
    
            popad
        }
    
        return p;
    }
    P.D.:it works matchserver 2008 still can't find it for 2007 ):
    Last edited by dacharles; 08-01-10 at 07:28 AM.

  19. #19
    Account Upgraded | Title Enabled! cerealnp is offline
    MemberRank
    Apr 2006 Join Date
    BrazilLocation
    441Posts

    Re: MatchServer:: MMatchObject Class

    Quote Originally Posted by dacharles View Post
    if I'm not wrong..this can work.

    Code:
    const char* GetCharName(const struct MUID &uidObject)
    {
        const char* p = NULL;
    
        __asm
        {
            pushad
    
            mov eax, MMATCHSERVER__GETINSTANCE // Class instance
            call eax
            mov ecx, eax
    
            push uidObject
            mov eax, MMATCHSERVER__GETOBJECTA // MMatchServer::ZGetObjectA
            call eax
            mov eax, dword ptr ds:[eax+0x58]
            add eax,4
            mov p,eax
    
            popad
        }
    
        return p;
    }
    P.D.:it works matchserver 2008 still can't find it for 2007 ):
    Yea, I'm using 2007 and it doesn't work. Thanks anyway =D



Advertisement