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 [0x1401ca1c8]
xor rax, rsp
mov qword [rbp + 0x1a0], rax
mov rsi, r9
mov qword [rbp], r8
mov rdi, rdx
mov rbx, rcx
mov qword [rbp + 0xf0], rcx
xor r12d, r12d
mov dword [rsp + 0x64], r12d
mov qword [rsp + 0x58], r12
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x140131a58]
lea rcx, [rsp + 0x58]
call sub.bcrypt.dll_BCryptOpenAlgorithmProvider
test eax, eax
js 0x140002dba
lea rax, [0x140131cb8]
mov qword [rbp + 0x70], rax
mov rax, qword [rsp + 0x58]
mov qword [rbp + 0x78], rax
lea rax, [rbp + 0x70]
mov qword [rbp + 0xa8], rax
lea rax, [rbp + 0x70]
mov qword [rbp - 0x20], rax
lea rax, [rbp + 0x160]
mov qword [rsp + 0x70], rax
mov qword [rbp + 0x198], r12
lea rdx, [rbp + 0x160]
lea rcx, [rbp + 0x70]
call qword [0x140131cb8]
mov qword [rbp + 0x198], rax
mov rcx, qword [rbp + 0xa8]
test rcx, rcx
je 0x140002872
mov rax, qword [rcx]
lea rdx, [rbp + 0x70]
cmp rcx, rdx
setne dl
call qword [rax + 0x20]
mov qword [rbp + 0xa8], 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 0x140002ddb
mov dword [rsp + 0x54], r12d
mov dword [rsp + 0x60], r12d
xor eax, eax
mov qword [rbp + 0x110], rax
mov dword [rbp + 0x118], 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 0x140002dfc
mov dword [rsp + 0x28], r12d
lea rax, [rsp + 0x54]
mov qword [rsp + 0x20], rax
mov r9d, 0xc
lea r8, [rbp + 0x110]
lea rdx, str.AuthTagLength
mov rcx, qword [rsp + 0x58]
call sub.bcrypt.dll_BCryptGetProperty
test eax, eax
js 0x140002e1d
mov qword [rbp - 0x58], r12
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x70], xmm0
mov r15, r12
mov qword [rbp - 0x60], r12
lea rax, str.SHA256
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x78], 6
movaps xmm0, xmmword [rsp + 0x70]
movdqa xmmword [rsp + 0x70], xmm0
mov r9, qword [rdi + 8]
mov r8, qword [rdi]
lea rdx, [rsp + 0x70]
lea rcx, [rbp - 0x18]
call fcn.140002f50
mov dword [rsp + 0x64], 2
mov edx, dword [rsp + 0x60]
test rdx, rdx
je 0x140002989
lea r8, [rsp + 0x50]
lea rcx, [rbp - 0x70]
call fcn.140001950
mov r15, qword [rbp - 0x60]
mov rdx, qword [rbp - 0x10]
mov rcx, qword [rbp - 0x18]
sub rdx, rcx
mov r9, qword [rbp - 0x68]
mov r14, qword [rbp - 0x70]
sub r9, r14
mov dword [rsp + 0x30], r12d
mov dword [rsp + 0x28], edx
mov qword [rsp + 0x20], rcx
mov r8, r14
lea rdx, [rbp - 0x58]
mov rcx, qword [rsp + 0x58]
call sub.bcrypt.dll_BCryptGenerateSymmetricKey
test eax, eax
js 0x140002e3e
lea rax, [0x140131cf0]
mov qword [rbp + 0xb0], rax
mov rax, qword [rbp - 0x58]
mov qword [rbp + 0xb8], rax
lea rax, [rbp + 0xb0]
mov qword [rbp + 0xe8], rax
lea rax, [rbp + 0xb0]
mov qword [rsp + 0x70], rax
lea rax, [rbp + 0x120]
mov qword [rbp - 0x20], rax
mov qword [rbp + 0x158], r12
lea rdx, [rbp + 0x120]
lea rcx, [rbp + 0xb0]
call qword [0x140131cf0]
mov qword [rbp + 0x158], rax
mov rcx, qword [rbp + 0xe8]
test rcx, rcx
je 0x140002a46
mov rax, qword [rcx]
lea rdx, [rbp + 0xb0]
cmp rcx, rdx
setne dl
call qword [rax + 0x20]
nop
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x38], xmm0
mov qword [rbp - 0x28], r12
movdqu xmmword [rsp + 0x70], xmm0
mov qword [rbp - 0x80], r12
mov edx, 0xc
lea rcx, [rbp - 0x50]
call fcn.140002ed0
nop
mov rdx, rsi
lea rcx, [rbp - 0x38]
call fcn.1400033e0
mov edx, dword [rbp + 0x110]
lea rcx, [rsp + 0x70]
call fcn.1400033e0
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp + 0x10], xmm0
movups xmmword [rbp + 0x20], xmm0
movups xmmword [rbp + 0x30], xmm0
movups xmmword [rbp + 0x40], xmm0
movups xmmword [rbp + 0x50], xmm0
mov qword [rbp + 0x60], rax
mov dword [rbp + 0x10], 0x58
mov dword [rbp + 0x14], 1
mov rcx, qword [rbp - 0x50]
mov qword [rbp + 0x18], rcx
mov rax, qword [rbp - 0x48]
sub rax, rcx
mov dword [rbp + 0x20], eax
mov qword [rbp + 0x28], rcx
mov dword [rbp + 0x30], eax
mov r13, qword [rsp + 0x70]
mov qword [rbp + 0x38], r13
mov rax, qword [rsp + 0x78]
sub rax, r13
mov dword [rbp + 0x40], eax
mov rax, qword [rbp - 0x30]
mov r12, qword [rbp - 0x38]
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 + 0x10]
mov r8d, esi
mov rdx, qword [rbp]
mov rcx, qword [rbp - 0x58]
call sub.bcrypt.dll_BCryptEncrypt
test eax, eax
js 0x140002e5f
mov qword [rbx], rdi
mov qword [rbx + 8], rdi
mov qword [rbx + 0x10], rdi
mov dword [rsp + 0x64], 3
mov rsi, qword [rbp - 0x48]
mov rdi, qword [rbp - 0x50]
xor edx, edx
cmp rdi, rsi
je 0x140002b7c
nop word [rax + rax]
cmp rdx, qword [rbx + 0x10]
je 0x140002b61
movzx eax, byte [rdi]
mov byte [rdx], al
inc qword [rbx + 8]
jmp 0x140002b6c
mov r8, rdi
mov rcx, rbx
call fcn.1400016b0
mov rdx, qword [rbx + 8]
inc rdi
cmp rdi, rsi
jne 0x140002b50
mov rdi, qword [rbp - 0x50]
mov rsi, r13
cmp r13, qword [rsp + 0x78]
je 0x140002bb4
cmp rdx, qword [rbx + 0x10]
je 0x140002b97
movzx eax, byte [rsi]
mov byte [rdx], al
inc qword [rbx + 8]
jmp 0x140002ba2
mov r8, rsi
mov rcx, rbx
call fcn.1400016b0
mov rdx, qword [rbx + 8]
inc rsi
cmp rsi, qword [rsp + 0x78]
jne 0x140002b86
mov rdi, qword [rbp - 0x50]
mov rsi, r12
cmp r12, qword [rbp - 0x30]
je 0x140002bed
nop dword [rax]
cmp rdx, qword [rbx + 0x10]
je 0x140002bd1
movzx eax, byte [rsi]
mov byte [rdx], al
inc qword [rbx + 8]
jmp 0x140002bdc
mov r8, rsi
mov rcx, rbx
call fcn.1400016b0
mov rdx, qword [rbx + 8]
inc rsi
cmp rsi, qword [rbp - 0x30]
jne 0x140002bc0
mov rdi, qword [rbp - 0x50]
test rdi, rdi
je 0x140002c34
mov rdx, qword [rbp - 0x40]
sub rdx, rdi
mov rax, rdi
cmp rdx, 0x1000
jb 0x140002c1e
add rdx, 0x27
mov rdi, qword [rdi - 8]
sub rax, rdi
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140002e86
mov rcx, rdi
call fcn.1400fb310
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x50], xmm0
xor edi, edi
mov qword [rbp - 0x40], rdi
test r13, r13
je 0x140002c6e
mov rdx, qword [rbp - 0x80]
sub rdx, r13
mov rax, r13
cmp rdx, 0x1000
jb 0x140002c65
add rdx, 0x27
mov r13, qword [r13 - 8]
sub rax, r13
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140002e8c
mov rcx, r13
call fcn.1400fb310
nop
test r12, r12
je 0x140002ca9
mov rdx, qword [rbp - 0x28]
sub rdx, r12
mov rax, r12
cmp rdx, 0x1000
jb 0x140002ca0
add rdx, 0x27
mov r12, qword [r12 - 8]
sub rax, r12
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140002e92
mov rcx, r12
call fcn.1400fb310
nop
mov rcx, qword [rbp + 0x158]
test rcx, rcx
je 0x140002ce1
mov rax, qword [rcx]
call qword [rax + 0x10]
mov rcx, qword [rbp + 0x158]
test rcx, rcx
je 0x140002ce1
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 - 0x18]
test rcx, rcx
je 0x140002d27
mov rdx, qword [rbp - 8]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x140002d16
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140002e98
call fcn.1400fb310
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x18], xmm0
mov qword [rbp - 8], rdi
test r14, r14
je 0x140002d5c
sub r15, r14
mov rax, r14
cmp r15, 0x1000
jb 0x140002d50
add r15, 0x27
mov r14, qword [r14 - 8]
sub rax, r14
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140002db4
mov rdx, r15
mov rcx, r14
call fcn.1400fb310
nop
mov rcx, qword [rbp + 0x198]
test rcx, rcx
je 0x140002d8e
mov rax, qword [rcx]
call qword [rax + 0x10]
mov rcx, qword [rbp + 0x198]
test rcx, rcx
je 0x140002d8e
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.1400fb3b0
add rsp, 0x2b8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
call fcn.1401025e4
nop
lea rdx, str.Failed_to_open_algorithm_provider
lea rcx, [rbp - 0x70]
call fcn.140001430
lea rdx, [0x1401c3140]
lea rcx, [rbp - 0x70]
call fcn.1400fc9b0
nop
lea rdx, str.Failed_to_set_the_algorithm_chaining_mode
lea rcx, [rbp - 0x70]
call fcn.140001430
lea rdx, [0x1401c3140]
lea rcx, [rbp - 0x70]
call fcn.1400fc9b0
int3
lea rdx, str.Failed_to_get_algorithm_object_length
lea rcx, [rbp - 0x70]
call fcn.140001430
lea rdx, [0x1401c3140]
lea rcx, [rbp - 0x70]
call fcn.1400fc9b0
int3
lea rdx, str.Failed_to_get_algorithm_auth_tag_lengths
lea rcx, [rbp - 0x70]
call fcn.140001430
lea rdx, [0x1401c3140]
lea rcx, [rbp - 0x70]
call fcn.1400fc9b0
nop
lea rdx, str.Failed_to_generate_symmetric_key_object_from_password
lea rcx, [rbp - 0x38]
call fcn.140001430
lea rdx, [0x1401c3140]
lea rcx, [rbp - 0x38]
call fcn.1400fc9b0
nop
lea rdx, str.Failed_to_encrypt_input_buffer
lea rcx, [rbp + 0xf8]
call fcn.140001430
lea rdx, [0x1401c3140]
lea rcx, [rbp + 0xf8]
call fcn.1400fc9b0
nop
call fcn.1401025e4
nop
call fcn.1401025e4
nop
call fcn.1401025e4
nop
call fcn.1401025e4
int3