Function at 0x46a8a0
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xe0
mov eax, dword [0x4e50cc]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, ecx
mov dword [ebp - 0xe0], eax
push esi
push edi
mov byte [ebp - 0xcd], 0
mov esi, dword [ebx]
mov dword [eax], 0xffffffff
lea eax, [ebp - 0xd4]
push eax
lea eax, [ebp - 0xcc]
mov dword [ebp - 0xd8], esi
push eax
call fcn.0046ae90
add esp, 8
mov dword [ebp - 0xdc], eax
test eax, eax
jne 0x46abcc
movzx eax, word [ebp - 0xbc]
sub eax, 2
jne 0x46ab94
push 0x2e
lea edx, [ebp - 0x38]
lea ecx, [ebp - 0xb8]
call fcn.0047c4e0
add esp, 4
test eax, eax
je 0x46ab94
push dword [ebp - 0xba]
call dword [sym.imp.WS2_32.dll_ntohs]
lea eax, [ebp - 0x38]
push eax
push str.__Trying__s..._n
push esi
call fcn.0046c300
add esp, 0xc
cmp dword [ebp - 0xcc], 2
jne 0x46a95c
cmp dword [ebp - 0xc8], 1
jne 0x46a95c
mov eax, 1
jmp 0x46a95e
xor eax, eax
mov edi, dword [ebp - 0xd4]
test eax, eax
setne al
mov byte [ebp - 0xce], al
test al, al
je 0x46a985
cmp byte [esi + 0x326], 0
je 0x46a985
mov edx, edi
mov ecx, ebx
call fcn.0046a710
mov ecx, edi
call fcn.0046a770
cmp byte [ebp - 0xce], 0
je 0x46a9a7
cmp byte [esi + 0x430], 0
je 0x46a9a7
mov edx, edi
mov ecx, esi
call fcn.00469870
mov eax, dword [esi + 0x1d8]
test eax, eax
je 0x46a9cb
push 0
push edi
push dword [esi + 0x1dc]
call eax
add esp, 0xc
cmp eax, 2
jne 0x46aa16
mov byte [ebp - 0xcd], 1
cmp dword [ebp - 0xcc], 2
jne 0x46aa39
push ecx
push 2
mov edx, edi
mov ecx, ebx
call fcn.00469a80
mov esi, eax
add esp, 8
mov dword [ebp - 0xdc], esi
test esi, esi
je 0x46aa39
mov edx, edi
mov ecx, ebx
call fcn.0046ae40
mov eax, 7
cmp esi, 1
cmove esi, eax
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004a5ae0
mov esp, ebp
pop ebp
ret
test eax, eax
je 0x46a9cb
mov edx, edi
mov ecx, ebx
call fcn.0046ae40
mov eax, 0x2a
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004a5ae0
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0xd4]
mov dword [ebp - 0xd4], 1
push eax
push 0x8004667e
push edi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, eax
mov eax, 0x10624dd3
mul esi
shr edx, 6
imul ecx, edx, 0x3e8
mov dword [ebx + 0x26c], edx
sub esi, ecx
imul eax, esi, 0x3e8
cmp dword [ebx + 0x274], 1
mov esi, dword [ebp - 0xd8]
mov dword [ebx + 0x270], eax
jle 0x46aa9e
mov edx, dword [ebx + 0x278]
mov ecx, esi
call fcn.004616d0
cmp byte [ebp - 0xcd], 0
jne 0x46ab79
cmp dword [ebx + 0x8c], 1
jne 0x46ab79
push dword [ebp - 0xc0]
lea eax, [ebp - 0xbc]
push eax
push edi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x46ab56
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0xd4], eax
cmp eax, 0xb
je 0x46ab3b
cmp eax, 0x2732
jle 0x46aaf4
cmp eax, 0x2734
jle 0x46ab3b
mov edx, eax
mov ecx, ebx
call fcn.0047cc50
push eax
lea eax, [ebp - 0x38]
push eax
push str.Immediate_connect_fail_for__s:__s_n
push esi
call fcn.0046c300
mov eax, dword [ebp - 0xd4]
add esp, 0x10
mov edx, edi
mov dword [esi + 0x85d4], eax
mov ecx, ebx
call fcn.0046ae40
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004a5ae0
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0xe0]
xor eax, eax
mov dword [ecx], edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004a5ae0
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0xdc]
test eax, eax
jne 0x46abce
mov ecx, dword [ebp - 0xe0]
mov dword [ecx], edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004a5ae0
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0xe0]
xor eax, eax
mov dword [ecx], edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004a5ae0
mov esp, ebp
pop ebp
ret
mov byte [ebp - 0x38], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov ecx, ebx
mov edx, esi
call fcn.0047cc50
push eax
push esi
mov esi, dword [ebp - 0xd8]
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
push esi
call fcn.0046c410
mov edx, dword [ebp - 0xd4]
add esp, 0x10
mov ecx, ebx
call fcn.0046ae40
xor eax, eax
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004a5ae0
mov esp, ebp
pop ebp
ret