View previous topic :: View next topic |
Author |
Message |
SlicerHeicer How do I cheat?
Reputation: 0
Joined: 20 Sep 2015 Posts: 1
|
Posted: Sun Sep 20, 2015 6:52 am Post subject: Call Function Crash how to ? |
|
|
Hi, i try to call a function via lua / thread but i donīt get it work. It executes and workes but instantly crashes after that.
Lua:
[code]
alloc(TThread_,100)
createthread(TThread_)
TThread_:
mov edx,#111
push edx
call reverseme.AddBy1
ret
[/code]
reverseme.AddBy1:
[code]
reverseme.AddBy1 - 55 - push ebp
reverseme.AddBy1+1- 8B EC - mov ebp,esp
reverseme.AddBy1+3- 8B 45 08 - mov eax,[ebp+08]
reverseme.AddBy1+6- 50 - push eax
reverseme.AddBy1+7- 68 08210E01 - push reverseme.GS_ExceptionPointers+8 // Number:%s
reverseme.AddBy1+C- E8 AFFFFFFF - call reverseme.printf
reverseme.AddBy1+11- 83 C4 08 - add esp,08
reverseme.AddBy1+14- 5D - pop ebp
reverseme.AddBy1+15- C3 - ret
[/code]
It displays the printf but instantly crashes after it.
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25788 Location: The netherlands
|
Posted: Sun Sep 20, 2015 10:20 am Post subject: |
|
|
AddBy1 looks like it uses the cdecl calling convention(ret has no number behind it but takes one parameter), so the caller is responsible for cleaning up the stack
add
after
Code: |
call reverseme.AddBy1
|
(before ret)
_________________
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 |
|
 |
SlicerHeicer How do I cheat?
Reputation: 0
Joined: 20 Sep 2015 Posts: 1
|
Posted: Sun Sep 20, 2015 9:13 pm Post subject: |
|
|
Dark Byte wrote: | AddBy1 looks like it uses the cdecl calling convention(ret has no number behind it but takes one parameter), so the caller is responsible for cleaning up the stack
add
after
Code: |
call reverseme.AddBy1
|
(before ret) |
Thank you :D
But iīve tick the wrong box for my age on registering can you switch me o.O ? (I am 15)
|
|
Back to top |
|
 |
|