Function at 0x4d6894
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Initialize winsock library
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe0
push ebx
push esi
push edi
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
cmp byte [eax + 0x1ac], 0
je 0x4d68cb
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x1a8]
mov ecx, dword [ebp - 4]
add edx, dword [ecx + 0xc]
cmp eax, edx
jae 0x4d68cb
xor ebx, ebx
jmp 0x4d6acc
mov eax, dword [ebp - 4]
cmp dword [eax + 4], 0
jne 0x4d68e4
mov eax, dword [ebp - 4]
add eax, 4
mov edx, 0x4d6ae0
call fcn.004049cc
mov eax, dword [ebp - 4]
cmp dword [eax + 8], 0
jne 0x4d68f7
mov eax, dword [ebp - 4]
mov dword [eax + 8], 0x3e8
xor edx, edx
push ebp
push 0x4d6a94
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [ebp - 4]
cmp word [eax + 0x14], 0
jne 0x4d694f
mov eax, dword [ebp - 4]
add eax, 0x14
push eax
push 0x202
call sub.wsock32.dll_WSAStartup
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x4d694f
mov eax, dword [ebp - 8]
mov dword [ebp - 0x20], eax
mov byte [ebp - 0x1c], 0
lea eax, [ebp - 0x20]
push eax
push 0
mov ecx, 0x4d6af4
mov dl, 1
mov eax, dword [0x4d615c]
call fcn.0040d974
call fcn.00404310
push 0
push 1
push 2
call sub.wsock32.dll_socket
mov ebx, eax
mov eax, dword [ebp - 4]
mov dword [eax + 0x1a4], ebx
inc ebx
jne 0x4d6990
call fcn.004d6dc4
mov dword [ebp - 0x20], eax
mov byte [ebp - 0x1c], 0
lea eax, [ebp - 0x20]
push eax
push 0
mov ecx, 0x4d6b20
mov dl, 1
mov eax, dword [0x4d615c]
call fcn.0040d974
call fcn.00404310
lea eax, [ebp - 0x18]
xor ecx, ecx
mov edx, 0x10
call fcn.004032b0
mov word [ebp - 0x18], 2
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
call fcn.00404e64
push eax
call sub.wsock32.dll_inet_addr
cmp eax, 0xffffffff
je 0x4d69c0
mov dword [ebp - 0x14], eax
jmp 0x4d6a07
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
call fcn.00404e64
push eax
call sub.wsock32.dll_gethostbyname
test eax, eax
jne 0x4d69fd
call fcn.004d6dc4
mov dword [ebp - 0x20], eax
mov byte [ebp - 0x1c], 0
lea eax, [ebp - 0x20]
push eax
push 0
mov ecx, 0x4d6b20
mov dl, 1
mov eax, dword [0x4d615c]
call fcn.0040d974
call fcn.00404310
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 4]
mov ax, word [eax + 8]
push eax
call sub.wsock32.dll_htons
mov word [ebp - 0x16], ax
push 0x10
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x1a4]
push eax
call sub.wsock32.dll_connect
inc eax
jne 0x4d6a58
call fcn.004d6dc4
mov dword [ebp - 0x20], eax
mov byte [ebp - 0x1c], 0
lea eax, [ebp - 0x20]
push eax
push 0
mov ecx, 0x4d6b20
mov dl, 1
mov eax, dword [0x4d615c]
call fcn.0040d974
call fcn.00404310
mov dword [ebp - 8], 0x3e8
push 4
lea eax, [ebp - 8]
push eax
push 0x1005
push 0xffff
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x1a4]
push eax
call sub.wsock32.dll_setsockopt
mov eax, dword [ebp - 4]
mov byte [eax + 0x1ac], 0
mov bl, 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4d6acc
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret