Function at 0x412ba0
Capabilities:
Connect socket

Disassembly:
sub esp, 0xa8
mov eax, dword [0x44e330]
xor eax, esp
mov dword [esp + 0xa4], eax
mov eax, dword [esp + 0xb0]
push ebp
mov ebp, dword [esp + 0xb0]
push esi
mov esi, dword [ebp]
mov dword [ecx], 0xffffffff
mov dword [esp + 0x14], ecx
mov ecx, dword [eax + 4]
mov dword [esp + 0x1c], ecx
mov ecx, dword [eax + 0xc]
push edi
mov edi, edx
mov edx, dword [ebp + 0x70]
mov dword [esp + 0x28], ecx
mov ecx, dword [eax + 0x10]
mov dword [esp + 0x1c], edi
mov dword [esp + 0xc], esi
mov dword [esp + 0x24], edx
mov dword [esp + 0x2c], ecx
cmp ecx, 0x80
jbe 0x412c09
mov ecx, 0x80
mov dword [esp + 0x2c], ecx
mov edx, dword [eax + 0x18]
push ecx
push edx
lea eax, [esp + 0x38]
push eax
call fcn.0042faa0
mov dword [edi], 0
mov eax, dword [esi + 0x174]
add esp, 0xc
test eax, eax
je 0x412c40
mov edx, dword [esi + 0x178]
lea ecx, [esp + 0x20]
push ecx
push 0
push edx
call eax
add esp, 0xc
jmp 0x412c55
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
push eax
push ecx
push edx
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esp + 0x10], eax
cmp eax, 0xffffffff
jne 0x412c78
pop edi
pop esi
xor eax, eax
pop ebp
mov ecx, dword [esp + 0xa4]
xor ecx, esp
call fcn.0042e618
add esp, 0xa8
ret
push ebx
lea edi, [ebp + 0x9a]
lea ebx, [ebp + 0xc8]
lea esi, [esp + 0x34]
call fcn.00412930
test eax, eax
jne 0x412cbf
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push ebp
call fcn.004297a0
push eax
mov eax, dword [esp + 0x1c]
push esi
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
push eax
call fcn.00411fa0
mov ecx, dword [esp + 0x2c]
add esp, 0x18
push ecx
jmp 0x412e8a
mov ebx, dword [esp + 0x10]
lea eax, [ebp + 0x3c]
mov esi, edi
mov edi, eax
mov ecx, 0xb
rep movsd dword es:[edi], dword [esi]
push eax
push str.__Trying__s...
push ebx
movsw word es:[edi], word [esi]
call fcn.00411f10
push ebp
call fcn.004128d0
mov esi, dword [esp + 0x24]
add esp, 0x10
cmp dword [ebx + 0x308], 0
je 0x412cfe
mov edx, esi
mov edi, ebp
call fcn.00412ad0
push esi
call fcn.00412b30
mov eax, dword [ebx + 0x16c]
add esp, 4
test eax, eax
je 0x412d2e
mov edx, dword [ebx + 0x170]
push 0
push esi
push edx
call eax
add esp, 0xc
mov dword [esp + 0x18], eax
test eax, eax
je 0x412d2e
push esi
jmp 0x412e8a
mov eax, dword [esp + 0x24]
push eax
push esi
mov ebx, ebp
call fcn.00412510
mov edi, eax
add esp, 8
test edi, edi
je 0x412d52
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, edi
jmp 0x412e92
push 1
push esi
call fcn.0042a150
add esp, 8
cmp dword [ebp + 0x70], 1
jne 0x412dc6
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
cmp edi, 0xffffffff
jne 0x412df2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
mov dword [esp + 0x18], ebx
cmp ebx, 0xb
je 0x412dca
cmp ebx, 0x2732
jle 0x412d9c
cmp ebx, 0x2734
jle 0x412dca
push ebx
push ebp
call fcn.004297a0
push eax
lea eax, [ebp + 0x3c]
push eax
mov eax, dword [esp + 0x20]
push str.Failed_to_connect_to__s:__s
push eax
call fcn.00411fa0
mov ecx, dword [esp + 0x28]
add esp, 0x18
mov dword [ecx + 0x855c], ebx
jmp 0x412e04
xor edi, edi
jmp 0x412e04
mov eax, dword [esp + 0xc4]
push ebp
mov edi, esi
call fcn.004124a0
mov edi, eax
add esp, 4
cmp edi, 3
jne 0x412df2
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
lea eax, [edi + 0x27]
jmp 0x412e92
cmp edi, 1
jne 0x412e04
mov edx, dword [esp + 0x10]
cmp dword [edx + 0x510], 2
je 0x412e40
push esi
lea esi, [esp + 0x1c]
call fcn.00412860
add esp, 4
test edi, edi
jne 0x412e48
test eax, eax
je 0x412e61
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x20]
push str.connected_n
push edx
mov dword [ecx], 1
call fcn.00411f10
mov esi, dword [esp + 0x1c]
push esi
push ebp
call fcn.00412970
add esp, 0x10
mov eax, dword [esp + 0x1c]
mov dword [eax], esi
jmp 0x412e90
cmp edi, 1
jne 0x412e61
mov ecx, dword [esp + 0x10]
push str.Timeout_n
push ecx
call fcn.00411f10
add esp, 8
jmp 0x412e85
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x10]
push eax
push ebp
mov dword [esi + 0x855c], eax
call fcn.004297a0
push eax
push 0x444744
push esi
call fcn.00411f10
add esp, 0x14
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
mov ecx, dword [esp + 0xb4]
pop ebx
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.0042e618
add esp, 0xa8
ret