Function at 0x140007670
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
mov dword [rsp + 0x20], r9d
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov dword [rsp + 8], ecx
sub rsp, 0x78
mov dword [rsp + 0x58], 0
call fcn.140020790
mov qword [rsp + 0x68], rax
cmp qword [rsp + 0x68], 0
je 0x140007a9d
mov dword [rsp + 0x20], 8
mov r9d, reloc.ODBC32.dll_SQLAllocHandle
xor r8d, r8d
mov rdx, qword [rsp + 0x68]
mov rcx, qword [rsp + 0xa8]
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x140007a92
mov qword [rsp + 0x50], 0
lea r9, [rsp + 0x50]
mov r8d, 0x2000001
mov edx, 1
mov rax, qword [rsp + 0xa8]
mov rcx, qword [rax]
call qword [sym.imp.ADVAPI32.dll_CryptGenKey]
test eax, eax
je 0x140007a68
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0
xor r9d, r9d
mov r8d, 7
xor edx, edx
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_CryptExportKey]
test eax, eax
je 0x140007a68
mov eax, dword [rsp + 0x40]
mov edx, eax
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rsp + 0x60], rax
cmp qword [rsp + 0x60], 0
je 0x140007a68
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov r8d, 7
xor edx, edx
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_CryptExportKey]
test eax, eax
je 0x140007a5d
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov qword [rsp + 0x50], 0
xor edx, edx
mov rax, qword [rsp + 0x60]
mov eax, dword [rax + 0xc]
mov ecx, 8
div ecx
mov dword [rsp + 0x44], eax
mov rax, qword [rsp + 0x60]
mov dword [rax + 0x10], 1
mov rax, qword [rsp + 0x60]
add rax, 0x14
mov qword [rsp + 0x38], rax
mov eax, dword [rsp + 0x44]
shl eax, 1
mov eax, eax
mov rcx, qword [rsp + 0x38]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
mov byte [rax], 1
xor edx, edx
mov eax, dword [rsp + 0x44]
mov ecx, 2
div ecx
dec eax
mov eax, eax
mov rcx, qword [rsp + 0x38]
inc rcx
mov r8d, eax
xor edx, edx
call fcn.140161800
xor edx, edx
mov eax, dword [rsp + 0x44]
mov ecx, 2
div ecx
mov eax, eax
mov rcx, qword [rsp + 0x38]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
mov byte [rax], 1
xor edx, edx
mov eax, dword [rsp + 0x44]
mov ecx, 2
div ecx
dec eax
mov eax, eax
mov rcx, qword [rsp + 0x38]
inc rcx
mov r8d, eax
xor edx, edx
call fcn.140161800
mov eax, dword [rsp + 0x44]
mov rcx, qword [rsp + 0x38]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
mov byte [rax], 1
xor edx, edx
mov eax, dword [rsp + 0x44]
mov ecx, 2
div ecx
dec eax
mov eax, eax
mov rcx, qword [rsp + 0x38]
inc rcx
mov r8d, eax
xor edx, edx
call fcn.140161800
lea rax, [rsp + 0x50]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0
xor r9d, r9d
mov r8d, dword [rsp + 0x40]
mov rdx, qword [rsp + 0x60]
mov rax, qword [rsp + 0xa8]
mov rcx, qword [rax]
call qword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
je 0x140007a5d
mov dword [rsp + 0x40], Ordinal_77
mov eax, dword [rsp + 0x40]
mov edx, eax
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0
je 0x140007a5d
mov rax, qword [rsp + 0x48]
mov byte [rax], 1
mov rax, qword [rsp + 0x48]
mov byte [rax + 1], 2
xor eax, eax
mov rcx, qword [rsp + 0x48]
mov word [rcx + 2], ax
mov rax, qword [rsp + 0x48]
mov ecx, dword [rsp + 0x80]
mov dword [rax + 4], ecx
mov rax, qword [rsp + 0x48]
add rax, 8
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
mov dword [rax], 0xa400
mov rax, qword [rsp + 0x38]
add rax, 4
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 0
jmp 0x14000795f
mov eax, dword [rsp + 0x30]
inc eax
mov dword [rsp + 0x30], eax
mov eax, dword [rsp + 0x90]
cmp dword [rsp + 0x30], eax
jae 0x14000799a
mov eax, dword [rsp + 0x30]
mov ecx, dword [rsp + 0x90]
sub ecx, eax
mov eax, ecx
dec eax
mov eax, eax
mov ecx, dword [rsp + 0x30]
mov rdx, qword [rsp + 0x38]
mov r8, qword [rsp + 0x88]
movzx eax, byte [r8 + rax]
mov byte [rdx + rcx], al
jmp 0x140007955
mov eax, dword [rsp + 0x90]
inc eax
mov eax, eax
mov rcx, qword [rsp + 0x38]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 0
jmp 0x1400079c9
mov eax, dword [rsp + 0x30]
inc eax
mov dword [rsp + 0x30], eax
mov eax, dword [rsp + 0x30]
mov ecx, dword [rsp + 0x40]
mov edx, dword [rsp + 0x90]
add rdx, 0xf
sub rcx, rdx
cmp rax, rcx
jae 0x140007a04
mov eax, dword [rsp + 0x30]
mov rcx, qword [rsp + 0x38]
movzx eax, byte [rcx + rax]
test eax, eax
jne 0x140007a02
mov eax, dword [rsp + 0x30]
mov rcx, qword [rsp + 0x38]
mov byte [rcx + rax], Ordinal_69
jmp 0x1400079bf
mov eax, dword [rsp + 0x40]
sub eax, 2
mov eax, eax
mov rcx, qword [rsp + 0x48]
mov byte [rcx + rax], 2
mov rax, qword [rsp + 0xa0]
mov qword [rsp + 0x28], rax
mov eax, dword [rsp + 0x98]
mov dword [rsp + 0x20], eax
mov r9, qword [rsp + 0x50]
mov r8d, dword [rsp + 0x40]
mov rdx, qword [rsp + 0x48]
mov rax, qword [rsp + 0xa8]
mov rcx, qword [rax]
call qword [sym.imp.ADVAPI32.dll_CryptImportKey]
mov dword [rsp + 0x58], eax
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_LocalFree]
cmp qword [rsp + 0x50], 0
je 0x140007a7b
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
cmp dword [rsp + 0x58], 0
jne 0x140007a92
mov rax, qword [rsp + 0xa8]
mov rcx, qword [rax]
call fcn.1400069e0
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [rsp + 0x58]
add rsp, 0x78
ret