Function at 0x40a790
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, edx
push ebx
sub esp, 0x1c
test eax, eax
je 0x40a7a4
mov dword [0x42b00c], eax
mov dword [esp], str.advapi32.dll
call dword [sym.imp.kernel32.dll_GetModuleHandleA]
sub esp, 4
mov dword [esp + 4], str.CryptDuplicateHash
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetProcAddress]
mov edi, dword [sym.imp.advapi32.dll_CryptAcquireContextA]
mov dword [0x42b014], 0xffffffff
sub esp, 8
mov dword [0x42b000], eax
mov dword [esp + 0x10], 0xf0000000
mov dword [esp + 0xc], 1
mov eax, dword [0x42b00c]
mov dword [esp + 4], str.winetest
mov dword [esp + 8], eax
mov dword [esp], 0x42b014
call edi
sub esp, 0x14
mov ebx, eax
call fcn.00412e10
mov dword [eax], 0x41605d
mov dword [eax + 4], 0x8d
xor eax, eax
mov ecx, dword fs:[0x18]
mov edx, dword [ecx + 0x34]
test ebx, ebx
jne 0x40a852
mov eax, 1
cmp edx, 0x80090009
je 0x40a852
cmp edx, 0x80090019
sete cl
xor eax, eax
cmp dword [0x42b050], 0
sete al
and eax, ecx
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 0xc], edx
mov dword [esp + 4], str._d___08lx_n
call fcn.00401ac0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 1
mov eax, dword [0x42b00c]
mov dword [esp + 4], str.winetest
mov dword [esp + 8], eax
mov dword [esp], 0x42b014
call edi
sub esp, 0x14
mov ebx, eax
test eax, eax
je 0x40a8b0
mov ebx, 1
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
call fcn.00412e10
mov edx, 1
mov dword [eax], 0x41605d
mov dword [eax + 4], 0x93
mov eax, dword fs:[0x18]
mov ecx, dword [eax + 0x34]
cmp ecx, 0x80090016
je 0x40a8fb
mov eax, dword [0x42b050]
xor edx, edx
test eax, eax
jne 0x40a8fb
mov edx, 1
cmp ecx, 0x80090024
je 0x40a8fb
xor edx, edx
cmp ecx, 0x80090019
sete dl
mov dword [esp], edx
mov dword [esp + 8], ecx
mov dword [esp + 4], str._08lx_n
call fcn.00401ac0
mov edx, dword fs:[0x18]
cmp dword [edx + 0x34], 0x80090016
jne 0x40aa50
mov dword [ebp - 0x14], edx
mov dword [esp + 0x10], 8
mov dword [esp + 0xc], 1
mov eax, dword [0x42b00c]
mov dword [esp + 4], str.winetest
mov dword [esp + 8], eax
mov dword [esp], 0x42b014
call edi
sub esp, 0x14
mov edi, eax
call fcn.00412e10
mov edx, dword [ebp - 0x14]
mov dword [eax], 0x41605d
mov dword [eax + 4], 0x9e
mov eax, dword [edx + 0x34]
mov dword [esp + 4], str._08lx_n
mov dword [esp + 8], eax
mov dword [esp], edi
call fcn.00401ac0
test edi, edi
mov edx, dword [ebp - 0x14]
je 0x40aa80
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x14], edx
mov edi, dword [sym.imp.advapi32.dll_CryptGenKey]
mov dword [esp + 0xc], ecx
mov dword [esp + 8], esi
mov dword [esp + 4], 1
mov eax, dword [0x42b014]
mov dword [esp], eax
call edi
sub esp, 0x10
mov ebx, eax
mov eax, 0xa5
call fcn.00401310
mov edx, dword [ebp - 0x14]
mov eax, dword [edx + 0x34]
mov dword [esp + 4], str._08lx_n
mov dword [esp], ebx
mov dword [esp + 8], eax
call fcn.00401ac0
test ebx, ebx
lea ecx, [ebp - 0x10]
jne 0x40aaa0
mov dword [esp + 0xc], ecx
mov dword [esp + 8], esi
mov dword [esp + 4], 2
mov eax, dword [0x42b014]
mov dword [esp], eax
call edi
sub esp, 0x10
mov ebx, eax
mov eax, 0xa8
call fcn.00401310
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 4], str._08lx_n
mov dword [esp], ebx
mov dword [esp + 8], eax
call fcn.00401ac0
test ebx, ebx
je 0x40a89d
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_CryptDestroyKey]
sub esp, 4
jmp 0x40a89d
call fcn.00412e10
mov dword [eax], 0x41605d
mov dword [eax + 4], 0x99
mov dword [esp], str.RSA_full_provider_not_available_n
call fcn.00404020
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, 0xa1
call fcn.00401310
mov dword [esp], str.Couldnt_create_crypto_provider_n
call fcn.00404020
jmp 0x40a8a2
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_CryptDestroyKey]
lea ecx, [ebp - 0x10]
sub esp, 4
jmp 0x40a9e6