From 1db42a10ff045fdd41d455c65f1b2811249b53c2 Mon Sep 17 00:00:00 2001 From: Yuki1536 <69851694+Yuki1536@users.noreply.github.com> Date: Sun, 11 Dec 2022 17:24:14 +0900 Subject: [PATCH 1/9] Test: x2m x3m decrypt --- src/decrypt/index.ts | 173 ++++++++++---------- src/decrypt/ximalaya.ts | 349 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 438 insertions(+), 84 deletions(-) create mode 100644 src/decrypt/ximalaya.ts diff --git a/src/decrypt/index.ts b/src/decrypt/index.ts index dbf8f6a..79323f4 100644 --- a/src/decrypt/index.ts +++ b/src/decrypt/index.ts @@ -9,96 +9,101 @@ import { Decrypt as KwmDecrypt } from '@/decrypt/kwm'; import { Decrypt as RawDecrypt } from '@/decrypt/raw'; import { Decrypt as TmDecrypt } from '@/decrypt/tm'; import { Decrypt as JooxDecrypt } from '@/decrypt/joox'; +import { Decrypt as XimalayaDecrypt } from './ximalaya'; import { DecryptResult, FileInfo } from '@/decrypt/entity'; import { SplitFilename } from '@/decrypt/utils'; import { storage } from '@/utils/storage'; import InMemoryStorage from '@/utils/storage/InMemoryStorage'; export async function Decrypt(file: FileInfo, config: Record): Promise { - // Worker thread will fallback to in-memory storage. - if (storage instanceof InMemoryStorage) { - await storage.setAll(config); - } + // Worker thread will fallback to in-memory storage. + if (storage instanceof InMemoryStorage) { + await storage.setAll(config); + } - const raw = SplitFilename(file.name); - let rt_data: DecryptResult; - switch (raw.ext) { - case 'mg3d': // Migu Wav - rt_data = await Mg3dDecrypt(file.raw, raw.name); - break; - case 'ncm': // Netease Mp3/Flac - rt_data = await NcmDecrypt(file.raw, raw.name, raw.ext); - break; - case 'uc': // Netease Cache - rt_data = await NcmCacheDecrypt(file.raw, raw.name, raw.ext); - break; - case 'kwm': // Kuwo Mp3/Flac - rt_data = await KwmDecrypt(file.raw, raw.name, raw.ext); - break; - case 'xm': // Xiami Wav/M4a/Mp3/Flac - case 'wav': // Xiami/Raw Wav - case 'mp3': // Xiami/Raw Mp3 - case 'flac': // Xiami/Raw Flac - case 'm4a': // Xiami/Raw M4a - rt_data = await XmDecrypt(file.raw, raw.name, raw.ext); - break; - case 'ogg': // Raw Ogg - rt_data = await RawDecrypt(file.raw, raw.name, raw.ext); - break; - case 'tm0': // QQ Music IOS Mp3 - case 'tm3': // QQ Music IOS Mp3 - rt_data = await RawDecrypt(file.raw, raw.name, 'mp3'); - break; - case 'qmc3': //QQ Music Android Mp3 - case 'qmc2': //QQ Music Android Ogg - case 'qmc0': //QQ Music Android Mp3 - case 'qmcflac': //QQ Music Android Flac - case 'qmcogg': //QQ Music Android Ogg - case 'tkm': //QQ Music Accompaniment M4a - // Moo Music - case 'bkcmp3': - case 'bkcm4a': - case 'bkcflac': - case 'bkcwav': - case 'bkcape': - case 'bkcogg': - case 'bkcwma': - // QQ Music v2 - case 'mggl': //QQ Music Mac - case 'mflac': //QQ Music New Flac - case 'mflac0': //QQ Music New Flac - case 'mgg': //QQ Music New Ogg - case 'mgg1': //QQ Music New Ogg - case 'mgg0': - case 'mmp4': // QMC MP4 Container w/ E-AC-3 JOC - case '666c6163': //QQ Music Weiyun Flac - case '6d7033': //QQ Music Weiyun Mp3 - case '6f6767': //QQ Music Weiyun Ogg - case '6d3461': //QQ Music Weiyun M4a - case '776176': //QQ Music Weiyun Wav - rt_data = await QmcDecrypt(file.raw, raw.name, raw.ext); - break; - case 'tm2': // QQ Music IOS M4a - case 'tm6': // QQ Music IOS M4a - rt_data = await TmDecrypt(file.raw, raw.name); - break; - case 'cache': //QQ Music Cache - rt_data = await QmcCacheDecrypt(file.raw, raw.name, raw.ext); - break; - case 'vpr': - case 'kgm': - case 'kgma': - rt_data = await KgmDecrypt(file.raw, raw.name, raw.ext); - break; - case 'ofl_en': - rt_data = await JooxDecrypt(file.raw, raw.name, raw.ext); - break; - default: - throw '不支持此文件格式'; - } + const raw = SplitFilename(file.name); + let rt_data: DecryptResult; + switch (raw.ext) { + case 'mg3d': // Migu Wav + rt_data = await Mg3dDecrypt(file.raw, raw.name); + break; + case 'ncm': // Netease Mp3/Flac + rt_data = await NcmDecrypt(file.raw, raw.name, raw.ext); + break; + case 'uc': // Netease Cache + rt_data = await NcmCacheDecrypt(file.raw, raw.name, raw.ext); + break; + case 'kwm': // Kuwo Mp3/Flac + rt_data = await KwmDecrypt(file.raw, raw.name, raw.ext); + break; + case 'xm': // Xiami Wav/M4a/Mp3/Flac + case 'wav': // Xiami/Raw Wav + case 'mp3': // Xiami/Raw Mp3 + case 'flac': // Xiami/Raw Flac + case 'm4a': // Xiami/Raw M4a + rt_data = await XmDecrypt(file.raw, raw.name, raw.ext); + break; + case 'ogg': // Raw Ogg + rt_data = await RawDecrypt(file.raw, raw.name, raw.ext); + break; + case 'tm0': // QQ Music IOS Mp3 + case 'tm3': // QQ Music IOS Mp3 + rt_data = await RawDecrypt(file.raw, raw.name, 'mp3'); + break; + case 'qmc3': //QQ Music Android Mp3 + case 'qmc2': //QQ Music Android Ogg + case 'qmc0': //QQ Music Android Mp3 + case 'qmcflac': //QQ Music Android Flac + case 'qmcogg': //QQ Music Android Ogg + case 'tkm': //QQ Music Accompaniment M4a + // Moo Music + case 'bkcmp3': + case 'bkcm4a': + case 'bkcflac': + case 'bkcwav': + case 'bkcape': + case 'bkcogg': + case 'bkcwma': + // QQ Music v2 + case 'mggl': //QQ Music Mac + case 'mflac': //QQ Music New Flac + case 'mflac0': //QQ Music New Flac + case 'mgg': //QQ Music New Ogg + case 'mgg1': //QQ Music New Ogg + case 'mgg0': + case 'mmp4': // QMC MP4 Container w/ E-AC-3 JOC + case '666c6163': //QQ Music Weiyun Flac + case '6d7033': //QQ Music Weiyun Mp3 + case '6f6767': //QQ Music Weiyun Ogg + case '6d3461': //QQ Music Weiyun M4a + case '776176': //QQ Music Weiyun Wav + rt_data = await QmcDecrypt(file.raw, raw.name, raw.ext); + break; + case 'tm2': // QQ Music IOS M4a + case 'tm6': // QQ Music IOS M4a + rt_data = await TmDecrypt(file.raw, raw.name); + break; + case 'cache': //QQ Music Cache + rt_data = await QmcCacheDecrypt(file.raw, raw.name, raw.ext); + break; + case 'vpr': + case 'kgm': + case 'kgma': + rt_data = await KgmDecrypt(file.raw, raw.name, raw.ext); + break; + case 'ofl_en': + rt_data = await JooxDecrypt(file.raw, raw.name, raw.ext); + break; + case 'x2m': + case 'x3m': + rt_data = await XimalayaDecrypt(file.raw, raw.name, raw.ext); + break; + default: + throw '不支持此文件格式'; + } - if (!rt_data.rawExt) rt_data.rawExt = raw.ext; - if (!rt_data.rawFilename) rt_data.rawFilename = raw.name; - console.log(rt_data); - return rt_data; + if (!rt_data.rawExt) rt_data.rawExt = raw.ext; + if (!rt_data.rawFilename) rt_data.rawFilename = raw.name; + console.log(rt_data); + return rt_data; } diff --git a/src/decrypt/ximalaya.ts b/src/decrypt/ximalaya.ts new file mode 100644 index 0000000..55664a7 --- /dev/null +++ b/src/decrypt/ximalaya.ts @@ -0,0 +1,349 @@ +import { parseBlob as metaParseBlob } from 'music-metadata-browser'; +import { AudioMimeType, SniffAudioExt, GetArrayBuffer, GetMetaFromFile } from "./utils"; +import { decode } from 'iconv-lite'; +import { DecryptResult } from '@/decrypt/entity'; + +interface Handler { + handler: Function; +} + +const HandlerMap: { [key: string]: Handler } = { + "x2m": { handler: ProcessX2M }, + "x3m": { handler: ProcessX3M } +}; + +export async function Decrypt(file: File, raw_filename: string, raw_ext: string): Promise { + const buffer = new Uint8Array(await GetArrayBuffer(file)); + if (!(raw_ext in HandlerMap)) throw "File type is incorrect!"; + const Handler = HandlerMap[raw_ext]; + let musicDecoded: Uint8Array = Handler.handler(buffer); + + const ext = SniffAudioExt(musicDecoded, "m4a"); + const mime = AudioMimeType[ext]; + + let musicBlob = new Blob([musicDecoded], { type: mime }); + + const musicMeta = await metaParseBlob(musicBlob); + for (let metaIdx in musicMeta.native) { + if (musicMeta.native[metaIdx].some(item => item.id === "TCON" && item.value === "(12)")) { + musicMeta.common.artist = decode(musicMeta.common.artist, "gbk"); + musicMeta.common.title = decode(musicMeta.common.title, "gbk"); + musicMeta.common.album = decode(musicMeta.common.album, "gbk"); + } + } + + const info = GetMetaFromFile(musicMeta.common.artist, musicMeta.common.title, raw_filename); + + return { + picture: "", + title: info.title, + artist: info.artist, + ext: ext, + album: musicMeta.common.album, + blob: musicBlob, + file: URL.createObjectURL(musicBlob), + mime: mime + } +} + +function ProcessX2M(data: Uint8Array) { + const x2mHeaderSize = 1024; + // x2m Key in test format: ['x', 'm', 'l', 'y']; + const x2mKey = new Uint8Array([0x78, 0x6D, 0x6C, 0x79]); + let x2mScrambleTable = new Uint16Array(x2mHeaderSize); + if (x2mScrambleTableBytes.length != 2 * x2mHeaderSize) + throw "invalid x2m scramble table"; + for (let i = 0; i < x2mHeaderSize; i++) + x2mScrambleTable[i] = x2mScrambleTableBytes[i * 2] | (x2mScrambleTableBytes[i * 2 + 1] << 8); + let encryptedHeader = data.slice(0, x2mHeaderSize); + for (let idx = 0; idx < x2mHeaderSize; idx++) { + let srcIdx = x2mScrambleTable[idx]; + data[idx] = encryptedHeader[srcIdx] ^ x2mKey[idx % x2mKey.length]; + } + return data; +} + +function ProcessX3M(data: Uint8Array) { + const x3mHeaderSize = 1024; + const x3mKey = new Uint8Array([ + 0x33, 0x39, 0x38, 0x39, 0x64, 0x31, 0x31, 0x31, + 0x61, 0x61, 0x64, 0x35, 0x36, 0x31, 0x33, 0x39, + 0x34, 0x30, 0x66, 0x34, 0x66, 0x63, 0x34, 0x34, + 0x62, 0x36, 0x33, 0x39, 0x62, 0x32, 0x39, 0x32 + ]); + let x3mScrambleTable = new Uint16Array(x3mHeaderSize); + if (x3mScrambleTableBytes.length != 2 * x3mHeaderSize) + throw "invalid x3m scramble table"; + for (let i = 0; i < x3mHeaderSize; i++) + x3mScrambleTable[i] = x3mScrambleTableBytes[i * 2] | (x3mScrambleTableBytes[i * 2 + 1] << 8); + let encryptedHeader = data.slice(0, x3mHeaderSize); + for (let dstIdx = 0; dstIdx < x3mHeaderSize; dstIdx++) { + let srcIdx = x3mScrambleTable[dstIdx]; + data[dstIdx] = encryptedHeader[srcIdx] ^ x3mKey[dstIdx % x3mKey.length]; + } + return data; +} + +const x2mScrambleTableBytes = [ + 0xA9, 0x02, 0xAB, 0x02, 0x54, 0x01, 0xAA, 0x02, 0xA8, 0x02, 0xAC, 0x02, 0x53, 0x01, 0xA7, 0x02, + 0xAD, 0x02, 0x52, 0x01, 0xA6, 0x02, 0xFF, 0x03, 0x00, 0x00, 0x55, 0x01, 0xAE, 0x02, 0x51, 0x01, + 0xA5, 0x02, 0xFE, 0x03, 0x01, 0x00, 0x56, 0x01, 0xAF, 0x02, 0x50, 0x01, 0xA4, 0x02, 0xFD, 0x03, + 0x02, 0x00, 0x57, 0x01, 0xB0, 0x02, 0x4F, 0x01, 0xA3, 0x02, 0xFC, 0x03, 0x03, 0x00, 0x58, 0x01, + 0xB1, 0x02, 0x4E, 0x01, 0xA2, 0x02, 0xFB, 0x03, 0x04, 0x00, 0x59, 0x01, 0xB2, 0x02, 0x4D, 0x01, + 0xA1, 0x02, 0xFA, 0x03, 0x05, 0x00, 0x5A, 0x01, 0xB3, 0x02, 0x4C, 0x01, 0xA0, 0x02, 0xF9, 0x03, + 0x06, 0x00, 0x5B, 0x01, 0xB4, 0x02, 0x4B, 0x01, 0x9F, 0x02, 0xF8, 0x03, 0x07, 0x00, 0x5C, 0x01, + 0xB5, 0x02, 0x4A, 0x01, 0x9E, 0x02, 0xF7, 0x03, 0x08, 0x00, 0x5D, 0x01, 0xB6, 0x02, 0x49, 0x01, + 0x9D, 0x02, 0xF6, 0x03, 0x09, 0x00, 0x5E, 0x01, 0xB7, 0x02, 0x48, 0x01, 0x9C, 0x02, 0xF5, 0x03, + 0x0A, 0x00, 0x5F, 0x01, 0xB8, 0x02, 0x47, 0x01, 0x9B, 0x02, 0xF4, 0x03, 0x0B, 0x00, 0x60, 0x01, + 0xB9, 0x02, 0x46, 0x01, 0x9A, 0x02, 0xF3, 0x03, 0x0C, 0x00, 0x61, 0x01, 0xBA, 0x02, 0x45, 0x01, + 0x99, 0x02, 0xF2, 0x03, 0x0D, 0x00, 0x62, 0x01, 0xBB, 0x02, 0x44, 0x01, 0x98, 0x02, 0xF1, 0x03, + 0x0E, 0x00, 0x63, 0x01, 0xBC, 0x02, 0x43, 0x01, 0x97, 0x02, 0xF0, 0x03, 0x0F, 0x00, 0x64, 0x01, + 0xBD, 0x02, 0x42, 0x01, 0x96, 0x02, 0xEF, 0x03, 0x10, 0x00, 0x65, 0x01, 0xBE, 0x02, 0x41, 0x01, + 0x95, 0x02, 0xEE, 0x03, 0x11, 0x00, 0x66, 0x01, 0xBF, 0x02, 0x40, 0x01, 0x94, 0x02, 0xED, 0x03, + 0x12, 0x00, 0x67, 0x01, 0xC0, 0x02, 0x3F, 0x01, 0x93, 0x02, 0xEC, 0x03, 0x13, 0x00, 0x68, 0x01, + 0xC1, 0x02, 0x3E, 0x01, 0x92, 0x02, 0xEB, 0x03, 0x14, 0x00, 0x69, 0x01, 0xC2, 0x02, 0x3D, 0x01, + 0x91, 0x02, 0xEA, 0x03, 0x15, 0x00, 0x6A, 0x01, 0xC3, 0x02, 0x3C, 0x01, 0x90, 0x02, 0xE9, 0x03, + 0x16, 0x00, 0x6B, 0x01, 0xC4, 0x02, 0x3B, 0x01, 0x8F, 0x02, 0xE8, 0x03, 0x17, 0x00, 0x6C, 0x01, + 0xC5, 0x02, 0x3A, 0x01, 0x8E, 0x02, 0xE7, 0x03, 0x18, 0x00, 0x6D, 0x01, 0xC6, 0x02, 0x39, 0x01, + 0x8D, 0x02, 0xE6, 0x03, 0x19, 0x00, 0x6E, 0x01, 0xC7, 0x02, 0x38, 0x01, 0x8C, 0x02, 0xE5, 0x03, + 0x1A, 0x00, 0x6F, 0x01, 0xC8, 0x02, 0x37, 0x01, 0x8B, 0x02, 0xE4, 0x03, 0x1B, 0x00, 0x70, 0x01, + 0xC9, 0x02, 0x36, 0x01, 0x8A, 0x02, 0xE3, 0x03, 0x1C, 0x00, 0x71, 0x01, 0xCA, 0x02, 0x35, 0x01, + 0x89, 0x02, 0xE2, 0x03, 0x1D, 0x00, 0x72, 0x01, 0xCB, 0x02, 0x34, 0x01, 0x88, 0x02, 0xE1, 0x03, + 0x1E, 0x00, 0x73, 0x01, 0xCC, 0x02, 0x33, 0x01, 0x87, 0x02, 0xE0, 0x03, 0x1F, 0x00, 0x74, 0x01, + 0xCD, 0x02, 0xA9, 0x00, 0xFE, 0x01, 0x57, 0x03, 0x20, 0x00, 0x75, 0x01, 0xCE, 0x02, 0xAA, 0x00, + 0xFF, 0x01, 0x58, 0x03, 0x21, 0x00, 0x76, 0x01, 0xCF, 0x02, 0xAB, 0x00, 0x00, 0x02, 0x59, 0x03, + 0x22, 0x00, 0x77, 0x01, 0xD0, 0x02, 0xAC, 0x00, 0x01, 0x02, 0x5A, 0x03, 0x23, 0x00, 0x78, 0x01, + 0xD1, 0x02, 0xAD, 0x00, 0x02, 0x02, 0x5B, 0x03, 0x24, 0x00, 0x79, 0x01, 0xD2, 0x02, 0xAE, 0x00, + 0x03, 0x02, 0x5C, 0x03, 0x25, 0x00, 0x7A, 0x01, 0xD3, 0x02, 0xAF, 0x00, 0x04, 0x02, 0x5D, 0x03, + 0x26, 0x00, 0x7B, 0x01, 0xD4, 0x02, 0xB0, 0x00, 0x05, 0x02, 0x5E, 0x03, 0x27, 0x00, 0x7C, 0x01, + 0xD5, 0x02, 0xB1, 0x00, 0x06, 0x02, 0x5F, 0x03, 0x28, 0x00, 0x7D, 0x01, 0xD6, 0x02, 0xB2, 0x00, + 0x07, 0x02, 0x60, 0x03, 0x29, 0x00, 0x7E, 0x01, 0xD7, 0x02, 0xB3, 0x00, 0x08, 0x02, 0x61, 0x03, + 0x2A, 0x00, 0x7F, 0x01, 0xD8, 0x02, 0xB4, 0x00, 0x09, 0x02, 0x62, 0x03, 0x2B, 0x00, 0x80, 0x01, + 0xD9, 0x02, 0xB5, 0x00, 0x0A, 0x02, 0x63, 0x03, 0x2C, 0x00, 0x81, 0x01, 0xDA, 0x02, 0xB6, 0x00, + 0x0B, 0x02, 0x64, 0x03, 0x2D, 0x00, 0x82, 0x01, 0xDB, 0x02, 0xB7, 0x00, 0x0C, 0x02, 0x65, 0x03, + 0x2E, 0x00, 0x83, 0x01, 0xDC, 0x02, 0xB8, 0x00, 0x0D, 0x02, 0x66, 0x03, 0x2F, 0x00, 0x84, 0x01, + 0xDD, 0x02, 0xB9, 0x00, 0x0E, 0x02, 0x67, 0x03, 0x30, 0x00, 0x85, 0x01, 0xDE, 0x02, 0xBA, 0x00, + 0x0F, 0x02, 0x68, 0x03, 0x31, 0x00, 0x86, 0x01, 0xDF, 0x02, 0xBB, 0x00, 0x10, 0x02, 0x69, 0x03, + 0x32, 0x00, 0x87, 0x01, 0xE0, 0x02, 0xBC, 0x00, 0x11, 0x02, 0x6A, 0x03, 0x33, 0x00, 0x88, 0x01, + 0xE1, 0x02, 0xBD, 0x00, 0x12, 0x02, 0x6B, 0x03, 0x34, 0x00, 0x89, 0x01, 0xE2, 0x02, 0xBE, 0x00, + 0x13, 0x02, 0x6C, 0x03, 0x35, 0x00, 0x8A, 0x01, 0xE3, 0x02, 0xBF, 0x00, 0x14, 0x02, 0x6D, 0x03, + 0x36, 0x00, 0x8B, 0x01, 0xE4, 0x02, 0xC0, 0x00, 0x15, 0x02, 0x6E, 0x03, 0x37, 0x00, 0x8C, 0x01, + 0xE5, 0x02, 0xC1, 0x00, 0x16, 0x02, 0x6F, 0x03, 0x38, 0x00, 0x8D, 0x01, 0xE6, 0x02, 0xC2, 0x00, + 0x17, 0x02, 0x70, 0x03, 0x39, 0x00, 0x8E, 0x01, 0xE7, 0x02, 0xC3, 0x00, 0x18, 0x02, 0x71, 0x03, + 0x3A, 0x00, 0x8F, 0x01, 0xE8, 0x02, 0xC4, 0x00, 0x19, 0x02, 0x72, 0x03, 0x3B, 0x00, 0x90, 0x01, + 0xE9, 0x02, 0xC5, 0x00, 0x1A, 0x02, 0x73, 0x03, 0x3C, 0x00, 0x91, 0x01, 0xEA, 0x02, 0xC6, 0x00, + 0x1B, 0x02, 0x74, 0x03, 0x3D, 0x00, 0x92, 0x01, 0xEB, 0x02, 0xC7, 0x00, 0x1C, 0x02, 0x75, 0x03, + 0x3E, 0x00, 0x93, 0x01, 0xEC, 0x02, 0xC8, 0x00, 0x1D, 0x02, 0x76, 0x03, 0x3F, 0x00, 0x94, 0x01, + 0xED, 0x02, 0xC9, 0x00, 0x1E, 0x02, 0x77, 0x03, 0x40, 0x00, 0x95, 0x01, 0xEE, 0x02, 0xCA, 0x00, + 0x1F, 0x02, 0x78, 0x03, 0x41, 0x00, 0x96, 0x01, 0xEF, 0x02, 0xCB, 0x00, 0x20, 0x02, 0x79, 0x03, + 0x42, 0x00, 0x97, 0x01, 0xF0, 0x02, 0xCC, 0x00, 0x21, 0x02, 0x7A, 0x03, 0x43, 0x00, 0x98, 0x01, + 0xF1, 0x02, 0xCD, 0x00, 0x22, 0x02, 0x7B, 0x03, 0x44, 0x00, 0x99, 0x01, 0xF2, 0x02, 0xCE, 0x00, + 0x23, 0x02, 0x7C, 0x03, 0x45, 0x00, 0x9A, 0x01, 0xF3, 0x02, 0xCF, 0x00, 0x24, 0x02, 0x7D, 0x03, + 0x46, 0x00, 0x9B, 0x01, 0xF4, 0x02, 0xD0, 0x00, 0x25, 0x02, 0x7E, 0x03, 0x47, 0x00, 0x9C, 0x01, + 0xF5, 0x02, 0xD1, 0x00, 0x26, 0x02, 0x7F, 0x03, 0x48, 0x00, 0x9D, 0x01, 0xF6, 0x02, 0xD2, 0x00, + 0x27, 0x02, 0x80, 0x03, 0x49, 0x00, 0x9E, 0x01, 0xF7, 0x02, 0xD3, 0x00, 0x28, 0x02, 0x81, 0x03, + 0x4A, 0x00, 0x9F, 0x01, 0xF8, 0x02, 0xD4, 0x00, 0x29, 0x02, 0x82, 0x03, 0x4B, 0x00, 0xA0, 0x01, + 0xF9, 0x02, 0xD5, 0x00, 0x2A, 0x02, 0x83, 0x03, 0x4C, 0x00, 0xA1, 0x01, 0xFA, 0x02, 0xD6, 0x00, + 0x2B, 0x02, 0x84, 0x03, 0x4D, 0x00, 0xA2, 0x01, 0xFB, 0x02, 0xD7, 0x00, 0x2C, 0x02, 0x85, 0x03, + 0x4E, 0x00, 0xA3, 0x01, 0xFC, 0x02, 0xD8, 0x00, 0x2D, 0x02, 0x86, 0x03, 0x4F, 0x00, 0xA4, 0x01, + 0xFD, 0x02, 0xD9, 0x00, 0x2E, 0x02, 0x87, 0x03, 0x50, 0x00, 0xA5, 0x01, 0xFE, 0x02, 0xDA, 0x00, + 0x2F, 0x02, 0x88, 0x03, 0x51, 0x00, 0xA6, 0x01, 0xFF, 0x02, 0xDB, 0x00, 0x30, 0x02, 0x89, 0x03, + 0x52, 0x00, 0xA7, 0x01, 0x00, 0x03, 0xDC, 0x00, 0x31, 0x02, 0x8A, 0x03, 0x53, 0x00, 0xA8, 0x01, + 0x01, 0x03, 0xDD, 0x00, 0x32, 0x02, 0x8B, 0x03, 0x54, 0x00, 0xA9, 0x01, 0x02, 0x03, 0xDE, 0x00, + 0x33, 0x02, 0x8C, 0x03, 0x55, 0x00, 0xAA, 0x01, 0x03, 0x03, 0xDF, 0x00, 0x34, 0x02, 0x8D, 0x03, + 0x56, 0x00, 0xAB, 0x01, 0x04, 0x03, 0xE0, 0x00, 0x35, 0x02, 0x8E, 0x03, 0x57, 0x00, 0xAC, 0x01, + 0x05, 0x03, 0xE1, 0x00, 0x36, 0x02, 0x8F, 0x03, 0x58, 0x00, 0xAD, 0x01, 0x06, 0x03, 0xE2, 0x00, + 0x37, 0x02, 0x90, 0x03, 0x59, 0x00, 0xAE, 0x01, 0x07, 0x03, 0xE3, 0x00, 0x38, 0x02, 0x91, 0x03, + 0x5A, 0x00, 0xAF, 0x01, 0x08, 0x03, 0xE4, 0x00, 0x39, 0x02, 0x92, 0x03, 0x5B, 0x00, 0xB0, 0x01, + 0x09, 0x03, 0xE5, 0x00, 0x3A, 0x02, 0x93, 0x03, 0x5C, 0x00, 0xB1, 0x01, 0x0A, 0x03, 0xE6, 0x00, + 0x3B, 0x02, 0x94, 0x03, 0x5D, 0x00, 0xB2, 0x01, 0x0B, 0x03, 0xE7, 0x00, 0x3C, 0x02, 0x95, 0x03, + 0x5E, 0x00, 0xB3, 0x01, 0x0C, 0x03, 0xE8, 0x00, 0x3D, 0x02, 0x96, 0x03, 0x5F, 0x00, 0xB4, 0x01, + 0x0D, 0x03, 0xE9, 0x00, 0x3E, 0x02, 0x97, 0x03, 0x60, 0x00, 0xB5, 0x01, 0x0E, 0x03, 0xEA, 0x00, + 0x3F, 0x02, 0x98, 0x03, 0x61, 0x00, 0xB6, 0x01, 0x0F, 0x03, 0xEB, 0x00, 0x40, 0x02, 0x99, 0x03, + 0x62, 0x00, 0xB7, 0x01, 0x10, 0x03, 0xEC, 0x00, 0x41, 0x02, 0x9A, 0x03, 0x63, 0x00, 0xB8, 0x01, + 0x11, 0x03, 0xED, 0x00, 0x42, 0x02, 0x9B, 0x03, 0x64, 0x00, 0xB9, 0x01, 0x12, 0x03, 0xEE, 0x00, + 0x43, 0x02, 0x9C, 0x03, 0x65, 0x00, 0xBA, 0x01, 0x13, 0x03, 0xEF, 0x00, 0x44, 0x02, 0x9D, 0x03, + 0x66, 0x00, 0xBB, 0x01, 0x14, 0x03, 0xF0, 0x00, 0x45, 0x02, 0x9E, 0x03, 0x67, 0x00, 0xBC, 0x01, + 0x15, 0x03, 0xF1, 0x00, 0x46, 0x02, 0x9F, 0x03, 0x68, 0x00, 0xBD, 0x01, 0x16, 0x03, 0xF2, 0x00, + 0x47, 0x02, 0xA0, 0x03, 0x69, 0x00, 0xBE, 0x01, 0x17, 0x03, 0xF3, 0x00, 0x48, 0x02, 0xA1, 0x03, + 0x6A, 0x00, 0xBF, 0x01, 0x18, 0x03, 0xF4, 0x00, 0x49, 0x02, 0xA2, 0x03, 0x6B, 0x00, 0xC0, 0x01, + 0x19, 0x03, 0xF5, 0x00, 0x4A, 0x02, 0xA3, 0x03, 0x6C, 0x00, 0xC1, 0x01, 0x1A, 0x03, 0xF6, 0x00, + 0x4B, 0x02, 0xA4, 0x03, 0x6D, 0x00, 0xC2, 0x01, 0x1B, 0x03, 0xF7, 0x00, 0x4C, 0x02, 0xA5, 0x03, + 0x6E, 0x00, 0xC3, 0x01, 0x1C, 0x03, 0xF8, 0x00, 0x4D, 0x02, 0xA6, 0x03, 0x6F, 0x00, 0xC4, 0x01, + 0x1D, 0x03, 0xF9, 0x00, 0x4E, 0x02, 0xA7, 0x03, 0x70, 0x00, 0xC5, 0x01, 0x1E, 0x03, 0xFA, 0x00, + 0x4F, 0x02, 0xA8, 0x03, 0x71, 0x00, 0xC6, 0x01, 0x1F, 0x03, 0xFB, 0x00, 0x50, 0x02, 0xA9, 0x03, + 0x72, 0x00, 0xC7, 0x01, 0x20, 0x03, 0xFC, 0x00, 0x51, 0x02, 0xAA, 0x03, 0x73, 0x00, 0xC8, 0x01, + 0x21, 0x03, 0xFD, 0x00, 0x52, 0x02, 0xAB, 0x03, 0x74, 0x00, 0xC9, 0x01, 0x22, 0x03, 0xFE, 0x00, + 0x53, 0x02, 0xAC, 0x03, 0x75, 0x00, 0xCA, 0x01, 0x23, 0x03, 0xFF, 0x00, 0x54, 0x02, 0xAD, 0x03, + 0x76, 0x00, 0xCB, 0x01, 0x24, 0x03, 0x00, 0x01, 0x55, 0x02, 0xAE, 0x03, 0x77, 0x00, 0xCC, 0x01, + 0x25, 0x03, 0x01, 0x01, 0x56, 0x02, 0xAF, 0x03, 0x78, 0x00, 0xCD, 0x01, 0x26, 0x03, 0x02, 0x01, + 0x57, 0x02, 0xB0, 0x03, 0x79, 0x00, 0xCE, 0x01, 0x27, 0x03, 0x03, 0x01, 0x58, 0x02, 0xB1, 0x03, + 0x7A, 0x00, 0xCF, 0x01, 0x28, 0x03, 0x04, 0x01, 0x59, 0x02, 0xB2, 0x03, 0x7B, 0x00, 0xD0, 0x01, + 0x29, 0x03, 0x05, 0x01, 0x5A, 0x02, 0xB3, 0x03, 0x7C, 0x00, 0xD1, 0x01, 0x2A, 0x03, 0x06, 0x01, + 0x5B, 0x02, 0xB4, 0x03, 0x7D, 0x00, 0xD2, 0x01, 0x2B, 0x03, 0x07, 0x01, 0x5C, 0x02, 0xB5, 0x03, + 0x7E, 0x00, 0xD3, 0x01, 0x2C, 0x03, 0x08, 0x01, 0x5D, 0x02, 0xB6, 0x03, 0x7F, 0x00, 0xD4, 0x01, + 0x2D, 0x03, 0x09, 0x01, 0x5E, 0x02, 0xB7, 0x03, 0x80, 0x00, 0xD5, 0x01, 0x2E, 0x03, 0x0A, 0x01, + 0x5F, 0x02, 0xB8, 0x03, 0x81, 0x00, 0xD6, 0x01, 0x2F, 0x03, 0x0B, 0x01, 0x60, 0x02, 0xB9, 0x03, + 0x82, 0x00, 0xD7, 0x01, 0x30, 0x03, 0x0C, 0x01, 0x61, 0x02, 0xBA, 0x03, 0x83, 0x00, 0xD8, 0x01, + 0x31, 0x03, 0x0D, 0x01, 0x62, 0x02, 0xBB, 0x03, 0x84, 0x00, 0xD9, 0x01, 0x32, 0x03, 0x0E, 0x01, + 0x63, 0x02, 0xBC, 0x03, 0x85, 0x00, 0xDA, 0x01, 0x33, 0x03, 0x0F, 0x01, 0x64, 0x02, 0xBD, 0x03, + 0x86, 0x00, 0xDB, 0x01, 0x34, 0x03, 0x10, 0x01, 0x65, 0x02, 0xBE, 0x03, 0x87, 0x00, 0xDC, 0x01, + 0x35, 0x03, 0x11, 0x01, 0x66, 0x02, 0xBF, 0x03, 0x88, 0x00, 0xDD, 0x01, 0x36, 0x03, 0x12, 0x01, + 0x67, 0x02, 0xC0, 0x03, 0x89, 0x00, 0xDE, 0x01, 0x37, 0x03, 0x13, 0x01, 0x68, 0x02, 0xC1, 0x03, + 0x8A, 0x00, 0xDF, 0x01, 0x38, 0x03, 0x14, 0x01, 0x69, 0x02, 0xC2, 0x03, 0x8B, 0x00, 0xE0, 0x01, + 0x39, 0x03, 0x15, 0x01, 0x6A, 0x02, 0xC3, 0x03, 0x8C, 0x00, 0xE1, 0x01, 0x3A, 0x03, 0x16, 0x01, + 0x6B, 0x02, 0xC4, 0x03, 0x8D, 0x00, 0xE2, 0x01, 0x3B, 0x03, 0x17, 0x01, 0x6C, 0x02, 0xC5, 0x03, + 0x8E, 0x00, 0xE3, 0x01, 0x3C, 0x03, 0x18, 0x01, 0x6D, 0x02, 0xC6, 0x03, 0x8F, 0x00, 0xE4, 0x01, + 0x3D, 0x03, 0x19, 0x01, 0x6E, 0x02, 0xC7, 0x03, 0x90, 0x00, 0xE5, 0x01, 0x3E, 0x03, 0x1A, 0x01, + 0x6F, 0x02, 0xC8, 0x03, 0x91, 0x00, 0xE6, 0x01, 0x3F, 0x03, 0x1B, 0x01, 0x70, 0x02, 0xC9, 0x03, + 0x92, 0x00, 0xE7, 0x01, 0x40, 0x03, 0x1C, 0x01, 0x71, 0x02, 0xCA, 0x03, 0x93, 0x00, 0xE8, 0x01, + 0x41, 0x03, 0x1D, 0x01, 0x72, 0x02, 0xCB, 0x03, 0x94, 0x00, 0xE9, 0x01, 0x42, 0x03, 0x1E, 0x01, + 0x73, 0x02, 0xCC, 0x03, 0x95, 0x00, 0xEA, 0x01, 0x43, 0x03, 0x1F, 0x01, 0x74, 0x02, 0xCD, 0x03, + 0x96, 0x00, 0xEB, 0x01, 0x44, 0x03, 0x20, 0x01, 0x75, 0x02, 0xCE, 0x03, 0x97, 0x00, 0xEC, 0x01, + 0x45, 0x03, 0x21, 0x01, 0x76, 0x02, 0xCF, 0x03, 0x98, 0x00, 0xED, 0x01, 0x46, 0x03, 0x22, 0x01, + 0x77, 0x02, 0xD0, 0x03, 0x99, 0x00, 0xEE, 0x01, 0x47, 0x03, 0x23, 0x01, 0x78, 0x02, 0xD1, 0x03, + 0x9A, 0x00, 0xEF, 0x01, 0x48, 0x03, 0x24, 0x01, 0x79, 0x02, 0xD2, 0x03, 0x9B, 0x00, 0xF0, 0x01, + 0x49, 0x03, 0x25, 0x01, 0x7A, 0x02, 0xD3, 0x03, 0x9C, 0x00, 0xF1, 0x01, 0x4A, 0x03, 0x26, 0x01, + 0x7B, 0x02, 0xD4, 0x03, 0x9D, 0x00, 0xF2, 0x01, 0x4B, 0x03, 0x27, 0x01, 0x7C, 0x02, 0xD5, 0x03, + 0x9E, 0x00, 0xF3, 0x01, 0x4C, 0x03, 0x28, 0x01, 0x7D, 0x02, 0xD6, 0x03, 0x9F, 0x00, 0xF4, 0x01, + 0x4D, 0x03, 0x29, 0x01, 0x7E, 0x02, 0xD7, 0x03, 0xA0, 0x00, 0xF5, 0x01, 0x4E, 0x03, 0x2A, 0x01, + 0x7F, 0x02, 0xD8, 0x03, 0xA1, 0x00, 0xF6, 0x01, 0x4F, 0x03, 0x2B, 0x01, 0x80, 0x02, 0xD9, 0x03, + 0xA2, 0x00, 0xF7, 0x01, 0x50, 0x03, 0x2C, 0x01, 0x81, 0x02, 0xDA, 0x03, 0xA3, 0x00, 0xF8, 0x01, + 0x51, 0x03, 0x2D, 0x01, 0x82, 0x02, 0xDB, 0x03, 0xA4, 0x00, 0xF9, 0x01, 0x52, 0x03, 0x2E, 0x01, + 0x83, 0x02, 0xDC, 0x03, 0xA5, 0x00, 0xFA, 0x01, 0x53, 0x03, 0x2F, 0x01, 0x84, 0x02, 0xDD, 0x03, + 0xA6, 0x00, 0xFB, 0x01, 0x54, 0x03, 0x30, 0x01, 0x85, 0x02, 0xDE, 0x03, 0xA7, 0x00, 0xFC, 0x01, + 0x55, 0x03, 0x31, 0x01, 0x86, 0x02, 0xDF, 0x03, 0xA8, 0x00, 0xFD, 0x01, 0x56, 0x03, 0x32, 0x01 +]; + + + +const x3mScrambleTableBytes = [ + 0x56, 0x02, 0x8D, 0x02, 0x13, 0x02, 0x07, 0x03, 0x56, 0x01, 0x9D, 0x03, 0x62, 0x00, 0x70, 0x01, + 0xCA, 0x03, 0x35, 0x00, 0xED, 0x00, 0xA4, 0x02, 0xE4, 0x01, 0x59, 0x03, 0xD3, 0x00, 0x6B, 0x02, + 0x65, 0x02, 0x74, 0x02, 0x51, 0x02, 0x97, 0x02, 0x02, 0x02, 0x22, 0x03, 0x26, 0x01, 0x2B, 0x03, + 0x17, 0x01, 0x02, 0x03, 0x5C, 0x01, 0xA8, 0x03, 0x57, 0x00, 0x48, 0x01, 0x80, 0x03, 0x90, 0x00, + 0xF6, 0x01, 0x35, 0x03, 0x0C, 0x01, 0xEE, 0x02, 0x75, 0x01, 0xD4, 0x03, 0x2B, 0x00, 0xCC, 0x00, + 0x60, 0x02, 0x7B, 0x02, 0x3D, 0x02, 0xBB, 0x02, 0xB6, 0x01, 0xA1, 0x03, 0x5E, 0x00, 0x57, 0x01, + 0x9E, 0x03, 0x61, 0x00, 0x6F, 0x01, 0xC6, 0x03, 0x39, 0x00, 0xF7, 0x00, 0xB9, 0x02, 0xB8, 0x01, + 0x9F, 0x03, 0x60, 0x00, 0x66, 0x01, 0xB9, 0x03, 0x46, 0x00, 0x22, 0x01, 0x1C, 0x03, 0x2F, 0x01, + 0x3D, 0x03, 0xFC, 0x00, 0xCA, 0x02, 0xA4, 0x01, 0xCC, 0x03, 0x33, 0x00, 0xE6, 0x00, 0x93, 0x02, + 0x09, 0x02, 0x15, 0x03, 0x3D, 0x01, 0x58, 0x03, 0xD5, 0x00, 0x6E, 0x02, 0x5E, 0x02, 0x7D, 0x02, + 0x3A, 0x02, 0xC0, 0x02, 0xB1, 0x01, 0xAF, 0x03, 0x50, 0x00, 0x36, 0x01, 0x46, 0x03, 0xEF, 0x00, + 0xAA, 0x02, 0xCE, 0x01, 0x76, 0x03, 0xA0, 0x00, 0x10, 0x02, 0x0C, 0x03, 0x4C, 0x01, 0x89, 0x03, + 0x82, 0x00, 0xDB, 0x01, 0x67, 0x03, 0xB9, 0x00, 0x3E, 0x02, 0xBA, 0x02, 0xB7, 0x01, 0xA0, 0x03, + 0x5F, 0x00, 0x64, 0x01, 0xB7, 0x03, 0x48, 0x00, 0x25, 0x01, 0x26, 0x03, 0x1C, 0x01, 0x0A, 0x03, + 0x4F, 0x01, 0x8F, 0x03, 0x70, 0x00, 0xA8, 0x01, 0xC7, 0x03, 0x38, 0x00, 0xF5, 0x00, 0xB5, 0x02, + 0xBD, 0x01, 0x93, 0x03, 0x6C, 0x00, 0x99, 0x01, 0xE1, 0x03, 0x1E, 0x00, 0xB3, 0x00, 0x2F, 0x02, + 0xD7, 0x02, 0x93, 0x01, 0xEA, 0x03, 0x15, 0x00, 0x9D, 0x00, 0x0A, 0x02, 0x14, 0x03, 0x3E, 0x01, + 0x5A, 0x03, 0xD2, 0x00, 0x6A, 0x02, 0x67, 0x02, 0x72, 0x02, 0x53, 0x02, 0x94, 0x02, 0x08, 0x02, + 0x19, 0x03, 0x37, 0x01, 0x4C, 0x03, 0xE7, 0x00, 0x95, 0x02, 0x05, 0x02, 0x1D, 0x03, 0x2E, 0x01, + 0x3C, 0x03, 0xFE, 0x00, 0xCD, 0x02, 0xA0, 0x01, 0xD5, 0x03, 0x2A, 0x00, 0xC8, 0x00, 0x58, 0x02, + 0x86, 0x02, 0x2A, 0x02, 0xDC, 0x02, 0x8E, 0x01, 0xF7, 0x03, 0x08, 0x00, 0x7C, 0x00, 0xD3, 0x01, + 0x70, 0x03, 0xA7, 0x00, 0x1D, 0x02, 0xF1, 0x02, 0x71, 0x01, 0xCD, 0x03, 0x32, 0x00, 0xE5, 0x00, + 0x92, 0x02, 0x0B, 0x02, 0x13, 0x03, 0x3F, 0x01, 0x5C, 0x03, 0xD0, 0x00, 0x66, 0x02, 0x73, 0x02, + 0x52, 0x02, 0x96, 0x02, 0x04, 0x02, 0x1F, 0x03, 0x2A, 0x01, 0x32, 0x03, 0x0F, 0x01, 0xF4, 0x02, + 0x6C, 0x01, 0xC3, 0x03, 0x3C, 0x00, 0x01, 0x01, 0xD2, 0x02, 0x9A, 0x01, 0xE0, 0x03, 0x1F, 0x00, + 0xB5, 0x00, 0x33, 0x02, 0xC9, 0x02, 0xA6, 0x01, 0xC9, 0x03, 0x36, 0x00, 0xF0, 0x00, 0xAB, 0x02, + 0xCB, 0x01, 0x7C, 0x03, 0x95, 0x00, 0xFD, 0x01, 0x28, 0x03, 0x1A, 0x01, 0x06, 0x03, 0x58, 0x01, + 0xA2, 0x03, 0x5D, 0x00, 0x55, 0x01, 0x9C, 0x03, 0x63, 0x00, 0x74, 0x01, 0xD3, 0x03, 0x2C, 0x00, + 0xCF, 0x00, 0x64, 0x02, 0x75, 0x02, 0x4F, 0x02, 0x99, 0x02, 0xFA, 0x01, 0x2C, 0x03, 0x15, 0x01, + 0xFF, 0x02, 0x5F, 0x01, 0xAB, 0x03, 0x54, 0x00, 0x43, 0x01, 0x6C, 0x03, 0xAD, 0x00, 0x25, 0x02, + 0xE5, 0x02, 0x81, 0x01, 0xEF, 0x03, 0x10, 0x00, 0x8C, 0x00, 0xF1, 0x01, 0x44, 0x03, 0xF3, 0x00, + 0xAF, 0x02, 0xC4, 0x01, 0x86, 0x03, 0x88, 0x00, 0xE3, 0x01, 0x5B, 0x03, 0xD1, 0x00, 0x69, 0x02, + 0x68, 0x02, 0x6D, 0x02, 0x5F, 0x02, 0x7C, 0x02, 0x3B, 0x02, 0xBF, 0x02, 0xB2, 0x01, 0xAE, 0x03, + 0x51, 0x00, 0x3B, 0x01, 0x55, 0x03, 0xDA, 0x00, 0x78, 0x02, 0x48, 0x02, 0xA6, 0x02, 0xDC, 0x01, + 0x65, 0x03, 0xC0, 0x00, 0x46, 0x02, 0xA8, 0x02, 0xD6, 0x01, 0x6D, 0x03, 0xAC, 0x00, 0x24, 0x02, + 0xE8, 0x02, 0x7E, 0x01, 0xEB, 0x03, 0x14, 0x00, 0x9C, 0x00, 0x07, 0x02, 0x1A, 0x03, 0x33, 0x01, + 0x41, 0x03, 0xF8, 0x00, 0xBC, 0x02, 0xB5, 0x01, 0xA3, 0x03, 0x5C, 0x00, 0x52, 0x01, 0x95, 0x03, + 0x6A, 0x00, 0x8C, 0x01, 0xF9, 0x03, 0x06, 0x00, 0x7A, 0x00, 0xD1, 0x01, 0x73, 0x03, 0xA4, 0x00, + 0x17, 0x02, 0xFE, 0x02, 0x60, 0x01, 0xAD, 0x03, 0x52, 0x00, 0x3C, 0x01, 0x57, 0x03, 0xD7, 0x00, + 0x70, 0x02, 0x5C, 0x02, 0x81, 0x02, 0x35, 0x02, 0xC6, 0x02, 0xAA, 0x01, 0xBC, 0x03, 0x43, 0x00, + 0x1D, 0x01, 0x0D, 0x03, 0x4A, 0x01, 0x84, 0x03, 0x8A, 0x00, 0xE7, 0x01, 0x53, 0x03, 0xDD, 0x00, + 0x84, 0x02, 0x2E, 0x02, 0xD8, 0x02, 0x92, 0x01, 0xEC, 0x03, 0x13, 0x00, 0x99, 0x00, 0x01, 0x02, + 0x23, 0x03, 0x24, 0x01, 0x21, 0x03, 0x27, 0x01, 0x2D, 0x03, 0x14, 0x01, 0xFD, 0x02, 0x61, 0x01, + 0xB0, 0x03, 0x4F, 0x00, 0x35, 0x01, 0x43, 0x03, 0xF4, 0x00, 0xB4, 0x02, 0xBE, 0x01, 0x92, 0x03, + 0x6D, 0x00, 0x9D, 0x01, 0xDB, 0x03, 0x24, 0x00, 0xBE, 0x00, 0x44, 0x02, 0xB0, 0x02, 0xC2, 0x01, + 0x8A, 0x03, 0x80, 0x00, 0xD9, 0x01, 0x69, 0x03, 0xB6, 0x00, 0x34, 0x02, 0xC8, 0x02, 0xA7, 0x01, + 0xC8, 0x03, 0x37, 0x00, 0xF1, 0x00, 0xAD, 0x02, 0xC6, 0x01, 0x83, 0x03, 0x8D, 0x00, 0xF2, 0x01, + 0x3B, 0x03, 0x00, 0x01, 0xD1, 0x02, 0x9B, 0x01, 0xDE, 0x03, 0x21, 0x00, 0xBB, 0x00, 0x40, 0x02, + 0xB6, 0x02, 0xBB, 0x01, 0x99, 0x03, 0x66, 0x00, 0x7A, 0x01, 0xDF, 0x03, 0x20, 0x00, 0xB8, 0x00, + 0x3C, 0x02, 0xBD, 0x02, 0xB4, 0x01, 0xA5, 0x03, 0x5A, 0x00, 0x50, 0x01, 0x90, 0x03, 0x6F, 0x00, + 0xA5, 0x01, 0xCB, 0x03, 0x34, 0x00, 0xEA, 0x00, 0x9D, 0x02, 0xEE, 0x01, 0x48, 0x03, 0xEC, 0x00, + 0xA3, 0x02, 0xE5, 0x01, 0x56, 0x03, 0xD8, 0x00, 0x71, 0x02, 0x57, 0x02, 0x89, 0x02, 0x20, 0x02, + 0xEC, 0x02, 0x78, 0x01, 0xD9, 0x03, 0x26, 0x00, 0xC2, 0x00, 0x4B, 0x02, 0xA1, 0x02, 0xEA, 0x01, + 0x4D, 0x03, 0xE4, 0x00, 0x91, 0x02, 0x0C, 0x02, 0x12, 0x03, 0x41, 0x01, 0x60, 0x03, 0xCA, 0x00, + 0x5A, 0x02, 0x83, 0x02, 0x30, 0x02, 0xD0, 0x02, 0x9C, 0x01, 0xDD, 0x03, 0x22, 0x00, 0xBC, 0x00, + 0x41, 0x02, 0xB3, 0x02, 0xBF, 0x01, 0x91, 0x03, 0x6E, 0x00, 0xA2, 0x01, 0xD1, 0x03, 0x2E, 0x00, + 0xD6, 0x00, 0x6F, 0x02, 0x5D, 0x02, 0x7F, 0x02, 0x37, 0x02, 0xC4, 0x02, 0xAC, 0x01, 0xBA, 0x03, + 0x45, 0x00, 0x21, 0x01, 0x18, 0x03, 0x38, 0x01, 0x4E, 0x03, 0xE3, 0x00, 0x8F, 0x02, 0x11, 0x02, + 0x0B, 0x03, 0x4D, 0x01, 0x8C, 0x03, 0x73, 0x00, 0xC3, 0x01, 0x87, 0x03, 0x84, 0x00, 0xDF, 0x01, + 0x62, 0x03, 0xC7, 0x00, 0x55, 0x02, 0x8E, 0x02, 0x12, 0x02, 0x09, 0x03, 0x53, 0x01, 0x96, 0x03, + 0x69, 0x00, 0x8B, 0x01, 0xFA, 0x03, 0x05, 0x00, 0x79, 0x00, 0xD0, 0x01, 0x74, 0x03, 0xA2, 0x00, + 0x15, 0x02, 0x01, 0x03, 0x5D, 0x01, 0xA9, 0x03, 0x56, 0x00, 0x47, 0x01, 0x7A, 0x03, 0x98, 0x00, + 0x00, 0x02, 0x24, 0x03, 0x1F, 0x01, 0x16, 0x03, 0x3A, 0x01, 0x52, 0x03, 0xDF, 0x00, 0x88, 0x02, + 0x23, 0x02, 0xE9, 0x02, 0x7D, 0x01, 0xE9, 0x03, 0x16, 0x00, 0x9E, 0x00, 0x0D, 0x02, 0x10, 0x03, + 0x44, 0x01, 0x72, 0x03, 0xA5, 0x00, 0x19, 0x02, 0xFA, 0x02, 0x65, 0x01, 0xB8, 0x03, 0x47, 0x00, + 0x23, 0x01, 0x1E, 0x03, 0x2D, 0x01, 0x38, 0x03, 0x07, 0x01, 0xE0, 0x02, 0x88, 0x01, 0xFE, 0x03, + 0x01, 0x00, 0x75, 0x00, 0xC9, 0x01, 0x7E, 0x03, 0x93, 0x00, 0xF9, 0x01, 0x2F, 0x03, 0x12, 0x01, + 0xF9, 0x02, 0x67, 0x01, 0xBE, 0x03, 0x41, 0x00, 0x0B, 0x01, 0xE7, 0x02, 0x7F, 0x01, 0xED, 0x03, + 0x12, 0x00, 0x97, 0x00, 0xFF, 0x01, 0x25, 0x03, 0x1E, 0x01, 0x11, 0x03, 0x42, 0x01, 0x66, 0x03, + 0xBA, 0x00, 0x3F, 0x02, 0xB8, 0x02, 0xB9, 0x01, 0x9B, 0x03, 0x64, 0x00, 0x76, 0x01, 0xD6, 0x03, + 0x29, 0x00, 0xC5, 0x00, 0x50, 0x02, 0x98, 0x02, 0xFC, 0x01, 0x29, 0x03, 0x19, 0x01, 0x04, 0x03, + 0x5A, 0x01, 0xA6, 0x03, 0x59, 0x00, 0x4E, 0x01, 0x8E, 0x03, 0x71, 0x00, 0xAD, 0x01, 0xB6, 0x03, + 0x49, 0x00, 0x28, 0x01, 0x2E, 0x03, 0x13, 0x01, 0xFC, 0x02, 0x62, 0x01, 0xB2, 0x03, 0x4D, 0x00, + 0x31, 0x01, 0x3F, 0x03, 0xFA, 0x00, 0xC2, 0x02, 0xAF, 0x01, 0xB3, 0x03, 0x4C, 0x00, 0x30, 0x01, + 0x3E, 0x03, 0xFB, 0x00, 0xC7, 0x02, 0xA9, 0x01, 0xBD, 0x03, 0x42, 0x00, 0x16, 0x01, 0x00, 0x03, + 0x5E, 0x01, 0xAA, 0x03, 0x55, 0x00, 0x46, 0x01, 0x78, 0x03, 0x9B, 0x00, 0x06, 0x02, 0x1B, 0x03, + 0x32, 0x01, 0x40, 0x03, 0xF9, 0x00, 0xBE, 0x02, 0xB3, 0x01, 0xAC, 0x03, 0x53, 0x00, 0x40, 0x01, + 0x5D, 0x03, 0xCE, 0x00, 0x62, 0x02, 0x79, 0x02, 0x47, 0x02, 0xA7, 0x02, 0xD7, 0x01, 0x6B, 0x03, + 0xAE, 0x00, 0x26, 0x02, 0xE3, 0x02, 0x85, 0x01, 0xF6, 0x03, 0x09, 0x00, 0x7D, 0x00, 0xD4, 0x01, + 0x6F, 0x03, 0xA8, 0x00, 0x1E, 0x02, 0xF0, 0x02, 0x72, 0x01, 0xCE, 0x03, 0x31, 0x00, 0xDE, 0x00, + 0x87, 0x02, 0x28, 0x02, 0xDF, 0x02, 0x89, 0x01, 0xFD, 0x03, 0x02, 0x00, 0x76, 0x00, 0xCA, 0x01, + 0x7D, 0x03, 0x94, 0x00, 0xFB, 0x01, 0x2A, 0x03, 0x18, 0x01, 0x03, 0x03, 0x5B, 0x01, 0xA7, 0x03, + 0x58, 0x00, 0x4B, 0x01, 0x88, 0x03, 0x83, 0x00, 0xDD, 0x01, 0x64, 0x03, 0xC1, 0x00, 0x4A, 0x02, + 0xA2, 0x02, 0xE9, 0x01, 0x50, 0x03, 0xE1, 0x00, 0x8B, 0x02, 0x1A, 0x02, 0xF8, 0x02, 0x68, 0x01, + 0xBF, 0x03, 0x40, 0x00, 0x0A, 0x01, 0xE6, 0x02, 0x80, 0x01, 0xEE, 0x03, 0x11, 0x00, 0x91, 0x00, + 0xF7, 0x01, 0x34, 0x03, 0x0D, 0x01, 0xEF, 0x02, 0x73, 0x01, 0xCF, 0x03, 0x30, 0x00, 0xDC, 0x00, + 0x80, 0x02, 0x36, 0x02, 0xC5, 0x02, 0xAB, 0x01, 0xBB, 0x03, 0x44, 0x00, 0x20, 0x01, 0x17, 0x03, + 0x39, 0x01, 0x4F, 0x03, 0xE2, 0x00, 0x8C, 0x02, 0x18, 0x02, 0xFB, 0x02, 0x63, 0x01, 0xB4, 0x03, + 0x4B, 0x00, 0x2C, 0x01, 0x37, 0x03, 0x08, 0x01, 0xE2, 0x02, 0x86, 0x01, 0xFC, 0x03, 0x03, 0x00, + 0x77, 0x00, 0xCC, 0x01, 0x7B, 0x03, 0x96, 0x00, 0xFE, 0x01, 0x27, 0x03, 0x1B, 0x01, 0x08, 0x03, + 0x54, 0x01, 0x97, 0x03, 0x68, 0x00, 0x83, 0x01, 0xF3, 0x03, 0x0C, 0x00, 0x85, 0x00, 0xE0, 0x01, + 0x61, 0x03, 0xC9, 0x00, 0x59, 0x02, 0x85, 0x02, 0x2C, 0x02, 0xDA, 0x02, 0x90, 0x01, 0xF2, 0x03, + 0x0D, 0x00, 0x86, 0x00, 0xE1, 0x01, 0x5F, 0x03, 0xCB, 0x00, 0x5B, 0x02, 0x82, 0x02, 0x32, 0x02, + 0xCC, 0x02, 0xA1, 0x01, 0xD2, 0x03, 0x2D, 0x00, 0xD4, 0x00, 0x6C, 0x02, 0x63, 0x02, 0x77, 0x02, + 0x49, 0x02, 0xA5, 0x02, 0xDE, 0x01, 0x63, 0x03, 0xC6, 0x00, 0x54, 0x02, 0x90, 0x02, 0x0E, 0x02, + 0x0F, 0x03, 0x45, 0x01, 0x77, 0x03, 0x9F, 0x00, 0x0F, 0x02, 0x0E, 0x03, 0x49, 0x01, 0x82, 0x03, + 0x8E, 0x00, 0xF3, 0x01, 0x3A, 0x03, 0x02, 0x01, 0xD3, 0x02, 0x98, 0x01, 0xE2, 0x03, 0x1D, 0x00, + 0xB2, 0x00, 0x2D, 0x02, 0xD9, 0x02, 0x91, 0x01, 0xF1, 0x03, 0x0E, 0x00, 0x87, 0x00, 0xE2, 0x01, + 0x5E, 0x03, 0xCD, 0x00, 0x61, 0x02, 0x7A, 0x02, 0x43, 0x02, 0xB1, 0x02, 0xC1, 0x01, 0x8B, 0x03, + 0x7F, 0x00, 0xD8, 0x01, 0x6A, 0x03, 0xB4, 0x00, 0x31, 0x02, 0xCF, 0x02, 0x9E, 0x01, 0xDA, 0x03, + 0x25, 0x00, 0xBF, 0x00, 0x45, 0x02, 0xAC, 0x02, 0xC7, 0x01, 0x81, 0x03, 0x8F, 0x00, 0xF5, 0x01, + 0x36, 0x03, 0x09, 0x01, 0xE4, 0x02, 0x84, 0x01, 0xF4, 0x03, 0x0B, 0x00, 0x81, 0x00, 0xDA, 0x01, + 0x68, 0x03, 0xB7, 0x00, 0x39, 0x02, 0xC1, 0x02, 0xB0, 0x01, 0xB1, 0x03, 0x4E, 0x00, 0x34, 0x01, + 0x42, 0x03, 0xF6, 0x00, 0xB7, 0x02, 0xBA, 0x01, 0x9A, 0x03, 0x65, 0x00, 0x79, 0x01, 0xDC, 0x03, + 0x23, 0x00, 0xBD, 0x00, 0x42, 0x02, 0xB2, 0x02, 0xC0, 0x01, 0x8D, 0x03, 0x72, 0x00, 0xBC, 0x01, + 0x98, 0x03, 0x67, 0x00, 0x82, 0x01, 0xF0, 0x03, 0x0F, 0x00, 0x8B, 0x00, 0xE8, 0x01, 0x51, 0x03, + 0xE0, 0x00, 0x8A, 0x02, 0x1C, 0x02, 0xF3, 0x02, 0x6D, 0x01, 0xC4, 0x03, 0x3B, 0x00, 0xFF, 0x00, + 0xCE, 0x02, 0x9F, 0x01, 0xD7, 0x03, 0x28, 0x00, 0xC4, 0x00, 0x4E, 0x02, 0x9B, 0x02, 0xF0, 0x01, + 0x45, 0x03, 0xF2, 0x00, 0xAE, 0x02, 0xC5, 0x01, 0x85, 0x03, 0x89, 0x00, 0xE6, 0x01, 0x54, 0x03, + 0xDB, 0x00, 0x7E, 0x02, 0x38, 0x02, 0xC3, 0x02, 0xAE, 0x01, 0xB5, 0x03, 0x4A, 0x00, 0x2B, 0x01, + 0x33, 0x03, 0x0E, 0x01, 0xF2, 0x02, 0x6E, 0x01, 0xC5, 0x03, 0x3A, 0x00, 0xFD, 0x00, 0xCB, 0x02, + 0xA3, 0x01, 0xD0, 0x03, 0x2F, 0x00, 0xD9, 0x00, 0x76, 0x02, 0x4C, 0x02, 0x9F, 0x02, 0xEC, 0x01, + 0x4A, 0x03, 0xE9, 0x00, 0x9C, 0x02, 0xEF, 0x01, 0x47, 0x03, 0xEE, 0x00, 0xA9, 0x02, 0xCF, 0x01, + 0x75, 0x03, 0xA1, 0x00, 0x14, 0x02, 0x05, 0x03, 0x59, 0x01, 0xA4, 0x03, 0x5B, 0x00, 0x51, 0x01, + 0x94, 0x03, 0x6B, 0x00, 0x96, 0x01, 0xE6, 0x03, 0x19, 0x00, 0xAB, 0x00, 0x22, 0x02, 0xEA, 0x02, + 0x7C, 0x01, 0xE5, 0x03, 0x1A, 0x00, 0xAF, 0x00, 0x27, 0x02, 0xE1, 0x02, 0x87, 0x01, 0xFF, 0x03, + 0x00, 0x00, 0x74, 0x00, 0xC8, 0x01, 0x7F, 0x03, 0x92, 0x00, 0xF8, 0x01, 0x31, 0x03, 0x10, 0x01, + 0xF6, 0x02, 0x6A, 0x01, 0xC1, 0x03, 0x3E, 0x00, 0x04, 0x01, 0xD5, 0x02, 0x95, 0x01, 0xE7, 0x03, + 0x18, 0x00, 0xAA, 0x00, 0x21, 0x02, 0xEB, 0x02, 0x7B, 0x01, 0xE4, 0x03, 0x1B, 0x00, 0xB0, 0x00, + 0x29, 0x02, 0xDD, 0x02, 0x8D, 0x01, 0xF8, 0x03, 0x07, 0x00, 0x7B, 0x00, 0xD2, 0x01, 0x71, 0x03, + 0xA6, 0x00, 0x1B, 0x02, 0xF5, 0x02, 0x6B, 0x01, 0xC2, 0x03, 0x3D, 0x00, 0x03, 0x01, 0xD4, 0x02, + 0x97, 0x01, 0xE3, 0x03, 0x1C, 0x00, 0xB1, 0x00, 0x2B, 0x02, 0xDB, 0x02, 0x8F, 0x01, 0xF5, 0x03, + 0x0A, 0x00, 0x7E, 0x00, 0xD5, 0x01, 0x6E, 0x03, 0xA9, 0x00, 0x1F, 0x02, 0xED, 0x02, 0x77, 0x01, + 0xD8, 0x03, 0x27, 0x00, 0xC3, 0x00, 0x4D, 0x02, 0x9E, 0x02, 0xED, 0x01, 0x49, 0x03, 0xEB, 0x00, + 0xA0, 0x02, 0xEB, 0x01, 0x4B, 0x03, 0xE8, 0x00, 0x9A, 0x02, 0xF4, 0x01, 0x39, 0x03, 0x06, 0x01, + 0xDE, 0x02, 0x8A, 0x01, 0xFB, 0x03, 0x04, 0x00, 0x78, 0x00, 0xCD, 0x01, 0x79, 0x03, 0x9A, 0x00, + 0x03, 0x02, 0x20, 0x03, 0x29, 0x01, 0x30, 0x03, 0x11, 0x01, 0xF7, 0x02, 0x69, 0x01, 0xC0, 0x03, + 0x3F, 0x00, 0x05, 0x01, 0xD6, 0x02, 0x94, 0x01, 0xE8, 0x03, 0x17, 0x00, 0xA3, 0x00, 0x16, 0x02 +]; \ No newline at end of file From 1fdab13ff8821dec1dace6d06bd83458b74999ad Mon Sep 17 00:00:00 2001 From: Yuki1536 <69851694+Yuki1536@users.noreply.github.com> Date: Sun, 11 Dec 2022 17:54:07 +0900 Subject: [PATCH 2/9] Add x2m x3m decryptor --- src/decrypt/ximalaya.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/decrypt/ximalaya.ts b/src/decrypt/ximalaya.ts index 55664a7..918dc9d 100644 --- a/src/decrypt/ximalaya.ts +++ b/src/decrypt/ximalaya.ts @@ -32,7 +32,7 @@ export async function Decrypt(file: File, raw_filename: string, raw_ext: string) } } - const info = GetMetaFromFile(musicMeta.common.artist, musicMeta.common.title, raw_filename); + const info = GetMetaFromFile(raw_filename, musicMeta.common.title, musicMeta.common.artist); return { picture: "", @@ -48,7 +48,6 @@ export async function Decrypt(file: File, raw_filename: string, raw_ext: string) function ProcessX2M(data: Uint8Array) { const x2mHeaderSize = 1024; - // x2m Key in test format: ['x', 'm', 'l', 'y']; const x2mKey = new Uint8Array([0x78, 0x6D, 0x6C, 0x79]); let x2mScrambleTable = new Uint16Array(x2mHeaderSize); if (x2mScrambleTableBytes.length != 2 * x2mHeaderSize) From 105023def736705f90e2e85900bc0a1ef66a76e2 Mon Sep 17 00:00:00 2001 From: Yuki1536 <69851694+Yuki1536@users.noreply.github.com> Date: Sun, 11 Dec 2022 18:22:47 +0900 Subject: [PATCH 3/9] Remove iconv-lite calling --- src/decrypt/ximalaya.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/decrypt/ximalaya.ts b/src/decrypt/ximalaya.ts index 918dc9d..5789f01 100644 --- a/src/decrypt/ximalaya.ts +++ b/src/decrypt/ximalaya.ts @@ -1,6 +1,5 @@ import { parseBlob as metaParseBlob } from 'music-metadata-browser'; import { AudioMimeType, SniffAudioExt, GetArrayBuffer, GetMetaFromFile } from "./utils"; -import { decode } from 'iconv-lite'; import { DecryptResult } from '@/decrypt/entity'; interface Handler { @@ -24,13 +23,6 @@ export async function Decrypt(file: File, raw_filename: string, raw_ext: string) let musicBlob = new Blob([musicDecoded], { type: mime }); const musicMeta = await metaParseBlob(musicBlob); - for (let metaIdx in musicMeta.native) { - if (musicMeta.native[metaIdx].some(item => item.id === "TCON" && item.value === "(12)")) { - musicMeta.common.artist = decode(musicMeta.common.artist, "gbk"); - musicMeta.common.title = decode(musicMeta.common.title, "gbk"); - musicMeta.common.album = decode(musicMeta.common.album, "gbk"); - } - } const info = GetMetaFromFile(raw_filename, musicMeta.common.title, musicMeta.common.artist); From 2ae08c53fdd328022653c9127901e5e924c18af0 Mon Sep 17 00:00:00 2001 From: Yuki1536 <69851694+Yuki1536@users.noreply.github.com> Date: Mon, 12 Dec 2022 19:19:06 +0900 Subject: [PATCH 4/9] Store table u16array instead of bytes --- src/decrypt/ximalaya.ts | 284 +--------------------------------------- 1 file changed, 4 insertions(+), 280 deletions(-) diff --git a/src/decrypt/ximalaya.ts b/src/decrypt/ximalaya.ts index 5789f01..0f3e42c 100644 --- a/src/decrypt/ximalaya.ts +++ b/src/decrypt/ximalaya.ts @@ -40,12 +40,7 @@ export async function Decrypt(file: File, raw_filename: string, raw_ext: string) function ProcessX2M(data: Uint8Array) { const x2mHeaderSize = 1024; - const x2mKey = new Uint8Array([0x78, 0x6D, 0x6C, 0x79]); - let x2mScrambleTable = new Uint16Array(x2mHeaderSize); - if (x2mScrambleTableBytes.length != 2 * x2mHeaderSize) - throw "invalid x2m scramble table"; - for (let i = 0; i < x2mHeaderSize; i++) - x2mScrambleTable[i] = x2mScrambleTableBytes[i * 2] | (x2mScrambleTableBytes[i * 2 + 1] << 8); + const x2mKey = [120, 109, 108, 121]; let encryptedHeader = data.slice(0, x2mHeaderSize); for (let idx = 0; idx < x2mHeaderSize; idx++) { let srcIdx = x2mScrambleTable[idx]; @@ -56,17 +51,7 @@ function ProcessX2M(data: Uint8Array) { function ProcessX3M(data: Uint8Array) { const x3mHeaderSize = 1024; - const x3mKey = new Uint8Array([ - 0x33, 0x39, 0x38, 0x39, 0x64, 0x31, 0x31, 0x31, - 0x61, 0x61, 0x64, 0x35, 0x36, 0x31, 0x33, 0x39, - 0x34, 0x30, 0x66, 0x34, 0x66, 0x63, 0x34, 0x34, - 0x62, 0x36, 0x33, 0x39, 0x62, 0x32, 0x39, 0x32 - ]); - let x3mScrambleTable = new Uint16Array(x3mHeaderSize); - if (x3mScrambleTableBytes.length != 2 * x3mHeaderSize) - throw "invalid x3m scramble table"; - for (let i = 0; i < x3mHeaderSize; i++) - x3mScrambleTable[i] = x3mScrambleTableBytes[i * 2] | (x3mScrambleTableBytes[i * 2 + 1] << 8); + const x3mKey = [51, 57, 56, 57, 100, 49, 49, 49, 97, 97, 100, 53, 54, 49, 51, 57, 52, 48, 102, 52, 102, 99, 52, 52, 98, 54, 51, 57, 98, 50, 57, 50]; let encryptedHeader = data.slice(0, x3mHeaderSize); for (let dstIdx = 0; dstIdx < x3mHeaderSize; dstIdx++) { let srcIdx = x3mScrambleTable[dstIdx]; @@ -75,266 +60,5 @@ function ProcessX3M(data: Uint8Array) { return data; } -const x2mScrambleTableBytes = [ - 0xA9, 0x02, 0xAB, 0x02, 0x54, 0x01, 0xAA, 0x02, 0xA8, 0x02, 0xAC, 0x02, 0x53, 0x01, 0xA7, 0x02, - 0xAD, 0x02, 0x52, 0x01, 0xA6, 0x02, 0xFF, 0x03, 0x00, 0x00, 0x55, 0x01, 0xAE, 0x02, 0x51, 0x01, - 0xA5, 0x02, 0xFE, 0x03, 0x01, 0x00, 0x56, 0x01, 0xAF, 0x02, 0x50, 0x01, 0xA4, 0x02, 0xFD, 0x03, - 0x02, 0x00, 0x57, 0x01, 0xB0, 0x02, 0x4F, 0x01, 0xA3, 0x02, 0xFC, 0x03, 0x03, 0x00, 0x58, 0x01, - 0xB1, 0x02, 0x4E, 0x01, 0xA2, 0x02, 0xFB, 0x03, 0x04, 0x00, 0x59, 0x01, 0xB2, 0x02, 0x4D, 0x01, - 0xA1, 0x02, 0xFA, 0x03, 0x05, 0x00, 0x5A, 0x01, 0xB3, 0x02, 0x4C, 0x01, 0xA0, 0x02, 0xF9, 0x03, - 0x06, 0x00, 0x5B, 0x01, 0xB4, 0x02, 0x4B, 0x01, 0x9F, 0x02, 0xF8, 0x03, 0x07, 0x00, 0x5C, 0x01, - 0xB5, 0x02, 0x4A, 0x01, 0x9E, 0x02, 0xF7, 0x03, 0x08, 0x00, 0x5D, 0x01, 0xB6, 0x02, 0x49, 0x01, - 0x9D, 0x02, 0xF6, 0x03, 0x09, 0x00, 0x5E, 0x01, 0xB7, 0x02, 0x48, 0x01, 0x9C, 0x02, 0xF5, 0x03, - 0x0A, 0x00, 0x5F, 0x01, 0xB8, 0x02, 0x47, 0x01, 0x9B, 0x02, 0xF4, 0x03, 0x0B, 0x00, 0x60, 0x01, - 0xB9, 0x02, 0x46, 0x01, 0x9A, 0x02, 0xF3, 0x03, 0x0C, 0x00, 0x61, 0x01, 0xBA, 0x02, 0x45, 0x01, - 0x99, 0x02, 0xF2, 0x03, 0x0D, 0x00, 0x62, 0x01, 0xBB, 0x02, 0x44, 0x01, 0x98, 0x02, 0xF1, 0x03, - 0x0E, 0x00, 0x63, 0x01, 0xBC, 0x02, 0x43, 0x01, 0x97, 0x02, 0xF0, 0x03, 0x0F, 0x00, 0x64, 0x01, - 0xBD, 0x02, 0x42, 0x01, 0x96, 0x02, 0xEF, 0x03, 0x10, 0x00, 0x65, 0x01, 0xBE, 0x02, 0x41, 0x01, - 0x95, 0x02, 0xEE, 0x03, 0x11, 0x00, 0x66, 0x01, 0xBF, 0x02, 0x40, 0x01, 0x94, 0x02, 0xED, 0x03, - 0x12, 0x00, 0x67, 0x01, 0xC0, 0x02, 0x3F, 0x01, 0x93, 0x02, 0xEC, 0x03, 0x13, 0x00, 0x68, 0x01, - 0xC1, 0x02, 0x3E, 0x01, 0x92, 0x02, 0xEB, 0x03, 0x14, 0x00, 0x69, 0x01, 0xC2, 0x02, 0x3D, 0x01, - 0x91, 0x02, 0xEA, 0x03, 0x15, 0x00, 0x6A, 0x01, 0xC3, 0x02, 0x3C, 0x01, 0x90, 0x02, 0xE9, 0x03, - 0x16, 0x00, 0x6B, 0x01, 0xC4, 0x02, 0x3B, 0x01, 0x8F, 0x02, 0xE8, 0x03, 0x17, 0x00, 0x6C, 0x01, - 0xC5, 0x02, 0x3A, 0x01, 0x8E, 0x02, 0xE7, 0x03, 0x18, 0x00, 0x6D, 0x01, 0xC6, 0x02, 0x39, 0x01, - 0x8D, 0x02, 0xE6, 0x03, 0x19, 0x00, 0x6E, 0x01, 0xC7, 0x02, 0x38, 0x01, 0x8C, 0x02, 0xE5, 0x03, - 0x1A, 0x00, 0x6F, 0x01, 0xC8, 0x02, 0x37, 0x01, 0x8B, 0x02, 0xE4, 0x03, 0x1B, 0x00, 0x70, 0x01, - 0xC9, 0x02, 0x36, 0x01, 0x8A, 0x02, 0xE3, 0x03, 0x1C, 0x00, 0x71, 0x01, 0xCA, 0x02, 0x35, 0x01, - 0x89, 0x02, 0xE2, 0x03, 0x1D, 0x00, 0x72, 0x01, 0xCB, 0x02, 0x34, 0x01, 0x88, 0x02, 0xE1, 0x03, - 0x1E, 0x00, 0x73, 0x01, 0xCC, 0x02, 0x33, 0x01, 0x87, 0x02, 0xE0, 0x03, 0x1F, 0x00, 0x74, 0x01, - 0xCD, 0x02, 0xA9, 0x00, 0xFE, 0x01, 0x57, 0x03, 0x20, 0x00, 0x75, 0x01, 0xCE, 0x02, 0xAA, 0x00, - 0xFF, 0x01, 0x58, 0x03, 0x21, 0x00, 0x76, 0x01, 0xCF, 0x02, 0xAB, 0x00, 0x00, 0x02, 0x59, 0x03, - 0x22, 0x00, 0x77, 0x01, 0xD0, 0x02, 0xAC, 0x00, 0x01, 0x02, 0x5A, 0x03, 0x23, 0x00, 0x78, 0x01, - 0xD1, 0x02, 0xAD, 0x00, 0x02, 0x02, 0x5B, 0x03, 0x24, 0x00, 0x79, 0x01, 0xD2, 0x02, 0xAE, 0x00, - 0x03, 0x02, 0x5C, 0x03, 0x25, 0x00, 0x7A, 0x01, 0xD3, 0x02, 0xAF, 0x00, 0x04, 0x02, 0x5D, 0x03, - 0x26, 0x00, 0x7B, 0x01, 0xD4, 0x02, 0xB0, 0x00, 0x05, 0x02, 0x5E, 0x03, 0x27, 0x00, 0x7C, 0x01, - 0xD5, 0x02, 0xB1, 0x00, 0x06, 0x02, 0x5F, 0x03, 0x28, 0x00, 0x7D, 0x01, 0xD6, 0x02, 0xB2, 0x00, - 0x07, 0x02, 0x60, 0x03, 0x29, 0x00, 0x7E, 0x01, 0xD7, 0x02, 0xB3, 0x00, 0x08, 0x02, 0x61, 0x03, - 0x2A, 0x00, 0x7F, 0x01, 0xD8, 0x02, 0xB4, 0x00, 0x09, 0x02, 0x62, 0x03, 0x2B, 0x00, 0x80, 0x01, - 0xD9, 0x02, 0xB5, 0x00, 0x0A, 0x02, 0x63, 0x03, 0x2C, 0x00, 0x81, 0x01, 0xDA, 0x02, 0xB6, 0x00, - 0x0B, 0x02, 0x64, 0x03, 0x2D, 0x00, 0x82, 0x01, 0xDB, 0x02, 0xB7, 0x00, 0x0C, 0x02, 0x65, 0x03, - 0x2E, 0x00, 0x83, 0x01, 0xDC, 0x02, 0xB8, 0x00, 0x0D, 0x02, 0x66, 0x03, 0x2F, 0x00, 0x84, 0x01, - 0xDD, 0x02, 0xB9, 0x00, 0x0E, 0x02, 0x67, 0x03, 0x30, 0x00, 0x85, 0x01, 0xDE, 0x02, 0xBA, 0x00, - 0x0F, 0x02, 0x68, 0x03, 0x31, 0x00, 0x86, 0x01, 0xDF, 0x02, 0xBB, 0x00, 0x10, 0x02, 0x69, 0x03, - 0x32, 0x00, 0x87, 0x01, 0xE0, 0x02, 0xBC, 0x00, 0x11, 0x02, 0x6A, 0x03, 0x33, 0x00, 0x88, 0x01, - 0xE1, 0x02, 0xBD, 0x00, 0x12, 0x02, 0x6B, 0x03, 0x34, 0x00, 0x89, 0x01, 0xE2, 0x02, 0xBE, 0x00, - 0x13, 0x02, 0x6C, 0x03, 0x35, 0x00, 0x8A, 0x01, 0xE3, 0x02, 0xBF, 0x00, 0x14, 0x02, 0x6D, 0x03, - 0x36, 0x00, 0x8B, 0x01, 0xE4, 0x02, 0xC0, 0x00, 0x15, 0x02, 0x6E, 0x03, 0x37, 0x00, 0x8C, 0x01, - 0xE5, 0x02, 0xC1, 0x00, 0x16, 0x02, 0x6F, 0x03, 0x38, 0x00, 0x8D, 0x01, 0xE6, 0x02, 0xC2, 0x00, - 0x17, 0x02, 0x70, 0x03, 0x39, 0x00, 0x8E, 0x01, 0xE7, 0x02, 0xC3, 0x00, 0x18, 0x02, 0x71, 0x03, - 0x3A, 0x00, 0x8F, 0x01, 0xE8, 0x02, 0xC4, 0x00, 0x19, 0x02, 0x72, 0x03, 0x3B, 0x00, 0x90, 0x01, - 0xE9, 0x02, 0xC5, 0x00, 0x1A, 0x02, 0x73, 0x03, 0x3C, 0x00, 0x91, 0x01, 0xEA, 0x02, 0xC6, 0x00, - 0x1B, 0x02, 0x74, 0x03, 0x3D, 0x00, 0x92, 0x01, 0xEB, 0x02, 0xC7, 0x00, 0x1C, 0x02, 0x75, 0x03, - 0x3E, 0x00, 0x93, 0x01, 0xEC, 0x02, 0xC8, 0x00, 0x1D, 0x02, 0x76, 0x03, 0x3F, 0x00, 0x94, 0x01, - 0xED, 0x02, 0xC9, 0x00, 0x1E, 0x02, 0x77, 0x03, 0x40, 0x00, 0x95, 0x01, 0xEE, 0x02, 0xCA, 0x00, - 0x1F, 0x02, 0x78, 0x03, 0x41, 0x00, 0x96, 0x01, 0xEF, 0x02, 0xCB, 0x00, 0x20, 0x02, 0x79, 0x03, - 0x42, 0x00, 0x97, 0x01, 0xF0, 0x02, 0xCC, 0x00, 0x21, 0x02, 0x7A, 0x03, 0x43, 0x00, 0x98, 0x01, - 0xF1, 0x02, 0xCD, 0x00, 0x22, 0x02, 0x7B, 0x03, 0x44, 0x00, 0x99, 0x01, 0xF2, 0x02, 0xCE, 0x00, - 0x23, 0x02, 0x7C, 0x03, 0x45, 0x00, 0x9A, 0x01, 0xF3, 0x02, 0xCF, 0x00, 0x24, 0x02, 0x7D, 0x03, - 0x46, 0x00, 0x9B, 0x01, 0xF4, 0x02, 0xD0, 0x00, 0x25, 0x02, 0x7E, 0x03, 0x47, 0x00, 0x9C, 0x01, - 0xF5, 0x02, 0xD1, 0x00, 0x26, 0x02, 0x7F, 0x03, 0x48, 0x00, 0x9D, 0x01, 0xF6, 0x02, 0xD2, 0x00, - 0x27, 0x02, 0x80, 0x03, 0x49, 0x00, 0x9E, 0x01, 0xF7, 0x02, 0xD3, 0x00, 0x28, 0x02, 0x81, 0x03, - 0x4A, 0x00, 0x9F, 0x01, 0xF8, 0x02, 0xD4, 0x00, 0x29, 0x02, 0x82, 0x03, 0x4B, 0x00, 0xA0, 0x01, - 0xF9, 0x02, 0xD5, 0x00, 0x2A, 0x02, 0x83, 0x03, 0x4C, 0x00, 0xA1, 0x01, 0xFA, 0x02, 0xD6, 0x00, - 0x2B, 0x02, 0x84, 0x03, 0x4D, 0x00, 0xA2, 0x01, 0xFB, 0x02, 0xD7, 0x00, 0x2C, 0x02, 0x85, 0x03, - 0x4E, 0x00, 0xA3, 0x01, 0xFC, 0x02, 0xD8, 0x00, 0x2D, 0x02, 0x86, 0x03, 0x4F, 0x00, 0xA4, 0x01, - 0xFD, 0x02, 0xD9, 0x00, 0x2E, 0x02, 0x87, 0x03, 0x50, 0x00, 0xA5, 0x01, 0xFE, 0x02, 0xDA, 0x00, - 0x2F, 0x02, 0x88, 0x03, 0x51, 0x00, 0xA6, 0x01, 0xFF, 0x02, 0xDB, 0x00, 0x30, 0x02, 0x89, 0x03, - 0x52, 0x00, 0xA7, 0x01, 0x00, 0x03, 0xDC, 0x00, 0x31, 0x02, 0x8A, 0x03, 0x53, 0x00, 0xA8, 0x01, - 0x01, 0x03, 0xDD, 0x00, 0x32, 0x02, 0x8B, 0x03, 0x54, 0x00, 0xA9, 0x01, 0x02, 0x03, 0xDE, 0x00, - 0x33, 0x02, 0x8C, 0x03, 0x55, 0x00, 0xAA, 0x01, 0x03, 0x03, 0xDF, 0x00, 0x34, 0x02, 0x8D, 0x03, - 0x56, 0x00, 0xAB, 0x01, 0x04, 0x03, 0xE0, 0x00, 0x35, 0x02, 0x8E, 0x03, 0x57, 0x00, 0xAC, 0x01, - 0x05, 0x03, 0xE1, 0x00, 0x36, 0x02, 0x8F, 0x03, 0x58, 0x00, 0xAD, 0x01, 0x06, 0x03, 0xE2, 0x00, - 0x37, 0x02, 0x90, 0x03, 0x59, 0x00, 0xAE, 0x01, 0x07, 0x03, 0xE3, 0x00, 0x38, 0x02, 0x91, 0x03, - 0x5A, 0x00, 0xAF, 0x01, 0x08, 0x03, 0xE4, 0x00, 0x39, 0x02, 0x92, 0x03, 0x5B, 0x00, 0xB0, 0x01, - 0x09, 0x03, 0xE5, 0x00, 0x3A, 0x02, 0x93, 0x03, 0x5C, 0x00, 0xB1, 0x01, 0x0A, 0x03, 0xE6, 0x00, - 0x3B, 0x02, 0x94, 0x03, 0x5D, 0x00, 0xB2, 0x01, 0x0B, 0x03, 0xE7, 0x00, 0x3C, 0x02, 0x95, 0x03, - 0x5E, 0x00, 0xB3, 0x01, 0x0C, 0x03, 0xE8, 0x00, 0x3D, 0x02, 0x96, 0x03, 0x5F, 0x00, 0xB4, 0x01, - 0x0D, 0x03, 0xE9, 0x00, 0x3E, 0x02, 0x97, 0x03, 0x60, 0x00, 0xB5, 0x01, 0x0E, 0x03, 0xEA, 0x00, - 0x3F, 0x02, 0x98, 0x03, 0x61, 0x00, 0xB6, 0x01, 0x0F, 0x03, 0xEB, 0x00, 0x40, 0x02, 0x99, 0x03, - 0x62, 0x00, 0xB7, 0x01, 0x10, 0x03, 0xEC, 0x00, 0x41, 0x02, 0x9A, 0x03, 0x63, 0x00, 0xB8, 0x01, - 0x11, 0x03, 0xED, 0x00, 0x42, 0x02, 0x9B, 0x03, 0x64, 0x00, 0xB9, 0x01, 0x12, 0x03, 0xEE, 0x00, - 0x43, 0x02, 0x9C, 0x03, 0x65, 0x00, 0xBA, 0x01, 0x13, 0x03, 0xEF, 0x00, 0x44, 0x02, 0x9D, 0x03, - 0x66, 0x00, 0xBB, 0x01, 0x14, 0x03, 0xF0, 0x00, 0x45, 0x02, 0x9E, 0x03, 0x67, 0x00, 0xBC, 0x01, - 0x15, 0x03, 0xF1, 0x00, 0x46, 0x02, 0x9F, 0x03, 0x68, 0x00, 0xBD, 0x01, 0x16, 0x03, 0xF2, 0x00, - 0x47, 0x02, 0xA0, 0x03, 0x69, 0x00, 0xBE, 0x01, 0x17, 0x03, 0xF3, 0x00, 0x48, 0x02, 0xA1, 0x03, - 0x6A, 0x00, 0xBF, 0x01, 0x18, 0x03, 0xF4, 0x00, 0x49, 0x02, 0xA2, 0x03, 0x6B, 0x00, 0xC0, 0x01, - 0x19, 0x03, 0xF5, 0x00, 0x4A, 0x02, 0xA3, 0x03, 0x6C, 0x00, 0xC1, 0x01, 0x1A, 0x03, 0xF6, 0x00, - 0x4B, 0x02, 0xA4, 0x03, 0x6D, 0x00, 0xC2, 0x01, 0x1B, 0x03, 0xF7, 0x00, 0x4C, 0x02, 0xA5, 0x03, - 0x6E, 0x00, 0xC3, 0x01, 0x1C, 0x03, 0xF8, 0x00, 0x4D, 0x02, 0xA6, 0x03, 0x6F, 0x00, 0xC4, 0x01, - 0x1D, 0x03, 0xF9, 0x00, 0x4E, 0x02, 0xA7, 0x03, 0x70, 0x00, 0xC5, 0x01, 0x1E, 0x03, 0xFA, 0x00, - 0x4F, 0x02, 0xA8, 0x03, 0x71, 0x00, 0xC6, 0x01, 0x1F, 0x03, 0xFB, 0x00, 0x50, 0x02, 0xA9, 0x03, - 0x72, 0x00, 0xC7, 0x01, 0x20, 0x03, 0xFC, 0x00, 0x51, 0x02, 0xAA, 0x03, 0x73, 0x00, 0xC8, 0x01, - 0x21, 0x03, 0xFD, 0x00, 0x52, 0x02, 0xAB, 0x03, 0x74, 0x00, 0xC9, 0x01, 0x22, 0x03, 0xFE, 0x00, - 0x53, 0x02, 0xAC, 0x03, 0x75, 0x00, 0xCA, 0x01, 0x23, 0x03, 0xFF, 0x00, 0x54, 0x02, 0xAD, 0x03, - 0x76, 0x00, 0xCB, 0x01, 0x24, 0x03, 0x00, 0x01, 0x55, 0x02, 0xAE, 0x03, 0x77, 0x00, 0xCC, 0x01, - 0x25, 0x03, 0x01, 0x01, 0x56, 0x02, 0xAF, 0x03, 0x78, 0x00, 0xCD, 0x01, 0x26, 0x03, 0x02, 0x01, - 0x57, 0x02, 0xB0, 0x03, 0x79, 0x00, 0xCE, 0x01, 0x27, 0x03, 0x03, 0x01, 0x58, 0x02, 0xB1, 0x03, - 0x7A, 0x00, 0xCF, 0x01, 0x28, 0x03, 0x04, 0x01, 0x59, 0x02, 0xB2, 0x03, 0x7B, 0x00, 0xD0, 0x01, - 0x29, 0x03, 0x05, 0x01, 0x5A, 0x02, 0xB3, 0x03, 0x7C, 0x00, 0xD1, 0x01, 0x2A, 0x03, 0x06, 0x01, - 0x5B, 0x02, 0xB4, 0x03, 0x7D, 0x00, 0xD2, 0x01, 0x2B, 0x03, 0x07, 0x01, 0x5C, 0x02, 0xB5, 0x03, - 0x7E, 0x00, 0xD3, 0x01, 0x2C, 0x03, 0x08, 0x01, 0x5D, 0x02, 0xB6, 0x03, 0x7F, 0x00, 0xD4, 0x01, - 0x2D, 0x03, 0x09, 0x01, 0x5E, 0x02, 0xB7, 0x03, 0x80, 0x00, 0xD5, 0x01, 0x2E, 0x03, 0x0A, 0x01, - 0x5F, 0x02, 0xB8, 0x03, 0x81, 0x00, 0xD6, 0x01, 0x2F, 0x03, 0x0B, 0x01, 0x60, 0x02, 0xB9, 0x03, - 0x82, 0x00, 0xD7, 0x01, 0x30, 0x03, 0x0C, 0x01, 0x61, 0x02, 0xBA, 0x03, 0x83, 0x00, 0xD8, 0x01, - 0x31, 0x03, 0x0D, 0x01, 0x62, 0x02, 0xBB, 0x03, 0x84, 0x00, 0xD9, 0x01, 0x32, 0x03, 0x0E, 0x01, - 0x63, 0x02, 0xBC, 0x03, 0x85, 0x00, 0xDA, 0x01, 0x33, 0x03, 0x0F, 0x01, 0x64, 0x02, 0xBD, 0x03, - 0x86, 0x00, 0xDB, 0x01, 0x34, 0x03, 0x10, 0x01, 0x65, 0x02, 0xBE, 0x03, 0x87, 0x00, 0xDC, 0x01, - 0x35, 0x03, 0x11, 0x01, 0x66, 0x02, 0xBF, 0x03, 0x88, 0x00, 0xDD, 0x01, 0x36, 0x03, 0x12, 0x01, - 0x67, 0x02, 0xC0, 0x03, 0x89, 0x00, 0xDE, 0x01, 0x37, 0x03, 0x13, 0x01, 0x68, 0x02, 0xC1, 0x03, - 0x8A, 0x00, 0xDF, 0x01, 0x38, 0x03, 0x14, 0x01, 0x69, 0x02, 0xC2, 0x03, 0x8B, 0x00, 0xE0, 0x01, - 0x39, 0x03, 0x15, 0x01, 0x6A, 0x02, 0xC3, 0x03, 0x8C, 0x00, 0xE1, 0x01, 0x3A, 0x03, 0x16, 0x01, - 0x6B, 0x02, 0xC4, 0x03, 0x8D, 0x00, 0xE2, 0x01, 0x3B, 0x03, 0x17, 0x01, 0x6C, 0x02, 0xC5, 0x03, - 0x8E, 0x00, 0xE3, 0x01, 0x3C, 0x03, 0x18, 0x01, 0x6D, 0x02, 0xC6, 0x03, 0x8F, 0x00, 0xE4, 0x01, - 0x3D, 0x03, 0x19, 0x01, 0x6E, 0x02, 0xC7, 0x03, 0x90, 0x00, 0xE5, 0x01, 0x3E, 0x03, 0x1A, 0x01, - 0x6F, 0x02, 0xC8, 0x03, 0x91, 0x00, 0xE6, 0x01, 0x3F, 0x03, 0x1B, 0x01, 0x70, 0x02, 0xC9, 0x03, - 0x92, 0x00, 0xE7, 0x01, 0x40, 0x03, 0x1C, 0x01, 0x71, 0x02, 0xCA, 0x03, 0x93, 0x00, 0xE8, 0x01, - 0x41, 0x03, 0x1D, 0x01, 0x72, 0x02, 0xCB, 0x03, 0x94, 0x00, 0xE9, 0x01, 0x42, 0x03, 0x1E, 0x01, - 0x73, 0x02, 0xCC, 0x03, 0x95, 0x00, 0xEA, 0x01, 0x43, 0x03, 0x1F, 0x01, 0x74, 0x02, 0xCD, 0x03, - 0x96, 0x00, 0xEB, 0x01, 0x44, 0x03, 0x20, 0x01, 0x75, 0x02, 0xCE, 0x03, 0x97, 0x00, 0xEC, 0x01, - 0x45, 0x03, 0x21, 0x01, 0x76, 0x02, 0xCF, 0x03, 0x98, 0x00, 0xED, 0x01, 0x46, 0x03, 0x22, 0x01, - 0x77, 0x02, 0xD0, 0x03, 0x99, 0x00, 0xEE, 0x01, 0x47, 0x03, 0x23, 0x01, 0x78, 0x02, 0xD1, 0x03, - 0x9A, 0x00, 0xEF, 0x01, 0x48, 0x03, 0x24, 0x01, 0x79, 0x02, 0xD2, 0x03, 0x9B, 0x00, 0xF0, 0x01, - 0x49, 0x03, 0x25, 0x01, 0x7A, 0x02, 0xD3, 0x03, 0x9C, 0x00, 0xF1, 0x01, 0x4A, 0x03, 0x26, 0x01, - 0x7B, 0x02, 0xD4, 0x03, 0x9D, 0x00, 0xF2, 0x01, 0x4B, 0x03, 0x27, 0x01, 0x7C, 0x02, 0xD5, 0x03, - 0x9E, 0x00, 0xF3, 0x01, 0x4C, 0x03, 0x28, 0x01, 0x7D, 0x02, 0xD6, 0x03, 0x9F, 0x00, 0xF4, 0x01, - 0x4D, 0x03, 0x29, 0x01, 0x7E, 0x02, 0xD7, 0x03, 0xA0, 0x00, 0xF5, 0x01, 0x4E, 0x03, 0x2A, 0x01, - 0x7F, 0x02, 0xD8, 0x03, 0xA1, 0x00, 0xF6, 0x01, 0x4F, 0x03, 0x2B, 0x01, 0x80, 0x02, 0xD9, 0x03, - 0xA2, 0x00, 0xF7, 0x01, 0x50, 0x03, 0x2C, 0x01, 0x81, 0x02, 0xDA, 0x03, 0xA3, 0x00, 0xF8, 0x01, - 0x51, 0x03, 0x2D, 0x01, 0x82, 0x02, 0xDB, 0x03, 0xA4, 0x00, 0xF9, 0x01, 0x52, 0x03, 0x2E, 0x01, - 0x83, 0x02, 0xDC, 0x03, 0xA5, 0x00, 0xFA, 0x01, 0x53, 0x03, 0x2F, 0x01, 0x84, 0x02, 0xDD, 0x03, - 0xA6, 0x00, 0xFB, 0x01, 0x54, 0x03, 0x30, 0x01, 0x85, 0x02, 0xDE, 0x03, 0xA7, 0x00, 0xFC, 0x01, - 0x55, 0x03, 0x31, 0x01, 0x86, 0x02, 0xDF, 0x03, 0xA8, 0x00, 0xFD, 0x01, 0x56, 0x03, 0x32, 0x01 -]; - - - -const x3mScrambleTableBytes = [ - 0x56, 0x02, 0x8D, 0x02, 0x13, 0x02, 0x07, 0x03, 0x56, 0x01, 0x9D, 0x03, 0x62, 0x00, 0x70, 0x01, - 0xCA, 0x03, 0x35, 0x00, 0xED, 0x00, 0xA4, 0x02, 0xE4, 0x01, 0x59, 0x03, 0xD3, 0x00, 0x6B, 0x02, - 0x65, 0x02, 0x74, 0x02, 0x51, 0x02, 0x97, 0x02, 0x02, 0x02, 0x22, 0x03, 0x26, 0x01, 0x2B, 0x03, - 0x17, 0x01, 0x02, 0x03, 0x5C, 0x01, 0xA8, 0x03, 0x57, 0x00, 0x48, 0x01, 0x80, 0x03, 0x90, 0x00, - 0xF6, 0x01, 0x35, 0x03, 0x0C, 0x01, 0xEE, 0x02, 0x75, 0x01, 0xD4, 0x03, 0x2B, 0x00, 0xCC, 0x00, - 0x60, 0x02, 0x7B, 0x02, 0x3D, 0x02, 0xBB, 0x02, 0xB6, 0x01, 0xA1, 0x03, 0x5E, 0x00, 0x57, 0x01, - 0x9E, 0x03, 0x61, 0x00, 0x6F, 0x01, 0xC6, 0x03, 0x39, 0x00, 0xF7, 0x00, 0xB9, 0x02, 0xB8, 0x01, - 0x9F, 0x03, 0x60, 0x00, 0x66, 0x01, 0xB9, 0x03, 0x46, 0x00, 0x22, 0x01, 0x1C, 0x03, 0x2F, 0x01, - 0x3D, 0x03, 0xFC, 0x00, 0xCA, 0x02, 0xA4, 0x01, 0xCC, 0x03, 0x33, 0x00, 0xE6, 0x00, 0x93, 0x02, - 0x09, 0x02, 0x15, 0x03, 0x3D, 0x01, 0x58, 0x03, 0xD5, 0x00, 0x6E, 0x02, 0x5E, 0x02, 0x7D, 0x02, - 0x3A, 0x02, 0xC0, 0x02, 0xB1, 0x01, 0xAF, 0x03, 0x50, 0x00, 0x36, 0x01, 0x46, 0x03, 0xEF, 0x00, - 0xAA, 0x02, 0xCE, 0x01, 0x76, 0x03, 0xA0, 0x00, 0x10, 0x02, 0x0C, 0x03, 0x4C, 0x01, 0x89, 0x03, - 0x82, 0x00, 0xDB, 0x01, 0x67, 0x03, 0xB9, 0x00, 0x3E, 0x02, 0xBA, 0x02, 0xB7, 0x01, 0xA0, 0x03, - 0x5F, 0x00, 0x64, 0x01, 0xB7, 0x03, 0x48, 0x00, 0x25, 0x01, 0x26, 0x03, 0x1C, 0x01, 0x0A, 0x03, - 0x4F, 0x01, 0x8F, 0x03, 0x70, 0x00, 0xA8, 0x01, 0xC7, 0x03, 0x38, 0x00, 0xF5, 0x00, 0xB5, 0x02, - 0xBD, 0x01, 0x93, 0x03, 0x6C, 0x00, 0x99, 0x01, 0xE1, 0x03, 0x1E, 0x00, 0xB3, 0x00, 0x2F, 0x02, - 0xD7, 0x02, 0x93, 0x01, 0xEA, 0x03, 0x15, 0x00, 0x9D, 0x00, 0x0A, 0x02, 0x14, 0x03, 0x3E, 0x01, - 0x5A, 0x03, 0xD2, 0x00, 0x6A, 0x02, 0x67, 0x02, 0x72, 0x02, 0x53, 0x02, 0x94, 0x02, 0x08, 0x02, - 0x19, 0x03, 0x37, 0x01, 0x4C, 0x03, 0xE7, 0x00, 0x95, 0x02, 0x05, 0x02, 0x1D, 0x03, 0x2E, 0x01, - 0x3C, 0x03, 0xFE, 0x00, 0xCD, 0x02, 0xA0, 0x01, 0xD5, 0x03, 0x2A, 0x00, 0xC8, 0x00, 0x58, 0x02, - 0x86, 0x02, 0x2A, 0x02, 0xDC, 0x02, 0x8E, 0x01, 0xF7, 0x03, 0x08, 0x00, 0x7C, 0x00, 0xD3, 0x01, - 0x70, 0x03, 0xA7, 0x00, 0x1D, 0x02, 0xF1, 0x02, 0x71, 0x01, 0xCD, 0x03, 0x32, 0x00, 0xE5, 0x00, - 0x92, 0x02, 0x0B, 0x02, 0x13, 0x03, 0x3F, 0x01, 0x5C, 0x03, 0xD0, 0x00, 0x66, 0x02, 0x73, 0x02, - 0x52, 0x02, 0x96, 0x02, 0x04, 0x02, 0x1F, 0x03, 0x2A, 0x01, 0x32, 0x03, 0x0F, 0x01, 0xF4, 0x02, - 0x6C, 0x01, 0xC3, 0x03, 0x3C, 0x00, 0x01, 0x01, 0xD2, 0x02, 0x9A, 0x01, 0xE0, 0x03, 0x1F, 0x00, - 0xB5, 0x00, 0x33, 0x02, 0xC9, 0x02, 0xA6, 0x01, 0xC9, 0x03, 0x36, 0x00, 0xF0, 0x00, 0xAB, 0x02, - 0xCB, 0x01, 0x7C, 0x03, 0x95, 0x00, 0xFD, 0x01, 0x28, 0x03, 0x1A, 0x01, 0x06, 0x03, 0x58, 0x01, - 0xA2, 0x03, 0x5D, 0x00, 0x55, 0x01, 0x9C, 0x03, 0x63, 0x00, 0x74, 0x01, 0xD3, 0x03, 0x2C, 0x00, - 0xCF, 0x00, 0x64, 0x02, 0x75, 0x02, 0x4F, 0x02, 0x99, 0x02, 0xFA, 0x01, 0x2C, 0x03, 0x15, 0x01, - 0xFF, 0x02, 0x5F, 0x01, 0xAB, 0x03, 0x54, 0x00, 0x43, 0x01, 0x6C, 0x03, 0xAD, 0x00, 0x25, 0x02, - 0xE5, 0x02, 0x81, 0x01, 0xEF, 0x03, 0x10, 0x00, 0x8C, 0x00, 0xF1, 0x01, 0x44, 0x03, 0xF3, 0x00, - 0xAF, 0x02, 0xC4, 0x01, 0x86, 0x03, 0x88, 0x00, 0xE3, 0x01, 0x5B, 0x03, 0xD1, 0x00, 0x69, 0x02, - 0x68, 0x02, 0x6D, 0x02, 0x5F, 0x02, 0x7C, 0x02, 0x3B, 0x02, 0xBF, 0x02, 0xB2, 0x01, 0xAE, 0x03, - 0x51, 0x00, 0x3B, 0x01, 0x55, 0x03, 0xDA, 0x00, 0x78, 0x02, 0x48, 0x02, 0xA6, 0x02, 0xDC, 0x01, - 0x65, 0x03, 0xC0, 0x00, 0x46, 0x02, 0xA8, 0x02, 0xD6, 0x01, 0x6D, 0x03, 0xAC, 0x00, 0x24, 0x02, - 0xE8, 0x02, 0x7E, 0x01, 0xEB, 0x03, 0x14, 0x00, 0x9C, 0x00, 0x07, 0x02, 0x1A, 0x03, 0x33, 0x01, - 0x41, 0x03, 0xF8, 0x00, 0xBC, 0x02, 0xB5, 0x01, 0xA3, 0x03, 0x5C, 0x00, 0x52, 0x01, 0x95, 0x03, - 0x6A, 0x00, 0x8C, 0x01, 0xF9, 0x03, 0x06, 0x00, 0x7A, 0x00, 0xD1, 0x01, 0x73, 0x03, 0xA4, 0x00, - 0x17, 0x02, 0xFE, 0x02, 0x60, 0x01, 0xAD, 0x03, 0x52, 0x00, 0x3C, 0x01, 0x57, 0x03, 0xD7, 0x00, - 0x70, 0x02, 0x5C, 0x02, 0x81, 0x02, 0x35, 0x02, 0xC6, 0x02, 0xAA, 0x01, 0xBC, 0x03, 0x43, 0x00, - 0x1D, 0x01, 0x0D, 0x03, 0x4A, 0x01, 0x84, 0x03, 0x8A, 0x00, 0xE7, 0x01, 0x53, 0x03, 0xDD, 0x00, - 0x84, 0x02, 0x2E, 0x02, 0xD8, 0x02, 0x92, 0x01, 0xEC, 0x03, 0x13, 0x00, 0x99, 0x00, 0x01, 0x02, - 0x23, 0x03, 0x24, 0x01, 0x21, 0x03, 0x27, 0x01, 0x2D, 0x03, 0x14, 0x01, 0xFD, 0x02, 0x61, 0x01, - 0xB0, 0x03, 0x4F, 0x00, 0x35, 0x01, 0x43, 0x03, 0xF4, 0x00, 0xB4, 0x02, 0xBE, 0x01, 0x92, 0x03, - 0x6D, 0x00, 0x9D, 0x01, 0xDB, 0x03, 0x24, 0x00, 0xBE, 0x00, 0x44, 0x02, 0xB0, 0x02, 0xC2, 0x01, - 0x8A, 0x03, 0x80, 0x00, 0xD9, 0x01, 0x69, 0x03, 0xB6, 0x00, 0x34, 0x02, 0xC8, 0x02, 0xA7, 0x01, - 0xC8, 0x03, 0x37, 0x00, 0xF1, 0x00, 0xAD, 0x02, 0xC6, 0x01, 0x83, 0x03, 0x8D, 0x00, 0xF2, 0x01, - 0x3B, 0x03, 0x00, 0x01, 0xD1, 0x02, 0x9B, 0x01, 0xDE, 0x03, 0x21, 0x00, 0xBB, 0x00, 0x40, 0x02, - 0xB6, 0x02, 0xBB, 0x01, 0x99, 0x03, 0x66, 0x00, 0x7A, 0x01, 0xDF, 0x03, 0x20, 0x00, 0xB8, 0x00, - 0x3C, 0x02, 0xBD, 0x02, 0xB4, 0x01, 0xA5, 0x03, 0x5A, 0x00, 0x50, 0x01, 0x90, 0x03, 0x6F, 0x00, - 0xA5, 0x01, 0xCB, 0x03, 0x34, 0x00, 0xEA, 0x00, 0x9D, 0x02, 0xEE, 0x01, 0x48, 0x03, 0xEC, 0x00, - 0xA3, 0x02, 0xE5, 0x01, 0x56, 0x03, 0xD8, 0x00, 0x71, 0x02, 0x57, 0x02, 0x89, 0x02, 0x20, 0x02, - 0xEC, 0x02, 0x78, 0x01, 0xD9, 0x03, 0x26, 0x00, 0xC2, 0x00, 0x4B, 0x02, 0xA1, 0x02, 0xEA, 0x01, - 0x4D, 0x03, 0xE4, 0x00, 0x91, 0x02, 0x0C, 0x02, 0x12, 0x03, 0x41, 0x01, 0x60, 0x03, 0xCA, 0x00, - 0x5A, 0x02, 0x83, 0x02, 0x30, 0x02, 0xD0, 0x02, 0x9C, 0x01, 0xDD, 0x03, 0x22, 0x00, 0xBC, 0x00, - 0x41, 0x02, 0xB3, 0x02, 0xBF, 0x01, 0x91, 0x03, 0x6E, 0x00, 0xA2, 0x01, 0xD1, 0x03, 0x2E, 0x00, - 0xD6, 0x00, 0x6F, 0x02, 0x5D, 0x02, 0x7F, 0x02, 0x37, 0x02, 0xC4, 0x02, 0xAC, 0x01, 0xBA, 0x03, - 0x45, 0x00, 0x21, 0x01, 0x18, 0x03, 0x38, 0x01, 0x4E, 0x03, 0xE3, 0x00, 0x8F, 0x02, 0x11, 0x02, - 0x0B, 0x03, 0x4D, 0x01, 0x8C, 0x03, 0x73, 0x00, 0xC3, 0x01, 0x87, 0x03, 0x84, 0x00, 0xDF, 0x01, - 0x62, 0x03, 0xC7, 0x00, 0x55, 0x02, 0x8E, 0x02, 0x12, 0x02, 0x09, 0x03, 0x53, 0x01, 0x96, 0x03, - 0x69, 0x00, 0x8B, 0x01, 0xFA, 0x03, 0x05, 0x00, 0x79, 0x00, 0xD0, 0x01, 0x74, 0x03, 0xA2, 0x00, - 0x15, 0x02, 0x01, 0x03, 0x5D, 0x01, 0xA9, 0x03, 0x56, 0x00, 0x47, 0x01, 0x7A, 0x03, 0x98, 0x00, - 0x00, 0x02, 0x24, 0x03, 0x1F, 0x01, 0x16, 0x03, 0x3A, 0x01, 0x52, 0x03, 0xDF, 0x00, 0x88, 0x02, - 0x23, 0x02, 0xE9, 0x02, 0x7D, 0x01, 0xE9, 0x03, 0x16, 0x00, 0x9E, 0x00, 0x0D, 0x02, 0x10, 0x03, - 0x44, 0x01, 0x72, 0x03, 0xA5, 0x00, 0x19, 0x02, 0xFA, 0x02, 0x65, 0x01, 0xB8, 0x03, 0x47, 0x00, - 0x23, 0x01, 0x1E, 0x03, 0x2D, 0x01, 0x38, 0x03, 0x07, 0x01, 0xE0, 0x02, 0x88, 0x01, 0xFE, 0x03, - 0x01, 0x00, 0x75, 0x00, 0xC9, 0x01, 0x7E, 0x03, 0x93, 0x00, 0xF9, 0x01, 0x2F, 0x03, 0x12, 0x01, - 0xF9, 0x02, 0x67, 0x01, 0xBE, 0x03, 0x41, 0x00, 0x0B, 0x01, 0xE7, 0x02, 0x7F, 0x01, 0xED, 0x03, - 0x12, 0x00, 0x97, 0x00, 0xFF, 0x01, 0x25, 0x03, 0x1E, 0x01, 0x11, 0x03, 0x42, 0x01, 0x66, 0x03, - 0xBA, 0x00, 0x3F, 0x02, 0xB8, 0x02, 0xB9, 0x01, 0x9B, 0x03, 0x64, 0x00, 0x76, 0x01, 0xD6, 0x03, - 0x29, 0x00, 0xC5, 0x00, 0x50, 0x02, 0x98, 0x02, 0xFC, 0x01, 0x29, 0x03, 0x19, 0x01, 0x04, 0x03, - 0x5A, 0x01, 0xA6, 0x03, 0x59, 0x00, 0x4E, 0x01, 0x8E, 0x03, 0x71, 0x00, 0xAD, 0x01, 0xB6, 0x03, - 0x49, 0x00, 0x28, 0x01, 0x2E, 0x03, 0x13, 0x01, 0xFC, 0x02, 0x62, 0x01, 0xB2, 0x03, 0x4D, 0x00, - 0x31, 0x01, 0x3F, 0x03, 0xFA, 0x00, 0xC2, 0x02, 0xAF, 0x01, 0xB3, 0x03, 0x4C, 0x00, 0x30, 0x01, - 0x3E, 0x03, 0xFB, 0x00, 0xC7, 0x02, 0xA9, 0x01, 0xBD, 0x03, 0x42, 0x00, 0x16, 0x01, 0x00, 0x03, - 0x5E, 0x01, 0xAA, 0x03, 0x55, 0x00, 0x46, 0x01, 0x78, 0x03, 0x9B, 0x00, 0x06, 0x02, 0x1B, 0x03, - 0x32, 0x01, 0x40, 0x03, 0xF9, 0x00, 0xBE, 0x02, 0xB3, 0x01, 0xAC, 0x03, 0x53, 0x00, 0x40, 0x01, - 0x5D, 0x03, 0xCE, 0x00, 0x62, 0x02, 0x79, 0x02, 0x47, 0x02, 0xA7, 0x02, 0xD7, 0x01, 0x6B, 0x03, - 0xAE, 0x00, 0x26, 0x02, 0xE3, 0x02, 0x85, 0x01, 0xF6, 0x03, 0x09, 0x00, 0x7D, 0x00, 0xD4, 0x01, - 0x6F, 0x03, 0xA8, 0x00, 0x1E, 0x02, 0xF0, 0x02, 0x72, 0x01, 0xCE, 0x03, 0x31, 0x00, 0xDE, 0x00, - 0x87, 0x02, 0x28, 0x02, 0xDF, 0x02, 0x89, 0x01, 0xFD, 0x03, 0x02, 0x00, 0x76, 0x00, 0xCA, 0x01, - 0x7D, 0x03, 0x94, 0x00, 0xFB, 0x01, 0x2A, 0x03, 0x18, 0x01, 0x03, 0x03, 0x5B, 0x01, 0xA7, 0x03, - 0x58, 0x00, 0x4B, 0x01, 0x88, 0x03, 0x83, 0x00, 0xDD, 0x01, 0x64, 0x03, 0xC1, 0x00, 0x4A, 0x02, - 0xA2, 0x02, 0xE9, 0x01, 0x50, 0x03, 0xE1, 0x00, 0x8B, 0x02, 0x1A, 0x02, 0xF8, 0x02, 0x68, 0x01, - 0xBF, 0x03, 0x40, 0x00, 0x0A, 0x01, 0xE6, 0x02, 0x80, 0x01, 0xEE, 0x03, 0x11, 0x00, 0x91, 0x00, - 0xF7, 0x01, 0x34, 0x03, 0x0D, 0x01, 0xEF, 0x02, 0x73, 0x01, 0xCF, 0x03, 0x30, 0x00, 0xDC, 0x00, - 0x80, 0x02, 0x36, 0x02, 0xC5, 0x02, 0xAB, 0x01, 0xBB, 0x03, 0x44, 0x00, 0x20, 0x01, 0x17, 0x03, - 0x39, 0x01, 0x4F, 0x03, 0xE2, 0x00, 0x8C, 0x02, 0x18, 0x02, 0xFB, 0x02, 0x63, 0x01, 0xB4, 0x03, - 0x4B, 0x00, 0x2C, 0x01, 0x37, 0x03, 0x08, 0x01, 0xE2, 0x02, 0x86, 0x01, 0xFC, 0x03, 0x03, 0x00, - 0x77, 0x00, 0xCC, 0x01, 0x7B, 0x03, 0x96, 0x00, 0xFE, 0x01, 0x27, 0x03, 0x1B, 0x01, 0x08, 0x03, - 0x54, 0x01, 0x97, 0x03, 0x68, 0x00, 0x83, 0x01, 0xF3, 0x03, 0x0C, 0x00, 0x85, 0x00, 0xE0, 0x01, - 0x61, 0x03, 0xC9, 0x00, 0x59, 0x02, 0x85, 0x02, 0x2C, 0x02, 0xDA, 0x02, 0x90, 0x01, 0xF2, 0x03, - 0x0D, 0x00, 0x86, 0x00, 0xE1, 0x01, 0x5F, 0x03, 0xCB, 0x00, 0x5B, 0x02, 0x82, 0x02, 0x32, 0x02, - 0xCC, 0x02, 0xA1, 0x01, 0xD2, 0x03, 0x2D, 0x00, 0xD4, 0x00, 0x6C, 0x02, 0x63, 0x02, 0x77, 0x02, - 0x49, 0x02, 0xA5, 0x02, 0xDE, 0x01, 0x63, 0x03, 0xC6, 0x00, 0x54, 0x02, 0x90, 0x02, 0x0E, 0x02, - 0x0F, 0x03, 0x45, 0x01, 0x77, 0x03, 0x9F, 0x00, 0x0F, 0x02, 0x0E, 0x03, 0x49, 0x01, 0x82, 0x03, - 0x8E, 0x00, 0xF3, 0x01, 0x3A, 0x03, 0x02, 0x01, 0xD3, 0x02, 0x98, 0x01, 0xE2, 0x03, 0x1D, 0x00, - 0xB2, 0x00, 0x2D, 0x02, 0xD9, 0x02, 0x91, 0x01, 0xF1, 0x03, 0x0E, 0x00, 0x87, 0x00, 0xE2, 0x01, - 0x5E, 0x03, 0xCD, 0x00, 0x61, 0x02, 0x7A, 0x02, 0x43, 0x02, 0xB1, 0x02, 0xC1, 0x01, 0x8B, 0x03, - 0x7F, 0x00, 0xD8, 0x01, 0x6A, 0x03, 0xB4, 0x00, 0x31, 0x02, 0xCF, 0x02, 0x9E, 0x01, 0xDA, 0x03, - 0x25, 0x00, 0xBF, 0x00, 0x45, 0x02, 0xAC, 0x02, 0xC7, 0x01, 0x81, 0x03, 0x8F, 0x00, 0xF5, 0x01, - 0x36, 0x03, 0x09, 0x01, 0xE4, 0x02, 0x84, 0x01, 0xF4, 0x03, 0x0B, 0x00, 0x81, 0x00, 0xDA, 0x01, - 0x68, 0x03, 0xB7, 0x00, 0x39, 0x02, 0xC1, 0x02, 0xB0, 0x01, 0xB1, 0x03, 0x4E, 0x00, 0x34, 0x01, - 0x42, 0x03, 0xF6, 0x00, 0xB7, 0x02, 0xBA, 0x01, 0x9A, 0x03, 0x65, 0x00, 0x79, 0x01, 0xDC, 0x03, - 0x23, 0x00, 0xBD, 0x00, 0x42, 0x02, 0xB2, 0x02, 0xC0, 0x01, 0x8D, 0x03, 0x72, 0x00, 0xBC, 0x01, - 0x98, 0x03, 0x67, 0x00, 0x82, 0x01, 0xF0, 0x03, 0x0F, 0x00, 0x8B, 0x00, 0xE8, 0x01, 0x51, 0x03, - 0xE0, 0x00, 0x8A, 0x02, 0x1C, 0x02, 0xF3, 0x02, 0x6D, 0x01, 0xC4, 0x03, 0x3B, 0x00, 0xFF, 0x00, - 0xCE, 0x02, 0x9F, 0x01, 0xD7, 0x03, 0x28, 0x00, 0xC4, 0x00, 0x4E, 0x02, 0x9B, 0x02, 0xF0, 0x01, - 0x45, 0x03, 0xF2, 0x00, 0xAE, 0x02, 0xC5, 0x01, 0x85, 0x03, 0x89, 0x00, 0xE6, 0x01, 0x54, 0x03, - 0xDB, 0x00, 0x7E, 0x02, 0x38, 0x02, 0xC3, 0x02, 0xAE, 0x01, 0xB5, 0x03, 0x4A, 0x00, 0x2B, 0x01, - 0x33, 0x03, 0x0E, 0x01, 0xF2, 0x02, 0x6E, 0x01, 0xC5, 0x03, 0x3A, 0x00, 0xFD, 0x00, 0xCB, 0x02, - 0xA3, 0x01, 0xD0, 0x03, 0x2F, 0x00, 0xD9, 0x00, 0x76, 0x02, 0x4C, 0x02, 0x9F, 0x02, 0xEC, 0x01, - 0x4A, 0x03, 0xE9, 0x00, 0x9C, 0x02, 0xEF, 0x01, 0x47, 0x03, 0xEE, 0x00, 0xA9, 0x02, 0xCF, 0x01, - 0x75, 0x03, 0xA1, 0x00, 0x14, 0x02, 0x05, 0x03, 0x59, 0x01, 0xA4, 0x03, 0x5B, 0x00, 0x51, 0x01, - 0x94, 0x03, 0x6B, 0x00, 0x96, 0x01, 0xE6, 0x03, 0x19, 0x00, 0xAB, 0x00, 0x22, 0x02, 0xEA, 0x02, - 0x7C, 0x01, 0xE5, 0x03, 0x1A, 0x00, 0xAF, 0x00, 0x27, 0x02, 0xE1, 0x02, 0x87, 0x01, 0xFF, 0x03, - 0x00, 0x00, 0x74, 0x00, 0xC8, 0x01, 0x7F, 0x03, 0x92, 0x00, 0xF8, 0x01, 0x31, 0x03, 0x10, 0x01, - 0xF6, 0x02, 0x6A, 0x01, 0xC1, 0x03, 0x3E, 0x00, 0x04, 0x01, 0xD5, 0x02, 0x95, 0x01, 0xE7, 0x03, - 0x18, 0x00, 0xAA, 0x00, 0x21, 0x02, 0xEB, 0x02, 0x7B, 0x01, 0xE4, 0x03, 0x1B, 0x00, 0xB0, 0x00, - 0x29, 0x02, 0xDD, 0x02, 0x8D, 0x01, 0xF8, 0x03, 0x07, 0x00, 0x7B, 0x00, 0xD2, 0x01, 0x71, 0x03, - 0xA6, 0x00, 0x1B, 0x02, 0xF5, 0x02, 0x6B, 0x01, 0xC2, 0x03, 0x3D, 0x00, 0x03, 0x01, 0xD4, 0x02, - 0x97, 0x01, 0xE3, 0x03, 0x1C, 0x00, 0xB1, 0x00, 0x2B, 0x02, 0xDB, 0x02, 0x8F, 0x01, 0xF5, 0x03, - 0x0A, 0x00, 0x7E, 0x00, 0xD5, 0x01, 0x6E, 0x03, 0xA9, 0x00, 0x1F, 0x02, 0xED, 0x02, 0x77, 0x01, - 0xD8, 0x03, 0x27, 0x00, 0xC3, 0x00, 0x4D, 0x02, 0x9E, 0x02, 0xED, 0x01, 0x49, 0x03, 0xEB, 0x00, - 0xA0, 0x02, 0xEB, 0x01, 0x4B, 0x03, 0xE8, 0x00, 0x9A, 0x02, 0xF4, 0x01, 0x39, 0x03, 0x06, 0x01, - 0xDE, 0x02, 0x8A, 0x01, 0xFB, 0x03, 0x04, 0x00, 0x78, 0x00, 0xCD, 0x01, 0x79, 0x03, 0x9A, 0x00, - 0x03, 0x02, 0x20, 0x03, 0x29, 0x01, 0x30, 0x03, 0x11, 0x01, 0xF7, 0x02, 0x69, 0x01, 0xC0, 0x03, - 0x3F, 0x00, 0x05, 0x01, 0xD6, 0x02, 0x94, 0x01, 0xE8, 0x03, 0x17, 0x00, 0xA3, 0x00, 0x16, 0x02 -]; \ No newline at end of file +const x2mScrambleTable = [681, 683, 340, 682, 680, 684, 339, 679, 685, 338, 678, 1023, 0, 341, 686, 337, 677, 1022, 1, 342, 687, 336, 676, 1021, 2, 343, 688, 335, 675, 1020, 3, 344, 689, 334, 674, 1019, 4, 345, 690, 333, 673, 1018, 5, 346, 691, 332, 672, 1017, 6, 347, 692, 331, 671, 1016, 7, 348, 693, 330, 670, 1015, 8, 349, 694, 329, 669, 1014, 9, 350, 695, 328, 668, 1013, 10, 351, 696, 327, 667, 1012, 11, 352, 697, 326, 666, 1011, 12, 353, 698, 325, 665, 1010, 13, 354, 699, 324, 664, 1009, 14, 355, 700, 323, 663, 1008, 15, 356, 701, 322, 662, 1007, 16, 357, 702, 321, 661, 1006, 17, 358, 703, 320, 660, 1005, 18, 359, 704, 319, 659, 1004, 19, 360, 705, 318, 658, 1003, 20, 361, 706, 317, 657, 1002, 21, 362, 707, 316, 656, 1001, 22, 363, 708, 315, 655, 1000, 23, 364, 709, 314, 654, 999, 24, 365, 710, 313, 653, 998, 25, 366, 711, 312, 652, 997, 26, 367, 712, 311, 651, 996, 27, 368, 713, 310, 650, 995, 28, 369, 714, 309, 649, 994, 29, 370, 715, 308, 648, 993, 30, 371, 716, 307, 647, 992, 31, 372, 717, 169, 510, 855, 32, 373, 718, 170, 511, 856, 33, 374, 719, 171, 512, 857, 34, 375, 720, 172, 513, 858, 35, 376, 721, 173, 514, 859, 36, 377, 722, 174, 515, 860, 37, 378, 723, 175, 516, 861, 38, 379, 724, 176, 517, 862, 39, 380, 725, 177, 518, 863, 40, 381, 726, 178, 519, 864, 41, 382, 727, 179, 520, 865, 42, 383, 728, 180, 521, 866, 43, 384, 729, 181, 522, 867, 44, 385, 730, 182, 523, 868, 45, 386, 731, 183, 524, 869, 46, 387, 732, 184, 525, 870, 47, 388, 733, 185, 526, 871, 48, 389, 734, 186, 527, 872, 49, 390, 735, 187, 528, 873, 50, 391, 736, 188, 529, 874, 51, 392, 737, 189, 530, 875, 52, 393, 738, 190, 531, 876, 53, 394, 739, 191, 532, 877, 54, 395, 740, 192, 533, 878, 55, 396, 741, 193, 534, 879, 56, 397, 742, 194, 535, 880, 57, 398, 743, 195, 536, 881, 58, 399, 744, 196, 537, 882, 59, 400, 745, 197, 538, 883, 60, 401, 746, 198, 539, 884, 61, 402, 747, 199, 540, 885, 62, 403, 748, 200, 541, 886, 63, 404, 749, 201, 542, 887, 64, 405, 750, 202, 543, 888, 65, 406, 751, 203, 544, 889, 66, 407, 752, 204, 545, 890, 67, 408, 753, 205, 546, 891, 68, 409, 754, 206, 547, 892, 69, 410, 755, 207, 548, 893, 70, 411, 756, 208, 549, 894, 71, 412, 757, 209, 550, 895, 72, 413, 758, 210, 551, 896, 73, 414, 759, 211, 552, 897, 74, 415, 760, 212, 553, 898, 75, 416, 761, 213, 554, 899, 76, 417, 762, 214, 555, 900, 77, 418, 763, 215, 556, 901, 78, 419, 764, 216, 557, 902, 79, 420, 765, 217, 558, 903, 80, 421, 766, 218, 559, 904, 81, 422, 767, 219, 560, 905, 82, 423, 768, 220, 561, 906, 83, 424, 769, 221, 562, 907, 84, 425, 770, 222, 563, 908, 85, 426, 771, 223, 564, 909, 86, 427, 772, 224, 565, 910, 87, 428, 773, 225, 566, 911, 88, 429, 774, 226, 567, 912, 89, 430, 775, 227, 568, 913, 90, 431, 776, 228, 569, 914, 91, 432, 777, 229, 570, 915, 92, 433, 778, 230, 571, 916, 93, 434, 779, 231, 572, 917, 94, 435, 780, 232, 573, 918, 95, 436, 781, 233, 574, 919, 96, 437, 782, 234, 575, 920, 97, 438, 783, 235, 576, 921, 98, 439, 784, 236, 577, 922, 99, 440, 785, 237, 578, 923, 100, 441, 786, 238, 579, 924, 101, 442, 787, 239, 580, 925, 102, 443, 788, 240, 581, 926, 103, 444, 789, 241, 582, 927, 104, 445, 790, 242, 583, 928, 105, 446, 791, 243, 584, 929, 106, 447, 792, 244, 585, 930, 107, 448, 793, 245, 586, 931, 108, 449, 794, 246, 587, 932, 109, 450, 795, 247, 588, 933, 110, 451, 796, 248, 589, 934, 111, 452, 797, 249, 590, 935, 112, 453, 798, 250, 591, 936, 113, 454, 799, 251, 592, 937, 114, 455, 800, 252, 593, 938, 115, 456, 801, 253, 594, 939, 116, 457, 802, 254, 595, 940, 117, 458, 803, 255, 596, 941, 118, 459, 804, 256, 597, 942, 119, 460, 805, 257, 598, 943, 120, 461, 806, 258, 599, 944, 121, 462, 807, 259, 600, 945, 122, 463, 808, 260, 601, 946, 123, 464, 809, 261, 602, 947, 124, 465, 810, 262, 603, 948, 125, 466, 811, 263, 604, 949, 126, 467, 812, 264, 605, 950, 127, 468, 813, 265, 606, 951, 128, 469, 814, 266, 607, 952, 129, 470, 815, 267, 608, 953, 130, 471, 816, 268, 609, 954, 131, 472, 817, 269, 610, 955, 132, 473, 818, 270, 611, 956, 133, 474, 819, 271, 612, 957, 134, 475, 820, 272, 613, 958, 135, 476, 821, 273, 614, 959, 136, 477, 822, 274, 615, 960, 137, 478, 823, 275, 616, 961, 138, 479, 824, 276, 617, 962, 139, 480, 825, 277, 618, 963, 140, 481, 826, 278, 619, 964, 141, 482, 827, 279, 620, 965, 142, 483, 828, 280, 621, 966, 143, 484, 829, 281, 622, 967, 144, 485, 830, 282, 623, 968, 145, 486, 831, 283, 624, 969, 146, 487, 832, 284, 625, 970, 147, 488, 833, 285, 626, 971, 148, 489, 834, 286, 627, 972, 149, 490, 835, 287, 628, 973, 150, 491, 836, 288, 629, 974, 151, 492, 837, 289, 630, 975, 152, 493, 838, 290, 631, 976, 153, 494, 839, 291, 632, 977, 154, 495, 840, 292, 633, 978, 155, 496, 841, 293, 634, 979, 156, 497, 842, 294, 635, 980, 157, 498, 843, 295, 636, 981, 158, 499, 844, 296, 637, 982, 159, 500, 845, 297, 638, 983, 160, 501, 846, 298, 639, 984, 161, 502, 847, 299, 640, 985, 162, 503, 848, 300, 641, 986, 163, 504, 849, 301, 642, 987, 164, 505, 850, 302, 643, 988, 165, 506, 851, 303, 644, 989, 166, 507, 852, 304, 645, 990, 167, 508, 853, 305, 646, 991, 168, 509, 854, 306]; +const x3mScrambleTable = [598, 653, 531, 775, 342, 925, 98, 368, 970, 53, 237, 676, 484, 857, 211, 619, 613, 628, 593, 663, 514, 802, 294, 811, 279, 770, 348, 936, 87, 328, 896, 144, 502, 821, 268, 750, 373, 980, 43, 204, 608, 635, 573, 699, 438, 929, 94, 343, 926, 97, 367, 966, 57, 247, 697, 440, 927, 96, 358, 953, 70, 290, 796, 303, 829, 252, 714, 420, 972, 51, 230, 659, 521, 789, 317, 856, 213, 622, 606, 637, 570, 704, 433, 943, 80, 310, 838, 239, 682, 462, 886, 160, 528, 780, 332, 905, 130, 475, 871, 185, 574, 698, 439, 928, 95, 356, 951, 72, 293, 806, 284, 778, 335, 911, 112, 424, 967, 56, 245, 693, 445, 915, 108, 409, 993, 30, 179, 559, 727, 403, 1002, 21, 157, 522, 788, 318, 858, 210, 618, 615, 626, 595, 660, 520, 793, 311, 844, 231, 661, 517, 797, 302, 828, 254, 717, 416, 981, 42, 200, 600, 646, 554, 732, 398, 1015, 8, 124, 467, 880, 167, 541, 753, 369, 973, 50, 229, 658, 523, 787, 319, 860, 208, 614, 627, 594, 662, 516, 799, 298, 818, 271, 756, 364, 963, 60, 257, 722, 410, 992, 31, 181, 563, 713, 422, 969, 54, 240, 683, 459, 892, 149, 509, 808, 282, 774, 344, 930, 93, 341, 924, 99, 372, 979, 44, 207, 612, 629, 591, 665, 506, 812, 277, 767, 351, 939, 84, 323, 876, 173, 549, 741, 385, 1007, 16, 140, 497, 836, 243, 687, 452, 902, 136, 483, 859, 209, 617, 616, 621, 607, 636, 571, 703, 434, 942, 81, 315, 853, 218, 632, 584, 678, 476, 869, 192, 582, 680, 470, 877, 172, 548, 744, 382, 1003, 20, 156, 519, 794, 307, 833, 248, 700, 437, 931, 92, 338, 917, 106, 396, 1017, 6, 122, 465, 883, 164, 535, 766, 352, 941, 82, 316, 855, 215, 624, 604, 641, 565, 710, 426, 956, 67, 285, 781, 330, 900, 138, 487, 851, 221, 644, 558, 728, 402, 1004, 19, 153, 513, 803, 292, 801, 295, 813, 276, 765, 353, 944, 79, 309, 835, 244, 692, 446, 914, 109, 413, 987, 36, 190, 580, 688, 450, 906, 128, 473, 873, 182, 564, 712, 423, 968, 55, 241, 685, 454, 899, 141, 498, 827, 256, 721, 411, 990, 33, 187, 576, 694, 443, 921, 102, 378, 991, 32, 184, 572, 701, 436, 933, 90, 336, 912, 111, 421, 971, 52, 234, 669, 494, 840, 236, 675, 485, 854, 216, 625, 599, 649, 544, 748, 376, 985, 38, 194, 587, 673, 490, 845, 228, 657, 524, 786, 321, 864, 202, 602, 643, 560, 720, 412, 989, 34, 188, 577, 691, 447, 913, 110, 418, 977, 46, 214, 623, 605, 639, 567, 708, 428, 954, 69, 289, 792, 312, 846, 227, 655, 529, 779, 333, 908, 115, 451, 903, 132, 479, 866, 199, 597, 654, 530, 777, 339, 918, 105, 395, 1018, 5, 121, 464, 884, 162, 533, 769, 349, 937, 86, 327, 890, 152, 512, 804, 287, 790, 314, 850, 223, 648, 547, 745, 381, 1001, 22, 158, 525, 784, 324, 882, 165, 537, 762, 357, 952, 71, 291, 798, 301, 824, 263, 736, 392, 1022, 1, 117, 457, 894, 147, 505, 815, 274, 761, 359, 958, 65, 267, 743, 383, 1005, 18, 151, 511, 805, 286, 785, 322, 870, 186, 575, 696, 441, 923, 100, 374, 982, 41, 197, 592, 664, 508, 809, 281, 772, 346, 934, 89, 334, 910, 113, 429, 950, 73, 296, 814, 275, 764, 354, 946, 77, 305, 831, 250, 706, 431, 947, 76, 304, 830, 251, 711, 425, 957, 66, 278, 768, 350, 938, 85, 326, 888, 155, 518, 795, 306, 832, 249, 702, 435, 940, 83, 320, 861, 206, 610, 633, 583, 679, 471, 875, 174, 550, 739, 389, 1014, 9, 125, 468, 879, 168, 542, 752, 370, 974, 49, 222, 647, 552, 735, 393, 1021, 2, 118, 458, 893, 148, 507, 810, 280, 771, 347, 935, 88, 331, 904, 131, 477, 868, 193, 586, 674, 489, 848, 225, 651, 538, 760, 360, 959, 64, 266, 742, 384, 1006, 17, 145, 503, 820, 269, 751, 371, 975, 48, 220, 640, 566, 709, 427, 955, 68, 288, 791, 313, 847, 226, 652, 536, 763, 355, 948, 75, 300, 823, 264, 738, 390, 1020, 3, 119, 460, 891, 150, 510, 807, 283, 776, 340, 919, 104, 387, 1011, 12, 133, 480, 865, 201, 601, 645, 556, 730, 400, 1010, 13, 134, 481, 863, 203, 603, 642, 562, 716, 417, 978, 45, 212, 620, 611, 631, 585, 677, 478, 867, 198, 596, 656, 526, 783, 325, 887, 159, 527, 782, 329, 898, 142, 499, 826, 258, 723, 408, 994, 29, 178, 557, 729, 401, 1009, 14, 135, 482, 862, 205, 609, 634, 579, 689, 449, 907, 127, 472, 874, 180, 561, 719, 414, 986, 37, 191, 581, 684, 455, 897, 143, 501, 822, 265, 740, 388, 1012, 11, 129, 474, 872, 183, 569, 705, 432, 945, 78, 308, 834, 246, 695, 442, 922, 101, 377, 988, 35, 189, 578, 690, 448, 909, 114, 444, 920, 103, 386, 1008, 15, 139, 488, 849, 224, 650, 540, 755, 365, 964, 59, 255, 718, 415, 983, 40, 196, 590, 667, 496, 837, 242, 686, 453, 901, 137, 486, 852, 219, 638, 568, 707, 430, 949, 74, 299, 819, 270, 754, 366, 965, 58, 253, 715, 419, 976, 47, 217, 630, 588, 671, 492, 842, 233, 668, 495, 839, 238, 681, 463, 885, 161, 532, 773, 345, 932, 91, 337, 916, 107, 406, 998, 25, 171, 546, 746, 380, 997, 26, 175, 551, 737, 391, 1023, 0, 116, 456, 895, 146, 504, 817, 272, 758, 362, 961, 62, 260, 725, 405, 999, 24, 170, 545, 747, 379, 996, 27, 176, 553, 733, 397, 1016, 7, 123, 466, 881, 166, 539, 757, 363, 962, 61, 259, 724, 407, 995, 28, 177, 555, 731, 399, 1013, 10, 126, 469, 878, 169, 543, 749, 375, 984, 39, 195, 589, 670, 493, 841, 235, 672, 491, 843, 232, 666, 500, 825, 262, 734, 394, 1019, 4, 120, 461, 889, 154, 515, 800, 297, 816, 273, 759, 361, 960, 63, 261, 726, 404, 1000, 23, 163, 534]; From 48a497af190bfd75ed7a906ffbb7b21ddab9661c Mon Sep 17 00:00:00 2001 From: Yuki1536 <69851694+Yuki1536@users.noreply.github.com> Date: Mon, 12 Dec 2022 19:58:36 +0900 Subject: [PATCH 5/9] Update README.md / Now it's 2022! --- LICENSE | 2 +- README.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 75b1358..e18948e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2019-2021 MengYX +Copyright (c) 2019-2022 MengYX Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 4f7ead7..b20be5c 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ - [x] 虾米音乐格式 (.xm) - [x] 酷我音乐格式 (.kwm) - [x] 酷狗音乐格式 (.kgm/.vpr) +- [x] 喜马拉雅文件格式 (.x2m/.x3m) ### 其他特性 From b632c8fbc925a6bbd0ca09713a616fcae9c1d332 Mon Sep 17 00:00:00 2001 From: Yuki1536 <69851694+Yuki1536@users.noreply.github.com> Date: Mon, 12 Dec 2022 20:35:15 +0900 Subject: [PATCH 6/9] Update README.md --- README.md | 2 +- src/decrypt/ximalaya.ts | 81 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 80 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b20be5c..e9c15f0 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ - [x] 虾米音乐格式 (.xm) - [x] 酷我音乐格式 (.kwm) - [x] 酷狗音乐格式 (.kgm/.vpr) -- [x] 喜马拉雅文件格式 (.x2m/.x3m) +- [x] Android版喜马拉雅文件格式 (.x2m/.x3m) ### 其他特性 diff --git a/src/decrypt/ximalaya.ts b/src/decrypt/ximalaya.ts index 0f3e42c..2581e26 100644 --- a/src/decrypt/ximalaya.ts +++ b/src/decrypt/ximalaya.ts @@ -60,5 +60,82 @@ function ProcessX3M(data: Uint8Array) { return data; } -const x2mScrambleTable = [681, 683, 340, 682, 680, 684, 339, 679, 685, 338, 678, 1023, 0, 341, 686, 337, 677, 1022, 1, 342, 687, 336, 676, 1021, 2, 343, 688, 335, 675, 1020, 3, 344, 689, 334, 674, 1019, 4, 345, 690, 333, 673, 1018, 5, 346, 691, 332, 672, 1017, 6, 347, 692, 331, 671, 1016, 7, 348, 693, 330, 670, 1015, 8, 349, 694, 329, 669, 1014, 9, 350, 695, 328, 668, 1013, 10, 351, 696, 327, 667, 1012, 11, 352, 697, 326, 666, 1011, 12, 353, 698, 325, 665, 1010, 13, 354, 699, 324, 664, 1009, 14, 355, 700, 323, 663, 1008, 15, 356, 701, 322, 662, 1007, 16, 357, 702, 321, 661, 1006, 17, 358, 703, 320, 660, 1005, 18, 359, 704, 319, 659, 1004, 19, 360, 705, 318, 658, 1003, 20, 361, 706, 317, 657, 1002, 21, 362, 707, 316, 656, 1001, 22, 363, 708, 315, 655, 1000, 23, 364, 709, 314, 654, 999, 24, 365, 710, 313, 653, 998, 25, 366, 711, 312, 652, 997, 26, 367, 712, 311, 651, 996, 27, 368, 713, 310, 650, 995, 28, 369, 714, 309, 649, 994, 29, 370, 715, 308, 648, 993, 30, 371, 716, 307, 647, 992, 31, 372, 717, 169, 510, 855, 32, 373, 718, 170, 511, 856, 33, 374, 719, 171, 512, 857, 34, 375, 720, 172, 513, 858, 35, 376, 721, 173, 514, 859, 36, 377, 722, 174, 515, 860, 37, 378, 723, 175, 516, 861, 38, 379, 724, 176, 517, 862, 39, 380, 725, 177, 518, 863, 40, 381, 726, 178, 519, 864, 41, 382, 727, 179, 520, 865, 42, 383, 728, 180, 521, 866, 43, 384, 729, 181, 522, 867, 44, 385, 730, 182, 523, 868, 45, 386, 731, 183, 524, 869, 46, 387, 732, 184, 525, 870, 47, 388, 733, 185, 526, 871, 48, 389, 734, 186, 527, 872, 49, 390, 735, 187, 528, 873, 50, 391, 736, 188, 529, 874, 51, 392, 737, 189, 530, 875, 52, 393, 738, 190, 531, 876, 53, 394, 739, 191, 532, 877, 54, 395, 740, 192, 533, 878, 55, 396, 741, 193, 534, 879, 56, 397, 742, 194, 535, 880, 57, 398, 743, 195, 536, 881, 58, 399, 744, 196, 537, 882, 59, 400, 745, 197, 538, 883, 60, 401, 746, 198, 539, 884, 61, 402, 747, 199, 540, 885, 62, 403, 748, 200, 541, 886, 63, 404, 749, 201, 542, 887, 64, 405, 750, 202, 543, 888, 65, 406, 751, 203, 544, 889, 66, 407, 752, 204, 545, 890, 67, 408, 753, 205, 546, 891, 68, 409, 754, 206, 547, 892, 69, 410, 755, 207, 548, 893, 70, 411, 756, 208, 549, 894, 71, 412, 757, 209, 550, 895, 72, 413, 758, 210, 551, 896, 73, 414, 759, 211, 552, 897, 74, 415, 760, 212, 553, 898, 75, 416, 761, 213, 554, 899, 76, 417, 762, 214, 555, 900, 77, 418, 763, 215, 556, 901, 78, 419, 764, 216, 557, 902, 79, 420, 765, 217, 558, 903, 80, 421, 766, 218, 559, 904, 81, 422, 767, 219, 560, 905, 82, 423, 768, 220, 561, 906, 83, 424, 769, 221, 562, 907, 84, 425, 770, 222, 563, 908, 85, 426, 771, 223, 564, 909, 86, 427, 772, 224, 565, 910, 87, 428, 773, 225, 566, 911, 88, 429, 774, 226, 567, 912, 89, 430, 775, 227, 568, 913, 90, 431, 776, 228, 569, 914, 91, 432, 777, 229, 570, 915, 92, 433, 778, 230, 571, 916, 93, 434, 779, 231, 572, 917, 94, 435, 780, 232, 573, 918, 95, 436, 781, 233, 574, 919, 96, 437, 782, 234, 575, 920, 97, 438, 783, 235, 576, 921, 98, 439, 784, 236, 577, 922, 99, 440, 785, 237, 578, 923, 100, 441, 786, 238, 579, 924, 101, 442, 787, 239, 580, 925, 102, 443, 788, 240, 581, 926, 103, 444, 789, 241, 582, 927, 104, 445, 790, 242, 583, 928, 105, 446, 791, 243, 584, 929, 106, 447, 792, 244, 585, 930, 107, 448, 793, 245, 586, 931, 108, 449, 794, 246, 587, 932, 109, 450, 795, 247, 588, 933, 110, 451, 796, 248, 589, 934, 111, 452, 797, 249, 590, 935, 112, 453, 798, 250, 591, 936, 113, 454, 799, 251, 592, 937, 114, 455, 800, 252, 593, 938, 115, 456, 801, 253, 594, 939, 116, 457, 802, 254, 595, 940, 117, 458, 803, 255, 596, 941, 118, 459, 804, 256, 597, 942, 119, 460, 805, 257, 598, 943, 120, 461, 806, 258, 599, 944, 121, 462, 807, 259, 600, 945, 122, 463, 808, 260, 601, 946, 123, 464, 809, 261, 602, 947, 124, 465, 810, 262, 603, 948, 125, 466, 811, 263, 604, 949, 126, 467, 812, 264, 605, 950, 127, 468, 813, 265, 606, 951, 128, 469, 814, 266, 607, 952, 129, 470, 815, 267, 608, 953, 130, 471, 816, 268, 609, 954, 131, 472, 817, 269, 610, 955, 132, 473, 818, 270, 611, 956, 133, 474, 819, 271, 612, 957, 134, 475, 820, 272, 613, 958, 135, 476, 821, 273, 614, 959, 136, 477, 822, 274, 615, 960, 137, 478, 823, 275, 616, 961, 138, 479, 824, 276, 617, 962, 139, 480, 825, 277, 618, 963, 140, 481, 826, 278, 619, 964, 141, 482, 827, 279, 620, 965, 142, 483, 828, 280, 621, 966, 143, 484, 829, 281, 622, 967, 144, 485, 830, 282, 623, 968, 145, 486, 831, 283, 624, 969, 146, 487, 832, 284, 625, 970, 147, 488, 833, 285, 626, 971, 148, 489, 834, 286, 627, 972, 149, 490, 835, 287, 628, 973, 150, 491, 836, 288, 629, 974, 151, 492, 837, 289, 630, 975, 152, 493, 838, 290, 631, 976, 153, 494, 839, 291, 632, 977, 154, 495, 840, 292, 633, 978, 155, 496, 841, 293, 634, 979, 156, 497, 842, 294, 635, 980, 157, 498, 843, 295, 636, 981, 158, 499, 844, 296, 637, 982, 159, 500, 845, 297, 638, 983, 160, 501, 846, 298, 639, 984, 161, 502, 847, 299, 640, 985, 162, 503, 848, 300, 641, 986, 163, 504, 849, 301, 642, 987, 164, 505, 850, 302, 643, 988, 165, 506, 851, 303, 644, 989, 166, 507, 852, 304, 645, 990, 167, 508, 853, 305, 646, 991, 168, 509, 854, 306]; -const x3mScrambleTable = [598, 653, 531, 775, 342, 925, 98, 368, 970, 53, 237, 676, 484, 857, 211, 619, 613, 628, 593, 663, 514, 802, 294, 811, 279, 770, 348, 936, 87, 328, 896, 144, 502, 821, 268, 750, 373, 980, 43, 204, 608, 635, 573, 699, 438, 929, 94, 343, 926, 97, 367, 966, 57, 247, 697, 440, 927, 96, 358, 953, 70, 290, 796, 303, 829, 252, 714, 420, 972, 51, 230, 659, 521, 789, 317, 856, 213, 622, 606, 637, 570, 704, 433, 943, 80, 310, 838, 239, 682, 462, 886, 160, 528, 780, 332, 905, 130, 475, 871, 185, 574, 698, 439, 928, 95, 356, 951, 72, 293, 806, 284, 778, 335, 911, 112, 424, 967, 56, 245, 693, 445, 915, 108, 409, 993, 30, 179, 559, 727, 403, 1002, 21, 157, 522, 788, 318, 858, 210, 618, 615, 626, 595, 660, 520, 793, 311, 844, 231, 661, 517, 797, 302, 828, 254, 717, 416, 981, 42, 200, 600, 646, 554, 732, 398, 1015, 8, 124, 467, 880, 167, 541, 753, 369, 973, 50, 229, 658, 523, 787, 319, 860, 208, 614, 627, 594, 662, 516, 799, 298, 818, 271, 756, 364, 963, 60, 257, 722, 410, 992, 31, 181, 563, 713, 422, 969, 54, 240, 683, 459, 892, 149, 509, 808, 282, 774, 344, 930, 93, 341, 924, 99, 372, 979, 44, 207, 612, 629, 591, 665, 506, 812, 277, 767, 351, 939, 84, 323, 876, 173, 549, 741, 385, 1007, 16, 140, 497, 836, 243, 687, 452, 902, 136, 483, 859, 209, 617, 616, 621, 607, 636, 571, 703, 434, 942, 81, 315, 853, 218, 632, 584, 678, 476, 869, 192, 582, 680, 470, 877, 172, 548, 744, 382, 1003, 20, 156, 519, 794, 307, 833, 248, 700, 437, 931, 92, 338, 917, 106, 396, 1017, 6, 122, 465, 883, 164, 535, 766, 352, 941, 82, 316, 855, 215, 624, 604, 641, 565, 710, 426, 956, 67, 285, 781, 330, 900, 138, 487, 851, 221, 644, 558, 728, 402, 1004, 19, 153, 513, 803, 292, 801, 295, 813, 276, 765, 353, 944, 79, 309, 835, 244, 692, 446, 914, 109, 413, 987, 36, 190, 580, 688, 450, 906, 128, 473, 873, 182, 564, 712, 423, 968, 55, 241, 685, 454, 899, 141, 498, 827, 256, 721, 411, 990, 33, 187, 576, 694, 443, 921, 102, 378, 991, 32, 184, 572, 701, 436, 933, 90, 336, 912, 111, 421, 971, 52, 234, 669, 494, 840, 236, 675, 485, 854, 216, 625, 599, 649, 544, 748, 376, 985, 38, 194, 587, 673, 490, 845, 228, 657, 524, 786, 321, 864, 202, 602, 643, 560, 720, 412, 989, 34, 188, 577, 691, 447, 913, 110, 418, 977, 46, 214, 623, 605, 639, 567, 708, 428, 954, 69, 289, 792, 312, 846, 227, 655, 529, 779, 333, 908, 115, 451, 903, 132, 479, 866, 199, 597, 654, 530, 777, 339, 918, 105, 395, 1018, 5, 121, 464, 884, 162, 533, 769, 349, 937, 86, 327, 890, 152, 512, 804, 287, 790, 314, 850, 223, 648, 547, 745, 381, 1001, 22, 158, 525, 784, 324, 882, 165, 537, 762, 357, 952, 71, 291, 798, 301, 824, 263, 736, 392, 1022, 1, 117, 457, 894, 147, 505, 815, 274, 761, 359, 958, 65, 267, 743, 383, 1005, 18, 151, 511, 805, 286, 785, 322, 870, 186, 575, 696, 441, 923, 100, 374, 982, 41, 197, 592, 664, 508, 809, 281, 772, 346, 934, 89, 334, 910, 113, 429, 950, 73, 296, 814, 275, 764, 354, 946, 77, 305, 831, 250, 706, 431, 947, 76, 304, 830, 251, 711, 425, 957, 66, 278, 768, 350, 938, 85, 326, 888, 155, 518, 795, 306, 832, 249, 702, 435, 940, 83, 320, 861, 206, 610, 633, 583, 679, 471, 875, 174, 550, 739, 389, 1014, 9, 125, 468, 879, 168, 542, 752, 370, 974, 49, 222, 647, 552, 735, 393, 1021, 2, 118, 458, 893, 148, 507, 810, 280, 771, 347, 935, 88, 331, 904, 131, 477, 868, 193, 586, 674, 489, 848, 225, 651, 538, 760, 360, 959, 64, 266, 742, 384, 1006, 17, 145, 503, 820, 269, 751, 371, 975, 48, 220, 640, 566, 709, 427, 955, 68, 288, 791, 313, 847, 226, 652, 536, 763, 355, 948, 75, 300, 823, 264, 738, 390, 1020, 3, 119, 460, 891, 150, 510, 807, 283, 776, 340, 919, 104, 387, 1011, 12, 133, 480, 865, 201, 601, 645, 556, 730, 400, 1010, 13, 134, 481, 863, 203, 603, 642, 562, 716, 417, 978, 45, 212, 620, 611, 631, 585, 677, 478, 867, 198, 596, 656, 526, 783, 325, 887, 159, 527, 782, 329, 898, 142, 499, 826, 258, 723, 408, 994, 29, 178, 557, 729, 401, 1009, 14, 135, 482, 862, 205, 609, 634, 579, 689, 449, 907, 127, 472, 874, 180, 561, 719, 414, 986, 37, 191, 581, 684, 455, 897, 143, 501, 822, 265, 740, 388, 1012, 11, 129, 474, 872, 183, 569, 705, 432, 945, 78, 308, 834, 246, 695, 442, 922, 101, 377, 988, 35, 189, 578, 690, 448, 909, 114, 444, 920, 103, 386, 1008, 15, 139, 488, 849, 224, 650, 540, 755, 365, 964, 59, 255, 718, 415, 983, 40, 196, 590, 667, 496, 837, 242, 686, 453, 901, 137, 486, 852, 219, 638, 568, 707, 430, 949, 74, 299, 819, 270, 754, 366, 965, 58, 253, 715, 419, 976, 47, 217, 630, 588, 671, 492, 842, 233, 668, 495, 839, 238, 681, 463, 885, 161, 532, 773, 345, 932, 91, 337, 916, 107, 406, 998, 25, 171, 546, 746, 380, 997, 26, 175, 551, 737, 391, 1023, 0, 116, 456, 895, 146, 504, 817, 272, 758, 362, 961, 62, 260, 725, 405, 999, 24, 170, 545, 747, 379, 996, 27, 176, 553, 733, 397, 1016, 7, 123, 466, 881, 166, 539, 757, 363, 962, 61, 259, 724, 407, 995, 28, 177, 555, 731, 399, 1013, 10, 126, 469, 878, 169, 543, 749, 375, 984, 39, 195, 589, 670, 493, 841, 235, 672, 491, 843, 232, 666, 500, 825, 262, 734, 394, 1019, 4, 120, 461, 889, 154, 515, 800, 297, 816, 273, 759, 361, 960, 63, 261, 726, 404, 1000, 23, 163, 534]; +const x2mScrambleTable = [ + 681, 683, 340, 682, 680, 684, 339, 679, 685, 338, 678, 1023, 0, 341, 686, 337, 677, 1022, 1, 342, 687, 336, 676, + 1021, 2, 343, 688, 335, 675, 1020, 3, 344, 689, 334, 674, 1019, 4, 345, 690, 333, 673, 1018, 5, 346, 691, 332, 672, 1017, 6, 347, 692, + 331, 671, 1016, 7, 348, 693, 330, 670, 1015, 8, 349, 694, 329, 669, 1014, 9, 350, 695, 328, 668, 1013, 10, 351, 696, 327, 667, 1012, 11, + 352, 697, 326, 666, 1011, 12, 353, 698, 325, 665, 1010, 13, 354, 699, 324, 664, 1009, 14, 355, 700, 323, 663, 1008, 15, 356, 701, 322, 662, + 1007, 16, 357, 702, 321, 661, 1006, 17, 358, 703, 320, 660, 1005, 18, 359, 704, 319, 659, 1004, 19, 360, 705, 318, 658, 1003, 20, 361, 706, + 317, 657, 1002, 21, 362, 707, 316, 656, 1001, 22, 363, 708, 315, 655, 1000, 23, 364, 709, 314, 654, 999, 24, 365, 710, 313, 653, 998, 25, + 366, 711, 312, 652, 997, 26, 367, 712, 311, 651, 996, 27, 368, 713, 310, 650, 995, 28, 369, 714, 309, 649, 994, 29, 370, 715, 308, 648, 993, + 30, 371, 716, 307, 647, 992, 31, 372, 717, 169, 510, 855, 32, 373, 718, 170, 511, 856, 33, 374, 719, 171, 512, 857, 34, 375, 720, 172, 513, + 858, 35, 376, 721, 173, 514, 859, 36, 377, 722, 174, 515, 860, 37, 378, 723, 175, 516, 861, 38, 379, 724, 176, 517, 862, 39, 380, 725, 177, + 518, 863, 40, 381, 726, 178, 519, 864, 41, 382, 727, 179, 520, 865, 42, 383, 728, 180, 521, 866, 43, 384, 729, 181, 522, 867, 44, 385, 730, + 182, 523, 868, 45, 386, 731, 183, 524, 869, 46, 387, 732, 184, 525, 870, 47, 388, 733, 185, 526, 871, 48, 389, 734, 186, 527, 872, 49, 390, + 735, 187, 528, 873, 50, 391, 736, 188, 529, 874, 51, 392, 737, 189, 530, 875, 52, 393, 738, 190, 531, 876, 53, 394, 739, 191, 532, 877, 54, + 395, 740, 192, 533, 878, 55, 396, 741, 193, 534, 879, 56, 397, 742, 194, 535, 880, 57, 398, 743, 195, 536, 881, 58, 399, 744, 196, 537, 882, + 59, 400, 745, 197, 538, 883, 60, 401, 746, 198, 539, 884, 61, 402, 747, 199, 540, 885, 62, 403, 748, 200, 541, 886, 63, 404, 749, 201, 542, + 887, 64, 405, 750, 202, 543, 888, 65, 406, 751, 203, 544, 889, 66, 407, 752, 204, 545, 890, 67, 408, 753, 205, 546, 891, 68, 409, 754, 206, + 547, 892, 69, 410, 755, 207, 548, 893, 70, 411, 756, 208, 549, 894, 71, 412, 757, 209, 550, 895, 72, 413, 758, 210, 551, 896, 73, 414, 759, + 211, 552, 897, 74, 415, 760, 212, 553, 898, 75, 416, 761, 213, 554, 899, 76, 417, 762, 214, 555, 900, 77, 418, 763, 215, 556, 901, 78, 419, + 764, 216, 557, 902, 79, 420, 765, 217, 558, 903, 80, 421, 766, 218, 559, 904, 81, 422, 767, 219, 560, 905, 82, 423, 768, 220, 561, 906, 83, + 424, 769, 221, 562, 907, 84, 425, 770, 222, 563, 908, 85, 426, 771, 223, 564, 909, 86, 427, 772, 224, 565, 910, 87, 428, 773, 225, 566, 911, + 88, 429, 774, 226, 567, 912, 89, 430, 775, 227, 568, 913, 90, 431, 776, 228, 569, 914, 91, 432, 777, 229, 570, 915, 92, 433, 778, 230, 571, + 916, 93, 434, 779, 231, 572, 917, 94, 435, 780, 232, 573, 918, 95, 436, 781, 233, 574, 919, 96, 437, 782, 234, 575, 920, 97, 438, 783, 235, + 576, 921, 98, 439, 784, 236, 577, 922, 99, 440, 785, 237, 578, 923, 100, 441, 786, 238, 579, 924, 101, 442, 787, 239, 580, 925, 102, 443, 788, + 240, 581, 926, 103, 444, 789, 241, 582, 927, 104, 445, 790, 242, 583, 928, 105, 446, 791, 243, 584, 929, 106, 447, 792, 244, 585, 930, 107, + 448, 793, 245, 586, 931, 108, 449, 794, 246, 587, 932, 109, 450, 795, 247, 588, 933, 110, 451, 796, 248, 589, 934, 111, 452, 797, 249, 590, + 935, 112, 453, 798, 250, 591, 936, 113, 454, 799, 251, 592, 937, 114, 455, 800, 252, 593, 938, 115, 456, 801, 253, 594, 939, 116, 457, 802, + 254, 595, 940, 117, 458, 803, 255, 596, 941, 118, 459, 804, 256, 597, 942, 119, 460, 805, 257, 598, 943, 120, 461, 806, 258, 599, 944, 121, + 462, 807, 259, 600, 945, 122, 463, 808, 260, 601, 946, 123, 464, 809, 261, 602, 947, 124, 465, 810, 262, 603, 948, 125, 466, 811, 263, 604, + 949, 126, 467, 812, 264, 605, 950, 127, 468, 813, 265, 606, 951, 128, 469, 814, 266, 607, 952, 129, 470, 815, 267, 608, 953, 130, 471, 816, + 268, 609, 954, 131, 472, 817, 269, 610, 955, 132, 473, 818, 270, 611, 956, 133, 474, 819, 271, 612, 957, 134, 475, 820, 272, 613, 958, 135, + 476, 821, 273, 614, 959, 136, 477, 822, 274, 615, 960, 137, 478, 823, 275, 616, 961, 138, 479, 824, 276, 617, 962, 139, 480, 825, 277, 618, + 963, 140, 481, 826, 278, 619, 964, 141, 482, 827, 279, 620, 965, 142, 483, 828, 280, 621, 966, 143, 484, 829, 281, 622, 967, 144, 485, 830, + 282, 623, 968, 145, 486, 831, 283, 624, 969, 146, 487, 832, 284, 625, 970, 147, 488, 833, 285, 626, 971, 148, 489, 834, 286, 627, 972, 149, + 490, 835, 287, 628, 973, 150, 491, 836, 288, 629, 974, 151, 492, 837, 289, 630, 975, 152, 493, 838, 290, 631, 976, 153, 494, 839, 291, 632, + 977, 154, 495, 840, 292, 633, 978, 155, 496, 841, 293, 634, 979, 156, 497, 842, 294, 635, 980, 157, 498, 843, 295, 636, 981, 158, 499, 844, + 296, 637, 982, 159, 500, 845, 297, 638, 983, 160, 501, 846, 298, 639, 984, 161, 502, 847, 299, 640, 985, 162, 503, 848, 300, 641, 986, 163, + 504, 849, 301, 642, 987, 164, 505, 850, 302, 643, 988, 165, 506, 851, 303, 644, 989, 166, 507, 852, 304, 645, 990, 167, 508, 853, 305, 646, + 991, 168, 509, 854, 306 +]; + + + +const x3mScrambleTable = [ + 598, 653, 531, 775, 342, 925, 98, 368, 970, 53, 237, 676, 484, 857, 211, 619, 613, 628, 593, 663, 514, 802, 294, 811, 279, + 770, 348, 936, 87, 328, 896, 144, 502, 821, 268, 750, 373, 980, 43, 204, 608, 635, 573, 699, 438, 929, 94, 343, 926, 97, 367, 966, 57, 247, 697, + 440, 927, 96, 358, 953, 70, 290, 796, 303, 829, 252, 714, 420, 972, 51, 230, 659, 521, 789, 317, 856, 213, 622, 606, 637, 570, 704, 433, 943, 80, + 310, 838, 239, 682, 462, 886, 160, 528, 780, 332, 905, 130, 475, 871, 185, 574, 698, 439, 928, 95, 356, 951, 72, 293, 806, 284, 778, 335, 911, 112, + 424, 967, 56, 245, 693, 445, 915, 108, 409, 993, 30, 179, 559, 727, 403, 1002, 21, 157, 522, 788, 318, 858, 210, 618, 615, 626, 595, 660, 520, 793, + 311, 844, 231, 661, 517, 797, 302, 828, 254, 717, 416, 981, 42, 200, 600, 646, 554, 732, 398, 1015, 8, 124, 467, 880, 167, 541, 753, 369, 973, 50, + 229, 658, 523, 787, 319, 860, 208, 614, 627, 594, 662, 516, 799, 298, 818, 271, 756, 364, 963, 60, 257, 722, 410, 992, 31, 181, 563, 713, 422, 969, + 54, 240, 683, 459, 892, 149, 509, 808, 282, 774, 344, 930, 93, 341, 924, 99, 372, 979, 44, 207, 612, 629, 591, 665, 506, 812, 277, 767, 351, 939, 84, + 323, 876, 173, 549, 741, 385, 1007, 16, 140, 497, 836, 243, 687, 452, 902, 136, 483, 859, 209, 617, 616, 621, 607, 636, 571, 703, 434, 942, 81, 315, + 853, 218, 632, 584, 678, 476, 869, 192, 582, 680, 470, 877, 172, 548, 744, 382, 1003, 20, 156, 519, 794, 307, 833, 248, 700, 437, 931, 92, 338, 917, + 106, 396, 1017, 6, 122, 465, 883, 164, 535, 766, 352, 941, 82, 316, 855, 215, 624, 604, 641, 565, 710, 426, 956, 67, 285, 781, 330, 900, 138, 487, + 851, 221, 644, 558, 728, 402, 1004, 19, 153, 513, 803, 292, 801, 295, 813, 276, 765, 353, 944, 79, 309, 835, 244, 692, 446, 914, 109, 413, 987, 36, + 190, 580, 688, 450, 906, 128, 473, 873, 182, 564, 712, 423, 968, 55, 241, 685, 454, 899, 141, 498, 827, 256, 721, 411, 990, 33, 187, 576, 694, 443, + 921, 102, 378, 991, 32, 184, 572, 701, 436, 933, 90, 336, 912, 111, 421, 971, 52, 234, 669, 494, 840, 236, 675, 485, 854, 216, 625, 599, 649, 544, + 748, 376, 985, 38, 194, 587, 673, 490, 845, 228, 657, 524, 786, 321, 864, 202, 602, 643, 560, 720, 412, 989, 34, 188, 577, 691, 447, 913, 110, 418, + 977, 46, 214, 623, 605, 639, 567, 708, 428, 954, 69, 289, 792, 312, 846, 227, 655, 529, 779, 333, 908, 115, 451, 903, 132, 479, 866, 199, 597, 654, + 530, 777, 339, 918, 105, 395, 1018, 5, 121, 464, 884, 162, 533, 769, 349, 937, 86, 327, 890, 152, 512, 804, 287, 790, 314, 850, 223, 648, 547, 745, + 381, 1001, 22, 158, 525, 784, 324, 882, 165, 537, 762, 357, 952, 71, 291, 798, 301, 824, 263, 736, 392, 1022, 1, 117, 457, 894, 147, 505, 815, 274, + 761, 359, 958, 65, 267, 743, 383, 1005, 18, 151, 511, 805, 286, 785, 322, 870, 186, 575, 696, 441, 923, 100, 374, 982, 41, 197, 592, 664, 508, 809, + 281, 772, 346, 934, 89, 334, 910, 113, 429, 950, 73, 296, 814, 275, 764, 354, 946, 77, 305, 831, 250, 706, 431, 947, 76, 304, 830, 251, 711, 425, 957, + 66, 278, 768, 350, 938, 85, 326, 888, 155, 518, 795, 306, 832, 249, 702, 435, 940, 83, 320, 861, 206, 610, 633, 583, 679, 471, 875, 174, 550, 739, + 389, 1014, 9, 125, 468, 879, 168, 542, 752, 370, 974, 49, 222, 647, 552, 735, 393, 1021, 2, 118, 458, 893, 148, 507, 810, 280, 771, 347, 935, 88, + 331, 904, 131, 477, 868, 193, 586, 674, 489, 848, 225, 651, 538, 760, 360, 959, 64, 266, 742, 384, 1006, 17, 145, 503, 820, 269, 751, 371, 975, 48, + 220, 640, 566, 709, 427, 955, 68, 288, 791, 313, 847, 226, 652, 536, 763, 355, 948, 75, 300, 823, 264, 738, 390, 1020, 3, 119, 460, 891, 150, 510, + 807, 283, 776, 340, 919, 104, 387, 1011, 12, 133, 480, 865, 201, 601, 645, 556, 730, 400, 1010, 13, 134, 481, 863, 203, 603, 642, 562, 716, 417, 978, + 45, 212, 620, 611, 631, 585, 677, 478, 867, 198, 596, 656, 526, 783, 325, 887, 159, 527, 782, 329, 898, 142, 499, 826, 258, 723, 408, 994, 29, 178, + 557, 729, 401, 1009, 14, 135, 482, 862, 205, 609, 634, 579, 689, 449, 907, 127, 472, 874, 180, 561, 719, 414, 986, 37, 191, 581, 684, 455, 897, 143, + 501, 822, 265, 740, 388, 1012, 11, 129, 474, 872, 183, 569, 705, 432, 945, 78, 308, 834, 246, 695, 442, 922, 101, 377, 988, 35, 189, 578, 690, 448, + 909, 114, 444, 920, 103, 386, 1008, 15, 139, 488, 849, 224, 650, 540, 755, 365, 964, 59, 255, 718, 415, 983, 40, 196, 590, 667, 496, 837, 242, 686, + 453, 901, 137, 486, 852, 219, 638, 568, 707, 430, 949, 74, 299, 819, 270, 754, 366, 965, 58, 253, 715, 419, 976, 47, 217, 630, 588, 671, 492, 842, + 233, 668, 495, 839, 238, 681, 463, 885, 161, 532, 773, 345, 932, 91, 337, 916, 107, 406, 998, 25, 171, 546, 746, 380, 997, 26, 175, 551, 737, 391, + 1023, 0, 116, 456, 895, 146, 504, 817, 272, 758, 362, 961, 62, 260, 725, 405, 999, 24, 170, 545, 747, 379, 996, 27, 176, 553, 733, 397, 1016, 7, 123, + 466, 881, 166, 539, 757, 363, 962, 61, 259, 724, 407, 995, 28, 177, 555, 731, 399, 1013, 10, 126, 469, 878, 169, 543, 749, 375, 984, 39, 195, 589, + 670, 493, 841, 235, 672, 491, 843, 232, 666, 500, 825, 262, 734, 394, 1019, 4, 120, 461, 889, 154, 515, 800, 297, 816, 273, 759, 361, 960, 63, 261, + 726, 404, 1000, 23, 163, 534 +]; From d21c48caffb91de5bd056ed6899b6ac11069c9ec Mon Sep 17 00:00:00 2001 From: Yuki1536 <69851694+Yuki1536@users.noreply.github.com> Date: Thu, 15 Dec 2022 12:08:12 +0900 Subject: [PATCH 7/9] Small fixes --- src/decrypt/ximalaya.ts | 231 +++++++++++++++++++++++++--------------- 1 file changed, 147 insertions(+), 84 deletions(-) diff --git a/src/decrypt/ximalaya.ts b/src/decrypt/ximalaya.ts index 2581e26..9352ff4 100644 --- a/src/decrypt/ximalaya.ts +++ b/src/decrypt/ximalaya.ts @@ -2,20 +2,17 @@ import { parseBlob as metaParseBlob } from 'music-metadata-browser'; import { AudioMimeType, SniffAudioExt, GetArrayBuffer, GetMetaFromFile } from "./utils"; import { DecryptResult } from '@/decrypt/entity'; -interface Handler { - handler: Function; -} -const HandlerMap: { [key: string]: Handler } = { - "x2m": { handler: ProcessX2M }, - "x3m": { handler: ProcessX3M } -}; +const HandlerMap: Map = new Map([ + ["x2m", ProcessX2M], + ["x3m", ProcessX3M], +]); export async function Decrypt(file: File, raw_filename: string, raw_ext: string): Promise { const buffer = new Uint8Array(await GetArrayBuffer(file)); - if (!(raw_ext in HandlerMap)) throw "File type is incorrect!"; - const Handler = HandlerMap[raw_ext]; - let musicDecoded: Uint8Array = Handler.handler(buffer); + const handler = HandlerMap.get(raw_ext); + if (!handler) throw "File type is incorrect!"; + let musicDecoded: Uint8Array = handler(buffer); const ext = SniffAudioExt(musicDecoded, "m4a"); const mime = AudioMimeType[ext]; @@ -40,7 +37,7 @@ export async function Decrypt(file: File, raw_filename: string, raw_ext: string) function ProcessX2M(data: Uint8Array) { const x2mHeaderSize = 1024; - const x2mKey = [120, 109, 108, 121]; + const x2mKey = [0x78, 0x6d, 0x6c, 0x79]; let encryptedHeader = data.slice(0, x2mHeaderSize); for (let idx = 0; idx < x2mHeaderSize; idx++) { let srcIdx = x2mScrambleTable[idx]; @@ -51,7 +48,15 @@ function ProcessX2M(data: Uint8Array) { function ProcessX3M(data: Uint8Array) { const x3mHeaderSize = 1024; - const x3mKey = [51, 57, 56, 57, 100, 49, 49, 49, 97, 97, 100, 53, 54, 49, 51, 57, 52, 48, 102, 52, 102, 99, 52, 52, 98, 54, 51, 57, 98, 50, 57, 50]; + + //prettier-ignore: uint8, size 32(8x4) + const x3mKey = [ + 0x33, 0x39, 0x38, 0x39, 0x64, 0x31, 0x31, 0x31, + 0x61, 0x61, 0x64, 0x35, 0x36, 0x31, 0x33, 0x39, + 0x34, 0x30, 0x66, 0x34, 0x66, 0x63, 0x34, 0x34, + 0x62, 0x36, 0x33, 0x39, 0x62, 0x32, 0x39, 0x32 + ]; + let encryptedHeader = data.slice(0, x3mHeaderSize); for (let dstIdx = 0; dstIdx < x3mHeaderSize; dstIdx++) { let srcIdx = x3mScrambleTable[dstIdx]; @@ -60,82 +65,140 @@ function ProcessX3M(data: Uint8Array) { return data; } +//prettier-ignore: uint16, size 1024 (64x16) const x2mScrambleTable = [ - 681, 683, 340, 682, 680, 684, 339, 679, 685, 338, 678, 1023, 0, 341, 686, 337, 677, 1022, 1, 342, 687, 336, 676, - 1021, 2, 343, 688, 335, 675, 1020, 3, 344, 689, 334, 674, 1019, 4, 345, 690, 333, 673, 1018, 5, 346, 691, 332, 672, 1017, 6, 347, 692, - 331, 671, 1016, 7, 348, 693, 330, 670, 1015, 8, 349, 694, 329, 669, 1014, 9, 350, 695, 328, 668, 1013, 10, 351, 696, 327, 667, 1012, 11, - 352, 697, 326, 666, 1011, 12, 353, 698, 325, 665, 1010, 13, 354, 699, 324, 664, 1009, 14, 355, 700, 323, 663, 1008, 15, 356, 701, 322, 662, - 1007, 16, 357, 702, 321, 661, 1006, 17, 358, 703, 320, 660, 1005, 18, 359, 704, 319, 659, 1004, 19, 360, 705, 318, 658, 1003, 20, 361, 706, - 317, 657, 1002, 21, 362, 707, 316, 656, 1001, 22, 363, 708, 315, 655, 1000, 23, 364, 709, 314, 654, 999, 24, 365, 710, 313, 653, 998, 25, - 366, 711, 312, 652, 997, 26, 367, 712, 311, 651, 996, 27, 368, 713, 310, 650, 995, 28, 369, 714, 309, 649, 994, 29, 370, 715, 308, 648, 993, - 30, 371, 716, 307, 647, 992, 31, 372, 717, 169, 510, 855, 32, 373, 718, 170, 511, 856, 33, 374, 719, 171, 512, 857, 34, 375, 720, 172, 513, - 858, 35, 376, 721, 173, 514, 859, 36, 377, 722, 174, 515, 860, 37, 378, 723, 175, 516, 861, 38, 379, 724, 176, 517, 862, 39, 380, 725, 177, - 518, 863, 40, 381, 726, 178, 519, 864, 41, 382, 727, 179, 520, 865, 42, 383, 728, 180, 521, 866, 43, 384, 729, 181, 522, 867, 44, 385, 730, - 182, 523, 868, 45, 386, 731, 183, 524, 869, 46, 387, 732, 184, 525, 870, 47, 388, 733, 185, 526, 871, 48, 389, 734, 186, 527, 872, 49, 390, - 735, 187, 528, 873, 50, 391, 736, 188, 529, 874, 51, 392, 737, 189, 530, 875, 52, 393, 738, 190, 531, 876, 53, 394, 739, 191, 532, 877, 54, - 395, 740, 192, 533, 878, 55, 396, 741, 193, 534, 879, 56, 397, 742, 194, 535, 880, 57, 398, 743, 195, 536, 881, 58, 399, 744, 196, 537, 882, - 59, 400, 745, 197, 538, 883, 60, 401, 746, 198, 539, 884, 61, 402, 747, 199, 540, 885, 62, 403, 748, 200, 541, 886, 63, 404, 749, 201, 542, - 887, 64, 405, 750, 202, 543, 888, 65, 406, 751, 203, 544, 889, 66, 407, 752, 204, 545, 890, 67, 408, 753, 205, 546, 891, 68, 409, 754, 206, - 547, 892, 69, 410, 755, 207, 548, 893, 70, 411, 756, 208, 549, 894, 71, 412, 757, 209, 550, 895, 72, 413, 758, 210, 551, 896, 73, 414, 759, - 211, 552, 897, 74, 415, 760, 212, 553, 898, 75, 416, 761, 213, 554, 899, 76, 417, 762, 214, 555, 900, 77, 418, 763, 215, 556, 901, 78, 419, - 764, 216, 557, 902, 79, 420, 765, 217, 558, 903, 80, 421, 766, 218, 559, 904, 81, 422, 767, 219, 560, 905, 82, 423, 768, 220, 561, 906, 83, - 424, 769, 221, 562, 907, 84, 425, 770, 222, 563, 908, 85, 426, 771, 223, 564, 909, 86, 427, 772, 224, 565, 910, 87, 428, 773, 225, 566, 911, - 88, 429, 774, 226, 567, 912, 89, 430, 775, 227, 568, 913, 90, 431, 776, 228, 569, 914, 91, 432, 777, 229, 570, 915, 92, 433, 778, 230, 571, - 916, 93, 434, 779, 231, 572, 917, 94, 435, 780, 232, 573, 918, 95, 436, 781, 233, 574, 919, 96, 437, 782, 234, 575, 920, 97, 438, 783, 235, - 576, 921, 98, 439, 784, 236, 577, 922, 99, 440, 785, 237, 578, 923, 100, 441, 786, 238, 579, 924, 101, 442, 787, 239, 580, 925, 102, 443, 788, - 240, 581, 926, 103, 444, 789, 241, 582, 927, 104, 445, 790, 242, 583, 928, 105, 446, 791, 243, 584, 929, 106, 447, 792, 244, 585, 930, 107, - 448, 793, 245, 586, 931, 108, 449, 794, 246, 587, 932, 109, 450, 795, 247, 588, 933, 110, 451, 796, 248, 589, 934, 111, 452, 797, 249, 590, - 935, 112, 453, 798, 250, 591, 936, 113, 454, 799, 251, 592, 937, 114, 455, 800, 252, 593, 938, 115, 456, 801, 253, 594, 939, 116, 457, 802, - 254, 595, 940, 117, 458, 803, 255, 596, 941, 118, 459, 804, 256, 597, 942, 119, 460, 805, 257, 598, 943, 120, 461, 806, 258, 599, 944, 121, - 462, 807, 259, 600, 945, 122, 463, 808, 260, 601, 946, 123, 464, 809, 261, 602, 947, 124, 465, 810, 262, 603, 948, 125, 466, 811, 263, 604, - 949, 126, 467, 812, 264, 605, 950, 127, 468, 813, 265, 606, 951, 128, 469, 814, 266, 607, 952, 129, 470, 815, 267, 608, 953, 130, 471, 816, - 268, 609, 954, 131, 472, 817, 269, 610, 955, 132, 473, 818, 270, 611, 956, 133, 474, 819, 271, 612, 957, 134, 475, 820, 272, 613, 958, 135, - 476, 821, 273, 614, 959, 136, 477, 822, 274, 615, 960, 137, 478, 823, 275, 616, 961, 138, 479, 824, 276, 617, 962, 139, 480, 825, 277, 618, - 963, 140, 481, 826, 278, 619, 964, 141, 482, 827, 279, 620, 965, 142, 483, 828, 280, 621, 966, 143, 484, 829, 281, 622, 967, 144, 485, 830, - 282, 623, 968, 145, 486, 831, 283, 624, 969, 146, 487, 832, 284, 625, 970, 147, 488, 833, 285, 626, 971, 148, 489, 834, 286, 627, 972, 149, - 490, 835, 287, 628, 973, 150, 491, 836, 288, 629, 974, 151, 492, 837, 289, 630, 975, 152, 493, 838, 290, 631, 976, 153, 494, 839, 291, 632, - 977, 154, 495, 840, 292, 633, 978, 155, 496, 841, 293, 634, 979, 156, 497, 842, 294, 635, 980, 157, 498, 843, 295, 636, 981, 158, 499, 844, - 296, 637, 982, 159, 500, 845, 297, 638, 983, 160, 501, 846, 298, 639, 984, 161, 502, 847, 299, 640, 985, 162, 503, 848, 300, 641, 986, 163, - 504, 849, 301, 642, 987, 164, 505, 850, 302, 643, 988, 165, 506, 851, 303, 644, 989, 166, 507, 852, 304, 645, 990, 167, 508, 853, 305, 646, - 991, 168, 509, 854, 306 + 0x2a9, 0x2ab, 0x154, 0x2aa, 0x2a8, 0x2ac, 0x153, 0x2a7, 0x2ad, 0x152, 0x2a6, 0x3ff, 0x000, 0x155, 0x2ae, 0x151, + 0x2a5, 0x3fe, 0x001, 0x156, 0x2af, 0x150, 0x2a4, 0x3fd, 0x002, 0x157, 0x2b0, 0x14f, 0x2a3, 0x3fc, 0x003, 0x158, + 0x2b1, 0x14e, 0x2a2, 0x3fb, 0x004, 0x159, 0x2b2, 0x14d, 0x2a1, 0x3fa, 0x005, 0x15a, 0x2b3, 0x14c, 0x2a0, 0x3f9, + 0x006, 0x15b, 0x2b4, 0x14b, 0x29f, 0x3f8, 0x007, 0x15c, 0x2b5, 0x14a, 0x29e, 0x3f7, 0x008, 0x15d, 0x2b6, 0x149, + 0x29d, 0x3f6, 0x009, 0x15e, 0x2b7, 0x148, 0x29c, 0x3f5, 0x00a, 0x15f, 0x2b8, 0x147, 0x29b, 0x3f4, 0x00b, 0x160, + 0x2b9, 0x146, 0x29a, 0x3f3, 0x00c, 0x161, 0x2ba, 0x145, 0x299, 0x3f2, 0x00d, 0x162, 0x2bb, 0x144, 0x298, 0x3f1, + 0x00e, 0x163, 0x2bc, 0x143, 0x297, 0x3f0, 0x00f, 0x164, 0x2bd, 0x142, 0x296, 0x3ef, 0x010, 0x165, 0x2be, 0x141, + 0x295, 0x3ee, 0x011, 0x166, 0x2bf, 0x140, 0x294, 0x3ed, 0x012, 0x167, 0x2c0, 0x13f, 0x293, 0x3ec, 0x013, 0x168, + 0x2c1, 0x13e, 0x292, 0x3eb, 0x014, 0x169, 0x2c2, 0x13d, 0x291, 0x3ea, 0x015, 0x16a, 0x2c3, 0x13c, 0x290, 0x3e9, + 0x016, 0x16b, 0x2c4, 0x13b, 0x28f, 0x3e8, 0x017, 0x16c, 0x2c5, 0x13a, 0x28e, 0x3e7, 0x018, 0x16d, 0x2c6, 0x139, + 0x28d, 0x3e6, 0x019, 0x16e, 0x2c7, 0x138, 0x28c, 0x3e5, 0x01a, 0x16f, 0x2c8, 0x137, 0x28b, 0x3e4, 0x01b, 0x170, + 0x2c9, 0x136, 0x28a, 0x3e3, 0x01c, 0x171, 0x2ca, 0x135, 0x289, 0x3e2, 0x01d, 0x172, 0x2cb, 0x134, 0x288, 0x3e1, + 0x01e, 0x173, 0x2cc, 0x133, 0x287, 0x3e0, 0x01f, 0x174, 0x2cd, 0x0a9, 0x1fe, 0x357, 0x020, 0x175, 0x2ce, 0x0aa, + 0x1ff, 0x358, 0x021, 0x176, 0x2cf, 0x0ab, 0x200, 0x359, 0x022, 0x177, 0x2d0, 0x0ac, 0x201, 0x35a, 0x023, 0x178, + 0x2d1, 0x0ad, 0x202, 0x35b, 0x024, 0x179, 0x2d2, 0x0ae, 0x203, 0x35c, 0x025, 0x17a, 0x2d3, 0x0af, 0x204, 0x35d, + 0x026, 0x17b, 0x2d4, 0x0b0, 0x205, 0x35e, 0x027, 0x17c, 0x2d5, 0x0b1, 0x206, 0x35f, 0x028, 0x17d, 0x2d6, 0x0b2, + 0x207, 0x360, 0x029, 0x17e, 0x2d7, 0x0b3, 0x208, 0x361, 0x02a, 0x17f, 0x2d8, 0x0b4, 0x209, 0x362, 0x02b, 0x180, + 0x2d9, 0x0b5, 0x20a, 0x363, 0x02c, 0x181, 0x2da, 0x0b6, 0x20b, 0x364, 0x02d, 0x182, 0x2db, 0x0b7, 0x20c, 0x365, + 0x02e, 0x183, 0x2dc, 0x0b8, 0x20d, 0x366, 0x02f, 0x184, 0x2dd, 0x0b9, 0x20e, 0x367, 0x030, 0x185, 0x2de, 0x0ba, + 0x20f, 0x368, 0x031, 0x186, 0x2df, 0x0bb, 0x210, 0x369, 0x032, 0x187, 0x2e0, 0x0bc, 0x211, 0x36a, 0x033, 0x188, + 0x2e1, 0x0bd, 0x212, 0x36b, 0x034, 0x189, 0x2e2, 0x0be, 0x213, 0x36c, 0x035, 0x18a, 0x2e3, 0x0bf, 0x214, 0x36d, + 0x036, 0x18b, 0x2e4, 0x0c0, 0x215, 0x36e, 0x037, 0x18c, 0x2e5, 0x0c1, 0x216, 0x36f, 0x038, 0x18d, 0x2e6, 0x0c2, + 0x217, 0x370, 0x039, 0x18e, 0x2e7, 0x0c3, 0x218, 0x371, 0x03a, 0x18f, 0x2e8, 0x0c4, 0x219, 0x372, 0x03b, 0x190, + 0x2e9, 0x0c5, 0x21a, 0x373, 0x03c, 0x191, 0x2ea, 0x0c6, 0x21b, 0x374, 0x03d, 0x192, 0x2eb, 0x0c7, 0x21c, 0x375, + 0x03e, 0x193, 0x2ec, 0x0c8, 0x21d, 0x376, 0x03f, 0x194, 0x2ed, 0x0c9, 0x21e, 0x377, 0x040, 0x195, 0x2ee, 0x0ca, + 0x21f, 0x378, 0x041, 0x196, 0x2ef, 0x0cb, 0x220, 0x379, 0x042, 0x197, 0x2f0, 0x0cc, 0x221, 0x37a, 0x043, 0x198, + 0x2f1, 0x0cd, 0x222, 0x37b, 0x044, 0x199, 0x2f2, 0x0ce, 0x223, 0x37c, 0x045, 0x19a, 0x2f3, 0x0cf, 0x224, 0x37d, + 0x046, 0x19b, 0x2f4, 0x0d0, 0x225, 0x37e, 0x047, 0x19c, 0x2f5, 0x0d1, 0x226, 0x37f, 0x048, 0x19d, 0x2f6, 0x0d2, + 0x227, 0x380, 0x049, 0x19e, 0x2f7, 0x0d3, 0x228, 0x381, 0x04a, 0x19f, 0x2f8, 0x0d4, 0x229, 0x382, 0x04b, 0x1a0, + 0x2f9, 0x0d5, 0x22a, 0x383, 0x04c, 0x1a1, 0x2fa, 0x0d6, 0x22b, 0x384, 0x04d, 0x1a2, 0x2fb, 0x0d7, 0x22c, 0x385, + 0x04e, 0x1a3, 0x2fc, 0x0d8, 0x22d, 0x386, 0x04f, 0x1a4, 0x2fd, 0x0d9, 0x22e, 0x387, 0x050, 0x1a5, 0x2fe, 0x0da, + 0x22f, 0x388, 0x051, 0x1a6, 0x2ff, 0x0db, 0x230, 0x389, 0x052, 0x1a7, 0x300, 0x0dc, 0x231, 0x38a, 0x053, 0x1a8, + 0x301, 0x0dd, 0x232, 0x38b, 0x054, 0x1a9, 0x302, 0x0de, 0x233, 0x38c, 0x055, 0x1aa, 0x303, 0x0df, 0x234, 0x38d, + 0x056, 0x1ab, 0x304, 0x0e0, 0x235, 0x38e, 0x057, 0x1ac, 0x305, 0x0e1, 0x236, 0x38f, 0x058, 0x1ad, 0x306, 0x0e2, + 0x237, 0x390, 0x059, 0x1ae, 0x307, 0x0e3, 0x238, 0x391, 0x05a, 0x1af, 0x308, 0x0e4, 0x239, 0x392, 0x05b, 0x1b0, + 0x309, 0x0e5, 0x23a, 0x393, 0x05c, 0x1b1, 0x30a, 0x0e6, 0x23b, 0x394, 0x05d, 0x1b2, 0x30b, 0x0e7, 0x23c, 0x395, + 0x05e, 0x1b3, 0x30c, 0x0e8, 0x23d, 0x396, 0x05f, 0x1b4, 0x30d, 0x0e9, 0x23e, 0x397, 0x060, 0x1b5, 0x30e, 0x0ea, + 0x23f, 0x398, 0x061, 0x1b6, 0x30f, 0x0eb, 0x240, 0x399, 0x062, 0x1b7, 0x310, 0x0ec, 0x241, 0x39a, 0x063, 0x1b8, + 0x311, 0x0ed, 0x242, 0x39b, 0x064, 0x1b9, 0x312, 0x0ee, 0x243, 0x39c, 0x065, 0x1ba, 0x313, 0x0ef, 0x244, 0x39d, + 0x066, 0x1bb, 0x314, 0x0f0, 0x245, 0x39e, 0x067, 0x1bc, 0x315, 0x0f1, 0x246, 0x39f, 0x068, 0x1bd, 0x316, 0x0f2, + 0x247, 0x3a0, 0x069, 0x1be, 0x317, 0x0f3, 0x248, 0x3a1, 0x06a, 0x1bf, 0x318, 0x0f4, 0x249, 0x3a2, 0x06b, 0x1c0, + 0x319, 0x0f5, 0x24a, 0x3a3, 0x06c, 0x1c1, 0x31a, 0x0f6, 0x24b, 0x3a4, 0x06d, 0x1c2, 0x31b, 0x0f7, 0x24c, 0x3a5, + 0x06e, 0x1c3, 0x31c, 0x0f8, 0x24d, 0x3a6, 0x06f, 0x1c4, 0x31d, 0x0f9, 0x24e, 0x3a7, 0x070, 0x1c5, 0x31e, 0x0fa, + 0x24f, 0x3a8, 0x071, 0x1c6, 0x31f, 0x0fb, 0x250, 0x3a9, 0x072, 0x1c7, 0x320, 0x0fc, 0x251, 0x3aa, 0x073, 0x1c8, + 0x321, 0x0fd, 0x252, 0x3ab, 0x074, 0x1c9, 0x322, 0x0fe, 0x253, 0x3ac, 0x075, 0x1ca, 0x323, 0x0ff, 0x254, 0x3ad, + 0x076, 0x1cb, 0x324, 0x100, 0x255, 0x3ae, 0x077, 0x1cc, 0x325, 0x101, 0x256, 0x3af, 0x078, 0x1cd, 0x326, 0x102, + 0x257, 0x3b0, 0x079, 0x1ce, 0x327, 0x103, 0x258, 0x3b1, 0x07a, 0x1cf, 0x328, 0x104, 0x259, 0x3b2, 0x07b, 0x1d0, + 0x329, 0x105, 0x25a, 0x3b3, 0x07c, 0x1d1, 0x32a, 0x106, 0x25b, 0x3b4, 0x07d, 0x1d2, 0x32b, 0x107, 0x25c, 0x3b5, + 0x07e, 0x1d3, 0x32c, 0x108, 0x25d, 0x3b6, 0x07f, 0x1d4, 0x32d, 0x109, 0x25e, 0x3b7, 0x080, 0x1d5, 0x32e, 0x10a, + 0x25f, 0x3b8, 0x081, 0x1d6, 0x32f, 0x10b, 0x260, 0x3b9, 0x082, 0x1d7, 0x330, 0x10c, 0x261, 0x3ba, 0x083, 0x1d8, + 0x331, 0x10d, 0x262, 0x3bb, 0x084, 0x1d9, 0x332, 0x10e, 0x263, 0x3bc, 0x085, 0x1da, 0x333, 0x10f, 0x264, 0x3bd, + 0x086, 0x1db, 0x334, 0x110, 0x265, 0x3be, 0x087, 0x1dc, 0x335, 0x111, 0x266, 0x3bf, 0x088, 0x1dd, 0x336, 0x112, + 0x267, 0x3c0, 0x089, 0x1de, 0x337, 0x113, 0x268, 0x3c1, 0x08a, 0x1df, 0x338, 0x114, 0x269, 0x3c2, 0x08b, 0x1e0, + 0x339, 0x115, 0x26a, 0x3c3, 0x08c, 0x1e1, 0x33a, 0x116, 0x26b, 0x3c4, 0x08d, 0x1e2, 0x33b, 0x117, 0x26c, 0x3c5, + 0x08e, 0x1e3, 0x33c, 0x118, 0x26d, 0x3c6, 0x08f, 0x1e4, 0x33d, 0x119, 0x26e, 0x3c7, 0x090, 0x1e5, 0x33e, 0x11a, + 0x26f, 0x3c8, 0x091, 0x1e6, 0x33f, 0x11b, 0x270, 0x3c9, 0x092, 0x1e7, 0x340, 0x11c, 0x271, 0x3ca, 0x093, 0x1e8, + 0x341, 0x11d, 0x272, 0x3cb, 0x094, 0x1e9, 0x342, 0x11e, 0x273, 0x3cc, 0x095, 0x1ea, 0x343, 0x11f, 0x274, 0x3cd, + 0x096, 0x1eb, 0x344, 0x120, 0x275, 0x3ce, 0x097, 0x1ec, 0x345, 0x121, 0x276, 0x3cf, 0x098, 0x1ed, 0x346, 0x122, + 0x277, 0x3d0, 0x099, 0x1ee, 0x347, 0x123, 0x278, 0x3d1, 0x09a, 0x1ef, 0x348, 0x124, 0x279, 0x3d2, 0x09b, 0x1f0, + 0x349, 0x125, 0x27a, 0x3d3, 0x09c, 0x1f1, 0x34a, 0x126, 0x27b, 0x3d4, 0x09d, 0x1f2, 0x34b, 0x127, 0x27c, 0x3d5, + 0x09e, 0x1f3, 0x34c, 0x128, 0x27d, 0x3d6, 0x09f, 0x1f4, 0x34d, 0x129, 0x27e, 0x3d7, 0x0a0, 0x1f5, 0x34e, 0x12a, + 0x27f, 0x3d8, 0x0a1, 0x1f6, 0x34f, 0x12b, 0x280, 0x3d9, 0x0a2, 0x1f7, 0x350, 0x12c, 0x281, 0x3da, 0x0a3, 0x1f8, + 0x351, 0x12d, 0x282, 0x3db, 0x0a4, 0x1f9, 0x352, 0x12e, 0x283, 0x3dc, 0x0a5, 0x1fa, 0x353, 0x12f, 0x284, 0x3dd, + 0x0a6, 0x1fb, 0x354, 0x130, 0x285, 0x3de, 0x0a7, 0x1fc, 0x355, 0x131, 0x286, 0x3df, 0x0a8, 0x1fd, 0x356, 0x132 ]; +//prettier-ignore: uint16, size 1024 (64x16) const x3mScrambleTable = [ - 598, 653, 531, 775, 342, 925, 98, 368, 970, 53, 237, 676, 484, 857, 211, 619, 613, 628, 593, 663, 514, 802, 294, 811, 279, - 770, 348, 936, 87, 328, 896, 144, 502, 821, 268, 750, 373, 980, 43, 204, 608, 635, 573, 699, 438, 929, 94, 343, 926, 97, 367, 966, 57, 247, 697, - 440, 927, 96, 358, 953, 70, 290, 796, 303, 829, 252, 714, 420, 972, 51, 230, 659, 521, 789, 317, 856, 213, 622, 606, 637, 570, 704, 433, 943, 80, - 310, 838, 239, 682, 462, 886, 160, 528, 780, 332, 905, 130, 475, 871, 185, 574, 698, 439, 928, 95, 356, 951, 72, 293, 806, 284, 778, 335, 911, 112, - 424, 967, 56, 245, 693, 445, 915, 108, 409, 993, 30, 179, 559, 727, 403, 1002, 21, 157, 522, 788, 318, 858, 210, 618, 615, 626, 595, 660, 520, 793, - 311, 844, 231, 661, 517, 797, 302, 828, 254, 717, 416, 981, 42, 200, 600, 646, 554, 732, 398, 1015, 8, 124, 467, 880, 167, 541, 753, 369, 973, 50, - 229, 658, 523, 787, 319, 860, 208, 614, 627, 594, 662, 516, 799, 298, 818, 271, 756, 364, 963, 60, 257, 722, 410, 992, 31, 181, 563, 713, 422, 969, - 54, 240, 683, 459, 892, 149, 509, 808, 282, 774, 344, 930, 93, 341, 924, 99, 372, 979, 44, 207, 612, 629, 591, 665, 506, 812, 277, 767, 351, 939, 84, - 323, 876, 173, 549, 741, 385, 1007, 16, 140, 497, 836, 243, 687, 452, 902, 136, 483, 859, 209, 617, 616, 621, 607, 636, 571, 703, 434, 942, 81, 315, - 853, 218, 632, 584, 678, 476, 869, 192, 582, 680, 470, 877, 172, 548, 744, 382, 1003, 20, 156, 519, 794, 307, 833, 248, 700, 437, 931, 92, 338, 917, - 106, 396, 1017, 6, 122, 465, 883, 164, 535, 766, 352, 941, 82, 316, 855, 215, 624, 604, 641, 565, 710, 426, 956, 67, 285, 781, 330, 900, 138, 487, - 851, 221, 644, 558, 728, 402, 1004, 19, 153, 513, 803, 292, 801, 295, 813, 276, 765, 353, 944, 79, 309, 835, 244, 692, 446, 914, 109, 413, 987, 36, - 190, 580, 688, 450, 906, 128, 473, 873, 182, 564, 712, 423, 968, 55, 241, 685, 454, 899, 141, 498, 827, 256, 721, 411, 990, 33, 187, 576, 694, 443, - 921, 102, 378, 991, 32, 184, 572, 701, 436, 933, 90, 336, 912, 111, 421, 971, 52, 234, 669, 494, 840, 236, 675, 485, 854, 216, 625, 599, 649, 544, - 748, 376, 985, 38, 194, 587, 673, 490, 845, 228, 657, 524, 786, 321, 864, 202, 602, 643, 560, 720, 412, 989, 34, 188, 577, 691, 447, 913, 110, 418, - 977, 46, 214, 623, 605, 639, 567, 708, 428, 954, 69, 289, 792, 312, 846, 227, 655, 529, 779, 333, 908, 115, 451, 903, 132, 479, 866, 199, 597, 654, - 530, 777, 339, 918, 105, 395, 1018, 5, 121, 464, 884, 162, 533, 769, 349, 937, 86, 327, 890, 152, 512, 804, 287, 790, 314, 850, 223, 648, 547, 745, - 381, 1001, 22, 158, 525, 784, 324, 882, 165, 537, 762, 357, 952, 71, 291, 798, 301, 824, 263, 736, 392, 1022, 1, 117, 457, 894, 147, 505, 815, 274, - 761, 359, 958, 65, 267, 743, 383, 1005, 18, 151, 511, 805, 286, 785, 322, 870, 186, 575, 696, 441, 923, 100, 374, 982, 41, 197, 592, 664, 508, 809, - 281, 772, 346, 934, 89, 334, 910, 113, 429, 950, 73, 296, 814, 275, 764, 354, 946, 77, 305, 831, 250, 706, 431, 947, 76, 304, 830, 251, 711, 425, 957, - 66, 278, 768, 350, 938, 85, 326, 888, 155, 518, 795, 306, 832, 249, 702, 435, 940, 83, 320, 861, 206, 610, 633, 583, 679, 471, 875, 174, 550, 739, - 389, 1014, 9, 125, 468, 879, 168, 542, 752, 370, 974, 49, 222, 647, 552, 735, 393, 1021, 2, 118, 458, 893, 148, 507, 810, 280, 771, 347, 935, 88, - 331, 904, 131, 477, 868, 193, 586, 674, 489, 848, 225, 651, 538, 760, 360, 959, 64, 266, 742, 384, 1006, 17, 145, 503, 820, 269, 751, 371, 975, 48, - 220, 640, 566, 709, 427, 955, 68, 288, 791, 313, 847, 226, 652, 536, 763, 355, 948, 75, 300, 823, 264, 738, 390, 1020, 3, 119, 460, 891, 150, 510, - 807, 283, 776, 340, 919, 104, 387, 1011, 12, 133, 480, 865, 201, 601, 645, 556, 730, 400, 1010, 13, 134, 481, 863, 203, 603, 642, 562, 716, 417, 978, - 45, 212, 620, 611, 631, 585, 677, 478, 867, 198, 596, 656, 526, 783, 325, 887, 159, 527, 782, 329, 898, 142, 499, 826, 258, 723, 408, 994, 29, 178, - 557, 729, 401, 1009, 14, 135, 482, 862, 205, 609, 634, 579, 689, 449, 907, 127, 472, 874, 180, 561, 719, 414, 986, 37, 191, 581, 684, 455, 897, 143, - 501, 822, 265, 740, 388, 1012, 11, 129, 474, 872, 183, 569, 705, 432, 945, 78, 308, 834, 246, 695, 442, 922, 101, 377, 988, 35, 189, 578, 690, 448, - 909, 114, 444, 920, 103, 386, 1008, 15, 139, 488, 849, 224, 650, 540, 755, 365, 964, 59, 255, 718, 415, 983, 40, 196, 590, 667, 496, 837, 242, 686, - 453, 901, 137, 486, 852, 219, 638, 568, 707, 430, 949, 74, 299, 819, 270, 754, 366, 965, 58, 253, 715, 419, 976, 47, 217, 630, 588, 671, 492, 842, - 233, 668, 495, 839, 238, 681, 463, 885, 161, 532, 773, 345, 932, 91, 337, 916, 107, 406, 998, 25, 171, 546, 746, 380, 997, 26, 175, 551, 737, 391, - 1023, 0, 116, 456, 895, 146, 504, 817, 272, 758, 362, 961, 62, 260, 725, 405, 999, 24, 170, 545, 747, 379, 996, 27, 176, 553, 733, 397, 1016, 7, 123, - 466, 881, 166, 539, 757, 363, 962, 61, 259, 724, 407, 995, 28, 177, 555, 731, 399, 1013, 10, 126, 469, 878, 169, 543, 749, 375, 984, 39, 195, 589, - 670, 493, 841, 235, 672, 491, 843, 232, 666, 500, 825, 262, 734, 394, 1019, 4, 120, 461, 889, 154, 515, 800, 297, 816, 273, 759, 361, 960, 63, 261, - 726, 404, 1000, 23, 163, 534 + 0x256, 0x28d, 0x213, 0x307, 0x156, 0x39d, 0x062, 0x170, 0x3ca, 0x035, 0x0ed, 0x2a4, 0x1e4, 0x359, 0x0d3, 0x26b, + 0x265, 0x274, 0x251, 0x297, 0x202, 0x322, 0x126, 0x32b, 0x117, 0x302, 0x15c, 0x3a8, 0x057, 0x148, 0x380, 0x090, + 0x1f6, 0x335, 0x10c, 0x2ee, 0x175, 0x3d4, 0x02b, 0x0cc, 0x260, 0x27b, 0x23d, 0x2bb, 0x1b6, 0x3a1, 0x05e, 0x157, + 0x39e, 0x061, 0x16f, 0x3c6, 0x039, 0x0f7, 0x2b9, 0x1b8, 0x39f, 0x060, 0x166, 0x3b9, 0x046, 0x122, 0x31c, 0x12f, + 0x33d, 0x0fc, 0x2ca, 0x1a4, 0x3cc, 0x033, 0x0e6, 0x293, 0x209, 0x315, 0x13d, 0x358, 0x0d5, 0x26e, 0x25e, 0x27d, + 0x23a, 0x2c0, 0x1b1, 0x3af, 0x050, 0x136, 0x346, 0x0ef, 0x2aa, 0x1ce, 0x376, 0x0a0, 0x210, 0x30c, 0x14c, 0x389, + 0x082, 0x1db, 0x367, 0x0b9, 0x23e, 0x2ba, 0x1b7, 0x3a0, 0x05f, 0x164, 0x3b7, 0x048, 0x125, 0x326, 0x11c, 0x30a, + 0x14f, 0x38f, 0x070, 0x1a8, 0x3c7, 0x038, 0x0f5, 0x2b5, 0x1bd, 0x393, 0x06c, 0x199, 0x3e1, 0x01e, 0x0b3, 0x22f, + 0x2d7, 0x193, 0x3ea, 0x015, 0x09d, 0x20a, 0x314, 0x13e, 0x35a, 0x0d2, 0x26a, 0x267, 0x272, 0x253, 0x294, 0x208, + 0x319, 0x137, 0x34c, 0x0e7, 0x295, 0x205, 0x31d, 0x12e, 0x33c, 0x0fe, 0x2cd, 0x1a0, 0x3d5, 0x02a, 0x0c8, 0x258, + 0x286, 0x22a, 0x2dc, 0x18e, 0x3f7, 0x008, 0x07c, 0x1d3, 0x370, 0x0a7, 0x21d, 0x2f1, 0x171, 0x3cd, 0x032, 0x0e5, + 0x292, 0x20b, 0x313, 0x13f, 0x35c, 0x0d0, 0x266, 0x273, 0x252, 0x296, 0x204, 0x31f, 0x12a, 0x332, 0x10f, 0x2f4, + 0x16c, 0x3c3, 0x03c, 0x101, 0x2d2, 0x19a, 0x3e0, 0x01f, 0x0b5, 0x233, 0x2c9, 0x1a6, 0x3c9, 0x036, 0x0f0, 0x2ab, + 0x1cb, 0x37c, 0x095, 0x1fd, 0x328, 0x11a, 0x306, 0x158, 0x3a2, 0x05d, 0x155, 0x39c, 0x063, 0x174, 0x3d3, 0x02c, + 0x0cf, 0x264, 0x275, 0x24f, 0x299, 0x1fa, 0x32c, 0x115, 0x2ff, 0x15f, 0x3ab, 0x054, 0x143, 0x36c, 0x0ad, 0x225, + 0x2e5, 0x181, 0x3ef, 0x010, 0x08c, 0x1f1, 0x344, 0x0f3, 0x2af, 0x1c4, 0x386, 0x088, 0x1e3, 0x35b, 0x0d1, 0x269, + 0x268, 0x26d, 0x25f, 0x27c, 0x23b, 0x2bf, 0x1b2, 0x3ae, 0x051, 0x13b, 0x355, 0x0da, 0x278, 0x248, 0x2a6, 0x1dc, + 0x365, 0x0c0, 0x246, 0x2a8, 0x1d6, 0x36d, 0x0ac, 0x224, 0x2e8, 0x17e, 0x3eb, 0x014, 0x09c, 0x207, 0x31a, 0x133, + 0x341, 0x0f8, 0x2bc, 0x1b5, 0x3a3, 0x05c, 0x152, 0x395, 0x06a, 0x18c, 0x3f9, 0x006, 0x07a, 0x1d1, 0x373, 0x0a4, + 0x217, 0x2fe, 0x160, 0x3ad, 0x052, 0x13c, 0x357, 0x0d7, 0x270, 0x25c, 0x281, 0x235, 0x2c6, 0x1aa, 0x3bc, 0x043, + 0x11d, 0x30d, 0x14a, 0x384, 0x08a, 0x1e7, 0x353, 0x0dd, 0x284, 0x22e, 0x2d8, 0x192, 0x3ec, 0x013, 0x099, 0x201, + 0x323, 0x124, 0x321, 0x127, 0x32d, 0x114, 0x2fd, 0x161, 0x3b0, 0x04f, 0x135, 0x343, 0x0f4, 0x2b4, 0x1be, 0x392, + 0x06d, 0x19d, 0x3db, 0x024, 0x0be, 0x244, 0x2b0, 0x1c2, 0x38a, 0x080, 0x1d9, 0x369, 0x0b6, 0x234, 0x2c8, 0x1a7, + 0x3c8, 0x037, 0x0f1, 0x2ad, 0x1c6, 0x383, 0x08d, 0x1f2, 0x33b, 0x100, 0x2d1, 0x19b, 0x3de, 0x021, 0x0bb, 0x240, + 0x2b6, 0x1bb, 0x399, 0x066, 0x17a, 0x3df, 0x020, 0x0b8, 0x23c, 0x2bd, 0x1b4, 0x3a5, 0x05a, 0x150, 0x390, 0x06f, + 0x1a5, 0x3cb, 0x034, 0x0ea, 0x29d, 0x1ee, 0x348, 0x0ec, 0x2a3, 0x1e5, 0x356, 0x0d8, 0x271, 0x257, 0x289, 0x220, + 0x2ec, 0x178, 0x3d9, 0x026, 0x0c2, 0x24b, 0x2a1, 0x1ea, 0x34d, 0x0e4, 0x291, 0x20c, 0x312, 0x141, 0x360, 0x0ca, + 0x25a, 0x283, 0x230, 0x2d0, 0x19c, 0x3dd, 0x022, 0x0bc, 0x241, 0x2b3, 0x1bf, 0x391, 0x06e, 0x1a2, 0x3d1, 0x02e, + 0x0d6, 0x26f, 0x25d, 0x27f, 0x237, 0x2c4, 0x1ac, 0x3ba, 0x045, 0x121, 0x318, 0x138, 0x34e, 0x0e3, 0x28f, 0x211, + 0x30b, 0x14d, 0x38c, 0x073, 0x1c3, 0x387, 0x084, 0x1df, 0x362, 0x0c7, 0x255, 0x28e, 0x212, 0x309, 0x153, 0x396, + 0x069, 0x18b, 0x3fa, 0x005, 0x079, 0x1d0, 0x374, 0x0a2, 0x215, 0x301, 0x15d, 0x3a9, 0x056, 0x147, 0x37a, 0x098, + 0x200, 0x324, 0x11f, 0x316, 0x13a, 0x352, 0x0df, 0x288, 0x223, 0x2e9, 0x17d, 0x3e9, 0x016, 0x09e, 0x20d, 0x310, + 0x144, 0x372, 0x0a5, 0x219, 0x2fa, 0x165, 0x3b8, 0x047, 0x123, 0x31e, 0x12d, 0x338, 0x107, 0x2e0, 0x188, 0x3fe, + 0x001, 0x075, 0x1c9, 0x37e, 0x093, 0x1f9, 0x32f, 0x112, 0x2f9, 0x167, 0x3be, 0x041, 0x10b, 0x2e7, 0x17f, 0x3ed, + 0x012, 0x097, 0x1ff, 0x325, 0x11e, 0x311, 0x142, 0x366, 0x0ba, 0x23f, 0x2b8, 0x1b9, 0x39b, 0x064, 0x176, 0x3d6, + 0x029, 0x0c5, 0x250, 0x298, 0x1fc, 0x329, 0x119, 0x304, 0x15a, 0x3a6, 0x059, 0x14e, 0x38e, 0x071, 0x1ad, 0x3b6, + 0x049, 0x128, 0x32e, 0x113, 0x2fc, 0x162, 0x3b2, 0x04d, 0x131, 0x33f, 0x0fa, 0x2c2, 0x1af, 0x3b3, 0x04c, 0x130, + 0x33e, 0x0fb, 0x2c7, 0x1a9, 0x3bd, 0x042, 0x116, 0x300, 0x15e, 0x3aa, 0x055, 0x146, 0x378, 0x09b, 0x206, 0x31b, + 0x132, 0x340, 0x0f9, 0x2be, 0x1b3, 0x3ac, 0x053, 0x140, 0x35d, 0x0ce, 0x262, 0x279, 0x247, 0x2a7, 0x1d7, 0x36b, + 0x0ae, 0x226, 0x2e3, 0x185, 0x3f6, 0x009, 0x07d, 0x1d4, 0x36f, 0x0a8, 0x21e, 0x2f0, 0x172, 0x3ce, 0x031, 0x0de, + 0x287, 0x228, 0x2df, 0x189, 0x3fd, 0x002, 0x076, 0x1ca, 0x37d, 0x094, 0x1fb, 0x32a, 0x118, 0x303, 0x15b, 0x3a7, + 0x058, 0x14b, 0x388, 0x083, 0x1dd, 0x364, 0x0c1, 0x24a, 0x2a2, 0x1e9, 0x350, 0x0e1, 0x28b, 0x21a, 0x2f8, 0x168, + 0x3bf, 0x040, 0x10a, 0x2e6, 0x180, 0x3ee, 0x011, 0x091, 0x1f7, 0x334, 0x10d, 0x2ef, 0x173, 0x3cf, 0x030, 0x0dc, + 0x280, 0x236, 0x2c5, 0x1ab, 0x3bb, 0x044, 0x120, 0x317, 0x139, 0x34f, 0x0e2, 0x28c, 0x218, 0x2fb, 0x163, 0x3b4, + 0x04b, 0x12c, 0x337, 0x108, 0x2e2, 0x186, 0x3fc, 0x003, 0x077, 0x1cc, 0x37b, 0x096, 0x1fe, 0x327, 0x11b, 0x308, + 0x154, 0x397, 0x068, 0x183, 0x3f3, 0x00c, 0x085, 0x1e0, 0x361, 0x0c9, 0x259, 0x285, 0x22c, 0x2da, 0x190, 0x3f2, + 0x00d, 0x086, 0x1e1, 0x35f, 0x0cb, 0x25b, 0x282, 0x232, 0x2cc, 0x1a1, 0x3d2, 0x02d, 0x0d4, 0x26c, 0x263, 0x277, + 0x249, 0x2a5, 0x1de, 0x363, 0x0c6, 0x254, 0x290, 0x20e, 0x30f, 0x145, 0x377, 0x09f, 0x20f, 0x30e, 0x149, 0x382, + 0x08e, 0x1f3, 0x33a, 0x102, 0x2d3, 0x198, 0x3e2, 0x01d, 0x0b2, 0x22d, 0x2d9, 0x191, 0x3f1, 0x00e, 0x087, 0x1e2, + 0x35e, 0x0cd, 0x261, 0x27a, 0x243, 0x2b1, 0x1c1, 0x38b, 0x07f, 0x1d8, 0x36a, 0x0b4, 0x231, 0x2cf, 0x19e, 0x3da, + 0x025, 0x0bf, 0x245, 0x2ac, 0x1c7, 0x381, 0x08f, 0x1f5, 0x336, 0x109, 0x2e4, 0x184, 0x3f4, 0x00b, 0x081, 0x1da, + 0x368, 0x0b7, 0x239, 0x2c1, 0x1b0, 0x3b1, 0x04e, 0x134, 0x342, 0x0f6, 0x2b7, 0x1ba, 0x39a, 0x065, 0x179, 0x3dc, + 0x023, 0x0bd, 0x242, 0x2b2, 0x1c0, 0x38d, 0x072, 0x1bc, 0x398, 0x067, 0x182, 0x3f0, 0x00f, 0x08b, 0x1e8, 0x351, + 0x0e0, 0x28a, 0x21c, 0x2f3, 0x16d, 0x3c4, 0x03b, 0x0ff, 0x2ce, 0x19f, 0x3d7, 0x028, 0x0c4, 0x24e, 0x29b, 0x1f0, + 0x345, 0x0f2, 0x2ae, 0x1c5, 0x385, 0x089, 0x1e6, 0x354, 0x0db, 0x27e, 0x238, 0x2c3, 0x1ae, 0x3b5, 0x04a, 0x12b, + 0x333, 0x10e, 0x2f2, 0x16e, 0x3c5, 0x03a, 0x0fd, 0x2cb, 0x1a3, 0x3d0, 0x02f, 0x0d9, 0x276, 0x24c, 0x29f, 0x1ec, + 0x34a, 0x0e9, 0x29c, 0x1ef, 0x347, 0x0ee, 0x2a9, 0x1cf, 0x375, 0x0a1, 0x214, 0x305, 0x159, 0x3a4, 0x05b, 0x151, + 0x394, 0x06b, 0x196, 0x3e6, 0x019, 0x0ab, 0x222, 0x2ea, 0x17c, 0x3e5, 0x01a, 0x0af, 0x227, 0x2e1, 0x187, 0x3ff, + 0x000, 0x074, 0x1c8, 0x37f, 0x092, 0x1f8, 0x331, 0x110, 0x2f6, 0x16a, 0x3c1, 0x03e, 0x104, 0x2d5, 0x195, 0x3e7, + 0x018, 0x0aa, 0x221, 0x2eb, 0x17b, 0x3e4, 0x01b, 0x0b0, 0x229, 0x2dd, 0x18d, 0x3f8, 0x007, 0x07b, 0x1d2, 0x371, + 0x0a6, 0x21b, 0x2f5, 0x16b, 0x3c2, 0x03d, 0x103, 0x2d4, 0x197, 0x3e3, 0x01c, 0x0b1, 0x22b, 0x2db, 0x18f, 0x3f5, + 0x00a, 0x07e, 0x1d5, 0x36e, 0x0a9, 0x21f, 0x2ed, 0x177, 0x3d8, 0x027, 0x0c3, 0x24d, 0x29e, 0x1ed, 0x349, 0x0eb, + 0x2a0, 0x1eb, 0x34b, 0x0e8, 0x29a, 0x1f4, 0x339, 0x106, 0x2de, 0x18a, 0x3fb, 0x004, 0x078, 0x1cd, 0x379, 0x09a, + 0x203, 0x320, 0x129, 0x330, 0x111, 0x2f7, 0x169, 0x3c0, 0x03f, 0x105, 0x2d6, 0x194, 0x3e8, 0x017, 0x0a3, 0x216 ]; From 3393bb0bfffc9cbcc10cd3f3f3a73abfbc6d2467 Mon Sep 17 00:00:00 2001 From: Yuki1536 <69851694+Yuki1536@users.noreply.github.com> Date: Fri, 16 Dec 2022 20:34:13 +0900 Subject: [PATCH 8/9] Change type --- src/decrypt/ximalaya.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/decrypt/ximalaya.ts b/src/decrypt/ximalaya.ts index 9352ff4..90c8e68 100644 --- a/src/decrypt/ximalaya.ts +++ b/src/decrypt/ximalaya.ts @@ -3,7 +3,7 @@ import { AudioMimeType, SniffAudioExt, GetArrayBuffer, GetMetaFromFile } from ". import { DecryptResult } from '@/decrypt/entity'; -const HandlerMap: Map = new Map([ +const HandlerMap: Map Uint8Array> = new Map([ ["x2m", ProcessX2M], ["x3m", ProcessX3M], ]); From 62d83c752ea14db3b665679a5e7a8c5e5eed6b62 Mon Sep 17 00:00:00 2001 From: Yuki1536 <69851694+Yuki1536@users.noreply.github.com> Date: Thu, 22 Dec 2022 22:20:34 +0900 Subject: [PATCH 9/9] Format with prettier. --- src/decrypt/index.ts | 176 ++++++++++---------- src/decrypt/ximalaya.ts | 351 +++++++++++++++++++--------------------- 2 files changed, 258 insertions(+), 269 deletions(-) diff --git a/src/decrypt/index.ts b/src/decrypt/index.ts index 79323f4..58d09bb 100644 --- a/src/decrypt/index.ts +++ b/src/decrypt/index.ts @@ -16,94 +16,94 @@ import { storage } from '@/utils/storage'; import InMemoryStorage from '@/utils/storage/InMemoryStorage'; export async function Decrypt(file: FileInfo, config: Record): Promise { - // Worker thread will fallback to in-memory storage. - if (storage instanceof InMemoryStorage) { - await storage.setAll(config); - } + // Worker thread will fallback to in-memory storage. + if (storage instanceof InMemoryStorage) { + await storage.setAll(config); + } - const raw = SplitFilename(file.name); - let rt_data: DecryptResult; - switch (raw.ext) { - case 'mg3d': // Migu Wav - rt_data = await Mg3dDecrypt(file.raw, raw.name); - break; - case 'ncm': // Netease Mp3/Flac - rt_data = await NcmDecrypt(file.raw, raw.name, raw.ext); - break; - case 'uc': // Netease Cache - rt_data = await NcmCacheDecrypt(file.raw, raw.name, raw.ext); - break; - case 'kwm': // Kuwo Mp3/Flac - rt_data = await KwmDecrypt(file.raw, raw.name, raw.ext); - break; - case 'xm': // Xiami Wav/M4a/Mp3/Flac - case 'wav': // Xiami/Raw Wav - case 'mp3': // Xiami/Raw Mp3 - case 'flac': // Xiami/Raw Flac - case 'm4a': // Xiami/Raw M4a - rt_data = await XmDecrypt(file.raw, raw.name, raw.ext); - break; - case 'ogg': // Raw Ogg - rt_data = await RawDecrypt(file.raw, raw.name, raw.ext); - break; - case 'tm0': // QQ Music IOS Mp3 - case 'tm3': // QQ Music IOS Mp3 - rt_data = await RawDecrypt(file.raw, raw.name, 'mp3'); - break; - case 'qmc3': //QQ Music Android Mp3 - case 'qmc2': //QQ Music Android Ogg - case 'qmc0': //QQ Music Android Mp3 - case 'qmcflac': //QQ Music Android Flac - case 'qmcogg': //QQ Music Android Ogg - case 'tkm': //QQ Music Accompaniment M4a - // Moo Music - case 'bkcmp3': - case 'bkcm4a': - case 'bkcflac': - case 'bkcwav': - case 'bkcape': - case 'bkcogg': - case 'bkcwma': - // QQ Music v2 - case 'mggl': //QQ Music Mac - case 'mflac': //QQ Music New Flac - case 'mflac0': //QQ Music New Flac - case 'mgg': //QQ Music New Ogg - case 'mgg1': //QQ Music New Ogg - case 'mgg0': - case 'mmp4': // QMC MP4 Container w/ E-AC-3 JOC - case '666c6163': //QQ Music Weiyun Flac - case '6d7033': //QQ Music Weiyun Mp3 - case '6f6767': //QQ Music Weiyun Ogg - case '6d3461': //QQ Music Weiyun M4a - case '776176': //QQ Music Weiyun Wav - rt_data = await QmcDecrypt(file.raw, raw.name, raw.ext); - break; - case 'tm2': // QQ Music IOS M4a - case 'tm6': // QQ Music IOS M4a - rt_data = await TmDecrypt(file.raw, raw.name); - break; - case 'cache': //QQ Music Cache - rt_data = await QmcCacheDecrypt(file.raw, raw.name, raw.ext); - break; - case 'vpr': - case 'kgm': - case 'kgma': - rt_data = await KgmDecrypt(file.raw, raw.name, raw.ext); - break; - case 'ofl_en': - rt_data = await JooxDecrypt(file.raw, raw.name, raw.ext); - break; - case 'x2m': - case 'x3m': - rt_data = await XimalayaDecrypt(file.raw, raw.name, raw.ext); - break; - default: - throw '不支持此文件格式'; - } + const raw = SplitFilename(file.name); + let rt_data: DecryptResult; + switch (raw.ext) { + case 'mg3d': // Migu Wav + rt_data = await Mg3dDecrypt(file.raw, raw.name); + break; + case 'ncm': // Netease Mp3/Flac + rt_data = await NcmDecrypt(file.raw, raw.name, raw.ext); + break; + case 'uc': // Netease Cache + rt_data = await NcmCacheDecrypt(file.raw, raw.name, raw.ext); + break; + case 'kwm': // Kuwo Mp3/Flac + rt_data = await KwmDecrypt(file.raw, raw.name, raw.ext); + break; + case 'xm': // Xiami Wav/M4a/Mp3/Flac + case 'wav': // Xiami/Raw Wav + case 'mp3': // Xiami/Raw Mp3 + case 'flac': // Xiami/Raw Flac + case 'm4a': // Xiami/Raw M4a + rt_data = await XmDecrypt(file.raw, raw.name, raw.ext); + break; + case 'ogg': // Raw Ogg + rt_data = await RawDecrypt(file.raw, raw.name, raw.ext); + break; + case 'tm0': // QQ Music IOS Mp3 + case 'tm3': // QQ Music IOS Mp3 + rt_data = await RawDecrypt(file.raw, raw.name, 'mp3'); + break; + case 'qmc3': //QQ Music Android Mp3 + case 'qmc2': //QQ Music Android Ogg + case 'qmc0': //QQ Music Android Mp3 + case 'qmcflac': //QQ Music Android Flac + case 'qmcogg': //QQ Music Android Ogg + case 'tkm': //QQ Music Accompaniment M4a + // Moo Music + case 'bkcmp3': + case 'bkcm4a': + case 'bkcflac': + case 'bkcwav': + case 'bkcape': + case 'bkcogg': + case 'bkcwma': + // QQ Music v2 + case 'mggl': //QQ Music Mac + case 'mflac': //QQ Music New Flac + case 'mflac0': //QQ Music New Flac + case 'mgg': //QQ Music New Ogg + case 'mgg1': //QQ Music New Ogg + case 'mgg0': + case 'mmp4': // QMC MP4 Container w/ E-AC-3 JOC + case '666c6163': //QQ Music Weiyun Flac + case '6d7033': //QQ Music Weiyun Mp3 + case '6f6767': //QQ Music Weiyun Ogg + case '6d3461': //QQ Music Weiyun M4a + case '776176': //QQ Music Weiyun Wav + rt_data = await QmcDecrypt(file.raw, raw.name, raw.ext); + break; + case 'tm2': // QQ Music IOS M4a + case 'tm6': // QQ Music IOS M4a + rt_data = await TmDecrypt(file.raw, raw.name); + break; + case 'cache': //QQ Music Cache + rt_data = await QmcCacheDecrypt(file.raw, raw.name, raw.ext); + break; + case 'vpr': + case 'kgm': + case 'kgma': + rt_data = await KgmDecrypt(file.raw, raw.name, raw.ext); + break; + case 'ofl_en': + rt_data = await JooxDecrypt(file.raw, raw.name, raw.ext); + break; + case 'x2m': + case 'x3m': + rt_data = await XimalayaDecrypt(file.raw, raw.name, raw.ext); + break; + default: + throw '不支持此文件格式'; + } - if (!rt_data.rawExt) rt_data.rawExt = raw.ext; - if (!rt_data.rawFilename) rt_data.rawFilename = raw.name; - console.log(rt_data); - return rt_data; + if (!rt_data.rawExt) rt_data.rawExt = raw.ext; + if (!rt_data.rawFilename) rt_data.rawFilename = raw.name; + console.log(rt_data); + return rt_data; } diff --git a/src/decrypt/ximalaya.ts b/src/decrypt/ximalaya.ts index 90c8e68..e8aedad 100644 --- a/src/decrypt/ximalaya.ts +++ b/src/decrypt/ximalaya.ts @@ -1,204 +1,193 @@ import { parseBlob as metaParseBlob } from 'music-metadata-browser'; -import { AudioMimeType, SniffAudioExt, GetArrayBuffer, GetMetaFromFile } from "./utils"; +import { AudioMimeType, SniffAudioExt, GetArrayBuffer, GetMetaFromFile } from './utils'; import { DecryptResult } from '@/decrypt/entity'; - const HandlerMap: Map Uint8Array> = new Map([ - ["x2m", ProcessX2M], - ["x3m", ProcessX3M], + ['x2m', ProcessX2M], + ['x3m', ProcessX3M], ]); export async function Decrypt(file: File, raw_filename: string, raw_ext: string): Promise { - const buffer = new Uint8Array(await GetArrayBuffer(file)); - const handler = HandlerMap.get(raw_ext); - if (!handler) throw "File type is incorrect!"; - let musicDecoded: Uint8Array = handler(buffer); - - const ext = SniffAudioExt(musicDecoded, "m4a"); - const mime = AudioMimeType[ext]; - - let musicBlob = new Blob([musicDecoded], { type: mime }); - - const musicMeta = await metaParseBlob(musicBlob); - - const info = GetMetaFromFile(raw_filename, musicMeta.common.title, musicMeta.common.artist); + const buffer = new Uint8Array(await GetArrayBuffer(file)); + const handler = HandlerMap.get(raw_ext); + if (!handler) throw 'File type is incorrect!'; + let musicDecoded: Uint8Array = handler(buffer); - return { - picture: "", - title: info.title, - artist: info.artist, - ext: ext, - album: musicMeta.common.album, - blob: musicBlob, - file: URL.createObjectURL(musicBlob), - mime: mime - } + const ext = SniffAudioExt(musicDecoded, 'm4a'); + const mime = AudioMimeType[ext]; + + let musicBlob = new Blob([musicDecoded], { type: mime }); + + const musicMeta = await metaParseBlob(musicBlob); + + const info = GetMetaFromFile(raw_filename, musicMeta.common.title, musicMeta.common.artist); + + return { + picture: '', + title: info.title, + artist: info.artist, + ext: ext, + album: musicMeta.common.album, + blob: musicBlob, + file: URL.createObjectURL(musicBlob), + mime: mime, + }; } function ProcessX2M(data: Uint8Array) { - const x2mHeaderSize = 1024; - const x2mKey = [0x78, 0x6d, 0x6c, 0x79]; - let encryptedHeader = data.slice(0, x2mHeaderSize); - for (let idx = 0; idx < x2mHeaderSize; idx++) { - let srcIdx = x2mScrambleTable[idx]; - data[idx] = encryptedHeader[srcIdx] ^ x2mKey[idx % x2mKey.length]; - } - return data; + const x2mHeaderSize = 1024; + const x2mKey = [0x78, 0x6d, 0x6c, 0x79]; + let encryptedHeader = data.slice(0, x2mHeaderSize); + for (let idx = 0; idx < x2mHeaderSize; idx++) { + let srcIdx = x2mScrambleTable[idx]; + data[idx] = encryptedHeader[srcIdx] ^ x2mKey[idx % x2mKey.length]; + } + return data; } function ProcessX3M(data: Uint8Array) { - const x3mHeaderSize = 1024; - - //prettier-ignore: uint8, size 32(8x4) - const x3mKey = [ - 0x33, 0x39, 0x38, 0x39, 0x64, 0x31, 0x31, 0x31, - 0x61, 0x61, 0x64, 0x35, 0x36, 0x31, 0x33, 0x39, - 0x34, 0x30, 0x66, 0x34, 0x66, 0x63, 0x34, 0x34, - 0x62, 0x36, 0x33, 0x39, 0x62, 0x32, 0x39, 0x32 - ]; - - let encryptedHeader = data.slice(0, x3mHeaderSize); - for (let dstIdx = 0; dstIdx < x3mHeaderSize; dstIdx++) { - let srcIdx = x3mScrambleTable[dstIdx]; - data[dstIdx] = encryptedHeader[srcIdx] ^ x3mKey[dstIdx % x3mKey.length]; - } - return data; + const x3mHeaderSize = 1024; + + //prettier-ignore: uint8, size 32(8x4) + const x3mKey = [ + 0x33, 0x39, 0x38, 0x39, 0x64, 0x31, 0x31, 0x31, 0x61, 0x61, 0x64, 0x35, 0x36, 0x31, 0x33, 0x39, 0x34, 0x30, 0x66, + 0x34, 0x66, 0x63, 0x34, 0x34, 0x62, 0x36, 0x33, 0x39, 0x62, 0x32, 0x39, 0x32, + ]; + + let encryptedHeader = data.slice(0, x3mHeaderSize); + for (let dstIdx = 0; dstIdx < x3mHeaderSize; dstIdx++) { + let srcIdx = x3mScrambleTable[dstIdx]; + data[dstIdx] = encryptedHeader[srcIdx] ^ x3mKey[dstIdx % x3mKey.length]; + } + return data; } //prettier-ignore: uint16, size 1024 (64x16) const x2mScrambleTable = [ - 0x2a9, 0x2ab, 0x154, 0x2aa, 0x2a8, 0x2ac, 0x153, 0x2a7, 0x2ad, 0x152, 0x2a6, 0x3ff, 0x000, 0x155, 0x2ae, 0x151, - 0x2a5, 0x3fe, 0x001, 0x156, 0x2af, 0x150, 0x2a4, 0x3fd, 0x002, 0x157, 0x2b0, 0x14f, 0x2a3, 0x3fc, 0x003, 0x158, - 0x2b1, 0x14e, 0x2a2, 0x3fb, 0x004, 0x159, 0x2b2, 0x14d, 0x2a1, 0x3fa, 0x005, 0x15a, 0x2b3, 0x14c, 0x2a0, 0x3f9, - 0x006, 0x15b, 0x2b4, 0x14b, 0x29f, 0x3f8, 0x007, 0x15c, 0x2b5, 0x14a, 0x29e, 0x3f7, 0x008, 0x15d, 0x2b6, 0x149, - 0x29d, 0x3f6, 0x009, 0x15e, 0x2b7, 0x148, 0x29c, 0x3f5, 0x00a, 0x15f, 0x2b8, 0x147, 0x29b, 0x3f4, 0x00b, 0x160, - 0x2b9, 0x146, 0x29a, 0x3f3, 0x00c, 0x161, 0x2ba, 0x145, 0x299, 0x3f2, 0x00d, 0x162, 0x2bb, 0x144, 0x298, 0x3f1, - 0x00e, 0x163, 0x2bc, 0x143, 0x297, 0x3f0, 0x00f, 0x164, 0x2bd, 0x142, 0x296, 0x3ef, 0x010, 0x165, 0x2be, 0x141, - 0x295, 0x3ee, 0x011, 0x166, 0x2bf, 0x140, 0x294, 0x3ed, 0x012, 0x167, 0x2c0, 0x13f, 0x293, 0x3ec, 0x013, 0x168, - 0x2c1, 0x13e, 0x292, 0x3eb, 0x014, 0x169, 0x2c2, 0x13d, 0x291, 0x3ea, 0x015, 0x16a, 0x2c3, 0x13c, 0x290, 0x3e9, - 0x016, 0x16b, 0x2c4, 0x13b, 0x28f, 0x3e8, 0x017, 0x16c, 0x2c5, 0x13a, 0x28e, 0x3e7, 0x018, 0x16d, 0x2c6, 0x139, - 0x28d, 0x3e6, 0x019, 0x16e, 0x2c7, 0x138, 0x28c, 0x3e5, 0x01a, 0x16f, 0x2c8, 0x137, 0x28b, 0x3e4, 0x01b, 0x170, - 0x2c9, 0x136, 0x28a, 0x3e3, 0x01c, 0x171, 0x2ca, 0x135, 0x289, 0x3e2, 0x01d, 0x172, 0x2cb, 0x134, 0x288, 0x3e1, - 0x01e, 0x173, 0x2cc, 0x133, 0x287, 0x3e0, 0x01f, 0x174, 0x2cd, 0x0a9, 0x1fe, 0x357, 0x020, 0x175, 0x2ce, 0x0aa, - 0x1ff, 0x358, 0x021, 0x176, 0x2cf, 0x0ab, 0x200, 0x359, 0x022, 0x177, 0x2d0, 0x0ac, 0x201, 0x35a, 0x023, 0x178, - 0x2d1, 0x0ad, 0x202, 0x35b, 0x024, 0x179, 0x2d2, 0x0ae, 0x203, 0x35c, 0x025, 0x17a, 0x2d3, 0x0af, 0x204, 0x35d, - 0x026, 0x17b, 0x2d4, 0x0b0, 0x205, 0x35e, 0x027, 0x17c, 0x2d5, 0x0b1, 0x206, 0x35f, 0x028, 0x17d, 0x2d6, 0x0b2, - 0x207, 0x360, 0x029, 0x17e, 0x2d7, 0x0b3, 0x208, 0x361, 0x02a, 0x17f, 0x2d8, 0x0b4, 0x209, 0x362, 0x02b, 0x180, - 0x2d9, 0x0b5, 0x20a, 0x363, 0x02c, 0x181, 0x2da, 0x0b6, 0x20b, 0x364, 0x02d, 0x182, 0x2db, 0x0b7, 0x20c, 0x365, - 0x02e, 0x183, 0x2dc, 0x0b8, 0x20d, 0x366, 0x02f, 0x184, 0x2dd, 0x0b9, 0x20e, 0x367, 0x030, 0x185, 0x2de, 0x0ba, - 0x20f, 0x368, 0x031, 0x186, 0x2df, 0x0bb, 0x210, 0x369, 0x032, 0x187, 0x2e0, 0x0bc, 0x211, 0x36a, 0x033, 0x188, - 0x2e1, 0x0bd, 0x212, 0x36b, 0x034, 0x189, 0x2e2, 0x0be, 0x213, 0x36c, 0x035, 0x18a, 0x2e3, 0x0bf, 0x214, 0x36d, - 0x036, 0x18b, 0x2e4, 0x0c0, 0x215, 0x36e, 0x037, 0x18c, 0x2e5, 0x0c1, 0x216, 0x36f, 0x038, 0x18d, 0x2e6, 0x0c2, - 0x217, 0x370, 0x039, 0x18e, 0x2e7, 0x0c3, 0x218, 0x371, 0x03a, 0x18f, 0x2e8, 0x0c4, 0x219, 0x372, 0x03b, 0x190, - 0x2e9, 0x0c5, 0x21a, 0x373, 0x03c, 0x191, 0x2ea, 0x0c6, 0x21b, 0x374, 0x03d, 0x192, 0x2eb, 0x0c7, 0x21c, 0x375, - 0x03e, 0x193, 0x2ec, 0x0c8, 0x21d, 0x376, 0x03f, 0x194, 0x2ed, 0x0c9, 0x21e, 0x377, 0x040, 0x195, 0x2ee, 0x0ca, - 0x21f, 0x378, 0x041, 0x196, 0x2ef, 0x0cb, 0x220, 0x379, 0x042, 0x197, 0x2f0, 0x0cc, 0x221, 0x37a, 0x043, 0x198, - 0x2f1, 0x0cd, 0x222, 0x37b, 0x044, 0x199, 0x2f2, 0x0ce, 0x223, 0x37c, 0x045, 0x19a, 0x2f3, 0x0cf, 0x224, 0x37d, - 0x046, 0x19b, 0x2f4, 0x0d0, 0x225, 0x37e, 0x047, 0x19c, 0x2f5, 0x0d1, 0x226, 0x37f, 0x048, 0x19d, 0x2f6, 0x0d2, - 0x227, 0x380, 0x049, 0x19e, 0x2f7, 0x0d3, 0x228, 0x381, 0x04a, 0x19f, 0x2f8, 0x0d4, 0x229, 0x382, 0x04b, 0x1a0, - 0x2f9, 0x0d5, 0x22a, 0x383, 0x04c, 0x1a1, 0x2fa, 0x0d6, 0x22b, 0x384, 0x04d, 0x1a2, 0x2fb, 0x0d7, 0x22c, 0x385, - 0x04e, 0x1a3, 0x2fc, 0x0d8, 0x22d, 0x386, 0x04f, 0x1a4, 0x2fd, 0x0d9, 0x22e, 0x387, 0x050, 0x1a5, 0x2fe, 0x0da, - 0x22f, 0x388, 0x051, 0x1a6, 0x2ff, 0x0db, 0x230, 0x389, 0x052, 0x1a7, 0x300, 0x0dc, 0x231, 0x38a, 0x053, 0x1a8, - 0x301, 0x0dd, 0x232, 0x38b, 0x054, 0x1a9, 0x302, 0x0de, 0x233, 0x38c, 0x055, 0x1aa, 0x303, 0x0df, 0x234, 0x38d, - 0x056, 0x1ab, 0x304, 0x0e0, 0x235, 0x38e, 0x057, 0x1ac, 0x305, 0x0e1, 0x236, 0x38f, 0x058, 0x1ad, 0x306, 0x0e2, - 0x237, 0x390, 0x059, 0x1ae, 0x307, 0x0e3, 0x238, 0x391, 0x05a, 0x1af, 0x308, 0x0e4, 0x239, 0x392, 0x05b, 0x1b0, - 0x309, 0x0e5, 0x23a, 0x393, 0x05c, 0x1b1, 0x30a, 0x0e6, 0x23b, 0x394, 0x05d, 0x1b2, 0x30b, 0x0e7, 0x23c, 0x395, - 0x05e, 0x1b3, 0x30c, 0x0e8, 0x23d, 0x396, 0x05f, 0x1b4, 0x30d, 0x0e9, 0x23e, 0x397, 0x060, 0x1b5, 0x30e, 0x0ea, - 0x23f, 0x398, 0x061, 0x1b6, 0x30f, 0x0eb, 0x240, 0x399, 0x062, 0x1b7, 0x310, 0x0ec, 0x241, 0x39a, 0x063, 0x1b8, - 0x311, 0x0ed, 0x242, 0x39b, 0x064, 0x1b9, 0x312, 0x0ee, 0x243, 0x39c, 0x065, 0x1ba, 0x313, 0x0ef, 0x244, 0x39d, - 0x066, 0x1bb, 0x314, 0x0f0, 0x245, 0x39e, 0x067, 0x1bc, 0x315, 0x0f1, 0x246, 0x39f, 0x068, 0x1bd, 0x316, 0x0f2, - 0x247, 0x3a0, 0x069, 0x1be, 0x317, 0x0f3, 0x248, 0x3a1, 0x06a, 0x1bf, 0x318, 0x0f4, 0x249, 0x3a2, 0x06b, 0x1c0, - 0x319, 0x0f5, 0x24a, 0x3a3, 0x06c, 0x1c1, 0x31a, 0x0f6, 0x24b, 0x3a4, 0x06d, 0x1c2, 0x31b, 0x0f7, 0x24c, 0x3a5, - 0x06e, 0x1c3, 0x31c, 0x0f8, 0x24d, 0x3a6, 0x06f, 0x1c4, 0x31d, 0x0f9, 0x24e, 0x3a7, 0x070, 0x1c5, 0x31e, 0x0fa, - 0x24f, 0x3a8, 0x071, 0x1c6, 0x31f, 0x0fb, 0x250, 0x3a9, 0x072, 0x1c7, 0x320, 0x0fc, 0x251, 0x3aa, 0x073, 0x1c8, - 0x321, 0x0fd, 0x252, 0x3ab, 0x074, 0x1c9, 0x322, 0x0fe, 0x253, 0x3ac, 0x075, 0x1ca, 0x323, 0x0ff, 0x254, 0x3ad, - 0x076, 0x1cb, 0x324, 0x100, 0x255, 0x3ae, 0x077, 0x1cc, 0x325, 0x101, 0x256, 0x3af, 0x078, 0x1cd, 0x326, 0x102, - 0x257, 0x3b0, 0x079, 0x1ce, 0x327, 0x103, 0x258, 0x3b1, 0x07a, 0x1cf, 0x328, 0x104, 0x259, 0x3b2, 0x07b, 0x1d0, - 0x329, 0x105, 0x25a, 0x3b3, 0x07c, 0x1d1, 0x32a, 0x106, 0x25b, 0x3b4, 0x07d, 0x1d2, 0x32b, 0x107, 0x25c, 0x3b5, - 0x07e, 0x1d3, 0x32c, 0x108, 0x25d, 0x3b6, 0x07f, 0x1d4, 0x32d, 0x109, 0x25e, 0x3b7, 0x080, 0x1d5, 0x32e, 0x10a, - 0x25f, 0x3b8, 0x081, 0x1d6, 0x32f, 0x10b, 0x260, 0x3b9, 0x082, 0x1d7, 0x330, 0x10c, 0x261, 0x3ba, 0x083, 0x1d8, - 0x331, 0x10d, 0x262, 0x3bb, 0x084, 0x1d9, 0x332, 0x10e, 0x263, 0x3bc, 0x085, 0x1da, 0x333, 0x10f, 0x264, 0x3bd, - 0x086, 0x1db, 0x334, 0x110, 0x265, 0x3be, 0x087, 0x1dc, 0x335, 0x111, 0x266, 0x3bf, 0x088, 0x1dd, 0x336, 0x112, - 0x267, 0x3c0, 0x089, 0x1de, 0x337, 0x113, 0x268, 0x3c1, 0x08a, 0x1df, 0x338, 0x114, 0x269, 0x3c2, 0x08b, 0x1e0, - 0x339, 0x115, 0x26a, 0x3c3, 0x08c, 0x1e1, 0x33a, 0x116, 0x26b, 0x3c4, 0x08d, 0x1e2, 0x33b, 0x117, 0x26c, 0x3c5, - 0x08e, 0x1e3, 0x33c, 0x118, 0x26d, 0x3c6, 0x08f, 0x1e4, 0x33d, 0x119, 0x26e, 0x3c7, 0x090, 0x1e5, 0x33e, 0x11a, - 0x26f, 0x3c8, 0x091, 0x1e6, 0x33f, 0x11b, 0x270, 0x3c9, 0x092, 0x1e7, 0x340, 0x11c, 0x271, 0x3ca, 0x093, 0x1e8, - 0x341, 0x11d, 0x272, 0x3cb, 0x094, 0x1e9, 0x342, 0x11e, 0x273, 0x3cc, 0x095, 0x1ea, 0x343, 0x11f, 0x274, 0x3cd, - 0x096, 0x1eb, 0x344, 0x120, 0x275, 0x3ce, 0x097, 0x1ec, 0x345, 0x121, 0x276, 0x3cf, 0x098, 0x1ed, 0x346, 0x122, - 0x277, 0x3d0, 0x099, 0x1ee, 0x347, 0x123, 0x278, 0x3d1, 0x09a, 0x1ef, 0x348, 0x124, 0x279, 0x3d2, 0x09b, 0x1f0, - 0x349, 0x125, 0x27a, 0x3d3, 0x09c, 0x1f1, 0x34a, 0x126, 0x27b, 0x3d4, 0x09d, 0x1f2, 0x34b, 0x127, 0x27c, 0x3d5, - 0x09e, 0x1f3, 0x34c, 0x128, 0x27d, 0x3d6, 0x09f, 0x1f4, 0x34d, 0x129, 0x27e, 0x3d7, 0x0a0, 0x1f5, 0x34e, 0x12a, - 0x27f, 0x3d8, 0x0a1, 0x1f6, 0x34f, 0x12b, 0x280, 0x3d9, 0x0a2, 0x1f7, 0x350, 0x12c, 0x281, 0x3da, 0x0a3, 0x1f8, - 0x351, 0x12d, 0x282, 0x3db, 0x0a4, 0x1f9, 0x352, 0x12e, 0x283, 0x3dc, 0x0a5, 0x1fa, 0x353, 0x12f, 0x284, 0x3dd, - 0x0a6, 0x1fb, 0x354, 0x130, 0x285, 0x3de, 0x0a7, 0x1fc, 0x355, 0x131, 0x286, 0x3df, 0x0a8, 0x1fd, 0x356, 0x132 + 0x2a9, 0x2ab, 0x154, 0x2aa, 0x2a8, 0x2ac, 0x153, 0x2a7, 0x2ad, 0x152, 0x2a6, 0x3ff, 0x000, 0x155, 0x2ae, 0x151, 0x2a5, + 0x3fe, 0x001, 0x156, 0x2af, 0x150, 0x2a4, 0x3fd, 0x002, 0x157, 0x2b0, 0x14f, 0x2a3, 0x3fc, 0x003, 0x158, 0x2b1, 0x14e, + 0x2a2, 0x3fb, 0x004, 0x159, 0x2b2, 0x14d, 0x2a1, 0x3fa, 0x005, 0x15a, 0x2b3, 0x14c, 0x2a0, 0x3f9, 0x006, 0x15b, 0x2b4, + 0x14b, 0x29f, 0x3f8, 0x007, 0x15c, 0x2b5, 0x14a, 0x29e, 0x3f7, 0x008, 0x15d, 0x2b6, 0x149, 0x29d, 0x3f6, 0x009, 0x15e, + 0x2b7, 0x148, 0x29c, 0x3f5, 0x00a, 0x15f, 0x2b8, 0x147, 0x29b, 0x3f4, 0x00b, 0x160, 0x2b9, 0x146, 0x29a, 0x3f3, 0x00c, + 0x161, 0x2ba, 0x145, 0x299, 0x3f2, 0x00d, 0x162, 0x2bb, 0x144, 0x298, 0x3f1, 0x00e, 0x163, 0x2bc, 0x143, 0x297, 0x3f0, + 0x00f, 0x164, 0x2bd, 0x142, 0x296, 0x3ef, 0x010, 0x165, 0x2be, 0x141, 0x295, 0x3ee, 0x011, 0x166, 0x2bf, 0x140, 0x294, + 0x3ed, 0x012, 0x167, 0x2c0, 0x13f, 0x293, 0x3ec, 0x013, 0x168, 0x2c1, 0x13e, 0x292, 0x3eb, 0x014, 0x169, 0x2c2, 0x13d, + 0x291, 0x3ea, 0x015, 0x16a, 0x2c3, 0x13c, 0x290, 0x3e9, 0x016, 0x16b, 0x2c4, 0x13b, 0x28f, 0x3e8, 0x017, 0x16c, 0x2c5, + 0x13a, 0x28e, 0x3e7, 0x018, 0x16d, 0x2c6, 0x139, 0x28d, 0x3e6, 0x019, 0x16e, 0x2c7, 0x138, 0x28c, 0x3e5, 0x01a, 0x16f, + 0x2c8, 0x137, 0x28b, 0x3e4, 0x01b, 0x170, 0x2c9, 0x136, 0x28a, 0x3e3, 0x01c, 0x171, 0x2ca, 0x135, 0x289, 0x3e2, 0x01d, + 0x172, 0x2cb, 0x134, 0x288, 0x3e1, 0x01e, 0x173, 0x2cc, 0x133, 0x287, 0x3e0, 0x01f, 0x174, 0x2cd, 0x0a9, 0x1fe, 0x357, + 0x020, 0x175, 0x2ce, 0x0aa, 0x1ff, 0x358, 0x021, 0x176, 0x2cf, 0x0ab, 0x200, 0x359, 0x022, 0x177, 0x2d0, 0x0ac, 0x201, + 0x35a, 0x023, 0x178, 0x2d1, 0x0ad, 0x202, 0x35b, 0x024, 0x179, 0x2d2, 0x0ae, 0x203, 0x35c, 0x025, 0x17a, 0x2d3, 0x0af, + 0x204, 0x35d, 0x026, 0x17b, 0x2d4, 0x0b0, 0x205, 0x35e, 0x027, 0x17c, 0x2d5, 0x0b1, 0x206, 0x35f, 0x028, 0x17d, 0x2d6, + 0x0b2, 0x207, 0x360, 0x029, 0x17e, 0x2d7, 0x0b3, 0x208, 0x361, 0x02a, 0x17f, 0x2d8, 0x0b4, 0x209, 0x362, 0x02b, 0x180, + 0x2d9, 0x0b5, 0x20a, 0x363, 0x02c, 0x181, 0x2da, 0x0b6, 0x20b, 0x364, 0x02d, 0x182, 0x2db, 0x0b7, 0x20c, 0x365, 0x02e, + 0x183, 0x2dc, 0x0b8, 0x20d, 0x366, 0x02f, 0x184, 0x2dd, 0x0b9, 0x20e, 0x367, 0x030, 0x185, 0x2de, 0x0ba, 0x20f, 0x368, + 0x031, 0x186, 0x2df, 0x0bb, 0x210, 0x369, 0x032, 0x187, 0x2e0, 0x0bc, 0x211, 0x36a, 0x033, 0x188, 0x2e1, 0x0bd, 0x212, + 0x36b, 0x034, 0x189, 0x2e2, 0x0be, 0x213, 0x36c, 0x035, 0x18a, 0x2e3, 0x0bf, 0x214, 0x36d, 0x036, 0x18b, 0x2e4, 0x0c0, + 0x215, 0x36e, 0x037, 0x18c, 0x2e5, 0x0c1, 0x216, 0x36f, 0x038, 0x18d, 0x2e6, 0x0c2, 0x217, 0x370, 0x039, 0x18e, 0x2e7, + 0x0c3, 0x218, 0x371, 0x03a, 0x18f, 0x2e8, 0x0c4, 0x219, 0x372, 0x03b, 0x190, 0x2e9, 0x0c5, 0x21a, 0x373, 0x03c, 0x191, + 0x2ea, 0x0c6, 0x21b, 0x374, 0x03d, 0x192, 0x2eb, 0x0c7, 0x21c, 0x375, 0x03e, 0x193, 0x2ec, 0x0c8, 0x21d, 0x376, 0x03f, + 0x194, 0x2ed, 0x0c9, 0x21e, 0x377, 0x040, 0x195, 0x2ee, 0x0ca, 0x21f, 0x378, 0x041, 0x196, 0x2ef, 0x0cb, 0x220, 0x379, + 0x042, 0x197, 0x2f0, 0x0cc, 0x221, 0x37a, 0x043, 0x198, 0x2f1, 0x0cd, 0x222, 0x37b, 0x044, 0x199, 0x2f2, 0x0ce, 0x223, + 0x37c, 0x045, 0x19a, 0x2f3, 0x0cf, 0x224, 0x37d, 0x046, 0x19b, 0x2f4, 0x0d0, 0x225, 0x37e, 0x047, 0x19c, 0x2f5, 0x0d1, + 0x226, 0x37f, 0x048, 0x19d, 0x2f6, 0x0d2, 0x227, 0x380, 0x049, 0x19e, 0x2f7, 0x0d3, 0x228, 0x381, 0x04a, 0x19f, 0x2f8, + 0x0d4, 0x229, 0x382, 0x04b, 0x1a0, 0x2f9, 0x0d5, 0x22a, 0x383, 0x04c, 0x1a1, 0x2fa, 0x0d6, 0x22b, 0x384, 0x04d, 0x1a2, + 0x2fb, 0x0d7, 0x22c, 0x385, 0x04e, 0x1a3, 0x2fc, 0x0d8, 0x22d, 0x386, 0x04f, 0x1a4, 0x2fd, 0x0d9, 0x22e, 0x387, 0x050, + 0x1a5, 0x2fe, 0x0da, 0x22f, 0x388, 0x051, 0x1a6, 0x2ff, 0x0db, 0x230, 0x389, 0x052, 0x1a7, 0x300, 0x0dc, 0x231, 0x38a, + 0x053, 0x1a8, 0x301, 0x0dd, 0x232, 0x38b, 0x054, 0x1a9, 0x302, 0x0de, 0x233, 0x38c, 0x055, 0x1aa, 0x303, 0x0df, 0x234, + 0x38d, 0x056, 0x1ab, 0x304, 0x0e0, 0x235, 0x38e, 0x057, 0x1ac, 0x305, 0x0e1, 0x236, 0x38f, 0x058, 0x1ad, 0x306, 0x0e2, + 0x237, 0x390, 0x059, 0x1ae, 0x307, 0x0e3, 0x238, 0x391, 0x05a, 0x1af, 0x308, 0x0e4, 0x239, 0x392, 0x05b, 0x1b0, 0x309, + 0x0e5, 0x23a, 0x393, 0x05c, 0x1b1, 0x30a, 0x0e6, 0x23b, 0x394, 0x05d, 0x1b2, 0x30b, 0x0e7, 0x23c, 0x395, 0x05e, 0x1b3, + 0x30c, 0x0e8, 0x23d, 0x396, 0x05f, 0x1b4, 0x30d, 0x0e9, 0x23e, 0x397, 0x060, 0x1b5, 0x30e, 0x0ea, 0x23f, 0x398, 0x061, + 0x1b6, 0x30f, 0x0eb, 0x240, 0x399, 0x062, 0x1b7, 0x310, 0x0ec, 0x241, 0x39a, 0x063, 0x1b8, 0x311, 0x0ed, 0x242, 0x39b, + 0x064, 0x1b9, 0x312, 0x0ee, 0x243, 0x39c, 0x065, 0x1ba, 0x313, 0x0ef, 0x244, 0x39d, 0x066, 0x1bb, 0x314, 0x0f0, 0x245, + 0x39e, 0x067, 0x1bc, 0x315, 0x0f1, 0x246, 0x39f, 0x068, 0x1bd, 0x316, 0x0f2, 0x247, 0x3a0, 0x069, 0x1be, 0x317, 0x0f3, + 0x248, 0x3a1, 0x06a, 0x1bf, 0x318, 0x0f4, 0x249, 0x3a2, 0x06b, 0x1c0, 0x319, 0x0f5, 0x24a, 0x3a3, 0x06c, 0x1c1, 0x31a, + 0x0f6, 0x24b, 0x3a4, 0x06d, 0x1c2, 0x31b, 0x0f7, 0x24c, 0x3a5, 0x06e, 0x1c3, 0x31c, 0x0f8, 0x24d, 0x3a6, 0x06f, 0x1c4, + 0x31d, 0x0f9, 0x24e, 0x3a7, 0x070, 0x1c5, 0x31e, 0x0fa, 0x24f, 0x3a8, 0x071, 0x1c6, 0x31f, 0x0fb, 0x250, 0x3a9, 0x072, + 0x1c7, 0x320, 0x0fc, 0x251, 0x3aa, 0x073, 0x1c8, 0x321, 0x0fd, 0x252, 0x3ab, 0x074, 0x1c9, 0x322, 0x0fe, 0x253, 0x3ac, + 0x075, 0x1ca, 0x323, 0x0ff, 0x254, 0x3ad, 0x076, 0x1cb, 0x324, 0x100, 0x255, 0x3ae, 0x077, 0x1cc, 0x325, 0x101, 0x256, + 0x3af, 0x078, 0x1cd, 0x326, 0x102, 0x257, 0x3b0, 0x079, 0x1ce, 0x327, 0x103, 0x258, 0x3b1, 0x07a, 0x1cf, 0x328, 0x104, + 0x259, 0x3b2, 0x07b, 0x1d0, 0x329, 0x105, 0x25a, 0x3b3, 0x07c, 0x1d1, 0x32a, 0x106, 0x25b, 0x3b4, 0x07d, 0x1d2, 0x32b, + 0x107, 0x25c, 0x3b5, 0x07e, 0x1d3, 0x32c, 0x108, 0x25d, 0x3b6, 0x07f, 0x1d4, 0x32d, 0x109, 0x25e, 0x3b7, 0x080, 0x1d5, + 0x32e, 0x10a, 0x25f, 0x3b8, 0x081, 0x1d6, 0x32f, 0x10b, 0x260, 0x3b9, 0x082, 0x1d7, 0x330, 0x10c, 0x261, 0x3ba, 0x083, + 0x1d8, 0x331, 0x10d, 0x262, 0x3bb, 0x084, 0x1d9, 0x332, 0x10e, 0x263, 0x3bc, 0x085, 0x1da, 0x333, 0x10f, 0x264, 0x3bd, + 0x086, 0x1db, 0x334, 0x110, 0x265, 0x3be, 0x087, 0x1dc, 0x335, 0x111, 0x266, 0x3bf, 0x088, 0x1dd, 0x336, 0x112, 0x267, + 0x3c0, 0x089, 0x1de, 0x337, 0x113, 0x268, 0x3c1, 0x08a, 0x1df, 0x338, 0x114, 0x269, 0x3c2, 0x08b, 0x1e0, 0x339, 0x115, + 0x26a, 0x3c3, 0x08c, 0x1e1, 0x33a, 0x116, 0x26b, 0x3c4, 0x08d, 0x1e2, 0x33b, 0x117, 0x26c, 0x3c5, 0x08e, 0x1e3, 0x33c, + 0x118, 0x26d, 0x3c6, 0x08f, 0x1e4, 0x33d, 0x119, 0x26e, 0x3c7, 0x090, 0x1e5, 0x33e, 0x11a, 0x26f, 0x3c8, 0x091, 0x1e6, + 0x33f, 0x11b, 0x270, 0x3c9, 0x092, 0x1e7, 0x340, 0x11c, 0x271, 0x3ca, 0x093, 0x1e8, 0x341, 0x11d, 0x272, 0x3cb, 0x094, + 0x1e9, 0x342, 0x11e, 0x273, 0x3cc, 0x095, 0x1ea, 0x343, 0x11f, 0x274, 0x3cd, 0x096, 0x1eb, 0x344, 0x120, 0x275, 0x3ce, + 0x097, 0x1ec, 0x345, 0x121, 0x276, 0x3cf, 0x098, 0x1ed, 0x346, 0x122, 0x277, 0x3d0, 0x099, 0x1ee, 0x347, 0x123, 0x278, + 0x3d1, 0x09a, 0x1ef, 0x348, 0x124, 0x279, 0x3d2, 0x09b, 0x1f0, 0x349, 0x125, 0x27a, 0x3d3, 0x09c, 0x1f1, 0x34a, 0x126, + 0x27b, 0x3d4, 0x09d, 0x1f2, 0x34b, 0x127, 0x27c, 0x3d5, 0x09e, 0x1f3, 0x34c, 0x128, 0x27d, 0x3d6, 0x09f, 0x1f4, 0x34d, + 0x129, 0x27e, 0x3d7, 0x0a0, 0x1f5, 0x34e, 0x12a, 0x27f, 0x3d8, 0x0a1, 0x1f6, 0x34f, 0x12b, 0x280, 0x3d9, 0x0a2, 0x1f7, + 0x350, 0x12c, 0x281, 0x3da, 0x0a3, 0x1f8, 0x351, 0x12d, 0x282, 0x3db, 0x0a4, 0x1f9, 0x352, 0x12e, 0x283, 0x3dc, 0x0a5, + 0x1fa, 0x353, 0x12f, 0x284, 0x3dd, 0x0a6, 0x1fb, 0x354, 0x130, 0x285, 0x3de, 0x0a7, 0x1fc, 0x355, 0x131, 0x286, 0x3df, + 0x0a8, 0x1fd, 0x356, 0x132, ]; - - //prettier-ignore: uint16, size 1024 (64x16) const x3mScrambleTable = [ - 0x256, 0x28d, 0x213, 0x307, 0x156, 0x39d, 0x062, 0x170, 0x3ca, 0x035, 0x0ed, 0x2a4, 0x1e4, 0x359, 0x0d3, 0x26b, - 0x265, 0x274, 0x251, 0x297, 0x202, 0x322, 0x126, 0x32b, 0x117, 0x302, 0x15c, 0x3a8, 0x057, 0x148, 0x380, 0x090, - 0x1f6, 0x335, 0x10c, 0x2ee, 0x175, 0x3d4, 0x02b, 0x0cc, 0x260, 0x27b, 0x23d, 0x2bb, 0x1b6, 0x3a1, 0x05e, 0x157, - 0x39e, 0x061, 0x16f, 0x3c6, 0x039, 0x0f7, 0x2b9, 0x1b8, 0x39f, 0x060, 0x166, 0x3b9, 0x046, 0x122, 0x31c, 0x12f, - 0x33d, 0x0fc, 0x2ca, 0x1a4, 0x3cc, 0x033, 0x0e6, 0x293, 0x209, 0x315, 0x13d, 0x358, 0x0d5, 0x26e, 0x25e, 0x27d, - 0x23a, 0x2c0, 0x1b1, 0x3af, 0x050, 0x136, 0x346, 0x0ef, 0x2aa, 0x1ce, 0x376, 0x0a0, 0x210, 0x30c, 0x14c, 0x389, - 0x082, 0x1db, 0x367, 0x0b9, 0x23e, 0x2ba, 0x1b7, 0x3a0, 0x05f, 0x164, 0x3b7, 0x048, 0x125, 0x326, 0x11c, 0x30a, - 0x14f, 0x38f, 0x070, 0x1a8, 0x3c7, 0x038, 0x0f5, 0x2b5, 0x1bd, 0x393, 0x06c, 0x199, 0x3e1, 0x01e, 0x0b3, 0x22f, - 0x2d7, 0x193, 0x3ea, 0x015, 0x09d, 0x20a, 0x314, 0x13e, 0x35a, 0x0d2, 0x26a, 0x267, 0x272, 0x253, 0x294, 0x208, - 0x319, 0x137, 0x34c, 0x0e7, 0x295, 0x205, 0x31d, 0x12e, 0x33c, 0x0fe, 0x2cd, 0x1a0, 0x3d5, 0x02a, 0x0c8, 0x258, - 0x286, 0x22a, 0x2dc, 0x18e, 0x3f7, 0x008, 0x07c, 0x1d3, 0x370, 0x0a7, 0x21d, 0x2f1, 0x171, 0x3cd, 0x032, 0x0e5, - 0x292, 0x20b, 0x313, 0x13f, 0x35c, 0x0d0, 0x266, 0x273, 0x252, 0x296, 0x204, 0x31f, 0x12a, 0x332, 0x10f, 0x2f4, - 0x16c, 0x3c3, 0x03c, 0x101, 0x2d2, 0x19a, 0x3e0, 0x01f, 0x0b5, 0x233, 0x2c9, 0x1a6, 0x3c9, 0x036, 0x0f0, 0x2ab, - 0x1cb, 0x37c, 0x095, 0x1fd, 0x328, 0x11a, 0x306, 0x158, 0x3a2, 0x05d, 0x155, 0x39c, 0x063, 0x174, 0x3d3, 0x02c, - 0x0cf, 0x264, 0x275, 0x24f, 0x299, 0x1fa, 0x32c, 0x115, 0x2ff, 0x15f, 0x3ab, 0x054, 0x143, 0x36c, 0x0ad, 0x225, - 0x2e5, 0x181, 0x3ef, 0x010, 0x08c, 0x1f1, 0x344, 0x0f3, 0x2af, 0x1c4, 0x386, 0x088, 0x1e3, 0x35b, 0x0d1, 0x269, - 0x268, 0x26d, 0x25f, 0x27c, 0x23b, 0x2bf, 0x1b2, 0x3ae, 0x051, 0x13b, 0x355, 0x0da, 0x278, 0x248, 0x2a6, 0x1dc, - 0x365, 0x0c0, 0x246, 0x2a8, 0x1d6, 0x36d, 0x0ac, 0x224, 0x2e8, 0x17e, 0x3eb, 0x014, 0x09c, 0x207, 0x31a, 0x133, - 0x341, 0x0f8, 0x2bc, 0x1b5, 0x3a3, 0x05c, 0x152, 0x395, 0x06a, 0x18c, 0x3f9, 0x006, 0x07a, 0x1d1, 0x373, 0x0a4, - 0x217, 0x2fe, 0x160, 0x3ad, 0x052, 0x13c, 0x357, 0x0d7, 0x270, 0x25c, 0x281, 0x235, 0x2c6, 0x1aa, 0x3bc, 0x043, - 0x11d, 0x30d, 0x14a, 0x384, 0x08a, 0x1e7, 0x353, 0x0dd, 0x284, 0x22e, 0x2d8, 0x192, 0x3ec, 0x013, 0x099, 0x201, - 0x323, 0x124, 0x321, 0x127, 0x32d, 0x114, 0x2fd, 0x161, 0x3b0, 0x04f, 0x135, 0x343, 0x0f4, 0x2b4, 0x1be, 0x392, - 0x06d, 0x19d, 0x3db, 0x024, 0x0be, 0x244, 0x2b0, 0x1c2, 0x38a, 0x080, 0x1d9, 0x369, 0x0b6, 0x234, 0x2c8, 0x1a7, - 0x3c8, 0x037, 0x0f1, 0x2ad, 0x1c6, 0x383, 0x08d, 0x1f2, 0x33b, 0x100, 0x2d1, 0x19b, 0x3de, 0x021, 0x0bb, 0x240, - 0x2b6, 0x1bb, 0x399, 0x066, 0x17a, 0x3df, 0x020, 0x0b8, 0x23c, 0x2bd, 0x1b4, 0x3a5, 0x05a, 0x150, 0x390, 0x06f, - 0x1a5, 0x3cb, 0x034, 0x0ea, 0x29d, 0x1ee, 0x348, 0x0ec, 0x2a3, 0x1e5, 0x356, 0x0d8, 0x271, 0x257, 0x289, 0x220, - 0x2ec, 0x178, 0x3d9, 0x026, 0x0c2, 0x24b, 0x2a1, 0x1ea, 0x34d, 0x0e4, 0x291, 0x20c, 0x312, 0x141, 0x360, 0x0ca, - 0x25a, 0x283, 0x230, 0x2d0, 0x19c, 0x3dd, 0x022, 0x0bc, 0x241, 0x2b3, 0x1bf, 0x391, 0x06e, 0x1a2, 0x3d1, 0x02e, - 0x0d6, 0x26f, 0x25d, 0x27f, 0x237, 0x2c4, 0x1ac, 0x3ba, 0x045, 0x121, 0x318, 0x138, 0x34e, 0x0e3, 0x28f, 0x211, - 0x30b, 0x14d, 0x38c, 0x073, 0x1c3, 0x387, 0x084, 0x1df, 0x362, 0x0c7, 0x255, 0x28e, 0x212, 0x309, 0x153, 0x396, - 0x069, 0x18b, 0x3fa, 0x005, 0x079, 0x1d0, 0x374, 0x0a2, 0x215, 0x301, 0x15d, 0x3a9, 0x056, 0x147, 0x37a, 0x098, - 0x200, 0x324, 0x11f, 0x316, 0x13a, 0x352, 0x0df, 0x288, 0x223, 0x2e9, 0x17d, 0x3e9, 0x016, 0x09e, 0x20d, 0x310, - 0x144, 0x372, 0x0a5, 0x219, 0x2fa, 0x165, 0x3b8, 0x047, 0x123, 0x31e, 0x12d, 0x338, 0x107, 0x2e0, 0x188, 0x3fe, - 0x001, 0x075, 0x1c9, 0x37e, 0x093, 0x1f9, 0x32f, 0x112, 0x2f9, 0x167, 0x3be, 0x041, 0x10b, 0x2e7, 0x17f, 0x3ed, - 0x012, 0x097, 0x1ff, 0x325, 0x11e, 0x311, 0x142, 0x366, 0x0ba, 0x23f, 0x2b8, 0x1b9, 0x39b, 0x064, 0x176, 0x3d6, - 0x029, 0x0c5, 0x250, 0x298, 0x1fc, 0x329, 0x119, 0x304, 0x15a, 0x3a6, 0x059, 0x14e, 0x38e, 0x071, 0x1ad, 0x3b6, - 0x049, 0x128, 0x32e, 0x113, 0x2fc, 0x162, 0x3b2, 0x04d, 0x131, 0x33f, 0x0fa, 0x2c2, 0x1af, 0x3b3, 0x04c, 0x130, - 0x33e, 0x0fb, 0x2c7, 0x1a9, 0x3bd, 0x042, 0x116, 0x300, 0x15e, 0x3aa, 0x055, 0x146, 0x378, 0x09b, 0x206, 0x31b, - 0x132, 0x340, 0x0f9, 0x2be, 0x1b3, 0x3ac, 0x053, 0x140, 0x35d, 0x0ce, 0x262, 0x279, 0x247, 0x2a7, 0x1d7, 0x36b, - 0x0ae, 0x226, 0x2e3, 0x185, 0x3f6, 0x009, 0x07d, 0x1d4, 0x36f, 0x0a8, 0x21e, 0x2f0, 0x172, 0x3ce, 0x031, 0x0de, - 0x287, 0x228, 0x2df, 0x189, 0x3fd, 0x002, 0x076, 0x1ca, 0x37d, 0x094, 0x1fb, 0x32a, 0x118, 0x303, 0x15b, 0x3a7, - 0x058, 0x14b, 0x388, 0x083, 0x1dd, 0x364, 0x0c1, 0x24a, 0x2a2, 0x1e9, 0x350, 0x0e1, 0x28b, 0x21a, 0x2f8, 0x168, - 0x3bf, 0x040, 0x10a, 0x2e6, 0x180, 0x3ee, 0x011, 0x091, 0x1f7, 0x334, 0x10d, 0x2ef, 0x173, 0x3cf, 0x030, 0x0dc, - 0x280, 0x236, 0x2c5, 0x1ab, 0x3bb, 0x044, 0x120, 0x317, 0x139, 0x34f, 0x0e2, 0x28c, 0x218, 0x2fb, 0x163, 0x3b4, - 0x04b, 0x12c, 0x337, 0x108, 0x2e2, 0x186, 0x3fc, 0x003, 0x077, 0x1cc, 0x37b, 0x096, 0x1fe, 0x327, 0x11b, 0x308, - 0x154, 0x397, 0x068, 0x183, 0x3f3, 0x00c, 0x085, 0x1e0, 0x361, 0x0c9, 0x259, 0x285, 0x22c, 0x2da, 0x190, 0x3f2, - 0x00d, 0x086, 0x1e1, 0x35f, 0x0cb, 0x25b, 0x282, 0x232, 0x2cc, 0x1a1, 0x3d2, 0x02d, 0x0d4, 0x26c, 0x263, 0x277, - 0x249, 0x2a5, 0x1de, 0x363, 0x0c6, 0x254, 0x290, 0x20e, 0x30f, 0x145, 0x377, 0x09f, 0x20f, 0x30e, 0x149, 0x382, - 0x08e, 0x1f3, 0x33a, 0x102, 0x2d3, 0x198, 0x3e2, 0x01d, 0x0b2, 0x22d, 0x2d9, 0x191, 0x3f1, 0x00e, 0x087, 0x1e2, - 0x35e, 0x0cd, 0x261, 0x27a, 0x243, 0x2b1, 0x1c1, 0x38b, 0x07f, 0x1d8, 0x36a, 0x0b4, 0x231, 0x2cf, 0x19e, 0x3da, - 0x025, 0x0bf, 0x245, 0x2ac, 0x1c7, 0x381, 0x08f, 0x1f5, 0x336, 0x109, 0x2e4, 0x184, 0x3f4, 0x00b, 0x081, 0x1da, - 0x368, 0x0b7, 0x239, 0x2c1, 0x1b0, 0x3b1, 0x04e, 0x134, 0x342, 0x0f6, 0x2b7, 0x1ba, 0x39a, 0x065, 0x179, 0x3dc, - 0x023, 0x0bd, 0x242, 0x2b2, 0x1c0, 0x38d, 0x072, 0x1bc, 0x398, 0x067, 0x182, 0x3f0, 0x00f, 0x08b, 0x1e8, 0x351, - 0x0e0, 0x28a, 0x21c, 0x2f3, 0x16d, 0x3c4, 0x03b, 0x0ff, 0x2ce, 0x19f, 0x3d7, 0x028, 0x0c4, 0x24e, 0x29b, 0x1f0, - 0x345, 0x0f2, 0x2ae, 0x1c5, 0x385, 0x089, 0x1e6, 0x354, 0x0db, 0x27e, 0x238, 0x2c3, 0x1ae, 0x3b5, 0x04a, 0x12b, - 0x333, 0x10e, 0x2f2, 0x16e, 0x3c5, 0x03a, 0x0fd, 0x2cb, 0x1a3, 0x3d0, 0x02f, 0x0d9, 0x276, 0x24c, 0x29f, 0x1ec, - 0x34a, 0x0e9, 0x29c, 0x1ef, 0x347, 0x0ee, 0x2a9, 0x1cf, 0x375, 0x0a1, 0x214, 0x305, 0x159, 0x3a4, 0x05b, 0x151, - 0x394, 0x06b, 0x196, 0x3e6, 0x019, 0x0ab, 0x222, 0x2ea, 0x17c, 0x3e5, 0x01a, 0x0af, 0x227, 0x2e1, 0x187, 0x3ff, - 0x000, 0x074, 0x1c8, 0x37f, 0x092, 0x1f8, 0x331, 0x110, 0x2f6, 0x16a, 0x3c1, 0x03e, 0x104, 0x2d5, 0x195, 0x3e7, - 0x018, 0x0aa, 0x221, 0x2eb, 0x17b, 0x3e4, 0x01b, 0x0b0, 0x229, 0x2dd, 0x18d, 0x3f8, 0x007, 0x07b, 0x1d2, 0x371, - 0x0a6, 0x21b, 0x2f5, 0x16b, 0x3c2, 0x03d, 0x103, 0x2d4, 0x197, 0x3e3, 0x01c, 0x0b1, 0x22b, 0x2db, 0x18f, 0x3f5, - 0x00a, 0x07e, 0x1d5, 0x36e, 0x0a9, 0x21f, 0x2ed, 0x177, 0x3d8, 0x027, 0x0c3, 0x24d, 0x29e, 0x1ed, 0x349, 0x0eb, - 0x2a0, 0x1eb, 0x34b, 0x0e8, 0x29a, 0x1f4, 0x339, 0x106, 0x2de, 0x18a, 0x3fb, 0x004, 0x078, 0x1cd, 0x379, 0x09a, - 0x203, 0x320, 0x129, 0x330, 0x111, 0x2f7, 0x169, 0x3c0, 0x03f, 0x105, 0x2d6, 0x194, 0x3e8, 0x017, 0x0a3, 0x216 + 0x256, 0x28d, 0x213, 0x307, 0x156, 0x39d, 0x062, 0x170, 0x3ca, 0x035, 0x0ed, 0x2a4, 0x1e4, 0x359, 0x0d3, 0x26b, 0x265, + 0x274, 0x251, 0x297, 0x202, 0x322, 0x126, 0x32b, 0x117, 0x302, 0x15c, 0x3a8, 0x057, 0x148, 0x380, 0x090, 0x1f6, 0x335, + 0x10c, 0x2ee, 0x175, 0x3d4, 0x02b, 0x0cc, 0x260, 0x27b, 0x23d, 0x2bb, 0x1b6, 0x3a1, 0x05e, 0x157, 0x39e, 0x061, 0x16f, + 0x3c6, 0x039, 0x0f7, 0x2b9, 0x1b8, 0x39f, 0x060, 0x166, 0x3b9, 0x046, 0x122, 0x31c, 0x12f, 0x33d, 0x0fc, 0x2ca, 0x1a4, + 0x3cc, 0x033, 0x0e6, 0x293, 0x209, 0x315, 0x13d, 0x358, 0x0d5, 0x26e, 0x25e, 0x27d, 0x23a, 0x2c0, 0x1b1, 0x3af, 0x050, + 0x136, 0x346, 0x0ef, 0x2aa, 0x1ce, 0x376, 0x0a0, 0x210, 0x30c, 0x14c, 0x389, 0x082, 0x1db, 0x367, 0x0b9, 0x23e, 0x2ba, + 0x1b7, 0x3a0, 0x05f, 0x164, 0x3b7, 0x048, 0x125, 0x326, 0x11c, 0x30a, 0x14f, 0x38f, 0x070, 0x1a8, 0x3c7, 0x038, 0x0f5, + 0x2b5, 0x1bd, 0x393, 0x06c, 0x199, 0x3e1, 0x01e, 0x0b3, 0x22f, 0x2d7, 0x193, 0x3ea, 0x015, 0x09d, 0x20a, 0x314, 0x13e, + 0x35a, 0x0d2, 0x26a, 0x267, 0x272, 0x253, 0x294, 0x208, 0x319, 0x137, 0x34c, 0x0e7, 0x295, 0x205, 0x31d, 0x12e, 0x33c, + 0x0fe, 0x2cd, 0x1a0, 0x3d5, 0x02a, 0x0c8, 0x258, 0x286, 0x22a, 0x2dc, 0x18e, 0x3f7, 0x008, 0x07c, 0x1d3, 0x370, 0x0a7, + 0x21d, 0x2f1, 0x171, 0x3cd, 0x032, 0x0e5, 0x292, 0x20b, 0x313, 0x13f, 0x35c, 0x0d0, 0x266, 0x273, 0x252, 0x296, 0x204, + 0x31f, 0x12a, 0x332, 0x10f, 0x2f4, 0x16c, 0x3c3, 0x03c, 0x101, 0x2d2, 0x19a, 0x3e0, 0x01f, 0x0b5, 0x233, 0x2c9, 0x1a6, + 0x3c9, 0x036, 0x0f0, 0x2ab, 0x1cb, 0x37c, 0x095, 0x1fd, 0x328, 0x11a, 0x306, 0x158, 0x3a2, 0x05d, 0x155, 0x39c, 0x063, + 0x174, 0x3d3, 0x02c, 0x0cf, 0x264, 0x275, 0x24f, 0x299, 0x1fa, 0x32c, 0x115, 0x2ff, 0x15f, 0x3ab, 0x054, 0x143, 0x36c, + 0x0ad, 0x225, 0x2e5, 0x181, 0x3ef, 0x010, 0x08c, 0x1f1, 0x344, 0x0f3, 0x2af, 0x1c4, 0x386, 0x088, 0x1e3, 0x35b, 0x0d1, + 0x269, 0x268, 0x26d, 0x25f, 0x27c, 0x23b, 0x2bf, 0x1b2, 0x3ae, 0x051, 0x13b, 0x355, 0x0da, 0x278, 0x248, 0x2a6, 0x1dc, + 0x365, 0x0c0, 0x246, 0x2a8, 0x1d6, 0x36d, 0x0ac, 0x224, 0x2e8, 0x17e, 0x3eb, 0x014, 0x09c, 0x207, 0x31a, 0x133, 0x341, + 0x0f8, 0x2bc, 0x1b5, 0x3a3, 0x05c, 0x152, 0x395, 0x06a, 0x18c, 0x3f9, 0x006, 0x07a, 0x1d1, 0x373, 0x0a4, 0x217, 0x2fe, + 0x160, 0x3ad, 0x052, 0x13c, 0x357, 0x0d7, 0x270, 0x25c, 0x281, 0x235, 0x2c6, 0x1aa, 0x3bc, 0x043, 0x11d, 0x30d, 0x14a, + 0x384, 0x08a, 0x1e7, 0x353, 0x0dd, 0x284, 0x22e, 0x2d8, 0x192, 0x3ec, 0x013, 0x099, 0x201, 0x323, 0x124, 0x321, 0x127, + 0x32d, 0x114, 0x2fd, 0x161, 0x3b0, 0x04f, 0x135, 0x343, 0x0f4, 0x2b4, 0x1be, 0x392, 0x06d, 0x19d, 0x3db, 0x024, 0x0be, + 0x244, 0x2b0, 0x1c2, 0x38a, 0x080, 0x1d9, 0x369, 0x0b6, 0x234, 0x2c8, 0x1a7, 0x3c8, 0x037, 0x0f1, 0x2ad, 0x1c6, 0x383, + 0x08d, 0x1f2, 0x33b, 0x100, 0x2d1, 0x19b, 0x3de, 0x021, 0x0bb, 0x240, 0x2b6, 0x1bb, 0x399, 0x066, 0x17a, 0x3df, 0x020, + 0x0b8, 0x23c, 0x2bd, 0x1b4, 0x3a5, 0x05a, 0x150, 0x390, 0x06f, 0x1a5, 0x3cb, 0x034, 0x0ea, 0x29d, 0x1ee, 0x348, 0x0ec, + 0x2a3, 0x1e5, 0x356, 0x0d8, 0x271, 0x257, 0x289, 0x220, 0x2ec, 0x178, 0x3d9, 0x026, 0x0c2, 0x24b, 0x2a1, 0x1ea, 0x34d, + 0x0e4, 0x291, 0x20c, 0x312, 0x141, 0x360, 0x0ca, 0x25a, 0x283, 0x230, 0x2d0, 0x19c, 0x3dd, 0x022, 0x0bc, 0x241, 0x2b3, + 0x1bf, 0x391, 0x06e, 0x1a2, 0x3d1, 0x02e, 0x0d6, 0x26f, 0x25d, 0x27f, 0x237, 0x2c4, 0x1ac, 0x3ba, 0x045, 0x121, 0x318, + 0x138, 0x34e, 0x0e3, 0x28f, 0x211, 0x30b, 0x14d, 0x38c, 0x073, 0x1c3, 0x387, 0x084, 0x1df, 0x362, 0x0c7, 0x255, 0x28e, + 0x212, 0x309, 0x153, 0x396, 0x069, 0x18b, 0x3fa, 0x005, 0x079, 0x1d0, 0x374, 0x0a2, 0x215, 0x301, 0x15d, 0x3a9, 0x056, + 0x147, 0x37a, 0x098, 0x200, 0x324, 0x11f, 0x316, 0x13a, 0x352, 0x0df, 0x288, 0x223, 0x2e9, 0x17d, 0x3e9, 0x016, 0x09e, + 0x20d, 0x310, 0x144, 0x372, 0x0a5, 0x219, 0x2fa, 0x165, 0x3b8, 0x047, 0x123, 0x31e, 0x12d, 0x338, 0x107, 0x2e0, 0x188, + 0x3fe, 0x001, 0x075, 0x1c9, 0x37e, 0x093, 0x1f9, 0x32f, 0x112, 0x2f9, 0x167, 0x3be, 0x041, 0x10b, 0x2e7, 0x17f, 0x3ed, + 0x012, 0x097, 0x1ff, 0x325, 0x11e, 0x311, 0x142, 0x366, 0x0ba, 0x23f, 0x2b8, 0x1b9, 0x39b, 0x064, 0x176, 0x3d6, 0x029, + 0x0c5, 0x250, 0x298, 0x1fc, 0x329, 0x119, 0x304, 0x15a, 0x3a6, 0x059, 0x14e, 0x38e, 0x071, 0x1ad, 0x3b6, 0x049, 0x128, + 0x32e, 0x113, 0x2fc, 0x162, 0x3b2, 0x04d, 0x131, 0x33f, 0x0fa, 0x2c2, 0x1af, 0x3b3, 0x04c, 0x130, 0x33e, 0x0fb, 0x2c7, + 0x1a9, 0x3bd, 0x042, 0x116, 0x300, 0x15e, 0x3aa, 0x055, 0x146, 0x378, 0x09b, 0x206, 0x31b, 0x132, 0x340, 0x0f9, 0x2be, + 0x1b3, 0x3ac, 0x053, 0x140, 0x35d, 0x0ce, 0x262, 0x279, 0x247, 0x2a7, 0x1d7, 0x36b, 0x0ae, 0x226, 0x2e3, 0x185, 0x3f6, + 0x009, 0x07d, 0x1d4, 0x36f, 0x0a8, 0x21e, 0x2f0, 0x172, 0x3ce, 0x031, 0x0de, 0x287, 0x228, 0x2df, 0x189, 0x3fd, 0x002, + 0x076, 0x1ca, 0x37d, 0x094, 0x1fb, 0x32a, 0x118, 0x303, 0x15b, 0x3a7, 0x058, 0x14b, 0x388, 0x083, 0x1dd, 0x364, 0x0c1, + 0x24a, 0x2a2, 0x1e9, 0x350, 0x0e1, 0x28b, 0x21a, 0x2f8, 0x168, 0x3bf, 0x040, 0x10a, 0x2e6, 0x180, 0x3ee, 0x011, 0x091, + 0x1f7, 0x334, 0x10d, 0x2ef, 0x173, 0x3cf, 0x030, 0x0dc, 0x280, 0x236, 0x2c5, 0x1ab, 0x3bb, 0x044, 0x120, 0x317, 0x139, + 0x34f, 0x0e2, 0x28c, 0x218, 0x2fb, 0x163, 0x3b4, 0x04b, 0x12c, 0x337, 0x108, 0x2e2, 0x186, 0x3fc, 0x003, 0x077, 0x1cc, + 0x37b, 0x096, 0x1fe, 0x327, 0x11b, 0x308, 0x154, 0x397, 0x068, 0x183, 0x3f3, 0x00c, 0x085, 0x1e0, 0x361, 0x0c9, 0x259, + 0x285, 0x22c, 0x2da, 0x190, 0x3f2, 0x00d, 0x086, 0x1e1, 0x35f, 0x0cb, 0x25b, 0x282, 0x232, 0x2cc, 0x1a1, 0x3d2, 0x02d, + 0x0d4, 0x26c, 0x263, 0x277, 0x249, 0x2a5, 0x1de, 0x363, 0x0c6, 0x254, 0x290, 0x20e, 0x30f, 0x145, 0x377, 0x09f, 0x20f, + 0x30e, 0x149, 0x382, 0x08e, 0x1f3, 0x33a, 0x102, 0x2d3, 0x198, 0x3e2, 0x01d, 0x0b2, 0x22d, 0x2d9, 0x191, 0x3f1, 0x00e, + 0x087, 0x1e2, 0x35e, 0x0cd, 0x261, 0x27a, 0x243, 0x2b1, 0x1c1, 0x38b, 0x07f, 0x1d8, 0x36a, 0x0b4, 0x231, 0x2cf, 0x19e, + 0x3da, 0x025, 0x0bf, 0x245, 0x2ac, 0x1c7, 0x381, 0x08f, 0x1f5, 0x336, 0x109, 0x2e4, 0x184, 0x3f4, 0x00b, 0x081, 0x1da, + 0x368, 0x0b7, 0x239, 0x2c1, 0x1b0, 0x3b1, 0x04e, 0x134, 0x342, 0x0f6, 0x2b7, 0x1ba, 0x39a, 0x065, 0x179, 0x3dc, 0x023, + 0x0bd, 0x242, 0x2b2, 0x1c0, 0x38d, 0x072, 0x1bc, 0x398, 0x067, 0x182, 0x3f0, 0x00f, 0x08b, 0x1e8, 0x351, 0x0e0, 0x28a, + 0x21c, 0x2f3, 0x16d, 0x3c4, 0x03b, 0x0ff, 0x2ce, 0x19f, 0x3d7, 0x028, 0x0c4, 0x24e, 0x29b, 0x1f0, 0x345, 0x0f2, 0x2ae, + 0x1c5, 0x385, 0x089, 0x1e6, 0x354, 0x0db, 0x27e, 0x238, 0x2c3, 0x1ae, 0x3b5, 0x04a, 0x12b, 0x333, 0x10e, 0x2f2, 0x16e, + 0x3c5, 0x03a, 0x0fd, 0x2cb, 0x1a3, 0x3d0, 0x02f, 0x0d9, 0x276, 0x24c, 0x29f, 0x1ec, 0x34a, 0x0e9, 0x29c, 0x1ef, 0x347, + 0x0ee, 0x2a9, 0x1cf, 0x375, 0x0a1, 0x214, 0x305, 0x159, 0x3a4, 0x05b, 0x151, 0x394, 0x06b, 0x196, 0x3e6, 0x019, 0x0ab, + 0x222, 0x2ea, 0x17c, 0x3e5, 0x01a, 0x0af, 0x227, 0x2e1, 0x187, 0x3ff, 0x000, 0x074, 0x1c8, 0x37f, 0x092, 0x1f8, 0x331, + 0x110, 0x2f6, 0x16a, 0x3c1, 0x03e, 0x104, 0x2d5, 0x195, 0x3e7, 0x018, 0x0aa, 0x221, 0x2eb, 0x17b, 0x3e4, 0x01b, 0x0b0, + 0x229, 0x2dd, 0x18d, 0x3f8, 0x007, 0x07b, 0x1d2, 0x371, 0x0a6, 0x21b, 0x2f5, 0x16b, 0x3c2, 0x03d, 0x103, 0x2d4, 0x197, + 0x3e3, 0x01c, 0x0b1, 0x22b, 0x2db, 0x18f, 0x3f5, 0x00a, 0x07e, 0x1d5, 0x36e, 0x0a9, 0x21f, 0x2ed, 0x177, 0x3d8, 0x027, + 0x0c3, 0x24d, 0x29e, 0x1ed, 0x349, 0x0eb, 0x2a0, 0x1eb, 0x34b, 0x0e8, 0x29a, 0x1f4, 0x339, 0x106, 0x2de, 0x18a, 0x3fb, + 0x004, 0x078, 0x1cd, 0x379, 0x09a, 0x203, 0x320, 0x129, 0x330, 0x111, 0x2f7, 0x169, 0x3c0, 0x03f, 0x105, 0x2d6, 0x194, + 0x3e8, 0x017, 0x0a3, 0x216, ];