Function at 0x14001a038
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
push rbx
push rsi
push rdi
push r12
push r15
sub rsp, 0x120
mov qword [rsp + 0x90], 0xfffffffffffffffe
mov rax, qword [0x140078790]
xor rax, rsp
mov qword [rsp + 0x110], rax
mov rdi, r8
mov r12, rdx
mov rsi, rcx
mov r8d, 0xa
lea rdx, str.DecryptEx
lea rcx, [rsp + 0xa0]
call fcn.14002de00
nop
xor ebx, ebx
mov qword [rsp + 0x38], rbx
test rdi, rdi
je 0x14001a0b3
lea r9, [rsp + 0x38]
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CryptDuplicateKey]
test eax, eax
jne 0x14001a0df
mov qword [rsp + 0x38], rbx
jmp 0x14001a0df
lea r8, [rsp + 0x38]
mov edx, 1
mov rcx, qword [r12]
call qword [sym.imp.ADVAPI32.dll_CryptGetUserKey]
test eax, eax
jne 0x14001a0d2
call fcn.140007048
jmp 0x14001a0d4
mov eax, ebx
test eax, eax
jns 0x14001a0df
mov ecx, eax
call fcn.140032390
test rsi, rsi
lea rdi, [rsi + 8]
jne 0x14001a0eb
mov rdi, rbx
xor edx, edx
lea r8d, [rdx + 0x18]
lea rcx, [rsp + 0x78]
call fcn.140034b00
mov rdx, rdi
lea rcx, [rsp + 0x78]
call fcn.140018e08
nop
cmp dword [rsp + 0x78], 2
je 0x14001a11a
mov ecx, 0x80090005
call fcn.140032390
mov dword [rsp + 0x48], ebx
mov qword [rsp + 0x50], rbx
mov dword [rsp + 0x58], ebx
lea rdx, [rsp + 0x80]
lea rcx, [rsp + 0x48]
call fcn.140018c60
nop
lea rax, vtable.CCryptBlob_struct__CRYPTOAPI_BLOB__class__heap_allocator_.0
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x70], rbx
mov qword [rsp + 0x70], rbx
mov dword [rsp + 0x68], ebx
test rsi, rsi
lea r15, [rsi + 8]
jne 0x14001a160
mov r15, rbx
mov edi, dword [rsp + 0x58]
cmp edi, dword [rsp + 0x48]
jae 0x14001a18b
mov eax, edi
inc edi
mov dword [rsp + 0x58], edi
cmp eax, dword [rsp + 0x48]
jae 0x14001a18b
mov ecx, eax
shl rcx, 4
add rcx, qword [rsp + 0x50]
je 0x14001a18b
add rcx, 0xfffffffffffffff8
jmp 0x14001a18e
mov rcx, rbx
lea rax, [rcx + 8]
neg rcx
sbb rdx, rdx
and rdx, rax
mov r8d, 0x19
lea rcx, [rsp + 0x60]
call fcn.140018984
cmp edi, dword [rsp + 0x48]
jae 0x14001a1d2
mov eax, edi
inc edi
mov dword [rsp + 0x58], edi
cmp eax, dword [rsp + 0x48]
jae 0x14001a1d2
mov ecx, eax
shl rcx, 4
add rcx, qword [rsp + 0x50]
je 0x14001a1d2
add rcx, 0xfffffffffffffff8
jmp 0x14001a1d5
mov rcx, rbx
lea rax, [rcx + 8]
neg rcx
sbb rdx, rdx
and rdx, rax
lea rax, [r15 - 8]
neg r15
sbb rcx, rcx
and rcx, rax
mov r8d, 0x19
call fcn.140018984
mov qword [rsp + 0x40], rbx
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], ebx
mov r9, qword [rsp + 0x38]
mov r8d, dword [rsp + 0x68]
mov rdx, qword [rsp + 0x70]
mov rcx, qword [r12]
call qword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
jne 0x14001a231
call fcn.140007048
jmp 0x14001a233
mov eax, ebx
test eax, eax
jns 0x14001a23e
mov ecx, eax
call fcn.140032390
mov eax, dword [rsi + 8]
mov dword [rsp + 0x30], eax
mov rax, qword [rsi + 0x10]
lea rcx, [rsp + 0x30]
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], rax
xor r9d, r9d
lea r8d, [r9 + 1]
mov rdx, qword [0x14007a9a8]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
jne 0x14001a27c
call fcn.140007048
jmp 0x14001a27e
mov eax, ebx
test eax, eax
jns 0x14001a289
mov ecx, eax
call fcn.140032390
mov eax, dword [rsp + 0x30]
mov dword [rsi + 8], eax
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x14001a2a5
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov qword [rsp + 0x40], rbx
lea rax, vtable.CCryptBlob_struct__CRYPTOAPI_BLOB__class__heap_allocator_.0
mov qword [rsp + 0x60], rax
mov rcx, qword [rsp + 0x70]
test rcx, rcx
je 0x14001a2c0
call fcn.140009660
mov qword [rsp + 0x70], rbx
mov dword [rsp + 0x68], ebx
lea rcx, [rsp + 0x48]
call fcn.1400174d8
nop
mov rcx, qword [rsp + 0x88]
test rcx, rcx
je 0x14001a2e6
call fcn.140009660
mov qword [rsp + 0x88], rbx
mov dword [rsp + 0x80], ebx
lea rdi, [rsp + 0x78]
xor eax, eax
lea ecx, [rax + 0x18]
rep stosb byte [rdi], al
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x14001a316
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov qword [rsp + 0x38], rbx
jmp 0x14001a31c
mov r8d, ebx
lea rdx, [0x14004ee5e]
lea rcx, [rsp + 0xa0]
call fcn.140030b9c
nop
lea rcx, [rsp + 0xa0]
call fcn.14002e7a8
mov eax, ebx
mov rcx, qword [rsp + 0x110]
xor rcx, rsp
call fcn.140033cb0
add rsp, 0x120
pop r15
pop r12
pop rdi
pop rsi
pop rbx
ret