Exemplo n.º 1
0
    private MemoryStream method_5(Stream A_0, string A_1, Class994 A_2)
    {
        byte[]       buffer = new byte[0x10];
        MemoryStream stream = new MemoryStream();
        long         length = A_0.Length;
        int          num2   = 0;

        A_0.Position = 0L;
        uint num3 = 0;

        using (Class989 class2 = new Class989(A_2.method_6(), A_2.method_7()))
        {
            Class992 class3 = A_2.method_7();
            Class993 class4 = A_2.method_6();
            IntPtr   ptr    = class2.method_4(A_1, class3.method_0(), num3, class4.method_12());
            while (num2 < length)
            {
                for (int i = A_0.Read(buffer, 0, 0x10); i < 0x10; i++)
                {
                    buffer[i] = 1;
                }
                buffer = class2.method_3(ptr, buffer);
                stream.Write(buffer, 0, 0x10);
                num2 += 0x10;
                if ((num2 % 0x200) == 0)
                {
                    num3++;
                    Class990.CryptDestroyKey(ptr);
                    ptr = class2.method_4(A_1, class3.method_0(), num3, class4.method_12());
                }
            }
            Class990.CryptDestroyKey(ptr);
        }
        stream.Position = 0L;
        return(stream);
    }
Exemplo n.º 2
0
    internal bool method_2(string A_0)
    {
        Class992 class2 = this.method_1();
        IntPtr   ptr    = this.method_4(A_0, class2.method_0(), 0, this.method_0().method_12());

        byte[] buffer  = this.method_3(ptr, class2.method_2());
        byte[] buffer2 = this.method_3(ptr, class2.method_4());
        Class990.CryptDestroyKey(ptr);
        byte[] buffer3 = new SHA1Managed().ComputeHash(buffer);
        int    index   = 0;
        int    length  = buffer2.Length;

        while (index < length)
        {
            if (buffer2[index] != buffer3[index])
            {
                return(false);
            }
            index++;
        }
        return(true);
    }