rewolf-wow64ext
rewolf-wow64ext copied to clipboard
Some structures' addresses refered by some NtFuncs need to be aligned to 8 bytes, how to solve it
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?
Exact same issue here... I cannot get it to work properly.
https://en.cppreference.com/w/c/keyword/_Alignas
https://en.cppreference.com/w/c/language/_Alignas