Related Proof of Concept and explanation: GitHub - vdohney/keepass-password-dumper
Related KeyPass forum discussion.