Function at 0x1126e30
Capabilities:
Generate random numbers via winapi

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x115b328
push 0x1083f40
mov eax, dword fs:[0]
push eax
sub esp, 0x8c
mov eax, dword [0x115f604]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x90], eax
xor edi, edi
mov dword [ebp - 0x84], edi
xor ebx, ebx
mov dword [ebp - 0x88], edi
mov eax, 1
mov dword [ebp - 0x7c], edi
mov dword [ebp - 4], edi
lea ebx, [ebx]
mov dword [ebp - 0x78], 0x58
push eax
lea ecx, [ebp - 0x78]
push ecx
lea edx, [ebp - 0x74]
push edx
push 0x16
mov esi, dword [ebp + 8]
push esi
call dword [sym.imp.ADVAPI32.dll_CryptGetProvParam]
test eax, eax
je 0x1126eca
xor eax, eax
mov ecx, dword [ebp - 0x74]
cmp ecx, dword [ebp + 0x18]
jne 0x1126ec6
mov dword [ebp - 0x9c], 1
jmp 0x1126ed2
test ebx, ebx
je 0x1126e90
test ebx, ebx
je 0x1127045
lea edx, [ebp - 0x7c]
push edx
push 0
mov eax, dword [ebp + 0x18]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_CryptGenKey]
test eax, eax
je 0x1127045
mov dword [ebp - 0x78], 4
push 0
lea ecx, [ebp - 0x78]
push ecx
lea edx, [ebp - 0x8c]
push edx
push 9
mov eax, dword [ebp - 0x7c]
push eax
mov ebx, dword [sym.imp.ADVAPI32.dll_CryptGetKeyParam]
call ebx
test eax, eax
je 0x1127045
mov ecx, dword [ebp - 0x7c]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov dword [ebp - 0x7c], 0
mov esi, dword [ebp + 0x14]
lea edx, [esi*8]
cmp edx, dword [ebp - 0x8c]
ja 0x1127045
mov dword [ebp - 0x78], 4
push 0
lea eax, [ebp - 0x78]
push eax
lea ecx, [ebp - 0x98]
push ecx
push 7
mov edx, dword [ebp + 0xc]
push edx
call ebx
test eax, eax
je 0x1127045
mov dword [ebp - 0x78], 4
push 0
lea eax, [ebp - 0x78]
push eax
lea ecx, [ebp - 0x94]
push ecx
push 9
mov edx, dword [ebp + 0xc]
push edx
call ebx
test eax, eax
je 0x1127045
mov ebx, dword [ebp - 0x94]
shr ebx, 3
add ebx, 0xc
push ebx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
mov dword [ebp - 0x88], edi
test edi, edi
je 0x1127045
mov byte [edi], 1
mov byte [edi + 1], 2
xor eax, eax
mov word [edi + 2], ax
mov ecx, dword [ebp + 0x18]
mov dword [edi + 4], ecx
lea ecx, [edi + 8]
mov edx, dword [ebp - 0x98]
mov dword [ecx], edx
add ecx, 4
mov dword [ebp - 0x80], eax
cmp eax, esi
jae 0x1126fe2
mov edx, dword [ebp + 0x10]
sub edx, eax
mov dl, byte [edx + esi - 1]
mov byte [eax + ecx], dl
add eax, 1
jmp 0x1126fca
mov eax, ebx
sub eax, esi
sub eax, 0xf
mov dword [ebp - 0x78], eax
lea esi, [ecx + esi + 1]
push esi
push eax
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
test eax, eax
je 0x1127045
xor eax, eax
mov dword [ebp - 0x80], eax
cmp eax, dword [ebp - 0x78]
jae 0x1127019
cmp byte [eax + esi], 0
jne 0x1127014
mov byte [eax + esi], 1
add eax, 1
jmp 0x1127002
mov byte [ebx + edi - 2], 2
mov ecx, dword [ebp - 0x90]
push ecx
push 1
mov edx, dword [ebp + 0xc]
push edx
push ebx
push edi
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
je 0x1127045
mov dword [ebp - 0x84], 1
mov dword [ebp - 4], 0xfffffffe
call fcn.0112707b
mov eax, dword [ebp - 0x84]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.010840d6
mov esp, ebp
pop ebp
ret 0x18