Function at 0x406010
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb4
mov eax, dword [0x46e140]
xor eax, ebp
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x14], 0
mov dword [ebp - 0xc], 0
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov dword [ebp - 0x18], ecx
mov dword [ebp - 4], 0
mov edx, dword [ebp + 0x10]
mov dword [edx], 0xffffffff
mov eax, dword [ebp + 0x14]
mov dword [eax], 0
lea ecx, [ebp - 0x10]
push ecx
lea edx, [ebp - 0xb0]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00406de0
add esp, 0x10
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x40607d
xor eax, eax
jmp 0x40632e
mov edx, dword [ebp + 8]
add edx, 0xcc
push edx
mov eax, dword [ebp + 8]
add eax, 0x9e
push eax
lea ecx, [ebp - 0xa0]
push ecx
call fcn.00405a50
add esp, 0xc
test eax, eax
jne 0x4060e9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x14], eax
mov edx, dword [ebp - 0x14]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.004243f0
add esp, 8
push eax
mov ecx, dword [ebp - 0x14]
push ecx
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
mov edx, dword [ebp - 0x18]
push edx
call fcn.00420dd0
add esp, 0x10
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00406d80
add esp, 8
xor eax, eax
jmp 0x40632e
push 0x2e
mov edx, dword [ebp + 8]
add edx, 0x9e
push edx
mov eax, dword [ebp + 8]
add eax, 0x40
push eax
call fcn.004468c0
add esp, 0xc
mov ecx, dword [ebp + 8]
add ecx, 0x40
push ecx
push str.__Trying__s..._n
mov edx, dword [ebp - 0x18]
push edx
call fcn.00420d30
add esp, 0xc
mov eax, dword [ebp + 8]
push eax
call fcn.00405800
add esp, 4
mov ecx, dword [ebp - 0x18]
cmp dword [ecx + 0x314], 0
je 0x406144
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.004069f0
add esp, 8
xor ecx, ecx
jne 0x406144
mov edx, dword [ebp - 0x10]
push edx
call fcn.00405f30
add esp, 4
mov eax, dword [ebp - 0x18]
cmp dword [eax + 0x408], 0
je 0x406170
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp - 0x18]
push edx
call fcn.00406340
add esp, 8
mov eax, dword [ebp - 0x18]
cmp dword [eax + 0x16c], 0
je 0x4061cc
push 0
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + 0x170]
push eax
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx + 0x16c]
call edx
add esp, 0xc
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 2
jne 0x4061ac
mov dword [ebp - 0xc], 1
jmp 0x4061cc
cmp dword [ebp - 0x14], 0
je 0x4061cc
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00406d80
add esp, 8
mov eax, 0x2a
jmp 0x40632e
mov edx, dword [ebp - 0xb0]
push edx
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00406430
add esp, 0xc
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x406211
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00406d80
add esp, 8
cmp dword [ebp - 4], 1
jne 0x406209
xor eax, eax
jmp 0x40632e
mov eax, dword [ebp - 4]
jmp 0x40632e
push 1
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.0041dc30
add esp, 8
call fcn.004249d0
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x204], eax
mov dword [ecx + 0x208], edx
mov edx, dword [ebp + 8]
cmp dword [edx + 0x20c], 1
jle 0x406255
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x210]
push ecx
mov edx, dword [ebp - 0x18]
push edx
call fcn.0041d490
add esp, 8
cmp dword [ebp - 0xc], 0
jne 0x406290
mov eax, dword [ebp + 8]
cmp dword [eax + 0x74], 1
jne 0x406290
mov ecx, dword [ebp - 0xa4]
push ecx
lea edx, [ebp - 0xa0]
push edx
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.WS2_32.dll_connect]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xffffffff
jne 0x40628e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x14], eax
jmp 0x40629f
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp - 0x10]
mov dword [ecx], edx
xor eax, eax
jmp 0x40632e
cmp dword [ebp - 8], 0xffffffff
jne 0x406324
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0xb4], eax
cmp dword [ebp - 0xb4], 0xb
je 0x4062d1
cmp dword [ebp - 0xb4], 0x2732
jle 0x4062dd
cmp dword [ebp - 0xb4], 0x2734
jle 0x4062d1
jmp 0x4062dd
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp - 0x10]
mov dword [ecx], edx
xor eax, eax
jmp 0x40632e
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.004243f0
add esp, 8
push eax
mov edx, dword [ebp + 8]
add edx, 0x40
push edx
push str.Failed_to_connect_to__s:__s
mov eax, dword [ebp - 0x18]
push eax
call fcn.00420dd0
add esp, 0x10
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
mov dword [ecx + 0x858c], edx
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00406d80
add esp, 8
jmp 0x40632c
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp - 0x10]
mov dword [edx], eax
xor eax, eax
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.00446cea
mov esp, ebp
pop ebp
ret