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

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1f]
sub rsp, 0x98
mov rax, qword [0x140041080]
xor rax, rsp
mov qword [rbp + 7], rax
mov rsi, r9
mov rbx, r8
mov rdi, rdx
mov r12, rcx
mov qword [rbp - 0x19], rdx
mov qword [rbp - 0x11], rbx
xor r13d, r13d
mov qword [rbp - 0x29], r13
mov qword [rbp - 0x21], r13
mov dword [rbp - 1], r13d
mov dword [rbp - 9], r13d
mov dword [rbp - 5], r13d
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x14003a468]
lea rcx, [rbp - 0x29]
call qword [sym.imp.bcrypt.dll_BCryptOpenAlgorithmProvider]
mov r14d, eax
test eax, eax
je 0x140002005
lea rdx, str.Error_opening_AES_algorithm_provider:
lea rcx, [0x1400426b0]
call fcn.1400049e0
mov rcx, rax
mov edx, r14d
call fcn.140002ac0
mov rcx, rax
call fcn.140004c90
nop
mov rcx, qword [rdi]
test rcx, rcx
je 0x140001f9f
mov rdx, qword [rdi + 0x10]
sub rdx, rcx
cmp rdx, 0x1000
jb 0x140001f8f
mov r8, qword [rcx - 8]
sub rcx, r8
add rdx, 0x27
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x140002304
mov rcx, r8
call fcn.14000d4e0
mov qword [rdi], r13
mov qword [rdi + 8], r13
mov qword [rdi + 0x10], r13
mov rcx, qword [rbx]
test rcx, rcx
je 0x140001fe3
mov rdx, qword [rbx + 0x10]
sub rdx, rcx
cmp rdx, 0x1000
jb 0x140001fd3
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x14000230a
mov rcx, r8
call fcn.14000d4e0
mov qword [rbx], r13
mov qword [rbx + 8], r13
mov qword [rbx + 0x10], r13
xor al, al
mov rcx, qword [rbp + 7]
xor rcx, rsp
call fcn.14000d4c0
add rsp, 0x98
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov dword [rsp + 0x20], r13d
mov r9d, 0x20
lea r8, str.ChainingModeCBC
lea rdx, str.ChainingMode
mov rcx, qword [rbp - 0x29]
call qword [sym.imp.bcrypt.dll_BCryptSetProperty]
mov r14d, eax
test eax, eax
je 0x140002066
lea rdx, str.Error_setting_CBC_mode:
lea rcx, [0x1400426b0]
call fcn.1400049e0
mov rcx, rax
mov edx, r14d
call fcn.140002ac0
mov rcx, rax
call fcn.140004c90
xor edx, edx
mov rcx, qword [rbp - 0x29]
call qword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
jmp 0x140001f5b
mov rcx, qword [rdi]
mov rax, qword [rdi + 8]
sub rax, rcx
mov dword [rsp + 0x30], r13d
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rcx
xor r9d, r9d
xor r8d, r8d
lea rdx, [rbp - 0x21]
mov rcx, qword [rbp - 0x29]
call qword [sym.imp.bcrypt.dll_BCryptGenerateSymmetricKey]
mov r14d, eax
test eax, eax
je 0x1400020a2
lea rdx, str.Error_generating_AES_key:
jmp 0x140002036
mov dword [rsp + 0x28], r13d
lea rax, [rbp - 1]
mov qword [rsp + 0x20], rax
mov r9d, 4
lea r8, [rbp - 9]
lea rdx, str.BlockLength
mov rcx, qword [rbp - 0x29]
call qword [sym.imp.bcrypt.dll_BCryptGetProperty]
mov r14d, eax
test eax, eax
jne 0x1400022c3
mov rdx, qword [rbx + 8]
sub rdx, qword [rbx]
mov ecx, dword [rbp - 9]
cmp rcx, rdx
jne 0x1400022c3
mov r14, qword [r12 + 8]
sub r14, qword [r12]
mov r15, qword [rsi + 8]
mov rdx, qword [rsi]
mov rcx, r15
sub rcx, rdx
cmp r14, rcx
jae 0x14000210a
lea rax, [rdx + r14]
jmp 0x140002139
jbe 0x14000213d
mov rax, qword [rsi + 0x10]
sub rax, rdx
cmp r14, rax
jbe 0x140002125
mov rdx, r14
mov rcx, rsi
call fcn.140006250
jmp 0x14000213d
sub r14, rcx
mov r8, r14
xor edx, edx
mov rcx, r15
call fcn.14002d790
lea rax, [r15 + r14]
mov qword [rsi + 8], rax
mov r10, qword [rsi]
mov rcx, qword [rsi + 8]
sub rcx, r10
mov r9, qword [rbx]
mov rax, qword [rbx + 8]
sub rax, r9
mov rdx, qword [r12]
mov r8, qword [r12 + 8]
sub r8, rdx
mov dword [rsp + 0x48], r13d
lea r11, [rbp - 5]
mov qword [rsp + 0x40], r11
mov dword [rsp + 0x38], ecx
mov qword [rsp + 0x30], r10
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], r9
xor r9d, r9d
mov rcx, qword [rbp - 0x21]
call qword [sym.imp.bcrypt.dll_BCryptDecrypt]
mov r14d, eax
test eax, eax
je 0x1400021d2
lea rdx, str.Error_during_decryption:
lea rcx, [0x1400426b0]
call fcn.1400049e0
mov rcx, rax
mov edx, r14d
call fcn.140002ac0
mov rcx, rax
call fcn.140004c90
mov rcx, qword [rbp - 0x21]
call qword [sym.imp.bcrypt.dll_BCryptDestroyKey]
xor edx, edx
mov rcx, qword [rbp - 0x29]
call qword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
jmp 0x140001f5b
mov r14d, dword [rbp - 5]
mov r15, qword [rsi + 8]
mov rdx, qword [rsi]
mov rcx, r15
sub rcx, rdx
cmp r14, rcx
jae 0x1400021ee
lea rax, [rdx + r14]
jmp 0x14000221d
jbe 0x140002221
mov rax, qword [rsi + 0x10]
sub rax, rdx
cmp r14, rax
jbe 0x140002209
mov rdx, r14
mov rcx, rsi
call fcn.140006250
jmp 0x140002221
sub r14, rcx
mov r8, r14
xor edx, edx
mov rcx, r15
call fcn.14002d790
lea rax, [r15 + r14]
mov qword [rsi + 8], rax
mov rcx, qword [rbp - 0x21]
call qword [sym.imp.bcrypt.dll_BCryptDestroyKey]
xor edx, edx
mov rcx, qword [rbp - 0x29]
call qword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
nop
mov rcx, qword [rdi]
test rcx, rcx
je 0x14000227c
mov rdx, qword [rdi + 0x10]
sub rdx, rcx
cmp rdx, 0x1000
jb 0x14000226c
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x140002304
mov rcx, r8
call fcn.14000d4e0
mov qword [rdi], r13
mov qword [rdi + 8], r13
mov qword [rdi + 0x10], r13
mov rcx, qword [rbx]
test rcx, rcx
je 0x1400022bc
mov rdx, qword [rbx + 0x10]
sub rdx, rcx
cmp rdx, 0x1000
jb 0x1400022ac
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x14000230a
mov rcx, r8
call fcn.14000d4e0
mov qword [rbx], r13
mov qword [rbx + 8], r13
mov qword [rbx + 0x10], r13
mov al, 1
jmp 0x140001fe5
lea rdx, str.Error_getting_block_length_or_block_length_mismatch:
lea rcx, [0x1400426b0]
call fcn.1400049e0
mov rcx, rax
mov edx, r14d
call fcn.140002ac0
mov rcx, rax
call fcn.140004c90
mov rcx, qword [rbp - 0x21]
call qword [sym.imp.bcrypt.dll_BCryptDestroyKey]
xor edx, edx
mov rcx, qword [rbp - 0x29]
call qword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
jmp 0x140001f5b
call fcn.140015884
nop
call fcn.140015884
int3