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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x61c850]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x18], eax
mov eax, dword [0x62f560]
inc eax
push ebx
mov ebx, ecx
mov dword [ebp - 0x1c], ebx
mov dword [0x62f560], eax
cmp eax, 1
jne 0x418a61
push 0
call fcn.00499051
xor eax, 0xbb40e64e
push eax
call fcn.00498282
add esp, 8
push ebx
mov ebx, edi
mov ecx, esi
call fcn.004189a0
add esp, 4
mov dword [ebp - 0x14], 0
call fcn.00498294
mov ecx, dword [esi + 8]
mov edx, ecx
and edx, 0xfffd
or edx, 2
mov dword [ebp - 0x20], edx
mov edx, dword [esi]
mov ebx, edx
shr edx, 8
sar eax, 7
and eax, 0xff
xor ebx, eax
and ebx, 0xff
mov ebx, dword [edi + ebx*4]
xor ebx, edx
movzx edx, bl
add edx, dword [esi + 4]
mov dword [esi], ebx
imul edx, edx, 0x8088405
inc edx
mov dword [esi + 4], edx
shr edx, 0x18
xor edx, ecx
and edx, 0xff
shr ecx, 8
xor ecx, dword [edi + edx*4]
mov dword [esi + 8], ecx
mov ecx, dword [ebp - 0x20]
mov edx, ecx
xor edx, 1
imul edx, ecx
shr edx, 8
xor dl, al
mov eax, dword [ebp - 0x14]
mov byte [ebp + eax - 0x10], dl
inc eax
mov dword [ebp - 0x14], eax
cmp eax, 0xa
jl 0x418a75
mov eax, dword [ebp - 0x1c]
push eax
mov ebx, edi
mov ecx, esi
call fcn.004189a0
mov ecx, dword [ebp - 0x18]
lea edx, [ebp - 0x10]
add esp, 4
xor eax, eax
sub ecx, edx
mov dword [ebp - 0x1c], ecx
lea ebx, [ebx]
mov ecx, dword [esi + 8]
movzx ebx, byte [ebp + eax - 0x10]
mov edx, ecx
and edx, 0xfffd
or edx, 2
mov dword [ebp - 0x14], edx
mov edx, dword [esi]
xor ebx, edx
shr edx, 8
and ebx, 0xff
mov ebx, dword [edi + ebx*4]
xor ebx, edx
movzx edx, bl
add edx, dword [esi + 4]
mov dword [esi], ebx
imul edx, edx, 0x8088405
inc edx
mov dword [esi + 4], edx
shr edx, 0x18
xor edx, ecx
and edx, 0xff
shr ecx, 8
xor ecx, dword [edi + edx*4]
movzx ebx, byte [ebp + eax - 0xf]
mov dword [esi + 8], ecx
mov ecx, dword [ebp - 0x14]
mov edx, ecx
xor edx, 1
imul edx, ecx
mov ecx, dword [ebp - 0x1c]
shr edx, 8
xor dl, byte [ebp + eax - 0x10]
add ecx, eax
mov byte [ebp + ecx - 0x10], dl
mov ecx, dword [esi + 8]
mov edx, ecx
and edx, 0xfffd
or edx, 2
mov dword [ebp - 0x14], edx
mov edx, dword [esi]
xor ebx, edx
shr edx, 8
and ebx, 0xff
mov ebx, dword [edi + ebx*4]
xor ebx, edx
movzx edx, bl
add edx, dword [esi + 4]
mov dword [esi], ebx
imul edx, edx, 0x8088405
inc edx
mov dword [esi + 4], edx
shr edx, 0x18
xor edx, ecx
and edx, 0xff
shr ecx, 8
xor ecx, dword [edi + edx*4]
movzx ebx, byte [ebp + eax - 0xe]
mov dword [esi + 8], ecx
mov ecx, dword [ebp - 0x14]
mov edx, ecx
xor edx, 1
imul edx, ecx
mov ecx, dword [ebp - 0x18]
shr edx, 8
xor dl, byte [ebp + eax - 0xf]
mov byte [ecx + eax + 1], dl
mov ecx, dword [esi + 8]
mov edx, ecx
and edx, 0xfffd
or edx, 2
mov dword [ebp - 0x14], edx
mov edx, dword [esi]
xor ebx, edx
and ebx, 0xff
mov ebx, dword [edi + ebx*4]
shr edx, 8
xor ebx, edx
movzx edx, bl
add edx, dword [esi + 4]
mov dword [esi], ebx
imul edx, edx, 0x8088405
inc edx
mov dword [esi + 4], edx
shr edx, 0x18
xor edx, ecx
and edx, 0xff
shr ecx, 8
xor ecx, dword [edi + edx*4]
movzx ebx, byte [ebp + eax - 0xd]
mov dword [esi + 8], ecx
mov ecx, dword [ebp - 0x14]
mov edx, ecx
xor edx, 1
imul edx, ecx
shr edx, 8
xor dl, byte [ebp + eax - 0xe]
mov ecx, dword [ebp - 0x18]
mov byte [ecx + eax + 2], dl
mov ecx, dword [esi + 8]
mov edx, ecx
and edx, 0xfffd
or edx, 2
mov dword [ebp - 0x14], edx
mov edx, dword [esi]
xor ebx, edx
shr edx, 8
and ebx, 0xff
mov ebx, dword [edi + ebx*4]
xor ebx, edx
movzx edx, bl
add edx, dword [esi + 4]
mov dword [esi], ebx
imul edx, edx, 0x8088405
inc edx
mov dword [esi + 4], edx
shr edx, 0x18
xor edx, ecx
and edx, 0xff
shr ecx, 8
xor ecx, dword [edi + edx*4]
movzx ebx, byte [ebp + eax - 0xc]
mov dword [esi + 8], ecx
mov ecx, dword [ebp - 0x14]
mov edx, ecx
xor edx, 1
imul edx, ecx
mov ecx, dword [ebp - 0x18]
shr edx, 8
xor dl, byte [ebp + eax - 0xd]
mov byte [ecx + eax + 3], dl
mov ecx, dword [esi + 8]
mov edx, ecx
and edx, 0xfffd
or edx, 2
mov dword [ebp - 0x14], edx
mov edx, dword [esi]
xor ebx, edx
shr edx, 8
and ebx, 0xff
mov ebx, dword [edi + ebx*4]
xor ebx, edx
movzx edx, bl
add edx, dword [esi + 4]
mov dword [esi], ebx
imul edx, edx, 0x8088405
inc edx
mov dword [esi + 4], edx
shr edx, 0x18
xor edx, ecx
and edx, 0xff
shr ecx, 8
xor ecx, dword [edi + edx*4]
mov dword [esi + 8], ecx
mov ecx, dword [ebp - 0x14]
mov edx, ecx
xor edx, 1
imul edx, ecx
mov ecx, dword [ebp - 0x18]
shr edx, 8
xor dl, byte [ebp + eax - 0xc]
add eax, 5
mov byte [ecx + eax - 1], dl
cmp eax, 0xa
jl 0x418b10
mov ecx, dword [esi + 8]
mov ebx, dword [ebp + 0xc]
mov edx, ecx
and edx, 0xfffd
or edx, 2
mov dword [ebp - 0x1c], edx
mov edx, dword [esi]
shr ebx, 0x10
mov dword [ebp - 0x20], ebx
xor ebx, edx
shr edx, 8
and ebx, 0xff
mov ebx, dword [edi + ebx*4]
xor ebx, edx
movzx edx, bl
add edx, dword [esi + 4]
mov dword [esi], ebx
imul edx, edx, 0x8088405
inc edx
mov dword [esi + 4], edx
shr edx, 0x18
xor edx, ecx
and edx, 0xff
shr ecx, 8
xor ecx, dword [edi + edx*4]
mov ebx, dword [ebp + 0xc]
mov dword [esi + 8], ecx
mov ecx, dword [ebp - 0x1c]
mov edx, ecx
xor edx, 1
imul edx, ecx
mov ecx, dword [ebp - 0x18]
shr edx, 8
xor dl, byte [ebp - 0x20]
shr ebx, 0x18
mov byte [ecx + eax], dl
mov ecx, dword [esi + 8]
mov edx, ecx
and edx, 0xfffd
or edx, 2
mov dword [ebp - 0x1c], edx
mov edx, dword [esi]
mov dword [ebp - 0x20], ebx
xor ebx, edx
shr edx, 8
and ebx, 0xff
mov ebx, dword [edi + ebx*4]
xor ebx, edx
movzx edx, bl
add edx, dword [esi + 4]
mov dword [esi], ebx
imul edx, edx, 0x8088405
inc edx
mov dword [esi + 4], edx
shr edx, 0x18
xor edx, ecx
and edx, 0xff
shr ecx, 8
xor ecx, dword [edi + edx*4]
add eax, 2
mov dword [esi + 8], ecx
mov ecx, dword [ebp - 0x1c]
mov edx, ecx
xor edx, 1
imul edx, ecx
mov ecx, dword [ebp - 0x18]
shr edx, 8
xor dl, byte [ebp - 0x20]
pop ebx
mov byte [ecx + eax - 1], dl
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00493f9c
mov esp, ebp
pop ebp
ret