BF2Statistics.Gamespy.GamespyUtils.Gslame C# (CSharp) Method

Gslame() private static method

Not exactly sure what this does, but i know its used to reverse the encryption and decryption of a string
private static Gslame ( int num ) : int
num int
return int
        private static int Gslame(int num)
        {
            int c = (num >> 16) & 0xffff;
            int a = num & 0xffff;

            c *= 0x41a7;
            a *= 0x41a7;
            a += ((c & 0x7fff) << 16);

            if (a < 0)
            {
                a &= 0x7fffffff;
                a++;
            }

            a += (c >> 15);

            if (a < 0)
            {
                a &= 0x7fffffff;
                a++;
            }

            return a;
        }