Function at 0x140018eb0
Capabilities:
Encrypt or decrypt via wincrypt
Print debug messages

Disassembly:
push rbp
push rbx
push rdi
lea rbp, [rsp - 0x47]
sub rsp, 0xc0
mov qword [rbp - 0x41], 0xfffffffffffffffe
mov rax, qword [0x14005d030]
xor rax, rsp
mov qword [rbp + 0x37], rax
mov ebx, r8d
xor dil, dil
cmp byte [rcx], dil
je 0x14001913a
mov dword [rbp - 0x49], ebx
lea rax, [rbp - 0x49]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdx
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rcx + 0x10]
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
setne dil
test eax, eax
je 0x140019034
cmp dword [rbp - 0x49], ebx
sete dil
je 0x140019147
lea rcx, str.AESCryptoUtility:_Failure_occurred_in_CryptDecrypt._All_bytes_were_not_decrypted_n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
lea r10, [rbp + 0x31]
nop dword [rax]
sub r10, 2
mov eax, 0xcccccccd
mul r9d
shr edx, 3
movzx ecx, dx
shl cx, 2
lea r8d, [rcx + rdx]
add r8w, r8w
sub r9w, r8w
add r9w, 0x30
mov word [r10], r9w
mov r9d, edx
test edx, edx
jne 0x140018f40
lea r8, [rbp + 0x31]
mov rdx, r10
lea rcx, [rbp - 0x19]
call fcn.1400162e0
nop
lea r8, [rbp - 0x19]
lea rdx, str.Error_code_:
lea rcx, [rbp - 0x39]
call fcn.140015430
nop
mov rdx, qword [rbp - 1]
cmp rdx, 8
jb 0x140018fd8
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x19]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140018fd3
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14001916e
call fcn.140024800
lea rcx, [rbp - 0x39]
cmp qword [rbp - 0x21], 8
cmovae rcx, qword [rbp - 0x39]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov rdx, qword [rbp - 0x21]
cmp rdx, 8
jb 0x140019147
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x39]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140019133
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140019168
jmp 0x140019133
lea rcx, str.AESCryptoUtility:_Failure_occurred_in_CryptDecrypt_n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
lea r10, [rbp + 0x31]
nop
sub r10, 2
mov eax, 0xcccccccd
mul r9d
shr edx, 3
movzx ecx, dx
shl cx, 2
lea r8d, [rcx + rdx]
add r8w, r8w
sub r9w, r8w
add r9w, 0x30
mov word [r10], r9w
mov r9d, edx
test edx, edx
jne 0x140019050
lea r8, [rbp + 0x31]
mov rdx, r10
lea rcx, [rbp - 0x19]
call fcn.1400162e0
nop
lea r8, [rbp - 0x19]
lea rdx, str.Error_code_:
lea rcx, [rbp - 0x39]
call fcn.140015430
nop
mov rdx, qword [rbp - 1]
cmp rdx, 8
jb 0x1400190e8
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x19]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400190e3
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140019174
call fcn.140024800
lea rcx, [rbp - 0x39]
cmp qword [rbp - 0x21], 8
cmovae rcx, qword [rbp - 0x39]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov rdx, qword [rbp - 0x21]
cmp rdx, 8
jb 0x140019147
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x39]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140019133
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140019162
call fcn.140024800
jmp 0x140019147
lea rcx, str.AESCryptoUtility:_Decryption_failed._Key_was_not_initialized_n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
movzx eax, dil
mov rcx, qword [rbp + 0x37]
xor rcx, rsp
call fcn.1400247e0
add rsp, 0xc0
pop rdi
pop rbx
pop rbp
ret
call fcn.14002bf94
int3
call fcn.14002bf94
int3
call fcn.14002bf94
int3
call fcn.14002bf94
int3