No software currently exists to do what you want. I suppose no one cares enough about preserving real page numbers to implement it.
In order to do this you would need to decode the binary APNX file format used for real pages numbers of MOBI and KF8 books. You would then need to modify the HTML of the corresponding EPUB to add ids at each place a new page starts and create an index of those ids in your choice of format: page-map.xml (Adobe), NCX pageList (EPUB 2), or NAV page-list (EPUB 3).
You can read more about APNX in the
MobileRead Wiki.
----
Actually, there is one alternative that will work. If you can obtain the book in Amazon KFX format using Kindle for PC 1.19 or later then you can use the optional KFX Input plugin in calibre to convert the book to EPUB. That will preserve real page numbers as an EPUB 2 NCX pageList and Adobe page-map.xml.
Unfortunately, the process of obtaining a KFX book without DRM is difficult at present due to the lack of any automated tools.