Function at 0x10797d6
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
push pe_nt_image_headers32
mov eax, 0x10c1193
call fcn.01077e6d
xor ebx, ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 4], ebx
mov ecx, dword [ebp + 0x30]
cmp ecx, ebx
je 0x10797f9
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [ebp + 8], ebx
je 0x107983a
push ebx
push SysReAllocString
push dword [ebp + 8]
call fcn.0102ec4a
test eax, eax
jge 0x107983a
push 0x80070057
push 0x1014850
push 0x17e
push 0x10147c0
lea ecx, [ebp - 0x60]
call fcn.0102f220
push 0x10c2b74
lea eax, [ebp - 0x60]
push eax
call sub.msvcrt.dll__CxxThrowException
cmp dword [ebp + 0x10], ebx
je 0x107987d
push ebx
push SysReAllocString
push dword [ebp + 0x10]
call fcn.0102ec4a
test eax, eax
jge 0x107987d
push 0x80070057
push 0x1014720
push 0x17f
push 0x10147c0
lea ecx, [ebp - 0x98]
call fcn.0102f220
push 0x10c2b74
lea eax, [ebp - 0x98]
jmp 0x1079834
cmp dword [ebp + 0x1c], ebx
jne 0x10798ae
push 0x80070057
push 0x1014b50
push 0x181
push 0x10147c0
lea ecx, [ebp - 0x108]
call fcn.0102f220
push 0x10c2b74
lea eax, [ebp - 0x108]
jmp 0x1079834
push ebx
mov edi, dword [ebp + 0x24]
mov eax, edi
and eax, 0xfffffff7
push eax
call fcn.0107b330
push ebx
push dword [ebp + 0x28]
call fcn.0107b412
mov dword [ebp - 0x14], ebx
mov byte [ebp - 4], 1
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x18], ebx
mov ecx, dword [ebp + 0x18]
cmp ecx, ebx
jne 0x10799d7
mov eax, edi
or eax, 0x40
push eax
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 0x1079972
call fcn.01091f43
mov dword [ebp - 0x18], eax
cmp byte [ebp + 0x2c], bl
je 0x1079972
mov eax, edi
or eax, 8
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp + 0x10]
lea eax, [ebp - 0x14]
push eax
call esi
mov dword [ebp - 0x24], eax
cmp eax, ebx
jne 0x1079a31
call fcn.01091f43
cmp eax, 0x800704c7
je 0x1079947
cmp eax, 0x4c7
je 0x1079947
cmp eax, 0x8010006e
je 0x1079947
mov eax, dword [ebp - 0x18]
push eax
push 0x1014b2c
push 0x1a4
push 0x10147c0
lea ecx, [ebp - 0xd0]
call fcn.0102f220
push 0x10c2b74
lea eax, [ebp - 0xd0]
jmp 0x1079834
lea ecx, [ebp - 0x14]
call fcn.01078df6
mov dword [ebp - 0x14], ebx
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp + 0x10]
lea eax, [ebp - 0x14]
push eax
call esi
cmp eax, ebx
jne 0x1079a31
call fcn.01091f43
cmp eax, 0x800704c7
je 0x10799b2
cmp eax, 0x4c7
je 0x10799b2
cmp eax, 0x8010006e
je 0x10799b2
mov eax, dword [ebp - 0x18]
push eax
push 0x1014b18
push 0x1b8
push 0x10147c0
lea ecx, [ebp - 0x7c]
call fcn.0102f220
push 0x10c2b74
lea eax, [ebp - 0x7c]
jmp 0x1079834
mov eax, dword [ecx]
call dword [eax + 0x38]
mov esi, eax
push ebx
push ebx
push esi
call dword [sym.imp.ADVAPI32.dll_CryptContextAddRef]
test eax, eax
jne 0x1079a22
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.010786e5
push eax
push 0x1014ad0
push 0x1bf
push 0x10147c0
lea ecx, [ebp - 0xb4]
call fcn.0102f220
push 0x10c2b74
lea eax, [ebp - 0xb4]
jmp 0x1079834
push esi
lea ecx, [ebp - 0x14]
call fcn.01078e77
mov esi, dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
mov dword [ebp - 0x1c], ebx
mov ecx, dword [ebp + 0x18]
cmp ecx, ebx
je 0x1079a42
mov eax, dword [ecx]
call dword [eax + 0x28]
jmp 0x1079a44
xor eax, eax
lea ecx, [ebp - 0x1c]
push ecx
push dword [ebp + 0x28]
push eax
push dword [ebp + 0x20]
push dword [ebp + 0x1c]
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
cmp eax, ebx
jne 0x1079aac
call fcn.01091f43
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x24], ebx
je 0x1079a7f
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
push dword [ebp - 0x18]
push 0x1014b18
push 0x1d8
push 0x10147c0
lea ecx, [ebp - 0xec]
call fcn.0102f220
push 0x10c2b74
lea eax, [ebp - 0xec]
jmp 0x1079834
push 0x24
call fcn.01077a29
pop ecx
mov ecx, eax
mov dword [ebp + 0x2c], ecx
mov byte [ebp - 4], 2
cmp ecx, ebx
je 0x1079ad5
push 1
push 1
push dword [ebp + 0x14]
push dword [ebp - 0x1c]
push dword [ebp - 0x14]
call fcn.0107e61d
jmp 0x1079ad7
xor eax, eax
mov byte [ebp - 4], 1
mov dword [ebp - 0x20], eax
cmp eax, ebx
jne 0x1079b11
push 0x8007000e
push 0x10142c0
push 0x1dd
push 0x10147c0
lea ecx, [ebp - 0x124]
call fcn.0102f220
push 0x10c2b74
lea eax, [ebp - 0x124]
jmp 0x1079834
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 - 0x20]
call fcn.01077f21
ret 0x2c