Function at 0x4017a2
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x38
or dword [ebp - 0x14], 0xffffffff
xor eax, eax
push ebx
push esi
push edi
mov edi, dword [ebp + 0x1c]
mov esi, eax
mov dword [ebp - 0x1c], edx
mov ebx, eax
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x18], 0x50415243
mov dword [ebp - 0x24], eax
mov dword [ebp - 8], esi
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 4], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x28], eax
cmp edi, 0x3fffffff
jbe 0x4017eb
mov esi, 0x80070057
jmp 0x401a3a
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x401822
mov edx, ecx
lea esi, [edx + 2]
mov ax, word [edx]
add edx, 2
cmp ax, word [ebp - 0x24]
jne 0x4017f7
sub edx, esi
lea eax, [ebp - 0xc]
push eax
sar edx, 1
lea eax, [ebp - 4]
push eax
inc edx
call fcn.004023d5
mov esi, eax
mov dword [ebp - 8], esi
test esi, esi
js 0x4019bd
shl edi, 2
xor eax, eax
push edi
push eax
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
mov dword [ebp - 0x2c], ebx
test ebx, ebx
jne 0x401842
mov esi, 0x8007000e
jmp 0x4019ba
push edi
xor eax, eax
push eax
push ebx
call sub.msvcrt.dll_memset
xor edx, edx
add esp, 0xc
mov edi, edx
cmp dword [ebp + 0x1c], edx
jbe 0x4019a2
mov ecx, dword [ebp + 0x18]
mov eax, ebx
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x24], ecx
push 8
push dword [ecx + 8]
push edx
push dword [ecx]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x401883
mov eax, dword [ebp - 0x10]
xor edx, edx
mov dword [eax], edx
jmp 0x4018e5
mov eax, dword [ebp - 4]
mov dword [ebp - 0x28], 1
test eax, eax
jne 0x4018bb
push dword [ebp + 0x20]
mov edx, dword [ebp - 0x20]
lea eax, [ebp - 0x18]
push ecx
mov ecx, dword [ebp - 0x10]
push 4
push eax
push dword [ebp - 0x1c]
mov ecx, dword [ecx]
call fcn.004015e7
mov esi, eax
mov dword [ebp - 8], esi
test esi, esi
jns 0x401990
mov eax, dword [ebp - 4]
push dword [ebp + 0x20]
mov edx, dword [ebp - 0x20]
push ecx
push dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x10]
push dword [ebp - 0x1c]
mov ecx, dword [eax]
call fcn.004015e7
mov esi, eax
mov dword [ebp - 8], esi
test esi, esi
jns 0x401990
mov eax, dword [ebp - 0x10]
xor edx, edx
mov ecx, dword [ebp - 0x24]
inc edi
add ecx, 0x1c
add eax, 4
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x10], eax
cmp edi, dword [ebp + 0x1c]
jb 0x401867
cmp dword [ebp - 0x28], 0
je 0x4019a2
mov eax, dword [ebp - 4]
test eax, eax
jne 0x4019c4
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x38], eax
lea eax, [ebp - 4]
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0xc]
mov dword [ebp - 4], edx
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x38]
push eax
push 0x402280
push dword [ebp + 0xc]
push 0x212
push dword [0x404370]
call dword [sym.imp.USER32.dll_DialogBoxParamW]
mov esi, eax
mov dword [ebp - 8], esi
test esi, esi
js 0x4019bd
mov eax, dword [ebp - 4]
test eax, eax
jne 0x401962
mov esi, 0x80070056
mov dword [ebp - 8], esi
jmp 0x4019df
xor ecx, ecx
mov edi, ecx
push dword [ebp + 0x20]
mov edx, dword [ebp - 0x20]
push ecx
push dword [ebp - 0xc]
mov ecx, dword [ebx + edi*4]
push eax
push dword [ebp - 0x1c]
call fcn.004015e7
mov esi, eax
mov dword [ebp - 8], esi
test esi, esi
jns 0x401990
inc edi
cmp edi, dword [ebp + 0x1c]
jae 0x4019bd
mov eax, dword [ebp - 4]
jmp 0x401966
mov eax, dword [ebp + 0x24]
mov ecx, dword [ebx + edi*4]
mov dword [ebp - 0x14], edi
mov dword [eax], edi
mov eax, dword [ebp + 0x28]
mov dword [eax], ecx
jmp 0x4019bd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [ebp - 8], esi
test esi, esi
jle 0x4019bd
movzx esi, si
or esi, 0x80070000
mov dword [ebp - 8], esi
mov eax, dword [ebp - 4]
test eax, eax
je 0x4019df
mov ecx, dword [ebp - 0xc]
test ecx, ecx
je 0x4019d8
xor edx, edx
mov byte [eax], dl
inc eax
sub ecx, 1
jne 0x4019cd
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
test ebx, ebx
je 0x401a3a
mov eax, dword [ebp + 0x1c]
xor edx, edx
mov edi, edx
test eax, eax
je 0x401a33
mov esi, dword [ebp + 0x18]
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x28], ebx
cmp edi, ecx
je 0x401a22
cmp dword [ebx], 0
je 0x401a0b
push edx
push dword [ebx]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
xor edx, edx
push 0x10
push dword [esi + 8]
push edx
push dword [esi]
push ebx
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
mov eax, dword [ebp + 0x1c]
xor edx, edx
mov ecx, dword [ebp - 0x14]
inc edi
add ebx, 4
add esi, 0x1c
cmp edi, eax
jb 0x4019f7
mov esi, dword [ebp - 8]
mov ebx, dword [ebp - 0x2c]
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 0x24