Function at 0x401d67
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:
mov eax, 0x414b8c
call fcn.0040c7c8
sub esp, 0x1c
mov eax, dword [0x41c120]
push ebx
mov ebx, ecx
cmp dword [ebx + 0xe4], 0xffffffff
mov dword [ebp - 0x10], eax
push esi
jne 0x401f76
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [ebx + 0xe4], eax
jne 0x401db5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebx + 0xfc], eax
jmp 0x401f72
mov esi, dword [sym.imp.WS2_32.dll_setsockopt]
push edi
push 4
lea ecx, [ebp - 0x28]
push ecx
push 0x1006
mov edi, 0xffff
push edi
push eax
mov dword [ebp - 0x28], 0x3a98
call esi
push 4
lea eax, [ebp - 0x28]
push eax
push 0x1005
push edi
push dword [ebx + 0xe4]
call esi
push dword [ebp + 8]
lea ecx, [ebp - 0x24]
call fcn.00401d17
and dword [ebp - 4], 0
lea ecx, [ebp + 8]
call fcn.00401722
mov edi, dword [ebp + 0xc]
test di, di
mov byte [ebp - 4], 1
jne 0x401e81
push 0
push 0x3a
lea ecx, [ebp - 0x24]
call fcn.00401465
mov esi, eax
test esi, esi
jle 0x401e81
push esi
push 0
lea eax, [ebp + 0xc]
push eax
lea ecx, [ebp - 0x24]
call fcn.004018a4
push eax
lea ecx, [ebp + 8]
mov byte [ebp - 4], 2
call fcn.00401b90
mov ecx, dword [ebp + 0xc]
add ecx, 0xfffffff0
mov byte [ebp - 4], 1
call fcn.004012f9
inc esi
push esi
lea eax, [ebp + 0xc]
push eax
lea ecx, [ebp - 0x24]
call fcn.00401b6d
push 0
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], 3
call fcn.00401774
push eax
call fcn.0040cb00
pop ecx
mov ecx, dword [ebp + 0xc]
add ecx, 0xfffffff0
mov edi, eax
mov byte [ebp - 4], 1
call fcn.004012f9
jmp 0x401e8d
lea eax, [ebp - 0x24]
lea ecx, [ebp + 8]
push eax
call fcn.00401b90
xor esi, esi
cmp di, si
jne 0x401e97
push 0x50
pop edi
push edi
mov word [ebp - 0x20], 2
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x1e], ax
mov eax, dword [ebp + 8]
cmp dword [eax - 0xc], esi
pop edi
jge 0x401ebb
push 0x80070057
call fcn.004010c5
movsx eax, byte [eax]
cmp eax, 0x2f
jle 0x401edd
cmp eax, 0x3a
jge 0x401edd
push esi
lea ecx, [ebp + 8]
call fcn.00401774
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0x1c], eax
jmp 0x401f11
push esi
lea ecx, [ebp + 8]
call fcn.00401774
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
cmp eax, esi
je 0x401f50
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
push eax
mov dword [ebp - 0x1c], eax
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
lea eax, [ebx + 0x100]
push eax
call fcn.0040c980
pop ecx
pop ecx
push 0x10
lea eax, [ebp - 0x20]
push eax
push dword [ebx + 0xe4]
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jne 0x401f2c
xor esi, esi
inc esi
jmp 0x401f38
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebx + 0xfc], eax
mov ecx, dword [ebp + 8]
add ecx, 0xfffffff0
call fcn.004012f9
mov ecx, dword [ebp - 0x24]
add ecx, 0xfffffff0
call fcn.004012f9
jmp 0x401f79
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [ebp + 8]
add ecx, 0xfffffff0
mov dword [ebx + 0xfc], eax
call fcn.004012f9
mov ecx, dword [ebp - 0x24]
add ecx, 0xfffffff0
call fcn.004012f9
xor eax, eax
jmp 0x401f7b
xor esi, esi
inc esi
mov eax, esi
mov ecx, dword [ebp - 0xc]
pop esi
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
pop ebx
call fcn.0040bd6e
leave
ret 8