Function at 0x18022d4f0
Capabilities:
Connect socket
Set socket configuration

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
mov rax, qword [rdx + 0x38]
xor r13d, r13d
or esi, 0xffffffff
test rax, rax
mov r12d, r13d
mov rdi, rdx
cmovne r12, rax
mov eax, dword [rdx]
mov rbp, rcx
dec eax
cmp eax, 7
ja case.default.0x18022d54d
lea r15, [0x180000000]
lea r14d, [rsi + 3]
nop
cdqe
mov ecx, dword [r15 + rax*4 + 0x22d9d0]
add rcx, r15
jmp rcx
mov rbx, qword [rdi + 8]
test rbx, rbx
je 0x18022d81b
cmp byte [rbx], r13b
je 0x18022d574
movzx eax, byte [rbx]
cmp al, 0x3a
je 0x18022d574
cmp al, 0x2f
je 0x18022d574
inc rbx
cmp byte [rbx], r13b
jne 0x18022d561
movsx eax, byte [rbx]
mov dword [rsp + 0x68], eax
cmp eax, 0x3a
je 0x18022d585
cmp eax, 0x2f
jne 0x18022d5cd
mov byte [rbx], r13b
cmp dword [rsp + 0x68], 0x3a
jne 0x18022d5cd
lea rax, [rbx + 1]
cmp byte [rbx + 1], r13b
je 0x18022d5b2
nop dword [rax]
cmp byte [rax], 0x2f
je 0x18022d5af
inc rax
cmp byte [rax], r13b
jne 0x18022d5a0
jmp 0x18022d5b2
mov byte [rax], r13b
mov rcx, qword [rdi + 0x10]
test rcx, rcx
je 0x18022d5c0
call sym.VBoxRT.dll_CRYPTO_free
lea rcx, [rbx + 1]
call sym.VBoxRT.dll_BUF_strdup
mov qword [rdi + 0x10], rax
cmp qword [rdi + 0x10], r13
je 0x18022d7eb
mov dword [rdi], r14d
jmp 0x18022d7bf
mov rcx, qword [rdi + 8]
lea rdx, [rdi + 0x1c]
call sym.VBoxRT.dll_BIO_get_host_ip
test eax, eax
jle case.default.0x18022d54d
mov dword [rdi], 3
jmp 0x18022d7bf
mov rcx, qword [rdi + 0x10]
test rcx, rcx
je case.default.0x18022d54d
lea rdx, [rdi + 0x20]
call sym.VBoxRT.dll_BIO_get_port
test eax, eax
jle case.default.0x18022d54d
mov dword [rdi], 4
jmp 0x18022d7bf
xor eax, eax
mov qword [rdi + 0x24], rax
mov qword [rdi + 0x2c], rax
movzx ecx, word [rdi + 0x20]
mov word [rdi + 0x24], r14w
call sub.WS2_32.dll_htons
movzx ecx, byte [rdi + 0x1c]
shl ecx, 8
mov word [rdi + 0x26], ax
movzx eax, byte [rdi + 0x1d]
or ecx, eax
movzx eax, byte [rdi + 0x1e]
shl ecx, 8
or ecx, eax
movzx eax, byte [rdi + 0x1f]
shl ecx, 8
or ecx, eax
call sub.WS2_32.dll_htonl
mov edx, 1
mov ecx, r14d
lea r8d, [rdx + 5]
mov dword [rdi + 0x28], eax
mov dword [rdi], 4
call sub.WS2_32.dll_socket
mov rsi, rax
cmp eax, 0xffffffff
je 0x18022d838
mov dword [rbp + 0x28], eax
mov dword [rdi], 8
jmp 0x18022d7bf
cmp dword [rdi + 0x18], r13d
je 0x18022d6b7
mov ecx, dword [rbp + 0x28]
mov edx, 1
call sym.VBoxRT.dll_BIO_socket_nbio
test eax, eax
je 0x18022d896
mov dword [rdi], 5
movsxd rcx, dword [rbp + 0x28]
lea r9, [rsp + 0x68]
mov edx, 0xffff
mov r8d, 8
mov dword [rsp + 0x68], 1
mov dword [rsp + 0x20], 4
call sub.WS2_32.dll_setsockopt
mov dword [rsp + 0x68], eax
test eax, eax
jns 0x18022d7bf
call sub.WS2_32.dll_WSAGetLastError
xor r9d, r9d
mov ecx, r14d
lea edx, [r9 + 4]
mov r8d, eax
mov dword [rsp + 0x20], r13d
call sym.VBoxRT.dll_ERR_put_error
mov r11, qword [rdi + 0x10]
mov r8, qword [rdi + 8]
lea r9, [0x180262910]
lea rdx, str.host
mov ecx, 4
mov qword [rsp + 0x20], r11
call sym.VBoxRT.dll_ERR_add_error_data
xor r9d, r9d
lea edx, [r9 + 0x73]
lea r8d, [r9 + 0x6d]
mov dword [rsp + 0x20], r13d
lea ecx, [rdx - 0x53]
call sym.VBoxRT.dll_ERR_put_error
jmp case.default.0x18022d54d
mov edx, reloc.WS2_32.dll_ntohs
mov rcx, rbp
call sym.VBoxRT.dll_BIO_clear_flags
movsxd rcx, dword [rbp + 0x28]
lea rdx, [rdi + 0x24]
mov r8d, reloc.WS2_32.dll_recv
call sub.WS2_32.dll_connect
mov dword [rbp + 0x24], r13d
mov esi, eax
test eax, eax
jns 0x18022d7b9
mov ecx, eax
call sym.VBoxRT.dll_BIO_sock_should_retry
test eax, eax
je 0x18022d8d8
mov edx, ntohl
mov rcx, rbp
call sym.VBoxRT.dll_BIO_set_flags
mov dword [rdi], 7
mov dword [rbp + 0x24], r14d
jmp case.default.0x18022d54d
mov ecx, dword [rbp + 0x28]
call sym.VBoxRT.dll_BIO_sock_error
mov dword [rsp + 0x68], eax
test eax, eax
jne 0x18022d932
mov dword [rdi], 6
test r12, r12
je 0x18022d7d9
mov edx, dword [rdi]
mov r8d, esi
mov rcx, rbp
call r12
mov esi, eax
test eax, eax
je 0x18022d9b2
mov eax, dword [rdi]
dec eax
cmp eax, 7
jbe 0x18022d540
jmp case.default.0x18022d54d
xor r9d, r9d
mov dword [rsp + 0x20], r13d
lea edx, [r9 + 0x73]
lea r8d, [r9 + 0x72]
lea ecx, [rdx - 0x53]
call sym.VBoxRT.dll_ERR_put_error
mov r8, qword [rdi + 8]
lea rdx, str.host
mov ecx, r14d
call sym.VBoxRT.dll_ERR_add_error_data
jmp case.default.0x18022d54d
xor r9d, r9d
mov dword [rsp + 0x20], r13d
lea edx, [r9 + 0x73]
lea r8d, [r9 + 0x70]
lea ecx, [rdx - 0x53]
call sym.VBoxRT.dll_ERR_put_error
jmp case.default.0x18022d54d
call sub.WS2_32.dll_WSAGetLastError
xor r9d, r9d
mov ecx, r14d
lea edx, [r9 + 4]
mov r8d, eax
mov dword [rsp + 0x20], r13d
call sym.VBoxRT.dll_ERR_put_error
mov r11, qword [rdi + 0x10]
mov r8, qword [rdi + 8]
lea r9, [0x180262910]
lea rdx, str.host
mov ecx, 4
mov qword [rsp + 0x20], r11
call sym.VBoxRT.dll_ERR_add_error_data
xor r9d, r9d
lea edx, [r9 + 0x73]
lea r8d, [r9 + 0x76]
mov dword [rsp + 0x20], r13d
lea ecx, [rdx - 0x53]
call sym.VBoxRT.dll_ERR_put_error
jmp case.default.0x18022d54d
xor r9d, r9d
mov dword [rsp + 0x20], r13d
lea edx, [r9 + 0x73]
lea r8d, [r9 + 0x68]
lea ecx, [rdx - 0x53]
call sym.VBoxRT.dll_ERR_put_error
mov r11, qword [rdi + 0x10]
mov r8, qword [rdi + 8]
lea r9, [0x180262910]
lea rdx, str.host
mov ecx, 4
mov qword [rsp + 0x20], r11
call sym.VBoxRT.dll_ERR_add_error_data
jmp case.default.0x18022d54d
call sub.WS2_32.dll_WSAGetLastError
xor r9d, r9d
mov edx, r14d
mov ecx, r14d
mov r8d, eax
mov dword [rsp + 0x20], r13d
call sym.VBoxRT.dll_ERR_put_error
mov r11, qword [rdi + 0x10]
mov r8, qword [rdi + 8]
lea r9, [0x180262910]
lea rdx, str.host
mov ecx, 4
mov qword [rsp + 0x20], r11
call sym.VBoxRT.dll_ERR_add_error_data
xor r9d, r9d
lea edx, [r9 + 0x73]
lea r8d, [r9 + 0x67]
mov dword [rsp + 0x20], r13d
lea ecx, [rdx - 0x53]
call sym.VBoxRT.dll_ERR_put_error
jmp case.default.0x18022d54d
mov edx, reloc.WS2_32.dll_ntohs
mov rcx, rbp
call sym.VBoxRT.dll_BIO_clear_flags
mov r8d, dword [rsp + 0x68]
xor r9d, r9d
mov edx, r14d
mov ecx, r14d
mov dword [rsp + 0x20], r13d
call sym.VBoxRT.dll_ERR_put_error
mov r11, qword [rdi + 0x10]
mov r8, qword [rdi + 8]
lea r9, [0x180262910]
lea rdx, str.host
mov ecx, 4
mov qword [rsp + 0x20], r11
call sym.VBoxRT.dll_ERR_add_error_data
xor r9d, r9d
lea edx, [r9 + 0x73]
lea r8d, [r9 + 0x6e]
mov dword [rsp + 0x20], r13d
lea ecx, [rdx - 0x53]
call sym.VBoxRT.dll_ERR_put_error
mov esi, r13d
jmp case.default.0x18022d54d
mov esi, 1
test r12, r12
je 0x18022d9b0
mov edx, dword [rdi]
mov r8d, esi
mov rcx, rbp
call r12
jmp 0x18022d9b2
mov eax, esi
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
ret