https://bugs.winehq.org/show_bug.cgi?id=56968
--- Comment #6 from Dmitry Timoshkov dmitry@baikal.ru --- (In reply to Fabian Maurer from comment #5)
void *ptr = &sec[i].VirtualAddress;
Looks like a typo, '&' should not be needed.
No, we need the address of where the VirtualAddress is stored, not where it points.
Why do we need it and where? If you mean the NtProtectVirtualMemory() call, it's already done by passing '&ptr'.