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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
sub esp, 0x20c
mov eax, dword [ebp + 8]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x1b0]
mov ecx, esp
mov dword [ecx + 4], eax
mov dword [ecx], 0x202
call sub.WS2_32.DLL_WSAStartup
sub esp, 8
mov ecx, esp
mov dword [ecx + 0xc], 0
mov dword [ecx + 8], 0
mov dword [ecx + 4], 1
mov dword [ecx], 0
mov dword [ebp - 0x1e8], eax
call sub.KERNEL32.DLL_CreateEventA
sub esp, 0x10
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 0x108], eax
mov eax, esp
mov dword [eax + 0xc], 0
mov dword [eax + 8], 0
mov dword [eax + 4], 1
mov dword [eax], 0
call sub.KERNEL32.DLL_CreateEventA
sub esp, 0x10
mov ecx, 0
mov edx, 0x10
lea esi, [ebp - 0x20]
mov edi, dword [ebp - 0x10]
mov dword [edi + 0x11c], eax
mov dword [esp], esi
mov dword [esp + 4], 0
mov dword [esp + 8], 0x10
mov dword [ebp - 0x1ec], edx
mov dword [ebp - 0x1f0], ecx
call fcn.004092ff
mov word [ebp - 0x20], 2
mov eax, esp
mov dword [eax], 0x13ad
call fcn.00404ce8
sub esp, 4
mov word [ebp - 0x1e], ax
mov byte [ebp - 0x1c], 0x7f
mov byte [ebp - 0x1b], 0
mov byte [ebp - 0x1a], 0
mov byte [ebp - 0x19], 1
mov ecx, esp
mov dword [ecx + 0x14], 1
mov dword [ecx + 0x10], 0
mov dword [ecx + 0xc], 0
mov dword [ecx + 8], 6
mov dword [ecx + 4], 1
mov dword [ecx], 2
call sub.WS2_32.DLL_WSASocketA
sub esp, 0x18
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 0x104], eax
mov eax, dword [ebp - 0x10]
cmp dword [eax + 0x104], 0xffffffff
jne 0x4011d6
mov dword [ebp - 0xc], 0
jmp 0x4013ca
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x104]
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx + 0x108]
mov edx, esp
mov dword [edx + 4], ecx
mov dword [edx], eax
mov dword [edx + 8], 0x31
call sub.WS2_32.DLL_WSAEventSelect
sub esp, 0xc
lea ecx, [ebp - 0x1e0]
mov dword [ebp - 0x1e0], 1
mov edx, dword [ebp - 0x10]
mov edx, dword [edx + 0x104]
mov esi, esp
mov dword [esi + 0xc], ecx
mov dword [esi], edx
mov dword [esi + 0x10], 4
mov dword [esi + 8], 1
mov dword [esi + 4], 6
mov dword [ebp - 0x1f4], eax
call sub.WS2_32.DLL_setsockopt
sub esp, 0x14
mov dword [ebp - 0x1e4], eax
cmp dword [ebp - 0x1e4], 0xffffffff
jne 0x40125f
mov dword [ebp - 0xc], 0
jmp 0x4013ca
lea eax, [ebp - 0x1e0]
mov dword [ebp - 0x1e0], 0x3a98
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx + 0x104]
mov edx, esp
mov dword [edx + 0xc], eax
mov dword [edx], ecx
mov dword [edx + 0x10], 4
mov dword [edx + 8], 0x1005
mov dword [edx + 4], 0xffff
call sub.WS2_32.DLL_setsockopt
sub esp, 0x14
mov dword [ebp - 0x1e4], eax
cmp dword [ebp - 0x1e4], 0xffffffff
jne 0x4012ba
mov dword [ebp - 0xc], 0
jmp 0x4013ca
lea eax, [ebp - 0x1e0]
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx + 0x104]
mov edx, esp
mov dword [edx + 0xc], eax
mov dword [edx], ecx
mov dword [edx + 0x10], 4
mov dword [edx + 8], 0x1006
mov dword [edx + 4], 0xffff
call sub.WS2_32.DLL_setsockopt
sub esp, 0x14
mov dword [ebp - 0x1e4], eax
cmp dword [ebp - 0x1e4], 0xffffffff
jne 0x40130b
mov dword [ebp - 0xc], 0
jmp 0x4013ca
lea eax, [ebp - 0x20]
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx + 0x104]
mov edx, esp
mov dword [edx + 4], eax
mov dword [edx], ecx
mov dword [edx + 8], 0x10
call sub.WS2_32.DLL_connect
sub esp, 0xc
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx + 0x108]
mov edx, esp
mov dword [edx], ecx
mov dword [edx + 4], 0x3a98
mov dword [ebp - 0x1f8], eax
call sub.KERNEL32.DLL_WaitForSingleObject
sub esp, 8
mov dword [ebp - 0x1e4], eax
cmp dword [ebp - 0x1e4], 0
je 0x40136a
mov dword [ebp - 0xc], 0
jmp 0x4013ca
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x104]
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx + 0x108]
lea edx, [ebp - 0x1dc]
mov esi, esp
mov dword [esi + 8], edx
mov dword [esi + 4], ecx
mov dword [esi], eax
call sub.WS2_32.DLL_WSAEnumNetworkEvents
sub esp, 0xc
mov ecx, dword [ebp - 0x1dc]
and ecx, 0x10
cmp ecx, 0
mov dword [ebp - 0x1fc], eax
je 0x4013ba
cmp dword [ebp - 0x1c8], 0
je 0x4013c3
mov dword [ebp - 0xc], 0
jmp 0x4013ca
mov dword [ebp - 0xc], 1
mov eax, dword [ebp - 0xc]
add esp, 0x20c
pop esi
pop edi
pop ebp
ret