Created
December 27, 2023 12:14
-
-
Save adrian154/6c5f776cb3f4c5dda5145de1a6bf0e28 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// for parsing rev 6 QT metadata | |
data = //.. | |
meta = //.. | |
readNullStr = (buf, idx) => { | |
chars = [] | |
while(buf[idx] != 0) { | |
chars.push(buf[idx]) | |
idx++; | |
} | |
return Buffer.from(chars).toString("ascii"); | |
}; | |
console.log("CLASS: " + readNullStr(data, 0)); | |
console.log("=".repeat(30)); | |
const methodCount = meta.readInt32LE(16); | |
for(let i = 0; i < methodCount; i++) { | |
const index = meta.readInt32LE(56 + i * 20); | |
console.log('0x' + i.toString(16).padEnd(3, ' ') + ' : ' + readNullStr(data, index)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment