Function at 0x140002790
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 - 0x1b8]
sub rsp, 0x2b8
mov rax, qword [0x1401cf048]
xor rax, rsp
mov qword [rbp + 0x1a0], rax
mov rsi, r9
mov qword [rbp + 0x10], r8
mov rdi, rdx
mov rbx, rcx
mov qword [rbp + 0x100], rcx
xor r12d, r12d
mov dword [rsp + 0x64], r12d
mov qword [rsp + 0x58], r12
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x140136a18]
lea rcx, [rsp + 0x58]
call sub.bcrypt.dll_BCryptOpenAlgorithmProvider
test eax, eax
js 0x140002dc0
lea rax, fcn.140001d00
mov qword [rbp + 0x80], rax
mov rax, qword [rsp + 0x58]
mov qword [rbp + 0x88], rax
lea rax, [rbp + 0x80]
mov qword [rbp + 0xb8], rax
lea rax, [rbp + 0x80]
mov qword [rbp - 0x28], rax
lea rax, [rbp + 0x160]
mov qword [rbp - 0x60], rax
mov qword [rbp + 0x198], r12
lea rdx, [rbp + 0x160]
lea rcx, [rbp + 0x80]
call fcn.140001d00
mov qword [rbp + 0x198], rax
mov rcx, qword [rbp + 0xb8]
test rcx, rcx
je 0x140002882
mov rax, qword [rcx]
lea rdx, [rbp + 0x80]
cmp rcx, rdx
setne dl
call qword [rax + 0x20]
mov qword [rbp + 0xb8], r12
mov dword [rsp + 0x20], r12d
mov r9d, 0x20
lea r8, str.ChainingModeGCM
lea rdx, str.ChainingMode
mov rcx, qword [rsp + 0x58]
call sub.bcrypt.dll_BCryptSetProperty
test eax, eax
js 0x140002de3
mov dword [rsp + 0x54], r12d
mov dword [rsp + 0x60], r12d
xor eax, eax
mov qword [rbp + 0x108], rax
mov dword [rbp + 0x110], eax
mov dword [rsp + 0x28], r12d
lea rax, [rsp + 0x54]
mov qword [rsp + 0x20], rax
mov r9d, 4
lea r8, [rsp + 0x60]
lea rdx, str.ObjectLength
mov rcx, qword [rsp + 0x58]
call sub.bcrypt.dll_BCryptGetProperty
test eax, eax
js 0x140002e06
mov dword [rsp + 0x28], r12d
lea rax, [rsp + 0x54]
mov qword [rsp + 0x20], rax
mov r9d, 0xc
lea r8, [rbp + 0x108]
lea rdx, str.AuthTagLength
mov rcx, qword [rsp + 0x58]
call sub.bcrypt.dll_BCryptGetProperty
test eax, eax
js 0x140002e29
mov qword [rbp - 0x80], r12
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x68], xmm0
mov r15, r12
mov qword [rsp + 0x78], r12
lea rax, str.SHA256
mov qword [rbp - 0x60], rax
mov qword [rbp - 0x58], 6
movaps xmm0, xmmword [rbp - 0x60]
movdqa xmmword [rbp - 0x60], xmm0
mov r9, qword [rdi + 8]
mov r8, qword [rdi]
lea rdx, [rbp - 0x60]
lea rcx, [rbp - 8]
call fcn.140002f60
mov dword [rsp + 0x64], 2
mov edx, dword [rsp + 0x60]
test rdx, rdx
je 0x140002998
lea r8, [rsp + 0x50]
lea rcx, [rsp + 0x68]
call fcn.140001950
mov r15, qword [rsp + 0x78]
mov rcx, qword [rbp]
mov rax, qword [rbp - 8]
sub rcx, rax
mov r9, qword [rsp + 0x70]
mov r14, qword [rsp + 0x68]
sub r9, r14
mov dword [rsp + 0x30], r12d
mov dword [rsp + 0x28], ecx
mov qword [rsp + 0x20], rax
mov r8, r14
lea rdx, [rbp - 0x80]
mov rcx, qword [rsp + 0x58]
call sub.bcrypt.dll_BCryptGenerateSymmetricKey
test eax, eax
js 0x140002e4c
lea rax, fcn.140001d60
mov qword [rbp + 0xc0], rax
mov rax, qword [rbp - 0x80]
mov qword [rbp + 0xc8], rax
lea rax, [rbp + 0xc0]
mov qword [rbp + 0xf8], rax
lea rax, [rbp + 0xc0]
mov qword [rbp - 0x60], rax
lea rax, [rbp + 0x120]
mov qword [rbp - 0x28], rax
mov qword [rbp + 0x158], r12
lea rdx, [rbp + 0x120]
lea rcx, [rbp + 0xc0]
call fcn.140001d60
mov qword [rbp + 0x158], rax
mov rcx, qword [rbp + 0xf8]
test rcx, rcx
je 0x140002a55
mov rax, qword [rcx]
lea rdx, [rbp + 0xc0]
cmp rcx, rdx
setne dl
call qword [rax + 0x20]
nop
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x40], xmm0
mov qword [rbp - 0x30], r12
movdqu xmmword [rbp - 0x20], xmm0
mov qword [rbp - 0x10], r12
mov edx, 0xc
lea rcx, [rbp - 0x78]
call fcn.140002ee0
nop
mov rdx, rsi
lea rcx, [rbp - 0x40]
call fcn.1400033f0
mov edx, dword [rbp + 0x108]
lea rcx, [rbp - 0x20]
call fcn.1400033f0
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp + 0x20], xmm0
movups xmmword [rbp + 0x30], xmm0
movups xmmword [rbp + 0x40], xmm0
movups xmmword [rbp + 0x50], xmm0
movups xmmword [rbp + 0x60], xmm0
mov qword [rbp + 0x70], rax
mov dword [rbp + 0x20], 0x58
mov dword [rbp + 0x24], 1
mov rcx, qword [rbp - 0x78]
mov qword [rbp + 0x28], rcx
mov rax, qword [rbp - 0x70]
sub rax, rcx
mov dword [rbp + 0x30], eax
mov qword [rbp + 0x38], rcx
mov dword [rbp + 0x40], eax
mov r13, qword [rbp - 0x20]
mov qword [rbp + 0x48], r13
mov rax, qword [rbp - 0x18]
sub rax, r13
mov dword [rbp + 0x50], eax
mov rax, qword [rbp - 0x38]
mov r12, qword [rbp - 0x40]
sub rax, r12
xor edi, edi
mov dword [rsp + 0x48], edi
lea rcx, [rsp + 0x54]
mov qword [rsp + 0x40], rcx
mov dword [rsp + 0x38], eax
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x20], rdi
lea r9, [rbp + 0x20]
mov r8d, esi
mov rdx, qword [rbp + 0x10]
mov rcx, qword [rbp - 0x80]
call sub.bcrypt.dll_BCryptEncrypt
test eax, eax
js 0x140002e6d
mov qword [rbx], rdi
mov qword [rbx + 8], rdi
mov qword [rbx + 0x10], rdi
mov dword [rsp + 0x64], 3
mov rsi, qword [rbp - 0x70]
mov rdi, qword [rbp - 0x78]
cmp rdi, rsi
je 0x140002b7f
mov rdx, qword [rbx + 8]
cmp rdx, qword [rbx + 0x10]
je 0x140002b68
movzx eax, byte [rdi]
mov byte [rdx], al
inc qword [rbx + 8]
jmp 0x140002b73
mov r8, rdi
mov rcx, rbx
call fcn.1400016b0
inc rdi
cmp rdi, rsi
jne 0x140002b53
mov rdi, qword [rbp - 0x78]
mov rsi, r13
cmp r13, qword [rbp - 0x18]
je 0x140002bbd
nop dword [rax + rax]
mov rdx, qword [rbx + 8]
cmp rdx, qword [rbx + 0x10]
je 0x140002ba5
movzx eax, byte [rsi]
mov byte [rdx], al
inc qword [rbx + 8]
jmp 0x140002bb0
mov r8, rsi
mov rcx, rbx
call fcn.1400016b0
inc rsi
cmp rsi, qword [rbp - 0x18]
jne 0x140002b90
mov rdi, qword [rbp - 0x78]
mov rsi, r12
cmp r12, qword [rbp - 0x38]
je 0x140002bf3
mov rdx, qword [rbx + 8]
cmp rdx, qword [rbx + 0x10]
je 0x140002bdb
movzx eax, byte [rsi]
mov byte [rdx], al
inc qword [rbx + 8]
jmp 0x140002be6
mov r8, rsi
mov rcx, rbx
call fcn.1400016b0
inc rsi
cmp rsi, qword [rbp - 0x38]
jne 0x140002bc6
mov rdi, qword [rbp - 0x78]
test rdi, rdi
je 0x140002c3a
mov rdx, qword [rbp - 0x68]
sub rdx, rdi
mov rax, rdi
cmp rdx, 0x1000
jb 0x140002c24
add rdx, 0x27
mov rdi, qword [rdi - 8]
sub rax, rdi
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140002e8e
mov rcx, rdi
call fcn.1401009e8
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x78], xmm0
xor edi, edi
mov qword [rbp - 0x68], rdi
test r13, r13
je 0x140002c74
mov rdx, qword [rbp - 0x10]
sub rdx, r13
mov rax, r13
cmp rdx, 0x1000
jb 0x140002c6b
add rdx, 0x27
mov r13, qword [r13 - 8]
sub rax, r13
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140002e94
mov rcx, r13
call fcn.1401009e8
nop
test r12, r12
je 0x140002caf
mov rdx, qword [rbp - 0x30]
sub rdx, r12
mov rax, r12
cmp rdx, 0x1000
jb 0x140002ca6
add rdx, 0x27
mov r12, qword [r12 - 8]
sub rax, r12
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140002e9a
mov rcx, r12
call fcn.1401009e8
nop
mov rcx, qword [rbp + 0x158]
test rcx, rcx
je 0x140002ce7
mov rax, qword [rcx]
call qword [rax + 0x10]
mov rcx, qword [rbp + 0x158]
test rcx, rcx
je 0x140002ce7
mov rax, qword [rcx]
lea rdx, [rbp + 0x120]
cmp rcx, rdx
setne dl
call qword [rax + 0x20]
mov qword [rbp + 0x158], rdi
mov rcx, qword [rbp - 8]
test rcx, rcx
je 0x140002d2d
mov rdx, qword [rbp + 8]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x140002d1c
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140002ea0
call fcn.1401009e8
xorps xmm0, xmm0
movdqu xmmword [rbp - 8], xmm0
mov qword [rbp + 8], rdi
test r14, r14
je 0x140002d62
sub r15, r14
mov rax, r14
cmp r15, 0x1000
jb 0x140002d56
add r15, 0x27
mov r14, qword [r14 - 8]
sub rax, r14
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140002dba
mov rdx, r15
mov rcx, r14
call fcn.1401009e8
nop
mov rcx, qword [rbp + 0x198]
test rcx, rcx
je 0x140002d94
mov rax, qword [rcx]
call qword [rax + 0x10]
mov rcx, qword [rbp + 0x198]
test rcx, rcx
je 0x140002d94
mov rax, qword [rcx]
lea rdx, [rbp + 0x160]
cmp rcx, rdx
setne dl
call qword [rax + 0x20]
nop
mov rax, rbx
mov rcx, qword [rbp + 0x1a0]
xor rcx, rsp
call fcn.140100a80
add rsp, 0x2b8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
call fcn.140107a98
nop
lea rdx, str.Failed_to_open_algorithm_provider
lea rcx, [rsp + 0x68]
call fcn.140001430
lea rdx, [0x1401c8d30]
lea rcx, [rsp + 0x68]
call fcn.140101e78
nop
lea rdx, str.Failed_to_set_the_algorithm_chaining_mode
lea rcx, [rsp + 0x68]
call fcn.140001430
lea rdx, [0x1401c8d30]
lea rcx, [rsp + 0x68]
call fcn.140101e78
int3
lea rdx, str.Failed_to_get_algorithm_object_length
lea rcx, [rsp + 0x68]
call fcn.140001430
lea rdx, [0x1401c8d30]
lea rcx, [rsp + 0x68]
call fcn.140101e78
int3
lea rdx, str.Failed_to_get_algorithm_auth_tag_lengths
lea rcx, [rsp + 0x68]
call fcn.140001430
lea rdx, [0x1401c8d30]
lea rcx, [rsp + 0x68]
call fcn.140101e78
nop
lea rdx, str.Failed_to_generate_symmetric_key_object_from_password
lea rcx, [rbp - 0x40]
call fcn.140001430
lea rdx, [0x1401c8d30]
lea rcx, [rbp - 0x40]
call fcn.140101e78
nop
lea rdx, str.Failed_to_encrypt_input_buffer
lea rcx, [rbp - 0x60]
call fcn.140001430
lea rdx, [0x1401c8d30]
lea rcx, [rbp - 0x60]
call fcn.140101e78
nop
call fcn.140107a98
nop
call fcn.140107a98
nop
call fcn.140107a98
nop
call fcn.140107a98
int3