PTDE - Lua print 'restored'

Channel:
Subscribers:
30
Published on ● Video Link: https://www.youtube.com/watch?v=PqJv0hpxo3s



Duration: 0:26
18 views
0


- a little explanation.
the default Lua `print` is a call to `LuaB_print`, which refers to `"tostring"`. so devs usually implement custom Lua print function that refers to the same string too. so the trick is to find the one that is used (bp) and place the `jmp` to other. that should relocate the print to default console, which is enabled by editing subsystem to CUI from GUI (2 to 3) in PE header.
`from`-specific is the exe has `tostring` 3 times, while in some other specimens it was only one. only two of them are used: one in default print, other in custom.
it seems to be similar in dsr, but the same trick doesn't works here.