View previous topic :: View next topic |
Author |
Message |
kriso02 Newbie cheater Reputation: 0
Joined: 21 Nov 2016 Posts: 11
|
Posted: Sun Mar 12, 2017 9:11 am Post subject: Force function return value. |
|
|
So I have located the verification function of a game and need it to always return 4. How do I do that?
|
|
Back to top |
|
|
Zanzer I post too much Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Sun Mar 12, 2017 9:34 am Post subject: |
|
|
|
|
Back to top |
|
|
kriso02 Newbie cheater Reputation: 0
Joined: 21 Nov 2016 Posts: 11
|
Posted: Sun Mar 12, 2017 11:35 am Post subject: |
|
|
does not work. the app is written in .net btw
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25287 Location: The netherlands
|
Posted: Sun Mar 12, 2017 3:40 pm Post subject: |
|
|
find out which ret the function uses and use that
_________________
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 |
|
Back to top |
|
|
kriso02 Newbie cheater Reputation: 0
Joined: 21 Nov 2016 Posts: 11
|
Posted: Mon Mar 13, 2017 4:55 am Post subject: |
|
|
How do I do that. Cheat engine disassembles wrong or something. Do I post the code here?
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25287 Location: The netherlands
|
Posted: Mon Mar 13, 2017 5:10 am Post subject: |
|
|
if it's using the stdcall calling convention, ret needs to know the number of parameters given so it can pop those of as well
e.g if one parameter is given, then ret 4. If 2 parameters, ret 8
just look at the original function to see which ret is uses
_________________
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 |
|
Back to top |
|
|
kriso02 Newbie cheater Reputation: 0
Joined: 21 Nov 2016 Posts: 11
|
Posted: Mon Mar 13, 2017 9:10 am Post subject: |
|
|
Well. Minor problem. There is no ret opcode
|
|
Back to top |
|
|
++METHOS I post too much Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Mon Mar 13, 2017 9:36 am Post subject: |
|
|
A jump or call, then?
|
|
Back to top |
|
|
kriso02 Newbie cheater Reputation: 0
Joined: 21 Nov 2016 Posts: 11
|
Posted: Mon Mar 13, 2017 10:06 am Post subject: |
|
|
i found 3 jumps. 2 leading to a function 3rd is unidentified.
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25287 Location: The netherlands
|
Posted: Mon Mar 13, 2017 10:16 am Post subject: |
|
|
i really recommend finding the ret instruction. just scroll down
_________________
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 |
|
Back to top |
|
|
Zanzer I post too much Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Mon Mar 13, 2017 10:52 am Post subject: |
|
|
Use break and trace. CE will make it easy to find the return instruction.
|
|
Back to top |
|
|
++METHOS I post too much Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Mon Mar 13, 2017 11:20 am Post subject: |
|
|
Ollydbg has execute til return. Last I remember, CE would step past the return...but it should not be difficult, regardless.
|
|
Back to top |
|
|
kriso02 Newbie cheater Reputation: 0
Joined: 21 Nov 2016 Posts: 11
|
Posted: Mon Mar 13, 2017 12:25 pm Post subject: |
|
|
There is no ret. thats the problem. i would post code but it doesn't allow me.
another problem is it is executed at program start most of the time
|
|
Back to top |
|
|
++METHOS I post too much Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Mon Mar 13, 2017 12:34 pm Post subject: |
|
|
You can write a script to pause the target or set a breakpoint on startup. You can also use Ollydbg or similar, and it can automatically break on entry point or whatever you set that up for.
Can you disclose the target?
Are you sure it is not packed or obfuscated in some way?
|
|
Back to top |
|
|
kriso02 Newbie cheater Reputation: 0
Joined: 21 Nov 2016 Posts: 11
|
Posted: Mon Mar 13, 2017 1:01 pm Post subject: |
|
|
im not sure. but i got the decompiled code
|
|
Back to top |
|
|
|