Function at 0x10039fc0
Capabilities:
Generate random numbers via winapi

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x90
mov eax, dword [0x100f51d4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov eax, ecx
push 0xf0000000
push 1
push 0
mov dword [ebp - 0x8c], eax
lea ebx, [eax + 0xc58]
push 0
lea eax, [ebp - 0x88]
mov dword [ebp - 0x90], edi
push eax
mov dword [ebp - 0x88], 0
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x1003a036
push ebx
push 0x20
push dword [ebp - 0x88]
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
push 0
push dword [ebp - 0x88]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
test esi, esi
jne 0x1003a067
push 0
call fcn.1009cd43
push eax
call fcn.100a5c1a
add esp, 8
mov edi, 0xff
xor esi, esi
lea ecx, [ecx]
call fcn.100a5bf9
cdq
idiv edi
mov byte [esi + ebx], dl
inc esi
cmp esi, 0x20
jb 0x1003a050
mov edi, dword [ebp - 0x90]
mov ebx, dword [ebp - 0x8c]
lea eax, [ebp - 0x88]
push 0xf0000000
push 1
push 0
push 0
push eax
add ebx, 0xc78
mov dword [ebp - 0x88], 0
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x1003a0bc
push ebx
push 0x20
push dword [ebp - 0x88]
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
push 0
push dword [ebp - 0x88]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
test esi, esi
jne 0x1003a0ea
push 0
call fcn.1009cd43
push eax
call fcn.100a5c1a
add esp, 8
mov edi, 0xff
xor esi, esi
call fcn.100a5bf9
cdq
idiv edi
mov byte [esi + ebx], dl
inc esi
cmp esi, 0x20
jb 0x1003a0d3
mov edi, dword [ebp - 0x90]
mov eax, dword [ebp - 0x8c]
push 0
mov dword [eax + 0xc98], 1
mov dword [eax + 0xcac], 0
mov dword [edi], 0x5148534c
mov dword [edi + 4], 0xc8
mov dword [edi + 8], 0x1000001
call fcn.1009cd43
push 0
mov dword [edi + 0xc], eax
call fcn.1009cd43
mov dword [edi + 0x10], eax
add esp, 8
mov eax, 0x20
mov dword [edi + 0x14], 0
mov word [edi + 0xa6], ax
lea eax, [edi + 0xa8]
mov dword [edi + 0x18], 1
mov dword [edi + 0x1c], 2
mov dword [edi + 0x20], 1
test eax, eax
je 0x1003a18c
test ebx, ebx
je 0x1003a173
push 0x20
push ebx
push eax
call fcn.10096ab0
add esp, 0xc
jmp 0x1003a19c
xor ecx, ecx
mov dword [eax], ecx
mov dword [eax + 4], ecx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ecx
mov dword [eax + 0x14], ecx
mov dword [eax + 0x18], ecx
mov dword [eax + 0x1c], ecx
call fcn.10099ebc
mov dword [eax], 0x16
call fcn.1009a1ad
call fcn.1005b850
push eax
call fcn.1005b090
mov esi, eax
add esp, 4
test esi, esi
je 0x1003a328
push 0x4a
push 0x100f5f28
push esi
call fcn.1005b2c0
push 0
push esi
call fcn.1005b880
mov ebx, eax
push esi
mov dword [ebp - 0x90], ebx
call fcn.1005b010
add esp, 0x18
test ebx, ebx
je 0x1003a328
push 0x80
lea eax, [ebp - 0x84]
push 0
push eax
call fcn.10097030
push ebx
call fcn.1005a6f0
mov ebx, eax
add esp, 0x10
cmp ebx, 0x80
jbe 0x1003a20c
xor esi, esi
jmp 0x1003a253
mov esi, dword [ebp - 0x8c]
push 0x20
add esi, 0xc58
push esi
call fcn.1005aec0
push 1
push dword [ebp - 0x90]
lea eax, [ebp - 0x84]
push eax
push esi
push 0x20
call fcn.1005a4a0
xor ebx, ebx
add esp, 0x1c
test eax, eax
setle bl
xor ecx, ecx
dec ebx
and ebx, eax
test eax, eax
setg cl
mov dword [ebp - 0x8c], ecx
mov esi, ecx
push dword [ebp - 0x90]
call fcn.1005b8e0
add esp, 4
test esi, esi
je 0x1003a313
cmp ebx, 0x80
ja 0x1003a313
mov word [edi + 0x24], bx
add edi, 0x26
test ebx, ebx
je 0x1003a2fb
test edi, edi
jne 0x1003a2aa
call fcn.10099ebc
mov dword [eax], 0x16
call fcn.1009a1ad
lea eax, [edi + 1]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10071699
mov esp, ebp
pop ebp
ret 4
cmp ebx, 0x80
ja 0x1003a2db
push ebx
lea eax, [ebp - 0x84]
push eax
push edi
call fcn.10096ab0
add esp, 0xc
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10071699
mov esp, ebp
pop ebp
ret 4
push 0x80
push 0
push edi
call fcn.10097030
add esp, 0xc
call fcn.10099ebc
mov dword [eax], 0x22
call fcn.1009a1ad
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10071699
mov esp, ebp
pop ebp
ret 4
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10071699
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10071699
mov esp, ebp
pop ebp
ret 4