Function at 0x470580
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1e4
mov eax, dword [0x4dbfb4]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
push esi
mov esi, dword [ebx]
lea edx, [ebp - 0x1c8]
push edx
mov dword [ebx + ecx*4 + 0x428], 0xffffffff
lea ecx, [ebp - 0x1c4]
push ecx
push eax
push ebx
mov dword [ebp - 0x1d0], 0
call fcn.004703b0
add esp, 0x10
mov dword [ebp - 0x1cc], eax
test eax, eax
je 0x4705e4
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a1682
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x1b8]
push edi
lea edx, [ebp - 0x1d4]
push edx
lea eax, [ebp - 0x34]
push eax
push ecx
lea edx, [ebp - 0x1b4]
push edx
call fcn.0046fdc0
add esp, 0x10
test eax, eax
jne 0x470667
call fcn.004a16d3
mov edi, eax
call fcn.004a16d3
mov ecx, dword [edi]
mov dword [ebp - 0x1d0], eax
push pe_nt_image_headers32
lea eax, [ebp - 0x134]
push eax
push ecx
call fcn.00492ff0
mov edx, dword [ebp - 0x1d0]
push eax
mov eax, dword [edx]
push eax
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
push esi
call fcn.0046af40
mov ecx, dword [ebp - 0x1c8]
push ecx
push ebx
call fcn.00470320
add esp, 0x24
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a1682
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x1d4]
push edx
lea eax, [ebp - 0x34]
push eax
push str.__Trying__s:_ld..._n
push esi
call fcn.0046ae20
mov eax, dword [ebp - 0x1c4]
mov edi, dword [ebp - 0x1c8]
add esp, 0x10
cmp eax, 2
je 0x47069a
cmp eax, 0x17
jne 0x47079c
mov eax, 1
cmp dword [ebp - 0x1c0], eax
jne 0x47079c
cmp dword [esi + 0xbc8], 0
mov dword [ebp - 0x1c8], eax
je 0x4706c5
push ebx
mov ecx, edi
call fcn.004701c0
add esp, 4
push edi
call fcn.00470240
add esp, 4
cmp dword [ebp - 0x1c8], 0
je 0x4706e5
cmp dword [esi + 0xbe8], 0
je 0x4706e5
call fcn.0046f5e0
cmp dword [esi + 0x628], 0
je 0x470732
push 1
push esi
call fcn.00468be0
mov ecx, dword [esi + 0x62c]
mov edx, dword [esi + 0x628]
push 0
push edi
push ecx
call edx
push 0
push esi
mov dword [ebp - 0x1c8], eax
call fcn.00468be0
mov eax, dword [ebp - 0x1c8]
add esp, 0x1c
cmp eax, 2
jne 0x4707ab
mov dword [ebp - 0x1d0], 1
mov eax, dword [ebp - 0x1c4]
cmp eax, 2
je 0x470746
cmp eax, 0x17
jne 0x4707ce
lea eax, [ebp - 0x1b4]
push eax
call fcn.00495030
mov ecx, dword [ebp - 0x1c4]
push eax
push ecx
push edi
push ebx
call fcn.0046f7c0
add esp, 0x14
mov dword [ebp - 0x1cc], eax
test eax, eax
je 0x4707ce
push edi
push ebx
call fcn.00470320
mov eax, dword [ebp - 0x1cc]
add esp, 8
cmp eax, 1
jne 0x470941
pop edi
mov eax, 7
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a1682
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x1c8], 0
jmp 0x4706c5
test eax, eax
je 0x470732
push edi
push ebx
call fcn.00470320
add esp, 8
pop edi
mov eax, 0x2a
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a1682
mov esp, ebp
pop ebp
ret
push 1
push edi
call fcn.00490f40
lea edx, [ebp - 0x1e4]
push edx
call fcn.00473e20
mov ecx, dword [eax]
mov dword [ebx + 0x590], ecx
mov edx, dword [eax + 4]
mov dword [ebx + 0x594], edx
mov ecx, dword [eax + 8]
mov dword [ebx + 0x598], ecx
mov edx, dword [eax + 0xc]
add esp, 0xc
cmp dword [ebx + 0x5a0], 1
mov dword [ebx + 0x59c], edx
jle 0x47082a
mov eax, dword [ebx + 0x5ac]
mov ecx, dword [ebx + 0x5a8]
push 3
push eax
push ecx
push esi
call fcn.004688f0
add esp, 0x10
cmp dword [ebp - 0x1d0], 0
jne 0x470935
cmp dword [ebx + 0x2f8], 4
je 0x470935
cmp dword [ebx + 0x57c], 0
jne 0x47086b
mov edx, dword [ebp - 0x1b8]
push edx
lea eax, [ebp - 0x1b4]
push eax
push edi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x47090c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x1c8], eax
cmp eax, 0xb
je 0x4708e2
cmp eax, 0x2732
jle 0x47088a
cmp eax, 0x2734
jle 0x4708e2
push pe_nt_image_headers32
lea ecx, [ebp - 0x134]
push ecx
push eax
call fcn.00492ff0
push eax
lea edx, [ebp - 0x34]
push edx
push str.Immediate_connect_fail_for__s:__s_n
push esi
call fcn.0046ae20
mov eax, dword [ebp - 0x1c8]
push edi
push ebx
mov dword [esi + 0xe4c], eax
call fcn.00470320
add esp, 0x24
mov dword [ebp - 0x1cc], 7
mov eax, dword [ebp - 0x1cc]
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a1682
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0xc]
mov dword [ebx + ecx*4 + 0x428], edi
mov dword [ebp - 0x1cc], 0
mov eax, dword [ebp - 0x1cc]
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a1682
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x1cc], 0
jne 0x47091f
mov ecx, dword [ebp + 0xc]
mov dword [ebx + ecx*4 + 0x428], edi
mov eax, dword [ebp - 0x1cc]
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a1682
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 0xc]
mov dword [ebx + edx*4 + 0x428], edi
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.004a1682
mov esp, ebp
pop ebp
ret