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

Disassembly:
sub esp, 0x1c
mov eax, dword [0x4d8620]
xor eax, esp
mov dword [esp + 0x18], eax
mov eax, dword [0x571ba0]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x2c]
inc eax
push edi
mov dword [esp + 0x10], esi
mov dword [0x571ba0], eax
cmp eax, 1
jne 0x4a5527
push 0
call fcn.004b1cad
mov edi, eax
mov dword [esp + 0x1c], edx
call sub.KERNEL32.dll_GetCurrentProcessId
xor eax, edi
push eax
call fcn.004b3a1b
add esp, 8
push esi
call fcn.004a5380
xor ebx, ebx
nop
call fcn.004b3a2d
mov ebp, dword [0x571b94]
mov esi, dword [0x571bb8]
sar eax, 7
and eax, 0xff
mov edx, dword [0x571b9c]
mov ecx, ebp
xor ecx, eax
and ecx, 0xff
shr ebp, 8
xor ebp, dword [esi + ecx*4]
mov edi, edx
mov ecx, ebp
mov dword [0x571b94], ecx
movzx ecx, cl
add ecx, dword [0x571b98]
and edi, 0xfffd
imul ecx, ecx, 0x8088405
inc ecx
mov dword [0x571b98], ecx
shr ecx, 0x18
xor ecx, edx
shr edx, 8
and ecx, 0xff
xor edx, dword [esi + ecx*4]
or edi, 2
mov dword [0x571b9c], edx
mov edx, edi
xor edx, 1
imul edx, edi
shr edx, 8
xor dl, al
mov byte [esp + ebx + 0x1c], dl
inc ebx
cmp ebx, 0xa
jl 0x4a5530
mov eax, dword [esp + 0x10]
push eax
call fcn.004a5380
mov dl, byte [esp + 0x1c]
mov ecx, dword [0x571b94]
movzx eax, dl
xor eax, ecx
and eax, 0xff
mov edi, dword [0x571b9c]
shr ecx, 8
xor ecx, dword [esi + eax*4]
mov ebp, edi
movzx eax, cl
add eax, dword [0x571b98]
and ebp, 0xfffd
imul eax, eax, 0x8088405
inc eax
mov ebx, eax
mov dword [0x571b98], eax
shr ebx, 0x18
xor ebx, edi
and ebx, 0xff
or ebp, 2
mov dword [0x571b94], ecx
shr edi, 8
xor edi, dword [esi + ebx*4]
mov ebx, ebp
xor ebx, 1
imul ebx, ebp
shr ebx, 8
xor dl, bl
mov bl, byte [esp + 0x1d]
movzx ebp, bl
xor ebp, ecx
mov byte [esp + 0x1c], dl
mov dword [0x571b9c], edi
and ebp, 0xff
shr ecx, 8
xor ecx, dword [esi + ebp*4]
mov edx, edi
movzx ebp, cl
add ebp, eax
imul ebp, ebp, 0x8088405
inc ebp
mov eax, ebp
shr eax, 0x18
xor eax, edi
and eax, 0xff
and edx, 0xfffd
or edx, 2
mov dword [0x571b94], ecx
mov dword [0x571b98], ebp
shr edi, 8
xor edi, dword [esi + eax*4]
mov eax, edx
xor eax, 1
imul eax, edx
shr eax, 8
xor bl, al
movzx eax, byte [esp + 0x1e]
xor eax, ecx
and eax, 0xff
mov byte [esp + 0x1d], bl
mov dword [0x571b9c], edi
shr ecx, 8
xor ecx, dword [esi + eax*4]
mov edx, edi
movzx eax, cl
add eax, ebp
imul eax, eax, 0x8088405
inc eax
mov ebx, eax
shr ebx, 0x18
xor ebx, edi
and edx, 0xfffd
and ebx, 0xff
shr edi, 8
or edx, 2
mov dword [0x571b94], ecx
mov dword [0x571b98], eax
xor edi, dword [esi + ebx*4]
mov ebx, edx
xor ebx, 1
imul ebx, edx
shr ebx, 8
xor byte [esp + 0x1e], bl
mov bl, byte [esp + 0x1f]
movzx ebp, bl
xor ebp, ecx
and ebp, 0xff
mov dword [0x571b9c], edi
shr ecx, 8
xor ecx, dword [esi + ebp*4]
mov edx, edi
movzx ebp, cl
add ebp, eax
imul ebp, ebp, 0x8088405
inc ebp
mov eax, ebp
shr eax, 0x18
xor eax, edi
and eax, 0xff
mov dword [0x571b98], ebp
and edx, 0xfffd
or edx, 2
mov dword [0x571b94], ecx
shr edi, 8
xor edi, dword [esi + eax*4]
mov eax, edx
xor eax, 1
imul eax, edx
shr eax, 8
xor bl, al
movzx eax, byte [esp + 0x20]
xor eax, ecx
mov byte [esp + 0x1f], bl
and eax, 0xff
mov dword [0x571b9c], edi
shr ecx, 8
xor ecx, dword [esi + eax*4]
mov edx, edi
movzx eax, cl
add eax, ebp
imul eax, eax, 0x8088405
inc eax
mov ebx, eax
shr ebx, 0x18
xor ebx, edi
mov dword [0x571b98], eax
and ebx, 0xff
and edx, 0xfffd
or edx, 2
mov dword [0x571b94], ecx
shr edi, 8
xor edi, dword [esi + ebx*4]
mov ebx, edx
xor ebx, 1
imul ebx, edx
shr ebx, 8
xor byte [esp + 0x20], bl
mov bl, byte [esp + 0x21]
movzx ebp, bl
xor ebp, ecx
and ebp, 0xff
mov dword [0x571b9c], edi
shr ecx, 8
xor ecx, dword [esi + ebp*4]
mov edx, edi
movzx ebp, cl
add ebp, eax
imul ebp, ebp, 0x8088405
inc ebp
mov eax, ebp
shr eax, 0x18
xor eax, edi
and edx, 0xfffd
and eax, 0xff
shr edi, 8
or edx, 2
mov dword [0x571b94], ecx
mov dword [0x571b98], ebp
xor edi, dword [esi + eax*4]
mov eax, edx
xor eax, 1
imul eax, edx
shr eax, 8
xor bl, al
movzx eax, byte [esp + 0x22]
xor eax, ecx
and eax, 0xff
mov byte [esp + 0x21], bl
mov dword [0x571b9c], edi
shr ecx, 8
xor ecx, dword [esi + eax*4]
mov edx, edi
movzx eax, cl
add eax, ebp
imul eax, eax, 0x8088405
inc eax
mov ebx, eax
mov dword [0x571b98], eax
shr ebx, 0x18
xor ebx, edi
and ebx, 0xff
and edx, 0xfffd
or edx, 2
mov dword [0x571b94], ecx
shr edi, 8
xor edi, dword [esi + ebx*4]
mov ebx, edx
xor ebx, 1
imul ebx, edx
shr ebx, 8
xor byte [esp + 0x22], bl
mov bl, byte [esp + 0x23]
movzx ebp, bl
xor ebp, ecx
mov dword [0x571b9c], edi
and ebp, 0xff
shr ecx, 8
xor ecx, dword [esi + ebp*4]
mov edx, edi
movzx ebp, cl
add ebp, eax
imul ebp, ebp, 0x8088405
inc ebp
mov eax, ebp
shr eax, 0x18
xor eax, edi
and eax, 0xff
and edx, 0xfffd
or edx, 2
mov dword [0x571b94], ecx
mov dword [0x571b98], ebp
shr edi, 8
xor edi, dword [esi + eax*4]
mov eax, edx
xor eax, 1
imul eax, edx
shr eax, 8
xor bl, al
movzx eax, byte [esp + 0x24]
xor eax, ecx
and eax, 0xff
mov byte [esp + 0x23], bl
mov dword [0x571b9c], edi
shr ecx, 8
xor ecx, dword [esi + eax*4]
mov edx, edi
movzx eax, cl
add eax, ebp
imul eax, eax, 0x8088405
inc eax
mov ebx, eax
shr ebx, 0x18
xor ebx, edi
and edx, 0xfffd
and ebx, 0xff
shr edi, 8
or edx, 2
mov dword [0x571b94], ecx
mov dword [0x571b98], eax
xor edi, dword [esi + ebx*4]
mov ebx, edx
xor ebx, 1
imul ebx, edx
shr ebx, 8
xor byte [esp + 0x24], bl
mov bl, byte [esp + 0x25]
movzx ebp, bl
xor ebp, ecx
and ebp, 0xff
mov dword [0x571b9c], edi
shr ecx, 8
xor ecx, dword [esi + ebp*4]
mov edx, edi
movzx ebp, cl
add ebp, eax
imul ebp, ebp, 0x8088405
inc ebp
and edx, 0xfffd
or edx, 2
mov eax, ebp
shr eax, 0x18
xor eax, edi
and eax, 0xff
mov dword [0x571b98], ebp
mov dword [0x571b94], ecx
shr edi, 8
xor edi, dword [esi + eax*4]
mov eax, edx
xor eax, 1
imul eax, edx
mov edx, dword [esp + 0x34]
shr eax, 8
xor bl, al
mov byte [esp + 0x25], bl
shr edx, 0x10
mov dword [esp + 0x10], edx
xor edx, ecx
and edx, 0xff
mov dword [0x571b9c], edi
shr ecx, 8
xor ecx, dword [esi + edx*4]
mov eax, edi
movzx edx, cl
add edx, ebp
imul edx, edx, 0x8088405
inc edx
and eax, 0xfffd
or eax, 2
mov ebx, edx
shr ebx, 0x18
xor ebx, edi
and ebx, 0xff
mov dword [0x571b94], ecx
mov dword [0x571b98], edx
shr edi, 8
xor edi, dword [esi + ebx*4]
mov ebx, eax
xor ebx, 1
imul ebx, eax
shr ebx, 8
xor bl, byte [esp + 0x10]
mov dword [0x571b9c], edi
mov byte [esp + 0x26], bl
mov ebx, dword [esp + 0x34]
shr ebx, 0x18
mov eax, ebx
xor eax, ecx
and eax, 0xff
shr ecx, 8
xor ecx, dword [esi + eax*4]
mov ebp, edi
movzx eax, cl
add eax, edx
imul eax, eax, 0x8088405
inc eax
and ebp, 0xfffd
mov dword [0x571b98], eax
shr eax, 0x18
or ebp, 2
mov dword [0x571b94], ecx
xor eax, edi
mov ecx, ebp
xor ecx, 1
imul ecx, ebp
push 0
push 0xc
and eax, 0xff
shr edi, 8
xor edi, dword [esi + eax*4]
shr ecx, 8
push 1
lea edx, [esp + 0x28]
xor cl, bl
push edx
mov dword [0x571b9c], edi
mov byte [esp + 0x37], cl
call fcn.004351d0
mov ecx, dword [esp + 0x28]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004af00b
add esp, 0x1c
ret 8