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

Disassembly:
mov qword [rsp + 0x18], r8
push rbp
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x68
mov rax, qword [rcx]
lea r14, [rcx + 0x18]
mov rbp, qword [r14]
mov r13, r9
mov rdi, rdx
mov r12, rcx
mov r10d, dword [rax + 8]
and r10d, 0xa
cmp r10b, 0xa
jne 0x14001619d
add rbp, 0x338
jmp 0x1400161a4
add rbp, 0x2c8
cmp qword [rdx + 0xca8], 0
mov r15, qword [rsp + 0xc0]
mov qword [rsp + 0xb8], rbx
mov qword [rsp + 0x60], rsi
mov qword [rsp + 0x48], 0
mov dword [rsp + 0xa8], reloc.WLDAP32.dll_Ordinal_27
je 0x14001652c
lea rax, [rsp + 0x40]
lea r9, [rsp + 0xa0]
mov qword [rsp + 0x20], rax
call fcn.140015a40
test al, al
jne 0x140016298
mov rsi, qword [rsp + 0xa0]
cmp qword [rsp + 0x40], r15
jne 0x14001622d
cmp rsi, r13
je 0x14001652c
test r15, r15
je 0x14001622d
mov r8, r15
mov rdx, r13
mov rcx, rsi
call sub.VCRUNTIME140.dll_memcmp
test eax, eax
je 0x14001652c
mov rdx, qword [rdi + 0x6c0]
xor eax, eax
test rdx, rdx
je 0x140016298
mov rbx, qword [rdi + 0xca8]
mov rcx, qword [rbx + 0x18]
cmp rcx, rsi
je 0x14001625c
inc rax
add rbx, 0xb0
cmp rax, rdx
jb 0x140016242
jmp 0x140016298
test rcx, rcx
je 0x140016298
mov rdx, qword [rbx + 0x20]
call qword [rbx + Ordinal_41]
xor esi, esi
lea rcx, [rbx + 0x40]
mov qword [rbx + 0x18], rsi
mov qword [rbx + 0x28], rsi
mov dword [rbx + 0x30], esi
call fcn.140014bc0
mov rcx, qword [rbx]
call qword [fcn.1400675f0]
mov rcx, qword [rbx + 8]
mov qword [rbx], rsi
call qword [fcn.1400675f0]
mov qword [rbx + 8], rsi
mov rbx, qword [rdi + 0xca8]
mov rcx, qword [rsp + 0xb0]
mov esi, dword [rbx + 0x30]
mov rcx, qword [rcx]
call qword [case.0x140017ad0.1]
mov qword [rsp + 0x40], rax
test rax, rax
je 0x1400163fa
mov rcx, qword [r14]
cmp byte [rcx + 0x3b1], 0
je 0x1400162e8
mov rcx, qword [rcx + 0x88]
call qword [case.0x140017ad0.1]
mov qword [rsp + 0x48], rax
test rax, rax
je 0x1400163f5
mov rcx, qword [r14]
cmp byte [rcx + 0x3b2], 0
je 0x140016303
mov ecx, dword [rcx + 0x7c8]
mov dword [rsp + 0xa0], ecx
jmp 0x14001630e
mov dword [rsp + 0xa0], 0xffffffff
mov rax, qword [rdi + 0xf8]
test rax, rax
je 0x140016327
test byte [rax + 4], 0x10
lea r14, [rax + 0x108]
jne 0x14001632e
lea r14, [rdi + 0xcb0]
mov r9, qword [rdi + 0x6c0]
mov edx, 1
cmp rdx, r9
jae 0x14001637f
mov rcx, qword [rdi + 0xca8]
add rcx, 0xe0
nop dword [rax]
cmp qword [rcx - 0x18], 0
mov r8, rbx
je 0x14001637c
mov eax, dword [rcx]
lea rbx, [rcx - 0x30]
cmp eax, esi
cmovge rbx, r8
inc rdx
add rcx, 0xb0
cmp eax, esi
cmovge eax, esi
mov esi, eax
cmp rdx, r9
jb 0x140016350
cmp rdx, r9
jne 0x1400163c3
mov rcx, qword [rbx + 0x18]
test rcx, rcx
je 0x1400163d1
mov rdx, qword [rbx + 0x20]
call qword [rbx + Ordinal_41]
xor esi, esi
lea rcx, [rbx + 0x40]
mov qword [rbx + 0x18], rsi
mov qword [rbx + 0x28], rsi
mov dword [rbx + 0x30], esi
call fcn.140014bc0
mov rcx, qword [rbx]
call qword [fcn.1400675f0]
mov rcx, qword [rbx + 8]
mov qword [rbx], rsi
call qword [fcn.1400675f0]
mov qword [rbx + 8], rsi
jmp 0x1400163d1
imul rbx, rdx, 0xb0
add rbx, qword [rdi + 0xca8]
lea rdx, [rbx + 0x40]
mov rcx, rbp
call fcn.140016660
test al, al
jne 0x140016478
lea rcx, [rbx + 0x40]
call fcn.140014bc0
xor r8d, r8d
mov qword [rbx + 0x18], r8
mov rax, qword [rsp + 0x40]
mov rbp, qword [rsp + 0xc8]
mov rcx, rax
call qword [fcn.1400675f0]
mov rcx, qword [rsp + 0x48]
call qword [fcn.1400675f0]
mov rax, qword [r12]
lea r11, str.PROXY
mov esi, dword [rbx + 0x34]
lea rcx, str.server
mov r9, qword [rbx]
mov r8, qword [rbx + 0x10]
mov r10d, dword [rax + 8]
mov ebx, dword [rsp + 0xa8]
and r10d, 0xa
test ebx, ebx
je 0x1400164ff
cmp r10d, 0xa
lea rdx, str.Failed_to_add_Session_ID_to_cache_for__s:___s:_d___s_
cmove rcx, r11
mov qword [rsp + 0x28], rcx
mov rcx, rdi
mov dword [rsp + 0x20], esi
call fcn.14001cd00
mov rdx, r15
mov rcx, r13
call rbp
mov eax, ebx
jmp 0x14001653b
mov rbp, qword [rsp + 0xc8]
mov rcx, qword [rbx]
mov qword [rbx + 0x28], rbp
mov qword [rbx + 0x18], r13
mov qword [rbx + 0x20], r15
mov eax, dword [r14]
mov dword [rbx + 0x30], eax
call qword [fcn.1400675f0]
mov rcx, qword [rbx + 8]
call qword [fcn.1400675f0]
mov rax, qword [rsp + 0x40]
xor r8d, r8d
mov rcx, qword [rsp + 0x48]
mov rdx, qword [rsp + 0xb0]
mov qword [rbx], rax
mov eax, dword [rsp + 0xa0]
mov dword [rbx + 0x38], eax
mov qword [rbx + 8], rcx
mov eax, dword [rdx + 0x1c]
mov dword [rbx + 0x34], eax
mov rax, qword [r12 + 0x18]
mov qword [rsp + 0x48], r8
mov dword [rsp + 0xa8], r8d
mov rcx, qword [rax + 0x3d0]
mov rax, qword [rcx]
mov qword [rbx + 0x10], rax
mov eax, dword [rdx + 0x20]
mov dword [rbx + 0x3c], eax
mov eax, r8d
jmp 0x140016402
cmp r10d, 0xa
mov rdx, r12
cmove rcx, r11
mov qword [rsp + 0x30], rcx
mov rcx, rdi
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x20], r9
mov r9, r8
lea r8, str.Added_Session_ID_to_cache_for__s:___s:_d___s_
call fcn.14001ce40
jmp 0x140016539
mov rdx, r15
mov rcx, r13
call qword [rsp + reloc.WLDAP32.dll_Ordinal_200]
xor eax, eax
mov rsi, qword [rsp + 0x60]
mov rbx, qword [rsp + 0xb8]
add rsp, 0x68
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rbp
ret