Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
53 lines (45 sloc) 798 Bytes
#include <iostream>
int main()
{
int myarray[] = { 0x87, 0xea, 0xfd, 0x9a, 0x4b, 0x73, 0x54, 0xa4, 0x5c, 0x8f, 0x00 };
int counter = 0;
int16_t key = 0x5555;
while (myarray[counter] != 0)
{
int value = myarray[counter];
int value2 = value;
int result;
key = (key << 2) + counter;
value2 = value2 >> 6;
if (value2 - 1 <= 2)
{
value ^= key;
value -= counter;
value -= value2;
value &= 0x3f;
if (value >= 0x0a)
{
if (value <= 0x24)
{
result = value + 0x37;
}
else
{
if (value <= 0x3e)
{
result = value + 0x3d;
}
}
}
else
{
result = value + 0x30;
}
myarray[counter] = result;
}
counter++;
}
for (int x = 0; x < sizeof(myarray) / 4; x++)
std::cout << (char)myarray[x];
return 0;
}
You can’t perform that action at this time.