Function at 0x140036f50
Capabilities:
Connect socket

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x160
mov rdi, qword [rcx + 0x10]
mov rbx, rcx
mov r12, rdx
mov rbp, r9
test byte [rcx + 0x24], 1
jne 0x140037038
mov esi, 1
test r8b, r8b
jne 0x140037021
mov r8, qword [rdi + 0x98]
mov byte [r9], 0
mov esi, 7
cmp r8, 0xffffffffffffffff
je 0x140037130
xor r9d, r9d
mov rdx, 0xffffffffffffffff
mov rcx, 0xffffffffffffffff
call sym.Curl_socket_check
test eax, eax
je 0x140037200
cmp eax, 2
je 0x140037040
mov rdx, qword [rbx + 0x18]
cmp byte [rdx + 0x3a2], 0
js 0x140037040
test al, 4
jne 0x1400373e0
test esi, esi
je 0x14003703c
mov eax, dword [rdi + 0x14c]
mov esi, 7
test eax, eax
jne 0x140037260
mov r13, qword [rdi + 0x98]
cmp r13, 0xffffffffffffffff
je 0x14003701d
mov rbx, qword [rbx + 0x18]
test rbx, rbx
jne 0x140037310
mov rcx, r13
call qword [sym.imp.WS2_32.dll_closesocket]
mov qword [rdi + 0x98], 0xffffffffffffffff
mov byte [rbp], 0
mov eax, esi
add rsp, 0x160
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
mov byte [rbp], 1
xor esi, esi
jmp 0x140037021
mov r13, qword [rdi + 0x98]
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x5c], 0
mov dword [rsp + 0x60], 4
call qword [sym.imp.KERNEL32.dll_SleepEx]
lea rax, [rsp + 0x60]
lea r9, [rsp + 0x5c]
mov rcx, r13
mov qword [rsp + 0x20], rax
mov r8d, 0x1007
mov edx, 0xffff
call qword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x1400373c0
mov eax, dword [rsp + 0x5c]
cmp eax, 0x2748
sete dl
test eax, eax
sete cl
or edx, ecx
mov dword [rdi + 0x14c], eax
test dl, dl
je 0x140036fd8
lea rcx, [rsp + 0x40]
call sym.Curl_now
movdqu xmm0, xmmword [rsp + 0x40]
mov rcx, qword [rbx + 0x10]
mov rdx, r12
movups xmmword [rdi + 0x118], xmm0
call sym.set_local_ip.isra.0
mov byte [rbp], 1
or byte [rbx + 0x24], 1
test r12, r12
je 0x14003703c
test byte [r12 + 0xa37], 0x10
je 0x14003703c
mov rax, qword [r12 + 0x11e8]
test rax, rax
je 0x140037108
mov ecx, dword [rax + 8]
test ecx, ecx
jle 0x14003703c
mov rax, qword [rbx]
mov edx, dword [rax + 0xc]
test edx, edx
jle 0x14003703c
lea r8, str.connected
mov rdx, rbx
mov rcx, r12
xor esi, esi
call sym.Curl_trc_cf_infof
jmp 0x140037021
call sym.cf_socket_open
mov esi, eax
test eax, eax
jne 0x140037300
test byte [rbx + 0x24], 1
jne 0x140037038
mov rdx, qword [rbx + 0x18]
mov rax, qword [rbx + 0x10]
cmp byte [rdx + 0x3a2], 0
js 0x140037478
mov rcx, qword [rax + 0x98]
lea rdx, [rax + 0x18]
mov r8d, dword [rax + 0x14]
call qword [sym.imp.WS2_32.dll_connect]
mov r13d, eax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, qword [rbx + 0x10]
mov rdx, r12
mov r14d, eax
call sym.set_local_ip.isra.0
test r12, r12
je 0x1400371e0
test byte [r12 + 0xa37], 0x10
je 0x1400371e0
mov rax, qword [r12 + 0x11e8]
test rax, rax
je 0x1400371af
mov eax, dword [rax + 8]
test eax, eax
jle 0x1400371e0
mov rax, qword [rbx]
mov r11d, dword [rax + 0xc]
test r11d, r11d
jle 0x1400371e0
mov eax, dword [rdi + 0x100]
lea r9, [rdi + 0xce]
mov rdx, rbx
mov rcx, r12
lea r8, str.local_address__s_port__d...
mov dword [rsp + 0x20], eax
call sym.Curl_trc_cf_infof
nop
cmp r13d, 0xffffffff
je 0x140037330
mov r8, qword [rdi + 0x98]
jmp 0x140036fa0
test r12, r12
je 0x14003703c
test byte [r12 + 0xa37], 0x10
je 0x14003703c
mov rax, qword [r12 + 0x11e8]
test rax, rax
je 0x140037232
mov r9d, dword [rax + 8]
test r9d, r9d
jle 0x14003703c
mov rax, qword [rbx]
mov r8d, dword [rax + 0xc]
test r8d, r8d
jle 0x14003703c
lea r8, str.not_connected_yet
mov rdx, rbx
mov rcx, r12
xor esi, esi
call sym.Curl_trc_cf_infof
jmp 0x140037021
mov rcx, qword [rbx + 0x10]
mov rdx, r12
call sym.set_local_ip.isra.0
mov ecx, dword [rdi + 0x14c]
mov dword [r12 + 0xc64], ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
test byte [r12 + 0xa37], 0x10
je 0x140036fef
mov rax, qword [r12 + 0x11e8]
test rax, rax
je 0x1400372a7
mov eax, dword [rax + 8]
test eax, eax
jle 0x140036fef
mov ecx, dword [rdi + 0x14c]
lea rdx, [rsp + 0x60]
mov r8d, 0x100
call sym.Curl_strerror
mov r9d, dword [rdi + 0xfc]
lea r8, [rdi + 0xa0]
mov rcx, r12
mov qword [rsp + 0x30], rax
mov eax, dword [rdi + 0x100]
lea rdx, str.connect_to__s_port__u_from__s_port__d_failed:__s
mov dword [rsp + 0x28], eax
lea rax, [rdi + 0xce]
mov qword [rsp + 0x20], rax
call sym.Curl_infof
jmp 0x140036fef
mov eax, dword [rdi + 0x14c]
jmp 0x140036fe7
cmp qword [rbx + 0x18], 0
mov rdx, r13
mov rcx, r12
jne 0x140037440
call sym.Curl_multi_closed
jmp 0x140037009
cmp r14d, 0xb
je 0x14003703c
lea eax, [r14 - 0x2733]
cmp eax, 1
jbe 0x14003703c
test r12, r12
je 0x14003739e
movzx eax, byte [r12 + 0xa37]
test al, 0x10
je 0x14003739e
mov rax, qword [r12 + 0x11e8]
test rax, rax
je 0x140037372
mov r10d, dword [rax + 8]
test r10d, r10d
jle 0x14003739e
lea rdx, [rsp + 0x60]
mov r8d, 0x100
mov ecx, r14d
call sym.Curl_strerror
lea r8, [rdi + 0xa0]
lea rdx, str.Immediate_connect_fail_for__s:__s
mov rcx, r12
mov r9, rax
call sym.Curl_infof
mov dword [r12 + 0xc64], r14d
mov eax, dword [rdi + 0x14c]
mov esi, 7
jmp 0x140036fe7
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
sete dl
cmp eax, 0x2748
sete cl
or edx, ecx
jmp 0x14003709f
mov rsi, qword [rdi + 0x98]
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x5c], 0
mov dword [rsp + 0x60], 4
call qword [sym.imp.KERNEL32.dll_SleepEx]
lea rax, [rsp + 0x60]
mov edx, 0xffff
lea r9, [rsp + 0x5c]
mov qword [rsp + 0x20], rax
mov r8d, 0x1007
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_getsockopt]
mov edx, eax
mov eax, dword [rsp + 0x5c]
test edx, edx
jne 0x140037470
mov dword [rdi + 0x14c], eax
mov esi, 7
jmp 0x140036fe7
call sym.Curl_multi_closed
mov rcx, r12
mov edx, 1
call sym.Curl_set_in_callback
mov rcx, qword [rbx + 0x20]
mov rdx, r13
call qword [rbx + 0x18]
xor edx, edx
mov rcx, r12
call sym.Curl_set_in_callback
jmp 0x140037012
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x14003742e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, qword [rbx + 0x10]
mov rdx, r12
mov r14d, eax
call sym.set_local_ip.isra.0
test r12, r12
je 0x1400374c9
movzx eax, byte [r12 + 0xa37]
test al, 0x10
jne 0x1400374c0
cmp r14d, 0xb
je 0x14003703c
lea edx, [r14 - 0x2733]
cmp edx, 1
ja 0x140037358
xor esi, esi
jmp 0x140037021
or r13d, 0xffffffff
jmp 0x14003719b
cmp r14d, 0xb
je 0x14003703c
lea eax, [r14 - 0x2733]
cmp eax, 1
ja 0x14003739e
xor esi, esi
jmp 0x140037021