Also, `data[cipher_offset + 1]` looks like it could be an out-of-bounds read.