This update brought some changes to the character list. This "tutorial" will show you how to read it based on what I could find.
Code:
#define LOGININFO_ADDR 0x546CB0
As long as structures don't change this is all you need! It is the address of the following structure:
Code:
#pragma pack(1)
struct loginInfo
{
uint32_t charListBegin;
uint32_t charListEnd;
char unknown[12];
textField accountName;
textField password;
};
As you can see, this contains the pointer to the beginning of a list of characters on your account. The length of the list can be calculated as:
Code:
uint32_t length = (li->charListEnd - li->charListBegin)/sizeof(charListEntry);
Now that you have charListBegin and length, all you gotta do is read an array of the following structure with that size:
Code:
#pragma pack(1)
struct charListEntry
{
uint32_t unknown1;
textField charName;
textField worldName;
union
{
uint8_t asByte;
uint32_t asUint;
} isPreview;
union
{
uint8_t asBytes[4];
uint32_t asUInt;
} worldIP;
union
{
uint16_t asUShort;
uint32_t asUInt;
} worldPort;
};
Code:
...
loginInfo* li = (loginInfo*) malloc( sizeof(loginInfo));
if(ReadProcessMemory(clientHandle,(LPCVOID)(clientBase + LOGININFO_ADDR),(LPVOID)li,sizeof(loginInfo),NULL))
{
uint32_t length = (li->charListEnd - li->charListBegin)/sizeof(charListEntry);
charListEntry* charList = (charListEntry*) calloc(length,sizeof(charListEntry));
if(ReadProcessMemory(clientHandle,(LPCVOID)li->charListBegin,(LPVOID)charList,length*sizeof(charListEntry),NULL))
{
...
The attached code shows how to transverse the list and display the data. I have tested it with 2 accounts and seems to be working OK. Any improvement, question or bug report* is welcome.
GL
*only bugs regarding reading the character list itself please
P.S.: For information on the textField structure, see http://tpforums.org/forum/thread-11358.html