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

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r14
mov rbp, rsp
sub rsp, 0x70
mov r12, r9
mov dword [rsp + 0x20], 0xf0000000
mov ebx, r8d
mov rsi, rdx
mov rdi, rcx
xor r14d, r14d
xor r8d, r8d
lea rcx, [rbp - 0x28]
xor edx, edx
lea r9d, [r14 + 0x18]
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x140008998
mov rcx, qword [rbp - 0x28]
lea rax, [rbp - 0x30]
mov qword [rsp + 0x28], rax
xor r9d, r9d
mov r8d, ebx
mov dword [rsp + 0x20], r14d
mov rdx, rsi
call qword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
je 0x14000898c
mov edx, dword [rdi + 4]
lea ecx, [r14 + 0x40]
mov dword [rbp - 0x40], edx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rbx, rax
test rax, rax
je 0x140008982
mov r8d, dword [rbp - 0x40]
mov rcx, rax
mov rdx, qword [rdi + 0x1c]
call fcn.14011b4a0
mov rcx, qword [rbp - 0x30]
lea rax, [rbp - 0x40]
mov qword [rsp + 0x28], rax
lea r8d, [r14 + 1]
xor r9d, r9d
mov qword [rsp + 0x20], rbx
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
je 0x140008965
lea rcx, str._nRSA_decrypt_is_a_success_n
call fcn.14000afb0
mov edx, dword [rbx]
lea rcx, str.__MasterKey_len:__u_n
call fcn.14000afb0
mov edx, dword [rbx]
lea rcx, [rbx + 8]
mov r8d, 0x100001
call fcn.1400124b0
mov edx, dword [rbx + 4]
lea rcx, str.__SuppKey___len:__u_n
call fcn.14000afb0
mov ecx, dword [rbx]
mov r8d, 0x100001
mov edx, dword [rbx + 4]
add rcx, 8
add rcx, rbx
call fcn.1400124b0
mov edx, dword [rbx]
lea rax, [rbp - 0x20]
mov qword [rsp + 0x28], rax
lea r8d, [r14 + 0x18]
add rdx, 8
lea rax, [rbp - 0x38]
add rdx, rbx
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov ecx, 0x6603
call fcn.140003fd0
test eax, eax
je 0x140008979
mov r8d, dword [rbx]
lea edx, [r14 + 1]
mov rcx, qword [rbp - 0x38]
add r8, 0x20
add r8, rbx
xor r9d, r9d
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x14000892b
mov edx, dword [rdi + 8]
lea ecx, [r14 + 0x40]
mov dword [rbp - 0x40], edx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rsi, rax
test rax, rax
je 0x14000893f
mov r8d, dword [rbp - 0x40]
mov rcx, rax
mov rdx, qword [rdi + 0x24]
mov qword [rsp + 0xa0], r13
mov qword [rsp + 0xa8], r15
call fcn.14011b4a0
mov rcx, qword [rbp - 0x38]
lea rax, [rbp - 0x40]
mov qword [rsp + 0x28], rax
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rsi
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
je 0x1400088fc
mov r13d, dword [rsi + 4]
lea rcx, str._n3DES_decrypt_is_a_success_too_n
add r13, 8
add r13, rsi
call fcn.14000afb0
mov edx, dword [rbp - 0x40]
mov r8d, 0x100001
mov rcx, rsi
call fcn.1400124b0
lea rcx, reloc.Cabinet.dll_FCICreate
call fcn.14000afb0
lea rcx, str.__nonce____:
call fcn.14000afb0
mov edx, dword [rsi + 4]
lea rcx, [rsi + 8]
xor r8d, r8d
call fcn.1400124b0
lea rcx, reloc.Cabinet.dll_FCICreate
call fcn.14000afb0
lea rcx, str.__SID______:
call fcn.14000afb0
mov rcx, r13
call fcn.140012710
lea rcx, reloc.Cabinet.dll_FCICreate
call fcn.14000afb0
lea rcx, str.__SHA1_____:
call fcn.14000afb0
mov ecx, dword [rbp - 0x40]
mov edi, SQLAllocHandle
add rcx, 0xffffffffffffffec
xor r8d, r8d
add rcx, rsi
mov edx, edi
call fcn.1400124b0
lea rcx, reloc.Cabinet.dll_FCICreate
call fcn.14000afb0
mov r8d, dword [rbp - 0x40]
lea r9, [rbp - 0x18]
add r8d, 0xffffffec
mov dword [rsp + 0x20], edi
mov rdx, rsi
mov ecx, 0x8004
call fcn.1400032b0
test eax, eax
je 0x140008910
lea rcx, str.___Calc_SHA1:
call fcn.14000afb0
mov rcx, qword [0x140144a58]
lea rax, [rbp - 0x18]
movzx edx, byte [rax]
call fcn.14000afb0
lea rax, [rax + 1]
sub rdi, 1
jne 0x140008817
lea rcx, reloc.Cabinet.dll_FCICreate
call fcn.14000afb0
mov ecx, dword [rbp - 0x40]
mov rax, qword [rcx + rsi - 0x14]
cmp rax, qword [rbp - 0x18]
jne 0x140008910
mov rax, qword [rcx + rsi - 0xc]
cmp rax, qword [rbp - 0x10]
jne 0x140008910
mov eax, dword [rcx + rsi - 4]
cmp eax, dword [rbp - 8]
jne 0x140008910
mov edx, dword [rbx]
lea ecx, [rdi + 0x40]
mov r15, qword [rbp + 0x50]
mov dword [r15], edx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [r12], rax
test rax, rax
je 0x140008910
mov r8d, dword [r15]
lea rdx, [rbx + 8]
mov rcx, rax
call fcn.14011b4a0
mov rdi, qword [rbp + 0x58]
mov rcx, r13
mov qword [rdi], r14
call qword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov edx, eax
mov ecx, 0x40
mov dword [rbp - 0x40], eax
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rdi], rax
test rax, rax
je 0x1400088cf
mov ecx, dword [rbp - 0x40]
mov r8, r13
mov rdx, rax
call qword [sym.imp.ADVAPI32.dll_CopySid]
mov r14d, eax
test eax, eax
jne 0x140008910
mov rcx, qword [r12]
test rcx, rcx
je 0x1400088e2
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov qword [r12], rax
mov rcx, qword [rdi]
test rcx, rcx
je 0x1400088f3
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov qword [rdi], rax
mov dword [r15], 0
jmp 0x140008910
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ERROR_kull_m_dpapi_unprotect_domainkey_with_key___CryptDecrypt__0x_08x__n
call fcn.14000afb0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov r15, qword [rsp + 0xa8]
mov r13, qword [rsp + 0xa0]
jmp 0x14000893f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ERROR_kull_m_dpapi_unprotect_domainkey_with_key___CryptSetKeyParam__0x_08x__n
call fcn.14000afb0
mov rcx, qword [rbp - 0x38]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov rcx, qword [rbp - 0x20]
call fcn.140003460
test eax, eax
jne 0x140008979
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kull_m_dpapi_unprotect_domainkey_with_key___kull_m_crypto_close_hprov_delete_container__0x_08x__n
jmp 0x140008972
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kull_m_dpapi_unprotect_domainkey_with_key___CryptDecrypt__0x_08x__n
mov edx, eax
call fcn.14000afb0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rbp - 0x30]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov rcx, qword [rbp - 0x28]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov rbx, qword [rsp + 0xb0]
mov eax, r14d
add rsp, 0x70
pop r14
pop r12
pop rdi
pop rsi
pop rbp
ret