Function at 0x611767c6
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x128
push ebx
push esi
mov esi, ecx
mov dword [ebp - 0x24], edx
xor ebx, ebx
mov dword [ebp - 0x10], esi
mov dword [ebp - 4], ebx
push edi
mov eax, dword [esi + 4]
push 0x50
mov ecx, dword [eax + 4]
mov eax, dword [eax + 8]
test eax, eax
mov dword [ebp - 0x1c], ecx
pop ecx
cmove eax, ecx
mov ecx, esi
mov dword [ebp - 0x18], eax
call fcn.6117678c
xor edx, edx
mov dword [ebp - 0xc], eax
call fcn.61173330
test al, al
je 0x6117693d
mov edi, dword [esi + 0xc]
mov eax, dword [esi + 4]
shr edi, 0xf
not edi
and edi, 1
mov ebx, dword [eax]
mov dword [ebp - 8], edi
je 0x61176943
test ebx, ebx
je 0x61176943
mov eax, dword [ebp - 0xc]
or eax, 0x40
push eax
push dword [ebp - 0x18]
lea eax, [ebp - 4]
push dword [ebp - 0x1c]
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x61176943
xor eax, eax
test dword [esi + 0xc], 0x4000
je 0x61176939
mov esi, 0x104
push esi
push eax
lea eax, [ebp - 0x128]
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov dword [ebp - 0x20], esi
xor esi, esi
lea eax, [ebp - 0x20]
push esi
push eax
lea eax, [ebp - 0x128]
push eax
push 0x6f
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptGetProvParam]
test eax, eax
je 0x61176907
push esi
lea eax, [ebp - 0x128]
push eax
push esi
call dword [sym.imp.msvcrt.dll_mbstowcs]
mov esi, eax
add esp, 0xc
cmp esi, 0xffffffff
je 0x61176af5
lea edi, [esi*2 + 2]
call fcn.6117404f
test eax, eax
je 0x611768cb
mov ecx, edi
call fcn.61173fb1
jmp 0x611768d4
push edi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
test ebx, ebx
jne 0x611768e4
mov esi, 0x8009000e
jmp 0x61176b24
lea eax, [esi + 1]
push eax
lea eax, [ebp - 0x128]
push eax
push ebx
call dword [sym.imp.msvcrt.dll_mbstowcs]
add esp, 0xc
cmp eax, 0xffffffff
je 0x61176af5
mov edi, dword [ebp - 8]
xor esi, esi
push esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, dword [ebp - 0xc]
or eax, 0x10
mov dword [ebp - 4], esi
push eax
push dword [ebp - 0x18]
lea eax, [ebp - 4]
push dword [ebp - 0x1c]
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x61176af5
mov dword [ebp - 4], esi
jmp 0x61176943
mov ebx, eax
jmp 0x61176943
xor edi, edi
inc edi
mov dword [ebp - 8], edi
test edi, edi
je 0x61176ac8
test ebx, ebx
jne 0x611769c4
call fcn.6117e048
mov esi, eax
test esi, esi
jne 0x61176967
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x61176b24
mov ecx, esi
xor ebx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x6117696e
sub ecx, edx
sar ecx, 1
lea edi, [ecx*2 + 2]
call fcn.6117404f
test eax, eax
je 0x61176996
mov ecx, edi
call fcn.61173fb1
jmp 0x6117699f
push edi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
test ebx, ebx
jne 0x611769b2
push esi
call dword [sym.imp.msvcrt.dll_free]
pop ecx
jmp 0x611768da
push edi
push esi
push ebx
call sub.msvcrt.dll_memcpy
push esi
call dword [sym.imp.msvcrt.dll_free]
add esp, 0x10
test byte [ebp - 0xc], 0x40
je 0x61176a95
push 0x5c
push ebx
call dword [sym.imp.msvcrt.dll_wcschr]
pop ecx
pop ecx
test eax, eax
jne 0x61176a95
mov ecx, ebx
xor esi, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, si
jne 0x611769e8
sub ecx, edx
sar ecx, 1
lea esi, [ecx*2 + 0x1c]
call fcn.6117404f
test eax, eax
je 0x61176a10
mov ecx, esi
call fcn.61173fb1
jmp 0x61176a19
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x61176a2a
mov esi, 0x8009000e
jmp 0x61176afd
push 7
pop ecx
mov esi, str..REGISTRY_
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov edx, ebx
xor ecx, ecx
mov esi, edx
mov ax, word [edx]
add edx, 2
cmp ax, cx
jne 0x61176a3c
mov edi, dword [ebp - 0x14]
sub edx, esi
sub edi, 2
mov ax, word [edi + 2]
add edi, 2
cmp ax, cx
jne 0x61176a4f
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 0x10]
mov eax, dword [esi + 4]
cmp dword [eax], ebx
jne 0x61176a77
xor ecx, ecx
mov dword [eax], ecx
call fcn.6117404f
test eax, eax
je 0x61176a89
mov ecx, ebx
call fcn.61174000
jmp 0x61176a90
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ebx, dword [ebp - 0x14]
jmp 0x61176a98
mov esi, dword [ebp - 0x10]
mov eax, dword [esi + 4]
cmp dword [eax], ebx
je 0x61176ac5
cmp dword [eax], 0
je 0x61176ac0
call fcn.6117404f
mov ecx, dword [esi + 4]
mov ecx, dword [ecx]
test eax, eax
je 0x61176ab9
call fcn.61174000
jmp 0x61176ac0
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [esi + 4]
mov dword [eax], ebx
mov edi, dword [ebp - 8]
push 8
pop ecx
test edi, edi
mov eax, 0xf0000000
cmovne eax, ecx
or eax, dword [ebp - 0xc]
push eax
push dword [ebp - 0x18]
xor eax, eax
test edi, edi
push dword [ebp - 0x1c]
cmovne eax, ebx
push eax
lea eax, [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x61176b45
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test ebx, ebx
je 0x61176b24
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 4]
cmp dword [eax], ebx
je 0x61176b24
call fcn.6117404f
test eax, eax
je 0x61176b1d
mov ecx, ebx
call fcn.61174000
jmp 0x61176b24
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 4], 0
je 0x61176b36
xor eax, eax
push eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
test esi, esi
je 0x61176b41
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x61176b59
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 4]
mov dword [eax], ecx
xor eax, eax
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret