Function at 0x14003a5b0
Capabilities:
Create new key via cryptacquirecontext
Encrypt or decrypt via wincrypt

Disassembly:
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0xf0
mov rax, qword [0x1401f3660]
xor rax, rsp
mov qword [rsp + 0xe0], rax
cmp qword [rsp + 0x100], 0
je 0x14003a5ef
cmp qword [rsp + 0x108], 0
jne 0x14003a5f9
mov eax, 0xffffffff
jmp 0x14003a97e
mov dword [rsp + 0x44], 0xffffffff
mov byte [rsp + 0x60], 0
lea rax, [rsp + 0x61]
mov rdi, rax
xor eax, eax
mov ecx, 3
rep stosb byte [rdi], al
mov qword [rsp + 0x68], 0
mov qword [rsp + 0x50], 0
mov qword [rsp + 0xc8], 0
xor eax, eax
mov rcx, 0xffffffffffffffff
mov rdi, qword [rsp + 0x100]
repne scasb al, byte [rdi]
not rcx
sub rcx, 1
mov rax, rcx
mov dword [rsp + 0xa8], eax
mov eax, dword [rsp + 0xa8]
add eax, 3
mov dword [rsp + 0x64], eax
xor edx, edx
mov eax, dword [rsp + 0x64]
mov ecx, reloc.WS2_32.dll_recv
div ecx
add eax, 1
imul eax, eax, 0x10
mov dword [rsp + 0xc0], eax
mov eax, dword [rsp + 0xc0]
lea eax, [rax + rax + 0xa]
mov dword [rsp + 0x48], eax
lea rax, str.Microsoft_Enhanced_RSA_and_AES_Cryptographic_Provider
mov qword [rsp + 0x58], rax
mov dword [rsp + 0x40], 1
mov byte [rsp + 0xb0], 0
lea rax, [rsp + 0xb1]
mov rdi, rax
xor eax, eax
mov ecx, reloc.WS2_32.dll_ntohs
rep stosb byte [rdi], al
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [rsp + 0xd4], eax
call fcn.140048a20
mov ecx, dword [rsp + 0xd4]
add ecx, eax
mov eax, ecx
mov ecx, eax
call fcn.1400489d0
call fcn.1400489f0
cdq
mov ecx, 0x3e7
idiv ecx
mov eax, edx
mov dword [rsp + 0x20], eax
lea r9, [0x1401cedcc]
mov r8, 0xffffffffffffffff
mov edx, 4
lea rcx, [rsp + 0x60]
call fcn.1400418d0
mov eax, dword [rsp + 0xc0]
mov rcx, rax
call fcn.140048900
mov qword [rsp + 0xc8], rax
cmp qword [rsp + 0xc8], 0
je 0x14003a93a
lea rdx, [rsp + 0xb0]
lea rcx, [rsp + 0x78]
call fcn.140039b60
mov eax, dword [rsp + 0xc0]
mov r9d, 3
lea r8, [rsp + 0x60]
mov rdx, rax
mov rcx, qword [rsp + 0xc8]
call fcn.140041310
mov eax, dword [rsp + 0xa8]
mov ecx, dword [rsp + 0xc0]
sub ecx, 3
mov ecx, ecx
mov rdx, qword [rsp + 0xc8]
add rdx, 3
mov qword [rsp + 0xd8], rdx
mov r9, rax
mov r8, qword [rsp + 0x100]
mov rdx, rcx
mov rax, qword [rsp + 0xd8]
mov rcx, rax
call fcn.140041310
mov eax, dword [rsp + 0x64]
mov dword [rsp + 0xd0], eax
call fcn.140038ee0
test eax, eax
je 0x14003a7d3
lea rax, str.Microsoft_Enhanced_RSA_and_AES_Cryptographic_Provider__Prototype_
mov qword [rsp + 0x58], rax
mov dword [rsp + 0x20], 0xf0000000
mov r9d, Ordinal_27
mov r8, qword [rsp + 0x58]
xor edx, edx
lea rcx, [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x14003a7fc
jmp 0x14003a93a
lea rax, [rsp + 0x50]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0
xor r9d, r9d
mov r8d, Ordinal_46
lea rdx, [rsp + 0x78]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
jne 0x14003a830
jmp 0x14003a93a
xor r9d, r9d
lea r8, [rsp + 0xb0]
mov edx, 1
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
jne 0x14003a854
jmp 0x14003a93a
xor r9d, r9d
lea r8, [rsp + 0x40]
mov edx, 3
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
jne 0x14003a875
jmp 0x14003a93a
mov eax, dword [rsp + 0xc0]
mov dword [rsp + 0x30], eax
lea rax, [rsp + 0xd0]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0xc8]
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov r8d, 1
xor edx, edx
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
jne 0x14003a8b9
jmp 0x14003a93a
mov eax, dword [rsp + 0x48]
cmp dword [rsp + 0x110], eax
jae 0x14003a8c8
jmp 0x14003a93a
movsxd rax, dword [rsp + 0x110]
mov r9d, 9
lea r8, str._CRYPTEX_
mov rdx, rax
mov rcx, qword [rsp + 0x108]
call fcn.140044c40
mov eax, dword [rsp + 0x110]
sub eax, 9
mov rcx, qword [rsp + 0x108]
add rcx, 9
mov r9d, eax
mov r8, rcx
mov edx, dword [rsp + 0xd0]
mov rcx, qword [rsp + 0xc8]
call fcn.140039fd0
mov eax, dword [rsp + 0x48]
sub eax, 1
mov eax, eax
mov rcx, qword [rsp + 0x108]
mov byte [rcx + rax], 0
mov dword [rsp + 0x44], 1
cmp qword [rsp + 0x50], 0
je 0x14003a94d
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
cmp qword [rsp + 0x68], 0
je 0x14003a962
xor edx, edx
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
cmp qword [rsp + 0xc8], 0
je 0x14003a97a
mov rcx, qword [rsp + 0xc8]
call fcn.140046f30
mov eax, dword [rsp + 0x44]
mov rcx, qword [rsp + 0xe0]
xor rcx, rsp
call fcn.140041910
add rsp, 0xf0
pop rdi
ret