Function at 0x4027a0
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push ebx
push esi
xor ebx, ebx
push edi
push ebx
call dword [sym.imp.WS2_32.dll_WSASetLastError]
cmp word [0x40fcbc], bx
mov dword [0x40fcd4], ebx
je 0x4027c7
push 0x11
push 2
jmp 0x4027cb
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, ebx
mov dword [0x40ffd4], eax
jge 0x4027f0
push str.Cant_get_socket
call fcn.004021f0
mov eax, dword [0x40ffd4]
add esp, 4
cmp eax, ebx
jne 0x402800
push ebx
call fcn.0040a6bc
add esp, 4
mov dword [0x40ffd4], eax
mov ecx, dword [0x40ffc8]
push 4
push ecx
push 4
push 0xffff
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x402829
push str.nnetfd_reuseaddr_failed
call fcn.00402150
add esp, 4
mov edx, dword [0x40fc94]
mov esi, dword [ebp + 0x10]
cmp esi, ebx
mov word [edx], 2
mov eax, dword [0x40fc98]
mov word [eax], 2
je 0x402850
mov edx, dword [0x40fc94]
mov ecx, dword [esi]
mov dword [edx + 4], ecx
mov edi, dword [ebp + 0x14]
cmp di, bx
je 0x402869
push edi
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [0x40fc94]
mov word [ecx + 2], ax
test esi, esi
jne 0x402872
test di, di
je 0x4028db
mov esi, 4
mov edx, dword [0x40fc94]
mov eax, dword [0x40ffd4]
push 0x10
push edx
push eax
call dword [sym.imp.WS2_32.dll_bind]
mov ebx, eax
test ebx, ebx
je 0x402904
cmp dword [0x40fcd4], 0x2740
jne 0x4028db
mov edx, dword [0x40fc94]
mov ecx, edi
and ecx, 0xffff
mov eax, dword [edx + 4]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
push str.retrying_local__s:_d
call fcn.00402150
push 1
call fcn.00404594
add esp, 0x10
dec esi
test esi, esi
mov dword [0x40fcd4], 0
jg 0x402877
test ebx, ebx
je 0x402904
mov ecx, dword [0x40fc94]
and edi, 0xffff
push edi
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
push str.Cant_grab__s:_d_with_bind
call fcn.004021f0
add esp, 0xc
cmp word [0x40fcb4], 0
je 0x40291a
mov eax, dword [0x40ffd4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 8]
mov edx, dword [0x40fc98]
mov ecx, dword [eax]
mov eax, dword [ebp + 0xc]
push eax
mov dword [edx + 4], ecx
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [0x40fc98]
mov word [ecx + 2], ax
mov eax, dword [0x40fc7c]
test eax, eax
je 0x402952
push str.Warning:_source_routing_unavailable_on_this_machine__ignoring
call fcn.00402150
add esp, 4
mov edx, dword [0x40fcc0]
push edx
push 1
call fcn.00402250
mov eax, dword [0x40fcc0]
add esp, 8
test eax, eax
mov dword [ebp - 4], 1
je 0x4029a4
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
mov ecx, dword [0x40ffd4]
mov esi, eax
lea eax, [ebp - 4]
mov dword [ebp - 8], esi
push eax
push 0x8004667e
push ecx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov edx, dword [0x40ffd4]
push 0x10
push esi
push edx
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
push 0
push 0x40ff80
call fcn.00404840
add esp, 8
test eax, eax
jne 0x4029d0
mov eax, dword [0x40fc98]
mov ecx, dword [0x40ffd4]
push 0x10
push eax
push ecx
call dword [sym.imp.WS2_32.dll_connect]
mov ebx, eax
jmp 0x4029de
push 0x274c
or ebx, 0xffffffff
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov eax, dword [0x40fcc0]
test eax, eax
je 0x402a9e
cmp ebx, 0xffffffff
jne 0x402a9e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, dword [ebp - 8]
mov esi, eax
cmp esi, 0x2733
jne 0x402a64
mov eax, dword [0x40fcc0]
cmp eax, 0x3e8
jbe 0x402a1a
add eax, 0xfffffc18
jmp 0x402a26
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 3
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x402a3f
or ebx, 0xffffffff
mov esi, 0x274c
jmp 0x402a64
test eax, eax
jne 0x402a64
mov eax, dword [0x40ffd4]
lea edx, [ebp - 0x34]
push edx
push edi
push eax
call dword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
mov esi, dword [ebp - 0x20]
test esi, esi
je 0x402a60
or ebx, 0xffffffff
jmp 0x402a64
xor ebx, ebx
xor esi, esi
mov ecx, dword [0x40ffd4]
push 0
push edi
push ecx
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x40ffd4]
lea edx, [ebp - 4]
push edx
push 0x8004667e
push eax
mov dword [ebp - 4], 0
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push esi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push 0
push 0
call fcn.00402250
add esp, 8
test ebx, ebx
jne 0x402aba
mov eax, dword [0x40ffd4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [0x40ffd4]
mov dword [0x40fcd4], eax
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
mov edx, dword [0x40fcd4]
push edx
call dword [sym.imp.WS2_32.dll_WSASetLastError]
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret