Function at 0x403b70
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push edi
xor edi, edi
mov dword [ebp - 0xc], edi
call fcn.0040f198
mov dword [ebp - 0x18], eax
cmp eax, edi
je 0x403d66
push esi
mov esi, dword [ebp + 0x1c]
push 8
push 0x18
push edi
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x403d5c
lea eax, [ebp - 4]
push eax
push 0x2000001
push 1
push dword [esi]
mov dword [ebp - 4], edi
call dword [sym.imp.ADVAPI32.dll_CryptGenKey]
test eax, eax
je 0x403d3e
mov esi, dword [sym.imp.ADVAPI32.dll_CryptExportKey]
lea eax, [ebp - 8]
push eax
push edi
push edi
push 7
push edi
push dword [ebp - 4]
call esi
test eax, eax
je 0x403d3e
push ebx
push dword [ebp - 8]
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
cmp ebx, edi
je 0x403d3d
lea eax, [ebp - 8]
push eax
push ebx
push edi
push 7
push edi
push dword [ebp - 4]
call esi
test eax, eax
je 0x403d36
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov dword [ebp - 4], edi
mov edi, dword [ebx + 0xc]
shr edi, 3
mov eax, edi
shr eax, 1
mov dword [ebp - 0x14], eax
dec eax
push eax
lea esi, [ebx + edi*2 + 0x14]
mov dword [ebp - 0x10], eax
lea eax, [esi + 1]
push 0
mov dword [ebx + 0x10], 1
push eax
mov byte [esi], 1
call sub.msvcrt.dll_memset
add esi, dword [ebp - 0x14]
push dword [ebp - 0x10]
lea eax, [esi + 1]
push 0
push eax
mov byte [esi], 1
call sub.msvcrt.dll_memset
push dword [ebp - 0x10]
add esi, edi
xor edi, edi
mov byte [esi], 1
push edi
inc esi
push esi
call sub.msvcrt.dll_memset
add esp, 0x24
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp + 0x1c]
push edi
push edi
push dword [ebp - 8]
push ebx
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
je 0x403d34
push 0x4c
pop eax
push eax
push 0x40
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
je 0x403d34
mov edi, dword [ebp + 0x10]
xor eax, eax
mov word [esi + 2], ax
mov eax, dword [ebp + 8]
mov dword [esi + 4], eax
lea eax, [esi + 8]
mov byte [esi], 1
mov byte [esi + 1], 2
mov dword [eax], 0xa400
add eax, 4
xor ecx, ecx
test edi, edi
jbe 0x403ce3
mov edx, dword [ebp + 0xc]
lea edx, [edx + edi - 1]
mov dword [ebp - 0xc], edx
mov edx, dword [ebp - 0xc]
mov dl, byte [edx]
mov byte [ecx + eax], dl
inc ecx
dec dword [ebp - 0xc]
cmp ecx, edi
jb 0x403cd3
mov edx, dword [ebp - 8]
sub edx, edi
xor ecx, ecx
sub edx, 0xf
lea eax, [eax + edi + 1]
je 0x403d0a
cmp byte [ecx + eax], 0
jne 0x403cfd
mov byte [ecx + eax], 0x42
mov edx, dword [ebp - 8]
sub edx, edi
inc ecx
sub edx, 0xf
cmp ecx, edx
jb 0x403cf3
push dword [ebp + 0x18]
mov eax, dword [ebp - 8]
push dword [ebp + 0x14]
mov byte [esi + eax - 2], 2
push dword [ebp - 4]
mov eax, dword [ebp + 0x1c]
push dword [ebp - 8]
push esi
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
push esi
mov dword [ebp - 0xc], eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor edi, edi
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop ebx
cmp dword [ebp - 4], edi
je 0x403d4c
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
cmp dword [ebp - 0xc], edi
jne 0x403d5c
mov eax, dword [ebp + 0x1c]
push dword [eax]
call fcn.004034e7
pop ecx
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop esi
mov eax, dword [ebp - 0xc]
pop edi
leave
ret