Function at 0x100513f0
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100884cb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2dc
push ebx
push esi
push edi
push 0x22c1ca1
lea ecx, [ebp - 0x160]
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x18], 0
call fcn.1005f010
push 0xbbdea7
lea ecx, [ebp - 0x1a4]
call fcn.1005f010
push 0xee5c3
lea ecx, [ebp - 0x1e8]
call fcn.1005f010
add esp, 0xc
lea eax, [ebp - 0x160]
lea ecx, [ebp - 0xa4]
push eax
call fcn.1000b5b0
lea eax, [ebp - 0x1a4]
mov dword [ebp - 4], 0
push eax
lea ecx, [ebp - 0x64]
call fcn.1000b5b0
lea eax, [ebp - 0x1e8]
mov byte [ebp - 4], 1
push eax
lea ecx, [ebp - 0x4c]
call fcn.1000b5b0
push 0
lea ecx, [ebp - 0xa4]
mov byte [ebp - 4], 2
call fcn.1000b0e0
movsx eax, byte [eax]
push eax
call fcn.100705a2
add esp, 4
lea ecx, [ebp - 0xa4]
mov bl, al
push 0
call fcn.1000b0e0
push 0
lea ecx, [ebp - 0x64]
mov byte [eax], bl
call fcn.1000b0e0
movsx eax, byte [eax]
push eax
call fcn.100705a2
add esp, 4
lea ecx, [ebp - 0x64]
mov bl, al
push 0
call fcn.1000b0e0
push 0
lea ecx, [ebp - 0x4c]
mov byte [eax], bl
call fcn.1000b0e0
movsx eax, byte [eax]
push eax
call fcn.100705a2
add esp, 4
lea ecx, [ebp - 0x4c]
mov bl, al
push 0
call fcn.1000b0e0
mov ecx, 6
mov byte [eax], bl
movsx eax, byte [ebp - 0x160]
cdq
idiv ecx
lea eax, [ebp - 0x34]
add edx, 8
lea ecx, [ebp - 0xa4]
push edx
push 0
push eax
call fcn.1000af10
mov byte [ebp - 4], 3
movsx eax, byte [ebp - 0x160]
and eax, 0x80000007
jns 0x1005153e
dec eax
or eax, 0xfffffff8
inc eax
add eax, 3
lea ecx, [ebp - 0x4c]
push eax
push 0
lea eax, [ebp - 0x7c]
push eax
call fcn.1000af10
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 4
call fcn.1000b0a0
lea ecx, [ebp - 0x7c]
mov ebx, eax
call fcn.1000b0a0
lea ecx, [ebp - 0x34]
mov esi, eax
call fcn.1000b0a0
push esi
push eax
lea eax, [ebp - 0x11c]
push str.CN_s__T_s
push eax
call fcn.10050480
add esp, 0x10
lea edx, [ebp - 0x34]
lea ecx, [ebp - 0xe8]
call fcn.1005db60
mov ecx, eax
call fcn.1000a850
lea ecx, [ebp - 0xe8]
mov dword [ebp - 0x80], eax
call fcn.1000abe0
push 0x100a106c
xor esi, esi
push esi
call dword [sym.imp.CRYPT32.dll_CertOpenSystemStoreA]
mov edi, eax
test edi, edi
je 0x10051670
push esi
push edi
call dword [sym.imp.CRYPT32.dll_CertEnumCertificatesInStore]
mov esi, eax
test esi, esi
je 0x10051667
push 0x80
lea eax, [ebp - 0x2e8]
push eax
push 0
push 0
push 4
push esi
call dword [sym.imp.CRYPT32.dll_CertGetNameStringA]
test eax, eax
je 0x100515c1
mov eax, ebx
lea ecx, [ebp - 0x2e8]
mov dl, byte [ecx]
cmp dl, byte [eax]
jne 0x10051618
test dl, dl
je 0x10051614
mov dl, byte [ecx + 1]
cmp dl, byte [eax + 1]
jne 0x10051618
add ecx, 2
add eax, 2
test dl, dl
jne 0x100515f8
xor eax, eax
jmp 0x1005161d
sbb eax, eax
or eax, 1
test eax, eax
jne 0x100515c1
push eax
push edi
call dword [sym.imp.CRYPT32.dll_CertCloseStore]
lea ecx, [ebp - 0x7c]
call fcn.1000b430
lea ecx, [ebp - 0x34]
call fcn.1000b430
lea ecx, [ebp - 0x4c]
call fcn.1000b430
lea ecx, [ebp - 0x64]
call fcn.1000b430
lea ecx, [ebp - 0xa4]
call fcn.1000b430
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
push 0
push edi
call dword [sym.imp.CRYPT32.dll_CertCloseStore]
push str.CryptAcquireContext...
call fcn.100014e0
mov edi, dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
lea eax, [ebp - 0x10]
add esp, 4
push 0x20
push 1
push 0
push ebx
push eax
call edi
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x100516c5
call esi
push eax
push str.Error_0x_x_n
call fcn.100014e0
push str.CryptAcquireContext...
call fcn.100014e0
add esp, 0xc
lea eax, [ebp - 0x10]
push 0x28
push 1
push 0
push ebx
push eax
call edi
test eax, eax
je 0x100516f4
push str.Success_n
call fcn.100014e0
push str.CryptGenKey...
call fcn.100014e0
add esp, 8
lea eax, [ebp - 0x18]
push eax
push 0x8000000
push 2
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptGenKey]
test eax, eax
jne 0x10051742
call esi
push eax
push str.Error_0x_x_n
call fcn.100014e0
add esp, 8
lea ecx, [ebp - 0x7c]
call fcn.1000b430
lea ecx, [ebp - 0x34]
call fcn.1000b430
lea ecx, [ebp - 0x4c]
call fcn.1000b430
lea ecx, [ebp - 0x64]
call fcn.1000b430
lea ecx, [ebp - 0xa4]
call fcn.1000b430
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
push str.Success_n
call fcn.100014e0
add esp, 4
cmp dword [ebp - 0x18], 0
je 0x10051778
push str.CryptDestroyKey...
call fcn.100014e0
add esp, 4
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
push str.Success_n
call fcn.100014e0
add esp, 4
cmp dword [ebp - 0x10], 0
je 0x100517a3
push str.CryptReleaseContext...
call fcn.100014e0
add esp, 4
push 0
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
push str.Success_n
call fcn.100014e0
add esp, 4
push str.CertStrToName...
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x84], 0
mov dword [ebp - 0x14], 0
call fcn.100014e0
mov ebx, dword [sym.imp.CRYPT32.dll_CertStrToNameA]
lea eax, [ebp - 0x14]
add esp, 4
push 0
push eax
push 0
push 0
push 3
lea eax, [ebp - 0x11c]
push eax
push 1
call ebx
test eax, eax
je 0x100516f4
push str.Success_n
call fcn.100014e0
push str.malloc...
call fcn.100014e0
push dword [ebp - 0x14]
call fcn.1007035e
mov edi, eax
add esp, 0xc
test edi, edi
je 0x100516f4
push str.Success_n
call fcn.100014e0
push str.CertStrToName...
call fcn.100014e0
add esp, 8
lea eax, [ebp - 0x14]
push 0
push eax
push edi
push 0
push 3
lea eax, [ebp - 0x11c]
push eax
push 1
call ebx
test eax, eax
je 0x100516f4
push str.Success_n
call fcn.100014e0
mov eax, dword [ebp - 0x14]
add esp, 4
mov dword [ebp - 0x8c], eax
xorps xmm0, xmm0
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0xc0], eax
lea eax, [ebp - 0xe0]
push eax
mov dword [ebp - 0x88], edi
mov dword [ebp - 0xbc], 0
mov dword [ebp - 0xb8], 1
mov dword [ebp - 0xb4], 0x20
mov dword [ebp - 0xb0], 0
mov dword [ebp - 0xac], 0
mov dword [ebp - 0xa8], 2
movlpd qword [ebp - 0xcc], xmm0
mov dword [ebp - 0xd0], str.1.2.840.113549.1.1.5
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
add word [ebp - 0xe0], 5
push str.CertCreateSelfSignCertificate...
call fcn.100014e0
add esp, 4
lea eax, [ebp - 0xe0]
push 0
push eax
push 0
lea eax, [ebp - 0xd0]
push eax
lea eax, [ebp - 0xc0]
push eax
push 0
lea eax, [ebp - 0x8c]
push eax
push 0
call dword [sym.imp.CRYPT32.dll_CertCreateSelfSignCertificate]
mov edi, eax
test edi, edi
je 0x100516f4
push str.Success_n
call fcn.100014e0
push str.CertOpenStore...
call fcn.100014e0
add esp, 8
push str.Root
push 0x20000
push 0
push 0
push 0xa
call dword [sym.imp.CRYPT32.dll_CertOpenStore]
mov ebx, eax
test ebx, ebx
je 0x100516f4
push str.Success_n
call fcn.100014e0
push str.CertAddCertificateContextToStore...
call fcn.100014e0
add esp, 8
push 0
push 3
push edi
push ebx
call dword [sym.imp.CRYPT32.dll_CertAddCertificateContextToStore]
test eax, eax
je 0x100516f4
push str.Success_n
call fcn.100014e0
push str.CryptAcquireCertificatePrivateKey...
call fcn.100014e0
add esp, 8
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0xc4]
push eax
lea eax, [ebp - 0x1c]
push eax
push 0
push 0
push edi
call dword [sym.imp.CRYPT32.dll_CryptAcquireCertificatePrivateKey]
test eax, eax
je 0x100516f4
push str.Success_n
call fcn.100014e0
add esp, 4
cmp dword [ebp - 0x1c], 0
je 0x100519ed
push str.CryptReleaseContext...
call fcn.100014e0
add esp, 4
push 0
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
push str.Success_n
call fcn.100014e0
add esp, 4
push str.CertCloseStore...
call fcn.100014e0
add esp, 4
push 0
push ebx
call dword [sym.imp.CRYPT32.dll_CertCloseStore]
push str.Success_n
call fcn.100014e0
add esp, 4
lea ecx, [ebp - 0x7c]
call fcn.1000b430
lea ecx, [ebp - 0x34]
call fcn.1000b430
lea ecx, [ebp - 0x4c]
call fcn.1000b430
lea ecx, [ebp - 0x64]
call fcn.1000b430
lea ecx, [ebp - 0xa4]
call fcn.1000b430
mov ecx, dword [ebp - 0xc]
mov eax, edi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret