You'd need to understand how the wallet.dat encryption works then... it's not like the entire wallet is actually encrypted (if it was, you wouldn't even be able to open the wallet.dat in a "Core" application and see the addresses/transaction history etc without entering your passphrase).
Instead, what happens is that it is just the private key data that is stored encrypted. As per the info here:
https://en.bitcoin.it/wiki/Wallet_encryptionWallet encryption uses AES-256-CBC to encrypt only the private keys that are held in a wallet. The keys are encrypted with a master key which is entirely random. This master key is then encrypted with AES-256-CBC with a key derived from the passphrase using SHA-512 and OpenSSL's EVP_BytesToKey and a dynamic number of rounds determined by the speed of the machine which does the initial encryption (and is updated based on the speed of a computer which does a subsequent passphrase change).
So, the encrypted private key and your passphrase alone are not enough to decrypt the private key... you actually have to decrypt the "master" key first... then use that master key to decrypt your individual private keys.
There has been some discussion about this on another thread:
https://bitcointalk.org/index.php?topic=5333765.msg56938441#msg56938441I've been able to get as far as extracting the
encrypted master key and getting the IV, Salt, iteration count etc... but I'm not sure about how to actually decrypt the master key and then decrypt the individual private keys at this point.