A crazy complicated ... it will require a lot of research though. Here is the idea:
First get all the filenames i.e.:
SELECT FileName + FileExtension, FileMimeType
FROM Media_Library (NOLOCK)
JOIN Media_File ON LibraryID = FileLibraryID
WHERE FileMimeType like '%image%' or FileMimeType like '%pdf%'
ORDER BY LibrarySiteID, LibraryName, FileName
You need to get all the tables where certain controls are in use, lets say images, files and attachments:
select ClassTableName, Convert(xml,ClassFormDefinition) from CMS_Class
WHERE
ClassFormDefinition like '%<controlname>URLSelector</controlname>%' OR
ClassFormDefinition like '%<controlname>MediaSelectionControl</controlname>%' OR
ClassFormDefinition like '%<controlname>ImageSelectionControl</controlname>%' OR
ClassFormDefinition like '%<controlname>DirectUploadControl</controlname>%' OR
ClassFormDefinition like '%<controlname>DocumentAttachmentsControl</controlname>%' OR
ClassFormDefinition like '%<controlname>FileSelectionControl</controlname>%'
This above will give all the tables where you can have images.
ClassFormDefinition has simple XML syntax like :
<field allowempty="true" column="ColumnName" .... >
<properties>
<fieldcaption>SomeCaption</fieldcaption>
</properties>
<settings>
<controlname>ImageSelectionControl</controlname>
</settings>
</field>
you can extract all column names for given controls for given table. It might be a bit complex.
I hope you DB is not too big I would rather go via all theses class tables and and manually created a query for each one them to extract the data:
-- most of kentico default ones operate with attachments
-- URL format is /getattachment/<file GUID>/<filename><extension>
-- for example
SELECT documentName, NodeAliasPath , attachmentguid, AttachmentName
from dbo.View_CMS_Tree_Joined
JOIN CONTENT_File on DocumentForeignKeyValue = fileid
JOIN CMS_Attachment on AttachmentGUID = FileAttachment
You might have path to image directly in field if URLSelector is use.