Function at 0x10005b78
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.10005b3b
push 6
xor edx, edx
mov dword [ebp - 0xc], eax
pop ecx
call fcn.10002450
test al, al
je 0x10005d15
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 0x10005d02
test ebx, ebx
je 0x10005d02
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
jne 0x10005c12
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x80090016
je 0x10005d02
xor eax, eax
test dword [esi + 0xc], 0x4000
je 0x10005d00
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 0x10005cce
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
jne 0x10005c7d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x10005ecc
lea edi, [esi*2 + 2]
call fcn.100032ba
test eax, eax
je 0x10005c96
mov ecx, edi
call fcn.1000321c
jmp 0x10005c9f
push edi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
test ebx, ebx
jne 0x10005caf
mov esi, 0x8009000e
jmp 0x10005eef
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 0x10005c70
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 0x10005ec0
mov dword [ebp - 4], esi
jmp 0x10005d02
mov ebx, eax
mov eax, ebx
test edi, edi
je 0x10005e93
mov dword [ebp - 8], edi
test eax, eax
jne 0x10005d8f
jmp 0x10005d1c
mov dword [ebp - 8], 1
call fcn.1000db77
mov esi, eax
test esi, esi
jne 0x10005d34
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x10005eef
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x10005d39
sub ecx, edx
sar ecx, 1
lea edi, [ecx*2 + 2]
call fcn.100032ba
test eax, eax
je 0x10005d61
mov ecx, edi
call fcn.1000321c
jmp 0x10005d6a
push edi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
test ebx, ebx
jne 0x10005d7d
push esi
call dword [sym.imp.msvcrt.dll_free]
pop ecx
jmp 0x10005ca5
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 0x10005e60
push 0x5c
push ebx
call dword [sym.imp.msvcrt.dll_wcschr]
pop ecx
pop ecx
test eax, eax
jne 0x10005e60
mov ecx, ebx
xor edi, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x10005db3
sub ecx, edx
sar ecx, 1
lea esi, [ecx*2 + 0x1c]
call fcn.100032ba
test eax, eax
je 0x10005ddb
mov ecx, esi
call fcn.1000321c
jmp 0x10005de4
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x10005df5
mov esi, 0x8009000e
jmp 0x10005ec8
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 0x10005e07
mov edi, dword [ebp - 0x14]
sub edx, esi
sub edi, 2
mov ax, word [edi + 2]
add edi, 2
cmp ax, cx
jne 0x10005e1a
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 0x10005e42
xor edi, edi
mov dword [eax], edi
call fcn.100032ba
test eax, eax
je 0x10005e54
mov ecx, ebx
call fcn.1000326b
jmp 0x10005e5b
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ebx, dword [ebp - 0x14]
jmp 0x10005e63
mov esi, dword [ebp - 0x10]
mov eax, dword [esi + 4]
cmp dword [eax], ebx
je 0x10005e90
cmp dword [eax], 0
je 0x10005e8b
call fcn.100032ba
mov ecx, dword [esi + 4]
mov ecx, dword [ecx]
test eax, eax
je 0x10005e84
call fcn.1000326b
jmp 0x10005e8b
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 0x10005f10
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test ebx, ebx
je 0x10005eef
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 4]
cmp dword [eax], ebx
je 0x10005eef
call fcn.100032ba
test eax, eax
je 0x10005ee8
mov ecx, ebx
call fcn.1000326b
jmp 0x10005eef
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 4], 0
je 0x10005f01
xor eax, eax
push eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
test esi, esi
je 0x10005f0c
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x10005f24
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