Textractor icon indicating copy to clipboard operation
Textractor copied to clipboard

Godot Engine ,add hook

Open DDWSdwqdq opened this issue 3 years ago • 2 comments

example-game: [NoMeme] PHOENIXES

DDWSdwqdq avatar Jun 09 '22 00:06 DDWSdwqdq

I tried to compile with this change but there is an error on an undeclared identifier: 'X64_MAX_REL_ADDR': undeclared identifier

Blu3train avatar Jun 09 '22 17:06 Blu3train

enum : DWORD { X64_MAX_REL_ADDR = 0x00300000 };

DDWSdwqdq avatar Jun 09 '22 18:06 DDWSdwqdq

Missing the function declaration in engine.h, then compile correctly

// Anim engines
bool InsertAnimHook();
bool InsertAnim2Hook();

Blu3train avatar Oct 19 '22 17:10 Blu3train

New Unityx86 engine hook doesn't work with "Higurashi When They Cry Hou" VN. When you hook the program, these two Hooks are inserted but then it doesn't find any threads while viewing the text. image

In order to work, I have to go back to the original "brute force" version by putting the filter on "string:Substring (int)" in the TextractorConfig.txt file.

Blu3train avatar Nov 19 '22 08:11 Blu3train

@Blu3train: Likely the VN doesn't use the components that this explicitly hooks, if the methods are found (and they will be as they are from mono itself: InsertMonoHooksByAssembly) then it will skip the search for any string hooks.

I used a similar approach (ask mono for the function addrs vs scanning) to improve the speed of the brute force on x64. The two approaches can be merged I think: add the string object to the list of methods that this hooks (although you would want to add back in configuration -- as force JITting all of the methods still has some perf impact).

dmner avatar Jan 04 '23 11:01 dmner

@dmner The problem with Higurashi is that InsertMonoHooksByAssembly finds two hookable functions but the text would be in another unlisted one. Unfortunately the fact that it detected two hookable functions, returns "true" from the function and therefore skips the bruteforce test.

Unfortunately I am not able to add the detect of the missing function. I hope the author of this PR does.

Blu3train avatar Jan 04 '23 19:01 Blu3train

@DDWSdwqdq I noticed that in the Texthook version of your project it detects hooks for Unityx86 Mono that use mono-2.0-sgen.dll, like the vn https://vndb.org/v24239. Could you kindly add it here as well? I thank you.

Blu3train avatar Apr 25 '23 10:04 Blu3train