mystery pipe question

I have a renovation property which is missing a drain in the mechanical room. I need to remedy this and to my hopefull delight there is a pipe sticking out of the floor relatively close. I have never seen a pipe look like this and am hoping osomeone might have an idea what it is, and whether i can dig down, tie into it and trench it over to the mechanical room?

I have included a picture of the main stack, well, just cause.

Attached Files:

The picture on the right I understand. That's a main stack.
You can use a copper by plastic nohub coupling to connect to it.
Or maybe it's a cast iron hub comming out of the concrete and you would use normal cast iron nohub couplings.

The one one the left worries me. Is there writing on it, and what does it say?
That one could use a bigger picture.

Attached Files:

I would let a few other plumbers take a look over the next few days.
Someone like hj may know.
It could be a standard hub there with some strange plug.
Or it could be some sort of shutoff, and if it is, for what?

Normally what I do, is take a metal coat hanger and cut the ends off with pliers.

Take the two ends, and bend them into el's.
hold each el in your hand, with the wire facing away from you.
As you walk over the pipe, the wires will point toward each other when they are in line with a pipe.

You can try it outside over a plastic pipe on the ground to check that it's working right.
It's called witching, but I don't think that's a proper name for it. It's something that anyone can do.