def get_nsx_name(dic=None, filepath=None):
    if dic == None:
        NAXKey0, NAXKey1, r_path = get_decryption_keys(filepath)
    elif dic != None:
        NAXKey0 = dic['NAXKey0']
        NAXKey1 == dic['NAXKey1']
        r_path = dic['r_path']
        filepath = dic['filepath']
    else:
        return False
    nca_name = (r_path.split('/'))[-1] = (r_path.split('/'))[-1]
    with open(filepath, 'rb') as f:
        f.seek(0x4000)
        data = f.read()
    crypto = aes128.AESXTS(NAXKey0 + NAXKey1, sector_size=0x4000)
    nca = Nca()
    nca.open(MemoryFile(crypto.decrypt(data)))
    nca.rewind()
    nca._path = nca_name
    result = nca.get_langueblock(roman=False)
    title_name = result[0]
    return title_name
def get_cnmt_data(dic=None, filepath=None):
    if dic == None:
        NAXKey0, NAXKey1, r_path = get_decryption_keys(filepath)
    elif dic != None:
        NAXKey0 = dic['NAXKey0']
        NAXKey1 = dic['NAXKey1']
        r_path = dic['r_path']
        filepath = dic['filepath']
    else:
        return False
    nca_name = (r_path.split('/'))[-1] = (r_path.split('/'))[-1]
    with open(filepath, 'rb') as f:
        f.seek(0x4000)
        data = f.read()
    crypto = aes128.AESXTS(NAXKey0 + NAXKey1, sector_size=0x4000)
    nca = Nca()
    nca.open(MemoryFile(crypto.decrypt(data)))
    nca.rewind()
    nca_name = nca_name.replace('.nca', '.cnmt.nca')
    nca._path = nca_name
    cnmt = io.BytesIO(nca.return_cnmt())
    cnmt_dict = cnmt_data(cnmt, nca, nca_name)
    return cnmt_dict