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

I wrote a new loader without remote memory injection #56

Open
allfoxwy opened this issue Aug 28, 2024 · 17 comments
Open

I wrote a new loader without remote memory injection #56

allfoxwy opened this issue Aug 28, 2024 · 17 comments

Comments

@allfoxwy
Copy link

FYI https://github.com/allfoxwy/vanilla-dll-sideloader/releases/latest

It works by modify PE import directory, not by remote memory injection. Should calm some security software complain.

@shikulja
Copy link

The idea may be good, but it doesn't work on my ru client
https://wowruru.github.io/win_instruction.html

@allfoxwy
Copy link
Author

The idea may be good, but it doesn't work on my ru client https://wowruru.github.io/win_instruction.html

I built it on Turtle WoW.
Could you describe what is "doesn't work"? It can't patch WoW.exe? It's not loading mods? Or what?

@shikulja
Copy link

shikulja commented Aug 29, 2024

This is a regular 1.12 client, only patched (unrestricted mode) for loading ruRU resources.
WoW.exe was patched normally "WoW_sideload-DLL.exe" but does not start, the logs do not say anything about errors

@allfoxwy
Copy link
Author

That's sounds like sideload-DLL.dll not loaded.

You sure sideload-DLL.dll is also at the same folder with WoW_sideload-DLL.exe right?

@shikulja
Copy link

shikulja commented Aug 29, 2024

That's sounds like sideload-DLL.dll not loaded.

You sure sideload-DLL.dll is also at the same folder with WoW_sideload-DLL.exe right?

yes all was in one folder, also with SuperWoW\vanilla-tweaks\VanillaFixes
image

@allfoxwy
Copy link
Author

Thanks, I'll have a look, I'm downloading that RU client. Maybe the RU .exe is different than English client.

@shikulja
Copy link

Thanks, I'll have a look, I'm downloading that RU client. Maybe the RU .exe is different than English client.

np, vanillafixes injector works for me, it's just a remark

@allfoxwy
Copy link
Author

@shikulja I got some bugs fixed. Could you try https://github.com/allfoxwy/vanilla-dll-sideloader/releases/latest see if it works?

The Turtle EU client was so perfectly aligned so that those bugs didn't expose.
Thank you for mention this RU client.

@shikulja
Copy link

@allfoxwy now works, thanks.
Still need a way to load custom dlls in the future

@allfoxwy
Copy link
Author

allfoxwy commented Sep 2, 2024

Added customized DLL loading code.

@allfoxwy allfoxwy closed this as completed Sep 4, 2024
@allfoxwy
Copy link
Author

After I listen to Ayriana's words from turtle discord. I decided re-open this issue for a bit longer time.

I believe my loader has following advantage:

  1. No remote memory injection, so less Windows Defender alarm.
  2. My loader run in game's main thread.
  3. My loader would fire a function call when EnterWorld game event happens. This means mods could execute LUA related function, as in that timing LUA environment is ready.

Would you consider have a look or maybe adapt it?
It would load VanillaFixes if its file name is "VfPatcher.Vanilla1121mod.dll"

@allfoxwy allfoxwy reopened this Sep 16, 2024
@shikulja
Copy link

it can load .dll files according to the pattern, but cannot load from the subdirectory in which the .dll+lua project is located

@allfoxwy
Copy link
Author

it can load .dll files according to the pattern, but cannot load from the subdirectory in which the .dll+lua project is located

Yes Ayriana on discord asking me to make a text file to direct loading process now.
I think I could write something later.

@hannesmann
Copy link
Owner

Would you consider have a look or maybe adapt it?

I considered the option of modifying WoW.exe for VanillaFixes but decided against it because some servers kick you if you have a modified game executable. You can get around this by renaming it to something else and keeping WoW.exe in the same folder but I think this would make VanillaFixes harder to use. If you use something like vanilla-tweaks on top it can get even more confusing.

My loader would fire a function call when EnterWorld game event happens. This means mods could execute LUA related function, as in that timing LUA environment is ready.

This also seems out of scope for VanillaFixes. It would be better suited for a generic modding framework for the game, where you could load VanillaFixes on top.

Basically, the launcher is just there to get VanillaFixes loaded, and it's supposed to be as easy as possible to use. I added the option to load other DLLs because otherwise it can conflict with e.g. nampower. I explained this in the readme:

The included launcher is intended to be easy to use and transparent to the user. It should "just work" for the most common cases. For a configurable alternative that works with VanillaFixes and supports multiple game versions, try wowreeb.

@hannesmann
Copy link
Owner

It would load VanillaFixes if its file name is "VfPatcher.Vanilla1121mod.dll"

I can rename the DLL if necessary but this would have to be done for all other DLLs like nampower.dll, SuperWoWhook.dll, etc. Maybe it would be better if you loaded DLLs from a "mods" folder or from a text file like VanillaFixes?

This code should work without any changes: https://github.com/hannesmann/vanillafixes/blob/main/src/textfile.c

@allfoxwy
Copy link
Author

allfoxwy commented Sep 17, 2024

I added the option to load other DLLs because otherwise it can conflict with e.g. nampower.

My loader won't work with nampower. Yes that one is special.

I can rename the DLL if necessary......
This code should work without any changes: https://github.com/hannesmann/vanillafixes/blob/main/src/textfile.c

I received some words from Discord also suggest text file is better (could have comments). So no need adapt file name to my loader, I would see if I could adapt your implementation.

it can load .dll files according to the pattern, but cannot load from the subdirectory in which the .dll+lua project is located

That's a big idea. I think need some time to come up a more complete plan like this.

@allfoxwy
Copy link
Author

allfoxwy commented Sep 20, 2024

I adapted textfile.c . Now both loader works the same way. (I used to load mod from working folder, now I follow VanillaFixes, using wow base folder either)

I would leave this issue open, in case we back on this topic or you need reach me.

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

3 participants