Essential,
I have the same box in the drivers door of my R32. I think mine is just central looking, but i've never bothered to follow all the wires for it so it could be an alarm.
The only bits i've ever really taken notice of were the box in the door and the little black piece that you marked F. This looks like an infrared receiver for a remote. Unfortunately the remote didn't come with the car. In my car the piece marked F is clipped into the top of the door trim.
Next time i have the door trim off i'll see if theres anything else connected to it.
Maybe it was a factory option alarm or remote central locking system.
I'm fairly certain that this unit has nothing to do with controlling the factory central locking (when you use the key), all it does it activate the solenoid in the drivers door and then the module that controls the central locking (probably in the dash somewhere) thinks that the drivers door has been locked with the key and locks the passenger door.
I don't know if that mad any sense.
Cheers,
Tom.