You're correct on the pin layout, JonD, the outer pins are to the motor and the inner ones from the track pickups. The LGB plug that will be connected to all four pins will probably have an all-black 4-way ribbon cable attached, but embossed into the top of the gearbox casing itself, right next to the pins, will most likely be the abbreviations for the old "standard" LGB colour code, in German of course: the four pins will be marked "gn" (Grun = green), "br" (Braun = brown), "ws" (Weiss = white) and "ge" (Gelb = yellow). If you use a Massoth decoder (XL or XLS), it will come with two sets (one for each power bogie) of the four coloured leads (green, brown, white, yellow) with individual push-on connectors to go on the pins - the green and yellow pins and wires are the motor connections, and the brown and white the track power.
Jon.