module['exports'] = { 'numberToHexString': numberToHexString, 'hexStringToBufferArray': hexStringToBufferArray, 'bufferArrayToHexString': bufferArrayToHexString, 'makeTLV': makeTLV, 'resolveTLV': resolveTLV, 'makeA3SendData': makeA3SendData, 'makeA8SendData': makeA8SendData, 'makeA5SendData': makeA5SendData }; const frameLen = (0x3d540 ^ 0x3d5d6) * (0x9c688 ^ 0x9c68a); const sendLen = (0x88300 ^ 0x88314) * (0x21722 ^ 0x21720); const ST = '33'; const preProto = '0a0012'; const endProto = '1800'; const bMagic = 'fe'; const bVer = '01'; const bCmdId = '7531'; var SEQ = 0xbe59a ^ 0xbe599; function makeFrame(_0x35bc96) { let _0x268129 = parseInt(_0x35bc96['length'] / frameLen); let _0xacf032 = _0x35bc96['length'] % frameLen; let _0x42ec4d = new Array(); for (let _0x198e24 = 0x87337 ^ 0x87337; _0x198e24 < _0x268129; _0x198e24++) { _0x42ec4d['push'](_0x35bc96['slice'](_0x198e24 * frameLen, (_0x198e24 + (0x19940 ^ 0x19941)) * frameLen)); } if (_0xacf032 > (0x4a2e1 ^ 0x4a2e1)) { _0x42ec4d['push'](_0x35bc96['slice'](-_0xacf032)); } let _0x9b32c4 = new Array(); for (let _0x245523 = 0x67993 ^ 0x67993; _0x245523 < _0x42ec4d['length']; _0x245523++) { let _0x428823 = _0x42ec4d[_0x245523]; let _0x207300 = numberToHexString(_0x245523 + (0xb00ff ^ 0xb00fe), 0x1, !![]); let _0x46166a = ''; if (_0x245523 == (0x65203 ^ 0x65203)) { _0x46166a = numberToHexString(0x80 + _0x42ec4d['length'] - 0x1, 0x9f2cd ^ 0x9f2cc, !![]); } else { _0x46166a = numberToHexString(_0x42ec4d['length'] - _0x245523 - 0x1, 0x1, !![]); } let _0x157c71 = numberToHexString(parseInt(_0x428823['length'] / 0x2), 0x1, !![]); let _0xb3f3ea = ST + _0x207300 + _0x46166a + _0x157c71 + _0x428823; let _0x1d5160 = 0x0; for (let _0x3c4255 = 0x1; _0x3c4255 < parseInt(_0xb3f3ea['length'] / 0x2); _0x3c4255++) { let _0x6674ef = parseInt(_0xb3f3ea['slice'](_0x3c4255 * 0x2, (_0x3c4255 + (0x33575 ^ 0x33574)) * 0x2), 0xbd490 ^ 0xbd480); _0x1d5160 = _0x1d5160 ^ _0x6674ef; } _0xb3f3ea += numberToHexString(_0x1d5160, 0x1, !![]); _0x9b32c4['push'](_0xb3f3ea); } let _0x5f5d88 = new Array(); for (let _0x3a0ec9 = 0x1cc00 ^ 0x1cc00; _0x3a0ec9 < _0x9b32c4['length']; _0x3a0ec9++) { let _0x1f3035 = _0x9b32c4[_0x3a0ec9]; let _0x31b2a9 = numberToHexString(parseInt(_0x1f3035['length'] / (0x67658 ^ 0x6765a)), 0x43833 ^ 0x43832, !![]); let _0xb64a0c = preProto + _0x31b2a9 + _0x1f3035 + endProto; _0x5f5d88['push'](_0xb64a0c); } let _0x1e82ae = new Array(); for (let _0x543968 = 0xbcc79 ^ 0xbcc79; _0x543968 < _0x5f5d88['length']; _0x543968++) { let _0x59ccdb = _0x5f5d88[_0x543968]; let _0x1bb73b = numberToHexString(parseInt(_0x59ccdb['length'] / 0x2) + 0x8, 0x88553 ^ 0x88551, !![]); let _0x3d488f = numberToHexString(SEQ, 0x932b2 ^ 0x932b0, !![]); let _0x2fb921 = bMagic + bVer + _0x1bb73b + bCmdId + _0x3d488f + _0x59ccdb; _0x1e82ae['push'](_0x2fb921); } SEQ++; if (SEQ > (0x27c85 ^ 0x27c8a)) { SEQ = 0xd79d2 ^ 0xd79d3; } let _0x28fe81 = new Array(); for (let _0x35a7da = 0xe59b4 ^ 0xe59b4; _0x35a7da < _0x1e82ae['length']; _0x35a7da++) { let _0x434969 = _0x1e82ae[_0x35a7da]; let _0x162390 = parseInt(_0x434969['length'] / sendLen); let _0x199870 = _0x434969['length'] % sendLen; for (let _0x4a5a02 = 0x0; _0x4a5a02 < _0x162390; _0x4a5a02++) { let _0x15127c = _0x434969['slice'](_0x4a5a02 * sendLen, (_0x4a5a02 + (0x86b7e ^ 0x86b7f)) * sendLen); _0x28fe81['push'](hexStringToBufferArray(_0x15127c)); } if (_0x199870 > 0x0) { let _0x3bc1c1 = _0x434969['slice'](-_0x199870); _0x28fe81['push'](hexStringToBufferArray(_0x3bc1c1)); } } return _0x28fe81; } function makeA3SendData(_0xbfc508, _0x7891ad) { let _0x44971d = 'a3' + _0xbfc508; let _0x2651a0 = numberToHexString(parseInt(_0x7891ad['length'] / (0xe1b32 ^ 0xe1b30)), 0x2, ![]); _0x44971d += _0x2651a0; _0x44971d += _0x7891ad; return makeFrame(_0x44971d); } function makeA8SendData(_0xf08694, _0x7583ca) { let _0x429168 = 'a8' + _0xf08694; let _0x12e5be = numberToHexString(parseInt(_0x7583ca['length'] / 0x2), 0x2, ![]); _0x429168 += _0x12e5be; _0x429168 += _0x7583ca; return makeFrame(_0x429168); } function numberToHexString(_0xc38d55, _0x43704c, _0x35fbdc) { let _0x3fd1cd = _0xc38d55['toString'](0xa903a ^ 0xa902a); for (let _0x43c509 = _0x3fd1cd['length']; _0x43c509 < _0x43704c * 0x2; _0x43c509++) { _0x3fd1cd = '0' + _0x3fd1cd; } if (_0x3fd1cd['length'] > _0x43704c * 0x2) { _0x3fd1cd = _0x3fd1cd['substring'](_0x3fd1cd['length'] - _0x43704c * (0x56258 ^ 0x5625a)); } if (_0x35fbdc == ![]) { let _0x1eadfc = ''; for (let _0x1560e5 = _0x3fd1cd['length'] - 0x2; _0x1560e5 >= 0x0; _0x1560e5 -= 0x4a7b0 ^ 0x4a7b2) { _0x1eadfc = _0x1eadfc + _0x3fd1cd['substring'](_0x1560e5, _0x1560e5 + 0x2); } _0x3fd1cd = _0x1eadfc; } return _0x3fd1cd; } function hexStringToBufferArray(_0x34cce2) { let _0x498a85 = new Uint8Array(_0x34cce2['match'](/[0-9a-f]{2}/gi)['map'](function(_0x40572e) { return parseInt(_0x40572e, 0xa40de ^ 0xa40ce); })); return _0x498a85['buffer']; } function bufferArrayToHexString(_0x180899) { let _0x2ce7ed = Array['prototype']['map']['call'](new Uint8Array(_0x180899), _0x5ee1a1 => ('00' + _0x5ee1a1[ 'toString'](0xb3099 ^ 0xb3089))['slice'](-0x2))['join'](''); return _0x2ce7ed; } function makeTLV(_0x457cbe) { let _0x20719f = ''; for (let _0x273d52 = 0x0; _0x273d52 < _0x457cbe['length']; _0x273d52++) { _0x20719f += (_0x273d52 + (0x4a99f ^ 0x4a99e))['toString'](0x10)['padStart'](0xbde89 ^ 0xbde8b, '0') + ( _0x457cbe[_0x273d52]['length'] / 0x2)['toString'](0x10)['padStart'](0x2, '0') + _0x457cbe[_0x273d52]; } return '80' + (_0x20719f['length'] / (0x740e5 ^ 0x740e7))['toString'](0x10)['padStart'](0x2, '0') + _0x20719f; } function resolveTLV(_0x56da10) { let _0x40fe65 = new Array(); let _0x30a0a3 = parseInt(_0x56da10['substring'](0x206b6 ^ 0x206b4, 0x4), 0xddd22 ^ 0xddd32); let _0x2a1587 = 0x4; if (_0x30a0a3 > 0x80) { _0x2a1587 = _0x2a1587 + (_0x30a0a3 - (0xc1f20 ^ 0xc1fa0)) * 0x2; } let _0x5e64a1 = 0x33dd2 ^ 0x33dd3; while (_0x2a1587 < _0x56da10['length']) { let _0x1bad89 = parseInt(_0x56da10['substring'](_0x2a1587, _0x2a1587 + 0x2), 0x10); _0x2a1587 += 0x2; let _0x24cc76 = parseInt(_0x56da10['substring'](_0x2a1587, _0x2a1587 + (0x8331e ^ 0x8331c)), 0x10); _0x2a1587 += 0x2; let _0x3197e6 = _0x56da10['substring'](_0x2a1587, _0x2a1587 + _0x24cc76 * 0x2); _0x40fe65['push'](_0x3197e6); _0x2a1587 += _0x24cc76 * 0x2; } return _0x40fe65; } function makeA5SendData(_0x168749) { let _0x3a8eb6 = 'a5'; let _0x1100cb = Number(parseInt(_0x168749['length'] / 0x2))['toString'](0x10)['padStart'](0x2, '0'); _0x3a8eb6 += _0x1100cb; _0x3a8eb6 += _0x168749; return makeFrame(_0x3a8eb6); }