samp version memory address?

Blume

New Member
Joined
May 14, 2018
Messages
2
Likes
0
Points
1
Location
China
1
#1
i know 0.3.7's netgame version in samp.dll is 4057,but i dont know where is that memory address,we can find it ?
 

monday

Well-Known Member
Joined
Jun 23, 2014
Messages
922
Likes
4
Points
68
#5
i'd download sobeit source, use notepad++ "find in all files" feature and look for "version" or "ver" or "0.3z" and other version names within the folder with sobeit files. I remember that ive seen a condition based on some address that allowed to distinguish the samp version. I'm not 100% sure if it was sobeit though
 

monday

Well-Known Member
Joined
Jun 23, 2014
Messages
922
Likes
4
Points
68
#6
I guess it was GTA version function but idk...
But there's this thing in sobeit source (samp.cpp):

PHP:
void getSamp()
{
    if (set.basic_mode)
        return;

    uint32_t    samp_dll = getSampAddress();

    if (samp_dll != NULL)
    {
        g_dwSAMP_Addr = (uint32_t) samp_dll;

        if (g_dwSAMP_Addr != NULL)
        {
            if (memcmp_safe((uint8_t *) g_dwSAMP_Addr + 0xBABE, hex_to_bin(SAMP_CMP), 10))
            {
                strcpy(g_szSAMPVer, "SA:MP 0.3.7");
                Log("%s was detected. g_dwSAMP_Addr: 0x%p", g_szSAMPVer, g_dwSAMP_Addr);
                sampPatchDisableAnticheat();
                iIsSAMPSupported = 1;
            }
            else
            {
                Log("Unknown SA:MP version. Running in basic mode.");
                iIsSAMPSupported = 0;
                set.basic_mode = true;
                g_dwSAMP_Addr = NULL;
            }
        }
    }
    else
    {
        iIsSAMPSupported = 0;
        set.basic_mode = true;
        Log("samp.dll not found. Running in basic mode.");
    }

    return;
}
samp_addr + 0xBABE
xD
 

monday

Well-Known Member
Joined
Jun 23, 2014
Messages
922
Likes
4
Points
68
#7
and SAMP_CMP is:
#define SAMP_CMP "F8036A004050518D4C24"

and hex_to_bin is:
PHP:
uint8_t *hex_to_bin ( const char *str )
{
    int        len = (int)strlen( str );
    uint8_t *buf, *sbuf;

    if ( len == 0 || len % 2 != 0 )
        return NULL;

    sbuf = buf = (uint8_t *)malloc( len / 2 );

    while ( *str )
    {
        signed char bh = hex_to_dec( *str++ );
        signed char bl = hex_to_dec( *str++ );

        if ( bl == -1 || bh == -1 )
        {
            free( sbuf );
            return NULL;
        }

        *buf++ = ( uint8_t ) ( bl | (bh << 4) );
    }

    return sbuf;
}
here are some other examples:
0.3d and 0.3d2(?)
https://github.com/MartinJK/SAMPHiddenDLLInjection/blob/master/hack/samp.cpp

0.3z ("00E8000085D27408508B" )
https://github.com/BlastHackNet/mod...447b4ee14bbd2511255b2fb62e246adb/src/samp.cpp

more versions but not labeled:
http://www.vbforums.com/showthread.php?703203-Error-System-AccessViolationException-When-using-dll
 
Last edited:

_=Gigant=_

Well-Known Member
Joined
Mar 21, 2017
Messages
393
Likes
11
Points
23
#8
when you run samp with sobeit it creates log file in mod sa folder there you can see address
 
Top