Ok now I have figured some things out. Reverse engineered the project a bit to be able to return specific values. But I still don't know how to find player account levels and the levels of their played hero. Here's an example code that I made:
from mpyq import mpyq
import protocol29406
archive = mpyq.MPQArchive("Blackheart's Bay.StormReplay")
header = protocol29406.decode_replay_header(archive.header['user_data_header']['content'])
baseBuild = header['m_version']['m_baseBuild']
protocol = __import__('protocol%s' % (baseBuild,))
details = protocol.decode_replay_details(archive.read_file('replay.details'))
print(details['m_title'])
if details['m_playerList'][0]['m_result'] == 2:
print('Firts 5 players won.')
else:
print('The last 5 players won.')
for p in details['m_playerList']:
print(p['m_name'] + ' played ' + p['m_hero'])