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

Disassembly:
sub esp, 0x18
mov eax, dword [0x50fb70]
xor eax, esp
mov dword [esp + 0x14], eax
push ebx
push ebp
mov ebp, dword [esp + 0x24]
push esi
mov esi, ecx
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
push edi
cmp eax, 1
jne 0x4cb530
push 0
call fcn.004e4dba
mov edi, eax
mov dword [esp + 0x18], edx
call sub.KERNEL32.dll_GetCurrentProcessId
xor eax, edi
push eax
call fcn.004e4e0b
add esp, 8
push ebp
mov ecx, esi
call fcn.004cb460
xor ebx, ebx
lea ebx, [ebx]
call fcn.004e4e1d
mov ecx, dword [esi + 8]
mov edx, ecx
shr ecx, 8
sar eax, 7
and eax, 0xff
xor edx, eax
mov edi, dword [esi + 0x10]
and edx, 0xff
mov edx, dword [edx*4 + 0x59f8e0]
xor edx, ecx
movzx ecx, dl
add ecx, dword [esi + 0xc]
mov dword [esi + 8], edx
mov edx, dword [esi + 0x10]
imul ecx, ecx, 0x8088405
inc ecx
mov dword [esi + 0xc], ecx
shr ecx, 0x18
xor ecx, edx
and ecx, 0xff
and edi, 0xfffd
or edi, 2
shr edx, 8
xor edx, dword [ecx*4 + 0x59f8e0]
mov ecx, edi
xor ecx, 1
imul ecx, edi
shr ecx, 8
xor cl, al
mov byte [esp + ebx + 0x18], cl
inc ebx
cmp ebx, 0xa
mov dword [esi + 0x10], edx
jl 0x4cb540
push ebp
mov ecx, esi
call fcn.004cb460
xor ebp, ebp
mov bl, byte [esp + ebp + 0x18]
mov edi, dword [esi + 8]
mov eax, dword [esi + 0x10]
movzx ecx, bl
xor ecx, edi
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x59f8e0]
shr edi, 8
xor ecx, edi
mov dword [esi + 8], ecx
movzx ecx, cl
add ecx, dword [esi + 0xc]
mov edx, eax
imul ecx, ecx, 0x8088405
inc ecx
mov dword [esi + 0xc], ecx
shr ecx, 0x18
xor ecx, eax
and ecx, 0xff
shr eax, 8
xor eax, dword [ecx*4 + 0x59f8e0]
mov edi, dword [esi + 8]
mov dword [esi + 0x10], eax
and edx, 0xfffd
or edx, 2
mov eax, edx
xor eax, 1
imul eax, edx
shr eax, 8
xor al, bl
mov bl, byte [esp + ebp + 0x19]
movzx ecx, bl
xor ecx, edi
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x59f8e0]
shr edi, 8
xor ecx, edi
mov dword [esi + 8], ecx
movzx ecx, cl
add ecx, dword [esi + 0xc]
mov byte [esp + ebp + 0x18], al
mov eax, dword [esi + 0x10]
imul ecx, ecx, 0x8088405
inc ecx
mov dword [esi + 0xc], ecx
shr ecx, 0x18
xor ecx, eax
and ecx, 0xff
mov edx, eax
shr eax, 8
xor eax, dword [ecx*4 + 0x59f8e0]
mov edi, dword [esi + 8]
and edx, 0xfffd
or edx, 2
mov dword [esi + 0x10], eax
mov eax, edx
xor eax, 1
imul eax, edx
shr eax, 8
xor al, bl
mov bl, byte [esp + ebp + 0x1a]
movzx ecx, bl
xor ecx, edi
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x59f8e0]
shr edi, 8
xor ecx, edi
mov dword [esi + 8], ecx
movzx ecx, cl
add ecx, dword [esi + 0xc]
mov byte [esp + ebp + 0x19], al
mov eax, dword [esi + 0x10]
imul ecx, ecx, 0x8088405
inc ecx
mov dword [esi + 0xc], ecx
mov edx, eax
shr ecx, 0x18
and edx, 0xfffd
xor ecx, eax
or edx, 2
and ecx, 0xff
shr eax, 8
xor eax, dword [ecx*4 + 0x59f8e0]
mov edi, dword [esi + 8]
mov dword [esi + 0x10], eax
mov eax, edx
xor eax, 1
imul eax, edx
shr eax, 8
xor al, bl
mov bl, byte [esp + ebp + 0x1b]
movzx ecx, bl
xor ecx, edi
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x59f8e0]
shr edi, 8
xor ecx, edi
mov dword [esi + 8], ecx
movzx ecx, cl
add ecx, dword [esi + 0xc]
mov byte [esp + ebp + 0x1a], al
mov eax, dword [esi + 0x10]
imul ecx, ecx, 0x8088405
inc ecx
mov dword [esi + 0xc], ecx
shr ecx, 0x18
xor ecx, eax
mov edx, eax
shr eax, 8
and ecx, 0xff
xor eax, dword [ecx*4 + 0x59f8e0]
mov edi, dword [esi + 8]
mov dword [esi + 0x10], eax
and edx, 0xfffd
or edx, 2
mov eax, edx
xor eax, 1
imul eax, edx
shr eax, 8
xor al, bl
mov bl, byte [esp + ebp + 0x1c]
movzx ecx, bl
xor ecx, edi
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x59f8e0]
shr edi, 8
xor ecx, edi
mov dword [esi + 8], ecx
movzx ecx, cl
add ecx, dword [esi + 0xc]
mov byte [esp + ebp + 0x1b], al
mov eax, dword [esi + 0x10]
imul ecx, ecx, 0x8088405
inc ecx
mov edx, eax
mov dword [esi + 0xc], ecx
shr ecx, 0x18
xor ecx, eax
shr eax, 8
and ecx, 0xff
xor eax, dword [ecx*4 + 0x59f8e0]
and edx, 0xfffd
mov dword [esi + 0x10], eax
or edx, 2
mov eax, edx
xor eax, 1
imul eax, edx
shr eax, 8
xor al, bl
mov byte [esp + ebp + 0x1c], al
add ebp, 5
cmp ebp, 0xa
jl 0x4cb5c1
mov edi, dword [esp + 0x30]
mov eax, dword [esi + 8]
mov ebx, edi
shr ebx, 0x10
mov edx, ebx
xor edx, eax
and edx, 0xff
mov edx, dword [edx*4 + 0x59f8e0]
shr eax, 8
xor edx, eax
movzx eax, dl
add eax, dword [esi + 0xc]
mov ecx, dword [esi + 0x10]
imul eax, eax, 0x8088405
mov dword [esi + 8], edx
mov edx, dword [esi + 0x10]
and ecx, 0xfffd
inc eax
mov dword [esi + 0xc], eax
or ecx, 2
shr eax, 0x18
xor eax, edx
shr edx, 8
and eax, 0xff
mov eax, dword [eax*4 + 0x59f8e0]
xor eax, edx
mov edx, ecx
xor edx, 1
imul edx, ecx
mov ecx, dword [esi + 8]
shr edx, 8
xor dl, bl
mov byte [esp + 0x22], dl
mov ebx, edi
shr ebx, 0x18
mov dword [esi + 0x10], eax
mov edx, ebx
xor edx, ecx
shr ecx, 8
and edx, 0xff
mov edx, dword [edx*4 + 0x59f8e0]
xor edx, ecx
movzx ecx, dl
add ecx, dword [esi + 0xc]
mov dword [esi + 8], edx
mov edx, dword [esi + 0x10]
imul ecx, ecx, 0x8088405
inc ecx
mov dword [esi + 0xc], ecx
shr ecx, 0x18
xor ecx, edx
and ecx, 0xff
and eax, 0xfffd
shr edx, 8
xor edx, dword [ecx*4 + 0x59f8e0]
or eax, 2
mov ecx, eax
xor ecx, 1
imul ecx, eax
push 0
shr ecx, 8
push 0xc
xor cl, bl
mov dword [esi + 0x10], edx
push 1
lea edx, [esp + 0x24]
mov byte [esp + 0x2f], cl
push edx
mov ecx, esi
call fcn.004ca960
mov ecx, dword [esp + 0x24]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004df824
add esp, 0x18
ret 8