259 lines
9.8 KiB
JavaScript
259 lines
9.8 KiB
JavaScript
/* Metro module 504; source: unknown; dependencies: [] */
|
|
function _fun6446(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#6446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:554:6, offset: 0x00cfb70d, size: 70 bytes, params: 8, frame: 16
|
|
const f = function(a0, a1, a2, a3) {
|
|
var value;
|
|
if (a0 === 0) {
|
|
return a1 & a2 ^ ~a1 & a3;
|
|
}
|
|
if (a0 === 1) {
|
|
return a1 ^ a2 ^ a3;
|
|
}
|
|
if (a0 === 3) {
|
|
return a1 ^ a2 ^ a3;
|
|
}
|
|
if (a0 === 2) {
|
|
value = a1 & a2;
|
|
value ^= a1 & a3;
|
|
return value ^ a2 & a3;
|
|
}
|
|
};
|
|
const ROTL = function(a0, a1) {
|
|
return a0 << a1 | a0 >>> 32 - a1;
|
|
};
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
exports.default = sha1;
|
|
function sha1(a0) { // fn#6449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:554:251, offset: 0x00cfb7ca, size: 1267 bytes, params: 2, frame: 44
|
|
var r2;
|
|
var r0;
|
|
var r13;
|
|
var r22;
|
|
var r21;
|
|
var r27;
|
|
var r28;
|
|
var r29;
|
|
var r30;
|
|
var r31;
|
|
var Array;
|
|
var prototype;
|
|
var slice;
|
|
var call;
|
|
var items3;
|
|
var length;
|
|
var value2;
|
|
var push;
|
|
var charCodeAt;
|
|
var value3;
|
|
var Uint32Array;
|
|
var value8;
|
|
var uint32Array;
|
|
var value9;
|
|
var value10;
|
|
var value11;
|
|
var value12;
|
|
var value13;
|
|
var value14;
|
|
var value15;
|
|
var value16;
|
|
var property;
|
|
var value17;
|
|
var value18;
|
|
var value22;
|
|
var value23;
|
|
var value24;
|
|
var value25;
|
|
var value26;
|
|
var value27;
|
|
var property2;
|
|
var property3;
|
|
var property4;
|
|
var property5;
|
|
var value28;
|
|
var value29;
|
|
var value30;
|
|
var value31;
|
|
var value32;
|
|
var value33;
|
|
var value34;
|
|
var value35;
|
|
let value = a0;
|
|
const items4 = [1518500249, 1859775393, 2400959708, 3395469782];
|
|
const items2 = [1732584193, 4023233417, 2562383102, 271733878, 3285377520];
|
|
if (typeof value === 'string') {
|
|
value = global.unescape(global.encodeURIComponent(value));
|
|
items3 = [];
|
|
length = value.length;
|
|
value2 = 0;
|
|
if (value2 < length) {
|
|
r2 = value2;
|
|
reducibleLoop4: while (true) {
|
|
push = items3.push;
|
|
charCodeAt = value.charCodeAt;
|
|
Reflect.apply(push, items3, [Reflect.apply(charCodeAt, value, [r2])]);
|
|
value3 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
|
length = value.length;
|
|
if (value3 < length) {
|
|
r2 = value3;
|
|
continue reducibleLoop4;
|
|
}
|
|
r0 = items3;
|
|
break reducibleLoop4;
|
|
}
|
|
} else {
|
|
r0 = items3;
|
|
}
|
|
} else {
|
|
Array = global.Array;
|
|
reducibleJoin5: while (true) {
|
|
if (Array.isArray(value)) {
|
|
r0 = value;
|
|
break reducibleJoin5;
|
|
}
|
|
Array = global.Array;
|
|
prototype = Array.prototype;
|
|
slice = prototype.slice;
|
|
call = slice.call;
|
|
value = Reflect.apply(call, slice, [value]);
|
|
r0 = value;
|
|
break reducibleJoin5;
|
|
}
|
|
}
|
|
r0.push(128);
|
|
value = r0.length / 4;
|
|
let Math = global.Math;
|
|
value = 16;
|
|
const value4 = Math.ceil((value + 2) / value);
|
|
Array = global.Array;
|
|
const array = new Array(value4);
|
|
const value7 = 0;
|
|
if (value7 < value4) {
|
|
r2 = value7;
|
|
reducibleLoop6: while (true) {
|
|
Uint32Array = global.Uint32Array;
|
|
prototype = Uint32Array.prototype;
|
|
value8 = Object.create(prototype, {constructor: {value: Uint32Array}});
|
|
uint32Array = new Uint32Array(value);
|
|
value9 = uint32Array instanceof Object ? uint32Array : value8;
|
|
r13 = value7;
|
|
reducibleLoop7: while (true) {
|
|
value10 = 64 * r2;
|
|
value11 = r0[value10 + 4 * r13] << 24;
|
|
value12 = 64 * r2;
|
|
value13 = r0[value12 + 4 * r13 + 1] << value;
|
|
value14 = 64 * r2;
|
|
value15 = r0[value14 + 4 * r13 + 2] << 8;
|
|
value16 = 64 * r2;
|
|
property = r0[value16 + 4 * r13 + 3];
|
|
value9[r13] = value11 | value13 | value15 | property;
|
|
value17 = typeof r13 === 'bigint' ? r13 + 1n : +r13 + 1;
|
|
if (value17 < value) {
|
|
r13 = value17;
|
|
continue reducibleLoop7;
|
|
}
|
|
break reducibleLoop7;
|
|
}
|
|
array[r2] = value9;
|
|
value18 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
|
if (value18 < value4) {
|
|
r2 = value18;
|
|
continue reducibleLoop6;
|
|
}
|
|
break reducibleLoop6;
|
|
}
|
|
}
|
|
property = array[value4 - 1];
|
|
const value19 = r0.length - 1;
|
|
Math = global.Math;
|
|
property[14] = 8 * value19 / Math.pow(2, 32);
|
|
property = array[value4 - 1];
|
|
Math = global.Math;
|
|
let floor = Math.floor;
|
|
property[14] = Reflect.apply(floor, Math, [array[value4 - 1][14]]);
|
|
array[value4 - 1][15] = 8 * (r0.length - 1) & 4294967295;
|
|
if (value7 < value4) {
|
|
r0 = value7;
|
|
reducibleLoop10: while (true) {
|
|
Uint32Array = global.Uint32Array;
|
|
prototype = Uint32Array.prototype;
|
|
value22 = Object.create(prototype, {constructor: {value: Uint32Array}});
|
|
uint32Array = new Uint32Array(80);
|
|
value23 = uint32Array instanceof Object ? uint32Array : value22;
|
|
r22 = value7;
|
|
reducibleLoop11: while (true) {
|
|
value23[r22] = array[r0][r22];
|
|
value24 = typeof r22 === 'bigint' ? r22 + 1n : +r22 + 1;
|
|
if (value24 < value) {
|
|
r22 = value24;
|
|
continue reducibleLoop11;
|
|
}
|
|
r21 = value;
|
|
break reducibleLoop11;
|
|
}
|
|
reducibleLoop12: while (true) {
|
|
property = value23[r21 - 3];
|
|
value25 = property ^ value23[r21 - 8];
|
|
value26 = value25 ^ value23[r21 - 14];
|
|
value23[r21] = ROTL(value26 ^ value23[r21 - value], 1);
|
|
value27 = typeof r21 === 'bigint' ? r21 + 1n : +r21 + 1;
|
|
if (value27 < 80) {
|
|
r21 = value27;
|
|
continue reducibleLoop12;
|
|
}
|
|
break reducibleLoop12;
|
|
}
|
|
property = items2[value7];
|
|
property2 = items2[1];
|
|
property3 = items2[2];
|
|
property4 = items2[3];
|
|
property5 = items2[4];
|
|
r21 = value7;
|
|
r27 = property5;
|
|
r28 = property4;
|
|
r29 = property3;
|
|
r30 = property2;
|
|
r31 = property;
|
|
reducibleLoop14: while (true) {
|
|
Math = global.Math;
|
|
floor = Math.floor;
|
|
value28 = Reflect.apply(floor, Math, [r21 / 20]);
|
|
value29 = ROTL(r31, 5);
|
|
value30 = value29 + f(value28, r30, r29, r28) + r27;
|
|
value31 = value30 + items4[value28];
|
|
value32 = value31 + value23[r21] >>> value7;
|
|
value33 = ROTL(r30, 30) >>> value7;
|
|
value34 = typeof r21 === 'bigint' ? r21 + 1n : +r21 + 1;
|
|
if (value34 < 80) {
|
|
r21 = value34;
|
|
r27 = r28;
|
|
r28 = r29;
|
|
r29 = value33;
|
|
r30 = r31;
|
|
r31 = value32;
|
|
continue reducibleLoop14;
|
|
}
|
|
break reducibleLoop14;
|
|
}
|
|
items2[value7] = items2[value7] + value32 >>> value7;
|
|
items2[1] = items2[1] + r31 >>> value7;
|
|
items2[2] = items2[2] + value33 >>> value7;
|
|
items2[3] = items2[3] + r29 >>> value7;
|
|
items2[4] = items2[4] + r28 >>> value7;
|
|
value35 = typeof r0 === 'bigint' ? r0 + 1n : +r0 + 1;
|
|
if (value35 < value4) {
|
|
r0 = value35;
|
|
continue reducibleLoop10;
|
|
}
|
|
break reducibleLoop10;
|
|
}
|
|
}
|
|
return [items2[value7] >> 24 & 255, items2[value7] >> value & 255, items2[value7] >> 8 & 255, 255 & items2[value7],
|
|
items2[1] >> 24 & 255, items2[1] >> value & 255, items2[1] >> 8 & 255, 255 & items2[1], items2[2] >> 24 & 255,
|
|
items2[2] >> value & 255, items2[2] >> 8 & 255, 255 & items2[2], items2[3] >> 24 & 255,
|
|
items2[3] >> value & 255, items2[3] >> 8 & 255, 255 & items2[3], items2[4] >> 24 & 255,
|
|
items2[4] >> value & 255, items2[4] >> 8 & 255, 255 & items2[4]];
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun6446, 504, []) /* metro module 504 */;
|