Function at 0x14005c020
Capabilities:
Create new key via cryptacquirecontext
Encrypt data using aes via winapi

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r15
lea rbp, [rsp - 0x120]
sub rsp, 0x220
mov qword [rsp + 0x78], 0xfffffffffffffffe
mov rax, qword [0x1400c7008]
xor rax, rsp
mov qword [rbp + 0x110], rax
mov rsi, r8
mov rbx, rcx
mov rdi, qword [rbp + 0x170]
xor r15d, r15d
mov qword [r9], r15
mov qword [rdi + 0x10], r15
cmp qword [rdi + 0x18], 8
jb 0x14005c073
mov rax, qword [rdi]
jmp 0x14005c076
mov rax, rdi
mov word [rax], r15w
mov rcx, qword [rdx + 0x10]
test rcx, rcx
sete al
test al, al
jne 0x14005c122
mov qword [rsp + 0x30], r15
mov dword [rbp + 0x90], r15d
cmp qword [rdx + 0x18], 0x10
jb 0x14005c0a2
mov rdx, qword [rdx]
lea rax, [rbp + 0x90]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x30]
mov qword [rsp + 0x20], rax
mov r9d, 1
mov r8d, ecx
call fcn.14005c6a0
test al, al
jne 0x14005c129
lea rdx, str.Failed_to_import_AES_key:_Failed_to_convert_base64_key
lea rcx, [rbp - 0x80]
call fcn.14004a840
nop
mov rdx, rax
lea rcx, [rsp + 0x38]
call fcn.14005c780
mov rbx, rax
cmp rdi, rax
je 0x14005c109
xor r8d, r8d
mov dl, 1
mov rcx, rdi
call fcn.140023400
mov rdx, rbx
mov rcx, rdi
call fcn.140022fc0
nop
xor r8d, r8d
mov dl, 1
lea rcx, [rsp + 0x38]
call fcn.140023400
nop
lea rcx, [rbp - 0x80]
call fcn.140047e70
xor al, al
jmp 0x14005c5fa
mov byte [rbp + 0xe0], r15b
xor eax, eax
mov qword [rbp + 0xe1], rax
mov qword [rbp + 0xe9], rax
mov qword [rbp + 0xf1], rax
mov dword [rbp + 0xf9], eax
mov word [rbp + 0xfd], ax
mov byte [rbp + 0xff], al
mov qword [rbp + 0xa0], r15
mov rax, qword [rbx]
movsxd r8, dword [rbp + 0x90]
lea rcx, [rbp + 0xa0]
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], 0x20
lea r9, [rbp + 0xe0]
mov rdx, qword [rsp + 0x30]
mov rcx, rbx
call qword [rax + 0x28]
mov rcx, qword [rsp + 0x30]
test al, al
jne 0x14005c232
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea rdx, str.Failed_to_import_AES_key:__1_
lea rcx, [rbp - 0x80]
call fcn.14004a840
nop
lea rcx, [rbx + 0x38]
mov qword [rsp + 0x38], rcx
lea rcx, [fcn.140005730]
mov qword [rsp + 0x40], rcx
lea rcx, [0x14004baa0]
mov qword [rsp + 0x48], rcx
lea rdx, [rsp + 0x38]
mov rcx, rax
call fcn.14004ba20
mov rdx, rax
lea rcx, [rsp + 0x58]
call fcn.14005c780
mov rbx, rax
cmp rdi, rax
je 0x14005c212
xor r8d, r8d
mov dl, 1
mov rcx, rdi
call fcn.140023400
mov rdx, rbx
mov rcx, rdi
call fcn.140022fc0
nop
xor r8d, r8d
mov dl, 1
lea rcx, [rsp + 0x58]
call fcn.140023400
nop
lea rcx, [rbp - 0x80]
call fcn.140047e70
xor al, al
jmp 0x14005c5fa
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rsp + 0x30], r15
mov dword [rbp + 0x90], r15d
mov rax, qword [rsi + 0x10]
cmp qword [rsi + 0x18], 0x10
jb 0x14005c252
mov rsi, qword [rsi]
lea rcx, [rbp + 0x90]
mov qword [rsp + 0x28], rcx
lea rcx, [rsp + 0x30]
mov qword [rsp + 0x20], rcx
mov r9d, 1
mov r8d, eax
mov rdx, rsi
call fcn.14005c6a0
test al, al
jne 0x14005c2c6
lea rdx, str.Failed_to_import_AES_key:_Failed_to_convert_base64_key
lea rcx, [rbp - 0x80]
call fcn.14004a840
nop
mov rdx, rax
lea rcx, [rsp + 0x58]
call fcn.14005c780
mov rdx, rax
mov rcx, rdi
call fcn.14004e170
xor r8d, r8d
mov dl, 1
lea rcx, [rsp + 0x58]
call fcn.140023400
nop
lea rcx, [rbp - 0x80]
call fcn.140047e70
xor al, al
jmp 0x14005c5fa
xorps xmm0, xmm0
movdqu xmmword [rbp + 0x100], xmm0
mov qword [rbp + 0xa8], r15
mov rax, qword [rbx]
movsxd r8, dword [rbp + 0x90]
lea rcx, [rbp + 0xa8]
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], shutdown
lea r9, [rbp + 0x100]
mov rsi, qword [rsp + 0x30]
mov rdx, rsi
mov rcx, rbx
call qword [rax + 0x28]
mov rcx, rsi
test al, al
jne 0x14005c36e
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea rdx, str.Failed_to_import_AES_key:__1_
lea rcx, [rbp - 0x80]
call fcn.14004a840
nop
lea rdx, [rbx + 0x38]
mov rcx, rax
call fcn.14004bab0
mov rdx, rax
lea rcx, [rsp + 0x58]
call fcn.14005c780
mov rdx, rax
mov rcx, rdi
call fcn.14004e170
xor r8d, r8d
mov dl, 1
lea rcx, [rsp + 0x58]
call fcn.140023400
nop
lea rcx, [rbp - 0x80]
call fcn.140047e70
xor al, al
jmp 0x14005c5fa
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov dword [rbp + 0xb4], 0x6610
mov dword [rbp + 0xb0], 0x208
mov dword [rbp + 0xb8], 0x20
movups xmm0, xmmword [rbp + 0xe0]
movups xmmword [rbp + 0xbc], xmm0
movups xmm1, xmmword [rbp + 0xf0]
movups xmmword [rbp + 0xcc], xmm1
mov dword [rsp + 0x20], 0xf0000048
mov r9d, 0x18
lea r8, str.Microsoft_Enhanced_RSA_and_AES_Cryptographic_Provider
xor edx, edx
lea rcx, [rbp + 0x98]
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x14005c468
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp + 0x90], eax
mov edx, eax
lea rcx, [rsp + 0x38]
call fcn.140059d60
mov rbx, rax
lea rdx, str.Failed_to_import_AES_key:__1_x:__2_
lea rcx, [rbp - 0x80]
call fcn.14004a840
nop
lea rdx, [rbp + 0x90]
mov rcx, rax
call fcn.14005c7b0
mov rcx, rax
mov rdx, rbx
call fcn.14004bab0
mov rdx, rax
lea rcx, [rsp + 0x58]
call fcn.14005c780
mov rdx, rax
mov rcx, rdi
call fcn.14004e170
xor r8d, r8d
mov dl, 1
lea rcx, [rsp + 0x58]
call fcn.140023400
nop
lea rcx, [rbp - 0x80]
call fcn.140047e70
nop
xor r8d, r8d
mov dl, 1
lea rcx, [rsp + 0x38]
call fcn.140023400
xor al, al
jmp 0x14005c5fa
lea rsi, [rbx + 0x30]
mov qword [rsp + 0x28], rsi
mov dword [rsp + 0x20], r15d
xor r9d, r9d
lea r8d, [r9 + 0x2c]
lea rdx, [rbp + 0xb0]
mov rcx, qword [rbp + 0x98]
call qword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
jne 0x14005c536
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp + 0x90], eax
mov edx, eax
lea rcx, [rsp + 0x38]
call fcn.140059d60
mov rbx, rax
lea rdx, str.Failed_to_import_AES_key:__1_x:__2_
lea rcx, [rbp - 0x80]
call fcn.14004a840
nop
lea rdx, [rbp + 0x90]
mov rcx, rax
call fcn.14005c7b0
mov rcx, rax
mov rdx, rbx
call fcn.14004bab0
mov rdx, rax
lea rcx, [rsp + 0x58]
call fcn.14005c780
mov rdx, rax
mov rcx, rdi
call fcn.14004e170
xor r8d, r8d
mov dl, 1
lea rcx, [rsp + 0x58]
call fcn.140023400
nop
lea rcx, [rbp - 0x80]
call fcn.140047e70
nop
xor r8d, r8d
mov dl, 1
lea rcx, [rsp + 0x38]
call fcn.140023400
xor edx, edx
mov rcx, qword [rbp + 0x98]
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
xor al, al
jmp 0x14005c5fa
xor r9d, r9d
lea r8, [rbp + 0x100]
lea edx, [r9 + 1]
mov rcx, qword [rsi]
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
jne 0x14005c5f8
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp + 0x90], eax
mov edx, eax
lea rcx, [rsp + 0x38]
call fcn.140059d60
mov rbx, rax
lea rdx, str.Failed_to_import_AES_key:__1_x:__2_
lea rcx, [rbp - 0x80]
call fcn.14004a840
nop
lea rdx, [rbp + 0x90]
mov rcx, rax
call fcn.14005c7b0
mov rcx, rax
mov rdx, rbx
call fcn.14004bab0
mov rdx, rax
lea rcx, [rsp + 0x58]
call fcn.14005c780
mov rdx, rax
mov rcx, rdi
call fcn.14004e170
xor r8d, r8d
mov dl, 1
lea rcx, [rsp + 0x58]
call fcn.140023400
nop
lea rcx, [rbp - 0x80]
call fcn.140047e70
nop
xor r8d, r8d
mov dl, 1
lea rcx, [rsp + 0x38]
call fcn.140023400
mov rcx, qword [rsi]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
xor edx, edx
mov rcx, qword [rbp + 0x98]
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
xor al, al
jmp 0x14005c5fa
mov al, 1
mov rcx, qword [rbp + 0x110]
xor rcx, rsp
call fcn.140062f80
add rsp, 0x220
pop r15
pop rdi
pop rsi
pop rbx
pop rbp
ret