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

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xf]
sub rsp, 0x100
mov rax, qword [0x14005e2a8]
xor rax, rsp
mov qword [rbp - 9], rax
mov r15, qword [rbp + 0x6f]
xor r13d, r13d
xor eax, eax
mov r14d, edx
mov qword [rsp + 0x50], r13
mov edi, r9d
mov qword [rsp + 0x58], r13
mov rsi, r8
mov dword [rbp - 0x21], r13d
mov r12, rcx
mov dword [rbp - 0x1d], r13d
mov qword [rbp - 0x19], rax
mov dword [rbp - 0x11], eax
cmp r9d, 0x10
jb 0x140001331
cmp dword [rbp + 0x77], 0xc
jb 0x140001331
xor r9d, r9d
mov qword [rsp + 0xf8], rbx
xor r8d, r8d
lea rdx, [0x140058c78]
lea rcx, [rsp + 0x50]
call qword [sym.imp.bcrypt.dll_BCryptOpenAlgorithmProvider]
mov ebx, eax
test eax, eax
jne 0x140001302
mov rcx, qword [rsp + 0x50]
lea r9d, [r13 + 0x20]
lea r8, str.ChainingModeGCM
mov dword [rsp + 0x20], r13d
lea rdx, str.ChainingMode
call qword [sym.imp.bcrypt.dll_BCryptSetProperty]
mov ebx, eax
test eax, eax
jne 0x140001302
mov rcx, qword [rsp + 0x50]
lea rax, [rbp - 0x21]
mov dword [rsp + 0x28], r13d
lea r9d, [r13 + 0xc]
lea r8, [rsp + 0x60]
mov qword [rsp + 0x20], rax
lea rdx, str.AuthTagLength
call qword [sym.imp.bcrypt.dll_BCryptGetProperty]
mov ebx, eax
test eax, eax
jne 0x140001302
mov rcx, qword [rsp + 0x50]
lea rax, [rbp - 0x21]
mov dword [rsp + 0x28], r13d
lea r9d, [r13 + 4]
lea r8, [rbp - 0x1d]
mov qword [rsp + 0x20], rax
lea rdx, str.BlockLength
call qword [sym.imp.bcrypt.dll_BCryptGetProperty]
mov ebx, eax
test eax, eax
jne 0x140001302
mov rcx, qword [rsp + 0x50]
lea rdx, [rsp + 0x58]
mov dword [rsp + 0x30], r13d
xor r9d, r9d
mov dword [rsp + 0x28], edi
xor r8d, r8d
mov qword [rsp + 0x20], rsi
call qword [sym.imp.bcrypt.dll_BCryptGenerateSymmetricKey]
mov ebx, eax
test eax, eax
jne 0x140001302
movsd xmm0, qword [r15]
mov eax, dword [r15 + 8]
mov ecx, dword [rsp + 0x60]
movsd qword [rbp - 0x19], xmm0
mov dword [rbp - 0x11], eax
call fcn.14001348c
xorps xmm0, xmm0
mov rdi, rax
xor eax, eax
mov ecx, r14d
movups xmmword [rsp + 0x70], xmm0
mov qword [rbp - 0x31], rax
lea rax, [rbp - 0x19]
mov qword [rbp - 0x79], rax
mov eax, dword [rsp + 0x60]
movups xmmword [rbp - 0x71], xmm0
mov dword [rsp + 0x70], 0x58
movups xmmword [rbp - 0x61], xmm0
mov dword [rbp - 0x7d], 1
movups xmmword [rbp - 0x51], xmm0
mov dword [rbp - 0x51], eax
movups xmmword [rbp - 0x41], xmm0
mov dword [rbp - 0x71], 0xc
mov qword [rbp - 0x59], rdi
call fcn.14001348c
mov rsi, rax
test rax, rax
je 0x1400012f5
mov rcx, qword [rsp + 0x58]
lea rax, [rbp - 0x21]
mov dword [rsp + 0x48], r13d
lea r9, [rsp + 0x70]
mov qword [rsp + 0x40], rax
mov r8d, r14d
mov dword [rsp + 0x38], r14d
mov rdx, r12
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], r13d
mov qword [rsp + 0x20], r13
call qword [sym.imp.bcrypt.dll_BCryptDecrypt]
mov r8d, r14d
mov rdx, rsi
mov rcx, r12
mov ebx, eax
call fcn.140003a80
mov rcx, rsi
call fcn.140013478
test rdi, rdi
je 0x140001302
mov rcx, rdi
call fcn.140013478
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x140001312
call qword [sym.imp.bcrypt.dll_BCryptDestroyKey]
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x140001324
xor edx, edx
call qword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
test ebx, ebx
mov rbx, qword [rsp + 0xf8]
sete al
mov rcx, qword [rbp - 9]
xor rcx, rsp
call fcn.140002780
add rsp, 0x100
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret