Function at 0x5fa710
Capabilities:
Generate random numbers via winapi

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
mov ebx, ecx
push esi
push edi
mov ecx, dword [ebx + 8]
test ecx, ecx
jne 0x5fa72f
test byte [ebx + 4], 2
je 0x5fa86f
cmp byte [ebx + 0x1074], 0
mov edi, dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
je 0x5fa87a
test ecx, ecx
je 0x5fa79a
lea eax, [ebx + 0xc]
push eax
push 0x48
push ecx
call edi
test eax, eax
je 0x5fa79a
lea ecx, [ebx + 0xc]
mov edx, 0x6b20f0
mov esi, 0x1c
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x5fa773
add ecx, 4
add edx, 4
sub esi, 4
jae 0x5fa760
jmp 0x5fa79a
lea ecx, [ebx + 0x2c]
mov edx, 0x6b20f0
mov esi, 0x1c
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x5fa793
add ecx, 4
add edx, 4
sub esi, 4
jae 0x5fa780
jmp 0x5fa79a
mov byte [ebx + 0x1074], 0
cmp byte [ebx + 0x1074], 0
je 0x5fa87a
test byte [ebx + 4], 2
je 0x5fa866
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0
mov esi, eax
call fcn.0060cd03
add esp, 4
mov edi, eax
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
xor edi, esi
mov ecx, edi
shl edi, 0x10
shr ecx, 0x10
xor ecx, edi
xor ecx, 0x499602d2
push ecx
call fcn.00613bef
add esp, 4
xor edi, edi
nop dword [eax]
cmp byte [ebx + 0x1074], 0
je 0x5fa860
xor esi, esi
nop dword [eax + eax]
call fcn.00613bce
mov byte [ebx + esi + 0xc], al
inc esi
cmp esi, 0x48
jl 0x5fa800
lea ecx, [ebx + 0xc]
mov edx, 0x6b20f0
mov esi, 0x1c
nop dword [eax]
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x5fa833
add ecx, 4
add edx, 4
sub esi, 4
jae 0x5fa820
jmp 0x5fa85a
lea ecx, [ebx + 0x2c]
mov edx, 0x6b20f0
mov esi, 0x1c
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x5fa853
add ecx, 4
add edx, 4
sub esi, 4
jae 0x5fa840
jmp 0x5fa85a
mov byte [ebx + 0x1074], 0
inc edi
cmp edi, 0xa
jl 0x5fa7f0
mov edi, dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
cmp byte [ebx + 0x1074], 0
je 0x5fa87a
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebx + 8]
test eax, eax
je 0x5fa89e
test byte [ebx + 4], 4
jne 0x5fa89e
push dword [ebp + 8]
push dword [ebp + 0xc]
push eax
call edi
test eax, eax
setne al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebx + 4]
mov dword [esp + 0xc], eax
test al, 8
je 0x5fa8e0
push 0xffffffffffffffff
push dword [ebx + 0x1075]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x80
jne 0x5fa8ca
mov dword [ebx + 0x107d], 0
jmp 0x5fa8ce
test eax, eax
jne 0x5fa8e0
inc dword [ebx + 0x1081]
inc dword [ebx + 0x107d]
inc dword [ebx + 0x1079]
mov ecx, dword [ebx + 0x4c]
mov edx, dword [ebx + 0x50]
add ecx, 1
mov eax, ecx
mov dword [esp + 0x10], ecx
adc edx, 0
mov dword [ebx + 0x4c], ecx
or eax, edx
mov dword [esp + 0x14], edx
mov dword [ebx + 0x50], edx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], edx
jne 0x5fa929
mov dword [ebx + 0x50], eax
mov eax, 1
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], eax
xor eax, eax
mov dword [ebx + 0x4c], 1
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], eax
test byte [esp + 0xc], 8
je 0x5fa93b
lea ecx, [ebx + 0x1075]
call fcn.005e0810
mov edi, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
push edi
push 0
push esi
call fcn.00608810
add esp, 0xc
lea eax, [esp + 0x18]
lea ecx, [ebx + 0x54]
push 0
push 0
push eax
push edi
push esi
lea eax, [ebx + 0xc]
push eax
call fcn.005fa040
test byte [esp + 0xc], 8
je 0x5fa99c
push 0xffffffffffffffff
push dword [ebx + 0x1075]
lea esi, [ebx + 0x1075]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x80
jne 0x5fa98f
mov dword [esi + 8], 0
jmp 0x5fa993
test eax, eax
jne 0x5fa99c
inc dword [esi + 0xc]
inc dword [esi + 8]
inc dword [esi + 4]
mov eax, dword [esp + 0x10]
lea edx, [ebx + 0x2c]
mov dword [esp + 0x18], eax
lea ecx, [ebx + 0x54]
mov eax, dword [esp + 0x14]
test edx, edx
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x18]
push eax
lea eax, [ecx + 0x1000]
cmovne eax, edx
push eax
call fcn.005f9480
mov edx, dword [esp + 0x18]
xor edx, dword [ebx + 0x4c]
mov eax, dword [esp + 0x1c]
xor eax, dword [ebx + 0x50]
test byte [esp + 0xc], 8
mov dword [ebx + 0x4c], edx
mov dword [ebx + 0x50], eax
je 0x5fa9ee
lea ecx, [ebx + 0x1075]
call fcn.005e0810
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret 8