Function at 0x413920
Capabilities:
Connect socket

Disassembly:
sub esp, 0x114
mov ecx, dword [esp + 0x118]
mov eax, dword [esp + 0x11c]
push ebx
push ebp
mov ebx, dword [ecx]
mov ecx, dword [ecx + 0x80]
mov edx, dword [eax + 4]
mov dword [esp + 0x10], ecx
mov ecx, dword [eax + 0x10]
mov dword [esp + 0xc], edx
mov edx, dword [eax + 0xc]
push esi
cmp ecx, 0x80
push edi
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], ecx
jbe 0x41396a
mov ecx, 0x80
mov dword [esp + 0x20], ecx
mov esi, dword [eax + 0x18]
mov eax, ecx
lea edi, [esp + 0x24]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x134]
mov byte [ecx], 0
mov eax, dword [ebx + 0x148]
test eax, eax
je 0x4139a8
mov ecx, dword [ebx + 0x14c]
lea edx, [esp + 0x14]
push edx
push 0
push ecx
call eax
add esp, 0xc
jmp 0x4139bd
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
push edx
push eax
push ecx
call dword [sym.imp.WS2_32.dll_socket]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x413bce
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0xa4]
push 0x80
lea eax, [esp + 0x2c]
push edx
push eax
push ecx
call fcn.004155f0
add esp, 0x10
test eax, eax
je 0x413a43
lea edx, [esp + 0xa4]
push edx
push str.__Trying__s...
push ebx
call fcn.00412fe0
lea eax, [esp + 0xb0]
lea edi, [ebx + 0x8580]
push eax
push 0x42fae8
push 0x2e
push edi
call fcn.00415400
mov ecx, dword [esp + 0x144]
xor eax, eax
add esp, 0x1c
lea edx, [ecx + 0x3c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov al, byte [ebx + 0x276]
test al, al
je 0x413a5e
mov ecx, dword [esp + 0x128]
push ebp
push ecx
call fcn.00413ef0
add esp, 8
push ebp
call fcn.004138f0
mov eax, dword [ebx + 0x140]
add esp, 4
test eax, eax
je 0x413a8c
mov edx, dword [ebx + 0x144]
push 0
push ebp
push edx
call eax
add esp, 0xc
mov dword [esp + 0x10], eax
test eax, eax
jne 0x413bc7
mov eax, dword [esp + 0x14]
mov edi, dword [esp + 0x128]
push eax
push ebp
push edi
call fcn.00413be0
add esp, 0xc
test eax, eax
jne 0x413bc7
push 1
push ebp
call fcn.00426c30
mov eax, dword [edi + 0x80]
add esp, 8
cmp eax, 1
jne 0x413b23
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x24]
push ecx
push edx
push ebp
call dword [sym.imp.WS2_32.dll_connect]
mov esi, eax
cmp esi, 0xffffffff
jne 0x413b73
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0xb
mov dword [esp + 0x10], eax
je 0x413b60
cmp eax, 0x2732
jle 0x413af9
cmp eax, 0x2734
jle 0x413b60
push eax
push edi
call fcn.00426750
push eax
lea eax, [esp + 0xb0]
push eax
push str.Failed_to_connect_to__s:__s
push ebx
call fcn.00413050
mov ecx, dword [esp + 0x28]
add esp, 0x18
mov dword [ebx + 0x8484], ecx
jmp 0x413b25
xor esi, esi
lea eax, [esp + 0x10]
push eax
push ebp
call fcn.00413880
add esp, 8
test esi, esi
jne 0x413b8e
test al, al
je 0x413ba3
mov ecx, dword [esp + 0x134]
push str.connected_n
push ebx
mov byte [ecx], 1
call fcn.00412fe0
add esp, 8
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x114
ret
mov edx, dword [esp + 0x130]
push edx
push ebp
call fcn.00413850
add esp, 8
mov esi, eax
cmp esi, 1
jne 0x413b25
cmp dword [ebx + 0x438], 2
jne 0x413b25
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x114
ret
cmp esi, 1
jne 0x413ba3
push str.Timeout_n
push ebx
call fcn.00412fe0
add esp, 8
jmp 0x413bc7
mov edx, dword [esp + 0x10]
mov dword [ebx + 0x8484], edx
mov eax, dword [esp + 0x10]
push eax
push edi
call fcn.00426750
push eax
push 0x4313cc
push ebx
call fcn.00412fe0
add esp, 0x14
push ebp
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x114
ret