Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[DEV] Latale New Packet Encryption...

Joined
Sep 27, 2006
Messages
557
Reaction score
88
This is the decrypted side of latale packet encryption... oppiste is just adding the 4 byte header... have any questions feel free to ask...


Code:
void CCrypt::Decrypt(unsigned char* buffer, unsigned size )
{
	// check data correctness
	if ( !buffer )
		return;
	if ( size < 4 )
		return;

	unsigned char * decBuffer = new unsigned char[ size - 4 ];

	unsigned m = size - 4;

	// copy data from the decBuffer to Buffer  
	memcpy( decBuffer, buffer + 4, sizeof( unsigned char ) * m );

	const char unknown_key[] = "qmfaktnpgjs";
        unsigned char unknown_key2[sizeof(unknown_key)];
        std::copy(unknown_key, unknown_key + sizeof(unknown_key), unknown_key2);

	if ( decBuffer == NULL)
		return;
        if ( m < 4 )
		return;
	
	for (unsigned i = 0; i < m; i++)
	{
		if ( decBuffer[i] != 0)
		{
			decBuffer[ i ] = unknown_key2[i % 0xB] ^ decBuffer[i];
		}
	}
	
	// swap buffers
	delete [] buffer;
	buffer = decBuffer;
	size = m;
}
 
Last edited:
Newbie Spellweaver
Joined
Apr 5, 2011
Messages
9
Reaction score
3
this works as far as i know any questions just ask away...

Question Number 1

what exactly are we looking at?

Question 2

Will it help create a latale server?

(P.S. im not a coder)
 
Back
Top