Posted: Tue May 19, 2015 1:21 am Post subject: Calling a function through CE debugger
Ok, so I saw this video in which this guy calls a function from the pinball game using CE ("Finding ASM functions with Cheat Engine's Ultimap" on youtube; wish i could post URLs ). Ive been trying to learn how to do this so to help me practice I coded a simple vb6 application with a command button that adds +1 to an integer and then pops a msgbox showing the value of that integer. I managed to find the function that adds the +1 to the integer using "find out whats writes this address" I was also able to edit the function and make it sum any other number to the integer so Im positive thats the function I need to call but I can't call it without crashing the exe.
Is this possible at all? And if so how should I do it so that it doesn't crash the exe?
Joined: 09 May 2003 Posts: 25823 Location: The netherlands
Posted: Tue May 19, 2015 3:39 am Post subject:
you need to use call to call functions, not jmp
are you giving the correct number of parameters?
if it's cdecl, you need to pop the parameters from the stack yourself _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping
Wow dark byte himself So i traced back the caller (its the one in the IMG below) thats calling that JMP (EAX is holding the addr of the JMP). I think vb6 uses stdcall which should be similar to cdecl so as you said i might have to pop the parameters from the stack myself. Im pretty sure im not doing this right since i keep crashing every time i try to make the call. Which are exactly the parameters that i need to push? I tried copying the whole caller function but im still crashing, any ideas on what to do now?
Joined: 09 May 2003 Posts: 25823 Location: The netherlands
Posted: Wed May 20, 2015 4:17 am Post subject:
the function takes 3 parameters, where the first one is the address of the function to call
second one is a pointer to the stack to call the function
third looks like the size of the stack _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping
The disassembler makes a breakpoint in the function that adds the +1 so apparently it is working fine up to there but crashes somewhere else far ahead for some reason. I attached an IMG showing a breakpoint in the caller function (up to that point it appears to be working fine; afterwards [im not sure where] it crashes). Is there a quick way of finding what is the last line that the exe ran before crashing? Am I calling the function wrong?
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum