Instructions
Follow the main story path of "Gale of Darkness" until you reach the Cipher Key Lair. This is the second to last level in the game.
Navigate through the Cipher Key Lair until you reach the fourth floor. Each room is locked by a puzzle involving large wooden blocks. Drag these blocks to their correct locations to progress through the lair. You will see a large square imprinted on the ground, representing where the block needs to go.
Defeat each of the Cipher Peons and Scientists you encounter. They will attack with strong Pokémon and you should refresh your battle party between battles.
Use the System Lever on the fourth floor of the Cipher Key Lair to move the story forward and open access to the rest of the lair. You will notice a small treasure chest in the System Lever's room.
Open the treasure chest to discover the Technical Machine for Earthquake, which allows you to teach this ability to your Pokémon.