Function at 0x45f370
Capabilities:
Generate random numbers via winapi

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov eax, dword [0x68f014]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [0x6b04d0], 0
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov dword [ebp - 0x40], ebx
mov esi, 0xa
jne 0x45f4a3
call fcn.004643b0
mov edi, dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
mov ebx, dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
nop dword [eax]
mov eax, dword [0x69ead0]
dec esi
test eax, eax
je 0x45f3d4
lea ecx, [ebp - 0x34]
push 0x20
push ecx
call eax
add esp, 8
test eax, eax
je 0x45f3d4
cmp eax, 0x20
jne 0x45f5df
jmp 0x45f42d
push 0xf0000020
push 1
push str.Microsoft_Base_Cryptographic_Provider_v1.0
push 0
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x3c], 0
push eax
call edi
test eax, eax
jne 0x45f40e
push 0xf0000028
push 1
push str.Microsoft_Base_Cryptographic_Provider_v1.0
push eax
lea eax, [ebp - 0x3c]
push eax
call edi
test eax, eax
je 0x45f5df
lea eax, [ebp - 0x34]
push eax
push 0x20
push dword [ebp - 0x3c]
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
push 0
push dword [ebp - 0x3c]
cmp eax, 1
jne 0x45f4b4
call ebx
imul ecx, dword [0x6b14ec], 0x70
lea edx, [ebp - 0x38]
push 2
mov word [ebp - 0x38], 0x2000
add ecx, 0x6b04d8
call fcn.0045e940
add esp, 4
test eax, eax
jne 0x45f48d
imul ecx, dword [0x6b14ec], 0x70
lea edx, [ebp - 0x34]
push 0x20
add ecx, 0x6b04d8
call fcn.0045e940
add esp, 4
test eax, eax
jne 0x45f48d
mov eax, dword [0x6b14ec]
test eax, eax
jne 0x45f47f
add dword [0x6b14f0], 0x20
inc eax
xor ecx, ecx
cmp eax, 0x20
cmove eax, ecx
mov dword [0x6b14ec], eax
test esi, esi
jne 0x45f3b0
call fcn.004641f0
inc dword [0x6b04d0]
mov ebx, dword [ebp - 0x40]
mov esi, dword [ebp + 0xc]
mov edi, esi
test ebx, ebx
jne 0x45f4cc
lea eax, [ebx + 0x10]
jmp 0x45f5db
call ebx
mov eax, 9
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005cf250
mov esp, ebp
pop ebp
ret
mov eax, dword [0x6b14f4]
inc eax
mov dword [0x6b14f4], eax
cmp eax, 0xa
je 0x45f4e5
cmp dword [0x6b14f0], 0x40
jb 0x45f4f2
call fcn.004641f0
test eax, eax
jne 0x45f5d9
cmp esi, 0x10
jb 0x45f554
shr esi, 4
nop word [eax + eax]
push 0x6b12d8
mov edx, ebx
mov ecx, 0x6b14dc
call fcn.0045fb30
add esp, 4
add ebx, 0x10
sub edi, 0x10
xor eax, eax
nop dword [eax]
add byte [eax + 0x6b14dc], 1
jne 0x45f54c
add byte [eax + 0x6b14dd], 1
jne 0x45f54c
add byte [eax + 0x6b14de], 1
jne 0x45f54c
add byte [eax + 0x6b14df], 1
jne 0x45f54c
add eax, 4
cmp eax, 0x10
jl 0x45f520
sub esi, 1
jne 0x45f500
mov esi, dword [ebp + 0xc]
test edi, edi
je 0x45f584
push 0x6b12d8
lea edx, [ebp - 0x14]
mov ecx, 0x6b14dc
call fcn.0045fb30
add esp, 4
test edi, edi
je 0x45f57f
push edi
lea eax, [ebp - 0x14]
push eax
push ebx
call fcn.005d1300
add esp, 0xc
call fcn.004641c0
push 0x6b12d8
mov edx, 0x6b14bc
mov ecx, 0x6b14dc
call fcn.0045fb30
add esp, 4
call fcn.004641c0
push 0x6b12d8
mov edx, 0x6b14cc
mov ecx, 0x6b14dc
call fcn.0045fb30
add esp, 4
call fcn.004641c0
push 0x6b12d8
push 0
mov edx, 0x20
mov ecx, 0x6b14bc
call fcn.0045f610
add esp, 8
test eax, eax
je 0x45f5f5
xor eax, eax
cmp esi, eax
je 0x45f5f5
mov eax, 9
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005cf250
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005cf250
mov esp, ebp
pop ebp
ret