where is the source code for "Powered by Drupal"
Here's the API documentation for all your needs:


theme_system_powered_by()
system_block_info()
system_block_view()


Also, please note that modifying the output of theme_system_powered_by() should be done using a theme hook from your theme code. If you wonder how to achieve this, this might be a relevant article for you.