How do I override the HTML output of a theme function? Let say we have theme function in module A theme_super_a(), this function returning some HTML. I want to write function in my own module (let's call it B) where I can get output of theme_super_a() manipulate it and return back to Drupal theme system. How can I do it?

Notice that I'm not interested in overriding whole theme with hook_theme_registry_alter(&amp;$theme_registry).
You will need to override the whole theme function in your own module.
Because the override is done from a module level, not the theme, you will probably need hook_theme_registry_alter to change the theme function settings for that specific hook_theme component.