option casemap:none strdup proto :qword printf proto :qword, :vararg exit proto :dword .data bstr db "String 1",0 .data? buff dq ? .code main proc invoke printf, CSTR("Copying %s to buff with strdup using invoke....",10), addr bstr invoke strdup, addr bstr mov buff, rax invoke printf, CSTR("buff now = %s",10), buff invoke exit, 0 ret main endp end ;Now, we could target a specific ABI by assigning the call values to the registers like ;.code ;main proc ; lea rdi, bstr ; call strdup ; mov buff, rax ;main endp ;end