looks to me like the pushbutton 'closes' the P channel fet , charges the caps and putting PortA1 high keeps circuit going until PortA1 goes low, BS250 opens and the caps drain.... ??