Conquer Playground

08/23/2015 02:43 Best Coder 2014#1
What is this?

Inspired by the [Only registered and activated users can see links. Click Here To Register...] thread by CptSky, I decided to try and make my own version of this.

Note: This is currently for learning purposes only, it is in no way intended to be some kind of "playable" thing.

The project is a C# DLL that is injected into the CO process which then hooks functions in the client and "tricks" the client into thinking that it's connecting and talking to an actual server.
The included "MinHookManaged" project is a thick C# binding to the [Only registered and activated users can see links. Click Here To Register...] library, which is the library that is currently used for the hooking part.
A launcher is also provided for convenience, but any launcher that is capable of injecting the DLL and calling the exported "Initialize" function should work fine.

The project currently targets the patch 4356 Conquer.exe. If you are interested in trying out the project, I'd suggest that you download the 4351 client, which can be found in the [Only registered and activated users can see links. Click Here To Register...] thread and then download and apply [Only registered and activated users can see links. Click Here To Register...].
It is of course possible to use this for other patches, but that will require you to update the addresses for the ReceiveMsg and SendMsg functions and quite possibly also some packets.

Files

Inside the bin/Debug or bin/Release folder, the following files will need to be copied to your Conquer.exe directory:

ConquerPlayground.dll - the C# DLL that contains all the "game logic" (not much so far).
Launcher.exe - responsible for launching Conquer.exe and injecting the DLL.
MinHook.x86.dll - the native MinHook library.
MinHookManaged.dll - the thick C# binding for the MinHook library.

Features

Close to none. Right now, there's almost nothing implemented. There's only a couple of packet handlers implemented which is just enough to allow you to "log in" (username/password and server doesn't matter), get items from the shopping mall, equip items, and use a couple of commands.

08/24/2015 12:50 splitter2k#2
looks nice! I'm going to check it out later.
btw. can you provide us the source code for the MinHook.x86.dll and the MinHookManaged.dll ? I'm sure that a lot of adresses has changed in different versions, or are you searching dynamically for function, like sendFunc from 00000000 to FFFFFFFF in the memory?
08/24/2015 13:39 Best Coder 2014#3
Quote:
Originally Posted by splitter2k View Post
looks nice! I'm going to check it out later.
btw. can you provide us the source code for the MinHook.x86.dll and the MinHookManaged.dll ? I'm sure that a lot of adresses has changed in different versions, or are you searching dynamically for function, like sendFunc from 00000000 to FFFFFFFF in the memory?
You might want to check it out before you start asking questions :o.
08/24/2015 20:29 Xio.#4
Well the code could be cleaner considering the small scale of that project. ReSharper completely freaked out when I opened the solution - but who am i to talk after letting Xio leak. All in all its very neat, cought me off guard when I saw the "Server" part being just queues :P

Nice work.
08/24/2015 22:02 Best Coder 2014#5
Quote:
Originally Posted by Xio. View Post
Well the code could be cleaner considering the small scale of that project. ReSharper completely freaked out when I opened the solution - but who am i to talk after letting Xio leak. All in all its very neat, cought me off guard when I saw the "Server" part being just queues :P

Nice work.
Seeing as I use StyleCop whose coding style rules differ a lot from the default ReSharper rules, it's not really that surprising to me that ReSharper would complain a lot.

What do you mean by "cleaner code", though? Less ReSharper issues?
08/25/2015 00:55 Xio.#6
Well your naming of private fields is equal to parameter names, requires to you prefix most assignments with a "this."


private GameNetwork gameNetwork;

public SendMsgHook(GameNetwork gameNetwork)
{
this.gameNetwork = gameNetwork;
this.Create(SendMsgAddress, new SendMsgDelegate(this.DetouredSendMsg));
}


You use the "this" prefix for almost everything, even if its totally not required, now, thats preference but I really dont like it.

private Queue<NetMsg> clientMessages;
private Queue<NetMsg> messages;

public GameNetwork()
{
this.clientMessages = new Queue<NetMsg>();
this.messages = new Queue<NetMsg>();
}


...all the redundand code in delegate assignments.
Red being redundant code.

this.Create(SendMsgAddress, new SendMsgDelegate(this.DetouredSendMsg));


Other than that its just resharper complaining about general rules I set for my own development.
08/25/2015 01:31 Best Coder 2014#7
Quote:
Originally Posted by Xio. View Post
Well your naming of private fields is equal to parameter names, requires to you prefix most assignments with a "this."


private GameNetwork gameNetwork;

public SendMsgHook(GameNetwork gameNetwork)
{
this.gameNetwork = gameNetwork;
this.Create(SendMsgAddress, new SendMsgDelegate(this.DetouredSendMsg));
}


You use the "this" prefix for almost everything, even if its totally not required, now, thats preference but I really dont like it.

private Queue<NetMsg> clientMessages;
private Queue<NetMsg> messages;

public GameNetwork()
{
this.clientMessages = new Queue<NetMsg>();
this.messages = new Queue<NetMsg>();
}


...all the redundand code in delegate assignments.
Red being redundant code.

this.Create(SendMsgAddress, new SendMsgDelegate(this.DetouredSendMsg));


Other than that its just resharper complaining about general rules I set for my own development.
[Only registered and activated users can see links. Click Here To Register...].

I know there's no need to explicitly "new" a delegate, but personally I prefer the explicitness.
08/25/2015 04:55 Xio.#8
Quote:
Originally Posted by Best Coder 2014 View Post
...
We all have our preferences :P I like seeing less code whenever possible :P
08/25/2015 15:08 KraHen#9
Quote:
Originally Posted by Xio. View Post
We all have our preferences :P I like seeing less code whenever possible :P
I completely disagree with you on this, the style that he follows makes the code more readable IMO. Less code doesn't necessarily mean cleaner code, readability is way more important than saving 5 characters per a constructor assignment. But that's just me. :)
08/13/2017 19:15 boDil#10
Quote:
Originally Posted by ahmedblizzard View Post
bro Can u make an aimbot for a private server? i will pay money for it trust me just reply back and i will be giving u my skype so we can contact
No.
08/13/2017 19:29 Spirited#11
Quote:
Originally Posted by boDil View Post
No.
He asked me the same thing. He's just going around spamming everyone.