Skip to content

How to rename a vtable function #3035

Answered by CouleeApps
wjllz asked this question in Q&A
Discussion options

You must be logged in to vote

Chances are, your vtable is defined as a pointer to a structure containing function pointers. You will need two structures: one for the vtable and one for the object. In the object structure, the first member should be a pointer to a vtable structure. In the vtable structure, you should define function pointers at the offsets where they are used.

In your example, it would probably look like this:

struct OSObject_vtable
{
    char unknown[0x28]; // ~5 more functions here that are not known
    int64_t* (*release)(struct OSObject* this);
};
struct OSObject
{
    OSObject_vtable* vtable;
    // Rest of fields of OSObject
};

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@wjllz
Comment options

Answer selected by wjllz
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