Rating:

Second stage is reversible because the key is provided. Brute force the first stage to obtain flag.

Original writeup (https://www.nevi.dev/2022/10/02/writeup-sekaictf-2022/#time-capsule-cryptography).