Hi all,
I was testing the newest leaked hexrays with this example:
Code:
int main(int argc, char* argv[])
{
int firstvalue = 5;
int *p1;
p1 = &firstvalue;
*p1 = 10;
return 0;
}
which produces this simple assembler:
Code:
push ebp
mov ebp, esp
sub esp, 8
mov [ebp+var_4], 5
lea eax, [ebp+var_4]
mov [ebp+var_8], eax
mov ecx, [ebp+var_8]
mov dword ptr [ecx], 0Ah
xor eax, eax
mov esp, ebp
pop ebp
retn
the strange is that if you try to decompile it with hexrays you get only this:
Code:
int __cdecl main(int argc, const char **argv, const char **envp)
{
return 0;
}
Even if it doesn't seem at first sight, the code is, by the logical point of view, exactly the same because the variables are local therefore lost, the stack is restored. This is imho a nice view of how powerful is this plugin even for this simple case.