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

Disassembly:
sub esp, 0x24
mov eax, dword [0x6d6ec0]
xor eax, esp
mov dword [esp + 0x20], eax
cmp dword [esp + 0x30], 0xc
mov eax, dword [esp + 0x2c]
push ebx
mov ebx, dword [esp + 0x2c]
push esi
mov esi, dword [esp + 0x3c]
push edi
mov edi, dword [esp + 0x44]
mov dword [esp + 0xc], eax
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], edi
jge 0x54aa18
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.0061f478
add esp, 0x24
ret
mov eax, dword [0x6ecce0]
inc eax
mov dword [0x6ecce0], eax
cmp eax, 1
jne 0x54aa3d
push 0
call fcn.0063c7b5
xor eax, 0xbb40e64e
push eax
call fcn.00641365
add esp, 8
push ebp
push edi
push esi
push ebx
call fcn.0054af30
add esp, 0xc
xor ebp, ebp
nop dword [eax + eax]
call fcn.00641344
mov edx, dword [esi]
mov ecx, edx
sar eax, 7
xor ecx, eax
mov dword [esp + 0x1c], eax
mov edi, dword [esi + 8]
mov ebx, edi
movzx eax, cl
and ebx, 0xfffd
mov ecx, dword [esp + 0x14]
or ebx, 2
shr edx, 8
xor edx, dword [ecx + eax*4]
movzx eax, dl
add eax, dword [esi + 4]
imul eax, eax, 0x8088405
mov dword [esi], edx
inc eax
mov dword [esi + 4], eax
shr eax, 0x18
xor eax, edi
shr edi, 8
movzx eax, al
xor edi, dword [ecx + eax*4]
mov eax, ebx
xor eax, 1
mov dword [esi + 8], edi
imul eax, ebx
shr eax, 8
xor al, byte [esp + 0x1c]
mov byte [esp + ebp + 0x24], al
inc ebp
cmp ebp, 0xa
jb 0x54aa50
mov ebp, ecx
push ebp
push esi
push dword [esp + 0x20]
call fcn.0054af30
mov ecx, dword [esi]
add esp, 0xc
movzx eax, byte [esp + 0x24]
xor eax, ecx
mov edi, dword [esi + 8]
movzx eax, al
mov ebx, edi
shr ecx, 8
and ebx, 0xfffd
or ebx, 2
xor ecx, dword [ebp + eax*4]
movzx eax, cl
add eax, dword [esi + 4]
imul eax, eax, 0x8088405
mov dword [esi], ecx
mov ecx, dword [esp + 0x10]
inc eax
mov dword [esi + 4], eax
shr eax, 0x18
xor eax, edi
shr edi, 8
movzx eax, al
xor edi, dword [ebp + eax*4]
mov eax, ebx
xor eax, 1
mov dword [esi + 8], edi
imul eax, ebx
shr eax, 8
xor al, byte [esp + 0x24]
mov byte [ecx], al
mov ecx, dword [esi]
movzx eax, byte [esp + 0x25]
xor eax, ecx
mov edi, dword [esi + 8]
movzx eax, al
mov ebx, edi
shr ecx, 8
and ebx, 0xfffd
or ebx, 2
xor ecx, dword [ebp + eax*4]
movzx eax, cl
add eax, dword [esi + 4]
imul eax, eax, 0x8088405
mov dword [esi], ecx
mov ecx, dword [esp + 0x10]
inc eax
mov dword [esi + 4], eax
shr eax, 0x18
xor eax, edi
shr edi, 8
movzx eax, al
xor edi, dword [ebp + eax*4]
mov eax, ebx
xor eax, 1
mov dword [esi + 8], edi
imul eax, ebx
shr eax, 8
xor al, byte [esp + 0x25]
mov byte [ecx + 1], al
mov ecx, dword [esi]
movzx eax, byte [esp + 0x26]
mov edi, dword [esi + 8]
xor eax, ecx
movzx eax, al
mov ebx, edi
shr ecx, 8
and ebx, 0xfffd
or ebx, 2
xor ecx, dword [ebp + eax*4]
movzx eax, cl
add eax, dword [esi + 4]
imul eax, eax, 0x8088405
mov dword [esi], ecx
inc eax
mov dword [esi + 4], eax
shr eax, 0x18
xor eax, edi
mov ecx, dword [esp + 0x10]
movzx eax, al
shr edi, 8
xor edi, dword [ebp + eax*4]
mov eax, ebx
xor eax, 1
mov dword [esi + 8], edi
imul eax, ebx
shr eax, 8
xor al, byte [esp + 0x26]
mov byte [ecx + 2], al
mov ecx, dword [esi]
movzx eax, byte [esp + 0x27]
xor eax, ecx
mov edi, dword [esi + 8]
movzx eax, al
mov ebx, edi
shr ecx, 8
and ebx, 0xfffd
or ebx, 2
xor ecx, dword [ebp + eax*4]
movzx eax, cl
add eax, dword [esi + 4]
imul eax, eax, 0x8088405
mov dword [esi], ecx
mov ecx, dword [esp + 0x10]
inc eax
mov dword [esi + 4], eax
shr eax, 0x18
xor eax, edi
shr edi, 8
movzx eax, al
xor edi, dword [ebp + eax*4]
mov eax, ebx
xor eax, 1
mov dword [esi + 8], edi
imul eax, ebx
shr eax, 8
xor al, byte [esp + 0x27]
mov byte [ecx + 3], al
mov ecx, dword [esi]
movzx eax, byte [esp + 0x28]
xor eax, ecx
mov edi, dword [esi + 8]
movzx eax, al
mov ebx, edi
shr ecx, 8
and ebx, 0xfffd
or ebx, 2
xor ecx, dword [ebp + eax*4]
movzx eax, cl
add eax, dword [esi + 4]
imul eax, eax, 0x8088405
mov dword [esi], ecx
mov ecx, dword [esp + 0x10]
inc eax
mov dword [esi + 4], eax
shr eax, 0x18
xor eax, edi
shr edi, 8
movzx eax, al
xor edi, dword [ebp + eax*4]
mov eax, ebx
xor eax, 1
mov dword [esi + 8], edi
imul eax, ebx
shr eax, 8
xor al, byte [esp + 0x28]
mov byte [ecx + 4], al
mov ecx, dword [esi]
movzx eax, byte [esp + 0x29]
mov edi, dword [esi + 8]
xor eax, ecx
mov ebx, edi
movzx eax, al
and ebx, 0xfffd
shr ecx, 8
or ebx, 2
xor ecx, dword [ebp + eax*4]
mov dword [esi], ecx
movzx eax, cl
add eax, dword [esi + 4]
imul eax, eax, 0x8088405
mov ecx, dword [esp + 0x10]
inc eax
mov dword [esi + 4], eax
shr eax, 0x18
xor eax, edi
shr edi, 8
movzx eax, al
xor edi, dword [ebp + eax*4]
mov eax, ebx
xor eax, 1
mov dword [esi + 8], edi
imul eax, ebx
shr eax, 8
xor al, byte [esp + 0x29]
mov byte [ecx + 5], al
mov ecx, dword [esi]
movzx eax, byte [esp + 0x2a]
xor eax, ecx
mov edi, dword [esi + 8]
movzx eax, al
mov ebx, edi
shr ecx, 8
and ebx, 0xfffd
or ebx, 2
xor ecx, dword [ebp + eax*4]
movzx eax, cl
add eax, dword [esi + 4]
imul eax, eax, 0x8088405
mov dword [esi], ecx
mov ecx, dword [esp + 0x10]
inc eax
mov dword [esi + 4], eax
shr eax, 0x18
xor eax, edi
shr edi, 8
movzx eax, al
xor edi, dword [ebp + eax*4]
mov eax, ebx
xor eax, 1
mov dword [esi + 8], edi
imul eax, ebx
shr eax, 8
xor al, byte [esp + 0x2a]
mov byte [ecx + 6], al
mov ecx, dword [esi]
movzx eax, byte [esp + 0x2b]
xor eax, ecx
mov edi, dword [esi + 8]
movzx eax, al
mov ebx, edi
shr ecx, 8
and ebx, 0xfffd
or ebx, 2
xor ecx, dword [ebp + eax*4]
movzx eax, cl
add eax, dword [esi + 4]
imul eax, eax, 0x8088405
mov dword [esi], ecx
mov ecx, dword [esp + 0x10]
inc eax
mov dword [esi + 4], eax
shr eax, 0x18
xor eax, edi
shr edi, 8
movzx eax, al
xor edi, dword [ebp + eax*4]
mov eax, ebx
xor eax, 1
mov dword [esi + 8], edi
imul eax, ebx
shr eax, 8
xor al, byte [esp + 0x2b]
mov byte [ecx + 7], al
mov edi, dword [esi + 8]
mov ebx, edi
mov ecx, dword [esi]
and ebx, 0xfffd
or ebx, 2
movzx eax, byte [esp + 0x2c]
xor eax, ecx
mov edx, dword [esp + 0x4c]
movzx eax, al
shr ecx, 8
shr edx, 0x10
xor ecx, dword [ebp + eax*4]
movzx eax, cl
add eax, dword [esi + 4]
imul eax, eax, 0x8088405
mov dword [esi], ecx
mov ecx, dword [esp + 0x10]
inc eax
mov dword [esi + 4], eax
shr eax, 0x18
xor eax, edi
shr edi, 8
movzx eax, al
xor edi, dword [ebp + eax*4]
mov eax, ebx
xor eax, 1
mov dword [esi + 8], edi
imul eax, ebx
shr eax, 8
xor al, byte [esp + 0x2c]
mov byte [ecx + 8], al
mov ecx, dword [esi]
movzx eax, byte [esp + 0x2d]
xor eax, ecx
mov edi, dword [esi + 8]
movzx eax, al
mov ebx, edi
shr ecx, 8
and ebx, 0xfffd
or ebx, 2
xor ecx, dword [ebp + eax*4]
movzx eax, cl
add eax, dword [esi + 4]
imul eax, eax, 0x8088405
mov dword [esi], ecx
mov ecx, dword [esp + 0x10]
inc eax
mov dword [esi + 4], eax
shr eax, 0x18
xor eax, edi
shr edi, 8
movzx eax, al
xor edi, dword [ebp + eax*4]
mov eax, ebx
xor eax, 1
mov dword [esi + 8], edi
imul eax, ebx
shr eax, 8
xor al, byte [esp + 0x2d]
mov byte [ecx + 9], al
mov eax, edx
mov ecx, dword [esi]
xor eax, ecx
mov edi, dword [esi + 8]
mov ebx, edi
movzx eax, al
and ebx, 0xfffd
shr ecx, 8
or ebx, 2
xor ecx, dword [ebp + eax*4]
movzx eax, cl
add eax, dword [esi + 4]
imul eax, eax, 0x8088405
mov dword [esi], ecx
inc eax
mov dword [esi + 4], eax
shr eax, 0x18
xor eax, edi
shr edi, 8
movzx eax, al
xor edi, dword [ebp + eax*4]
mov eax, ebx
xor eax, 1
mov dword [esi + 8], edi
imul eax, ebx
shr eax, 8
mov ecx, dword [esp + 0x10]
xor al, dl
mov ebx, dword [esp + 0x4c]
shr ebx, 0x18
mov byte [ecx + 0xa], al
mov eax, ebx
mov ecx, dword [esi]
xor eax, ecx
mov edx, dword [esi + 8]
mov edi, edx
movzx eax, al
and edi, 0xfffd
shr ecx, 8
or edi, 2
xor ecx, dword [ebp + eax*4]
movzx eax, cl
add eax, dword [esi + 4]
imul eax, eax, 0x8088405
mov dword [esi], ecx
mov ecx, dword [esp + 0x10]
inc eax
mov dword [esi + 4], eax
shr eax, 0x18
xor eax, edx
shr edx, 8
movzx eax, al
xor edx, dword [ebp + eax*4]
mov eax, edi
xor eax, 1
mov dword [esi + 8], edx
imul eax, edi
pop ebp
pop edi
pop esi
shr eax, 8
xor al, bl
mov byte [ecx + 0xb], al
mov eax, 0xc
mov ecx, dword [esp + 0x24]
pop ebx
xor ecx, esp
call fcn.0061f478
add esp, 0x24
ret