In order to disassemble your Model M, start with a 7/32" nut driver or elongated hex socket. There are four bolts, all this size, along the top edge of the keyboard that must be removed. They should come off fairly easily. If they get stuck at all when loosening or tightening don't force anything - the threads for these bolts are machined right into the plastic, so they will strip easily if you crank down too hard.
Once all of the bolts have been removed, the clamshell should open right up as pictured.
With the top removed, you will able to lift the steel plate that supports the keyboard's components. Tip it up slowly from the top - but you won't be able to completely remove it until you remove the grounding cable from the screw as pictured. Also, you will need to disconnect the cable from the controller board, which should expose a 3x2 matrix of male headers with .1" spacing. The middle pin from one of the rows will be missing, that is normal.
While every "terminal" Model M I've seen has a controller of this variety - attached to the steel plate and making a 3x2 array of header available - the circuitry on a "normal" Model M (that is, one with a "regular PS/2" connector) will most likely look different! Most likely there will not be header pins for you to utilize and it will probably be seated in the lower half of the clamshell.
With the cable detached you can remove it and set it aside, we will not be needing it anymore.
At this point, I recommend taking the steel plate and flipping it over, both to examine the controller and to check the plastic rivets. Model M's have plastic rivets that are melted to hold the key assembly tight against the steel plate. These tend to deteriorate over time, so after 20 or 30 years it is not uncommon to have a few or many of these broken off. If too many are missing in any given section, it can result in inconsistent tactility or even failed actuation. If you have a lot of these rivets missing you might want to double check how your keyboard feels to see if any repairs are in order - if so you will probably have to do a bolt mod to tighten things up
. Avoid this is if you can, because once you start there is no turning back, and tightening 80 or so tiny bolts can be the opposite of fun. However if your keyboard is not working properly this step can be well worth it.
As it happens, as dirty as this board was, all of the rivets are in perfect condition.
Now, with everything disassembled we can install our components and button everything back up.