Function at 0x401100
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Resolve dns
Set socket configuration

Disassembly:
sub esp, 0x28
mov eax, dword [0x477c1c]
xor eax, esp
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x2c]
push ebx
push ebp
mov ebp, dword [esp + 0x38]
push esi
xor esi, esi
mov ebx, ecx
mov dword [esp + 0x10], eax
cmp ebp, esi
je 0x4012fb
cmp dword [esp + 0x40], esi
je 0x4012fb
mov eax, dword [ebx + 4]
cmp eax, 0xffffffff
je 0x40114f
push eax
call sub.WS2_32.dll_closesocket
push 0x12c
mov dword [ebx + 4], esi
call dword [sym.imp.KERNEL32.dll_Sleep]
push ebp
call fcn.00440137
mov dword [esp + 0x1c], eax
mov eax, ebp
mov dword [esp + 0x20], edx
add esp, 4
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401165
sub eax, edx
push edi
mov edi, eax
test edi, edi
jle 0x40118b
movsx ecx, byte [esi + ebp]
push ecx
call fcn.0043fee3
add esp, 4
test eax, eax
jne 0x4011da
inc esi
cmp esi, edi
jl 0x401175
mov al, byte [ebp]
cmp al, 0x30
jl 0x4011da
cmp al, 0x39
jg 0x4011da
xor eax, eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov eax, dword [0x4791c4]
mov edx, 2
mov word [esp + 0x24], dx
test eax, eax
je 0x4011d0
cmp dword [eax + 0xcf4], 0
je 0x4011d0
push ebp
call sub.WS2_32.dll_inet_addr
mov dword [esp + 0x28], eax
jmp 0x40121d
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x28], eax
jmp 0x40121d
push ebp
call sub.WS2_32.dll_gethostbyname
mov esi, eax
xor eax, eax
test esi, esi
je 0x4012b4
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
movsx edx, word [esi + 0xa]
mov eax, dword [esi + 0xc]
mov ecx, dword [eax]
push edx
push ecx
lea edx, [esp + 0x30]
push edx
call fcn.0043fa50
mov ax, word [esi + 8]
add esp, 0xc
mov word [esp + 0x24], ax
mov ecx, dword [esp + 0x44]
push ecx
call sub.WS2_32.dll_htons
push 0
push 1
push 2
mov word [esp + 0x32], ax
call sub.WS2_32.dll_socket
mov dword [ebx + 4], eax
cmp eax, 1
jb 0x4012b2
push 4
lea edx, [esp + 0x1c]
push edx
push 0x1002
push 0xffff
push eax
mov dword [esp + 0x2c], 0x2800
call sub.WS2_32.dll_setsockopt
push 4
lea edx, [esp + 0x14]
push edx
mov eax, 1
push 0x80
mov word [esp + 0x1c], ax
mov eax, dword [ebx + 4]
push 0xffff
xor ecx, ecx
push eax
mov word [esp + 0x26], cx
call sub.WS2_32.dll_setsockopt
mov edx, dword [ebx + 4]
push 0x10
lea ecx, [esp + 0x28]
push ecx
push edx
call sub.WS2_32.dll_connect
test eax, eax
je 0x4012c9
call sub.WS2_32.dll_WSAGetLastError
mov eax, dword [ebx + 4]
push eax
call sub.WS2_32.dll_closesocket
mov dword [ebx + 4], 0xffffffff
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.0044014d
add esp, 0x28
ret 0xc
mov esi, dword [esp + 0x14]
mov ecx, dword [ebx + 4]
push 0x31
push 0x401
push esi
push ecx
call sub.WS2_32.dll_WSAAsyncSelect
pop edi
mov dword [ebx + 8], esi
pop esi
pop ebp
mov eax, 1
pop ebx
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.0044014d
add esp, 0x28
ret 0xc
mov ecx, dword [esp + 0x30]
pop esi
pop ebp
pop ebx
xor ecx, esp
xor eax, eax
call fcn.0044014d
add esp, 0x28
ret 0xc