What we have here. A battery holder, 2 tactile switches, 4 LEDs, and a chip with a blob on that makes a crappy noise. I don't even want to know how the plastic shaft got broken but no ambulances were called. Nothing to salvage or Halloweenify. Let's move on.
This cheap dimmer is designed to blink LEDs with a variable duty cycle. The default frequency can be altered by swapping out a single capacitor. 20 kHz makes a whine-free speed control for a DC motor, 1 Hz gives slow PWM for high power resistive heating loads.