What is saved in wallet.dat exactly?
The wallet.dat file contains your private keys, public keys, scripts (which correspond to addresses), key metadata (e.g. labels), and the transactions related to your wallet. If you have an HD wallet, it also includes the HD seed and and the derivation paths for each private key.