I only recently found out that this game had been re-released. Heard it became a cash-grab...
To add up to my post on xentax (which I corrected) and aluigis bmsscript: the end offset of a directory is 0, exactly when that directory is the last resource of its parent directory and means that it ends at the same offset the parent directory ends at.
Now for the encryption used by idcgames.com:
I don't know if its some kind of typical algorithm, maybe someone can recognize it.
dword block decryption: only the multiple of 4 bytes are encrypted. Remaining bytes are unecrypted
dword KEY1 = 0x04C478BD
dword KEY2 = 0x0015DCB2
dword KEY3 = 0x00241AE7
until you can no longer read 4 bytes do
uint8 byte = read 4 bytes
X = (KEY1 >> 8) ^ byte
Y = (KEY1 + byte) * KEY3 + KEY2
byte = X & 0x000000FF // Decrypted first byte
Z = (Y >> 8) ^ byte
X = (Y + byte) * KEY3 + KEY2
byte = Z & 0x000000FF // Decrypted second byte
Z = (X >> 8) ^ byte
Y = (X + byte) * KEY3 + KEY2
byte = Z & 0x000000FF // Decrypted third byte
X = (Y >> 8) ^ byte
byte = X & 0x000000FF // Decrypted fourth byte