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

Some structures' addresses refered by some NtFuncs need to be aligned to 8 bytes, how to solve it #16

Open
RicardoMilos opened this issue Jun 6, 2019 · 2 comments

Comments

@RicardoMilos
Copy link

RicardoMilos commented Jun 6, 2019

For instance, the arguments to NtCreateFile include a pointer to struct OBJECT_ATTRIBUTE and a pointer to struct IO_STATUS_BLOCK, when I prepare these structs before x64call without modifying esp, NtCreateFile will return STATUS_DATATYPE_MISALIGNMENT or STATUS_INVALID_PARAMETER if esp ≡ 4(mod 8). So I have to wrap NtCreateFile32 with full inline assembly. Quite inconvenient for me. Is there an alternative to fix this issue?

@Mecanik
Copy link

Mecanik commented Dec 29, 2019

Exact same issue here... I cannot get it to work properly.

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

No branches or pull requests

3 participants