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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x657aa0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2cc
mov dword [ebp - 0x2d8], ecx
lea ecx, [ebp - 0x11c]
call fcn.00401d70
mov dword [ebp - 4], 0
push 0x7525ec
lea ecx, [ebp - 0x118]
call fcn.006225d4
mov byte [ebp - 4], 1
mov byte [ebp - 0x10], 1
lea eax, [ebp - 0x2cc]
push eax
push 0x201
call dword [sym.imp.WS2_32.dll_WSAStartup]
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x13c], eax
cmp dword [ebp - 0x13c], 0xffffffff
jne 0x405d88
push 0x40
push 0x7525fc
push 0x752604
mov ecx, dword [ebp - 0x2d8]
call fcn.0061ff13
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x118]
call fcn.00622566
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x11c]
call fcn.00622566
jmp 0x405fc8
mov dword [ebp - 0x2d0], 1
lea ecx, [ebp - 0x2d0]
push ecx
push 0x8004667e
mov edx, dword [ebp - 0x13c]
push edx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov dword [ebp - 0x138], 3
mov dword [ebp - 0x134], 0
mov dword [ebp - 0x130], 0
mov ecx, dword [ebp - 0x2d8]
add ecx, 0x1c8
call fcn.00401d90
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov dword [ebp - 0x130], eax
cmp dword [ebp - 0x130], 0
jne 0x405df9
mov byte [ebp - 0x10], 0
jmp 0x405f17
push 0x10
push 0
lea eax, [ebp - 0x12c]
push eax
call fcn.005fb270
add esp, 0xc
mov word [ebp - 0x12c], 2
mov ecx, dword [ebp - 0x2d8]
add ecx, 0x1c4
call fcn.00401d90
push eax
call fcn.005fc392
add esp, 4
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x12a], ax
mov ecx, dword [ebp - 0x130]
mov edx, dword [ecx + 0xc]
mov eax, dword [edx]
mov ecx, dword [eax]
mov dword [ebp - 0x128], ecx
push 0x10
lea edx, [ebp - 0x12c]
push edx
mov eax, dword [ebp - 0x13c]
push eax
call dword [sym.imp.WS2_32.dll_connect]
mov dword [ebp - 0x114], 0
mov dword [ebp - 0x2d4], 0
jmp 0x405e8b
mov ecx, dword [ebp - 0x2d4]
add ecx, 1
mov dword [ebp - 0x2d4], ecx
mov edx, dword [ebp - 0x2d4]
cmp edx, dword [ebp - 0x114]
jae 0x405eb2
mov eax, dword [ebp - 0x2d4]
mov ecx, dword [ebp + eax*4 - 0x110]
cmp ecx, dword [ebp - 0x13c]
jne 0x405eb0
jmp 0x405eb2
jmp 0x405e7c
mov edx, dword [ebp - 0x2d4]
cmp edx, dword [ebp - 0x114]
jne 0x405eeb
cmp dword [ebp - 0x114], 0x40
jae 0x405eeb
mov eax, dword [ebp - 0x2d4]
mov ecx, dword [ebp - 0x13c]
mov dword [ebp + eax*4 - 0x110], ecx
mov edx, dword [ebp - 0x114]
add edx, 1
mov dword [ebp - 0x114], edx
xor eax, eax
test eax, eax
jne 0x405e70
lea ecx, [ebp - 0x138]
push ecx
push 0
lea edx, [ebp - 0x114]
push edx
push 0
push 0
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jg 0x405f17
mov byte [ebp - 0x10], 0
mov ecx, dword [ebp - 0x2d8]
add ecx, 0x1c4
call fcn.00401d90
push eax
call fcn.005fc392
add esp, 4
push eax
mov eax, dword [ebp - 0x2d8]
mov ecx, dword [eax + 0x1c8]
push ecx
push 0x752620
lea edx, [ebp - 0x11c]
push edx
call fcn.00617593
add esp, 0x10
mov eax, dword [ebp - 0x10]
and eax, 0xff
test eax, eax
je 0x405f6f
push 0x752650
lea ecx, [ebp - 0x118]
call fcn.006226ef
push 0x40
lea ecx, [ebp - 0x118]
call fcn.00401d90
push eax
lea ecx, [ebp - 0x11c]
call fcn.00401d90
push eax
mov ecx, dword [ebp - 0x2d8]
call fcn.0061ff13
push 1
mov ecx, dword [ebp - 0x2d8]
add ecx, 0x214
call fcn.00621bf7
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x118]
call fcn.00622566
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x11c]
call fcn.00622566
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret