You need to create a template override for the article view - default.php template file.
Layout Overrides in Joomla.
How to override the output of Joomla core
Understanding Output Overrides
So there you can create a "modal button" for the register link, to open the registration view inside a modal window.
This blog post explains how to create modals ...
For this I'll combine two extensions: form builder and a tools to display a module in a modal
Start with the form builder like:
or your preferred form tools.
See list of form extension : http://extensions.joomla.org/tags/forms
With the form you can collect the user data and send the e-book
Only one condition, this tools should ...