1) no, see similar question thread.
2) Besides PID, PKHeX emulates the game generation routine.
3) Can't tell what you're asking; PKHeX has ways of detecting if a pkm came from a mystery gift or not.
4) Looking at RNG Reporter to grab a valid PIDIV is left to the user; see reply in 1).