Tally-ho chaps,
I have an issue calling the W2S function medic told me about
int __userpurge sub_434CA0@<eax>(int a1@<ecx>, int a2@<ebx>, int a3@<edi>, int a4, int a5, int a6)
This is what hex-rays ida gives me on the function. ida could be wrong? I know you have to wrap it to a STDCALL but it just crashed for me.
this is what I have so far I have been successful in injecting other calling conventions.
DWORD mainaddr = (DWORD)GetModuleHandle(TEXT("mb_warband.exe"));
DWORD address = mainaddr + 0x34CA0;
typedef int(__stdcall *worldToScreen)(int a1,int a2, int a3, int a4,int a5, int a6);
worldToScreen world;
world = (worldToScreen)(address);
float a = world(1,2,3,4,5,6);