Function at 0x45ff00
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
push ebp
lea ebp, [esp - 0xd7c]
sub esp, 0xd7c
push 0xfffffffffffffffe
push 0x52e0d8
push 0x4e02e2
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
mov eax, dword [0x53fa2c]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp + 0xd78], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
call fcn.0045fea0
cmp dword [0x53ecfc], 1
mov ebx, str.Microsoft_Base_Cryptographic_Provider_v1.0
je 0x45ff5a
mov ebx, dword [ebp - 0x20]
cmp byte [ebp + 0xd84], 0
jne 0x45ff6a
cmp eax, 0x501
je 0x45ff6f
mov ebx, str.Microsoft_Enhanced_Cryptographic_Provider_v1.0
xor eax, eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 4], eax
mov byte [ebp + 0x800], al
push 0x3e7
push eax
lea eax, [ebp + 0x801]
push eax
call sub.MSVCR90.dll_memset
lea ecx, [ebp + 0x800]
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x28], 0x3e8
mov ecx, 7
mov esi, str.CNCertificate
lea edi, [ebp + 0xbe8]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
push 0xaa
push 0
lea edx, [ebp + 0xc06]
push edx
call sub.MSVCR90.dll_memset
add esp, 0x18
push 0
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp + 0x800]
push ecx
push 0
push 0
lea edx, [ebp + 0xbe8]
push edx
mov edi, 1
push edi
call dword [sym.imp.CRYPT32.dll_CertStrToNameW]
test eax, eax
jne 0x460006
push 0
push 0
call sub.MSVCR90.dll__CxxThrowException
mov eax, dword [str.Container]
mov dword [ebp + 0xcb0], eax
mov ecx, dword [0x50f61c]
mov dword [ebp + 0xcb4], ecx
mov edx, dword [0x50f620]
mov dword [ebp + 0xcb8], edx
mov eax, dword [0x50f624]
mov dword [ebp + 0xcbc], eax
mov ecx, dword [0x50f628]
mov dword [ebp + 0xcc0], ecx
push 0xb4
push 0
lea edx, [ebp + 0xcc4]
push edx
call sub.MSVCR90.dll_memset
add esp, 0xc
push 0x28
push edi
push ebx
lea eax, [ebp + 0xcb0]
push eax
lea ecx, [ebp - 0x1c]
push ecx
mov esi, dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
call esi
test eax, eax
jne 0x4600a4
call dword [sym.imp.KERNEL32.dll_GetLastError]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x8009000f
jne 0x45fffd
push 0x20
push edi
push ebx
lea edx, [ebp + 0xcb0]
push edx
lea eax, [ebp - 0x1c]
push eax
call esi
test eax, eax
jne 0x4600a4
push eax
push eax
call sub.MSVCR90.dll__CxxThrowException
cmp dword [ebp - 0x1c], 0
jne 0x4600d6
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
push str.Container__d
lea ecx, [ebp + 0xcb0]
push ecx
call fcn.0045fe30
add esp, 0xc
push 0x28
push edi
push ebx
lea edx, [ebp + 0xcb0]
push edx
lea eax, [ebp - 0x1c]
push eax
call esi
lea ecx, [ebp - 0x20]
push ecx
push edi
push edi
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptGenKey]
test eax, eax
jne 0x4600f1
push eax
push eax
call sub.MSVCR90.dll__CxxThrowException
xor esi, esi
mov dword [ebp - 0x48], esi
xor eax, eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
lea eax, [ebp + 0xcb0]
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x30], edi
lea ecx, [ebp - 0x60]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
mov edx, dword [ebp - 0x60]
inc edx
mov word [ebp - 0x60], dx
mov dword [ebp - 0x6c], str.1.2.840.113549.1.1.13
mov dword [ebp - 0x50], esi
mov dword [ebp - 0x4c], esi
lea eax, [ebp - 0x50]
push eax
lea ecx, [ebp - 0x60]
push ecx
push esi
push esi
lea edx, [ebp - 0x48]
push edx
push esi
lea eax, [ebp - 0x28]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.CRYPT32.dll_CertCreateSelfSignCertificate]
mov esi, eax
mov dword [ebp - 0x2c], esi
push 0
push 2
push esi
call dword [sym.imp.CRYPT32.dll_CryptFindCertificateKeyProvInfo]
mov dword [ebp - 4], 0xfffffffe
jmp 0x4601a3
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x4601b1
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov dword [ebp - 0x20], 0
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x4601c8
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, esi
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0xd78]
xor ecx, ebp
call fcn.004e0148
add ebp, 0xd7c
mov esp, ebp
pop ebp
ret 4