From 48fcfa97124448bed3762709e08ab2f39a4910c0 Mon Sep 17 00:00:00 2001 From: Aled Mason Date: Fri, 23 Feb 2024 16:37:39 +0000 Subject: [PATCH] Add WSAConnect API --- speakeasy/winenv/api/usermode/ws2_32.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/speakeasy/winenv/api/usermode/ws2_32.py b/speakeasy/winenv/api/usermode/ws2_32.py index e91bd10..dca7083 100644 --- a/speakeasy/winenv/api/usermode/ws2_32.py +++ b/speakeasy/winenv/api/usermode/ws2_32.py @@ -117,6 +117,24 @@ def WSAIoctl(self, emu, argv, ctx={}): return windefs.ERROR_SUCCESS + @apihook('WSAConnect', argc=7, conv=_arch.CALL_CONV_STDCALL) + def WSAConnect(self, emu, argv, ctx={}): + """ + int WSAAPI WSAConnect( + SOCKET s, + const sockaddr *name, + int namelen, + LPWSABUF lpCallerData, + LPWSABUF lpCalleeData, + LPQOS lpSQOS, + LPQOS lpGQOS + ); + """ + + # TODO: Add actual function logic. However, for now, just call connect() + + return self.connect(emu, argv[:3], ctx) + @apihook('socket', argc=3, conv=_arch.CALL_CONV_STDCALL, ordinal=23) def socket(self, emu, argv, ctx={}): """