On the Subject of the Quadrant Reflection CM

Going in circles might be a good idea for this one.

For each pair of numbered-lettered screens (1-A, 2-B, 3-C, 4-D), create a key using the keyword on the numbered screen and a true boolean value if the lettered screen contains a 1, and a false boolean value if it contains a 0. Discard any and all letters present on the corresponding lettered screen. This will result in four keystrings, labeled A, B, C, and D according to the number-letter screen pair used.

Fill each keystring into a 5×5 grid, and arrange those grids in the following formation:

AB
DC

If the Submit Button is white, follow the instructions under Encrypt Instructions. Otherwise follow the instructions under Decrypt Instructions.

Encrypt Instructions

The current grid will start at the grid corresponding to the lettered screen containing an asterisk.

For each letter,

  • Find the letter in the current grid. If it is not present, skip the step below, but still modify the current grid.
  • Mirror its position over the axis separating the current grid and the orthogonally adjacent grid with an earlier label in the alphabet. If the current grid is A, use the new position in grid D.
  • This is the decrypted letter. The current grid for the next letter will be the adjacent unused grid for this letter.

Decrypt Instructions

The current grid will start at the adjacent grid with an earlier label in the alphabet from the grid corresponding to the lettered screen containing an asterisk.

For each letter,

  • If the current letter is not present in the current grid, skip the step below, but still modify the current grid. Otherwise, find it in the current grid.
  • Mirror its position over the axis separating the current grid and the adjacent grid with a later label in the alphabet. If the current grid is D, use the new position in grid A.
  • This is the decrypted letter. The current grid for the next letter will be the unused adjacent grid for this letter.

Example — Using Decrypt Instructions

Encrypted word: RJVH

Screen pairs:

1 - A: GLAZED - 0V*
2 - B: ZEBRA - 1T
3 - C: PRODUCE - 1Q
4 - D: TINSEL - 1V

Creating keystrings:

Keystring A: Keyword last, Remove V: BCFHIJKMNOPQRSTUWXYGLAZED
Keystring B: Keyword first, Remove T: ZEBRACDFGHIJKLMNOPQSUVWXY
Keystring C: Keyword first, Remove Q: PRODUCEABFGHIJKLMNSTVWXYZ
Keystring D: Keyword first, Remove V: TINSELABCDFGHJKMOPQRUWXYZ

Arranging Keystrings into keysquares

BCFHI|ZEBRA
JKMNO|CDFGH
PQRST|IJKLM
UWXYG|NOPQS
LAZED|UVWXY
----- -----
TINSE|PRODU
LABCD|CEABF
FGHJK|GHIJK
MOPQR|LMNST
UWXYZ|VWXYZ

Start decrypting

First current grid is grid D (earlier label than A with asterisk)

R in D, later is A => reflect over horizontal => O, unused = C
J in C, later is D => reflect over vertical => G, unused = B
V in B, later is C => reflect over horizontal => R, unused = A
H in A, later is B => reflect over vertical => E, END

Decrypted word: OGRE