Function at 0x140010008
Capabilities:
Create new key via cryptacquirecontext
Encrypt data using des via winapi
Encrypt or decrypt via wincrypt

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x78
mov r15, r9
mov esi, r8d
mov rdi, rdx
mov r13, rcx
mov dword [rsp + 0x20], 0xf0000000
xor ebx, ebx
lea rcx, [rsp + 0x48]
xor edx, edx
xor r8d, r8d
mov r9d, Ordinal_26
call qword [sym.imp.advapi32.dll_CryptAcquireContextW]
test eax, eax
je 0x140010350
mov rcx, qword [rsp + 0x48]
lea rax, [rsp + 0x50]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0
xor ebx, ebx
mov rdx, rdi
mov r8d, esi
xor r9d, r9d
call qword [sym.imp.advapi32.dll_CryptImportKey]
test eax, eax
je 0x140010343
mov edi, dword [r13 + 4]
mov dword [rsp + 0x3c], edi
mov ecx, 0x40
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
test rax, rax
je 0x1400102bc
mov rsi, rax
mov rdx, qword [r13 + 0x1c]
mov rcx, rax
mov r8, rdi
call fcn.1400eeb30
mov rcx, qword [rsp + 0x50]
lea rdi, [rsp + 0x3c]
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rsi
xor ebx, ebx
xor edx, edx
mov r8d, 1
xor r9d, r9d
call qword [sym.imp.advapi32.dll_CryptDecrypt]
test eax, eax
je 0x1400102c0
mov eax, dword [rsi]
lea r8, [rsi + rax]
add r8, 8
mov rcx, qword [rsp + 0x48]
lea rax, [rsp + 0x58]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0
mov edx, 0x6603
mov r9d, Ordinal_26
call fcn.140006d05
test eax, eax
je 0x14001032f
mov r12, rsi
add r12, 8
mov eax, dword [rsi]
lea r8, [r12 + rax]
add r8, 0x18
mov rcx, qword [rsp + 0x40]
xor ebx, ebx
mov edx, 1
xor r9d, r9d
call qword [sym.imp.advapi32.dll_CryptSetKeyParam]
test eax, eax
je 0x1400102cf
mov edx, dword [r13 + 8]
mov dword [rsp + 0x3c], edx
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
test rax, rax
je 0x140010302
mov r14, rax
mov rdx, qword [r13 + 0x24]
mov r8d, dword [rsp + 0x3c]
mov rcx, rax
call fcn.1400eeb30
mov rcx, qword [rsp + 0x40]
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], r14
xor ebx, ebx
xor edx, edx
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.advapi32.dll_CryptDecrypt]
test eax, eax
je 0x1400102e5
mov edi, dword [r14 + 4]
mov r8d, dword [rsp + 0x3c]
add r8d, 0xffffffec
mov dword [rsp + 0x20], Ordinal_26
lea r9, [rsp + 0x60]
mov ecx, 0x8004
mov rdx, r14
call fcn.140006b54
test eax, eax
je 0x1400102f9
mov eax, dword [rsp + 0x3c]
movdqu xmm0, xmmword [r14 + rax - 0x14]
movd xmm1, dword [r14 + rax - 4]
movd xmm2, dword [rsp + 0x70]
pcmpeqb xmm0, xmmword [rsp + 0x60]
pcmpeqb xmm2, xmm1
pand xmm0, xmm2
pmovmskb eax, xmm0
cmp eax, 0xffff
jne 0x1400102f9
mov r13, qword [rsp + 0xe0]
mov edx, dword [rsi]
mov dword [r13], edx
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [r15], rax
test rax, rax
je 0x1400102f9
mov rbp, qword [rsp + 0xe8]
add rdi, r14
add rdi, 8
mov r8d, dword [r13]
mov rcx, rax
mov rdx, r12
call fcn.1400eeb30
mov qword [rbp], 0
mov rcx, rdi
call qword [sym.imp.advapi32.dll_GetLengthSid]
mov dword [rsp + 0x3c], eax
mov edx, eax
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rbp], rax
test rax, rax
je 0x14001028c
mov ecx, dword [rsp + 0x3c]
mov rdx, rax
mov r8, rdi
call qword [sym.imp.advapi32.dll_CopySid]
mov ebx, eax
test eax, eax
jne 0x1400102f9
mov rcx, qword [r15]
test rcx, rcx
je 0x14001029d
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov qword [r15], rax
mov rcx, qword [rbp]
test rcx, rcx
je 0x1400102b0
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov qword [rbp], rax
mov dword [r13], 0
xor ebx, ebx
jmp 0x1400102f9
xor ebx, ebx
jmp 0x140010338
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [0x1401417b0]
jmp 0x140010328
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.5p_p_p_p_pPpPpKpPp3p
mov edx, eax
call fcn.140016430
jmp 0x140010302
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [0x1401417b0]
mov edx, eax
call fcn.140016430
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.advapi32.dll_CryptDestroyKey]
mov rcx, qword [rsp + 0x58]
call fcn.14000723a
test eax, eax
jne 0x14001032f
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__2_2___2__________v_
mov edx, eax
call fcn.140016430
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.advapi32.dll_CryptDestroyKey]
mov rcx, qword [rsp + 0x48]
xor edx, edx
call qword [sym.imp.advapi32.dll_CryptReleaseContext]
mov eax, ebx
add rsp, 0x78
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret