Function at 0x140007d40
Capabilities:
Create new key via cryptacquirecontext
Encrypt data using aes via winapi
Generate random numbers via winapi

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x50
mov rax, qword [0x14003d1c0]
xor rax, rsp
mov qword [rsp + 0x48], rax
xor edi, edi
mov dword [rsp + 0x20], 0xf0000000
mov rbx, rdx
mov qword [rsp + 0x38], rdi
mov rsi, rcx
mov qword [rsp + 0x40], rdi
xor r8d, r8d
lea rcx, [rsp + 0x38]
lea r9d, [rdi + 0x18]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x140007dc5
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.Error_in_CryptAcquireContext:
call fcn.140009890
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov rcx, rbx
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_int____ptr64]
mov rcx, rax
lea rdx, [0x140009a60]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
jmp 0x140007f94
mov rcx, qword [rsp + 0x38]
lea r9, [rsp + 0x40]
mov edx, 0x6610
mov r8d, 1
call qword [sym.imp.ADVAPI32.dll_CryptGenKey]
test eax, eax
jne 0x140007e20
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.Error_in_CryptGenKey:
call fcn.140009890
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov rcx, rbx
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_int____ptr64]
mov rcx, rax
lea rdx, [0x140009a60]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
jmp 0x140007f87
mov rcx, qword [rsp + 0x40]
lea rax, [rsp + 0x30]
xor r9d, r9d
mov qword [rsp + 0x28], rax
xor edx, edx
mov qword [rsp + 0x80], rbp
mov dword [rsp + 0x30], edi
mov qword [rsp + 0x20], rdi
lea r8d, [r9 + 8]
call qword [sym.imp.ADVAPI32.dll_CryptExportKey]
mov rbp, qword [rsi + 8]
mov rdx, qword [rsi]
mov rcx, rbp
mov edi, dword [rsp + 0x30]
sub rcx, rdx
cmp rdi, rcx
jae 0x140007e6b
lea rax, [rdx + rdi]
jmp 0x140007e9a
jbe 0x140007e9e
mov rax, qword [rsi + 0x10]
sub rax, rdx
cmp rdi, rax
jbe 0x140007e86
mov rdx, rdi
mov rcx, rsi
call fcn.140009ed0
jmp 0x140007e9e
sub rdi, rcx
xor edx, edx
mov r8, rdi
mov rcx, rbp
call sub.VCRUNTIME140.dll_memset
lea rax, [rdi + rbp]
mov qword [rsi + 8], rax
mov rax, qword [rsi]
lea rcx, [rsp + 0x30]
mov qword [rsp + 0x28], rcx
xor r9d, r9d
mov rcx, qword [rsp + 0x40]
xor edx, edx
mov qword [rsp + 0x20], rax
lea r8d, [r9 + 8]
call qword [sym.imp.ADVAPI32.dll_CryptExportKey]
mov rbp, qword [rsp + 0x80]
test eax, eax
jne 0x140007ed9
lea rdx, str.Error_in_CryptExportKey:
jmp 0x140007f4c
mov rsi, qword [rbx + 8]
mov rdx, qword [rbx]
mov rcx, rsi
sub rcx, rdx
cmp rcx, 0x10
jbe 0x140007ef2
lea rax, [rdx + 0x10]
jmp 0x140007f29
jae 0x140007f2d
mov rax, qword [rbx + 0x10]
sub rax, rdx
cmp rax, 0x10
jae 0x140007f10
mov edx, 0x10
mov rcx, rbx
call fcn.140009ed0
jmp 0x140007f2d
mov edi, 0x10
xor edx, edx
sub rdi, rcx
mov rcx, rsi
mov r8, rdi
call sub.VCRUNTIME140.dll_memset
lea rax, [rdi + rsi]
mov qword [rbx + 8], rax
mov r8, qword [rbx]
mov edx, dword [rbx + 8]
mov rcx, qword [rsp + 0x38]
sub edx, r8d
call qword [sym.imp.ADVAPI32.dll_CryptGenRandom]
test eax, eax
jne 0x140007f7c
lea rdx, str.Error_in_CryptGenRandom:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140009890
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov rcx, rbx
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_int____ptr64]
mov rcx, rax
lea rdx, [0x140009a60]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov rcx, qword [rsp + 0x38]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.140026720
add rsp, 0x50
pop rdi
pop rsi
pop rbx
ret