Function at 0x418060
Capabilities:
Connect socket

Disassembly:
sub esp, 0xe0
mov eax, dword [0x46d184]
xor eax, esp
mov dword [esp + 0xdc], eax
mov eax, dword [esp + 0xe4]
push ebp
push esi
mov esi, dword [ebx]
mov dword [esp + 0xc], ecx
mov dword [ecx], 0xffffffff
lea ecx, [esp + 8]
push ecx
lea edx, [esp + 0x28]
push edx
push eax
push ebx
mov dword [esp + 0x20], 0
call fcn.00417ed0
mov ebp, eax
add esp, 0x10
test ebp, ebp
je 0x4180c4
pop esi
xor eax, eax
pop ebp
mov ecx, dword [esp + 0xdc]
xor ecx, esp
call fcn.0044455e
add esp, 0xe0
ret
movzx eax, word [esp + 0x34]
sub eax, 2
push edi
jne 0x4181ef
push 0x2e
lea eax, [esp + 0xbc]
push eax
lea ecx, [esp + 0x44]
push ecx
push 2
call fcn.004210e0
add esp, 0x10
test eax, eax
je 0x4181ef
mov edx, dword [esp + 0x3a]
push edx
call dword [sym.imp.WS2_32.dll_ntohs]
lea eax, [esp + 0xb8]
push eax
push str.__Trying__s..._n
push esi
call fcn.004153c0
mov edi, dword [esp + 0x18]
add esp, 0xc
cmp dword [esp + 0x28], 2
jne 0x41823c
mov eax, 1
cmp dword [esp + 0x2c], eax
jne 0x41823c
cmp dword [esi + 0x5a0], 0
mov dword [esp + 0xc], eax
je 0x41814a
push edi
push ebx
call fcn.00417d20
add esp, 8
push edi
call fcn.00417d80
add esp, 4
cmp dword [esp + 0xc], 0
je 0x418168
cmp dword [esi + 0x6e8], 0
je 0x418168
call fcn.00417440
mov eax, dword [esi + 0x1e8]
test eax, eax
je 0x418192
mov ecx, dword [esi + 0x1ec]
push 0
push edi
push ecx
call eax
add esp, 0xc
cmp eax, 2
jne 0x418249
mov dword [esp + 0x14], 1
cmp dword [esp + 0x28], 2
jne 0x418278
lea edx, [esp + 0x38]
push edx
call fcn.0040c340
push eax
mov eax, dword [esp + 0x30]
push eax
push edi
push ebx
call fcn.00417620
mov ebp, eax
add esp, 0x14
test ebp, ebp
je 0x418278
push edi
push ebx
call fcn.00417e70
add esp, 8
cmp ebp, 1
jne 0x4183a0
pop edi
pop esi
lea eax, [ebp + 6]
pop ebp
mov ecx, dword [esp + 0xdc]
xor ecx, esp
call fcn.0044455e
add esp, 0xe0
ret
mov byte [esp + 0xb8], 0
call fcn.00446b30
mov dword [eax], 0x273f
call fcn.00446b30
mov edi, eax
call fcn.00446b30
mov ebp, eax
mov eax, dword [edi]
push eax
push ebx
call fcn.0041cee0
mov ecx, dword [ebp]
push eax
push ecx
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
push esi
call fcn.00415450
mov edx, dword [esp + 0x24]
push edx
push ebx
call fcn.00417e70
add esp, 0x20
jmp 0x4183c0
mov dword [esp + 0xc], 0
jmp 0x41814a
test eax, eax
je 0x418192
push edi
push ebx
call fcn.00417e70
add esp, 8
pop edi
pop esi
mov eax, 0x2a
pop ebp
mov ecx, dword [esp + 0xdc]
xor ecx, esp
call fcn.0044455e
add esp, 0xe0
ret
push 1
push edi
call fcn.0043b3f0
lea ecx, [esp + 0x20]
push ecx
call fcn.00414d60
mov edx, dword [eax]
mov dword [ebx + 0x320], edx
mov ecx, dword [eax + 4]
mov dword [ebx + 0x324], ecx
mov edx, dword [eax + 8]
mov dword [ebx + 0x328], edx
mov eax, dword [eax + 0xc]
add esp, 0xc
cmp dword [ebx + 0x330], 1
mov dword [ebx + 0x32c], eax
jle 0x4182d2
mov ecx, dword [ebx + 0x33c]
mov edx, dword [ebx + 0x338]
push 3
push ecx
push edx
push esi
call fcn.00412fb0
add esp, 0x10
cmp dword [esp + 0x14], 0
jne 0x4183ba
cmp dword [ebx + 0x94], 1
jne 0x4183ba
cmp dword [ebx + 0x308], 0
jne 0x41830d
mov eax, dword [esp + 0x34]
push eax
lea ecx, [esp + 0x3c]
push ecx
push edi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x418396
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebp, eax
cmp ebp, 0xb
je 0x418374
cmp ebp, 0x2732
jle 0x41832a
cmp ebp, 0x2734
jle 0x418374
push ebp
push ebx
call fcn.0041cee0
push eax
lea edx, [esp + 0xc4]
push edx
push str.Immediate_connect_fail_for__s:__s_n
push esi
call fcn.004153c0
push edi
push ebx
mov dword [esi + 0x495c], ebp
call fcn.00417e70
add esp, 0x20
pop edi
mov ebp, 7
pop esi
mov eax, ebp
pop ebp
mov ecx, dword [esp + 0xdc]
xor ecx, esp
call fcn.0044455e
add esp, 0xe0
ret
mov eax, dword [esp + 0x10]
mov dword [eax], edi
pop edi
xor ebp, ebp
pop esi
mov eax, ebp
pop ebp
mov ecx, dword [esp + 0xdc]
xor ecx, esp
call fcn.0044455e
add esp, 0xe0
ret
test ebp, ebp
jne 0x4183a0
mov eax, dword [esp + 0x10]
mov dword [eax], edi
pop edi
pop esi
mov eax, ebp
pop ebp
mov ecx, dword [esp + 0xdc]
xor ecx, esp
call fcn.0044455e
add esp, 0xe0
ret
mov ecx, dword [esp + 0x10]
mov dword [ecx], edi
mov ecx, dword [esp + 0xe8]
pop edi
pop esi
pop ebp
xor ecx, esp
xor eax, eax
call fcn.0044455e
add esp, 0xe0
ret