'frame off' + 'push\pop' + 'using'
This function
#set frame off;
function test(dword x) {
eax = x;
using eax{eax = x}
push eax
mov eax, x
pop eax
}
translates to
mov eax, [esp + 4]
push eax
mov eax, [esp + 8]
pop eax
push eax
mov eax, [esp + 8]
pop eax
ret 4
As we can see the offset of 'x' after 'push' is calculated correctly. Can you explain how it works and in which case it may not work?