Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vmthook index question #59

Open
ANrmlHuman opened this issue Jan 2, 2023 · 1 comment
Open

vmthook index question #59

ANrmlHuman opened this issue Jan 2, 2023 · 1 comment

Comments

@ANrmlHuman
Copy link

oRunStringEx = VMTHook< _RunStringEx>((PVOID**)Lua, (PVOID)hkRunStringEx, 111);

How did you get 111 as the index?

@Gaztoof
Copy link
Owner

Gaztoof commented Jan 2, 2023

By analysing. For instance you could look inside the CLuaInterface::FindAndRunScript which has a lot of easily recognizable strings, and see how it works. You'll end up finding a reference to what should be RunString given the arguments that are passed to it and it's location in CLuaInterface
image
But that will lead to the RunString function, and i'm hooking RunStringEx because it gets called by RunString anyway so it's preferable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants