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

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
mov esi, ecx
push edi
mov ecx, dword [esi + 0x814]
mov eax, dword [esi + 0x81c]
mov edi, dword [esi + 0x8a8]
mov dword [esi + 0x800], edi
movzx eax, byte [ecx + eax - 8]
mov ecx, esi
push eax
call fcn.00409b40
mov eax, dword [esi + 0x8ac]
xor eax, dword [esi + 0x800]
mov ecx, dword [esi + 0x814]
movzx eax, al
shl eax, 8
xor eax, edi
mov dword [esi + 0x800], eax
mov eax, dword [esi + 0x81c]
movzx eax, byte [ecx + eax - 8]
mov ecx, esi
push eax
call fcn.00409b40
mov ecx, dword [esi + 0x814]
mov eax, dword [esi + 0x81c]
mov edi, dword [esi + 0x800]
movzx eax, byte [ecx + eax - 7]
mov ecx, esi
push eax
call fcn.00409b40
mov eax, dword [esi + 0x8b0]
xor eax, dword [esi + 0x800]
mov ecx, dword [esi + 0x814]
movzx eax, al
shl eax, 8
xor eax, edi
mov dword [esi + 0x800], eax
mov eax, dword [esi + 0x81c]
movzx eax, byte [ecx + eax - 7]
mov ecx, esi
push eax
call fcn.00409b40
mov ecx, dword [esi + 0x814]
mov eax, dword [esi + 0x81c]
mov edi, dword [esi + 0x800]
movzx eax, byte [ecx + eax - 6]
mov ecx, esi
push eax
call fcn.00409b40
mov eax, dword [esi + 0x800]
xor eax, dword [esi + 0x8b4]
mov ecx, dword [esi + 0x814]
movzx eax, al
shl eax, 8
xor eax, edi
mov dword [esi + 0x800], eax
mov eax, dword [esi + 0x81c]
movzx eax, byte [ecx + eax - 6]
mov ecx, esi
push eax
call fcn.00409b40
mov ecx, dword [esi + 0x814]
mov eax, dword [esi + 0x81c]
mov edi, dword [esi + 0x800]
movzx eax, byte [ecx + eax - 5]
mov ecx, esi
push eax
call fcn.00409b40
mov eax, dword [esi + 0x8b8]
mov ebx, 7
xor eax, dword [esi + 0x800]
mov edx, dword [esi + 0x81c]
movzx eax, al
shl eax, 8
xor eax, edi
mov dword [esi + 0x800], eax
mov eax, dword [esi + 0x880]
mov dword [esi + 0x804], eax
mov eax, dword [esi + 0x84c]
mov dword [esi + 0x808], eax
mov edi, dword [esi + 0x814]
add edx, edi
mov dword [ebp - 4], edi
lea edi, [esi + 0x8b4]
nop dword [eax]
nop dword [eax + eax]
movzx eax, byte [edx + ebx - 0xc]
lea edi, [edi + 4]
mov ecx, dword [esi + 0x800]
inc ebx
xor eax, ecx
shr ecx, 8
movzx eax, al
mov eax, dword [esi + eax*4 + 0x400]
xor eax, ecx
mov ecx, dword [esi + 0x808]
mov dword [esi + 0x800], eax
movzx eax, al
add eax, dword [esi + 0x804]
imul eax, eax, 0x8088405
inc eax
mov dword [esi + 0x804], eax
movzx eax, byte [esi + 0x807]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [esi + eax*4 + 0x400]
mov ax, cx
mov dword [esi + 0x808], ecx
or ax, 3
movzx eax, ax
mov ecx, eax
xor ecx, 1
imul ecx, eax
sar ecx, 8
mov byte [esi + 0x80c], cl
cmp ebx, 0xd
jge 0x40a45e
mov eax, dword [edi]
xor eax, dword [esi + 0x800]
test al, al
je 0x40a3d0
mov ecx, dword [esi + 0x828]
sub ebx, 0xc
mov edi, dword [ebp - 4]
cmp ebx, ecx
jge 0x40a52b
mov edx, dword [esi + 0x81c]
mov eax, dword [esi + 0x810]
add edx, edi
add edx, ebx
sub eax, edi
mov edi, eax
nop word [eax + eax]
mov al, byte [edi + edx]
mov ah, byte [edx]
xor al, byte [esi + 0x80c]
cmp al, ah
jne 0x40a526
mov ecx, dword [esi + 0x800]
inc ebx
movzx eax, ah
inc edx
xor eax, ecx
shr ecx, 8
movzx eax, al
mov eax, dword [esi + eax*4 + 0x400]
xor eax, ecx
mov ecx, dword [esi + 0x808]
mov dword [esi + 0x800], eax
movzx eax, al
add eax, dword [esi + 0x804]
imul eax, eax, 0x8088405
inc eax
mov dword [esi + 0x804], eax
movzx eax, byte [esi + 0x807]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [esi + eax*4 + 0x400]
mov ax, cx
mov dword [esi + 0x808], ecx
or ax, 3
movzx eax, ax
mov ecx, eax
xor ecx, 1
imul ecx, eax
sar ecx, 8
mov byte [esi + 0x80c], cl
mov ecx, dword [esi + 0x828]
cmp ebx, ecx
jl 0x40a490
mov edi, dword [ebp - 4]
cmp ebx, ecx
jne 0x40a65b
add ebx, dword [esi + 0x81c]
nop word [eax + eax]
movzx eax, byte [esi + 0x80b]
mov ecx, dword [esi + 0x808]
shl ecx, 8
xor ecx, dword [esi + eax*4]
movzx eax, byte [esi + 0x807]
xor ecx, eax
mov dword [esi + 0x808], ecx
and ecx, 0xfffc
or ecx, 3
mov edx, ecx
xor edx, 1
imul edx, ecx
shr edx, 8
mov byte [esi + 0x80c], dl
cmp ebx, dword [esi + 0x82c]
jg 0x40a594
mov eax, dword [esi + 0x810]
mov al, byte [eax + ebx - 1]
xor al, dl
mov byte [edi + ebx - 1], al
mov edx, dword [esi + 0x804]
lea ecx, [edx - 1]
mov eax, ecx
shr eax, 0x18
mov edi, dword [esi + eax*4 + 0x24cdc]
mov eax, ecx
shr eax, 0x10
movzx eax, al
shl edi, 8
shr ecx, 8
add edi, dword [esi + eax*4 + 0x24cdc]
movzx eax, cl
shl edi, 8
add edi, dword [esi + eax*4 + 0x24cdc]
lea eax, [edx - 1]
movzx eax, al
shl edi, 8
add edi, dword [esi + eax*4 + 0x24cdc]
movzx eax, byte [esi + 0x800]
sub edi, eax
movzx eax, byte [esi + 0x803]
mov dword [esi + 0x804], edi
mov edi, dword [esi + 0x814]
movzx ecx, byte [edi + ebx - 1]
dec ebx
xor ecx, dword [esi + eax*4]
mov eax, dword [esi + 0x800]
shl eax, 8
xor ecx, eax
mov dword [esi + 0x800], ecx
test ebx, ebx
jle 0x40a62f
mov eax, dword [esi + 0x810]
mov al, byte [eax + ebx]
xor al, byte [esi + 0x80c]
cmp byte [edi + ebx], al
je 0x40a540
test ebx, ebx
jne 0x40a65b
mov eax, ecx
mov dword [esi + 0x8d8], 1
mov dword [esi + 0x8cc], eax
mov eax, dword [esi + 0x804]
mov dword [esi + 0x8d0], eax
mov eax, dword [esi + 0x808]
mov dword [esi + 0x8d4], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret