Skip to content

How can i get IL2CPP Method from method memory virtual address? #563

Closed Answered by vfsfitvnm
NRTnarathip asked this question in Q&A
Discussion options

You must be logged in to vote

I do something similar here:

for (const handle of handles) {
if (handle.compare(Il2Cpp.module.base) > 0 && handle.compare(Il2Cpp.module.base.add(Il2Cpp.module.size)) < 0) {
const method = searchInsert(handle);
if (method) {
const offset = handle.sub(method.virtualAddress);
if (offset.compare(0xfff) < 0) {
// prettier-ignore
state.buffer.push(`\x1b[2m0x${method.relativeVirtualAddress.toString(16).padStart(8, "0")}\x1b[0m\x1b[2m+0x${offset.toString(16).padStart(3, `0`)}\x1b[0m ${method.class.type.name}::\x1b[1m${method.name}\x1b[0m`);
}
}
}
}

What …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@NRTnarathip
Comment options

@vfsfitvnm
Comment options

Answer selected by NRTnarathip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants