Hi guys I'm playing this game 'factorio' which uses lua as its script engine (single exe file, lua statically linked I think) Unfortunately, this is bare bones lua. For example the "io" and "os" modules are disabled. I managed to re-enable those modules by NOPing the calls to the functions that disable them, so at least there is that. The second thing I would like to do is to be able to extend the lua interepreter with a better one. For example, I just compiled one with sockets support (lua.sockets) and another one which brings python inside lua, with a shared state (crazy). How would someone do to achieve that in a smart way ? idea 1 : 1) inject my lua dll at runtime 2) hook all the lua functions of factorio.exe to my own functions that will call the recently injected dll idea 2: I don't have another idea which is yours ? Thanks guys !