MCPcopy Create free account
hub / github.com/JaveleyQAQ/WeChatOpenDevTools-Python / writeStdString

Function writeStdString

scripts/WechatWin.dll/hook.js:12–30  ·  view source on GitHub ↗
(s, content)

Source from the content-addressed store, hash-verified

10 }
11}
12function writeStdString(s, content) {
13 var flag = s.add(23).readU8()
14 if (flag == 0x80) {
15 // 从堆中写入
16 var orisize = s.add(8).readUInt()
17 if (content.length > orisize) {
18 throw "must below orisize!"
19 }
20 s.readPointer().writeUtf8String(content)
21 s.add(8).writeUInt(content.length)
22 } else {
23 // 从栈中写入
24 if (content.length > 22) {
25 throw "max 23 for stack str"
26 }
27 s.writeUtf8String(content)
28 s.add(23).writeU8(content.length)
29 }
30}
31
32
33

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected