Function at 0x4679e4
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x184
push ebx
mov ebx, eax
xor eax, eax
inc eax
push esi
xor esi, esi
mov dword [ebp - 0xcc], eax
mov dword [ebp - 0xc4], eax
mov dword [ebp - 0xbc], eax
mov dword [ebp - 0xb4], eax
lea eax, [ebp - 0xcc]
push edi
mov dword [ebp - 4], eax
mov eax, dword [ebx + 0x24]
push 0x6c
mov dword [ebp - 0xac], eax
lea eax, [ebp - 0x17c]
push esi
push eax
mov dword [ebp - 0x14], esi
mov dword [ebp - 0xc], esi
mov dword [ebp - 0xc8], esi
mov dword [ebp - 0xc0], esi
mov dword [ebp - 0xb8], esi
mov dword [ebp - 0xb0], esi
mov dword [ebp - 8], esi
mov dword [ebp - 0xa8], esi
mov dword [ebp - 0xa4], esi
mov dword [ebp - 0x180], esi
call sub.msvcrt.dll_memset
add esp, 0xc
push 0x6c
lea eax, [ebp - 0x9c]
push esi
push eax
mov dword [ebp - 0x24], esi
call sub.msvcrt.dll_memset
lea eax, [ebp - 0x180]
mov dword [ebp - 0x34], eax
mov eax, dword [ebx + 0x20]
add esp, 0xc
mov dword [ebp - 0xa0], 2
mov dword [ebp - 0x38], 3
mov dword [ebp - 0x94], eax
cmp eax, esi
jne 0x467aac
mov dword [ebp - 0x94], str.1.2.840.113549.1.1.5
mov edi, dword [ebx + 8]
mov ecx, str.2.5.4.3
lea esi, [ebp - 0x110]
call fcn.0046759a
test eax, eax
je 0x467ad2
mov ecx, dword [ebp - 8]
inc dword [ebp - 8]
mov eax, esi
mov dword [ebp + ecx*8 - 0xc8], eax
mov edi, dword [ebx + 0xc]
mov ecx, str.2.5.4.11
lea esi, [ebp - 0x100]
call fcn.0046759a
test eax, eax
je 0x467af8
mov ecx, dword [ebp - 8]
inc dword [ebp - 8]
mov eax, esi
mov dword [ebp + ecx*8 - 0xc8], eax
mov edi, dword [ebx + 0x10]
mov ecx, str.2.5.4.10
lea esi, [ebp - 0xf0]
call fcn.0046759a
test eax, eax
je 0x467b1e
mov ecx, dword [ebp - 8]
inc dword [ebp - 8]
mov eax, esi
mov dword [ebp + ecx*8 - 0xc8], eax
mov edi, dword [ebx + 0x14]
mov ecx, str.2.5.4.6
lea esi, [ebp - 0xe0]
call fcn.0046759a
test eax, eax
je 0x467b44
mov ecx, dword [ebp - 8]
inc dword [ebp - 8]
mov eax, esi
mov dword [ebp + ecx*8 - 0xc8], eax
push dword [ebp + 0xc]
lea esi, [ebp - 0x78]
lea edi, [ebp - 0x80]
call fcn.004677fa
pop ecx
lea eax, [ebp - 8]
push eax
push 7
lea esi, [ebp - 0x70]
call fcn.0046726a
pop ecx
pop ecx
test eax, eax
je 0x467ff7
mov eax, esi
push eax
call fcn.004677ac
mov esi, eax
pop ecx
test esi, esi
je 0x467b8e
push esi
push str._s.cert__subject___:__s_n
call fcn.00409709
pop ecx
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebx + 0x18]
lea eax, [ebp - 0x9c]
call fcn.004676a8
pop ecx
test eax, eax
je 0x467fe1
push str._s.cert__serial____:
call fcn.00409709
pop ecx
push dword [ebp - 0x9c]
xor eax, eax
push dword [ebp - 0x98]
call fcn.0040efba
push 0x49ed98
call fcn.00409709
movzx eax, word [ebx + 0x1c]
add esp, 0xc
push eax
mov eax, dword [ebp - 0x34]
call fcn.00467386
pop ecx
test eax, eax
je 0x467fc8
mov eax, dword [ebp - 0x34]
add eax, 0x10
mov ecx, str.2.5.29.19
mov dword [eax], ecx
mov edx, dword [ebp - 0xac]
mov dword [eax + 4], edx
lea esi, [eax + 8]
lea eax, [ebp - 0xac]
push eax
push ecx
call fcn.0046726a
pop ecx
pop ecx
test eax, eax
je 0x467fae
mov esi, dword [ebx + 0x28]
test esi, esi
je 0x467c2d
mov edi, dword [ebp - 0x38]
shl edi, 4
add edi, dword [ebp - 0x34]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
inc dword [ebp - 0x38]
mov esi, dword [ebx + 0x2c]
test esi, esi
je 0x467c44
mov edi, dword [ebp - 0x38]
shl edi, 4
add edi, dword [ebp - 0x34]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
inc dword [ebp - 0x38]
mov ebx, dword [ebx + 0x30]
test ebx, ebx
je 0x467c5d
mov edi, dword [ebp - 0x38]
shl edi, 4
add edi, dword [ebp - 0x34]
mov esi, ebx
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
inc dword [ebp - 0x38]
push dword [ebp - 0x94]
push str._s.cert__algorithm_:__S
call fcn.00409709
pop ecx
pop ecx
push SysReAllocString
push dword [ebp - 0x94]
push 1
call dword [sym.imp.CRYPT32.dll_CryptFindOIDInfo]
test eax, eax
je 0x467c95
push dword [eax + 8]
push 0x4b3e5c
call fcn.00409709
pop ecx
pop ecx
push str._n_s.cert__validity__:
call fcn.00409709
pop ecx
lea eax, [ebp - 0x80]
push eax
call fcn.0040f0fb
mov dword [esp], 0x4c1acc
call fcn.00409709
pop ecx
lea eax, [ebp - 0x78]
push eax
call fcn.0040f0fb
mov dword [esp], 0x49ed98
call fcn.00409709
mov esi, dword [ebp + 8]
pop ecx
push dword [esi + 4]
push str._s.key___provider__:__s_n
call fcn.00409709
pop ecx
pop ecx
call fcn.0040f198
mov dword [esi], eax
test eax, eax
je 0x467f94
push eax
push str._s.key___container_:__s_n
call fcn.00409709
pop ecx
pop ecx
push 0xf0000040
push dword [esi + 8]
lea edi, [esi + 0x28]
push dword [esi + 4]
mov dword [ebp - 0x10], edi
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x467d59
lea eax, [ebp - 0x28]
push eax
push 3
push dword [edi]
xor ebx, ebx
call fcn.0040433b
add esp, 0xc
test eax, eax
je 0x467d4d
mov ebx, dword [ebp - 0x28]
and ebx, 1
mov dword [ebp - 0xc], ebx
je 0x467d4d
push dword [esi + 0x1c]
and dword [esi + 0xc], 0xffffffbf
push dword [edi]
and dword [esi + 0x20], 0xfffffffe
call fcn.00467645
pop ecx
pop ecx
push 0
push dword [edi]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
jmp 0x467d5c
mov ebx, dword [ebp - 0xc]
mov eax, dword [esi + 0xc]
or eax, 8
push eax
push dword [esi + 8]
push dword [esi + 4]
push dword [esi]
push edi
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x467f77
test ebx, ebx
je 0x467d8a
push dword [esi + 0x1c]
push dword [edi]
call fcn.00467645
pop ecx
pop ecx
movzx eax, word [esi + 0x24]
push eax
push str._s.key___gen___4hu_:
call fcn.00409709
pop ecx
pop ecx
lea eax, [ebp - 0x1c]
push eax
movzx eax, word [esi + 0x24]
shl eax, 0x10
or eax, dword [esi + 0x20]
push eax
push dword [esi + 0x18]
push dword [edi]
call dword [sym.imp.ADVAPI32.dll_CryptGenKey]
test eax, eax
je 0x467f52
push 0x4c1b0c
call fcn.00409709
pop ecx
push dword [esi + 0x18]
push dword [edi]
call fcn.004675c4
mov edx, eax
pop ecx
pop ecx
test edx, edx
je 0x467f47
push 6
pop ecx
mov esi, edx
lea edi, [ebp - 0x68]
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 0x34]
add eax, 0x20
mov edi, edx
call fcn.0046742b
test eax, eax
je 0x467f36
mov eax, dword [ebp - 0x38]
shl eax, 4
add eax, dword [ebp - 0x34]
lea ecx, [ebp - 0x88]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp + 0xc]
call fcn.004678f0
add esp, 0x10
test eax, eax
je 0x467e5d
mov esi, dword [ebp - 0x38]
shl esi, 4
add esi, dword [ebp - 0x34]
inc dword [ebp - 0x38]
lea eax, [ebp - 0x88]
push eax
call fcn.004677ac
mov edi, eax
pop ecx
test edi, edi
je 0x467e72
push edi
push str.__i.cert__subject__:__s_n
call fcn.00409709
pop ecx
pop ecx
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x467e72
mov eax, dword [ebp - 0x70]
mov esi, dword [ebp - 0x24]
mov dword [ebp - 0x88], eax
mov eax, dword [ebp - 0x6c]
mov dword [ebp - 0x84], eax
push str._s.cert__signature_:
call fcn.00409709
mov eax, dword [ebp - 0x18]
pop ecx
test eax, eax
je 0x467e89
mov ecx, dword [ebp - 0x20]
jmp 0x467e8f
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx + 0x18]
test eax, eax
jne 0x467e98
mov eax, dword [ebp - 0x10]
mov eax, dword [eax]
mov edi, dword [ebp + 0x10]
mov ebx, dword [ebp + 0x14]
push edi
lea edx, [ebp - 0x94]
push edx
lea edx, [ebp - 0xa0]
push edx
push ecx
push eax
call fcn.00467713
add esp, 0x14
mov dword [ebp - 0x14], eax
test eax, eax
je 0x467f09
mov ebx, 0x4c1b0c
push ebx
call fcn.00409709
cmp dword [ebp - 0xc], 0
pop ecx
je 0x467f09
push str._s.key___cert.assoc:
call fcn.00409709
pop ecx
push 0
push dword [edi]
push 0x1a
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x467ef6
push ebx
call fcn.00409709
jmp 0x467f08
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR_generateCertificate___CryptSetKeyParam_KP_CERTIFICATE___0x_08x__n
call fcn.00409709
pop ecx
pop ecx
test esi, esi
je 0x467f16
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 0x18]
push dword [ebp - 0x20]
push dword [ebp - 0x2c]
call fcn.00467873
mov eax, dword [ebp - 0x34]
add esp, 0xc
add eax, 0x2c
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x467f41
push str.ERROR_generateCertificate___Unable_to_create_SKI_n
call fcn.00409709
pop ecx
mov edi, dword [ebp - 0x10]
mov esi, dword [ebp + 8]
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x467f65
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR_generateCertificate___CryptGenKey__0x_08x__n
call fcn.00409709
pop ecx
pop ecx
cmp dword [ebp - 0x14], 0
jne 0x467f9f
push 0
push dword [edi]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
jmp 0x467f8a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR_generateCertificate___CryptAcquireContext_CRYPT_NEWKEYSET___0x_08x__n
call fcn.00409709
pop ecx
pop ecx
push dword [esi]
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x467f9f
push str.ERROR_generateCertificate___Unable_to_generate_a_container_name_n
call fcn.00409709
pop ecx
mov eax, dword [ebp - 0x34]
add eax, 0x1c
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x467fb9
push str.ERROR_generateCertificate___Unable_to_create_BC2_n
call fcn.00409709
pop ecx
mov eax, dword [ebp - 0x34]
add eax, 0xc
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x467fd3
push str.ERROR_generateCertificate___Unable_to_create_KU_n
call fcn.00409709
pop ecx
push dword [ebp - 0x98]
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x467fec
push str.ERROR_generateCertificate___Unable_to_create_SN_n
call fcn.00409709
pop ecx
push dword [ebp - 0x6c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x468002
push str.ERROR_generateCertificate___Unable_to_create_Subject_n
call fcn.00409709
pop ecx
mov eax, dword [ebp - 0x14]
pop edi
pop esi
pop ebx
leave
ret