On the Subject of the Semaphore Rotation CM

A machine that knows no bounds when it comes to ciphers.

Convert each letter of the encrypted word to semaphores using the table below.

A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z

Then rotate each letter by 45° times the alphabetic position of the corresponding letter in the keyword shown on screen 1. When you reach the end of the keyword, treat it as if it wraps around to the beginning of the keyword.

If the Submit Button is white, rotate them clockwise; otherwise, counter-clockwise.

Convert the result from semaphores back into a letter.

Example

Encrypted word: JNMBCSW; keyword: SPONSOR
Using counter-clockwise rotation (Submit Button is black)

JNMBCSW
S
855°
P
720°
O
675°
N
630°
S
855°
O
675°
R
810°
INSPECT

Decrypted Word: INSPECT