Function at 0x4013cf
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x120
mov eax, dword [0x45190c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
mov dword [ebp - 0x5c], eax
push esi
push edi
push 0x70
lea eax, [ebp - 0x120]
mov dword [ebp - 0x48], ebx
push ebx
mov esi, ebx
mov dword [ebp - 0x28], ebx
push eax
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x54], ebx
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x6c], str.1.2.840.113549.1.1.5
mov dword [ebp - 0x68], ebx
mov dword [ebp - 0x64], ebx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea edi, [ebp - 0x8c]
xor edx, edx
inc edx
push 6
pop eax
mov ecx, eax
xor eax, eax
rep stosd dword es:[edi], eax
mov edi, dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
mov eax, str.Microsoft_Enhanced_Cryptographic_Provider_v1.0
push ebx
push edx
push eax
mov ecx, str.SelfSignedCerts
mov dword [ebp - 0x8c], eax
push ecx
lea eax, [ebp - 0x28]
mov dword [ebp - 0x90], ecx
push eax
mov dword [ebp - 0x88], edx
mov dword [ebp - 0x78], 2
call edi
test eax, eax
jne 0x40149a
push 8
push dword [ebp - 0x88]
lea eax, [ebp - 0x28]
push dword [ebp - 0x8c]
push dword [ebp - 0x90]
push eax
call edi
test eax, eax
je 0x401746
push 0x428548
push dword [ebp - 0x28]
call dword [sym.imp.CRYPT32.dll_CertOpenSystemStoreW]
mov dword [ebp - 0x44], eax
test eax, eax
je 0x401746
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.ole32.dll_CoCreateGuid]
lea eax, [ebp - 0x30]
mov dword [ebp - 0x74], 0x10
push eax
push dword [ebp - 0x28]
lea edi, [ebp - 0x24]
mov dword [ebp - 0x70], edi
call fcn.00401f4e
test eax, eax
je 0x4016f8
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp - 0x3c]
push eax
push dword [ebp - 0x5c]
call fcn.00401ae4
test eax, eax
je 0x4016f8
mov eax, dword [ebp - 0x54]
lea esi, [ebp - 0x6c]
mov edx, dword [ebp - 0x3c]
mov dword [ebp - 0x118], edi
lea edi, [ebp - 0x114]
mov dword [ebp - 0x120], 2
mov dword [ebp - 0x11c], 0x10
movsd dword es:[edi], dword [esi]
push 6
pop ecx
mov dword [ebp - 0x60], eax
movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x5c], edx
movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 0x30]
lea edi, [ebp - 0xe8]
rep movsd dword es:[edi], dword [esi]
mov dword [ebp - 0xf0], eax
mov dword [ebp - 0x108], eax
lea eax, [ebp - 0x14]
push eax
mov dword [ebp - 0xec], edx
mov dword [ebp - 0x104], edx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov esi, dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
xor eax, eax
mov word [ebp - 0x10], ax
xor edi, edi
mov dword [ebp - 8], eax
inc edi
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x14]
mov word [ebp - 0xe], di
push eax
mov word [ebp - 0x12], di
call esi
lea eax, [ebp - 0x68]
push eax
lea eax, [ebp - 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFileTimeToFileTime]
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x68]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
lea eax, [ebp - 0x100]
push eax
lea eax, [ebp - 0x14]
push eax
call esi
push 6
pop eax
add word [ebp - 0x14], ax
lea eax, [ebp - 0xf8]
push eax
lea eax, [ebp - 0x14]
push eax
call esi
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x38]
push eax
call fcn.00401a45
test eax, eax
je 0x4016f5
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x30]
push eax
push dword [ebp - 0x28]
call fcn.00401941
mov esi, dword [ebp - 0x38]
test eax, eax
je 0x4016f8
mov eax, dword [ebp - 0x4c]
xor ecx, ecx
mov dword [ebp - 0xa8], eax
mov eax, dword [ebp - 0x40]
push 2
mov dword [ebp - 0x94], eax
mov eax, dword [ebp - 0x50]
pop edx
mov dword [ebp - 0x98], eax
lea eax, [ebp - 0xb0]
mov dword [ebp - 0xb4], eax
lea eax, [ebp - 0x34]
push eax
push ecx
push ecx
lea eax, [ebp - 0x114]
mov dword [ebp - 0xb0], str.2.5.29.37
push eax
lea eax, [ebp - 0x120]
mov dword [ebp - 0xac], ecx
push eax
push edx
push edi
push edx
push dword [ebp - 0x28]
mov dword [ebp - 0xa4], esi
mov dword [ebp - 0xa0], str.2.5.29.1
mov dword [ebp - 0x9c], ecx
mov dword [ebp - 0xb8], edx
call dword [sym.imp.CRYPT32.dll_CryptSignAndEncodeCertificate]
test eax, eax
je 0x4016f8
push dword [ebp - 0x34]
call fcn.00402c40
mov edi, eax
pop ecx
test edi, edi
je 0x4016fa
lea eax, [ebp - 0x34]
push eax
push edi
push 0
lea eax, [ebp - 0x114]
push eax
lea eax, [ebp - 0x120]
push eax
push 2
push 1
push 2
push dword [ebp - 0x28]
call dword [sym.imp.CRYPT32.dll_CryptSignAndEncodeCertificate]
test eax, eax
je 0x4016fa
push dword [ebp - 0x34]
push edi
push 1
call dword [sym.imp.CRYPT32.dll_CertCreateCertificateContext]
mov ebx, eax
test ebx, ebx
je 0x4016fa
lea eax, [ebp - 0x90]
push eax
push 0
push 2
push ebx
call dword [sym.imp.CRYPT32.dll_CertSetCertificateContextProperty]
test eax, eax
je 0x4016fa
push 0
push 3
push ebx
push dword [ebp - 0x44]
call dword [sym.imp.CRYPT32.dll_CertAddCertificateContextToStore]
mov ecx, dword [ebp - 0x48]
test eax, eax
push 1
pop eax
cmovne ecx, eax
mov dword [ebp - 0x48], ecx
jmp 0x4016fa
mov esi, dword [ebp - 0x38]
mov edi, ebx
cmp dword [ebp - 0x30], 0
je 0x401709
push dword [ebp - 0x30]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
pop ecx
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x401717
push eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
pop ecx
test esi, esi
je 0x401722
push esi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
pop ecx
mov eax, dword [ebp - 0x40]
test eax, eax
je 0x401730
push eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
pop ecx
test edi, edi
je 0x40173b
push edi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
pop ecx
test ebx, ebx
je 0x401746
push ebx
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
push 0
push dword [ebp - 0x28]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
push 0
push dword [ebp - 0x44]
call dword [sym.imp.CRYPT32.dll_CertCloseStore]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x48]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.00424816
mov esp, ebp
pop ebp
ret 4