Looks like you use dynamic addresses and no static address. Dynamic addresses vary everytime you run Nostale and allocate new memory.
You have to deduce which address writes to your dynamic address (you have to find the new one) and use then the pointer.
Remember that declaring your function with "naked" removes the prolog and epilog from it (cf ).
So you have to add the "ret" instruction at the end of your function else your program will continue to execute undefined instructions after the call to "walkAddress".
Looks like you use dynamic addresses and no static address. Dynamic addresses vary everytime you run Nostale and allocate new memory.
You have to deduce which address writes to your dynamic address (you have to find the new one) and use then the pointer.
Hello IceTrailer and thank you for your reply,
I don't understand what do you mean, the address I found is a static address.
Quote:
Originally Posted by DarkyZShadow
Remember that declaring your function with "naked" removes the prolog and epilog from it (cf ).
So you have to add the "ret" instruction at the end of your function else your program will continue to execute undefined instructions after the call to "walkAddress".
Hello DarkyZShadow and thank you for your reply,
I've added ret at the end but it doesn't work.
I've tryed also to set all the registers as they normally are before calling the function but steel it doesn't works.
Hello DarkyZ and thank you for your reply,
I've added ret at the end but it doesn't work.
I've tryed also to set all the registers as they normally are before calling the function but steel it doesn't works.
How did you do that ? Using PUSHAD/POPFD instructions ? Also, try to save flags (PUSHFD/POPFD).
Code:
unsigned newPosition = 0x000A000A;
DWORD walkAddress = 0x00490A40;
void __declspec(naked) ourFunct() {
__asm {
; Save registers & flags
pushad
pushfd
mov eax, myPosition
mov edx, newPosition
call walkAddress
; Restore flags & registers: don't forget to reverse the order
popfd
popad
ret
}
}
If it doesn't work, you probably have a problem when you call the "walk" function (bad address, bad parameters, ...)
Do you know how can I call It in c++ or in c# when I need to move my char?
For now I've edit the move coords whit memory write (code cave) and when I click my char moves in the right coords.
Now I want to call my function without click in the game.
std::function of a function returning an std::function 11/11/2013 - C/C++ - 19 Replies Nun muss ich nach langer Zeit auch mal wieder einen Thread erstellen, weil mir Google nicht mehr weiterhelfen kann.
Ich verzweifle an Folgendem Vorhaben:
#include <Windows.h>
#include <string>
#include <iostream>
using namespace std;