Function at 0x480f10
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x5523d4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x18], eax
mov eax, dword [0x59c258]
push ebx
push esi
mov esi, dword [0x59c208]
inc eax
push edi
mov dword [ebp - 0x14], esi
mov dword [0x59c258], eax
cmp eax, 1
jne 0x480f57
push 0
call fcn.004943d7
xor eax, 0xbb40e64e
push eax
call fcn.004943a4
add esp, 8
mov eax, esi
call fcn.00480e90
mov dword [ebp - 0x1c], 0
call fcn.004943b6
mov edi, dword [0x59bae4]
mov ebx, dword [0x5cea80]
sar eax, 7
and eax, 0xff
mov edx, dword [0x59baec]
mov ecx, edi
xor ecx, eax
and ecx, 0xff
shr edi, 8
xor edi, dword [ebx + ecx*4]
mov esi, edx
mov ecx, edi
mov dword [0x59bae4], ecx
movzx ecx, cl
add ecx, dword [0x59bae8]
and esi, 0xfffd
imul ecx, ecx, 0x8088405
inc ecx
mov dword [0x59bae8], ecx
shr ecx, 0x18
xor ecx, edx
shr edx, 8
and ecx, 0xff
xor edx, dword [ebx + ecx*4]
or esi, 2
mov dword [0x59baec], edx
mov edx, esi
xor edx, 1
imul edx, esi
shr edx, 8
xor dl, al
mov eax, dword [ebp - 0x1c]
mov byte [ebp + eax - 0x10], dl
inc eax
mov dword [ebp - 0x1c], eax
cmp eax, 0xa
jl 0x480f65
mov eax, dword [ebp - 0x14]
call fcn.00480e90
xor edi, edi
nop
mov esi, dword [0x59bae4]
movzx eax, byte [ebp + edi - 0x10]
xor eax, esi
and eax, 0xff
mov ecx, dword [0x59baec]
shr esi, 8
xor esi, dword [ebx + eax*4]
mov edx, ecx
mov eax, esi
mov dword [0x59bae4], eax
movzx eax, al
add eax, dword [0x59bae8]
and edx, 0xfffd
imul eax, eax, 0x8088405
inc eax
mov dword [0x59bae8], eax
shr eax, 0x18
xor eax, ecx
shr ecx, 8
and eax, 0xff
xor ecx, dword [ebx + eax*4]
mov eax, dword [ebp - 0x18]
mov dword [0x59baec], ecx
or edx, 2
mov ecx, edx
xor ecx, 1
imul ecx, edx
push eax
movzx eax, byte [ebp + edi - 0x10]
shr ecx, 8
and ecx, 0xff
xor ecx, eax
push ecx
call fcn.004eef1a
mov ebx, dword [0x5cea80]
inc edi
add esp, 8
cmp edi, 0xa
jl 0x481000
mov esi, dword [ebp + 8]
mov edi, dword [0x59bae4]
mov ecx, dword [0x59baec]
mov eax, esi
shr eax, 0x10
mov dword [ebp - 0x14], eax
xor eax, edi
and eax, 0xff
shr edi, 8
xor edi, dword [ebx + eax*4]
mov edx, ecx
mov eax, edi
mov dword [0x59bae4], eax
movzx eax, al
add eax, dword [0x59bae8]
and edx, 0xfffd
imul eax, eax, 0x8088405
inc eax
mov dword [0x59bae8], eax
shr eax, 0x18
xor eax, ecx
and eax, 0xff
shr ecx, 8
xor ecx, dword [ebx + eax*4]
mov ebx, dword [ebp - 0x18]
or edx, 2
mov eax, edx
xor eax, 1
imul eax, edx
mov dword [0x59baec], ecx
mov ecx, esi
shr ecx, 8
xor eax, ecx
shr eax, 8
and eax, 0xff
push ebx
push eax
call fcn.004eef1a
mov edi, dword [0x59bae4]
mov eax, dword [0x5cea80]
mov ecx, dword [0x59baec]
shr esi, 0x18
xor esi, edi
and esi, 0xff
shr edi, 8
xor edi, dword [eax + esi*4]
mov esi, dword [0x5cea80]
mov eax, edi
mov dword [0x59bae4], eax
movzx eax, al
add eax, dword [0x59bae8]
mov edx, ecx
imul eax, eax, 0x8088405
inc eax
mov dword [0x59bae8], eax
shr eax, 0x18
xor eax, ecx
shr ecx, 8
and eax, 0xff
xor ecx, dword [esi + eax*4]
and edx, 0xfffd
mov dword [0x59baec], ecx
or edx, 2
mov ecx, edx
xor ecx, 1
imul ecx, edx
and ecx, 0xff00
xor ecx, dword [ebp - 0x14]
push ebx
shr ecx, 8
push ecx
call fcn.004eef1a
mov ecx, dword [ebp - 4]
add esp, 0x10
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00493825
mov esp, ebp
pop ebp
ret