How do I read a file with ReadFile onto the stack in NASM x86 assembly?
问题 I have opened a file with OpenFile, and gotten its size with GetFileSize. I wish to use ReadFile and use the stack as the buffer it requires, allocating enough room on the stack with the size of the file returned from GetFileSize. When I run this I get no output. Here is my code... extern GetStdHandle extern GetModuleFileNameA extern OpenFile extern ReadFile extern WriteFile extern CloseHandle extern GetFileSize extern ExitProcess import GetStdHandle kernel32.dll import GetModuleFileNameA