Function at 0x403726
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
sub esp, 0x40
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x14]
mov word [ebp - 0x1c], dx
mov word [ebp - 0x20], ax
call sym.__errno
mov dword [eax], 0
mov dword [esp], 0
call sym._WSASetLastError_4
sub esp, 4
mov ax, word [0x40a0c8]
test ax, ax
je 0x403787
mov dword [esp + 8], 0x11
mov dword [esp + 4], 2
mov dword [esp], 2
call sym._socket_12
sub esp, 0xc
mov dword [0x40a1a8], eax
jmp 0x4037ab
mov dword [esp + 8], 6
mov dword [esp + 4], 1
mov dword [esp], 2
call sym._socket_12
sub esp, 0xc
mov dword [0x40a1a8], eax
mov eax, dword [0x40a1a8]
test eax, eax
jns 0x4037c0
mov dword [esp], str.Cant_get_socket
call dbg.bail
mov eax, dword [0x40a1a8]
test eax, eax
jne 0x4037db
mov eax, dword [0x40a1a8]
mov dword [esp], eax
call sym._dup
mov dword [0x40a1a8], eax
mov edx, dword [0x40a1d8]
mov eax, dword [0x40a1a8]
mov dword [esp + 0x10], 4
mov dword [esp + 0xc], edx
mov dword [esp + 8], 4
mov dword [esp + 4], 0xffff
mov dword [esp], eax
call sym._setsockopt_20
sub esp, 0x14
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x403820
mov dword [esp], str.nnetfd_reuseaddr_failed
call dbg.holler
mov eax, dword [0x40a0a0]
mov word [eax], 2
mov eax, dword [0x40a0a4]
mov word [eax], 2
cmp dword [ebp + 0x10], 0
je 0x403859
mov eax, dword [0x40a0a0]
lea edx, [eax + 4]
mov dword [esp + 8], 4
mov eax, dword [ebp + 0x10]
mov dword [esp + 4], eax
mov dword [esp], edx
call sym._memcpy
cmp word [ebp - 0x20], 0
je 0x403879
mov ebx, dword [0x40a0a0]
movzx eax, word [ebp - 0x20]
mov dword [esp], eax
call sym._htons_4
sub esp, 4
mov word [ebx + 2], ax
mov ebx, 0
cmp dword [ebp + 0x10], 0
jne 0x40388f
cmp word [ebp - 0x20], 0
je 0x40392b
movzx eax, word [ebp - 0x20]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], 4
jmp 0x40391b
mov eax, dword [0x40a0a0]
mov edx, eax
mov eax, dword [0x40a1a8]
mov dword [esp + 8], 0x10
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._bind_12
sub esp, 0xc
mov ebx, eax
test ebx, ebx
je 0x403927
call sym.__errno
mov eax, dword [eax]
cmp eax, 0x2740
jne 0x40392a
movzx esi, word [ebp - 0x20]
mov eax, dword [0x40a0a0]
mov eax, dword [eax + 4]
mov dword [esp], eax
call sym._inet_ntoa_4
sub esp, 4
mov dword [esp + 8], esi
mov dword [esp + 4], eax
mov dword [esp], str.retrying_local__s:_d
call dbg.holler
mov dword [esp], 1
call sym.__sleep
call sym.__errno
mov dword [eax], 0
dec dword [ebp - 0xc]
cmp dword [ebp - 0xc], 0
jg 0x40389f
jmp 0x40392b
nop
jmp 0x40392b
nop
test ebx, ebx
je 0x40395a
movzx ebx, word [ebp - 0x20]
mov eax, dword [0x40a0a0]
mov eax, dword [eax + 4]
mov dword [esp], eax
call sym._inet_ntoa_4
sub esp, 4
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov dword [esp], str.Cant_grab__s:_d_with_bind
call dbg.bail
mov ax, word [0x40a0c0]
test ax, ax
je 0x40396f
mov eax, dword [0x40a1a8]
jmp 0x403a88
mov eax, dword [0x40a0a4]
lea edx, [eax + 4]
mov dword [esp + 8], 4
mov eax, dword [ebp + 8]
mov dword [esp + 4], eax
mov dword [esp], edx
call sym._memcpy
mov ebx, dword [0x40a0a4]
movzx eax, word [ebp - 0x1c]
mov dword [esp], eax
call sym._htons_4
sub esp, 4
mov word [ebx + 2], ax
mov eax, dword [0x40a088]
test eax, eax
je 0x4039bc
mov dword [esp], str.Warning:_source_routing_unavailable_on_this_machine__ignoring
call dbg.holler
mov eax, dword [0x40a0cc]
mov dword [esp + 4], eax
mov dword [esp], 1
call dbg.arm
mov dword [esp], 0x40a158
call sym.__setjmp
test eax, eax
jne 0x403a08
mov eax, dword [0x40a0a4]
mov edx, eax
mov eax, dword [0x40a1a8]
mov dword [esp + 8], 0x10
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._connect_12
sub esp, 0xc
mov ebx, eax
jmp 0x403a1c
mov ebx, 0xffffffff
mov dword [esp], 0x274c
call sym._WSASetLastError_4
sub esp, 4
mov dword [esp + 4], 0
mov dword [esp], 0
call dbg.arm
test ebx, ebx
jne 0x403a3b
mov eax, dword [0x40a1a8]
jmp 0x403a88
call sym.__errno
mov ebx, eax
call sym._WSAGetLastError_0
mov dword [ebx], eax
mov eax, dword [0x40a1a8]
mov dword [esp + 4], 2
mov dword [esp], eax
call sym._shutdown_8
sub esp, 8
mov eax, dword [0x40a1a8]
mov dword [esp], eax
call sym._closesocket_4
sub esp, 4
call sym.__errno
mov eax, dword [eax]
mov dword [esp], eax
call sym._WSASetLastError_4
sub esp, 4
mov eax, 0xffffffff
lea esp, [ebp - 8]
add esp, 0
pop ebx
pop esi
leave
ret