Показать сообщение отдельно
Непрочитано 30.06.2014, 19:47   #1
Пользователь

Автор темы (Топик Стартер) Дешифровка и каша для раздумья

Код:
byte Inline(ref uint cry)
{
    cry += 3532013U;
    byte n = (byte)(cry >> 16);
    return (byte)(((int)n == 0) ? 254 : n);
}

byte[] CtoSDecrypt(byte[] BodyPacket, uint UnkKey)
{
    byte[] Array = new byte[BodyPacket.Length];
    uint cry = (uint)((ulong)UnkKey + (ulong)BodyPacket.Length) * UnkKey ^ 1973428001u;
    int n = 4 * (BodyPacket.Length / 4);
    for (int i = n - 1; i >= 0; i--)
        Array[i] = (byte)((uint)BodyPacket[i] ^ (uint)Inline(ref cry));
    for (int i = n; i < BodyPacket.Length; i++)
        Array[i] = (byte)((uint)BodyPacket[i] ^ (uint)Inline(ref cry));
    return Array;
}

byte[] StoCDecrypt(byte[] BodyPacket)
{
    byte[] Array = new byte[BodyPacket.Length];
    uint cry = (uint)(BodyPacket.Length ^ 522286496);
    int n = 4 * (BodyPacket.Length / 4);
    for (int i = n - 1; i >= 0; i--)
        Array[i] = (byte)((uint)BodyPacket[i] ^ (uint)Inline(ref cry));
    for (int i = n; i < BodyPacket.Length; i++)
        Array[i] = (byte)((uint)BodyPacket[i] ^ (uint)Inline(ref cry));
    return Array;
}
Так как я зашел в тупик и мне не кто не смог помочь, ну что....
Вот собственно то до чего я дошел с Идой.
Ну и собственно сама каша, где или что такое UnkKey который нужен для декрипта C->S пакетов.
nikes вне форума Ответить с цитированием