Function at 0x413674
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x170
mov eax, dword [0x462370]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
and dword [ebp - 0x158], 0
push esi
mov esi, dword [eax]
or dword [ecx], 0xffffffff
mov dword [ebp - 0x154], ecx
lea ecx, [ebp - 0x15c]
push ecx
lea ecx, [ebp - 0x144]
push ecx
push edx
push eax
mov dword [ebp - 0x148], eax
mov dword [ebp - 0x150], esi
call fcn.004134e5
add esp, 0x10
mov dword [ebp - 0x14c], eax
test eax, eax
je 0x4136d2
xor eax, eax
jmp 0x413984
push ebx
push edi
lea edi, [ebp - 0x160]
lea ebx, [ebp - 0x34]
lea esi, [ebp - 0x134]
call fcn.00413123
test eax, eax
jne 0x413740
call fcn.0043c9fe
mov esi, eax
call fcn.0043c9fe
mov edi, eax
push 0x80
lea eax, [ebp - 0xb4]
push eax
push dword [esi]
call fcn.00431c8d
push eax
push dword [edi]
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
push dword [ebp - 0x150]
call fcn.0040ea8b
mov ebx, dword [ebp - 0x15c]
add esp, 0x1c
xor esi, esi
push ebx
push dword [ebp - 0x148]
call fcn.00413477
pop ecx
pop ecx
mov eax, esi
jmp 0x413982
push dword [ebp - 0x160]
mov esi, dword [ebp - 0x150]
lea eax, [ebp - 0x34]
push eax
push str.__Trying__s:_ld..._n
push esi
call fcn.0040e9e4
mov ebx, dword [ebp - 0x15c]
add esp, 0x10
cmp dword [ebp - 0x144], 2
je 0x413776
cmp dword [ebp - 0x144], 0x17
jne 0x413781
xor edi, edi
inc edi
cmp dword [ebp - 0x140], edi
je 0x413785
xor edi, edi
jmp 0x41379c
test byte [esi + 0xa90], 8
je 0x41379c
push ebx
push dword [ebp - 0x148]
call fcn.0041332a
pop ecx
pop ecx
push ebx
call fcn.004133a8
pop ecx
test edi, edi
je 0x4137b8
test dword [esi + 0xa90], 0x1000
je 0x4137b8
call fcn.00412a55
cmp dword [esi + 0x608], 0
je 0x4137f4
push 1
push esi
call fcn.00410f9e
push 0
push ebx
push dword [esi + 0x60c]
call dword [esi + 0x608]
push 0
push esi
mov edi, eax
call fcn.00410f9e
add esp, 0x1c
cmp edi, 2
jne 0x413853
mov dword [ebp - 0x158], 1
cmp dword [ebp - 0x144], 2
je 0x413806
cmp dword [ebp - 0x144], 0x17
jne 0x41385f
lea eax, [ebp - 0x134]
push eax
call fcn.00433781
mov ecx, dword [ebp - 0x148]
push eax
push dword [ebp - 0x144]
push ebx
call fcn.00412c00
mov esi, eax
add esp, 0x10
mov dword [ebp - 0x14c], esi
test esi, esi
je 0x41385f
push ebx
push dword [ebp - 0x148]
call fcn.00413477
pop ecx
pop ecx
cmp esi, 1
jne 0x413739
push 7
pop eax
jmp 0x413982
test edi, edi
je 0x4137f4
push 0x2a
pop esi
jmp 0x41372b
push 1
push ebx
call fcn.00433a52
lea eax, [ebp - 0x170]
push eax
call fcn.004261eb
mov edi, dword [ebp - 0x148]
add edi, 0x2a8
mov esi, eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 0x148]
add esp, 0xc
cmp dword [esi + 0x2b8], 1
jle 0x4138b3
push 3
push dword [esi + 0x2c4]
push dword [esi + 0x2c0]
push dword [ebp - 0x150]
call fcn.00410da4
add esp, 0x10
cmp dword [ebp - 0x158], 0
jne 0x413978
cmp dword [esi + 0x90], 1
jne 0x413978
test dword [esi + 0x2a4], 0x8000000
jne 0x4138f2
push dword [ebp - 0x138]
lea eax, [ebp - 0x134]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x41395f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
cmp edi, 0xb
je 0x413958
cmp edi, 0x2732
jle 0x41390f
cmp edi, 0x2734
jle 0x413958
push 0x80
lea eax, [ebp - 0xb4]
push eax
push edi
call fcn.00431c8d
push eax
lea eax, [ebp - 0x34]
push eax
push str.Immediate_connect_fail_for__s:__s_n
push dword [ebp - 0x150]
call fcn.0040e9e4
mov eax, dword [ebp - 0x150]
push ebx
push esi
mov dword [eax + 0xcac], edi
call fcn.00413477
add esp, 0x24
mov dword [ebp - 0x14c], 7
jmp 0x413970
and dword [ebp - 0x14c], 0
cmp dword [ebp - 0x14c], 0
jne 0x413970
mov eax, dword [ebp - 0x154]
mov dword [eax], ebx
mov eax, dword [ebp - 0x14c]
jmp 0x413982
mov eax, dword [ebp - 0x154]
mov dword [eax], ebx
xor eax, eax
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0043c86a
leave
ret