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

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x78
mov r12, rcx
mov rbp, rdx
mov rdi, r8
mov r15, r9
test rcx, rcx
je 0x140096704
test rdx, rdx
je 0x140096704
test r8, r8
je 0x140096704
test r9, r9
je 0x140096704
mov r14d, dword [r8 + 8]
mov r13d, dword [r9 + 8]
mov dword [rsp + 0x60], 0x18
lea esi, [r14 + 0x18]
lea ecx, [rsi + r13]
mov dword [rsp + 0x5c], ecx
call sub.msvcrt.dll_malloc
mov rbx, rax
test rax, rax
je 0x140096704
mov dword [rax], 0x31415352
mov rdx, qword [rdi]
lea rcx, [rbx + 0x18]
mov r8d, r14d
lea eax, [r13*8]
mov dword [rbx + 8], r14d
mov dword [rbx + 4], eax
mov dword [rbx + 0xc], r13d
mov qword [rbx + 0x10], 0
call sub.msvcrt.dll_memcpy
mov rdx, qword [r15]
mov ecx, esi
mov r8d, r13d
add rcx, rbx
mov dword [rsp + 0x60], esi
call sub.msvcrt.dll_memcpy
mov eax, dword [rsp + 0x5c]
mov qword [rsp + 0x20], rbx
xor edx, edx
mov dword [rsp + 0x30], 0
mov rcx, qword [0x1401753d8]
lea r9, [rsp + 0x68]
lea r8, str.RSAPUBLICBLOB
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x60], 0
call sub.bcrypt.dll_BCryptImportKeyPair
test eax, eax
jns 0x140096720
mov rcx, rbx
call fcn.140083fb8
mov eax, 0xffffffff
add rsp, 0x78
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea rax, [rsp + 0x64]
mov rdx, qword [rbp]
mov rcx, qword [rsp + 0x68]
xor r9d, r9d
mov dword [rsp + 0x48], 1
mov qword [rsp + 0x40], rax
mov dword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r8d, dword [rbp + 8]
call sub.bcrypt.dll_BCryptEncrypt
test eax, eax
jns 0x140096780
mov rcx, qword [rsp + 0x68]
call sub.bcrypt.dll_BCryptDestroyKey
jmp 0x1400966fc
mov esi, dword [rsp + 0x64]
mov eax, dword [r12 + 8]
cmp esi, eax
je 0x1400967aa
mov rcx, qword [r12]
mov edx, esi
call sub.msvcrt.dll_realloc
test rax, rax
je 0x14009676d
mov dword [r12 + 8], esi
mov qword [r12], rax
mov eax, dword [rsp + 0x64]
mov edi, dword [rbp + 8]
cmp edi, eax
cmovae eax, edi
mov r14d, eax
mov rcx, r14
mov dword [rsp + 0x64], r14d
mov rsi, r14
call sub.msvcrt.dll_malloc
mov r15, qword [rsp + 0x68]
mov r13, rax
test rax, rax
je 0x1400968be
mov rbp, qword [rbp]
cmp edi, r14d
jb 0x140096890
mov r8d, edi
mov rdx, rbp
sub r14, r8
lea rcx, [r13 + r14]
call sub.msvcrt.dll_memcpy
lea rax, [rsp + 0x60]
xor r9d, r9d
mov r8d, esi
mov dword [rsp + 0x48], 1
mov rcx, r15
mov rdx, r13
mov qword [rsp + 0x40], rax
mov eax, dword [r12 + 8]
mov dword [rsp + 0x38], eax
mov rax, qword [r12]
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x20], 0
call sub.bcrypt.dll_BCryptEncrypt
mov rcx, r13
mov esi, eax
call fcn.140083fb8
test esi, esi
js 0x14009676d
mov esi, dword [rsp + 0x60]
cmp dword [r12 + 8], esi
je 0x1400968a5
mov rcx, qword [r12]
mov edx, esi
call sub.msvcrt.dll_realloc
test rax, rax
je 0x1400968a5
mov qword [r12], rax
mov rcx, qword [rsp + 0x68]
mov dword [r12 + 8], esi
call sub.bcrypt.dll_BCryptDestroyKey
mov rcx, rbx
call fcn.140083fb8
xor eax, eax
jmp 0x140096709
mov r8d, r14d
xor edx, edx
mov rcx, rax
sub r8d, edi
call sub.msvcrt.dll_memset
jmp 0x1400967e3
mov rcx, qword [rsp + 0x68]
call sub.bcrypt.dll_BCryptDestroyKey
mov rcx, rbx
call fcn.140083fb8
xor eax, eax
jmp 0x140096709
mov rcx, r15
call sub.bcrypt.dll_BCryptDestroyKey
mov rcx, rbx
call fcn.140083fb8
jmp 0x140096704