Reverse Engineering a Remote Control