7812a regulator circuit
Some AC adapters are not regulated and their output voltage is higher than the rating, especially at currents lower than the rated one. Measure the output of your AC adapter. If it's much higher than 12V, you can most likely use it with a 7812 and a 7805 to build your power supply.
If it really outputs only 12.5V, then it works with a 7805, but for 12V, you would either need an LDO (if you are strict about it), or simply use it as is. 12.5V is not too high for the microcontroller.