The ser# stampings look larger than Walther factory marks and the 'M' prefix is something I'm not familiar with on wartime pistols. The AC42 mfg went high enough to use the 'G' suffix IIRC. The frame contour of the trigger guard looks to be the early type and correct for a '42 pistol.
First guess is that it's been reworked post WW2 by the E Germans. The ser# style would better account for that,,but again just a guess.
However, I don't see any postwar E/German rework marks, proofs or police/military property marks on it so maybe I'm way off,,which is known to happen!
The E/Germans quite often replaced the barrels on the reworks and the barrel may have a rework date & proof stamped onto the bottom of it ,,usually a 50's date.
The E/G proof stamp used on replacement parts looks alot like the prewar Germany proof mark being an 'Crown/N'.
My best guesses FWIW..
A nice looking P38 no matter what the history turns out to be!