Function at 0x40259b
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x124
mov eax, dword [0x4ad15c]
xor eax, esp
mov dword [esp + 0x120], eax
push ebx
xor ebx, ebx
mov dword [esp + 0x38], ecx
push esi
push edi
push 0x70
lea eax, [esp + 0x9c]
mov dword [esp + 0x2c], ebx
push ebx
mov esi, ebx
mov dword [esp + 0x14], ebx
push eax
mov dword [esp + 0x30], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x24], esi
mov dword [esp + 0x38], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x54], str.1.2.840.113549.1.1.5
mov dword [esp + 0x58], ebx
mov dword [esp + 0x5c], ebx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea edi, [esp + 0x60]
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 [esp + 0x6c], eax
push ecx
lea eax, [esp + 0x1c]
mov dword [esp + 0x6c], ecx
push eax
mov dword [esp + 0x78], edx
mov dword [esp + 0x88], 2
call edi
test eax, eax
jne 0x402676
push 8
push dword [esp + 0x68]
lea eax, [esp + 0x14]
push dword [esp + 0x68]
push dword [esp + 0x68]
push eax
call edi
test eax, eax
je 0x40298e
push 0x4808a8
push dword [esp + 0x10]
call dword [sym.imp.CRYPT32.dll_CertOpenSystemStoreW]
mov dword [esp + 0x24], eax
test eax, eax
je 0x40298e
lea eax, [esp + 0x11c]
push eax
call dword [sym.imp.ole32.dll_CoCreateGuid]
mov ecx, dword [esp + 0xc]
lea edi, [esp + 0x11c]
lea edx, [esp + 0x10]
mov dword [esp + 0x58], edi
mov dword [esp + 0x54], 0x10
call fcn.004022f6
test eax, eax
je 0x402943
mov ecx, dword [esp + 0x40]
lea eax, [esp + 0x38]
push eax
lea edx, [esp + 0x20]
call fcn.00402392
test eax, eax
je 0x402943
mov eax, dword [esp + 0x38]
lea esi, [esp + 0x48]
mov edx, dword [esp + 0x1c]
mov dword [esp + 0xa0], edi
lea edi, [esp + 0xa4]
mov dword [esp + 0x98], 2
mov dword [esp + 0x9c], 0x10
movsd dword es:[edi], dword [esi]
push 6
pop ecx
mov dword [esp + 0x40], eax
movsd dword es:[edi], dword [esi]
mov dword [esp + 0x44], edx
movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x10]
lea edi, [esp + 0xd0]
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0xc8], eax
mov dword [esp + 0xb0], eax
lea eax, [esp + 0x10c]
push eax
mov dword [esp + 0xd0], edx
mov dword [esp + 0xb8], edx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov esi, dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
xor eax, eax
mov word [esp + 0x110], ax
inc eax
mov word [esp + 0x112], ax
mov word [esp + 0x10e], ax
xor eax, eax
mov dword [esp + 0x118], eax
mov dword [esp + 0x114], eax
lea eax, [esp + 0x38]
push eax
lea eax, [esp + 0x110]
push eax
call esi
lea eax, [esp + 0x48]
push eax
lea eax, [esp + 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFileTimeToFileTime]
lea eax, [esp + 0x10c]
push eax
lea eax, [esp + 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
lea eax, [esp + 0xb8]
push eax
lea eax, [esp + 0x110]
push eax
call esi
push 6
pop eax
add word [esp + 0x10c], ax
lea eax, [esp + 0xc0]
push eax
lea eax, [esp + 0x110]
push eax
call esi
lea edx, [esp + 0x2c]
lea ecx, [esp + 0x18]
call fcn.00402400
test eax, eax
je 0x40293f
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x5c]
push eax
lea eax, [esp + 0x4c]
push eax
lea edx, [esp + 0x20]
call fcn.00402499
mov esi, dword [esp + 0x18]
test eax, eax
je 0x402943
mov eax, dword [esp + 0x2c]
xor edi, edi
mov dword [esp + 0x80], eax
mov eax, dword [esp + 0x20]
push 2
mov dword [esp + 0x98], eax
mov eax, dword [esp + 0x34]
pop ecx
mov dword [esp + 0x90], eax
lea eax, [esp + 0x78]
mov dword [esp + 0x104], eax
lea eax, [esp + 0x14]
push eax
push edi
push edi
lea eax, [esp + 0xb0]
mov dword [esp + 0x84], str.2.5.29.37
push eax
lea eax, [esp + 0xa8]
mov dword [esp + 0x8c], edi
push eax
push ecx
push 1
push ecx
push dword [esp + 0x2c]
mov dword [esp + 0xa8], esi
mov dword [esp + 0xac], str.2.5.29.1
mov dword [esp + 0xb0], edi
mov dword [esp + 0x124], ecx
call dword [sym.imp.CRYPT32.dll_CryptSignAndEncodeCertificate]
test eax, eax
je 0x402943
mov ecx, dword [esp + 0x14]
call fcn.00403381
mov edi, eax
mov dword [esp + 0x34], edi
test edi, edi
je 0x402943
lea eax, [esp + 0x14]
push eax
push edi
push 0
lea eax, [esp + 0xb0]
push eax
lea eax, [esp + 0xa8]
push eax
push 2
push 1
push 2
push dword [esp + 0x2c]
call dword [sym.imp.CRYPT32.dll_CryptSignAndEncodeCertificate]
test eax, eax
je 0x402943
push dword [esp + 0x14]
push edi
push 1
call dword [sym.imp.CRYPT32.dll_CertCreateCertificateContext]
mov ebx, eax
test ebx, ebx
je 0x402943
lea eax, [esp + 0x5c]
xor edi, edi
push eax
push edi
push 2
push ebx
call dword [sym.imp.CRYPT32.dll_CertSetCertificateContextProperty]
test eax, eax
je 0x402943
push edi
push 3
push ebx
push dword [esp + 0x30]
call dword [sym.imp.CRYPT32.dll_CertAddCertificateContextToStore]
test eax, eax
mov ecx, edi
push 1
pop eax
cmovne ecx, eax
mov dword [esp + 0x28], ecx
jmp 0x402943
mov esi, dword [esp + 0x18]
cmp dword [esp + 0x10], 0
mov edi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
je 0x402957
push dword [esp + 0x10]
call edi
pop ecx
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x402963
push eax
call edi
pop ecx
test esi, esi
je 0x40296b
push esi
call edi
pop ecx
mov eax, dword [esp + 0x20]
test eax, eax
je 0x402977
push eax
call edi
pop ecx
mov eax, dword [esp + 0x34]
test eax, eax
je 0x402983
push eax
call edi
pop ecx
test ebx, ebx
je 0x40298e
push ebx
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
push 0
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
push 0
push dword [esp + 0x28]
call dword [sym.imp.CRYPT32.dll_CertCloseStore]
mov ecx, dword [esp + 0x12c]
mov eax, dword [esp + 0x28]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0047a72f
mov esp, ebp
pop ebp
ret