Yes, hcxhash2cap will do this:
Please notice that it is not flawless. EAPOL MESSAGEPAIRs M2M3 (where EAPOL is taken from M3) can't be converted back to a cap file!
Code:
$ hcxhash2cap -h
hcxhash2cap 6.2.5-8-gbb72f57 (C) 2021 ZeroBeat
usage:
hcxhash2cap <options>
options:
-c <file> : output cap file
if no cap file is selected, output will be written to single cap files
format: mac_sta.cap (mac_sta.cap_x)
-h : show this help
-v : show version
--pmkid-eapol=<file> : input PMKID EAPOL (22000) combi hash file
--pmkid=<file> : input deprecated PMKID (16800) hash file
--hccapx=<file> : input deprecated hccapx (2500) hash file
--hccap=<file> : input ancient hccap (2500) file
--john=<file> : input John the Ripper WPAPSK hash file
--help : show this help
--version : show version
Please notice that it is not flawless. EAPOL MESSAGEPAIRs M2M3 (where EAPOL is taken from M3) can't be converted back to a cap file!