Here's the 2-way routine used to encrypt & decrypt dlog (among others). I'm not providing a binary since if you don't know what it's for or how it's used, you've got no use for it in the first place.
And yes, the byte swap is an eyesore, feel free to fix it. :p
PHP Code:
void crypt(char *block, int blocklen, const char *key, int keylen) {
char state[0x100] = {0};
int i, j, k;
for(i = 0; i < 0x100; i++) state[i] = i;
for(i = 0, j = 0; i < 0x100; i++) {
j = (j + state[i] + key[i % keylen]) % 0x100;
state[i] ^= state[j] ^= state[i] ^= state[j];
}
for(i = 0, j = 0, k = 0; k < blocklen; k++) {
i = (i + 1) & 0xff;
j = (j + state[i]) & 0xff;
state[i] ^= state[j] ^= state[i] ^= state[j];
block[k] ^= state[(state[i] + state[j]) & 0xff];
}
}
Edit: There's also a brainfart and a bug in the code above. But since the tool is already released, I point fixing them - should be a no-brainer to spot them though.