Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Aura Kingdom
You last visited: Today at 14:40

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

Advertisement



[CODE]Ingame Functions( POST YOUR FINDINGS HERE )

Discussion on [CODE]Ingame Functions( POST YOUR FINDINGS HERE ) within the Aura Kingdom forum part of the MMORPGs category.

Reply
 
Old 02/19/2014, 08:36   #61
 
AlainProvist's Avatar
 
elite*gold: 0
Join Date: Aug 2012
Posts: 381
Received Thanks: 560
@ntKid : sent you a pm (in case you didn't noticed it)

@TheStupidDog : offsets not/no more valid. Don't know if this is caused by the latest patch that occured yesterday or the fact that I'm running the french client. Anyway I digged a little and as Oriya9 said there are a lot of things using the xyz coordinates. Was looking for something that could have been a matrix 44 or a vector 4 + quaternion but only found vector 3 or 4. It seems that they are rounding float values for coordinate display, instead of truncating it. I'll give another try tonight.
AlainProvist is offline  
Thanks
1 User
Old 02/19/2014, 12:01   #62
 
TheStupidDog's Avatar
 
elite*gold: 0
Join Date: Sep 2009
Posts: 78
Received Thanks: 54
Quote:
Originally Posted by AlainProvist View Post
@ntKid : sent you a pm (in case you didn't noticed it)

@TheStupidDog : offsets not/no more valid. Don't know if this is caused by the latest patch that occured yesterday or the fact that I'm running the french client. Anyway I digged a little and as Oriya9 said there are a lot of things using the xyz coordinates. Was looking for something that could have been a matrix 44 or a vector 4 + quaternion but only found vector 3 or 4. It seems that they are rounding float values for coordinate display, instead of truncating it. I'll give another try tonight.
Yeah, I had a feeling the offsets will change (after a patch), but I can track them down really fast now. There were several coords that looked like they moved you character but didn't but I eliminated them one by one and I'm almost certain they were the correct ones, but I found a totally new problem. It seems that certain zones you enter will use different pointers, so while those pointers work in most zones, they won't work in all of them lol. I've been kind of busy in the last few days so haven't been able to do much about it but its on my list of things to do (will also be trying to track down the movement speed).
TheStupidDog is offline  
Thanks
1 User
Old 02/19/2014, 14:22   #63
 
AlainProvist's Avatar
 
elite*gold: 0
Join Date: Aug 2012
Posts: 381
Received Thanks: 560
It makes sense if there is something called World structure instanciating the current map and containing pointers to entities like your own character. When you change to another map, you destroy the old one and allocate a new one that will reference your character again, but the old refenrence will be erased by something else.

There is a high probability that the dynamic adress of your coordinates doesn't change since your character's data should not be destroyed when you change the map. So maybe if you store the address of your character at the begining of the game (when spawning the first time) with your current method and then only use this address instead or recalculating it each time, then you'll keep it correct through map changes. But it's only guess from me... the only thing to do to make sure of this is to verify it with CE.
AlainProvist is offline  
Thanks
1 User
Old 02/20/2014, 09:16   #64
 
elite*gold: 59
Join Date: Oct 2012
Posts: 716
Received Thanks: 465
Quote:
Originally Posted by ntKid View Post
-
Could you please change this to the following link? Source release

FlyCraft.TobiLap is offline  
Thanks
1 User
Old 02/20/2014, 09:29   #65
 
Shane¸'s Avatar
 
elite*gold: 100
Join Date: May 2010
Posts: 1,948
Received Thanks: 1,635
to be always up-to-date with the offsets, gather the array of bytes and search in it
Shane¸ is offline  
Old 02/21/2014, 00:55   #66
 
elite*gold: 0
Join Date: Aug 2010
Posts: 5
Received Thanks: 0
where/how to use this codes anyway?
the bot works for me thanks for that!
i am using the default macro.lua , but i want to try something with your new codes
"where to paste the code?"
"where to save the file?"
"is there any file to delete before you paste the new code?"
shelepet09 is offline  
Old 02/23/2014, 17:56   #67
 
AlainProvist's Avatar
 
elite*gold: 0
Join Date: Aug 2012
Posts: 381
Received Thanks: 560
Some maybe-usefull things about TargetInfo structure :


Lose my entire day to reach this address and opcode and realized at the end that this code was commented with a so explicit name TT...
game.bin+28D3E6 - 68 A8B5E300 - push game.bin+A3B5A8 [TargetInfoWnd]


About the target ID :
- NPC/mobs and resources seem to have an id like 0xFFFFxxxx or 0xFFFExxxx
- Players have a full id 0xXXXXXXXX with the high part < 0xFFFE

ps : forgot to mention in my screenshot that the 3 float values after 0xFFFFFF00 (after the current target id) seem to be related to the camera position or orientation.
AlainProvist is offline  
Thanks
1 User
Old 02/24/2014, 12:03   #68
 
elite*gold: 0
Join Date: Jan 2008
Posts: 1
Received Thanks: 0
Hi! I am new to all reverse engineering business, so I am still learning. For some reason, I found out that the login part uses wininet library to send packets via HTTPS. If I remembered correctly, you can actually create an account using your facebook login. Socket sniffer told me that when client logins ( via _Launcher), the process established about 4-5 connections to multiple login servers including facebook, main server, etc. If this login packet is sent and read by facebook server, then the raw data should be kept unobfuscated.... UNLESS you can implement your custom encrypt/decrypt on facebook server (including the other 3-4 servers). So, I am not sure if the packet data before HTTPS or SSL is encrypted or not.

On the other hand, I am now looking into the client's packet sending. It uses WS2 WSASend to send out packet. I once saw an ingame login interface before, so I believe the login launcher and the game client are developed separately. Therefore, it is not a surprise that both process may have different packet encryption/send policy. My current goal is to backtrace that call and find the packet encrypt algorithm.
biloon is offline  
Old 02/25/2014, 10:10   #69
 
AlainProvist's Avatar
 
elite*gold: 0
Join Date: Aug 2012
Posts: 381
Received Thanks: 560
@ntKid : Is there a chance you could give (here or privately) some explainations about this ?
Code:
VOID mySelectNearestTarget( ULONG lpBase = 0x00F38224, ULONG lpFunction = 0x0068DB50 )
{
	__asm
	{
		mov esi, lpBase;
		mov esi, [ esi ];
		push 0x00000001;
		mov ecx, esi;
		call lpFunction;
	}
}

//most basic multiclient bot example.
mySelectNearestTarget( );
mySendSkillID( myGetSkillIdFromSlotBar( 1 ) );
What did you searched for to get the lpBase and what does it represent ? How did you find the lpFunction address ?

Your explainations would really unstuck me and allow me to understand how to go further than heap memory reading stuff. I've made lots of searches on the web to find tutos about similar stuff but ppl never explain how they found addresses...


Edit : (damned auto merge ^^)

Finally got it !!! ^^
Code:
0068DC12  push        1    
0068DC14  mov         ecx,esi 
0068DC16  call        0068D870
I was actually 2 call after this one in the callstack, in the part that apply the target it to the targetInfo structure. Was missing the code gathering the id from the nearest mob.

@ntKid : Thanks a lot for your pm . (Talking of this, are you receiving my pm or is your inbox full ? Maybe i'm paranoid but I always fear those limited message boxes -_-)
AlainProvist is offline  
Old 02/28/2014, 09:33   #70
 
AlainProvist's Avatar
 
elite*gold: 0
Join Date: Aug 2012
Posts: 381
Received Thanks: 560
Ok I successfully implemented my functions and have now a minimal bot working (target selection + skill use). The problem I have now is a random dead lock of the game. Did you encountered similar issues ntKid ? I first thought it was due to my use of a rand() call in my main loop (debugger stopped at this line in my thread), but after removing it I'm now crashing in the sleep() call that means that the game is crashing from itself... I'm injecting my code dll and Antimutex dll, but I still have no idea of what this last dll is for.
AlainProvist is offline  
Thanks
1 User
Old 02/28/2014, 09:41   #71
 
Shane¸'s Avatar
 
elite*gold: 100
Join Date: May 2010
Posts: 1,948
Received Thanks: 1,635
Quote:
Originally Posted by AlainProvist View Post
Ok I successfully implemented my functions and have now a minimal bot working (target selection + skill use). The problem I have now is a random dead lock of the game. Did you encountered similar issues ntKid ? I first thought it was due to my use of a rand() call in my main loop (debugger stopped at this line in my thread), but after removing it I'm now crashing in the sleep() call that means that the game is crashing from itself... I'm injecting my code dll and Antimutex dll, but I still have no idea of what this last dll is for.
mutex is used for 1 connection between server and client so it just won't allow you to run multiple clients
Shane¸ is offline  
Old 02/28/2014, 10:22   #72
 
AlainProvist's Avatar
 
elite*gold: 0
Join Date: Aug 2012
Posts: 381
Received Thanks: 560
OK, I was fearing it was removing magically any mutex of the game lol. So I suppose my deadlock problem comes from something wrong I do in my code (memory corruption ?)...


edit : Tried to debug the multiple crashed I got and still no clue of what happens... my latest crash is just crazy : I crashed in a read only call function of mine :
Code:
// disassembly view 
__asm
	{
		mov eax, lpBase;
5F6815B5  mov         eax,dword ptr [lpBase] 
		mov eax, [ eax ];
5F6815B8  mov         eax,dword ptr [eax] 
		mov eax, [ eax + 0x000000E0 ];
5F6815BA  mov         eax,dword ptr [eax+0E0h] 
		mov eax, [ eax + 0x00000010 ];
5F6815C0  mov         eax,dword ptr [eax+10h] 
		mov eax, [ eax + 0x0000000C ];
5F6815C3  mov         eax,dword ptr [eax+0Ch] ---> crashed here because eax is out of memory
		mov dwRes, eax;
5F6815C6  mov         dword ptr [dwRes],eax 
	}
Since my debugger was attached : I steped backward on the 1st intruction and executed the lines step by step, finally reaching the correct address... How the hell is it possible to have got an out of memory on this ? where does this out of memory pointer come from ?
AlainProvist is offline  
Old 03/01/2014, 20:53   #73
 
ntKid's Avatar
 
elite*gold: 0
Join Date: Nov 2008
Posts: 181
Received Thanks: 463
Quote:
Originally Posted by AlainProvist View Post
OK, I was fearing it was removing magically any mutex of the game lol. So I suppose my deadlock problem comes from something wrong I do in my code (memory corruption ?)...


edit : Tried to debug the multiple crashed I got and still no clue of what happens... my latest crash is just crazy : I crashed in a read only call function of mine :
Code:
// disassembly view 
__asm
	{
		mov eax, lpBase;
5F6815B5  mov         eax,dword ptr [lpBase] 
		mov eax, [ eax ];
5F6815B8  mov         eax,dword ptr [eax] 
		mov eax, [ eax + 0x000000E0 ];
5F6815BA  mov         eax,dword ptr [eax+0E0h] 
		mov eax, [ eax + 0x00000010 ];
5F6815C0  mov         eax,dword ptr [eax+10h] 
		mov eax, [ eax + 0x0000000C ];
5F6815C3  mov         eax,dword ptr [eax+0Ch] ---> crashed here because eax is out of memory
		mov dwRes, eax;
5F6815C6  mov         dword ptr [dwRes],eax 
	}
Since my debugger was attached : I steped backward on the 1st intruction and executed the lines step by step, finally reaching the correct address... How the hell is it possible to have got an out of memory on this ? where does this out of memory pointer come from ?
check if eax is valid to read before reading it, you may be trying to read something that it is still not created or being deleted, "IsBadReadPtr" eax before assuming it is a valid pointer. imagine if the eax = 0 and you do mov eax, [ eax ] it will try to read a invalid memory region.
If you are concerned about multithread you can detour the functions that you are going to call and add a critical section

INT ( WINAPI *pDetoured )( );
INT WINAPI myDetoured( )
{
INT dwRes = NULL;
EnterCriticalSection( &cs );
dwRes = pDetoured( );
LeaveCriticalSection( &cs );
return dwRes;
}

cheers.
ntKid is offline  
Thanks
1 User
Old 03/02/2014, 02:15   #74
 
elite*gold: 0
Join Date: Sep 2013
Posts: 216
Received Thanks: 6
how to make this work on private server? i wanna test it
pureleech is offline  
Old 03/02/2014, 13:10   #75
 
ntKid's Avatar
 
elite*gold: 0
Join Date: Nov 2008
Posts: 181
Received Thanks: 463
[UPDATE]( 1 ) ( CHECK FIRST POST )
-Added SelectNearestTarget function using game engine( without sending tab key ) to my research
-Linked AlainProvist research on post #19 to first post.

[UPDATE]( 2 ) ( CHECK FIRST POST )
-Added basic editable LUA multiclient bot example using AFKLoader and the published functions.

[UPDATE]( 3 ) ( CHECK FIRST POST )
-Added Camera ViewDistance variable
-Added Source Code of CLua

[UPDATE]( 4 ) ( CHECK FIRST POST )
-Added Thr!ce research on GetInventoryBase.
-Added my research on Thr!ce function to perform a linked list.
-Added LetsPlayPixelz research on target information.

[UPDATE]( 5 ) ( CHECK FIRST POST )
-Added Move to Position.
-Added Warp to Position.

Move to position will provide a fix for melee class to return back to spot when botting or whatever you want to use it for.

Warp to Position will allow you to skip little mobs in dungeon and go directly to the bosses by pressing the boss name on your quest list.

--
AlainProvist nice to know you changed to process context dll injection, will make your life easier except for the GUI part.

Thank you all for testing, debugging, sharing and being this friendly.
Keep it comming =)
ntKid is offline  
Reply


Similar Threads Similar Threads
Python Functions von Mt2 per C++ Code Inject ausführen?
12/02/2011 - C/C++ - 5 Replies
Hallo, wollte fragen, ob mir eventuell jemand beantworten kann, wie man Python Functions nützt, welche in den Metin2 - pack Files gespeichert sind. Und ob das überhaupt so wie ich mir das vorstelle möglich ist.
[Code / C++] Basic hooking of API Functions
07/19/2010 - Coding Tutorials - 2 Replies
Global: typedef BOOL (__stdcall * ReadProcessMemory_t)(HANDLE hProcess,LPVOID lpBaseAddress,LPCVOID lpBuffer,SIZE_T nSize,SIZE_T *lpNumberOfBytesRead); ReadProcessMemory_t pReadProcessMemory; Functions: //Credits to GD ; You can do it manually, too.
SOX findings, place ur sox findiings here
06/04/2007 - Silkroad Online - 8 Replies
place ur sox finds here :D i just found a sos lvl 8 glaive =P <hr>Append on Jun 4 2007, 01:11<hr> 20 mins later i find another sos chest.. lvl 13



All times are GMT +2. The time now is 14:40.


Powered by vBulletin®
Copyright ©2000 - 2024, 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 ©2024 elitepvpers All Rights Reserved.