MatchServer:: MMatchObject Class

Joined
Apr 23, 2006
Messages
415
Reaction score
45
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
 
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:
Upvote 0
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;
}
 
Upvote 0
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;
}
 
Upvote 0
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.
 
Upvote 0
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:
Upvote 0
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;
}
 
Upvote 0
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
 
Upvote 0
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,[COLOR=Red]4[/COLOR]
        mov p,eax

        popad
    }

    return p;
}
P.D.:it works matchserver 2008 still can't find it for 2007 ):
 
Last edited:
Upvote 0
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,[COLOR=Red]4[/COLOR]
        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
 
Upvote 0
Back