Function at 0x12a9d94
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
xor esi, esi
cmp dword [ebp + 8], esi
push edi
mov ebx, ecx
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 4], esi
mov dword [ebp - 0x14], esi
mov dword [ebp - 0xc], esi
mov dword [ebp - 8], esi
jne 0x12a9dc4
mov edi, 0x80070057
jmp 0x12aa034
push dword [ebx + 0x14]
call fcn.01043bb7
push dword [ebx + 0xc]
mov dword [ebx + 0x14], esi
call fcn.01043bb7
mov eax, dword [ebx + 0x20]
cmp eax, esi
pop ecx
pop ecx
mov dword [ebx + 0xc], esi
mov dword [ebx + 0x10], esi
je 0x12a9df0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov dword [ebx + 0x20], esi
lea eax, [ebx + 0x24]
cmp dword [eax], esi
jne 0x12a9e1e
push 0xf0000000
push 0x18
push esi
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x12a9e1e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, esi
jg 0x12aa01f
jmp 0x12aa029
mov ecx, dword [ebp + 8]
mov eax, dword [ecx]
push esi
lea edx, [ebp - 8]
push edx
call dword [eax + 0x10]
mov edi, eax
test edi, edi
jne 0x12aa034
mov eax, dword [ebp - 8]
xor ecx, ecx
push 2
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.01043ba8
test eax, eax
pop ecx
mov dword [ebp - 0x10], eax
je 0x12a9f8f
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
push eax
lea eax, [ebp - 8]
push eax
call dword [edx + 0x10]
mov edi, eax
test edi, edi
jne 0x12aa034
mov ecx, dword [ebp + 8]
mov eax, dword [ecx]
push edi
lea edx, [ebp - 0xc]
push edx
call dword [eax + 0x14]
mov edi, eax
test edi, edi
jne 0x12aa034
mov eax, dword [ebp - 0xc]
xor ecx, ecx
push 2
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.01043ba8
test eax, eax
pop ecx
mov dword [ebp - 0x18], eax
je 0x12a9f8f
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
push eax
lea eax, [ebp - 0xc]
push eax
call dword [edx + 0x14]
mov edi, eax
test edi, edi
jne 0x12aa034
push eax
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp - 0xc]
push dword [ebp - 0x18]
dec eax
push eax
call fcn.011ec4e2
mov edi, eax
test edi, edi
jne 0x12aa034
cmp dword [ebp - 4], 4
jbe 0x12a9eec
mov edi, 0x80049e2e
jmp 0x12aa034
lea eax, [ebp - 0x10]
sub eax, dword [ebp - 4]
push eax
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp - 0xc]
push dword [ebp - 0x18]
dec eax
push eax
call fcn.011ec4e2
mov edi, eax
test edi, edi
jne 0x12aa034
push 4
lea eax, [ebp - 0x14]
push eax
mov ecx, ebx
call fcn.012a97b5
mov edi, eax
test edi, edi
jne 0x12aa034
mov eax, dword [ebp - 0x14]
mov dword [ebx + 0x1c], eax
push edi
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp - 8]
push dword [ebp - 0x10]
dec eax
push eax
call fcn.011ec4e2
mov edi, eax
test edi, edi
jne 0x12aa034
push dword [ebp - 4]
call fcn.01043ba8
test eax, eax
pop ecx
mov dword [ebx + 0x14], eax
je 0x12a9f8f
push eax
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp - 8]
push dword [ebp - 0x10]
dec eax
push eax
call fcn.011ec4e2
mov edi, eax
test edi, edi
jne 0x12aa034
mov eax, dword [ebp - 4]
lea edi, [eax + 0x14]
push edi
mov dword [ebx + 0x18], eax
mov dword [ebp + 8], eax
mov dword [ebp - 0x1c], edi
call fcn.01043ba8
mov esi, eax
test esi, esi
pop ecx
jne 0x12a9f99
mov edi, 0x8007000e
jmp 0x12aa034
push edi
push 0
push esi
call sub.msvcrt.dll_memset
and word [esi + 2], 0
mov ecx, dword [ebp + 8]
add esp, 0xc
mov byte [esi], 6
mov byte [esi + 1], 2
mov dword [esi + 4], 0xa400
shl ecx, 3
lea eax, [esi + 0x14]
push eax
mov dword [esi + 8], 0x31415352
mov dword [esi + 0xc], ecx
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x10]
mov dword [esi + 0x10], ecx
mov eax, dword [ebp - 8]
dec eax
push eax
call fcn.011ec4e2
mov edi, eax
test edi, edi
jne 0x12aa034
push dword [ebp + 8]
lea eax, [esi + 0x14]
push eax
mov ecx, ebx
call fcn.012a97b5
mov edi, eax
test edi, edi
jne 0x12aa034
lea eax, [ebx + 0x20]
push eax
push 0x40
push edi
push dword [ebp - 0x1c]
push esi
push dword [ebx + 0x24]
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
jne 0x12aa02d
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x12aa029
and eax, 0xffff
or eax, 0x80070000
mov edi, eax
jmp 0x12aa034
mov dword [ebx + 8], 5
push esi
call fcn.01043bb7
push dword [ebp - 0x10]
call fcn.01043bb7
push dword [ebp - 0x18]
call fcn.01043bb7
add esp, 0xc
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret 4