Function at 0x401250
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push str.SW2_TRACE_LEVEL_INFO::SW2_CertGetRootCAList__
mov eax, 0x40000
mov dword [ebp - 0xc], 1
call fcn.0040b690
mov eax, dword [ebp + 8]
add esp, 4
push 0
push 0
push 0x184
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
push 0xf0000000
push 1
push str.Microsoft_Enhanced_Cryptographic_Provider_v1.0
push 0
lea ecx, [ebp - 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x4012bc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SW2_TRACE_LEVEL_WARNING
push str.__23s::SW2CryptAcquireContext__::CryptAcquireContext_CRYPT_VERIFYCONTEXT_::_FAILED___ld_
mov eax, 0x20000
call fcn.0040b690
add esp, 0xc
push esi
push edi
push str.ROOT
push 0x28000
xor esi, esi
push esi
push 0x10001
push 0xa
call dword [sym.imp.CRYPT32.dll_CertOpenStore]
mov edi, eax
mov dword [ebp - 0x18], edi
test edi, edi
je 0x401436
push esi
push edi
call dword [sym.imp.CRYPT32.dll_CertEnumCertificatesInStore]
mov dword [ebp - 4], eax
test eax, eax
je 0x40142b
push ebx
jmp 0x401303
mov eax, dword [ebp - 4]
mov edx, dword [eax + 8]
mov eax, dword [eax + 4]
mov ecx, dword [ebp - 0x1c]
push edx
push eax
lea edi, [ebp - 0x28]
lea ebx, [ebp - 0x20]
call fcn.0040b8e0
xor ecx, ecx
add esp, 8
mov dword [ebp - 8], eax
cmp eax, ecx
jne 0x40140b
mov dword [ebp - 0x10], ecx
cmp dword [ebp + 0x10], ecx
jbe 0x401373
mov esi, dword [ebp - 0x20]
lea edi, [ecx + ecx*4]
add edi, edi
add edi, edi
sub edi, esi
add edi, dword [ebp + 0xc]
mov edx, 0x14
mov eax, esi
mov ebx, dword [edi + eax]
cmp ebx, dword [eax]
jne 0x401363
sub edx, 4
add eax, 4
cmp edx, 4
jae 0x401347
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x10], 1
inc ecx
cmp ecx, dword [ebp + 0x10]
jb 0x401334
cmp dword [ebp - 0x10], 0
jne 0x401408
mov edx, dword [ebp - 4]
mov ebx, dword [sym.imp.CRYPT32.dll_CertGetNameStringW]
push 0
push 0
lea ecx, [ebp - 0x24]
push ecx
push 0
push 4
push edx
call ebx
mov edi, eax
test edi, edi
je 0x4013e8
lea eax, [edi + edi]
push eax
lea esi, [ebp - 0x14]
call fcn.0040bae0
add esp, 4
mov dword [ebp - 8], eax
test eax, eax
jne 0x401408
mov esi, dword [ebp - 0x14]
mov edx, dword [ebp - 4]
push edi
push esi
lea ecx, [ebp - 0x24]
push ecx
push eax
push 4
push edx
call ebx
test eax, eax
je 0x4013de
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
push esi
mov esi, dword [ebp + 8]
push 0
push 0x180
push esi
call edi
mov ecx, dword [ebp - 0xc]
push ecx
push eax
push 0x19a
push esi
call edi
lea eax, [ebp - 0x14]
call fcn.0040bb70
jmp 0x401408
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SW2_TRACE_LEVEL_INFO::SW2_CertGetRootCAList::CertGetNameString_Failed___x_
mov eax, 0x40000
call fcn.0040b690
add esp, 8
mov dword [ebp - 8], 0x3f3
inc dword [ebp - 0xc]
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x18]
push edx
push eax
call dword [sym.imp.CRYPT32.dll_CertEnumCertificatesInStore]
mov dword [ebp - 4], eax
test eax, eax
jne 0x401300
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0x18]
pop ebx
push 2
push edi
call dword [sym.imp.CRYPT32.dll_CertCloseStore]
jmp 0x401440
mov dword [ebp - 8], 0x3f3
mov esi, dword [ebp - 8]
mov ecx, dword [ebp - 0x1c]
push 0
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
push esi
push str.SW2_TRACE_LEVEL_INFO::SW2_CertGetRootCAList::returning__ld
mov eax, 0x40000
call fcn.0040b690
add esp, 8
pop edi
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret