Function at 0x4b56b0
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc
push ebx
push esi
push edi
call fcn.004a9560
call fcn.004808b0
push 0
call fcn.004c6820
movzx edx, byte [0x564670]
add esp, 4
cmp byte [0x564670], 0xff
movzx eax, byte [0x5640b4]
cmove edx, eax
cmp dl, 0x14
je 0x4b5701
mov dword [0x56053f], 1
mov dword [0x56056d], 0
mov ebx, dword [sym.imp.WINMM.dll_timeGetTime]
call ebx
sub eax, dword [0x560284]
sub eax, dword [0x560288]
movd xmm2, eax
mov eax, dword [0x56028c]
cvtdq2pd xmm2, xmm2
movd xmm1, eax
shr eax, 0x1f
cvtdq2pd xmm1, xmm1
addsd xmm1, qword [eax*8 + 0x545940]
mov eax, dword [0x56029c]
cdq
sub eax, edx
sar eax, 1
mulsd xmm1, qword [0x560290]
subsd xmm2, xmm1
divsd xmm2, qword [0x560290]
cvttsd2si ecx, xmm2
cmp ecx, eax
jge 0x4b5773
mov eax, dword [0x563ed0]
push 0x563ed0
mov eax, dword [eax + 8]
call eax
add esp, 4
call fcn.004692f0
call fcn.00469420
mov edx, dword [0x564610]
mov ecx, dword [0x564618]
call fcn.004682a0
call fcn.00495610
mov ecx, dword [0x564650]
cmp dword [ecx + 4], 0
cmove ecx, dword [0x564094]
call fcn.00492480
mov ecx, dword [0x564624]
cmp dword [ecx + 4], 0
cmove ecx, dword [0x564068]
xor edx, edx
call fcn.00492040
mov ecx, dword [0x5645f8]
test ecx, ecx
je 0x4b57eb
mov eax, dword [ecx - 8]
add ecx, 0xfffffff8
cmp eax, 0xffffffff
je 0x4b57e1
dec eax
mov dword [ecx], eax
test eax, eax
jg 0x4b57e1
push ecx
call fcn.00501c9e
add esp, 4
mov dword [0x5645f8], 0
call fcn.00491db0
mov eax, dword [0x560204]
mov eax, dword [eax + 0x10]
test eax, eax
sete byte [0x563ec0]
test eax, eax
je 0x4b58f6
cmp byte [0x563ebb], 0
jne 0x4b58f6
mov edi, 2
nop dword [eax + eax]
mov esi, 0xc8
mov eax, dword [0x560204]
mov dword [eax + 0x10], esi
call ebx
sub eax, dword [0x560284]
sub eax, dword [0x560288]
movd xmm2, eax
mov eax, dword [0x56028c]
cvtdq2pd xmm2, xmm2
movd xmm1, eax
shr eax, 0x1f
cvtdq2pd xmm1, xmm1
addsd xmm1, qword [eax*8 + 0x545940]
mov eax, dword [0x56029c]
cdq
sub eax, edx
sar eax, 1
mulsd xmm1, qword [0x560290]
subsd xmm2, xmm1
divsd xmm2, qword [0x560290]
cvttsd2si ecx, xmm2
cmp ecx, eax
jge 0x4b58a4
mov eax, dword [0x563ed0]
push 0x563ed0
mov eax, dword [eax + 8]
call eax
mov ecx, dword [0x560204]
add esp, 4
call fcn.0040ef70
call fcn.004692f0
call fcn.00469420
sub esi, 0xa
cmp esi, 0x64
jg 0x4b5825
sub edi, 1
jne 0x4b5820
mov eax, dword [0x560204]
push 0x563ed0
mov dword [eax + 0x10], 0x64
mov eax, dword [0x563ed0]
mov eax, dword [eax + 8]
call eax
mov ecx, dword [0x560204]
add esp, 4
call fcn.0040ef70
call fcn.004692f0
call fcn.00495ed0
call fcn.00495ed0
cmp byte [0x564672], 0xff
mov ecx, 0x563ed0
movzx edx, byte [0x564672]
movzx eax, byte [0x5640b6]
cmove edx, eax
movzx edx, dl
call fcn.004a63a0
cmp dword [0x563e5c], 0
mov byte [0x5645b0], 2
jne 0x4b5a16
mov ecx, dword [0x563e68]
test ecx, ecx
jle 0x4b5a0c
call fcn.00466a20
mov esi, eax
mov edi, 0x64
mov ebx, dword [esi + 0x24]
test bl, 1
je 0x4b5980
imul ecx, dword [0x563db0], 0x8088405
inc ecx
mov eax, ecx
mov dword [0x563db0], ecx
mul edi
mov dword [esp + 0x10], eax
cmp dword [esi + 0x28], edx
jle 0x4b5986
mov dword [0x563e5c], 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x563db0]
test bl, 2
je 0x4b59b6
imul ecx, ecx, 0x8088405
inc ecx
mov eax, ecx
mov dword [0x563db0], ecx
mul edi
mov dword [esp + 0x10], eax
cmp dword [esi + 0x2c], edx
jle 0x4b59b6
mov dword [0x563e5c], 2
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test bl, 4
je 0x4b59e6
imul ecx, ecx, 0x8088405
inc ecx
mov eax, ecx
mov dword [0x563db0], ecx
mul edi
mov dword [esp + 0x10], eax
cmp dword [esi + 0x30], edx
jle 0x4b59e6
mov dword [0x563e5c], 3
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test bl, 8
je 0x4b5a0c
imul eax, ecx, 0x8088405
inc eax
mov dword [0x563db0], eax
mul edi
cmp dword [esi + 0x34], edx
mov dword [esp + 0x10], eax
mov dword [0x563e5c], 4
jg 0x4b5a16
mov dword [0x563e5c], 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret