A lot happens in these three measures and it sounds cool and hard, but it's really quite easy. Use this chord shape for the B, and use your 4 finger for the hammer-ons and pull-offs.
Then fret the A# in the bass with 1 and still use 4 to hammer-on to the F#. Then I use 4 to fret the G and pull-off to the open E, and 3 to work my way up the neck with pull-offs untill I get to the E on the twelvth fret in which I use the 4. You're going to have to stretch a little to pull-off to the D, and use 1 to fret the B. Then switch positions on the first string so that you use 3 to fret the A#, 2 to fret the A, and 1 to pull a bend on the third fret.