MCPcopy Create free account
hub / github.com/IIIImmmyyy/frida-il2cppDumper / parserString

Method parserString

_agent.js:1268–1280  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

1266const il2cppApi_1 = require("../../il2cppApi");
1267class Il2cppString extends NativeStruct_1.NativeStruct {
1268 static parserString(str) {
1269 // 获取MonoString的长度
1270 if (str.isNull()) {
1271 return "空";
1272 }
1273 // logHHex(str)
1274 let il2CppBase = Process.pointerSize * 2;
1275 var length = Memory.readU32(str.add(il2CppBase));
1276 // 获取MonoString的字符数据的指针(UTF-16编码)
1277 var charsPtr = str.add(il2CppBase + 0x4);
1278 // 从UTF-16编码的字符数据创建JavaScript字符串
1279 return Memory.readUtf16String(charsPtr, length);
1280 }
1281 static parser(systemString) {
1282 if (systemString.isNull()) {
1283 return "指针空";

Callers 1

_agent.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected