Skip to content
New issue

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

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

Already on GitHub? # to your account

How to go about using a custom calling convention #37

Open
FrankvdStam opened this issue Oct 20, 2022 · 0 comments
Open

How to go about using a custom calling convention #37

FrankvdStam opened this issue Oct 20, 2022 · 0 comments

Comments

@FrankvdStam
Copy link

I'm dealing with a variation of thiscall where the this pointer is passed via EAX instead of ECX. Apparently this is some msvc-only optimization. While the detour is working with "thiscall" from #8, it is preserving ECX while I need EAX.

https://reverseengineering.stackexchange.com/questions/16919/what-compiler-uses-a-calling-convention-that-uses-eax-as-the-first-argument-the

Is there any way that I can tell the lib to use EAX or to control what registers go where? Would like to avoid writing my own asm to fix this.

Awesome library, thanks so much for the hard work!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant