summaryrefslogtreecommitdiff
path: root/csgo-loader/csgo-client/Security/Encryption.cpp
diff options
context:
space:
mode:
authorboris <wzn@moneybot.cc>2019-01-02 21:11:03 +1300
committerboris <wzn@moneybot.cc>2019-01-02 21:11:03 +1300
commitc0f1354a301ce2a2fc867a89fafdde4571c07c02 (patch)
treeea628b53a41f7d532efe100b94a41e4ca0429767 /csgo-loader/csgo-client/Security/Encryption.cpp
parentd1ec3d3bb3a87a08e1c9348ca6e482549ebde664 (diff)
6IX9INE "Billy" (WSHH Exclusive - Official Music Video)
Diffstat (limited to 'csgo-loader/csgo-client/Security/Encryption.cpp')
-rw-r--r--csgo-loader/csgo-client/Security/Encryption.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/csgo-loader/csgo-client/Security/Encryption.cpp b/csgo-loader/csgo-client/Security/Encryption.cpp
index 00b0fee..083460a 100644
--- a/csgo-loader/csgo-client/Security/Encryption.cpp
+++ b/csgo-loader/csgo-client/Security/Encryption.cpp
@@ -80,7 +80,7 @@ namespace Wrapper
};
// Implementation of the AES256 encryption algorithm.
- unsigned char rj_xtime(unsigned char x);
+ uint8_t rj_xtime(uint8_t x);
Aes256::Aes256(const ByteArray& key)
: m_key(ByteArray(key.size() > KEY_SIZE ? KEY_SIZE : key.size(), 0))
@@ -144,7 +144,7 @@ namespace Wrapper
ByteArray::size_type Aes256::encrypt_start(const ByteArray::size_type plain_length, ByteArray& encrypted)
{
- VMProtectBegin("AESEncryptStart");
+ VMProtectBeginUltra("AESEncryptStart");
m_remainingLength = plain_length;
@@ -265,7 +265,7 @@ namespace Wrapper
{
unsigned char j;
- VMProtectBegin("AESDecryptStart");
+ VMProtectBeginUltra("AESDecryptStart");
m_remainingLength = encrypted_length;
@@ -314,7 +314,7 @@ namespace Wrapper
void Aes256::check_and_decrypt_buffer(ByteArray& plain)
{
- VMProtectBegin("AESDecryptBuffer");
+ VMProtectBeginUltra("AESDecryptBuffer");
if(!m_decryptInitialized && m_buffer_pos == m_salt.size() + 1)
{
@@ -384,7 +384,7 @@ namespace Wrapper
{
unsigned char i;
- VMProtectBegin("AESExpandKey");
+ VMProtectBeginUltra("AESExpandKey");
m_rkey[0] = m_rkey[0] ^ sbox[m_rkey[29]] ^ (*rc);
m_rkey[1] = m_rkey[1] ^ sbox[m_rkey[30]];
@@ -419,7 +419,7 @@ namespace Wrapper
{
unsigned char i;
- VMProtectBegin("AESExpandKey");
+ VMProtectBeginUltra("AESExpandKey");
for(i = 28; i > 16; i -= 4)
{
@@ -585,10 +585,7 @@ namespace Wrapper
VMProtectEnd();
}
- inline unsigned char rj_xtime(unsigned char x)
- {
- return (x & 0x80) ? ((x << 1) ^ 0x1b) : (x << 1);
- }
+ inline uint8_t rj_xtime(uint8_t x) { return (x & 0x80) ? ((x << 1) ^ 0x1b) : (x << 1); }
// Wrapper for the AES256 encryption algorithm.
void Encryption::Start()