清理 z, 删除 setFunctionNamesIfNecessary

This commit is contained in:
shenjack 2024-03-04 00:19:03 +08:00
parent 93674c6f9e
commit b7421ffc89
Signed by: shenjack
GPG Key ID: 7B1134A979775551
2 changed files with 28 additions and 29 deletions

38
md5.js
View File

@ -15,36 +15,18 @@
}
}
var z = function () {
var s = function () { }
s.prototype = {
p: {}
// checkEnvironment
if (typeof navigator !== "undefined" && navigator.userAgent.includes("Chrome/")) {
return true;
}
var r = new s()
if (!(r.__proto__ && r.__proto__.p === s.prototype.p)) return false
try {
if (typeof navigator != "undefined" && typeof navigator.userAgent == "string" && navigator.userAgent.indexOf("Chrome/") >= 0) return true
if (typeof version == "function" && version.length == 0) {
var q = version()
if (/^\d+\.\d+\.\d+\.\d+$/.test(q)) return true
}
} catch (p) { }
return false
if (typeof version === "function" && version.length === 0 && /^\d+\.\d+\.\d+\.\d+$/.test(version())) {
return true;
}
return false;
}()
function setFunctionNamesIfNecessary(a) {
function t() { };
if (typeof t.name == "string") return
for (var s = 0; s < a.length; s++) {
var r = a[s]
var q = Object.keys(r)
for (var p = 0; p < q.length; p++) {
var o = q[p]
var n = r[o]
if (typeof n == "function") n.name = o
}
}
}
function inherit(a, b) {
a.prototype.constructor = a
a.prototype["$i" + a.name] = a
@ -243,7 +225,6 @@
lazyOld: lazyOld,
updateHolder: updateHolder,
convertToFastObject: convertToFastObject,
setFunctionNamesIfNecessary: setFunctionNamesIfNecessary,
updateTypes: updateTypes,
setOrUpdateInterceptorsByTag: setOrUpdateInterceptorsByTag,
setOrUpdateLeafTags: setOrUpdateLeafTags
@ -8252,7 +8233,6 @@
}
}
var w = [A, C, F, H, J, L, M, O, P, Q, S, T, V, W, X, Y, Z]
hunkHelpers.setFunctionNamesIfNecessary(w)
var $ = {}
H.m8.prototype = {}
J.af.prototype = {

19
readme.md Normal file
View File

@ -0,0 +1,19 @@
# 某个游戏的 js 的逆向工程
## `md5.js`
- [ ] 清理所有空函数
- `function [a-zA-Z0-9]*\(\) \{ \}`
- 0/202
- [x] 清理 `setFunctionNamesIfNecessary`
- [ ] And more
## `index.dart.js`
- [ ] 清理所有空函数
- `function [a-zA-Z0-9]*\(\) \{ \}`
- 0/177
- [ ] And more