Function at 0x1078e58
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
push 0x12c
mov eax, 0x10c1134
call fcn.01077dad
xor ebx, ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 4], ebx
mov ecx, dword [ebp + 0x2c]
cmp ecx, ebx
je 0x1078e7b
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [ebp + 8], ebx
je 0x1078ebf
push ebx
push SysReAllocString
push dword [ebp + 8]
call fcn.0102ebba
test eax, eax
jge 0x1078ebf
push 0x80070057
push 0x1014840
push 0x38
push 0x10147b8
lea ecx, [ebp - 0xe4]
call fcn.0102f190
push 0x10c2bec
lea eax, [ebp - 0xe4]
push eax
call sub.msvcrt.dll__CxxThrowException
cmp dword [ebp + 0x10], ebx
je 0x1078ef9
push ebx
push SysReAllocString
push dword [ebp + 0x10]
call fcn.0102ebba
test eax, eax
jge 0x1078ef9
push 0x80070057
push 0x1014718
push 0x39
push 0x10147b8
lea ecx, [ebp - 0x58]
call fcn.0102f190
push 0x10c2bec
lea eax, [ebp - 0x58]
jmp 0x1078eb9
test dword [ebp + 0x18], 0xffff0000
je 0x1078f2b
push 0x80070057
push 0x10146d8
push 0x3a
push 0x10147b8
lea ecx, [ebp - 0xac]
call fcn.0102f190
push 0x10c2bec
lea eax, [ebp - 0xac]
jmp 0x1078eb9
push ebx
mov edi, dword [ebp + 0x1c]
mov eax, edi
and eax, 0xffffffdf
push eax
call fcn.0107b2bd
push ebx
push dword [ebp + 0x20]
call fcn.0107b39f
mov dword [ebp - 0x14], ebx
mov byte [ebp - 4], 1
mov dword [ebp + 0x1c], edi
or dword [ebp + 0x1c], 8
push dword [ebp + 0x1c]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp + 0x10]
lea eax, [ebp - 0x14]
push eax
mov esi, dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
call esi
cmp eax, ebx
jne 0x1079046
cmp byte [ebp + 0x28], bl
je 0x1078f83
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x8009000f
je 0x1078fb7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.01078671
push eax
push 0x1014650
push 0x47
push 0x10147b8
lea ecx, [ebp - 0x11c]
call fcn.0102f190
push 0x10c2bec
lea eax, [ebp - 0x11c]
jmp 0x1078eb9
or edi, 0x10
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp + 0x10]
lea eax, [ebp - 0x14]
push eax
call esi
test eax, eax
jne 0x1078ffc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.01078671
push eax
push 0x1014580
push 0x4f
push 0x10147b8
lea ecx, [ebp - 0x74]
call fcn.0102f190
push 0x10c2bec
lea eax, [ebp - 0x74]
jmp 0x1078eb9
push dword [ebp + 0x1c]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp + 0x10]
lea eax, [ebp - 0x14]
push eax
call esi
test eax, eax
jne 0x1079046
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.01078671
push eax
push 0x10144b8
push 0x55
push 0x10147b8
lea ecx, [ebp - 0x90]
call fcn.0102f190
push 0x10c2bec
lea eax, [ebp - 0x90]
jmp 0x1078eb9
cmp byte [ebp + 0x24], bl
je 0x107909a
mov dword [ebp + 0x28], 1
push ebx
lea eax, [ebp + 0x28]
push eax
push 0x29
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_CryptSetProvParam]
test eax, eax
jne 0x107909a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.01078671
push eax
push 0x1014408
push 0x5f
push 0x10147b8
lea ecx, [ebp - 0xc8]
call fcn.0102f190
push 0x10c2bec
lea eax, [ebp - 0xc8]
jmp 0x1078eb9
mov dword [ebp - 0x1c], ebx
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [ebp + 0x18]
shl eax, 0x10
or eax, dword [ebp + 0x20]
push eax
push dword [ebp + 0x14]
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_CryptGenKey]
test eax, eax
jne 0x10790ef
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.01078671
push eax
push 0x1014380
push 0x67
push 0x10147b8
lea ecx, [ebp - 0x100]
call fcn.0102f190
push 0x10c2bec
lea eax, [ebp - 0x100]
jmp 0x1078eb9
push 0x24
call fcn.0107796d
pop ecx
mov dword [ebp + 0x28], eax
mov byte [ebp - 4], 2
cmp eax, ebx
je 0x1079118
push 1
push 1
push dword [ebp + 0x14]
push dword [ebp - 0x1c]
push dword [ebp - 0x14]
mov ecx, eax
call fcn.0107e5aa
jmp 0x107911a
xor eax, eax
mov byte [ebp - 4], 1
mov dword [ebp - 0x18], eax
cmp eax, ebx
jne 0x1079151
push 0x8007000e
push 0x10142c4
push 0x6b
push 0x10147b8
lea ecx, [ebp - 0x138]
call fcn.0102f190
push 0x10c2bec
lea eax, [ebp - 0x138]
jmp 0x1078eb9
mov dword [ebp - 0x14], ebx
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x14]
call fcn.01078d82
or dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x18]
call fcn.01077e61
ret 0x28