Function at 0x13187fd
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x38
push ebx
xor ebx, ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x14], ecx
mov dword [ebp - 8], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x2c], ebx
cmp edi, ebx
jne 0x1318839
mov esi, 0x80070057
jmp 0x1318e1c
lea eax, [ecx + 0x24]
mov dword [ebp - 0x38], eax
cmp dword [eax], ebx
jne 0x131885b
push 0xf0000000
push 0x18
push ebx
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x1318e06
mov eax, dword [edi]
push ebx
lea ecx, [ebp - 0x18]
push ecx
mov ecx, edi
call dword [eax + 0x10]
mov esi, eax
cmp esi, ebx
jne 0x1318e1c
mov eax, dword [ebp - 0x18]
xor ecx, ecx
push 2
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0103e496
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, ebx
je 0x1318d99
mov edx, dword [edi]
push eax
lea eax, [ebp - 0x18]
push eax
mov ecx, edi
call dword [edx + 0x10]
mov esi, eax
cmp esi, ebx
jne 0x1318e1c
mov eax, dword [edi]
push ebx
lea ecx, [ebp - 0x20]
push ecx
mov ecx, edi
call dword [eax + 0x14]
mov esi, eax
cmp esi, ebx
jne 0x1318e1c
mov eax, dword [ebp - 0x20]
xor ecx, ecx
push 2
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0103e496
pop ecx
mov dword [ebp - 0x30], eax
cmp eax, ebx
je 0x1318d99
mov edx, dword [edi]
push eax
lea eax, [ebp - 0x20]
push eax
mov ecx, edi
call dword [edx + 0x14]
mov esi, eax
cmp esi, ebx
jne 0x1318e1c
push ebx
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x20]
push dword [ebp - 0x30]
dec eax
push eax
call fcn.01293823
mov esi, eax
cmp esi, ebx
jne 0x1318e1c
lea eax, [ebp - 0x28]
sub eax, dword [ebp - 0xc]
push eax
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x20]
push dword [ebp - 0x30]
dec eax
push eax
call fcn.01293823
mov esi, eax
cmp esi, ebx
jne 0x1318e1c
mov ecx, dword [ebp - 0x14]
push 4
lea eax, [ebp - 0x2c]
push eax
call fcn.01317bcc
mov esi, eax
cmp esi, ebx
jne 0x1318e1c
mov esi, dword [ebp - 0x14]
mov eax, dword [ebp - 0x2c]
push dword [esi + 0x14]
mov dword [esi + 0x1c], eax
call fcn.0103e4a5
pop ecx
push ebx
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x18]
push dword [ebp - 0x28]
dec eax
push eax
mov dword [esi + 0x14], ebx
call fcn.01293823
mov esi, eax
cmp esi, ebx
jne 0x1318e1c
push dword [ebp - 0xc]
call fcn.0103e496
pop ecx
mov ecx, dword [ebp - 0x14]
mov dword [ecx + 0x14], eax
cmp eax, ebx
je 0x1318d99
push eax
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x18]
push dword [ebp - 0x28]
dec eax
push eax
call fcn.01293823
mov esi, eax
cmp esi, ebx
jne 0x1318e1c
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x14]
mov dword [ecx + 0x18], eax
mov ecx, eax
shr ecx, 1
mov dword [ebp - 0x10], ecx
add ecx, 4
imul ecx, ecx, 5
lea esi, [ecx + eax*2]
push esi
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x34], esi
call fcn.0103e496
pop ecx
mov dword [ebp - 0x1c], eax
cmp eax, ebx
je 0x1318d99
push esi
push ebx
push eax
call sub.msvcrt.dll_memset
mov eax, dword [ebp - 0x1c]
xor edx, edx
mov word [eax + 2], dx
mov edx, dword [ebp - 0x24]
mov byte [eax], 7
mov byte [eax + 1], 2
mov dword [eax + 4], 0xa400
shl edx, 3
mov dword [eax + 8], 0x32415352
mov dword [eax + 0xc], edx
mov edx, dword [ebp - 0x2c]
add esp, 0xc
lea ecx, [eax + 0x14]
mov dword [eax + 0x10], edx
push ecx
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x18]
push dword [ebp - 0x28]
dec eax
push eax
call fcn.01293823
mov esi, eax
cmp esi, ebx
jne 0x1318e1c
push dword [ebp - 0x24]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x14]
add eax, 0x14
push eax
call fcn.01317bcc
mov esi, eax
cmp esi, ebx
jne 0x1318e1c
push ebx
call fcn.0103e4a5
mov eax, dword [edi]
pop ecx
push ebx
lea ecx, [ebp - 4]
push ecx
mov ecx, edi
mov dword [ebp - 8], ebx
call dword [eax + 0x18]
mov esi, eax
cmp esi, ebx
jne 0x1318e1c
mov eax, dword [ebp - 4]
xor ecx, ecx
push 2
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0103e496
pop ecx
mov dword [ebp - 8], eax
cmp eax, ebx
je 0x1318d99
mov edx, dword [edi]
push eax
lea eax, [ebp - 4]
push eax
mov ecx, edi
call dword [edx + 0x18]
mov esi, eax
cmp esi, ebx
jne 0x1318e1c
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x1c]
add eax, 0x14
add eax, ecx
push eax
mov dword [ebp + 8], eax
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 4]
push dword [ebp - 8]
dec eax
push eax
call fcn.01293823
mov esi, eax
cmp esi, ebx
jne 0x1318e1c
push dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
push dword [ebp + 8]
call fcn.01317bcc
mov esi, eax
cmp esi, ebx
jne 0x1318e1c
push dword [ebp - 8]
call fcn.0103e4a5
mov eax, dword [edi]
pop ecx
push ebx
lea ecx, [ebp - 4]
push ecx
mov ecx, edi
mov dword [ebp - 8], ebx
call dword [eax + 0x1c]
mov esi, eax
cmp esi, ebx
jne 0x1318e1c
mov eax, dword [ebp - 4]
xor ecx, ecx
push 2
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0103e496
pop ecx
mov dword [ebp - 8], eax
cmp eax, ebx
je 0x1318d99
mov edx, dword [edi]
push eax
lea eax, [ebp - 4]
push eax
mov ecx, edi
call dword [edx + 0x1c]
mov esi, eax
cmp esi, ebx
jne 0x1318e1c
mov eax, dword [ebp + 8]
add eax, dword [ebp - 0x10]
push eax
mov dword [ebp + 8], eax
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 4]
push dword [ebp - 8]
dec eax
push eax
call fcn.01293823
mov esi, eax
cmp esi, ebx
jne 0x1318e1c
push dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
push dword [ebp + 8]
call fcn.01317bcc
mov esi, eax
cmp esi, ebx
jne 0x1318e1c
push dword [ebp - 8]
call fcn.0103e4a5
mov eax, dword [edi]
pop ecx
push ebx
lea ecx, [ebp - 4]
push ecx
mov ecx, edi
mov dword [ebp - 8], ebx
call dword [eax + 0x20]
mov esi, eax
cmp esi, ebx
jne 0x1318e1c
mov eax, dword [ebp - 4]
xor ecx, ecx
push 2
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0103e496
pop ecx
mov dword [ebp - 8], eax
cmp eax, ebx
je 0x1318d99
mov edx, dword [edi]
push eax
lea eax, [ebp - 4]
push eax
mov ecx, edi
call dword [edx + 0x20]
mov esi, eax
cmp esi, ebx
jne 0x1318e1c
mov eax, dword [ebp + 8]
add eax, dword [ebp - 0x10]
push eax
mov dword [ebp + 8], eax
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 4]
push dword [ebp - 8]
dec eax
push eax
call fcn.01293823
mov esi, eax
cmp esi, ebx
jne 0x1318e1c
push dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
push dword [ebp + 8]
call fcn.01317bcc
mov esi, eax
cmp esi, ebx
jne 0x1318e1c
push dword [ebp - 8]
call fcn.0103e4a5
mov eax, dword [edi]
pop ecx
push ebx
lea ecx, [ebp - 4]
push ecx
mov ecx, edi
mov dword [ebp - 8], ebx
call dword [eax + 0x24]
mov esi, eax
cmp esi, ebx
jne 0x1318e1c
mov eax, dword [ebp - 4]
xor ecx, ecx
push 2
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0103e496
pop ecx
mov dword [ebp - 8], eax
cmp eax, ebx
je 0x1318d99
mov edx, dword [edi]
push eax
lea eax, [ebp - 4]
push eax
mov ecx, edi
call dword [edx + 0x24]
mov esi, eax
cmp esi, ebx
jne 0x1318e1c
mov eax, dword [ebp + 8]
add eax, dword [ebp - 0x10]
push eax
mov dword [ebp + 8], eax
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 4]
push dword [ebp - 8]
dec eax
push eax
call fcn.01293823
mov esi, eax
cmp esi, ebx
jne 0x1318e1c
push dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
push dword [ebp + 8]
call fcn.01317bcc
mov esi, eax
cmp esi, ebx
jne 0x1318e1c
push dword [ebp - 8]
call fcn.0103e4a5
mov eax, dword [edi]
pop ecx
push ebx
lea ecx, [ebp - 4]
push ecx
mov ecx, edi
mov dword [ebp - 8], ebx
call dword [eax + 0x28]
mov esi, eax
cmp esi, ebx
jne 0x1318e1c
mov eax, dword [ebp - 4]
xor ecx, ecx
push 2
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0103e496
pop ecx
mov dword [ebp - 8], eax
cmp eax, ebx
je 0x1318d99
mov edx, dword [edi]
push eax
lea eax, [ebp - 4]
push eax
mov ecx, edi
call dword [edx + 0x28]
mov esi, eax
cmp esi, ebx
jne 0x1318e1c
mov eax, dword [ebp + 8]
add eax, dword [ebp - 0x10]
push eax
mov dword [ebp + 8], eax
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 4]
push dword [ebp - 8]
dec eax
push eax
call fcn.01293823
mov esi, eax
cmp esi, ebx
jne 0x1318e1c
push dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
push dword [ebp + 8]
call fcn.01317bcc
mov esi, eax
cmp esi, ebx
jne 0x1318e1c
push dword [ebp - 8]
call fcn.0103e4a5
mov eax, dword [edi]
pop ecx
push ebx
lea ecx, [ebp - 4]
push ecx
mov ecx, edi
mov dword [ebp - 8], ebx
call dword [eax + 0x2c]
mov esi, eax
cmp esi, ebx
jne 0x1318e1c
mov eax, dword [ebp - 4]
xor ecx, ecx
push 2
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0103e496
pop ecx
mov dword [ebp - 8], eax
cmp eax, ebx
jne 0x1318da0
mov esi, 0x8007000e
jmp 0x1318e1c
mov edx, dword [edi]
push eax
lea eax, [ebp - 4]
push eax
mov ecx, edi
call dword [edx + 0x2c]
mov esi, eax
cmp esi, ebx
jne 0x1318e1c
mov edi, dword [ebp + 8]
mov eax, dword [ebp - 0x24]
add edi, dword [ebp - 0x10]
mov dword [ebp - 0xc], eax
push edi
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 4]
push dword [ebp - 8]
dec eax
push eax
call fcn.01293823
mov esi, eax
cmp esi, ebx
jne 0x1318e1c
push dword [ebp - 0x24]
push edi
mov edi, dword [ebp - 0x14]
mov ecx, edi
call fcn.01317bcc
mov esi, eax
cmp esi, ebx
jne 0x1318e1c
mov eax, dword [ebp - 0x38]
add edi, 0x20
push edi
push 0x40
push ebx
push dword [ebp - 0x34]
push dword [ebp - 0x1c]
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
jne 0x1318e1c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x1318e1a
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
push dword [ebp - 0x1c]
call fcn.0103e4a5
push dword [ebp - 8]
call fcn.0103e4a5
push dword [ebp - 0x28]
call fcn.0103e4a5
push dword [ebp - 0x30]
call fcn.0103e4a5
add esp, 0x10
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 4