EKPAHHNY_HAGN6ATOP

Активный
263
91
У меня уже обход есть

Вот, с монетки зашел даже. С пк тоже заходит
Я пока ещё не разобрался как их декрипт работает мб я вообще не то нашёл
Код:
int __fastcall DataBlockEncryptor::Decrypt(int a1, int *a2, int a3, int *a4, size_t *a5)
{
    int result = 0;
    _BYTE *v8 = (_BYTE *)(a1 + 282);
    unsigned int8 *v9 = (unsigned int8 *)(a1 + 564);
    int v10 = 32;
    int *v11;
    int v12;
    char v13, v14, v15, v16;
    bool v17;
    int v18;
    int v19;
    size_t v20;
    char *v21;
    int v24 = -831661711;
    __int16 v25 = 22719;
    int v26 = 0;

    if (a2 && a3 >= 16 && (a3 & 0xF) == 0)
    {
        if (a3 >= 32)
        {
            do
            {
                v11 = &a2[v10 / 4u];
                blockDecrypt(v9, v8, &a2[v10 / 4u - 4], 16, &a2[v10 / 4u - 4]);
                v12 = v10;
                if (a3 == v10)
                    v12 = 0;
                v13 = *((_BYTE *)v11 - 15);
                v14 = *((_BYTE *)v11 - 14);
                v15 = *((_BYTE *)v11 - 13);
                *((_BYTE *)v11 - 16) ^= *((_BYTE *)a2 + v12);
                *((_BYTE *)v11 - 15) = *((_BYTE *)a2 + (v12 | 1)) ^ v13;
                *((_BYTE *)v11 - 14) = *((_BYTE *)a2 + (v12 | 2)) ^ v14;
                v16 = *((_BYTE *)v11 - 12);
                *((_BYTE *)v11 - 13) = *((_BYTE *)a2 + (v12 | 3)) ^ v15;
                *((_BYTE *)v11 - 12) = *((_BYTE *)a2 + (v12 | 4)) ^ v16;
                *((_BYTE *)v11 - 11) ^= *((_BYTE *)a2 + (v12 | 5));
                *((_BYTE *)v11 - 10) ^= *((_BYTE *)a2 + (v12 | 6));
                *((_BYTE *)v11 - 9) ^= *((_BYTE *)a2 + (v12 | 7));
                *((_BYTE *)v11 - 8) ^= *((_BYTE *)a2 + (v12 | 8));
                *((_BYTE *)v11 - 7) ^= *((_BYTE *)a2 + (v12 | 9));
                *((_BYTE *)v11 - 6) ^= *((_BYTE *)a2 + (v12 | 0xA));
                *((_BYTE *)v11 - 5) ^= *((_BYTE *)a2 + (v12 | 0xB));
                *((_BYTE *)v11 - 4) ^= *((_BYTE *)a2 + (v12 | 0xC));
                *((_BYTE *)v11 - 3) ^= *((_BYTE *)a2 + (v12 | 0xD));
                *((_BYTE *)v11 - 2) ^= *((_BYTE *)a2 + (v12 | 0xE));
                *((_BYTE *)v11 - 1) ^= *((_BYTE *)a2 + (v12 | 0xF));
                v17 = v10 <= a3 - 16;
                v10 += 16;
            } while (v17);
        }
        blockDecrypt(v9, v8, a2, 16, a2);
        v18 = *((_BYTE *)a2 + 5) & 0xF;
        v19 = *a2;
        *a5 = a3 - 6 - v18;
        CheckSum::Add((unsigned int16 *)&v24, (unsigned int8 *)a2 + 4, a3 - 4);
        if (v19 == v26)
        {
            v20 = *a5;
            v21 = (char *)a2 + v18 + 6;
            if (a2 == a4)
                memmove(a2, v21, v20);
            else
                qmemcpy(a4, v21, v20);
            return 1;
        }
        else
        {
            return 0;
        }
    }
    return result;
}


Единственное что я нормально портировал -
Код:
int __fastcall HandleConnectionSuccess(int packetData)
{
    int activeNetwork;
    int playerId;
    int sessionId;
    unsigned __int8 usernameLength, tokenLength, versionLength;
    char authToken[65];
    unsigned __int8 *processedUsername;
    unsigned __int8 packetBuffer[0x248];
    unsigned __int8 tempBuffer[0x134];

    if (GUI::pChat) {
        Chat::AddDebugMessage(GUI::pChat, "Connected! Joining the game..");
    }

    activeNetwork = MultiPlayer::GetActiveNetwork();
    Network::SetNetworkState(activeNetwork, 15);

    RakNet::BitStream inputStream((int)tempBuffer, *(const void **)(packetData + 16), *(_DWORD *)(packetData + 8), 0);
    inputStream.IgnoreBits(8);
    inputStream.IgnoreBits(32);
    inputStream.IgnoreBits(16);
    inputStream.ReadBits((int)tempBuffer, &playerId, 16, 1);
    inputStream.ReadBits((int)tempBuffer, &sessionId, 32, 1);

    *(_WORD *)(*(_DWORD *)(MultiPlayer::GetActiveNetwork() + 884) + 4) = playerId;

    tokenLength = MPSTRLEN("E02262CF28BC542486C558D4BE9EFB716592AFAF8B");
    usernameLength = MPSTRLEN((_BYTE *)(MultiPlayer::GetActiveNetwork() + 337));
    versionLength = MPSTRLEN("0.3.7");

    DecryptData(authToken, byte_11BD770, 0x41, 0x4C);

    processedUsername = ProcessUsernameData(LauncherWrapper::GetUsername());

    RakNet::BitStream outputStream((int)packetBuffer);
    outputStream.WriteBits((unsigned __int8 *)&sessionId, 32, 1);
    outputStream.WriteBits(&usernameLength, 8, 1);
    outputStream.Write((unsigned __int8 *)(MultiPlayer::GetActiveNetwork() + 337), usernameLength);

    int encryptedSessionId = sessionId ^ 0xFD9;
    outputStream.WriteBits((unsigned __int8 *)&encryptedSessionId, 32, 1);
    outputStream.WriteBits(&tokenLength, 8, 1);
    outputStream.Write(authToken, tokenLength);
    outputStream.WriteBits(&versionLength, 8, 1);
    outputStream.Write(processedUsername, versionLength);

    SendPacket(activeNetwork, outputStream);

    CleanupMemory(processedUsername);

    return 0;
}
 
Последнее редактирование:

newkode299

Потрачен
123
57
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Я пока ещё не разобрался как их декрипт работает мб я вообще не то нашёл
Код:
int __fastcall DataBlockEncryptor::Decrypt(int a1, int *a2, int a3, int *a4, size_t *a5)
{
    int result = 0;
    _BYTE *v8 = (_BYTE *)(a1 + 282);
    unsigned int8 *v9 = (unsigned int8 *)(a1 + 564);
    int v10 = 32;
    int *v11;
    int v12;
    char v13, v14, v15, v16;
    bool v17;
    int v18;
    int v19;
    size_t v20;
    char *v21;
    int v24 = -831661711;
    __int16 v25 = 22719;
    int v26 = 0;

    if (a2 && a3 >= 16 && (a3 & 0xF) == 0)
    {
        if (a3 >= 32)
        {
            do
            {
                v11 = &a2[v10 / 4u];
                blockDecrypt(v9, v8, &a2[v10 / 4u - 4], 16, &a2[v10 / 4u - 4]);
                v12 = v10;
                if (a3 == v10)
                    v12 = 0;
                v13 = *((_BYTE *)v11 - 15);
                v14 = *((_BYTE *)v11 - 14);
                v15 = *((_BYTE *)v11 - 13);
                *((_BYTE *)v11 - 16) ^= *((_BYTE *)a2 + v12);
                *((_BYTE *)v11 - 15) = *((_BYTE *)a2 + (v12 | 1)) ^ v13;
                *((_BYTE *)v11 - 14) = *((_BYTE *)a2 + (v12 | 2)) ^ v14;
                v16 = *((_BYTE *)v11 - 12);
                *((_BYTE *)v11 - 13) = *((_BYTE *)a2 + (v12 | 3)) ^ v15;
                *((_BYTE *)v11 - 12) = *((_BYTE *)a2 + (v12 | 4)) ^ v16;
                *((_BYTE *)v11 - 11) ^= *((_BYTE *)a2 + (v12 | 5));
                *((_BYTE *)v11 - 10) ^= *((_BYTE *)a2 + (v12 | 6));
                *((_BYTE *)v11 - 9) ^= *((_BYTE *)a2 + (v12 | 7));
                *((_BYTE *)v11 - 8) ^= *((_BYTE *)a2 + (v12 | 8));
                *((_BYTE *)v11 - 7) ^= *((_BYTE *)a2 + (v12 | 9));
                *((_BYTE *)v11 - 6) ^= *((_BYTE *)a2 + (v12 | 0xA));
                *((_BYTE *)v11 - 5) ^= *((_BYTE *)a2 + (v12 | 0xB));
                *((_BYTE *)v11 - 4) ^= *((_BYTE *)a2 + (v12 | 0xC));
                *((_BYTE *)v11 - 3) ^= *((_BYTE *)a2 + (v12 | 0xD));
                *((_BYTE *)v11 - 2) ^= *((_BYTE *)a2 + (v12 | 0xE));
                *((_BYTE *)v11 - 1) ^= *((_BYTE *)a2 + (v12 | 0xF));
                v17 = v10 <= a3 - 16;
                v10 += 16;
            } while (v17);
        }
        blockDecrypt(v9, v8, a2, 16, a2);
        v18 = *((_BYTE *)a2 + 5) & 0xF;
        v19 = *a2;
        *a5 = a3 - 6 - v18;
        CheckSum::Add((unsigned int16 *)&v24, (unsigned int8 *)a2 + 4, a3 - 4);
        if (v19 == v26)
        {
            v20 = *a5;
            v21 = (char *)a2 + v18 + 6;
            if (a2 == a4)
                memmove(a2, v21, v20);
            else
                qmemcpy(a4, v21, v20);
            return 1;
        }
        else
        {
            return 0;
        }
    }
    return result;
}


Единственное что я нормально портировал -
Код:
int __fastcall HandleConnectionSuccess(int packetData)
{
    int activeNetwork;
    int playerId;
    int sessionId;
    unsigned __int8 usernameLength, tokenLength, versionLength;
    char authToken[65];
    unsigned __int8 *processedUsername;
    unsigned __int8 packetBuffer[0x248];
    unsigned __int8 tempBuffer[0x134];

    if (GUI::pChat) {
        Chat::AddDebugMessage(GUI::pChat, "Connected! Joining the game..");
    }

    activeNetwork = MultiPlayer::GetActiveNetwork();
    Network::SetNetworkState(activeNetwork, 15);

    RakNet::BitStream inputStream((int)tempBuffer, *(const void **)(packetData + 16), *(_DWORD *)(packetData + 8), 0);
    inputStream.IgnoreBits(8);
    inputStream.IgnoreBits(32);
    inputStream.IgnoreBits(16);
    inputStream.ReadBits((int)tempBuffer, &playerId, 16, 1);
    inputStream.ReadBits((int)tempBuffer, &sessionId, 32, 1);

    *(_WORD *)(*(_DWORD *)(MultiPlayer::GetActiveNetwork() + 884) + 4) = playerId;

    tokenLength = MPSTRLEN("E02262CF28BC542486C558D4BE9EFB716592AFAF8B");
    usernameLength = MPSTRLEN((_BYTE *)(MultiPlayer::GetActiveNetwork() + 337));
    versionLength = MPSTRLEN("0.3.7");

    DecryptData(authToken, byte_11BD770, 0x41, 0x4C);

    processedUsername = ProcessUsernameData(LauncherWrapper::GetUsername());

    RakNet::BitStream outputStream((int)packetBuffer);
    outputStream.WriteBits((unsigned __int8 *)&sessionId, 32, 1);
    outputStream.WriteBits(&usernameLength, 8, 1);
    outputStream.Write((unsigned __int8 *)(MultiPlayer::GetActiveNetwork() + 337), usernameLength);

    int encryptedSessionId = sessionId ^ 0xFD9;
    outputStream.WriteBits((unsigned __int8 *)&encryptedSessionId, 32, 1);
    outputStream.WriteBits(&tokenLength, 8, 1);
    outputStream.Write(authToken, tokenLength);
    outputStream.WriteBits(&versionLength, 8, 1);
    outputStream.Write(processedUsername, versionLength);

    SendPacket(activeNetwork, outputStream);

    CleanupMemory(processedUsername);

    return 0;
}
пон
 

alifeduse

Активный
345
77