I too am having sites fail to upgrade from 4.0.4 to 4.0.5. Each time it seems that it is the dtregister_images table it hangs up on. Once I add this table manually to the database, things seem to install and work.
Here's my sql script to create the table. You will need to change ixn1e to your db prefix:
CREATE TABLE `ixn1e_dtregister_images` (
`id` bigint(11) NOT NULL,
`event_id` bigint(11) DEFAULT NULL,
`path` text,
`mime` varchar(255) DEFAULT NULL,
`thumb` text,
`title` varchar(255) DEFAULT NULL,
`description` text
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
ALTER TABLE `ixn1e_dtregister_images`
ADD PRIMARY KEY (`id`);
ALTER TABLE `ixn1e_dtregister_images`
MODIFY `id` bigint(11) NOT NULL AUTO_INCREMENT;
COMMIT;