I see you posted on the thread below. I don't know how you're getting the address to GetNameByVID function, but try this:
Use colddumper/another dumper to get the GetNameByVID address. Scroll down to the end of the function and search for instructions like these (it may vary depending on the game client):
mov ecx, [0x...]
push ...
add ecx,0x4
mov eax,[ecx]
call dword ptr [eax+0x8]
call 0x...
Also, the area of the function on your screenshot doesn't look right.
After finding these instructions, recreate them in a function where you return a const char * and receives the target VID as a parameter. Then, at the end of the asm code block, move the eax (which stores the return value of the function) into a const char * var you created, and return it to your function, like this:
const char * GetChrName(DWORD VID){
DWORD chrPtr = 0xDEADBEEF // your ptr here
const char * name;
__asm {
mov edx, [chrPtr]
mov ecx, [edx]
push VID // pushes VID as the function parameter
add ecx,0x4
mov eax,[ecx]
call dword ptr [eax+0x8]
call GetNameByVIDCall
mov name, eax // moves eax into our var
}
return name;
}
Or, if you want the easier way, use a function pointer (__asm will be happy hehehe xD). There are some tutorials in this forum, you can search for them.
ps: the code I posted might not work exactly as it is. It may be necessary to suit it to your game.