Function at 0x140087628
Capabilities:
Encrypt or decrypt data via bcrypt

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x148]
sub rsp, 0x220
mov qword [rbp - 0x20], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rbx, r8
mov r15, rdx
mov r13, rcx
and dword [rbp - 0x38], 0
xor edx, edx
lea rcx, [rbp - 0x80]
call fcn.140085300
nop
xor edx, edx
lea rcx, [rbp - 0x68]
call fcn.14005ca8c
nop
lea r12, [r13 + 0x90]
mov rcx, r12
call fcn.140067ef8
test rax, rax
je 0x14008772b
cmp r12, rbx
je 0x14008772b
mov qword [rbp - 0x30], r12
mov qword [rbp - 0x28], rbx
lea r8, [rbp - 0x20]
lea rdx, [rbp - 0x30]
lea rcx, [rbp - 0x50]
call fcn.14005bce8
movups xmm0, xmmword [rax]
movdqu xmmword [rbp - 0x10], xmm0
lea rcx, [rbp + 0x150]
call fcn.14005175c
mov r8, rax
lea rdx, [rbp - 0x10]
lea rcx, [rbp]
call fcn.14005c14c
nop
lea rdx, [rbp]
lea rcx, [rsp + 0x68]
call fcn.14005ca14
mov rdx, rax
lea rcx, [rbp - 0x68]
call fcn.14005ef08
lea rcx, [rsp + 0x68]
call fcn.14005e214
nop
lea rcx, [rbp]
call fcn.14005e01c
xor edx, edx
lea rcx, [rsp + 0x68]
call fcn.14005ca8c
mov rdx, rax
mov rcx, r12
call fcn.14005ef08
lea rcx, [rsp + 0x68]
call fcn.14005e214
jmp 0x140087737
mov rdx, rbx
lea rcx, [rbp - 0x68]
call fcn.1400863c4
xor edx, edx
lea rcx, [rsp + 0x50]
call fcn.14007a994
nop
lea rcx, [rbp - 0x68]
call fcn.140067ef8
mov r8, qword [0x140249378]
cmp rax, r8
jbe 0x140087780
lea rdx, [rsp + 0x68]
lea rcx, [rbp - 0x68]
call fcn.14007ab68
mov rdx, rax
lea rcx, [rsp + 0x50]
call fcn.14008632c
lea rcx, [rsp + 0x68]
call fcn.14007aa20
jmp 0x1400877be
mov edx, 1
lea rcx, [rsp + 0x68]
call fcn.14007a994
mov rdx, rax
lea rcx, [rsp + 0x50]
call fcn.14008632c
lea rcx, [rsp + 0x68]
call fcn.14007aa20
xor edx, edx
lea rcx, [rsp + 0x50]
call fcn.14007aa7c
mov rcx, rax
lea rdx, [rbp - 0x68]
call fcn.1400863c4
lea rcx, [rsp + 0x50]
call fcn.140067ef8
mov rdx, rax
lea rcx, [rsp + 0x68]
call fcn.140085300
mov rdx, rax
lea rcx, [rbp - 0x80]
call fcn.140086388
lea rcx, [rsp + 0x68]
call fcn.14005e01c
lea rcx, [rbp - 0x80]
call fcn.140088bc8
xor r14d, r14d
lea rcx, [rsp + 0x50]
call fcn.140067ef8
mov rbx, rax
test rax, rax
je 0x140087a31
mov rdx, r14
lea rcx, [rsp + 0x50]
call fcn.14007aa7c
mov rcx, rax
call fcn.140067ef8
mov rdi, qword [0x140249378]
cmp rax, rdi
je 0x14008788a
mov rcx, r12
call fcn.140067ef8
test rax, rax
je 0x140087841
cmp rbx, 1
je 0x14008788a
mov rdx, r14
lea rcx, [rsp + 0x50]
call fcn.14007aa7c
mov rdx, rax
mov rcx, r12
call fcn.1400863c4
and dword [rbp + 0x150], 0
lea rdx, [rbp + 0x150]
mov rcx, qword [str.BCrypt_AES_CTR_Cipher]
call fcn.140085230
mov rbx, rax
mov rdx, r14
lea rcx, [rbp - 0x80]
call fcn.14005f838
mov qword [rax], rbx
jmp 0x14008798b
mov dword [rbp + 0x150], edi
mov rdx, rdi
lea rcx, [rbp - 0x50]
call fcn.14005ca8c
nop
lea rcx, [rbp - 0x50]
call fcn.140067ef8
mov rsi, rax
lea rcx, [rbp - 0x50]
call fcn.140068510
mov rbx, rax
lea rcx, [r13 + 0x70]
call fcn.140067ef8
mov rdi, rax
lea rcx, [r13 + 0x70]
call fcn.140068510
mov rdx, rax
mov ecx, dword [r13 + 0x68]
mov dword [rsp + 0x48], ecx
lea rax, [rbp + 0x150]
mov qword [rsp + 0x40], rax
mov dword [rsp + 0x38], esi
mov qword [rsp + 0x30], rbx
and dword [rsp + 0x28], 0
and qword [rsp + 0x20], 0
xor r9d, r9d
mov r8d, edi
mov rcx, qword [r13 + 0x60]
call sub.bcrypt.dll_BCryptEncrypt
mov edi, eax
test eax, eax
js 0x1400879a9
lea rdx, [0x140249378]
mov rcx, qword [str.BCrypt_AES_CTR_Cipher]
call fcn.1400851d0
mov rbx, rax
mov rdx, r14
lea rcx, [rsp + 0x50]
call fcn.14007aa7c
mov rcx, rax
lea rdx, [rbp - 0x50]
call fcn.14007aa8c
mov rdx, rax
mov rcx, rbx
call fcn.1400863c4
mov rdx, r14
lea rcx, [rbp - 0x80]
call fcn.14005f838
mov qword [rax], rbx
mov r8d, 1
lea rdx, [r13 + 0x70]
lea rcx, [rsp + 0x68]
call fcn.1400688b0
mov rdx, rax
lea rcx, [r13 + 0x70]
call fcn.14005ef08
lea rcx, [rsp + 0x68]
call fcn.14005e214
nop
lea rcx, [rbp - 0x50]
call fcn.14005e214
inc r14
lea rcx, [rsp + 0x50]
call fcn.140067ef8
mov rbx, rax
cmp r14, rax
jb 0x14008780d
jmp 0x140087a31
mov byte [r13 + 0x50], 1
call fcn.140067f0c
mov rbx, rax
test rax, rax
je 0x140087a17
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + reloc.OLEAUT32.dll_VariantClear]
mov esi, 2
cmp eax, esi
jl 0x140087a17
lea r8d, [rsi - 1]
mov edx, esi
lea rcx, [rbp + 0x30]
call fcn.14005ba84
nop
lea rdx, str.Failed_to_compute_encrypted_output_with_error_code
lea rcx, [rbp + 0x30]
call fcn.14002e2d0
mov rcx, rax
mov edx, edi
call fcn.14005f2a0
mov rax, qword [rbx]
lea r9, [rbp + 0x30]
mov r8, qword [str.BCrypt_AES_CTR_Cipher]
mov edx, esi
mov rcx, rbx
call qword [rax + 0x18]
nop
lea rcx, [rbp + 0x30]
call fcn.14001bb60
lea rcx, [rbp - 0x80]
call fcn.140086af4
xor edx, edx
mov rcx, r15
call fcn.14005ca8c
nop
lea rcx, [rbp - 0x50]
jmp 0x140087a61
lea rcx, [rbp - 0x80]
call fcn.14005175c
mov rdx, rax
lea rcx, [rbp + 0x18]
call fcn.14005ca14
nop
lea rcx, [rbp - 0x80]
call fcn.140086af4
lea rdx, [rbp + 0x18]
mov rcx, r15
call fcn.14005c9e4
nop
lea rcx, [rbp + 0x18]
call fcn.14005e214
nop
lea rcx, [rsp + 0x50]
call fcn.14007aa20
nop
lea rcx, [rbp - 0x68]
call fcn.14005e214
nop
lea rcx, [rbp - 0x80]
call fcn.14005e01c
mov rax, r15
lea r11, [rsp + 0x220]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret