Function at 0x410910
Capabilities:
Connect socket
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x229c
call fcn.00445a80
mov eax, dword [0x4635a0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x2290], 0x80
mov eax, dword [esi + 0xc]
cmp eax, 0xffffffff
jne 0x41096c
cmp dword [0x463c14], 0
je 0x410957
push str.No_port_number_in_CONNECT_URI._n
call fcn.004011ea
add esp, 4
pop esi
mov eax, 0x190
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0044590e
mov esp, ebp
pop ebp
ret
cmp dword [0x463c18], 1
jle 0x410986
push eax
push dword [esi + 8]
push str.CONNECT_to__s:_d._n
call fcn.004011ea
add esp, 0xc
push dword [0x463c20]
lea eax, [ebp - 0x2290]
push eax
lea eax, [ebp - 0x2084]
push eax
movzx eax, word [esi + 0xc]
push eax
push dword [esi + 8]
call fcn.00401299
add esp, 0x14
test eax, eax
je 0x410a00
cmp dword [0x463c18], 0
je 0x4109eb
push 0
push 0x400
push 0x464410
push 0x400
push eax
push 0
push 0x12ff
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push 0x464410
push dword [esi + 8]
push str.Cant_resolve_name___s_:__s._n
call fcn.004011ea
add esp, 0xc
pop esi
mov eax, 0x1f8
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0044590e
mov esp, ebp
pop ebp
ret
movzx eax, word [ebp - 0x2084]
push edi
push 6
push 1
push eax
call fcn.00401005
add esp, 0xc
mov edi, eax
lea eax, [ebp - 0x2084]
mov dword [ebp - 0x2298], edi
push dword [ebp - 0x2290]
push eax
push edi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x410a78
cmp dword [0x463c18], 0
je 0x410a59
lea eax, [ebp - 0x2084]
push eax
call fcn.0040100a
push eax
push str.Cant_connect_to__s._n
call fcn.004011ea
add esp, 0xc
push edi
call fcn.004011c2
add esp, 4
mov eax, 0x1f8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0044590e
mov esp, ebp
pop ebp
ret
push 0xc8
call fcn.00411070
push eax
push ebx
call fcn.00411c00
lea eax, [ebp - 0x2294]
push eax
push ebx
call fcn.0040118b
add esp, 0x14
push 0
push dword [ebp - 0x2294]
push eax
push edi
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x410af4
cmp dword [0x463c18], 0
je 0x410ad8
call dword [sym.imp.MSVCR120.dll__errno]
push dword [eax]
call dword [sym.imp.MSVCR120.dll_strerror]
push eax
push dword [ebp - 0x2294]
push str.Error_sending__lu_leftover_bytes:__s._n
call fcn.004011ea
add esp, 0x10
push edi
call fcn.004011c2
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0044590e
mov esp, ebp
pop ebp
ret
mov eax, dword [ebx]
mov ecx, eax
cmp eax, edi
mov dword [ebp - 0x2184], eax
mov dword [ebp - 0x2188], 1
cmovl ecx, edi
xor eax, eax
mov dword [ebp - 0x229c], ecx
cmp dword [ebp + eax*4 - 0x2184], edi
je 0x410b24
inc eax
cmp eax, 1
jb 0x410b15
cmp eax, 1
jne 0x410b39
mov dword [ebp - 0x2180], edi
mov dword [ebp - 0x2188], 2
call dword [sym.imp.MSVCR120.dll__errno]
mov dword [eax], 0
call sub.WS2_32.dll_WSAGetLastError
test eax, eax
je 0x410b5e
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2714
jne 0x410c96
push 0
push 0
push 0
lea eax, [ebp - 0x228c]
mov ecx, 0x41
push eax
mov eax, dword [ebp - 0x229c]
lea esi, [ebp - 0x2188]
inc eax
lea edi, [ebp - 0x228c]
rep movsd dword es:[edi], dword [esi]
push eax
call fcn.0041f280
lea eax, [ebp - 0x2004]
push 0x2000
push eax
call fcn.004011b3
add esp, 0x1c
lea eax, [ebp - 0x228c]
push eax
push dword [ebx]
call sub.WS2_32.dll___WSAFDIsSet
mov edi, dword [ebp - 0x2298]
test eax, eax
je 0x410c26
jmp 0x410bc0
push 0x2000
lea eax, [ebp - 0x2004]
push eax
push ebx
call fcn.004010f5
mov esi, eax
add esp, 0xc
cmp esi, 0xffffffff
jne 0x410bed
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2714
je 0x410bc0
jmp 0x410c96
test esi, esi
jle 0x410c96
push 0
push esi
lea eax, [ebp - 0x2004]
push eax
push edi
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x410c19
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2714
je 0x410bf5
jmp 0x410c96
push ebx
call fcn.004012b7
add esp, 4
test eax, eax
jne 0x410bc0
lea eax, [ebp - 0x228c]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x410b45
jmp 0x410c40
push 0
push 0x2000
lea eax, [ebp - 0x2004]
push eax
push edi
call dword [sym.imp.WS2_32.dll_recv]
mov esi, eax
cmp esi, 0xffffffff
jne 0x410c6a
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2714
je 0x410c40
jmp 0x410c96
test esi, esi
jle 0x410c96
mov edi, edi
push esi
lea eax, [ebp - 0x2004]
push eax
push ebx
call fcn.004011d1
add esp, 0xc
cmp eax, 0xffffffff
jne 0x410b45
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2714
je 0x410c70
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0044590e
mov esp, ebp
pop ebp
ret