Function at 0x439080
Capabilities:
Connect socket

Disassembly:
sub esp, 0xa8
mov eax, dword [0x489ec0]
xor eax, esp
mov dword [esp + 0xa4], eax
mov eax, dword [esp + 0xb0]
push ebx
push ebp
mov ebx, edx
mov ebp, dword [ebx]
mov dword [esp + 0x14], eax
mov dword [eax], 0xffffffff
mov eax, dword [ecx + 4]
push esi
mov esi, dword [esp + 0xc0]
mov dword [esp + 0x20], eax
mov eax, dword [ebx + 0x6c]
push edi
mov dword [esp + 0x20], esi
mov dword [esp + 0x18], 0
mov dword [esp + 0x28], eax
cmp eax, 2
jne 0x4390dd
mov dword [esp + 0x2c], 0x11
jmp 0x4390e4
mov edx, dword [ecx + 0xc]
mov dword [esp + 0x2c], edx
mov eax, dword [ecx + 0x10]
mov dword [esp + 0x30], eax
cmp eax, 0x80
jbe 0x4390fb
mov eax, 0x80
mov dword [esp + 0x30], eax
push eax
mov eax, dword [ecx + 0x18]
push eax
lea ecx, [esp + 0x3c]
push ecx
call fcn.0044fdf0
mov dword [esi], 0
mov eax, dword [ebp + 0x1ac]
add esp, 0xc
test eax, eax
je 0x439138
mov ecx, dword [ebp + 0x1b0]
lea edx, [esp + 0x24]
push edx
push 0
push ecx
call eax
mov edi, eax
add esp, 0xc
mov dword [esp + 0x10], edi
jmp 0x439153
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
push edx
push eax
push ecx
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esp + 0x10], eax
mov edi, eax
cmp edi, 0xffffffff
je 0x4393d7
movzx eax, word [esp + 0x34]
sub eax, 2
lea esi, [ebx + 0x96]
jne 0x43922c
push 0x2e
push esi
lea edx, [esp + 0x40]
push edx
push 2
call fcn.00439660
add esp, 0x10
test eax, eax
je 0x43922c
mov eax, dword [esp + 0x36]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx ecx, ax
mov dword [ebx + 0xc4], ecx
lea eax, [ebx + 0x38]
mov edi, eax
mov ecx, 0xb
rep movsd dword es:[edi], dword [esi]
push eax
push str.__Trying__s...
push ebp
movsw word es:[edi], word [esi]
call fcn.004383f0
push ebx
call fcn.00438db0
mov esi, dword [esp + 0x20]
add esp, 0x10
cmp dword [ebp + 0x344], 0
je 0x4391d7
mov edx, esi
mov edi, ebx
call fcn.00438fb0
push esi
call fcn.00439010
mov eax, dword [ebp + 0x1a4]
add esp, 4
test eax, eax
je 0x43920a
mov edx, dword [ebp + 0x1a8]
push 0
push esi
push edx
call eax
add esp, 0xc
mov dword [esp + 0x14], eax
cmp eax, 2
jne 0x43925e
mov dword [esp + 0x18], 1
mov eax, dword [esp + 0x24]
push eax
push esi
call fcn.004389f0
mov edi, eax
add esp, 8
test edi, edi
je 0x439273
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, edi
jmp 0x4393d9
mov byte [esi], 0
mov dword [ebx + 0xc4], 0
call dword [0x46f07c]
mov esi, eax
push esi
push ebx
call fcn.00446920
push eax
push esi
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
push ebp
call fcn.00438480
add esp, 0x18
push edi
jmp 0x4393d1
test eax, eax
je 0x43920a
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, 0x2a
jmp 0x4393d9
push 1
push esi
call fcn.004472b0
add esp, 8
cmp dword [esp + 0x18], 0
jne 0x43931c
cmp dword [ebx + 0x6c], 1
jne 0x43931c
mov ecx, dword [esp + 0x30]
push ecx
lea edx, [esp + 0x38]
push edx
push esi
call dword [sym.imp.WS2_32.dll_connect]
mov edi, eax
call fcn.004433b0
cmp dword [ebx + 0x1fc], 1
mov dword [ebx + 0x1f4], eax
mov dword [ebx + 0x1f8], edx
jle 0x4392d0
mov eax, dword [ebx + 0x200]
push eax
push ebp
call fcn.00441fd0
add esp, 8
cmp edi, 0xffffffff
jne 0x439381
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esp + 0x14], eax
cmp eax, 0xb
je 0x439364
cmp eax, 0x2732
jle 0x4392f6
cmp eax, 0x2734
jle 0x439364
push eax
push ebx
call fcn.00446920
push eax
lea eax, [ebx + 0x38]
push eax
push str.Failed_to_connect_to__s:__s
push ebp
call fcn.00438480
mov ecx, dword [esp + 0x2c]
add esp, 0x18
mov dword [ebp + 0x859c], ecx
jmp 0x439324
xor edi, edi
cmp dword [esp + 0x18], edi
jne 0x43933d
push esi
lea esi, [esp + 0x18]
call fcn.00438d40
add esp, 4
test edi, edi
jne 0x439397
test eax, eax
je 0x4393ac
mov esi, dword [esp + 0x10]
mov eax, dword [esp + 0x20]
push str.connected_n
push ebp
mov dword [eax], 1
call fcn.004383f0
push esi
push ebx
call fcn.00438e50
mov ecx, dword [esp + 0x2c]
add esp, 0x10
mov dword [ecx], esi
jmp 0x4393d7
mov eax, dword [esp + 0xbc]
push ebx
mov edi, esi
call fcn.00438980
mov edi, eax
add esp, 4
cmp edi, 3
je 0x439262
cmp edi, 1
jne 0x439324
cmp dword [ebp + 0x550], 2
jne 0x439324
mov edx, dword [esp + 0x1c]
mov dword [edx], esi
jmp 0x4393d7
cmp edi, 1
jne 0x4393ac
push str.Timeout_n
push ebp
call fcn.004383f0
add esp, 8
jmp 0x4393cc
mov eax, dword [esp + 0x14]
push eax
push ebx
mov dword [ebp + 0x859c], eax
call fcn.00446920
push eax
push 0x4785f4
push ebp
call fcn.004383f0
add esp, 0x14
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
mov ecx, dword [esp + 0xb4]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0044e030
add esp, 0xa8
ret