예제 #1
0
        public static ulong smethod_2(ulong dataSize)
        {
            ulong num      = (ulong)((long)dataSize + 8L - 1L & -8L);
            uint  k        = Class746.class746_0.K;
            ulong pageSize = (ulong)((long)num * 2L + (long)k - 1L) / (ulong)k * (ulong)byte.MaxValue;

            return(pageSize >= 1024UL ? Class996.smethod_1(pageSize) : 1024UL);
        }
예제 #2
0
        public static unsafe uint smethod_3(ulong seed, byte[] data, uint start, uint length)
        {
            seed = (ulong)(((long)seed + (long)length) * 214013L + 2531011L);
            uint sum1 = (uint)(seed & (ulong)ushort.MaxValue);
            uint sum2 = (uint)(seed >> 16 & (ulong)ushort.MaxValue);

            fixed(byte *numPtr = data)
            {
                byte *p = numPtr + (int)start;

                while (length != 0U)
                {
                    uint num1 = Math.Min(5552U, length);
                    length -= num1;
                    uint num2 = num1 >> 3;
                    while (num2-- > 0U)
                    {
                        Class996.smethod_5(p + 6, ref sum1, ref sum2);
                        Class996.smethod_5(p + 4, ref sum1, ref sum2);
                        Class996.smethod_5(p + 2, ref sum1, ref sum2);
                        Class996.smethod_5(p, ref sum1, ref sum2);
                        p += 8;
                    }
                    uint num3 = num1 & 7U;
                    if (num3 > 0U)
                    {
                        switch (num3)
                        {
                        case 1:
                            Class996.smethod_4(p, ref sum1, ref sum2);
                            break;

                        case 2:
                            Class996.smethod_5(p, ref sum1, ref sum2);
                            break;

                        case 3:
                            Class996.smethod_5(p, ref sum1, ref sum2);
                            Class996.smethod_4(p + 2, ref sum1, ref sum2);
                            break;

                        case 4:
                            Class996.smethod_5(p + 2, ref sum1, ref sum2);
                            Class996.smethod_5(p, ref sum1, ref sum2);
                            break;

                        case 5:
                            Class996.smethod_5(p + 2, ref sum1, ref sum2);
                            Class996.smethod_5(p, ref sum1, ref sum2);
                            Class996.smethod_4(p + 4, ref sum1, ref sum2);
                            break;

                        case 6:
                            Class996.smethod_5(p + 2, ref sum1, ref sum2);
                            Class996.smethod_5(p, ref sum1, ref sum2);
                            Class996.smethod_5(p + 4, ref sum1, ref sum2);
                            break;

                        case 7:
                            Class996.smethod_5(p + 2, ref sum1, ref sum2);
                            Class996.smethod_5(p, ref sum1, ref sum2);
                            Class996.smethod_5(p + 4, ref sum1, ref sum2);
                            Class996.smethod_4(p + 6, ref sum1, ref sum2);
                            break;
                        }
                        p += (int)num3;
                    }
                    sum1 %= 65521U;
                    sum2 %= 65521U;
                }
            }

            return((uint)((int)sum2 << 16 | (int)sum1 & (int)ushort.MaxValue));
        }