Open s0i37 opened 5 years ago
Default cc for x86-64 binaries is amd64
(https://github.com/radare/radare2/blob/master/libr/anal/d/cc-x86-64.sdb.txt#L1). You can call afc=ms
to change it to MS fastcall.
In general, If I open PE x86-64 binary, r2 determine call convention right.
I need to afc=ms
before analisys aaa
- it works.
But how about changing call convention after analisys? I try afc ms
but it doesn't change arguments.
You have to re-analyze the function in any case, for example af
for a single function.
Work environment
commit: 9677804b8e4f187656279a109d937c583ca0fb0a build: 2019-07-29__12:31:46
Expected behavior
I expected something like ELF/x64: there is r2 defines call convention well: arg1 rdi, arg2 rsi, arg3 rdx, arg4 rcx
Actual behavior
But for PE/x64 it is looks a bit strange: It seems to me that it could be like a: Also I met wrong arguments determine with dhcpssvc.dll:
I couldn't reproduce this in my sample so I provide this binary. dhcpssvc.zip
Steps to reproduce the behavior
open VS2015 x64 console
cl test.c
For dhcpssvc.dll: