well hashcat basically just works like this (or i dont get the question)
searched_hash = HASH-ABCDEF
hashfunction()
output = hashfunction(input)
if output equals searched_hash, then input = searched pw for searched hash of a particular hashfunction
searched_hash = HASH-ABCDEF
hashfunction()
output = hashfunction(input)
if output equals searched_hash, then input = searched pw for searched hash of a particular hashfunction