Posted: Tue May 12, 2009 4:19 pm Post subject: Hooking Embedded Lua Engine
Anyone have any experience with hooking an embedded lua engine in a game? There is a game I'm playing, and it has 1 compiled lua library in it's files (it's acctually a bunch of lua files compiled and combined into 1) I can't decompile it because there isn't a decompiler for the newest version of LUA (which this one is compiled for).
By loading up the game in IDA you can see lots of fuctions created for LUA use (StartDebugConsole, SetPlayerPosition, etc...) and I want to hook the LUA engine so I can at the very least get a console up and be able to create my own LUA scripts for the game.
I've done hooking before via DLL injection, but never hooked anything like LUA and really not sure where to start. Anyone with any experience with this mind giving me a nudge in the right direction?
Joined: 09 May 2003 Posts: 25870 Location: The netherlands
Posted: Tue May 12, 2009 6:16 pm Post subject:
Start with setting breakpoints at those locations and then check the parameters passed to it to figure out what is needed. (Or perhaps there is already some documentation out)
If it's object oriented you'll need to have an object of the specific type before actually calling the routines. Do this by hooking a specific function you know if called often.
Then save the pointer and use that as the base class when calling the routines _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum