Function at 0x4a059c
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 0x4a05d3
call sub.kernel32.dll_GetTickCount
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x1a8]
mov ecx, dword [ebp - 4]
add edx, dword [ecx + 0xc]
cmp eax, edx
jae 0x4a05d3
xor ebx, ebx
jmp 0x4a07d4
mov eax, dword [ebp - 4]
cmp dword [eax + 4], 0
jne 0x4a05ec
mov eax, dword [ebp - 4]
add eax, 4
mov edx, 0x4a07e8
call fcn.00404314
mov eax, dword [ebp - 4]
cmp dword [eax + 8], 0
jne 0x4a05ff
mov eax, dword [ebp - 4]
mov dword [eax + 8], 0x3e8
xor edx, edx
push ebp
push 0x4a079c
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [ebp - 4]
cmp word [eax + 0x14], 0
jne 0x4a0657
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 0x4a0657
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, 0x4a07fc
mov dl, 1
mov eax, dword [0x49fe64]
call fcn.0040cf68
call fcn.00403c58
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 0x4a0698
call fcn.004a0acc
mov dword [ebp - 0x20], eax
mov byte [ebp - 0x1c], 0
lea eax, [ebp - 0x20]
push eax
push 0
mov ecx, 0x4a0828
mov dl, 1
mov eax, dword [0x49fe64]
call fcn.0040cf68
call fcn.00403c58
lea eax, [ebp - 0x18]
xor ecx, ecx
mov edx, 0x10
call fcn.00402e28
mov word [ebp - 0x18], 2
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
call fcn.00404790
push eax
call sub.wsock32.dll_inet_addr
cmp eax, 0xffffffff
je 0x4a06c8
mov dword [ebp - 0x14], eax
jmp 0x4a070f
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
call fcn.00404790
push eax
call sub.wsock32.dll_gethostbyname
test eax, eax
jne 0x4a0705
call fcn.004a0acc
mov dword [ebp - 0x20], eax
mov byte [ebp - 0x1c], 0
lea eax, [ebp - 0x20]
push eax
push 0
mov ecx, 0x4a0828
mov dl, 1
mov eax, dword [0x49fe64]
call fcn.0040cf68
call fcn.00403c58
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 0x4a0760
call fcn.004a0acc
mov dword [ebp - 0x20], eax
mov byte [ebp - 0x1c], 0
lea eax, [ebp - 0x20]
push eax
push 0
mov ecx, 0x4a0828
mov dl, 1
mov eax, dword [0x49fe64]
call fcn.0040cf68
call fcn.00403c58
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 0x4a07d4
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret