Help combat parser

02/06/2014 20:42 tony1420#1
Hello, what i want to do is pull combat data from a game to be able to make a combat log. I have tried searching but have not found anything yet, i could be searching horribly wrong since i am not familiar with this.

This is more for self improvement so any references/tutorials for this would be a great help. The game i want to do this for is call aura kingdom. I would also like
a reference for finding where the combat data is stored as the game does not make combat log text.

I know this is not as advanced as the hacks made on this forum but this is something that i am very interested in and would be glad to get some assistance on the matter. The programming language that i am familiar with is c++

thank you for your time
02/07/2014 14:22 Mostey#2
Did you try to find your data by using a memory searcher like CheatEngine or T-Search? If so, you should be able to retrieve the combat data without any problems.

In case you are not familar with memory searchers I'd like to recommend you some tutorials on how to find addresses first. CheatEngine, for example, got a very nice build-in tutorial which you can easily access through it's helpmenu.

If you're still looking for tutorials and references, however, this is a good ressource: [Only registered and activated users can see links. Click Here To Register...]
02/07/2014 16:41 tony1420#3
thank you for the response. I have looked at cheat engine after your recommendation and it is a powerful tool. The game i am looking at hides itself after launch i was able to still look at the memory and started to code but findwindow function can't locate the window. I know i can ignore that for now but i would like to know how to get it working.

After finding some address's i find they are encrypted i believe read as some weird symbols through the function ReadProcessMemory.
02/07/2014 17:46 Mostey#4
Quote:
Originally Posted by tony1420 View Post
started to code but findwindow function can't locate the window. I know i can ignore that for now but i would like to know how to get it working.
What exactly is going on? The application is hiding immediately after start so you got no windows for that application? How about retrieving the process handle? [Only registered and activated users can see links. Click Here To Register...] seems to be a good reference for that. (Process32First, Process32Next)

Anyway, why don't you do that with a dll injection? You just need to inject your dll into your target process.

Quote:
Originally Posted by tony1420 View Post
After finding some address's i find they are encrypted i believe read as some weird symbols through the function ReadProcessMemory.
Encrypted addresses? I actually don't believe that they are encrypted in one way or another. At least I never got this scenario. ;O

Please provide some code in your future posts.
02/08/2014 00:27 tony1420#5
This is new to me so its quite possible that i am going about this wrong
To locate the window, The game's name is "Aura Kingdom Online" but in processes its just called game but its also a .bin.
LPCSTR LGameWindow = "game";
HWND hGameWindow = NULL;
hGameWindow = FindWindow(NULL, LGameWindow);

for the process read i got the address from cheat engine
//Temporary variable for holding on to a window handle
unsigned long _hwnd_tmp;
// number of bytes read
unsigned long _numread;
//open process to access
HANDLE _hwnd2 = OpenProcess(PROCESS_ALL_ACCESS, false, _hwnd_tmp);
//read the address
ReadProcessMemory(_hwnd2, (LPVOID)0x00252938, &_buffer[0], 4, &_numread);
02/08/2014 01:08 Mostey#6
Is _buffer big enough to hold at least 4 bytes? You forgot the declaration, which data type is used?

By the way, you need to get the process (and module) if your window does not have a name or is hidden. My previous post includes some information on how to do that with Tool Help.
02/09/2014 10:25 tony1420#7
sorry for the late response i work long hours on the weekend.

for the _buffer i declared it at such
char* _buffer = new char[4];
for again
ReadProcessMemory(_hwnd2, (LPVOID)0x00252938, &_buffer[0], 4, &_numread);
tried converting char to int using atoi and it returns 0 could it be the address it self, i tried different random address to get the same result


i was able to correct the findwindow issue turns out there was a ton of blank spaces after the name
02/09/2014 12:08 Mostey#8
Quote:
Originally Posted by tony1420 View Post
sorry for the late response i work long hours on the weekend.

for the _buffer i declared it at such
char* _buffer = new char[4];
for again
ReadProcessMemory(_hwnd2, (LPVOID)0x00252938, &_buffer[0], 4, &_numread);
tried converting char to int using atoi and it returns 0 could it be the address it self, i tried different random address to get the same result


i was able to correct the findwindow issue turns out there was a ton of blank spaces after the name
Any reason for placing the buffer on the heap? Secondly, values of addresses are usually not strings or char arrays. Just retrieve the value as an integral datatype such as unsigned int or unsigned long.

Code:
	uintptr_t someptr = 0;
	int * ptr = new int;
	ReadProcessMemory(GetCurrentProcess(), ptr, &someptr, sizeof(uintptr_t), NULL);
	std::cout << someptr;
	delete ptr;
works great.

atoi converts a cstring to an integral number, in case the string contains characters, the function will fail. Just tested this in my environment.
02/09/2014 19:02 tony1420#9
You are right when i switched to int, i wasn't thinking about that because i had thought it was a string to be able to identify names such as players and or mob names. How would i identify mobs dynamically.

for the buffer on the heap from the documentation said that it just returns the number of bytes transferred to the buffer was just using it as another test but yes it doesn't really matter.
02/09/2014 21:25 Mostey#10
Quote:
Originally Posted by tony1420 View Post
How would i identify mobs dynamically.
If I get you right, you wanted to identify entitys through their names? What if multiple entitys with the same name are present? That's very common in MMORPGs if you are facing some mobs to kill. In this case you obviously need some unique identifier. How about getting the base of all entitys and looping through them? I never did this in a MMORPG (only in shooters) but basically this should be the same structure.


Quote:
Originally Posted by tony1420 View Post
for the buffer on the heap from the documentation said that it just returns the number of bytes transferred to the buffer was just using it as another test but yes it doesn't really matter.
I don't get that.