Is there a module? Or: How to alter the Drupal pager to get this?
You need to look at the code above and understand what it is doing. Where does li.pager-last come from? Notice that the last line uses theme('item_list') to build the result and it passes in $items. Just above that you'll see the code which adds an item to the $items array with 'class' =&gt; 'pager-last':

if ($li_last) {
  $items[] = array(
    'class' =&gt; 'pager-last',
    'data' =&gt; $li_last,
  );
}


If you want to add another item after li.pager-last, you might try duplicating these 5 lines and modifying them to do what you want.