using winedebug=+relay; the messages around the call to VirtualQuery: 0009:Ret KERNEL32.GetVersionExA() retval=00000001 ret=1230111e 0009:Call KERNEL32.GetLastError() ret=78132dba 0009:Ret KERNEL32.GetLastError() retval=00000002 ret=78132dba 0009:Call KERNEL32.TlsGetValue(00000001) ret=78132c78 0009:Ret KERNEL32.TlsGetValue() retval=7b822560 ret=78132c78 0009:Call KERNEL32.FlsGetValue(00000000) ret=78132dc9 0009:Ret KERNEL32.FlsGetValue() retval=00440138 ret=78132dc9 0009:Call KERNEL32.SetLastError(00000002) ret=78132e24 0009:Ret KERNEL32.SetLastError() retval=00000002 ret=78132e24 0009:Call KERNEL32.VirtualQuery(20000000,0032f198,0000001c) ret=123026cb 0009:Ret KERNEL32.VirtualQuery() retval=0000001c ret=123026cb 000d:Call ntdll.RtlFreeHeap(00110000,00000000,00009:Ret KERNEL32.Get000d:Ret ntdll.RtlFreeHeap() retval=00000009:Call KERNEL32.TlsGetValue(00000001) ret=78132c78 0009:Ret KERNEL32.TlsGetValue() retval=7b822560 ret=78132c78 0009:Call KERNEL32.FlsGetValue(00000000) ret=78132dc9 0009:Ret KERNEL32.FlsGetValue() retval=00440138 ret=78132dc9 0009:Call KERNEL32.SetLastError(00000002) ret=78132e24 0009:Ret KERNEL32.SetLastError() retval=00000002 ret=78132e24 0009:Call KERNEL32.GetLastError() ret=12302a66 000d:Ret advapi32.RegCloseKey() retval=00000000 ret=7e6c1b01