Function at 0x1078ecc
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
push 0x12c
mov eax, 0x10c10b4
call fcn.01077e6d
xor ebx, ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 4], ebx
mov ecx, dword [ebp + 0x2c]
cmp ecx, ebx
je 0x1078eef
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [ebp + 8], ebx
je 0x1078f33
push ebx
push SysReAllocString
push dword [ebp + 8]
call fcn.0102ec4a
test eax, eax
jge 0x1078f33
push 0x80070057
push 0x1014850
push 0x38
push 0x10147c0
lea ecx, [ebp - 0xe4]
call fcn.0102f220
push 0x10c2b74
lea eax, [ebp - 0xe4]
push eax
call sub.msvcrt.dll__CxxThrowException
cmp dword [ebp + 0x10], ebx
je 0x1078f6d
push ebx
push SysReAllocString
push dword [ebp + 0x10]
call fcn.0102ec4a
test eax, eax
jge 0x1078f6d
push 0x80070057
push 0x1014720
push 0x39
push 0x10147c0
lea ecx, [ebp - 0x58]
call fcn.0102f220
push 0x10c2b74
lea eax, [ebp - 0x58]
jmp 0x1078f2d
test dword [ebp + 0x18], 0xffff0000
je 0x1078f9f
push 0x80070057
push 0x10146e0
push 0x3a
push 0x10147c0
lea ecx, [ebp - 0xac]
call fcn.0102f220
push 0x10c2b74
lea eax, [ebp - 0xac]
jmp 0x1078f2d
push ebx
mov edi, dword [ebp + 0x1c]
mov eax, edi
and eax, 0xffffffdf
push eax
call fcn.0107b330
push ebx
push dword [ebp + 0x20]
call fcn.0107b412
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 0x10790ba
cmp byte [ebp + 0x28], bl
je 0x1078ff7
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x8009000f
je 0x107902b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.010786e5
push eax
push 0x1014658
push 0x47
push 0x10147c0
lea ecx, [ebp - 0x11c]
call fcn.0102f220
push 0x10c2b74
lea eax, [ebp - 0x11c]
jmp 0x1078f2d
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 0x1079070
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.010786e5
push eax
push 0x1014588
push 0x4f
push 0x10147c0
lea ecx, [ebp - 0x74]
call fcn.0102f220
push 0x10c2b74
lea eax, [ebp - 0x74]
jmp 0x1078f2d
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 0x10790ba
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.010786e5
push eax
push 0x10144c0
push 0x55
push 0x10147c0
lea ecx, [ebp - 0x90]
call fcn.0102f220
push 0x10c2b74
lea eax, [ebp - 0x90]
jmp 0x1078f2d
cmp byte [ebp + 0x24], bl
je 0x107910e
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 0x107910e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.010786e5
push eax
push 0x1014410
push 0x5f
push 0x10147c0
lea ecx, [ebp - 0xc8]
call fcn.0102f220
push 0x10c2b74
lea eax, [ebp - 0xc8]
jmp 0x1078f2d
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 0x1079163
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.010786e5
push eax
push 0x1014388
push 0x67
push 0x10147c0
lea ecx, [ebp - 0x100]
call fcn.0102f220
push 0x10c2b74
lea eax, [ebp - 0x100]
jmp 0x1078f2d
push 0x24
call fcn.01077a29
pop ecx
mov dword [ebp + 0x28], eax
mov byte [ebp - 4], 2
cmp eax, ebx
je 0x107918c
push 1
push 1
push dword [ebp + 0x14]
push dword [ebp - 0x1c]
push dword [ebp - 0x14]
mov ecx, eax
call fcn.0107e61d
jmp 0x107918e
xor eax, eax
mov byte [ebp - 4], 1
mov dword [ebp - 0x18], eax
cmp eax, ebx
jne 0x10791c5
push 0x8007000e
push 0x10142c0
push 0x6b
push 0x10147c0
lea ecx, [ebp - 0x138]
call fcn.0102f220
push 0x10c2b74
lea eax, [ebp - 0x138]
jmp 0x1078f2d
mov dword [ebp - 0x14], ebx
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x14]
call fcn.01078df6
or dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x18]
call fcn.01077f21
ret 0x28