Function at 0x140036a80
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 0x140036b68
mov esi, 1
test r8b, r8b
jne 0x140036b51
mov r8, qword [rdi + 0x98]
mov byte [r9], 0
mov esi, 7
cmp r8, 0xffffffffffffffff
je 0x140036c60
xor r9d, r9d
mov rdx, 0xffffffffffffffff
mov rcx, 0xffffffffffffffff
call sym.Curl_socket_check
test eax, eax
je 0x140036d30
cmp eax, 2
je 0x140036b70
mov rdx, qword [rbx + 0x18]
cmp byte [rdx + 0x3a2], 0
js 0x140036b70
test al, 4
jne 0x140036f10
test esi, esi
je 0x140036b6c
mov eax, dword [rdi + 0x14c]
mov esi, 7
test eax, eax
jne 0x140036d90
mov r13, qword [rdi + 0x98]
cmp r13, 0xffffffffffffffff
je 0x140036b4d
mov rbx, qword [rbx + 0x18]
test rbx, rbx
jne 0x140036e40
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 0x140036b51
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 0x140036ef0
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 0x140036b08
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 0x140036b6c
test byte [r12 + 0xa37], 0x10
je 0x140036b6c
mov rax, qword [r12 + 0x11e8]
test rax, rax
je 0x140036c38
mov ecx, dword [rax + 8]
test ecx, ecx
jle 0x140036b6c
mov rax, qword [rbx]
mov edx, dword [rax + 0xc]
test edx, edx
jle 0x140036b6c
lea r8, str.connected
mov rdx, rbx
mov rcx, r12
xor esi, esi
call sym.Curl_trc_cf_infof
jmp 0x140036b51
call sym.cf_socket_open
mov esi, eax
test eax, eax
jne 0x140036e30
test byte [rbx + 0x24], 1
jne 0x140036b68
mov rdx, qword [rbx + 0x18]
mov rax, qword [rbx + 0x10]
cmp byte [rdx + 0x3a2], 0
js 0x140036fa8
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 0x140036d10
test byte [r12 + 0xa37], 0x10
je 0x140036d10
mov rax, qword [r12 + 0x11e8]
test rax, rax
je 0x140036cdf
mov eax, dword [rax + 8]
test eax, eax
jle 0x140036d10
mov rax, qword [rbx]
mov r11d, dword [rax + 0xc]
test r11d, r11d
jle 0x140036d10
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 0x140036e60
mov r8, qword [rdi + 0x98]
jmp 0x140036ad0
test r12, r12
je 0x140036b6c
test byte [r12 + 0xa37], 0x10
je 0x140036b6c
mov rax, qword [r12 + 0x11e8]
test rax, rax
je 0x140036d62
mov r9d, dword [rax + 8]
test r9d, r9d
jle 0x140036b6c
mov rax, qword [rbx]
mov r8d, dword [rax + 0xc]
test r8d, r8d
jle 0x140036b6c
lea r8, str.not_connected_yet
mov rdx, rbx
mov rcx, r12
xor esi, esi
call sym.Curl_trc_cf_infof
jmp 0x140036b51
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 0x140036b1f
mov rax, qword [r12 + 0x11e8]
test rax, rax
je 0x140036dd7
mov eax, dword [rax + 8]
test eax, eax
jle 0x140036b1f
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 0x140036b1f
mov eax, dword [rdi + 0x14c]
jmp 0x140036b17
cmp qword [rbx + 0x18], 0
mov rdx, r13
mov rcx, r12
jne 0x140036f70
call sym.Curl_multi_closed
jmp 0x140036b39
cmp r14d, 0xb
je 0x140036b6c
lea eax, [r14 - 0x2733]
cmp eax, 1
jbe 0x140036b6c
test r12, r12
je 0x140036ece
movzx eax, byte [r12 + 0xa37]
test al, 0x10
je 0x140036ece
mov rax, qword [r12 + 0x11e8]
test rax, rax
je 0x140036ea2
mov r10d, dword [rax + 8]
test r10d, r10d
jle 0x140036ece
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 0x140036b17
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
sete dl
cmp eax, 0x2748
sete cl
or edx, ecx
jmp 0x140036bcf
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 0x140036fa0
mov dword [rdi + 0x14c], eax
mov esi, 7
jmp 0x140036b17
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 0x140036b42
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x140036f5e
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 0x140036ff9
movzx eax, byte [r12 + 0xa37]
test al, 0x10
jne 0x140036ff0
cmp r14d, 0xb
je 0x140036b6c
lea edx, [r14 - 0x2733]
cmp edx, 1
ja 0x140036e88
xor esi, esi
jmp 0x140036b51
or r13d, 0xffffffff
jmp 0x140036ccb
cmp r14d, 0xb
je 0x140036b6c
lea eax, [r14 - 0x2733]
cmp eax, 1
ja 0x140036ece
xor esi, esi
jmp 0x140036b51