Skip to content

Instantly share code, notes, and snippets.

@Trass3r
Created August 19, 2016 14:54
Show Gist options
  • Save Trass3r/4b466f68b6d2da293f11509331397476 to your computer and use it in GitHub Desktop.
Save Trass3r/4b466f68b6d2da293f11509331397476 to your computer and use it in GitHub Desktop.
void decrypt(short* src, short* dest, int size)
{
int x=0xA2C2A, y=0;
for (int i = 0; i < size; ++i)
{
x = x*0x343FD + 0x269EC3;
y = x >> 0x10 & 0x7FFF;
dest[i] = src[i] ^ LOWORD(y);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment