Here's a bit of PHP Smarty code, hopefully it will get you started in the right direction.
This will allow you to embed an image with a variable called $beer
It will also default to the URL public/logoX.png if the $beer variable is not defined
Assuming you will upload logoX.png in content manager
<img src="public/{$beer|default:"public/logoX.png"|escape}">
I believe you can embed that variable $beer in the URL or a hidden field in the previous [registration] page, for example if you uploaded a logoY.png in content manger:
your_page.php?_browser=1&beer=logoY.png
Or you can code up some Javascript to detect the domain/brand name from the LDAP form.
Let me know if this helps, but I'll brainstorm and see if there's an easier way to accomplish what you're trying to do.
-Harry