Function at 0x4036da
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 sub.msvcrt.dll__errno
mov dword [eax], 0
mov dword [esp], 0
call sub.WSOCK32.DLL_WSASetLastError
sub esp, 4
movzx eax, word [0x40a06c]
test ax, ax
je 0x40373c
mov dword [esp + 8], 0x11
mov dword [esp + 4], 2
mov dword [esp], 2
call sub.WSOCK32.DLL_socket
sub esp, 0xc
mov dword [0x40a144], eax
jmp 0x403760
mov dword [esp + 8], 6
mov dword [esp + 4], 1
mov dword [esp], 2
call sub.WSOCK32.DLL_socket
sub esp, 0xc
mov dword [0x40a144], eax
mov eax, dword [0x40a144]
test eax, eax
jns 0x403775
mov dword [esp], str.Cant_get_socket
call fcn.00402ea2
mov eax, dword [0x40a144]
test eax, eax
jne 0x403790
mov eax, dword [0x40a144]
mov dword [esp], eax
call sub.msvcrt.dll__dup
mov dword [0x40a144], eax
mov edx, dword [0x40a150]
mov eax, dword [0x40a144]
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 sub.WSOCK32.DLL_setsockopt
sub esp, 0x14
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4037d5
mov dword [esp], str.nnetfd_reuseaddr_failed
call fcn.00402dec
mov eax, dword [0x40a044]
mov word [eax], 2
mov eax, dword [0x40a048]
mov word [eax], 2
cmp dword [ebp + 0x10], 0
je 0x40380e
mov eax, dword [0x40a044]
lea edx, [eax + 4]
mov dword [esp + 8], 4
mov eax, dword [ebp + 0x10]
mov dword [esp + 4], eax
mov dword [esp], edx
call sub.msvcrt.dll_memcpy
cmp word [ebp - 0x20], 0
je 0x40382e
mov ebx, dword [0x40a044]
movzx eax, word [ebp - 0x20]
mov dword [esp], eax
call sub.WSOCK32.DLL_htons
sub esp, 4
mov word [ebx + 2], ax
mov ebx, 0
cmp dword [ebp + 0x10], 0
jne 0x403844
cmp word [ebp - 0x20], 0
je 0x4038e1
movzx eax, word [ebp - 0x20]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], 4
jmp 0x4038d1
mov eax, dword [0x40a044]
mov edx, eax
mov eax, dword [0x40a144]
mov dword [esp + 8], 0x10
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.WSOCK32.DLL_bind
sub esp, 0xc
mov ebx, eax
test ebx, ebx
je 0x4038dd
call sub.msvcrt.dll__errno
mov eax, dword [eax]
cmp eax, 0x2740
jne 0x4038e0
movzx esi, word [ebp - 0x20]
mov eax, dword [0x40a044]
mov eax, dword [eax + 4]
mov dword [esp], eax
call sub.WSOCK32.DLL_inet_ntoa
sub esp, 4
mov dword [esp + 8], esi
mov dword [esp + 4], eax
mov dword [esp], str.retrying_local__s:_d
call fcn.00402dec
mov dword [esp], 1
call sub.msvcrt.dll__sleep
call sub.msvcrt.dll__errno
mov dword [eax], 0
sub dword [ebp - 0xc], 1
cmp dword [ebp - 0xc], 0
jg 0x403854
jmp 0x4038e1
nop
jmp 0x4038e1
nop
test ebx, ebx
je 0x403910
movzx ebx, word [ebp - 0x20]
mov eax, dword [0x40a044]
mov eax, dword [eax + 4]
mov dword [esp], eax
call sub.WSOCK32.DLL_inet_ntoa
sub esp, 4
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov dword [esp], str.Cant_grab__s:_d_with_bind
call fcn.00402ea2
movzx eax, word [0x40a064]
test ax, ax
je 0x403926
mov eax, dword [0x40a144]
jmp 0x403a3f
mov eax, dword [0x40a048]
lea edx, [eax + 4]
mov dword [esp + 8], 4
mov eax, dword [ebp + 8]
mov dword [esp + 4], eax
mov dword [esp], edx
call sub.msvcrt.dll_memcpy
mov ebx, dword [0x40a048]
movzx eax, word [ebp - 0x1c]
mov dword [esp], eax
call sub.WSOCK32.DLL_htons
sub esp, 4
mov word [ebx + 2], ax
mov eax, dword [0x40a02c]
test eax, eax
je 0x403973
mov dword [esp], str.Warning:_source_routing_unavailable_on_this_machine__ignoring
call fcn.00402dec
mov eax, dword [0x40a070]
mov dword [esp + 4], eax
mov dword [esp], 1
call fcn.00402fa1
mov dword [esp], 0x40a100
call sub.msvcrt.dll__setjmp
test eax, eax
jne 0x4039bf
mov eax, dword [0x40a048]
mov edx, eax
mov eax, dword [0x40a144]
mov dword [esp + 8], 0x10
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.WSOCK32.DLL_connect
sub esp, 0xc
mov ebx, eax
jmp 0x4039d3
mov ebx, 0xffffffff
mov dword [esp], 0x274c
call sub.WSOCK32.DLL_WSASetLastError
sub esp, 4
mov dword [esp + 4], 0
mov dword [esp], 0
call fcn.00402fa1
test ebx, ebx
jne 0x4039f2
mov eax, dword [0x40a144]
jmp 0x403a3f
call sub.msvcrt.dll__errno
mov ebx, eax
call sub.WSOCK32.DLL_WSAGetLastError
mov dword [ebx], eax
mov eax, dword [0x40a144]
mov dword [esp + 4], 2
mov dword [esp], eax
call sub.WSOCK32.DLL_shutdown
sub esp, 8
mov eax, dword [0x40a144]
mov dword [esp], eax
call sub.WSOCK32.DLL_closesocket
sub esp, 4
call sub.msvcrt.dll__errno
mov eax, dword [eax]
mov dword [esp], eax
call sub.WSOCK32.DLL_WSASetLastError
sub esp, 4
mov eax, 0xffffffff
lea esp, [ebp - 8]
add esp, 0
pop ebx
pop esi
pop ebp
ret