HBO’s Silicon Valley is promising to have viewers on the edge of their seats during Sunday night’s season two finale.

The penultimate episode, “Binding Arbitration,” left off with Richard (Thomas Middleditch) fighting against tech giant Hooli to keep ownership of his data compression startup, Pied Piper. But thanks to Erlich’s (T.J. Miller) giveaway that Richard refers to his laptop as his girlfriend in his emails — and he therefore used Hooli’s computer to work on his company when his “girlfriend” was in the shop — the odds aren’t looking so good for the quirky crew.

“What I’ve noticed is that a lot of these episodes this season leave you thinking, ‘What is going to happen next?’ ” Middleditch tells The Hollywood Reporter. “That sentiment carries through right until the end.”

While taking his two dogs on a walk, Middleditch talked with The Hollywood Reporter about what’s to come in the season finale, his attempted foray into angel investing and reflections on the comedy’s sophomore season.

When is the Pied Piper gang going to get a pet for the house?

When Silicon Valley throws its arms up in the air, as it did with the misrepresentation of females in our show. “You need more dogs!” I guess we’ll cave again, and throw a dog on. The dog can have a catchphrase and nerdy glasses with tape on them.

What can you tease about the upcoming finale?

Well, the thing is, it was such a successful wrap-up in the first season with the “dick to floor” joke. The guys come to this epiphany through this hilarious thing. I think everybody is looking for that same thing to happen again. If that were the case, then that would make it the formula for the show, and we’d always have to adhere to that thing. I don’t think anyone is after that. I was actually happy that something totally different — though equally funny — happens. It’s a different tone. This season wraps up more suspensefully, and everybody is on edge. It’s very quick-paced.

Hopefully the guys can catch a break, right? Richard and Co. have had a tough time this season, to say the least.

The whole season Richard has been dragged down in the mud by a frivolous lawsuit. Because there’s so much money being thrown around, it just destroys Pied Piper, which — from what I’ve heard — happens all the time. Not only in Silicon Valley, but just in the business world. That is the whole business model for patent trolls. “I’m going to put a lawsuit on you and you can’t do anything about it."

But by the last episode, Richard seems to have already admitted defeat.

He’s reached the point where he thinks that the tiny technicality [him using Hooli’s computer at one point to work on his algorithm] doesn’t really mean anything but because it’s still against the rules — if that is going to take away his company and everything that he’s worked for — he can’t do it. He’s given up, saying, “I’m not going to lie for this, and if it screws me, then so be it.”

The storyline does bring in a great new character, though — disbarred lawyer Pete Monahan. The guy has quite the backstory. What was it like for him to join in?

Matt McCoy was awesome. That character was written as such a shell of a man and he came and played it with such subtlety. I think if you read it on paper, you might picture this butch-y, ex-military guy. But he’s this slimy dude, so you hear him say those words and you’re like, “What happened?” I love that dark stuff where characters are broken and are just coming back into society. It was really fun that it was sink or swim time for Richard and he turns to the guy who’s this ex-maniac trying to reform himself and puts his fate in his hands.

Have you heard from any notable real-life tech players that you hadn’t in season one?

No one has gone out of their way to reach out. I’ve actually reached out to some angel investors, people who essentially fund companies at that seminal level. I’ve always been interested in tech and I was like, “I wonder if I can get into any of this stuff? Is that insane?” It’s probably ridiculous when somebody outside of the world comes in and says, “What about me?” They’re probably like, "You’re dumb. Get out of here." I’m sure it’s terrifically insulting. But one fellow in particular — and I can’t remember the details because I have the memory of an 80 year-old man — was like, “That scene that happened in your show, I swear you had cameras in my life. It happened almost verbatim.” That has happened a fair amount, be it a fancy pants angel investor or just any ol’ guy who worked in the tech industry. It’s crazy the amount of people that come up and are like, “It’s like a documentary.” I’d name some of them but anonymity seems to be pretty key to these people.

You and your co-stars, along with executive producers Mike Judge and Alec Berg, are often invited to either host or sit on a panels at some of these actual tech conferences. What’s that experience like?

Recently I MC’ed an event for a company up [in San Francisco], and it’s really funny because I came up and intro’ed with the “We’re going to change the world and make it a better place” doublespeak mantra of Silicon Valley, and, sure enough, later on in the presentation when keynote speakers got up, they’d repeat the same thing in earnest. It was so weird. I was there living my own show.

Do you feel pressure to keep up on what’s happening in the tech world when you’re at these events?

I know a little because of the type of podcasts I listen to or the news I read. I’ll know the bare minimum to be able to talk about something. Any one of us are being brought to those things, not to educate people on any given sector of the tech world, but to hopefully give everybody a couple of laughs — and take a selfie.

Do you actually watch the show?

Yes, I do. I can watch the show for the show and analyze it as a whole, but watching me is kind of like, “Hmm, I like what I did there, but I hate what I did there.” It’s me, so it’s hard to loose yourself in it.

So, do you and the guys have any finale watching plans?

Last year we did, and I’d like to again. I’ll have to check my email chains. It’s definitely a possibility. But Sunday’s Game of Thrones!

So, it might up being a viewing party for the Game of Thrones finale instead.

F— yeah.

The Silicon Valley season two finale airs Sunday at 10 p.m. on HBO.