Code:
// -- Start of Hooks ---
// --- SEND FUNCTIONS ---
// The send function sends data on a connected socket.
typedef int (*Send_t)( SOCKET s, const char *buf, int len, int flags );
Send_t oSend = (Send_t)0x000007fefdb98000;
int hkSend( SOCKET s, const char *buf, int len, int flags );
// The WSASend function sends data on a connected socket.
typedef int (*WSASend_t)( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount, LPDWORD lpNumberOfBytesSent, DWORD dwFlags, LPWSAOVERLAPPED lpOverlapped, LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine );
WSASend_t oWSASend = (WSASend_t)0x000007fefdb913b0;
int hkWSASend( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount, LPDWORD lpNumberOfBytesSent, DWORD dwFlags, LPWSAOVERLAPPED lpOverlapped, LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine );
// The WSASendTo function sends data to a specific destination, using overlapped I/O where applicable.
typedef int (*WSASendTo_t)( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount, LPDWORD lpNumberOfBytesSent, DWORD dwFlags, const struct sockaddr *lpTo, int iToLen, LPWSAOVERLAPPED lpOverlapped, LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine );
WSASendTo_t oWSASendTo = (WSASendTo_t)0x000007fefdb9ed50;
int hkWSASendTo( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount, LPDWORD lpNumberOfBytesSent, DWORD dwFlags, const struct sockaddr *lpTo, int iToLen, LPWSAOVERLAPPED lpOverlapped, LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine );
// --- END OF SEND FUNCTIONS ---
// --- RECIEVE FUNCTIONS ----
// The recv function receives data from a connected socket or a bound connectionless socket.
typedef int (*Recv_t)( SOCKET s, char *buf, int len, int flags );
Recv_t oRecv = (Recv_t)0x000007fefdb9df40;
int hkRecv( SOCKET s, char *buf, int len, int flags );
// The recvfrom function receives a datagram and stores the source address.
typedef int (*Recvfrom_t)( SOCKET s, char *buf, int len, int flags, struct sockaddr *from, int *fromlen );
Recvfrom_t oRecvfrom = (Recvfrom_t)0x000007fefdb9eb90;
int hkRecvfrom( SOCKET s, char *buf, int len, int flags, struct sockaddr *from, int *fromlen );
// The WSARecvFrom function receives a datagram and stores the source address.
typedef int (*WSARecvFrom_t)( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount, LPDWORD lpNumberOfBytesRecvd, LPDWORD lpFlags, struct sockaddr *lpFrom, LPINT lpFromlen, LPWSAOVERLAPPED lpOverlapped, LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine );
WSARecvFrom_t oWSARecvFrom = (WSARecvFrom_t)0x000007fefdbbe6c0;
int hkWSARecvFrom( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount, LPDWORD lpNumberOfBytesRecvd, LPDWORD lpFlags, struct sockaddr *lpFrom, LPINT lpFromlen, LPWSAOVERLAPPED lpOverlapped, LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine );
// --- END RECIEVE FUNCTIONS ---
//--- End of Hooks ---