Function at 0x140168f90
Capabilities:
Encrypt data via sspi

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x88
mov r12, r9
mov rsi, rdx
mov rdi, rcx
mov r15, qword [rsp + 0xf0]
mov qword [rdx + 0x138], r8
lea rcx, [rsp + 0x30]
call fcn.140164740
mov eax, dword [rsp + 0x30]
cmp eax, 2
jne 0x140168fd8
mov r13, qword [rsp + 0x38]
jmp 0x14016913f
test eax, eax
je 0x140169135
mov rax, qword [rsi + 0x1b0]
mov rbx, qword [rsi + 0x1b8]
cmp rbx, rax
jne 0x14016921c
mov r14, qword [rsp + 0x38]
mov r13d, r14d
shr r14, 0x20
cmp r15, r14
cmovb r14, r15
mov r15d, dword [rsp + 0x34]
lea rbp, [r14 + r15]
add r13, rbp
sub r13, rbx
jbe 0x14016906a
mov rax, qword [rsi + 0x1a8]
sub rax, rbx
cmp rax, r13
jb 0x1401692ff
mov rax, qword [rsi + 0x1a0]
lea rcx, [rax + rbx]
cmp r13, 2
jb 0x14016905d
lea r8, [r13 - 1]
xor edx, edx
mov qword [rsp + 0x70], rax
call sub.msvcrt.dll_memset
add rbx, r13
dec rbx
mov rcx, qword [rsp + 0x70]
add rcx, rbx
mov byte [rcx], 0
inc rbx
mov qword [rsi + 0x1b0], rbx
cmp rbp, rbx
ja 0x140169332
mov rcx, qword [rsi + 0x1a0]
add rcx, r15
mov rdx, r12
mov r8, r14
call sub.msvcrt.dll_memcpy
mov rax, qword [rsi + 0x1b0]
cmp rax, r15
jb 0x140169332
cmp rax, rbp
jb 0x140169332
mov rcx, qword [rsi + 0x1a0]
lea rdx, [rcx + r15]
sub eax, ebp
add rbp, rcx
mov dword [rsp + 0x30], r15d
mov dword [rsp + 0x34], 7
mov qword [rsp + 0x38], rcx
mov dword [rsp + 0x40], r14d
mov dword [rsp + 0x44], 1
mov qword [rsp + 0x48], rdx
mov dword [rsp + 0x50], eax
mov dword [rsp + 0x54], 6
mov qword [rsp + 0x58], rbp
xorps xmm0, xmm0
movups xmmword [rsp + 0x60], xmm0
movabs rax, 0x400000000
mov qword [rsp + 0x78], rax
lea rax, [rsp + 0x30]
mov qword [rsp + 0x80], rax
lea rcx, [rsi + 0x1c0]
lea r8, [rsp + 0x78]
xor edx, edx
xor r9d, r9d
call sub.secur32.dll_EncryptMessage
test eax, eax
je 0x1401691e6
mov r13d, eax
shl r13, 0x20
or r13, 2
jmp 0x14016913f
movabs r13, 0x8009031700000002
mov rcx, r13
call fcn.1400837b0
cmp al, 0xd
jne 0x1401691d6
mov qword [rdi], 2
mov qword [rsi + 0x138], 0
mov eax, r13d
and eax, 3
lea rcx, [rax - 2]
cmp rcx, 2
jb 0x1401692dc
test rax, rax
je 0x1401692dc
lea rsi, [r13 - 1]
mov rdi, qword [r13 - 1]
mov rbx, qword [r13 + 7]
mov rcx, rdi
call qword [rbx]
cmp qword [rbx + 8], 0
je 0x1401691b2
cmp qword [rbx + 0x10], 0x11
jb 0x1401691a1
mov rdi, qword [rdi - 8]
mov rcx, qword [0x1402d9150]
xor edx, edx
mov r8, rdi
call sub.kernel32.dll_HeapFree
mov rcx, qword [0x1402d9150]
xor edx, edx
mov r8, rsi
add rsp, 0x88
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp sub.kernel32.dll_HeapFree
mov qword [rdi], 1
mov qword [rdi + 8], r13
jmp 0x1401692d1
mov ecx, dword [rsp + 0x40]
add ecx, dword [rsp + 0x30]
add ecx, dword [rsp + 0x50]
mov rax, qword [rsi + 0x1b0]
cmp rax, rcx
jb 0x140169208
mov qword [rsi + 0x1b0], rcx
mov rax, rcx
mov qword [rsi + 0x1b8], 0
mov qword [rsi + 0x200], r14
xor ebx, ebx
cmp rbx, rax
je 0x1401692bf
lea r14, [rsi + 0x10]
lea r15, [rsi + 0x18]
lea r12, [rsp + 0x30]
nop word cs:[rax + rax]
sub rax, rbx
jb 0x140169332
mov r8, qword [rsi + 0x138]
test r8, r8
je 0x140169332
mov r9, qword [rsi + 0x1a0]
add r9, rbx
cmp dword [r14], 2
jne 0x140169280
mov qword [rsp + 0x20], rax
mov rcx, r12
mov rdx, r15
call fcn.1401d5bf0
jmp 0x140169290
mov qword [rsp + 0x20], rax
mov rcx, r12
mov rdx, r14
call fcn.140168c10
mov rax, qword [rsp + 0x30]
cmp rax, 2
je 0x1401692f0
mov r13, qword [rsp + 0x38]
test rax, rax
jne 0x14016913f
add rbx, r13
mov qword [rsi + 0x1b8], rbx
mov rax, qword [rsi + 0x1b0]
cmp rbx, rax
jne 0x140169240
mov rax, qword [rsi + 0x200]
mov qword [rdi], 0
mov qword [rdi + 8], rax
mov qword [rsi + 0x138], 0
add rsp, 0x88
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
movabs r13, 0xd00000003
jmp 0x14016913f
lea rcx, [rsi + 0x1a0]
mov rdx, rbx
mov r8, r13
call fcn.140089e50
mov rbx, qword [rsi + 0x1b0]
mov rax, qword [rsi + 0x1a0]
lea rcx, [rax + rbx]
cmp r13, 2
jae 0x14016903f
jmp 0x14016905d
ud2