EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Development (https://www.eqemulator.org/forums/forumdisplay.php?f=590)
-   -   Client Side DLL Hook Help (https://www.eqemulator.org/forums/showthread.php?t=37125)

Envisage 08-01-2013 06:12 PM

Client Side DLL Hook Help
 
Basically just looking for some info on how this is done with using something like dsetup.dll or dinput8.dll. I have read tons and hundreds of posts I have a very limited knowledge of windows based programming. Just hoping someone here might have the answers. Right now all we are looking to do is turn off the map in game in titanium.

Now more or less just have a few questions. Starting with a basic hook program that isn't going to require an executable to run. I'm fairly certain dsetup.dll and dinput8.dll are both loaded when the game starts. I know for a fact dsetup.dll is.

If anyone would be willing to help with this it would be greatly apperciated. If I could just see one example of how its done I could go from there.

EDIT: I have already found the correct memory address where the map is controlled.

Kingly_Krab 08-01-2013 06:19 PM

Pretty sure you're attempting to modify the client and that's rather illegal.

Envisage 08-01-2013 06:20 PM

Actually just the memory space it runs in. Not eqgame its self.

sorvani 08-01-2013 07:37 PM

He's trying to do the same then P99 does.

Kingly_Krab 08-01-2013 07:40 PM

Yeah, I talked to him in messages about it.

Envisage 08-01-2013 07:58 PM

More or less thats what we are going for we are trying to keep the dll as light as possiable to only modify the map and compass for now. Until we have actually done testing on what exploits actually work on the client we don't intend on making it any heavier than it needs to be. But if duping and things like that become an issue there has to be immediate action. That kind of thing can ruin a server and fast.

Right now this is just a fun project with me and a few people we do have our database populated up until luclin already. Quests for classic are nearing completion. The source is coming along nicely as well. Though we still do need to do vulnerability testing to certain exploits.

This dll will help with the classic feel etc. Right now thats all we want but if we can fix an exploit through our dll so people can play in a cheat free environment we will.

But not to get off topic we are just looking for something simple that controls the map etc. Which requires a little bit of reverse engineering if I'm not mistaken. I don't think we can just NULL out that part of memory.

lerxst2112 08-01-2013 08:32 PM

This might give you an idea of where to start. http://www.eqemulator.org/forums/showthread.php?t=36170

Envisage 08-01-2013 08:41 PM

Yeah Secrets knows his stuff. Has PM turned off though, that wasn't a bad code example I've already written and found some code for the dll the main problem I'm having is when you inject it what value is used to control the map window or can it just be replaced with another function from the other dll.

This is a little bit over my head I can code like combat and stuff like that but when it comes to memory etc its a bit rough.

Secrets 08-01-2013 09:28 PM

Quote:

Originally Posted by Envisage (Post 222978)
Yeah Secrets knows his stuff. Has PM turned off though, that wasn't a bad code example I've already written and found some code for the dll the main problem I'm having is when you inject it what value is used to control the map window or can it just be replaced with another function from the other dll.

This is a little bit over my head I can code like combat and stuff like that but when it comes to memory etc its a bit rough.

A good start would be to see what memory addresses MQ2 uses, and go from there. Look into Microsoft Detours as well, it should work for what you are looking to do. Also, you may have to open a disassembler on eqgame.exe to see function prototypes.

Envisage 08-01-2013 09:35 PM

Quote:

Originally Posted by Secrets (Post 222981)
A good start would be to see what memory addresses MQ2 uses, and go from there. Look into Microsoft Detours as well, it should work for what you are looking to do. Also, you may have to open a disassembler on eqgame.exe to see function prototypes.

Hey man thanks for responding was kinda hoping you would. I started with the MQ2 source thats more or less where I found the memory addresses. I tried finding them on my own and did get lucky with the map and compass. I did get detours as well. I will have to try disassembly because the part that has me stuck is what to inject that part of memory with.

I'm no where near your knowledge of this kinda stuff.

Drajor 08-02-2013 12:43 AM

http://www.amazon.com/Reversing-Secr...dp/0764574817/

Good read.

Envisage 08-02-2013 01:53 AM

It looks pretty straight forward with detours, basically hook the known memory address execute a custom function that does nothing. Will have to test it tomorrow.

Lol at the book post.

Envisage 08-02-2013 02:52 AM

Actually before I hit the sack, Secrets do you have an updated link for CDetour.rar?

Secrets 08-02-2013 06:52 AM

I don't use CDetours anymore. Microsoft Detours is bundled in with MQ2 if you wish to see how it works.

Envisage 08-02-2013 11:14 AM

Ahh I got a copy of 3.0 already I was just wondering if you still had that I saw that app your wrote in C thought it might be handy. :)


All times are GMT -4. The time now is 10:43 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.