Replace christmas lights flasher unit by esp32?

I’ve bought an Everlands christmas tree with built-in lights. It comes with a 12v adapter and a little box to switch the patterns. It turns off after 8 hours.

I’d like to replace this little box because I don’t want to to be turned of after 8 hours and most of the patterns are really annoying.

Anyone recognizes this little box?