Function at 0x416050
Capabilities:
Create new key via cryptacquirecontext
Generate random numbers via winapi

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43e2c5
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebx
sub esp, 0x30
push ebx
push esi
push edi
mov dword [ebp - 4], 0
mov dword [ebp - 0x10], esp
push 0x28
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
call fcn.00420d50
mov edi, eax
xorps xmm0, xmm0
add esp, 4
mov dword [ebp - 0x40], edi
lea esi, [edi + 0x28]
movups xmmword [edi], xmm0
mov dword [ebp - 0x1c], esi
movups xmmword [edi + 0x10], xmm0
mov dword [ebp - 0x38], esi
movq qword [edi + 0x20], xmm0
mov dword [ebp - 0x3c], esi
push 0xf0000040
push 1
push 0
push 0
lea eax, [ebp - 0x20]
mov byte [ebp - 4], 1
push eax
mov dword [ebp - 0x20], 0
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
mov ecx, eax
mov dword [ebp - 0x24], ecx
test ecx, ecx
je 0x416107
mov eax, esi
push edi
sub eax, edi
push eax
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x416117
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
cmp dword [ebp - 0x24], 0
je 0x4162a0
sub esi, edi
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x24], esi
je 0x416168
cmp esi, 0x7fffffff
ja 0x41631b
push esi
lea ecx, [ebp - 0x34]
call fcn.00409530
push esi
mov esi, dword [ebp - 0x34]
push edi
push esi
call fcn.00422340
mov eax, dword [ebp - 0x24]
add esp, 0xc
add eax, esi
mov dword [ebp - 0x30], eax
lea edx, [ebp - 0x34]
mov byte [ebp - 4], 2
mov ecx, 0x450ae0
call fcn.00412fa0
mov esi, dword [ebp - 0x34]
test eax, eax
je 0x41626c
mov eax, dword [ebp - 0x30]
sub eax, esi
cmp eax, 0x100
jne 0x41626c
push dword [0x45749c]
push str.___Generated_new_key__zu_n
call fcn.00401d10
push 0x4574a0
call fcn.00420894
mov eax, dword [0x4574d4]
add esp, 0xc
test eax, eax
je 0x4161ea
mov ecx, dword [0x4574dc]
sub ecx, eax
cmp ecx, 0x1000
jb 0x4161e0
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x416320
mov eax, edx
push ecx
push eax
call fcn.00420d85
add esp, 8
mov eax, dword [ebp - 0x1c]
mov dword [0x4574d8], eax
mov dword [0x4574dc], eax
xor eax, eax
mov dword [0x4574d4], edi
xor edi, edi
mov dword [ebp - 0x1c], eax
mov eax, dword [0x4574e0]
test eax, eax
je 0x41623d
mov ecx, dword [0x4574e8]
sub ecx, eax
cmp ecx, 0x1000
jb 0x416233
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x416320
mov eax, edx
push ecx
push eax
call fcn.00420d85
add esp, 8
mov eax, dword [ebp - 0x30]
inc dword [0x45749c]
mov dword [0x4574e4], eax
mov eax, dword [ebp - 0x2c]
mov dword [0x4574e0], esi
xor esi, esi
push 0x4574a0
mov dword [0x4574e8], eax
call fcn.004208b0
add esp, 4
xor ecx, ecx
jmp 0x41626f
mov ecx, dword [ebp - 0x2c]
test esi, esi
je 0x41629d
sub ecx, esi
mov eax, esi
cmp ecx, 0x1000
jb 0x416293
mov esi, dword [eax - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x416320
push ecx
push esi
call fcn.00420d85
add esp, 8
mov esi, dword [ebp - 0x1c]
test edi, edi
je 0x416307
sub esi, edi
mov eax, edi
cmp esi, 0x1000
jb 0x4162c0
mov edi, dword [eax - 4]
add esi, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x416320
push esi
push edi
call fcn.00420d85
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
mov ecx, dword [ebp - 0xc]
pop edi
mov dword fs:[0], ecx
pop esi
pop ebx
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.00405ad0
call fcn.0042d25f
int3