Function at 0x40143f
Capabilities:
Create tcp socket
Create thread
Create udp socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov dword [ebp - 4], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], esp
push 0xffffffff
push dword [0x5ed368]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
nop
nop
nop
nop
cmp dword [ebp - 0x18], esp
je 0x401495
push 6
call fcn.004ef2dc
add esp, 4
mov eax, dword [ebp + 8]
mov dword [0x5ed36c], eax
mov eax, dword [ebp + 0xc]
mov dword [0x5ed370], eax
mov eax, dword [ebp + 0x10]
mov dword [0x5ed374], eax
mov dword [ebp - 0x18], esp
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
nop
nop
nop
nop
cmp dword [ebp - 0x18], esp
je 0x4014db
push 6
call fcn.004ef2dc
add esp, 4
mov dword [0x5ed378], eax
cmp dword [0x5ed378], 0xffffffff
jne 0x4015ad
mov dword [ebp - 0x18], esp
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
nop
nop
nop
nop
cmp dword [ebp - 0x18], esp
je 0x40150c
push 6
call fcn.004ef2dc
add esp, 4
mov dword [ebp - 4], eax
push 0x80000301
push 0
push dword [ebp - 4]
push 1
mov ebx, 0x168
call fcn.004ef970
add esp, 0x10
mov dword [ebp - 0x18], eax
push 0x50a275
push dword [ebp - 0x18]
push 0x50a278
mov ecx, 3
call fcn.004013e3
add esp, 0xc
mov dword [ebp - 0x1c], eax
mov ebx, dword [ebp - 0x18]
test ebx, ebx
je 0x40155b
push ebx
call fcn.004ef2d6
add esp, 4
push 0
push 0
push 0
push 0x80000301
push 0
push 0x10
push reloc.WS2_32.dll_connect
push 0
mov eax, dword [ebp - 0x1c]
test eax, eax
jne 0x401580
mov eax, 0x50a290
push eax
push 3
mov ebx, 0x300
call fcn.004ef680
add esp, 0x28
mov ebx, dword [ebp - 0x1c]
test ebx, ebx
je 0x4015a3
push ebx
call fcn.004ef2d6
add esp, 4
mov eax, 0xffffffff
jmp 0x40183f
mov dword [ebp - 0x18], esp
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
nop
nop
nop
nop
cmp dword [ebp - 0x18], esp
je 0x4015cc
push 6
call fcn.004ef2dc
add esp, 4
mov dword [0x5ed37c], eax
mov dword [ebp - 0x18], esp
push 0x31
push dword [0x5ed37c]
push dword [0x5ed378]
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
nop
nop
nop
nop
cmp dword [ebp - 0x18], esp
je 0x401601
push 6
call fcn.004ef2dc
add esp, 4
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xffffffff
jne 0x4016ce
mov dword [ebp - 0x18], esp
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
nop
nop
nop
nop
cmp dword [ebp - 0x18], esp
je 0x40162d
push 6
call fcn.004ef2dc
add esp, 4
mov dword [ebp - 4], eax
push 0x80000301
push 0
push dword [ebp - 4]
push 1
mov ebx, 0x168
call fcn.004ef970
add esp, 0x10
mov dword [ebp - 0x18], eax
push 0x50a275
push dword [ebp - 0x18]
push 0x50a278
mov ecx, 3
call fcn.004013e3
add esp, 0xc
mov dword [ebp - 0x1c], eax
mov ebx, dword [ebp - 0x18]
test ebx, ebx
je 0x40167c
push ebx
call fcn.004ef2d6
add esp, 4
push 0
push 0
push 0
push 0x80000301
push 0
push 0x10
push reloc.WS2_32.dll_connect
push 0
mov eax, dword [ebp - 0x1c]
test eax, eax
jne 0x4016a1
mov eax, 0x50a290
push eax
push 3
mov ebx, 0x300
call fcn.004ef680
add esp, 0x28
mov ebx, dword [ebp - 0x1c]
test ebx, ebx
je 0x4016c4
push ebx
call fcn.004ef2d6
add esp, 4
mov eax, 0xffffffff
jmp 0x40183f
mov dword [ebp - 0x18], esp
push 4
mov eax, 0x50a291
test eax, eax
je 0x4016e2
add eax, 8
push eax
push 8
push 0xffff
push dword [0x5ed378]
call dword [sym.imp.WS2_32.dll_setsockopt]
nop
nop
nop
nop
cmp dword [ebp - 0x18], esp
je 0x40170f
push 6
call fcn.004ef2dc
add esp, 4
mov dword [ebp - 8], eax
push 0x80000301
push 0
push 0xc
push 1
mov ebx, 0x1bc
call fcn.004efc40
add esp, 0x10
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
push eax
mov ebx, dword [ebp - 0xc]
test ebx, ebx
je 0x401747
push ebx
call fcn.004ef2d6
add esp, 4
pop eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x18], esp
push 0
push 0
lea eax, [ebp - 0x10]
push eax
push 0xc
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x40176b
add eax, 8
push eax
push 0xc
mov eax, 0x50a29d
test eax, eax
je 0x40177d
add eax, 8
push eax
push 0x98000004
push dword [0x5ed378]
call dword [sym.imp.WS2_32.dll_WSAIoctl]
nop
nop
nop
nop
cmp dword [ebp - 0x18], esp
je 0x4017a5
push 6
call fcn.004ef2dc
add esp, 4
mov dword [ebp - 8], eax
push VariantCopy
push 0
push 0x401c7f
push 1
mov ebx, 8
mov eax, 0x4f4df0
call fcn.004ef5e0
add esp, 0x10
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x1c], esp
mov eax, 0
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x20]
push eax
push 0
push 0
push dword [ebp - 0x18]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
nop
nop
nop
nop
cmp dword [ebp - 0x1c], esp
je 0x401810
push 6
call fcn.004ef2dc
add esp, 4
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], esp
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
nop
nop
nop
nop
cmp dword [ebp - 0x18], esp
je 0x401835
push 6
call fcn.004ef2dc
add esp, 4
mov eax, dword [0x5ed378]
jmp 0x40183f
push eax
mov ebx, dword [ebp - 0xc]
test ebx, ebx
je 0x401850
push ebx
call fcn.004ef2d6
add esp, 4
pop eax
mov esp, ebp
pop ebp
ret 0xc