Function at 0x59d010
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x228
push esi
push edi
lea edi, [ebp - 0x228]
mov ecx, 0x8a
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov eax, dword [0x7a3104]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0xa0], 0xffffffff
mov dword [ebp - 0xa4], 0
mov byte [ebp - 0xa5], 0
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0xc]
lea edx, [ecx + eax*4 + 0x160]
mov dword [ebp - 0x20c], edx
mov eax, dword [ebp - 0x20c]
mov dword [eax], 0xffffffff
lea ecx, [ebp - 0xb0]
push ecx
lea edx, [ebp - 0x98]
push edx
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.0051a651
add esp, 0x10
mov dword [ebp - 0xb8], eax
cmp dword [ebp - 0xb8], 0
je 0x59d0a9
mov eax, dword [ebp - 0xb8]
jmp 0x59d50f
lea edx, [ebp - 0xf8]
push edx
lea eax, [ebp - 0xec]
push eax
mov ecx, dword [ebp - 0x8c]
push ecx
lea edx, [ebp - 0x88]
push edx
call fcn.005194ef
add esp, 0x10
movzx eax, al
test eax, eax
jne 0x59d128
push 0x100
lea ecx, [ebp - 0x204]
push ecx
call fcn.00515f02
mov edx, dword [eax]
push edx
call fcn.00514f4e
add esp, 0xc
push eax
call fcn.00515f02
mov eax, dword [eax]
push eax
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
mov ecx, dword [ebp + 8]
push ecx
call fcn.00518f9a
add esp, 0x10
mov edx, dword [ebp - 0xb0]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.0051233e
add esp, 0xc
xor eax, eax
jmp 0x59d50f
mov edx, dword [ebp - 0xf8]
push edx
lea eax, [ebp - 0xec]
push eax
push str.__Trying__s:_ld..._n
mov ecx, dword [ebp + 8]
push ecx
call fcn.00514800
add esp, 0x10
cmp dword [ebp - 0x98], 2
je 0x59d159
cmp dword [ebp - 0x98], 0x17
jne 0x59d16e
cmp dword [ebp - 0x94], 1
jne 0x59d16e
mov dword [ebp - 0x220], 1
jmp 0x59d178
mov dword [ebp - 0x220], 0
cmp dword [ebp - 0x220], 0
jne 0x59d18d
mov dword [ebp - 0x224], 0
jmp 0x59d197
mov dword [ebp - 0x224], 1
mov dl, byte [ebp - 0x224]
mov byte [ebp - 0xfd], dl
movzx eax, byte [ebp - 0xfd]
test eax, eax
je 0x59d1cf
mov ecx, dword [ebp + 8]
movzx edx, byte [ecx + 0x707]
test edx, edx
je 0x59d1cf
mov eax, dword [ebp - 0xb0]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.0059e1d0
add esp, 8
xor edx, edx
jne 0x59d1cf
mov eax, dword [ebp - 0xb0]
push eax
call fcn.00514954
add esp, 4
movzx ecx, byte [ebp - 0xfd]
test ecx, ecx
je 0x59d20e
mov edx, dword [ebp + 8]
movzx eax, byte [edx + 0x710]
test eax, eax
je 0x59d20e
mov ecx, dword [ebp - 0xb0]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.0059ce70
add esp, 8
mov eax, dword [ebp + 8]
cmp dword [eax + 0x1c8], 0
je 0x59d2a6
push 1
mov ecx, dword [ebp + 8]
push ecx
call fcn.00518b1c
add esp, 8
mov esi, esp
push 0
mov edx, dword [ebp - 0xb0]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x1cc]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x1c8]
call eax
add esp, 0xc
cmp esi, esp
call fcn.00516fe7
mov dword [ebp - 0xa4], eax
push 0
mov ecx, dword [ebp + 8]
push ecx
call fcn.00518b1c
add esp, 8
cmp dword [ebp - 0xa4], 2
jne 0x59d27c
mov byte [ebp - 0xa5], 1
jmp 0x59d2a6
cmp dword [ebp - 0xa4], 0
je 0x59d2a6
mov edx, dword [ebp - 0xb0]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.0051233e
add esp, 0xc
mov eax, 0x2a
jmp 0x59d50f
cmp dword [ebp - 0x98], 2
je 0x59d2b8
cmp dword [ebp - 0x98], 0x17
jne 0x59d326
lea edx, [ebp - 0x88]
push edx
call fcn.00513315
add esp, 4
push eax
mov eax, dword [ebp - 0x98]
push eax
mov ecx, dword [ebp - 0xb0]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.0059d5b0
add esp, 0x10
mov dword [ebp - 0xb8], eax
cmp dword [ebp - 0xb8], 0
je 0x59d326
mov eax, dword [ebp - 0xb0]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.0051233e
add esp, 0xc
cmp dword [ebp - 0xb8], 1
jne 0x59d31b
mov eax, 7
jmp 0x59d50f
mov eax, dword [ebp - 0xb8]
jmp 0x59d50f
push 1
mov eax, dword [ebp - 0xb0]
push eax
call fcn.00512668
add esp, 8
lea ecx, [ebp - 0x21c]
push ecx
call fcn.00518464
add esp, 4
mov edx, dword [ebp + 0xc]
add edx, 0x278
mov ecx, dword [eax]
mov dword [edx], ecx
mov ecx, dword [eax + 4]
mov dword [edx + 4], ecx
mov ecx, dword [eax + 8]
mov dword [edx + 8], ecx
mov eax, dword [eax + 0xc]
mov dword [edx + 0xc], eax
mov ecx, dword [ebp + 0xc]
cmp dword [ecx + 0x274], 1
jle 0x59d3c3
push 3
mov edx, 8
imul eax, edx, 0
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + eax + 0x28c]
push edx
mov eax, dword [ecx + eax + 0x288]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00514c5b
add esp, 0x10
push 4
mov edx, 8
shl edx, 0
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + edx + 0x28c]
push ecx
mov edx, dword [eax + edx + 0x288]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00514c5b
add esp, 0x10
movzx ecx, byte [ebp - 0xa5]
test ecx, ecx
jne 0x59d431
mov edx, dword [ebp + 0xc]
cmp dword [edx + 0x60], 4
je 0x59d431
mov eax, dword [ebp + 0xc]
movzx ecx, byte [eax + 0x26a]
test ecx, ecx
je 0x59d3e7
jmp 0x59d411
mov esi, esp
mov edx, dword [ebp - 0x8c]
push edx
lea eax, [ebp - 0x88]
push eax
mov ecx, dword [ebp - 0xb0]
push ecx
call dword [sym.imp.WS2_32.dll_connect]
cmp esi, esp
call fcn.00516fe7
mov dword [ebp - 0xa0], eax
cmp dword [ebp - 0xa0], 0xffffffff
jne 0x59d42f
mov esi, esp
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp esi, esp
call fcn.00516fe7
mov dword [ebp - 0xa4], eax
jmp 0x59d446
mov edx, dword [ebp - 0x20c]
mov eax, dword [ebp - 0xb0]
mov dword [edx], eax
xor eax, eax
jmp 0x59d50f
cmp dword [ebp - 0xa0], 0xffffffff
jne 0x59d4f2
mov ecx, dword [ebp - 0xa4]
mov dword [ebp - 0x228], ecx
cmp dword [ebp - 0x228], 0xb
je 0x59d482
cmp dword [ebp - 0x228], 0x2733
je 0x59d482
cmp dword [ebp - 0x228], 0x2734
je 0x59d482
jmp 0x59d48e
mov dword [ebp - 0xb8], 0
jmp 0x59d4f2
push 0x100
lea edx, [ebp - 0x204]
push edx
mov eax, dword [ebp - 0xa4]
push eax
call fcn.00514f4e
add esp, 0xc
push eax
lea ecx, [ebp - 0xec]
push ecx
push str.Immediate_connect_fail_for__s:__s_n
mov edx, dword [ebp + 8]
push edx
call fcn.00514800
add esp, 0x10
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xa4]
mov dword [eax + 0x958], ecx
mov edx, dword [ebp - 0xb0]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.0051233e
add esp, 0xc
mov dword [ebp - 0xb8], 7
cmp dword [ebp - 0xb8], 0
jne 0x59d509
mov edx, dword [ebp - 0x20c]
mov eax, dword [ebp - 0xb0]
mov dword [edx], eax
mov eax, dword [ebp - 0xb8]
push edx
mov ecx, ebp
push eax
lea edx, [0x59d540]
call fcn.005163b2
pop eax
pop edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005150f7
add esp, 0x228
cmp ebp, esp
call fcn.00516fe7
mov esp, ebp
pop ebp
ret