So ive decided to look into the time stamp function and found a a few things. Time-stamps are actually two 4byte int that never go over the limitations of a 3 byte int. The 4th and 8th byte thus are always zero, so the game replaces the 8th byte with part of the packet id, then following that, the 9th byte, happens to be packet id.
The time stamp, or as i like to refer to as the "key" is made this way, though i see no use. As the key is based on this "magic number" though i cant seem to find out how thats made, ill figure it out later.
Once you have the magic number you divide 10000 by the magic number and store the remainder, then you get another magic number, divide 10000 by it and store the reminder, then you multiply the remainder together and some two other things, take the final product and copy it into key slot 1 or the first time stamp int, do this all over again for the second key(time stamp).
Note: Yes , i know that that is not "usable" code , though keep in mind i did all of this in 7 hours. It may not be perfect though i will try my hardest, when i get ahold of my computer as once i find how the magic number is originally generated i will post here.
Note: Hay what is the true use of this function if we are taking the remainder ?? we cannot reverse the multiplication of two remainder, thus the server could never really use this, unless im wrong.
The time stamp, or as i like to refer to as the "key" is made this way, though i see no use. As the key is based on this "magic number" though i cant seem to find out how thats made, ill figure it out later.
Code:
extern int __cdecl MagicNumberGenerator(int last magic number)
{
New magic number = last magic number
Imul New Magic Number, New Magic Number, 000343fd
New Magic Number += 00269ec3
Last magic number = new magic number
int Temp_Magic number = new magic number
Temp_Magic number >>= 16
Temp_Magic number += 00007fff
return Temp_Magic number
}
Note: Yes , i know that that is not "usable" code , though keep in mind i did all of this in 7 hours. It may not be perfect though i will try my hardest, when i get ahold of my computer as once i find how the magic number is originally generated i will post here.
Note: Hay what is the true use of this function if we are taking the remainder ?? we cannot reverse the multiplication of two remainder, thus the server could never really use this, unless im wrong.