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

Disassembly:
sub esp, 0x18
mov eax, dword [0x528af4]
xor eax, esp
mov dword [esp + 0x14], eax
push ebx
push ebp
mov ebp, dword [esp + 0x24]
push esi
mov esi, ecx
push edi
inc dword [esi + 0x10]
cmp dword [esi + 0x10], 1
jne 0x4e21aa
push 0
call fcn.004f787d
mov edi, eax
call sub.KERNEL32.dll_GetCurrentProcessId
xor eax, edi
push eax
call fcn.004f77ec
add esp, 8
push ebp
mov ecx, esi
call fcn.004e26e0
xor edi, edi
call fcn.004f77cb
mov ecx, dword [esi + 4]
sar eax, 7
movzx ebx, al
mov eax, dword [esi + 4]
xor eax, ebx
mov edx, dword [esi + 0xc]
movzx eax, al
and edx, 0xfffd
shr ecx, 8
or edx, 2
mov eax, dword [eax*4 + 0x5cc430]
xor eax, ecx
mov ecx, dword [esi + 0xc]
mov dword [esi + 4], eax
movzx eax, al
add eax, dword [esi + 8]
imul eax, eax, 0x8088405
inc eax
mov dword [esi + 8], eax
shr eax, 0x18
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x5cc430]
mov eax, edx
xor eax, 1
mov dword [esi + 0xc], ecx
imul eax, edx
shr eax, 8
xor al, bl
mov byte [esp + edi + 0x18], al
inc edi
cmp edi, 0xa
jl 0x4e21b4
push ebp
mov ecx, esi
call fcn.004e26e0
mov dl, byte [esp + 0x18]
mov ecx, dword [esi + 4]
mov edi, dword [esi + 0xc]
mov ebx, edi
movzx eax, dl
and ebx, 0xfffd
xor eax, ecx
or ebx, 2
movzx eax, al
shr ecx, 8
mov eax, dword [eax*4 + 0x5cc430]
xor eax, ecx
mov dword [esi + 4], eax
movzx eax, al
add eax, dword [esi + 8]
imul eax, eax, 0x8088405
mov ecx, dword [esi + 4]
inc eax
mov dword [esi + 8], eax
shr eax, 0x18
xor eax, edi
shr edi, 8
movzx eax, al
xor edi, dword [eax*4 + 0x5cc430]
mov eax, ebx
xor eax, 1
mov dword [esi + 0xc], edi
imul eax, ebx
mov ebx, edi
and ebx, 0xfffd
or ebx, 2
shr eax, 8
xor dl, al
mov byte [esp + 0x18], dl
mov dl, byte [esp + 0x19]
movzx eax, dl
xor eax, ecx
shr ecx, 8
movzx eax, al
mov eax, dword [eax*4 + 0x5cc430]
xor eax, ecx
mov dword [esi + 4], eax
movzx eax, al
add eax, dword [esi + 8]
imul eax, eax, 0x8088405
mov ecx, dword [esi + 4]
inc eax
mov dword [esi + 8], eax
shr eax, 0x18
xor eax, edi
shr edi, 8
movzx eax, al
xor edi, dword [eax*4 + 0x5cc430]
mov eax, ebx
xor eax, 1
mov dword [esi + 0xc], edi
imul eax, ebx
mov ebx, edi
and ebx, 0xfffd
or ebx, 2
shr eax, 8
xor dl, al
mov byte [esp + 0x19], dl
mov dl, byte [esp + 0x1a]
movzx eax, dl
xor eax, ecx
shr ecx, 8
movzx eax, al
mov eax, dword [eax*4 + 0x5cc430]
xor eax, ecx
mov dword [esi + 4], eax
movzx eax, al
add eax, dword [esi + 8]
imul eax, eax, 0x8088405
inc eax
mov dword [esi + 8], eax
shr eax, 0x18
xor eax, edi
movzx eax, al
mov ecx, dword [esi + 4]
shr edi, 8
xor edi, dword [eax*4 + 0x5cc430]
mov eax, ebx
xor eax, 1
mov dword [esi + 0xc], edi
imul eax, ebx
mov ebx, edi
and ebx, 0xfffd
or ebx, 2
shr eax, 8
xor dl, al
mov byte [esp + 0x1a], dl
mov dl, byte [esp + 0x1b]
movzx eax, dl
xor eax, ecx
shr ecx, 8
movzx eax, al
mov eax, dword [eax*4 + 0x5cc430]
xor eax, ecx
mov dword [esi + 4], eax
movzx eax, al
add eax, dword [esi + 8]
imul eax, eax, 0x8088405
mov ecx, dword [esi + 4]
inc eax
mov dword [esi + 8], eax
shr eax, 0x18
xor eax, edi
shr edi, 8
movzx eax, al
xor edi, dword [eax*4 + 0x5cc430]
mov eax, ebx
xor eax, 1
mov dword [esi + 0xc], edi
imul eax, ebx
mov ebx, edi
and ebx, 0xfffd
or ebx, 2
shr eax, 8
xor dl, al
mov byte [esp + 0x1b], dl
mov dl, byte [esp + 0x1c]
movzx eax, dl
xor eax, ecx
shr ecx, 8
movzx eax, al
mov eax, dword [eax*4 + 0x5cc430]
xor eax, ecx
mov dword [esi + 4], eax
movzx eax, al
add eax, dword [esi + 8]
imul eax, eax, 0x8088405
mov ecx, dword [esi + 4]
inc eax
mov dword [esi + 8], eax
shr eax, 0x18
xor eax, edi
shr edi, 8
movzx eax, al
xor edi, dword [eax*4 + 0x5cc430]
mov eax, ebx
xor eax, 1
mov dword [esi + 0xc], edi
imul eax, ebx
mov ebx, edi
and ebx, 0xfffd
or ebx, 2
shr eax, 8
xor dl, al
mov byte [esp + 0x1c], dl
mov dl, byte [esp + 0x1d]
movzx eax, dl
xor eax, ecx
shr ecx, 8
movzx eax, al
mov eax, dword [eax*4 + 0x5cc430]
xor eax, ecx
mov dword [esi + 4], eax
movzx eax, al
add eax, dword [esi + 8]
imul eax, eax, 0x8088405
mov ecx, dword [esi + 4]
inc eax
mov dword [esi + 8], eax
shr eax, 0x18
xor eax, edi
shr edi, 8
movzx eax, al
xor edi, dword [eax*4 + 0x5cc430]
mov eax, ebx
xor eax, 1
mov dword [esi + 0xc], edi
imul eax, ebx
mov ebx, edi
and ebx, 0xfffd
or ebx, 2
shr eax, 8
xor dl, al
mov byte [esp + 0x1d], dl
mov dl, byte [esp + 0x1e]
movzx eax, dl
xor eax, ecx
shr ecx, 8
movzx eax, al
mov eax, dword [eax*4 + 0x5cc430]
xor eax, ecx
mov dword [esi + 4], eax
movzx eax, al
add eax, dword [esi + 8]
imul eax, eax, 0x8088405
mov ecx, dword [esi + 4]
inc eax
mov dword [esi + 8], eax
shr eax, 0x18
xor eax, edi
shr edi, 8
movzx eax, al
xor edi, dword [eax*4 + 0x5cc430]
mov eax, ebx
xor eax, 1
mov dword [esi + 0xc], edi
imul eax, ebx
mov ebx, edi
and ebx, 0xfffd
or ebx, 2
shr eax, 8
xor dl, al
mov byte [esp + 0x1e], dl
mov dl, byte [esp + 0x1f]
movzx eax, dl
xor eax, ecx
shr ecx, 8
movzx eax, al
mov eax, dword [eax*4 + 0x5cc430]
xor eax, ecx
mov dword [esi + 4], eax
movzx eax, al
add eax, dword [esi + 8]
imul eax, eax, 0x8088405
mov ecx, dword [esi + 4]
inc eax
mov dword [esi + 8], eax
shr eax, 0x18
xor eax, edi
shr edi, 8
movzx eax, al
xor edi, dword [eax*4 + 0x5cc430]
mov eax, ebx
xor eax, 1
mov dword [esi + 0xc], edi
imul eax, ebx
mov ebx, edi
and ebx, 0xfffd
or ebx, 2
shr eax, 8
xor dl, al
mov byte [esp + 0x1f], dl
mov dl, byte [esp + 0x20]
movzx eax, dl
xor eax, ecx
movzx eax, al
shr ecx, 8
mov eax, dword [eax*4 + 0x5cc430]
xor eax, ecx
mov dword [esi + 4], eax
movzx eax, al
add eax, dword [esi + 8]
imul eax, eax, 0x8088405
mov ecx, dword [esi + 4]
inc eax
mov dword [esi + 8], eax
shr eax, 0x18
xor eax, edi
shr edi, 8
movzx eax, al
xor edi, dword [eax*4 + 0x5cc430]
mov eax, ebx
xor eax, 1
mov dword [esi + 0xc], edi
imul eax, ebx
mov ebx, edi
and ebx, 0xfffd
or ebx, 2
shr eax, 8
xor dl, al
mov byte [esp + 0x20], dl
mov dl, byte [esp + 0x21]
movzx eax, dl
xor eax, ecx
shr ecx, 8
movzx eax, al
mov eax, dword [eax*4 + 0x5cc430]
xor eax, ecx
mov dword [esi + 4], eax
movzx eax, al
add eax, dword [esi + 8]
imul eax, eax, 0x8088405
inc eax
mov dword [esi + 8], eax
shr eax, 0x18
xor eax, edi
shr edi, 8
movzx eax, al
xor edi, dword [eax*4 + 0x5cc430]
mov eax, ebx
xor eax, 1
mov dword [esi + 0xc], edi
imul eax, ebx
and edi, 0xfffd
mov ecx, dword [esi + 4]
or edi, 2
shr eax, 8
xor dl, al
mov byte [esp + 0x21], dl
mov edx, dword [esp + 0x30]
shr edx, 0x10
mov eax, edx
xor eax, ecx
shr ecx, 8
movzx eax, al
mov eax, dword [eax*4 + 0x5cc430]
xor eax, ecx
mov ecx, dword [esi + 0xc]
mov dword [esi + 4], eax
movzx eax, al
add eax, dword [esi + 8]
imul eax, eax, 0x8088405
inc eax
mov dword [esi + 8], eax
shr eax, 0x18
xor eax, ecx
shr ecx, 8
movzx eax, al
mov ebx, dword [eax*4 + 0x5cc430]
mov eax, edi
xor eax, 1
xor ebx, ecx
imul eax, edi
mov dword [esi + 0xc], ebx
shr eax, 8
xor al, dl
mov edx, dword [esp + 0x30]
and ebx, 0xfffd
mov ecx, dword [esi + 4]
or ebx, 2
mov byte [esp + 0x22], al
shr edx, 0x18
mov eax, edx
xor eax, ecx
shr ecx, 8
movzx eax, al
push 0
push 0xc
push 1
mov eax, dword [eax*4 + 0x5cc430]
xor eax, ecx
mov ecx, dword [esi + 0xc]
mov dword [esi + 4], eax
movzx eax, al
add eax, dword [esi + 8]
imul eax, eax, 0x8088405
inc eax
mov dword [esi + 8], eax
shr eax, 0x18
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x5cc430]
mov eax, ebx
xor eax, 1
mov dword [esi + 0xc], ecx
imul eax, ebx
mov ecx, esi
shr eax, 8
xor al, dl
mov byte [esp + 0x2f], al
lea eax, [esp + 0x24]
push eax
call fcn.004e1130
mov ecx, dword [esp + 0x24]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004ebbd8
add esp, 0x18
ret 8