Function at 0x4f2710
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x164
mov eax, dword [0x590cc0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
mov esi, dword [ebx]
mov dword [ebp - 0x150], ecx
mov dword [ecx], 0xffffffff
lea ecx, [ebp - 0x148]
push ecx
lea edx, [ebp - 0x144]
push edx
push eax
push ebx
mov dword [ebp - 0x154], 0
call fcn.004f2580
add esp, 0x10
mov dword [ebp - 0x14c], eax
test eax, eax
je 0x4f2772
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b9ff3
mov esp, ebp
pop ebp
ret
movzx eax, word [ebp - 0x134]
sub eax, 2
push edi
jne 0x4f28d6
push 0x2e
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebp - 0x130]
push ecx
push 2
call fcn.004f5ad0
add esp, 0x10
test eax, eax
je 0x4f28d6
mov edx, dword [ebp - 0x132]
push edx
call dword [sym.imp.WS2_32.dll_ntohs]
lea edx, [ebp - 0x34]
push edx
push str.__Trying__s..._n
push esi
call fcn.004ed020
mov edi, dword [ebp - 0x148]
add esp, 0xc
cmp dword [ebp - 0x144], 2
jne 0x4f2942
mov eax, 1
cmp dword [ebp - 0x140], eax
jne 0x4f2942
test byte [esi + 0xa90], 8
mov dword [ebp - 0x148], eax
je 0x4f27ff
push ebx
mov ecx, edi
call fcn.004f2390
add esp, 4
push edi
call fcn.004f2420
add esp, 4
cmp dword [ebp - 0x148], 0
je 0x4f2822
test dword [esi + 0xa90], 0x1000
je 0x4f2822
call fcn.004f1970
cmp dword [esi + 0x610], 0
je 0x4f286f
push 1
push esi
call fcn.004eac40
mov eax, dword [esi + 0x614]
mov ecx, dword [esi + 0x610]
push 0
push edi
push eax
call ecx
push 0
push esi
mov dword [ebp - 0x148], eax
call fcn.004eac40
mov eax, dword [ebp - 0x148]
add esp, 0x1c
cmp eax, 2
jne 0x4f2951
mov dword [ebp - 0x154], 1
cmp dword [ebp - 0x144], 2
jne 0x4f2978
lea edx, [ebp - 0x134]
push edx
call fcn.00516cf0
push eax
mov eax, dword [ebp - 0x144]
push eax
push edi
push ebx
call fcn.004f1ba0
add esp, 0x14
mov dword [ebp - 0x14c], eax
test eax, eax
je 0x4f2978
push edi
push ebx
call fcn.004f2500
mov eax, dword [ebp - 0x14c]
add esp, 8
cmp eax, 1
jne 0x4f2ae8
pop edi
mov eax, 7
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b9ff3
mov esp, ebp
pop ebp
ret
mov byte [ebp - 0x34], 0
call fcn.004bfbce
mov dword [eax], 0x273f
call fcn.004bfbce
mov edi, eax
call fcn.004bfbce
mov ecx, dword [edi]
mov dword [ebp - 0x150], eax
push 0x80
lea eax, [ebp - 0xb4]
push eax
push ecx
call fcn.00514fd0
mov edx, dword [ebp - 0x150]
push eax
mov eax, dword [edx]
push eax
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
push esi
call fcn.004ed150
mov ecx, dword [ebp - 0x148]
push ecx
push ebx
call fcn.004f2500
add esp, 0x24
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b9ff3
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x148], 0
jmp 0x4f27ff
test eax, eax
je 0x4f286f
push edi
push ebx
call fcn.004f2500
add esp, 8
pop edi
mov eax, 0x2a
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b9ff3
mov esp, ebp
pop ebp
ret
push 1
push edi
call fcn.00516d00
lea ecx, [ebp - 0x164]
push ecx
call fcn.004f3990
mov edx, dword [eax]
mov dword [ebx + 0x288], edx
mov ecx, dword [eax + 4]
mov dword [ebx + 0x28c], ecx
mov edx, dword [eax + 8]
mov dword [ebx + 0x290], edx
mov eax, dword [eax + 0xc]
add esp, 0xc
cmp dword [ebx + 0x298], 1
mov dword [ebx + 0x294], eax
jle 0x4f29d4
mov ecx, dword [ebx + 0x2a4]
mov edx, dword [ebx + 0x2a0]
push 3
push ecx
push edx
push esi
call fcn.004ea8f0
add esp, 0x10
cmp dword [ebp - 0x154], 0
jne 0x4f2ade
cmp dword [ebx + 0x90], 1
jne 0x4f2ade
test dword [ebx + 0x280], 0x8000000
jne 0x4f2a18
mov eax, dword [ebp - 0x138]
push eax
lea ecx, [ebp - 0x134]
push ecx
push edi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x4f2ab7
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x148], eax
cmp eax, 0xb
je 0x4f2a8f
cmp eax, 0x2732
jle 0x4f2a37
cmp eax, 0x2734
jle 0x4f2a8f
push 0x80
lea edx, [ebp - 0xb4]
push edx
push eax
call fcn.00514fd0
push eax
lea eax, [ebp - 0x34]
push eax
push str.Immediate_connect_fail_for__s:__s_n
push esi
call fcn.004ed020
mov ecx, dword [ebp - 0x148]
push edi
push ebx
mov dword [esi + 0xcac], ecx
call fcn.004f2500
add esp, 0x24
mov dword [ebp - 0x14c], 7
mov eax, dword [ebp - 0x14c]
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b9ff3
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x150]
mov dword [edx], edi
mov dword [ebp - 0x14c], 0
mov eax, dword [ebp - 0x14c]
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b9ff3
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x14c], 0
jne 0x4f2ac8
mov edx, dword [ebp - 0x150]
mov dword [edx], edi
mov eax, dword [ebp - 0x14c]
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b9ff3
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x150]
mov dword [eax], edi
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.004b9ff3
mov esp, ebp
pop ebp
ret