def METHOD_NAME(encrypted_payload: str, passphrase: str):
    decoded_payload = decode_base64(encrypted_payload)
    version = decoded_payload[0]
    if isinstance(version, str):
        version = ord(version)
    if version != 1:
        raise ValueError("Unsupported export format version.")
    salt = decoded_payload[1:17]
    iv = int.from_bytes(decoded_payload[17:33], byteorder="big")
    count = int.from_bytes(decoded_payload[33:37], byteorder="big")
    encrypted_data = decoded_payload[37:-32]
    expected_hmac = decoded_payload[-32:]
    derived_key = PBKDF2(passphrase, salt, 64, count, prf)  # type: ignore
    aes_key = derived_key[:32]
    hmac_key = derived_key[32:64]
    hmac = HMAC.new(hmac_key, decoded_payload[:-32], SHA256).digest()
    if hmac != expected_hmac:
        raise ValueError("HMAC check failed for encrypted payload.")
    ctr = Counter.new(128, initial_value=iv)
    cipher = AES.new(aes_key, AES.MODE_CTR, counter=ctr)
    return cipher.METHOD_NAME(encrypted_data)