Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

Reply
 
Thread Tools Display Modes
  #1  
Old 08-01-2013, 06:12 PM
Envisage
Sarnak
 
Join Date: Mar 2010
Posts: 45
Default 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.
Reply With Quote
  #2  
Old 08-01-2013, 06:19 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,595
Default

Pretty sure you're attempting to modify the client and that's rather illegal.
Reply With Quote
  #3  
Old 08-01-2013, 06:20 PM
Envisage
Sarnak
 
Join Date: Mar 2010
Posts: 45
Default

Actually just the memory space it runs in. Not eqgame its self.
Reply With Quote
  #4  
Old 08-01-2013, 07:37 PM
sorvani
Dragon
 
Join Date: May 2010
Posts: 965
Default

He's trying to do the same then P99 does.
Reply With Quote
  #5  
Old 08-01-2013, 07:40 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,595
Default

Yeah, I talked to him in messages about it.
Reply With Quote
  #6  
Old 08-01-2013, 07:58 PM
Envisage
Sarnak
 
Join Date: Mar 2010
Posts: 45
Default

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.
Reply With Quote
  #7  
Old 08-01-2013, 08:32 PM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,742
Default

This might give you an idea of where to start. http://www.eqemulator.org/forums/showthread.php?t=36170
Reply With Quote
  #8  
Old 08-01-2013, 08:41 PM
Envisage
Sarnak
 
Join Date: Mar 2010
Posts: 45
Default

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.
Reply With Quote
  #9  
Old 08-01-2013, 09:28 PM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,447
Default

Quote:
Originally Posted by Envisage View Post
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.
Reply With Quote
  #10  
Old 08-01-2013, 09:35 PM
Envisage
Sarnak
 
Join Date: Mar 2010
Posts: 45
Default

Quote:
Originally Posted by Secrets View Post
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.
Reply With Quote
  #11  
Old 08-02-2013, 12:43 AM
Drajor's Avatar
Drajor
Developer
 
Join Date: Nov 2012
Location: Halas
Posts: 355
Default

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

Good read.
__________________
Drajor regards you indifferently -- what would you like your tombstone to say?
Reply With Quote
  #12  
Old 08-02-2013, 01:53 AM
Envisage
Sarnak
 
Join Date: Mar 2010
Posts: 45
Default

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.
Reply With Quote
  #13  
Old 08-02-2013, 02:52 AM
Envisage
Sarnak
 
Join Date: Mar 2010
Posts: 45
Default

Actually before I hit the sack, Secrets do you have an updated link for CDetour.rar?
Reply With Quote
  #14  
Old 08-02-2013, 06:52 AM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,447
Default

I don't use CDetours anymore. Microsoft Detours is bundled in with MQ2 if you wish to see how it works.
Reply With Quote
  #15  
Old 08-02-2013, 11:14 AM
Envisage
Sarnak
 
Join Date: Mar 2010
Posts: 45
Default

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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 08:20 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3