Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Last Chaos
You last visited: Today at 11:24

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Calling ingame function through C++? [Question]

Discussion on Calling ingame function through C++? [Question] within the Last Chaos forum part of the MMORPGs category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jul 2021
Posts: 9
Received Thanks: 0
Calling ingame function through C++? [Question]

Hello!

I have a question.
I know, that C++ can call ingame functions through pushing register to it.
But when I was debugging LC through x64dbg, I noticed that every ingame function get called from packet sending through messageDispatcher (but I'mm not sure..).
So here is a question:
Can I execute call ingame functions not through packets? Or the only way to it - packet sending?
nardy0145 is offline  
Old 11/09/2021, 16:53   #2
 
universal-lc's Avatar
 
elite*gold: 46
Join Date: Sep 2018
Posts: 80
Received Thanks: 33
1) LastChaos build is 32bit, so i guess you were referring at the x32dbg.

2) Edit the packet is a little bit better for many reason: for example there could be client side checks that you need to bypass and of course you can not simply push the instructions you have to hook that if you want for example edit it.

3) Directly push may sometimes have unexpected ending or memory corruption which may cause an interrupt from the OS and a deadly ending for you program

4) Is a little bit more easy edit the packet: hook sendtoserver -> malicious hex
and after you have hooked with success this function you don't need to hook and inject all the time new function: if you wanna try another exploit you don't have to work all the time on that function, create a dll injectable (and edited) version of the function and inject it, just need to find the correct combination of the hexadecimal code and you finished!

5) Servers may edits existing function and hide the symbol during the compilation. That's may be a little bit hard to reverse all the time the struct to find how they are build, create a dll version with your own edits and inject it. More easy work all the time on sendtoserver new, the program is ... "more portable"
universal-lc is offline  
Thanks
1 User
Old 11/10/2021, 13:51   #3
 
elite*gold: 0
Join Date: Jul 2021
Posts: 9
Received Thanks: 0
Yeah, of course I'm using x32dbg for LC

So, you mean that the easiest way -> sendtoservernewCmsg -> sniff packets HEX -> Create a dll hook and send hex I needed?
nardy0145 is offline  
Old 01/25/2022, 15:17   #4

 
elite*gold: 150
Join Date: Apr 2007
Posts: 2,392
Received Thanks: 6,644
Quote:
Originally Posted by nardy0145 View Post
Hello!

I have a question.
I know, that C++ can call ingame functions through pushing register to it.
While Packets are always the better / easier way ( basicly once you
have the Packetfunctions / Proxy you can do a lot without
having tons of Functions ), Typedefs are much better than pushes etc.

Here's an example of my old Hack:

Code:
typedef void ( __thiscall* CNetwork_GoZone )( void *ecx, int zone, int extra, int npc );
CNetwork_GoZone oGoZone = 0;

oGoZone = (CNetwork_GoZone)GetProcAddress( huInst, "?GoZone@CNetworkLibrary@@QAEXHHH@Z");

// after that just call it wit hthe right parameters
oGoZone( params...);
Of course GetProcAddress wont work anymore now a days
as far as i know but that just means you either use findpattern
to find your Function or put the Address directly.

You can of course do the same with SendToServerNew function.

Of course this requires you to also develope a Packetsniffer
to know what OP Codes what Packets have and how to build
the Packets to do the Actions you actually want to do ( or have the LC
Sourcecode ).
wurstbrot123 is offline  
Thanks
1 User
Reply

Tags
c++, debugging, last chaos


Similar Threads Similar Threads
std::function of a function returning an std::function
11/11/2013 - C/C++ - 19 Replies
Nun muss ich nach langer Zeit auch mal wieder einen Thread erstellen, weil mir Google nicht mehr weiterhelfen kann. Ich verzweifle an Folgendem Vorhaben: #include <Windows.h> #include <string> #include <iostream> using namespace std;
Help, calling an ingame function
03/13/2010 - General Coding - 2 Replies
Im trying with my dll to set off the "set stat function". The one that u press when you add a stat point to str, dex or what ever. My goal is to make players able to set there Stats to whatever they use to have from an earlier saved point. So if you play against different sort of mobs or players you reform your stats to be suetable for that sertan task in just 1 second right where you stand. Im thinking this is very useful for many ppl here. So now i could use help with the actuall call of...



All times are GMT +1. The time now is 11:24.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.