Function at 0x413d90
Capabilities:
Create tcp socket
Create thread
Create udp socket
Resolve dns
Set socket configuration
Terminate thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x3c
mov eax, dword [0x443284]
xor eax, esp
mov dword [esp + 0x38], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov eax, ebx
push edi
mov edi, ecx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x413db1
sub eax, edx
sar eax, 1
cmp eax, 1
jb 0x414017
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
push 0
push 1
push 2
mov dword [edi + 0x1c], eax
mov dword [edi + 0x14], ecx
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [edi + 0x28], eax
jne 0x413df7
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [edi + 0xc], eax
jmp 0x414017
xor eax, eax
sub esp, 0x1c
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov esi, esp
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], 7
mov word [esi + 4], ax
mov eax, ebx
mov dword [esp + 0x28], esp
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x413e25
sub eax, edx
sar eax, 1
push eax
push ebx
call fcn.00401d80
lea esi, [esp + 0x34]
call fcn.00412070
mov esi, 0x10
add esp, 0x1c
cmp dword [eax + 0x18], esi
jb 0x413e56
mov eax, dword [eax + 4]
jmp 0x413e59
add eax, 4
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
cmp dword [esp + 0x30], esi
mov dword [esp + 0x38], eax
jb 0x413e77
mov edx, dword [esp + 0x1c]
push edx
call fcn.0041f829
add esp, 4
or esi, 0xffffffff
cmp dword [esp + 0x38], esi
jne 0x413f1f
sub esp, 0x1c
mov edx, ebx
mov eax, esp
mov dword [esp + 0x28], esp
call fcn.00401880
lea esi, [esp + 0x34]
call fcn.00412070
mov ebx, 0x10
add esp, 0x1c
cmp dword [eax + 0x18], ebx
jb 0x413eaf
mov eax, dword [eax + 4]
jmp 0x413eb2
add eax, 4
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
cmp dword [esp + 0x30], ebx
mov esi, eax
jb 0x413ece
mov eax, dword [esp + 0x1c]
push eax
call fcn.0041f829
add esp, 4
xor ebx, ebx
cmp esi, ebx
mov dword [esp + 0x30], 0xf
mov dword [esp + 0x2c], ebx
mov byte [esp + 0x1c], bl
je 0x413f11
mov cx, word [esi + 8]
mov word [esp + 0x34], cx
movsx edx, word [esi + 0xa]
mov eax, dword [esi + 0xc]
mov ecx, dword [eax]
push edx
push ecx
lea edx, [esp + 0x40]
push edx
call fcn.00423740
mov eax, dword [esp + 0x44]
add esp, 0xc
mov dword [edi + 0x10], eax
or esi, 0xffffffff
jmp 0x413f21
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [edi + 0xc], eax
jmp 0x414006
xor ebx, ebx
movzx ecx, word [edi + 0x1c]
push ecx
mov word [esp + 0x38], 2
call sub.WS2_32.dll_htons
mov word [esp + 0x36], ax
lea eax, [edi + 0x20]
push eax
push ebx
lea ecx, [esp + 0x18]
push ecx
push 0x414660
push ebx
lea edx, [esp + 0x48]
push ebx
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], edx
mov dword [edi + 0xc], ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp eax, ebx
mov dword [edi + 0x44], eax
je 0x414006
cmp dword [edi + 0x14], ebx
jne 0x413f70
mov dword [edi + 0x14], esi
mov edx, dword [edi + 0x14]
mov eax, dword [edi + 0x2c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, ebx
jne 0x413fc7
cmp dword [edi + 0xc], ebx
jne 0x414006
mov edx, dword [edi + 0x28]
lea ecx, [esp + 0xc]
push ecx
push 0x8004667e
push edx
mov dword [edi + 4], ebx
mov dword [esp + 0x18], 1
call dword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
jne 0x413f11
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x38]
xor ecx, esp
call fcn.0041f134
mov esp, ebp
pop ebp
ret 0xc
cmp eax, 0x102
jne 0x414006
mov ecx, dword [edi + 0x44]
lea eax, [esp + 0xc]
push eax
push ecx
mov dword [edi + 0xc], esi
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
je 0x414006
cmp dword [esp + 0xc], 0x103
jne 0x414006
mov edx, dword [edi + 0x44]
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov eax, dword [edi + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 0x44], ebx
mov ecx, dword [edi + 0x28]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [edi + 4], 1
mov ecx, dword [esp + 0x44]
pop edi
pop esi
pop ebx
xor ecx, esp
xor eax, eax
call fcn.0041f134
mov esp, ebp
pop ebp
ret 0xc