Function at 0x403cc7
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
sub esp, 0x18
push ebp
push esi
mov dword [esp + 0x1c], edx
xor esi, esi
mov dword [esp + 0x18], ecx
call fcn.0040f914
mov ebp, eax
mov dword [esp + 0x14], ebp
test ebp, ebp
je 0x403ed1
push ebx
mov ebx, dword [esp + 0x34]
push 8
push 0x18
push esi
push ebp
push ebx
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x403ec9
lea eax, [esp + 0xc]
mov dword [esp + 0xc], esi
push eax
push 0x2000001
push 1
push dword [ebx]
call dword [sym.imp.ADVAPI32.dll_CryptGenKey]
test eax, eax
je 0x403ead
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_CryptExportKey]
lea eax, [esp + 0x14]
push eax
push esi
push esi
push 7
push esi
push dword [esp + 0x24]
call edi
test eax, eax
je 0x403eac
push dword [esp + 0x14]
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebp, eax
mov dword [esp + 0x18], ebp
test ebp, ebp
je 0x403ea8
lea eax, [esp + 0x14]
push eax
push ebp
push esi
push 7
push esi
push dword [esp + 0x24]
call edi
test eax, eax
je 0x403ea1
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov dword [esp + 0x10], esi
mov ebx, dword [ebp + 0xc]
shr ebx, 3
mov dword [ebp + 0x10], 1
mov esi, ebx
shr esi, 1
lea ebp, [ebp + ebx*2]
add ebp, 0x14
lea edi, [esi - 1]
push edi
push 0
lea eax, [ebp + 1]
mov byte [ebp], 1
push eax
call fcn.0049ee30
add ebp, esi
xor esi, esi
push edi
push esi
lea eax, [ebp + 1]
mov byte [ebp], 1
push eax
call fcn.0049ee30
push edi
lea eax, [ebx + 1]
mov byte [ebp + ebx], 1
add eax, ebp
push esi
push eax
call fcn.0049ee30
mov ebx, dword [esp + 0x5c]
lea eax, [esp + 0x34]
mov ebp, dword [esp + 0x3c]
add esp, 0x24
push eax
push esi
push esi
push dword [esp + 0x20]
push ebp
push dword [ebx]
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
je 0x403ea1
push 0x4c
pop eax
push eax
push 0x40
mov dword [esp + 0x1c], eax
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
je 0x403ea1
mov eax, dword [esp + 0x20]
lea edx, [edi + 0xc]
mov ecx, dword [esp + 0x2c]
mov ebp, esi
mov dword [edi], 0x201
mov dword [edi + 4], eax
mov dword [edi + 8], 0xa400
test ecx, ecx
je 0x403e4a
lea ebx, [ecx - 1]
add ebx, dword [esp + 0x24]
mov al, byte [ebx]
mov byte [edx + ebp], al
inc ebp
dec ebx
cmp ebp, ecx
jb 0x403e3b
mov ebx, dword [esp + 0x38]
lea ebp, [edx + ecx]
mov edx, dword [esp + 0x14]
mov eax, edx
sub eax, ecx
sub eax, 0xf
je 0x403e76
cmp byte [esi + ebp + 1], 0
jne 0x403e6a
mov byte [esi + ebp + 1], 0x42
mov edx, dword [esp + 0x14]
mov eax, edx
inc esi
sub eax, ecx
sub eax, 0xf
cmp esi, eax
jb 0x403e5a
push dword [esp + 0x34]
mov byte [edi + edx - 2], 2
push dword [esp + 0x34]
push dword [esp + 0x18]
push dword [esp + 0x20]
push edi
push dword [ebx]
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ebp, dword [esp + 0x18]
push ebp
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ebp, dword [esp + 0x1c]
pop edi
cmp dword [esp + 0xc], 0
je 0x403ebe
push dword [esp + 0xc]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
test esi, esi
jne 0x403ec9
mov ecx, dword [ebx]
call fcn.004035a7
push ebp
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop ebx
mov eax, esi
pop esi
pop ebp
add esp, 0x18
ret