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

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], r8
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x60
mov rax, qword [rbp + 0x70]
xor ecx, ecx
xor bl, bl
mov r12d, edx
mov r15d, r9d
mov qword [rbp - 0x10], rcx
mov qword [rbp - 8], rcx
mov r14d, ecx
mov qword [rax], rcx
mov esi, ecx
mov rax, qword [rbp + 0x78]
mov edi, ecx
mov dword [rbp + 0x80], ecx
mov r13d, ecx
mov dword [rbp + 0x60], ecx
mov dword [rbp + 0x58], ecx
mov dword [rax], ecx
lea eax, [r9 - 0x10]
mov dword [rbp + 0x68], ecx
test eax, 0xffffffef
je 0x180013907
lea rdx, str.WinAes::Bad_key_size__d
mov rax, qword [0x18005ec08]
lea rcx, [0x18005ec08]
mov r8d, 4
call qword [rax + 0x10]
jmp 0x180013b35
xor r9d, r9d
lea rdx, [0x180054578]
xor r8d, r8d
lea rcx, [rbp - 0x10]
call qword [sym.imp.bcrypt.dll_BCryptOpenAlgorithmProvider]
test eax, eax
jns 0x18001392e
mov r9d, eax
lea rdx, str.WinAes::BCryptOpenAlgorithmProvider_failed__u
jmp 0x1800138eb
mov rcx, qword [rbp - 0x10]
lea rax, [rbp + 0x80]
xor edx, edx
lea r8, [rbp + 0x60]
mov dword [rsp + 0x28], edx
mov qword [rsp + 0x20], rax
lea r9d, [rdx + 4]
lea rdx, str.ObjectLength
call qword [sym.imp.bcrypt.dll_BCryptGetProperty]
test eax, eax
jns 0x180013969
mov r9d, eax
lea rdx, str.WinAes::BCryptGetProperty_failed__u
jmp 0x1800138eb
mov ecx, dword [rbp + 0x60]
call fcn.1800201a4
mov rcx, qword [rbp - 0x10]
lea r8, [rbp + 0x58]
mov r14, rax
lea rdx, str.BlockLength
xor eax, eax
mov r9d, 4
mov dword [rsp + 0x28], eax
lea rax, [rbp + 0x80]
mov qword [rsp + 0x20], rax
call qword [sym.imp.bcrypt.dll_BCryptGetProperty]
test eax, eax
js 0x18001395d
mov ecx, dword [rbp + 0x58]
call fcn.1800201a4
mov ebx, 0x10
lea rdx, [0x180053970]
cmp dword [rbp + 0x58], ebx
mov r8d, ebx
mov rcx, rax
mov rsi, rax
cmovb r8d, dword [rbp + 0x58]
call fcn.180022130
mov ecx, dword [rbp + 0x58]
mov rdx, rdi
lea eax, [rcx - 0x10]
test eax, eax
cmove eax, edx
cmp ecx, ebx
mov r8d, eax
cmovb ebx, ecx
mov ecx, ebx
add rcx, rsi
call fcn.1800228b0
mov rcx, qword [rbp - 0x10]
lea r8, str.ChainingModeCBC
xor ebx, ebx
lea rdx, str.ChainingMode
mov dword [rsp + 0x20], ebx
lea r9d, [rbx + 0x20]
call qword [sym.imp.bcrypt.dll_BCryptSetProperty]
test eax, eax
jns 0x180013a24
mov r9d, eax
lea rdx, str.WinAes::BCryptSetProperty_failed__u
jmp 0x1800138eb
mov rax, qword [rbp + 0x50]
lea rdx, [rbp - 8]
mov r9d, dword [rbp + 0x60]
mov r8, r14
mov rcx, qword [rbp - 0x10]
mov dword [rsp + 0x30], ebx
mov dword [rsp + 0x28], r15d
mov qword [rsp + 0x20], rax
call qword [sym.imp.bcrypt.dll_BCryptGenerateSymmetricKey]
test eax, eax
jns 0x180013a5e
mov r9d, eax
lea rdx, str.WinAes::BCryptGenerateSymmetricKey_failed__u
jmp 0x1800138eb
mov rcx, r12
call fcn.1800201a4
mov rdx, qword [rbp + 0x40]
mov r8, r12
mov rcx, rax
mov rdi, rax
call fcn.180022130
mov rcx, qword [rbp - 8]
lea rax, [rbp + 0x68]
mov dword [rsp + 0x48], 1
xor r9d, r9d
mov qword [rsp + 0x40], rax
mov r8d, r12d
mov eax, dword [rbp + 0x58]
mov rdx, rdi
mov dword [rsp + 0x38], ebx
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rsi
call qword [sym.imp.bcrypt.dll_BCryptEncrypt]
test eax, eax
jns 0x180013ac4
mov r9d, eax
lea rdx, str.WinAes::BCryptEncrypt_failed__u
jmp 0x1800138eb
mov ecx, dword [rbp + 0x68]
call fcn.1800201a4
mov ecx, dword [rbp + 0x68]
mov r13, rax
mov dword [rsp + 0x48], 1
lea rax, [rbp + 0x80]
mov qword [rsp + 0x40], rax
xor r9d, r9d
mov dword [rsp + 0x38], ecx
mov r8d, r12d
mov ecx, dword [rbp + 0x58]
mov rdx, rdi
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], ecx
mov rcx, qword [rbp - 8]
mov qword [rsp + 0x20], rsi
call qword [sym.imp.bcrypt.dll_BCryptEncrypt]
test eax, eax
js 0x180013ab5
mov rcx, qword [rbp - 8]
call qword [sym.imp.bcrypt.dll_BCryptDestroyKey]
test eax, eax
jns 0x180013b2f
mov r9d, eax
lea rdx, str.WinAes::BCryptDestroyKey_failed__u
jmp 0x1800138eb
mov qword [rbp - 8], rbx
mov bl, 1
mov rcx, qword [rbp - 0x10]
test rcx, rcx
je 0x180013b46
xor edx, edx
call qword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
mov rcx, qword [rbp - 8]
test rcx, rcx
je 0x180013b55
call qword [sym.imp.bcrypt.dll_BCryptDestroyKey]
test r14, r14
je 0x180013b62
mov rcx, r14
call fcn.18001fd10
test rsi, rsi
je 0x180013b6f
mov rcx, rsi
call fcn.18001fd10
test rdi, rdi
je 0x180013b7c
mov rcx, rdi
call fcn.18001fd10
mov rax, qword [rbp + 0x78]
mov ecx, dword [rbp + 0x68]
mov dword [rax], ecx
mov rax, qword [rbp + 0x70]
mov qword [rax], r13
movzx eax, bl
mov rbx, qword [rsp + 0xa8]
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret