You can decrypt the configuration like this:
Code:
/**
* define.lua String Decryption
* (c) atom0s 2017 [atom0s@live.com]
*/
#include <Windows.h>
#include <cinttypes>
#include <iostream>
#include <string>
const char* MAP1 = "q2zwsxed6rfvtg0yhn9jmikolp";
const char* MAP2 = "73918abcu4";
int32_t find_pos(const char* str, int32_t len, char target)
{
if (str == nullptr || len == 0)
return 0;
auto i = 0;
auto r = 0;
while (str[i] != target)
{
++i;
if (i >= len)
return 0;
r = i;
}
return r;
}
std::string string_decode(const std::string& str)
{
size_t i = 0;
int8_t buffer[512] = { 0 };
do
{
if (i >= str.length())
break;
auto v1 = str.at(i);
auto v2 = find_pos(MAP1, 26, v1);
auto v3 = str.at(i + 1);
auto v4 = find_pos(MAP2, 10, v3);
auto v5 = v2 + 26 * v4;
buffer[i / 2] = (v2 + 26 * v4 - 127) ^ 0x9D;
i += 2;
} while (i <= 512);
return std::string((char*)buffer);
}
int __cdecl main(int argc, char* argv[])
{
auto sniffEncryptedString = "n3y3m3l3m3j3l3m3y3l3n3j3r3v3j3j393h3v3e8h8k8j8s8s8v3r1d1p1t1g3r12161v3x8h8g9x8f8v8989893n393n3";
auto gameEncryptedString = "n3y3m3l3m3j3l3m3y3l3n3j3r3v3j3j393h3v3e8h8k8j8s8s8v3r1d1p1t1g3r12161v3x8h8g9n8j8d8y893n393n3";
std::cout << string_decode(sniffEncryptedString) << std::endl;
std::cout << string_decode(gameEncryptedString) << std::endl;
return 0;
}
For reencrypting, you would have to reverse this process.