I found it in includes/class_bootstrap.php, public function process_templates(). There's a hook on line 561, "process_templates_complete", where I can do something like this:
Code:
if($argle == 'bargle')
{
$templater = vB_Template::create('header_alt');
$templater->register('ad_location', $ad_location);
$templater->register('pmbox', $pmbox);
$templater->register('notifications_menubits', $notifications_menubits);
$templater->register('notifications_total', $notifications_total);
$templater->register('notices', $notices);
$templater->register('facebook_header', $facebook_header);
$header = $templater->render();
}