Function at 0x40f290
Capabilities:
Connect socket

Disassembly:
sub esp, 0xe0
mov eax, dword [0x5cc5b0]
xor eax, esp
mov dword [esp + 0xdc], eax
mov eax, dword [esp + 0xe8]
push ebp
mov ebp, dword [esp + 0xe8]
mov edx, dword [ebp]
push esi
mov dword [esp + 0x1c], ecx
mov dword [ecx], 0xffffffff
lea ecx, [esp + 0x18]
push ecx
mov dword [esp + 0x10], edx
lea edx, [esp + 0x28]
push edx
push eax
xor esi, esi
push ebp
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], esi
call fcn.0040f190
add esp, 0x10
mov dword [esp + 8], eax
cmp eax, esi
je 0x40f304
pop esi
xor eax, eax
pop ebp
mov ecx, dword [esp + 0xdc]
xor ecx, esp
call fcn.00501f35
add esp, 0xe0
ret
push ebx
push edi
lea ebx, [esp + 0x28]
lea edi, [esp + 0xbc]
lea esi, [esp + 0x3c]
call fcn.0040ecc0
test eax, eax
jne 0x40f351
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push ebp
call fcn.00411f40
push eax
mov eax, dword [esp + 0x20]
push esi
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
push eax
call fcn.0040c610
mov ecx, dword [esp + 0x38]
push ecx
push ebp
call fcn.0040f130
add esp, 0x20
jmp 0x40f55b
mov ebx, dword [esp + 0x14]
lea edx, [esp + 0xbc]
push edx
push str.__Trying__s..._n
push ebx
call fcn.0040c580
mov eax, dword [esp + 0x38]
mov edi, dword [esp + 0x2c]
add esp, 0xc
cmp eax, 2
je 0x40f37d
cmp eax, 0x17
jne 0x40f388
mov esi, 1
cmp dword [esp + 0x30], esi
je 0x40f38c
xor esi, esi
jmp 0x40f39f
cmp dword [ebx + 0x364], 0
je 0x40f39f
push edi
push ebp
call fcn.0040eec0
add esp, 8
push edi
call fcn.0040ef20
add esp, 4
test esi, esi
je 0x40f3bc
cmp dword [ebx + 0x484], 0
je 0x40f3bc
mov esi, ebx
call fcn.0040e580
mov eax, dword [ebx + 0x1b0]
test eax, eax
je 0x40f3fe
mov ecx, dword [ebx + 0x1b4]
push 0
push edi
push ecx
call eax
mov esi, eax
add esp, 0xc
cmp esi, 2
jne 0x40f3e6
mov dword [esp + 0x1c], 1
jmp 0x40f402
test esi, esi
je 0x40f402
push edi
push ebp
call fcn.0040f130
add esp, 8
mov eax, 0x2a
jmp 0x40f55d
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x2c]
cmp eax, 2
je 0x40f410
cmp eax, 0x17
jne 0x40f456
lea edx, [esp + 0x3c]
push edx
call fcn.0042f8c0
push eax
mov eax, dword [esp + 0x34]
push eax
push edi
push ebp
call fcn.0040e730
mov ebx, eax
add esp, 0x14
mov dword [esp + 0x10], ebx
test ebx, ebx
je 0x40f452
push edi
push ebp
call fcn.0040f130
add esp, 8
cmp ebx, 1
jne 0x40f44b
lea eax, [ebx + 6]
jmp 0x40f55d
mov eax, ebx
jmp 0x40f55d
mov ebx, dword [esp + 0x14]
push 1
push edi
call fcn.0042f940
add esp, 8
call fcn.0040c120
cmp dword [ebp + 0x2d8], 1
mov dword [ebp + 0x2d0], eax
mov dword [ebp + 0x2d4], edx
jle 0x40f48b
mov ecx, dword [ebp + 0x2dc]
push ecx
push ebx
call fcn.0040aa10
add esp, 8
cmp dword [esp + 0x1c], 0
jne 0x40f555
cmp dword [ebp + 0x8c], 1
jne 0x40f555
mov edx, dword [esp + 0x38]
push edx
lea eax, [esp + 0x40]
push eax
push edi
call dword [sym.imp.WS2_32.dll_connect]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40f4c7
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esp + 0x18], eax
mov esi, eax
xor ecx, ecx
cmp dword [esp + 0x2c], 0x17
sete cl
mov dword [ebp + 0x288], ecx
cmp ebx, 0xffffffff
jne 0x40f542
cmp esi, 0xb
je 0x40f52e
cmp esi, 0x2732
jle 0x40f4f1
cmp esi, 0x2734
jle 0x40f52e
push esi
push ebp
call fcn.00411f40
mov ebx, dword [esp + 0x1c]
push eax
lea edx, [esp + 0xc8]
push edx
push str.Immediate_connect_fail_for__s:__s_n
push ebx
call fcn.0040c580
push edi
push ebp
mov dword [ebx + 0x8634], esi
call fcn.0040f130
mov dword [esp + 0x30], 7
mov eax, dword [esp + 0x30]
add esp, 0x20
jmp 0x40f55d
mov eax, dword [esp + 0x24]
mov dword [esp + 0x10], 0
mov dword [eax], edi
mov eax, dword [esp + 0x10]
jmp 0x40f55d
cmp dword [esp + 0x10], 0
jne 0x40f54f
mov eax, dword [esp + 0x24]
mov dword [eax], edi
mov eax, dword [esp + 0x10]
jmp 0x40f55d
mov ecx, dword [esp + 0x24]
mov dword [ecx], edi
xor eax, eax
mov ecx, dword [esp + 0xec]
pop edi
pop ebx
pop esi
pop ebp
xor ecx, esp
call fcn.00501f35
add esp, 0xe0
ret