Function at 0x18017f1e0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push rbp
push rbx
push rdi
push r12
push r13
push r14
mov rbp, rsp
sub rsp, 0x48
mov eax, dword [rcx + 0x48]
mov edx, 0x2111
mov rbx, rcx
xor r12d, r12d
mov edi, 1
or r14d, 0xffffffff
cmp eax, 0x2110
mov dword [rcx + 0x190], edi
lea r8d, [rdx + 1]
cmove eax, edx
mov r9d, edi
mov qword [rbp + 0x50], r12
mov dword [rcx + 0x48], eax
mov rax, qword [rcx + 8]
lea rcx, [rbp + 0x40]
mov qword [rsp + 0x28], rcx
mov rcx, rbx
mov dword [rsp + 0x20], 0x4000
call qword [rax + 0x60]
movsxd r13, eax
cmp dword [rbp + 0x40], r12d
jne 0x18017f259
mov eax, r13d
add rsp, 0x48
pop r14
pop r13
pop r12
pop rdi
pop rbx
pop rbp
ret
mov rcx, qword [rbx + 0x58]
mov dword [rbx + 0x190], r12d
mov qword [rsp + 0x40], rsi
mov qword [rbp + 0x48], rcx
movzx eax, byte [rcx + 1]
movzx edx, byte [rcx]
shl edx, 8
mov qword [rsp + 0x38], r15
mov r15, rcx
or edx, eax
mov eax, dword [rbx]
add rcx, 2
mov dword [rbx + 0x194], edx
mov qword [rbp + 0x48], rcx
cmp eax, 0xfeff
jne 0x18017f2ca
cmp edx, eax
jg 0x18017f2ce
xor r9d, r9d
xor r8d, r8d
mov rcx, rbx
lea edx, [r9 + 0x20]
call sym.VBoxRT.dll_SSL_ctrl
mov rdx, qword [rbp + 0x48]
bt eax, 0xd
jae 0x18017f30e
movzx eax, byte [rdx + 0x20]
cmp byte [rax + rdx + 0x21], r12b
jne 0x18017f30e
mov eax, edi
jmp 0x18017f803
cmp edx, eax
jge 0x18017f29c
mov edx, 0x8a
xor r9d, r9d
mov r8d, 0x10b
lea ecx, [rdx - 0x76]
mov dword [rsp + 0x20], r12d
call sym.VBoxRT.dll_ERR_put_error
mov r11d, dword [rbx + 0x194]
mov eax, r11d
and eax, 0xffffff00
cmp eax, 0x300
jne 0x18017f302
mov dword [rbx], r11d
mov dword [rbp + 0x38], 0x46
jmp 0x18017f706
mov rax, qword [rdx]
mov rcx, qword [rbx + 0x80]
mov qword [rcx + 0xb8], rax
mov rax, qword [rdx + 8]
mov qword [rcx + 0xc0], rax
mov rax, qword [rdx + 0x10]
mov qword [rcx + 0xc8], rax
mov rax, qword [rdx + 0x18]
mov qword [rcx + 0xd0], rax
mov rdx, qword [rbp + 0x48]
add rdx, 0x20
mov qword [rbp + 0x48], rdx
inc rdx
movzx esi, byte [rdx - 1]
mov qword [rbp + 0x48], rdx
mov dword [rbx + 0xa8], r12d
cmp dword [rbx + 0x3c], r12d
je 0x18017f370
test dword [rbx + 0x184], 0x10000
jne 0x18017f394
lea r9, [r15 + r13]
mov r8d, esi
mov rcx, rbx
call sym.VBoxRT.dll_ssl_get_prev_session
cmp eax, edi
jne 0x18017f38b
mov dword [rbx + 0xa8], edi
jmp 0x18017f3a6
cmp eax, 0xffffffff
je 0x18017f7f2
mov edx, edi
mov rcx, rbx
call sym.VBoxRT.dll_ssl_get_new_session
test eax, eax
je 0x18017f7f2
mov rcx, qword [rbp + 0x48]
mov eax, dword [rbx]
add rcx, rsi
mov qword [rbp + 0x48], rcx
cmp eax, 0xfeff
je 0x18017f3c5
cmp eax, 0x100
jne 0x18017f4ac
movzx edi, byte [rcx]
inc rcx
xor r9d, r9d
mov qword [rbp + 0x48], rcx
cmp edi, 0x100
jbe 0x18017f3f1
mov dword [rbp + 0x38], getservbyname
mov dword [rsp + 0x20], r12d
mov r8d, 0x134
jmp 0x18017f6f9
xor r8d, r8d
mov rcx, rbx
lea edx, [r8 + 0x20]
call sym.VBoxRT.dll_SSL_ctrl
bt eax, 0xd
jae 0x18017f4a1
test edi, edi
je 0x18017f4a1
mov rcx, qword [rbx + 0x88]
mov rdx, qword [rbp + 0x48]
mov r8, rdi
add rcx, 0x104
call sub.MSVCR100.dll_memcpy
mov r11, qword [rbx + 0x158]
mov rax, qword [r11 + 0xc0]
test rax, rax
je 0x18017f469
mov rdx, qword [rbx + 0x88]
mov r8d, edi
mov rcx, rbx
add rdx, 0x104
call rax
test eax, eax
jne 0x18017f49b
mov dword [rsp + 0x20], r12d
mov r8d, 0x134
jmp 0x18017f6ef
mov rcx, qword [rbx + 0x88]
mov r8d, dword [rcx + 0x204]
lea rdx, [rcx + 4]
add rcx, 0x104
call sub.MSVCR100.dll_memcmp
test eax, eax
je 0x18017f49b
mov dword [rsp + 0x20], r12d
mov r8d, 0x134
jmp 0x18017f6ef
mov r14d, 2
mov rcx, qword [rbp + 0x48]
add rcx, rdi
mov qword [rbp + 0x48], rcx
movzx edi, byte [rcx]
movzx eax, byte [rcx + 1]
add rcx, 2
shl edi, 8
mov qword [rbp + 0x48], rcx
or edi, eax
jne 0x18017f4dd
test esi, esi
je 0x18017f4dd
mov dword [rbp + 0x38], gethostbyname
mov dword [rsp + 0x20], r12d
mov r8d, 0xb7
jmp 0x18017f6f6
movsxd rsi, edi
lea r12, [r15 + r13]
lea rax, [rsi + rcx]
cmp rax, r12
jb 0x18017f507
mov dword [rbp + 0x38], getservbyname
mov dword [rsp + 0x20], 0
mov r8d, 0x9f
jmp 0x18017f6f6
test edi, edi
jle 0x18017f52a
mov rdx, rcx
lea r9, [rbp + 0x50]
mov r8d, edi
mov rcx, rbx
call sym.VBoxRT.dll_ssl_bytes_to_cipher_list
test rax, rax
je 0x18017f7f2
mov rcx, qword [rbp + 0x48]
add rcx, rsi
cmp dword [rbx + 0xa8], 0
mov qword [rbp + 0x48], rcx
je 0x18017f59d
test edi, edi
jle 0x18017f59d
mov rax, qword [rbx + 0x128]
xor edi, edi
mov rcx, qword [rax + 0xb8]
mov esi, dword [rcx + 0x10]
mov rcx, qword [rbp + 0x50]
call sym.VBoxRT.dll_sk_num
test eax, eax
jle 0x18017f57f
nop
mov rcx, qword [rbp + 0x50]
mov edx, edi
call sym.VBoxRT.dll_sk_value
cmp dword [rax + 0x10], esi
je 0x18017f599
mov rcx, qword [rbp + 0x50]
inc edi
call sym.VBoxRT.dll_sk_num
cmp edi, eax
jl 0x18017f560
mov dword [rbp + 0x38], gethostbyname
mov dword [rsp + 0x20], 0
mov r8d, 0xd7
jmp 0x18017f6f6
mov rcx, qword [rbp + 0x48]
movzx r9d, byte [rcx]
inc rcx
lea r10, [r9 + rcx]
mov qword [rbp + 0x48], rcx
cmp r10, r12
ja 0x18017f4ed
xor esi, esi
mov edx, esi
mov eax, esi
test r9d, r9d
jle 0x18017f5d0
cmp byte [rax + rcx], sil
je 0x18017f5d0
inc rax
inc edx
cmp rax, r9
jl 0x18017f5c0
mov qword [rbp + 0x48], r10
cmp edx, r9d
jl 0x18017f5ef
mov dword [rbp + 0x38], getservbyname
mov dword [rsp + 0x20], esi
mov r8d, 0xbb
jmp 0x18017f6f6
cmp dword [rbx], 0x300
jl 0x18017f625
lea rax, [rbp + 0x38]
lea rdx, [rbp + 0x48]
mov r9d, r13d
mov r8, r15
mov rcx, rbx
mov qword [rsp + 0x20], rax
call sym.VBoxRT.dll_ssl_parse_clienthello_tlsext
test eax, eax
jne 0x18017f625
mov dword [rsp + 0x20], esi
mov r8d, 0xdf
jmp 0x18017f6f6
mov rcx, rbx
call sym.VBoxRT.dll_ssl_check_clienthello_tlsext_early
test eax, eax
jg 0x18017f64e
mov edx, 0x8a
xor r9d, r9d
mov dword [rsp + 0x20], esi
lea ecx, [rdx - 0x76]
lea r8d, [rdx + 0x13]
call sym.VBoxRT.dll_ERR_put_error
jmp 0x18017f7f2
mov rax, qword [rbx + 0x80]
mov qword [rax + 0x400], rsi
mov rax, qword [rbx + 0x128]
cmp dword [rbx + 0xa8], esi
jne 0x18017f72f
mov dword [rax + 0xb0], esi
mov rax, qword [rbx + 0x128]
mov rcx, qword [rax + 0xc8]
test rcx, rcx
je 0x18017f68d
call sym.VBoxRT.dll_sk_free
mov rcx, qword [rbx + 0x128]
mov rax, qword [rbp + 0x50]
mov qword [rcx + 0xc8], rax
cmp qword [rbp + 0x50], rsi
jne 0x18017f6b8
mov dword [rbp + 0x38], gethostbyname
mov dword [rsp + 0x20], esi
mov r8d, 0xb6
jmp 0x18017f6f6
mov rcx, rbx
mov qword [rbp + 0x50], rsi
call sym.VBoxRT.dll_SSL_get_ciphers
mov rdx, qword [rbx + 0x128]
mov rcx, rbx
mov rdx, qword [rdx + 0xc8]
mov r8, rax
call sym.VBoxRT.dll_ssl3_choose_cipher
mov r11, rax
test rax, rax
jne 0x18017f71c
mov dword [rsp + 0x20], esi
mov r8d, 0xc1
mov dword [rbp + 0x38], 0x28
xor r9d, r9d
mov edx, 0x8a
lea ecx, [rdx - 0x76]
call sym.VBoxRT.dll_ERR_put_error
mov r8d, dword [rbp + 0x38]
mov edx, 2
mov rcx, rbx
call sym.VBoxRT.dll_ssl3_send_alert
jmp 0x18017f7f2
mov rax, qword [rbx + 0x80]
mov qword [rax + 0x3b0], r11
jmp 0x18017f7ce
test dword [rbx + 0x184], 0x40000000
mov rdi, rsi
je 0x18017f7b9
mov r12, qword [rax + 0xc8]
xor r13d, r13d
mov rcx, r12
call sym.VBoxRT.dll_sk_num
test eax, eax
jle 0x18017f7b0
mov edx, r13d
mov rcx, r12
call sym.VBoxRT.dll_sk_value
mov rcx, r12
test dword [rax + 0x14], 0x200000
cmovne rdi, rax
test byte [rax + 0x18], 2
cmovne rsi, rax
inc r13d
call sym.VBoxRT.dll_sk_num
cmp r13d, eax
jl 0x18017f754
test rdi, rdi
je 0x18017f799
mov rax, qword [rbx + 0x80]
xor esi, esi
mov qword [rax + 0x3b0], rdi
jmp 0x18017f7ce
test rsi, rsi
je 0x18017f7b0
mov rax, qword [rbx + 0x80]
mov qword [rax + 0x3b0], rsi
xor esi, esi
jmp 0x18017f7ce
mov rax, qword [rbx + 0x128]
xor esi, esi
mov rcx, qword [rbx + 0x80]
mov rax, qword [rax + 0xb8]
mov qword [rcx + 0x3b0], rax
cmp dword [rbx], 0x300
jl 0x18017f7e6
mov rcx, rbx
call sym.VBoxRT.dll_ssl_check_clienthello_tlsext_late
test eax, eax
jle 0x18017f631
test r14d, r14d
mov eax, 1
cmovs r14d, eax
mov rcx, qword [rbp + 0x50]
test rcx, rcx
je 0x18017f800
call sym.VBoxRT.dll_sk_free
mov eax, r14d
mov rsi, qword [rsp + 0x40]
mov r15, qword [rsp + 0x38]
add rsp, 0x48
pop r14
pop r13
pop r12
pop rdi
pop rbx
pop rbp
ret