Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove stack frame of some math funcs #105

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions hooks/math.hook
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
0x00452FC0: // sqrt
fld dword ptr [esp+4]
fsqrt
ret
0x0040EAF0: // sqrt
fld dword ptr [esp+4]
fsqrt
ret
0x0050D150: // inverse sqrt
fld dword ptr [esp+4]
fsqrt
fld1
fdivrp st(1), st
ret
0x005734E0: // sin
fld dword ptr [esp+4]
fsin
ret
0x005734D0: // cos
fld dword ptr [esp+4]
fcos
ret
0x0040DAB0: // abs
fld dword ptr [esp+4]
fabs
ret
0x004E9DF0: // atan2
fld dword ptr [esp+4]
fld dword ptr [esp+8]
fpatan
ret