In case you don't know, the metal pad on the underside of it is a thermal pad which needs to be soldered to the board to act as a heatsink. Unfortunately, this requires reflow which is hard to do yourself, although other people here do it with a frying pan or similar.
Some surface mount power mosfets come in packages like this...or chips with mosfets/bjts in them. you could try looking at a datasheet for an smt power mosfet and gently apply current-controlled power to see if that's what it is...just a thought.
If it's a MOSFET, the heat sink is normally connected to the drain along with nearly half the pins, the other half of the pins connect to the source and one to the gate.
The parasitic diode can be found in reverse parallel with the drain and source, using a diode tester.
The gate will appear as an open circuit with respect to all other pins.