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

Disassembly:
sub esp, 0x18
mov eax, dword [0x4d88f0]
xor eax, esp
mov dword [esp + 0x14], eax
mov eax, dword [0x549698]
push ebx
mov ebx, dword [esp + 0x20]
push ebp
inc eax
push esi
push edi
mov dword [0x549698], eax
cmp eax, 1
jne 0x4a5943
push 0
call fcn.004b1edd
mov esi, eax
mov dword [esp + 0x18], edx
call sub.KERNEL32.dll_GetCurrentProcessId
xor eax, esi
push eax
call fcn.004b3d5b
add esp, 8
push ebx
call fcn.004a57b0
xor ebp, ebp
jmp 0x4a5950
call fcn.004b3d6d
mov edi, dword [0x54968c]
sar eax, 7
and eax, 0xff
mov edx, dword [0x549694]
mov ecx, edi
xor ecx, eax
and ecx, 0xff
shr edi, 8
xor edi, dword [ecx*4 + 0x4e08b8]
mov esi, edx
mov ecx, edi
mov dword [0x54968c], ecx
movzx ecx, cl
add ecx, dword [0x549690]
and esi, 0xfffd
imul ecx, ecx, 0x8088405
inc ecx
mov dword [0x549690], ecx
shr ecx, 0x18
xor ecx, edx
shr edx, 8
and ecx, 0xff
xor edx, dword [ecx*4 + 0x4e08b8]
or esi, 2
mov dword [0x549694], edx
mov edx, esi
xor edx, 1
imul edx, esi
shr edx, 8
xor dl, al
mov byte [esp + ebp + 0x18], dl
inc ebp
cmp ebp, 0xa
jl 0x4a5950
push ebx
call fcn.004a57b0
mov dl, byte [esp + 0x18]
mov ecx, dword [0x54968c]
movzx eax, dl
xor eax, ecx
and eax, 0xff
mov esi, dword [0x549694]
shr ecx, 8
xor ecx, dword [eax*4 + 0x4e08b8]
mov edi, esi
movzx eax, cl
add eax, dword [0x549690]
and edi, 0xfffd
imul eax, eax, 0x8088405
inc eax
mov ebx, eax
shr ebx, 0x18
xor ebx, esi
or edi, 2
and ebx, 0xff
shr esi, 8
xor esi, dword [ebx*4 + 0x4e08b8]
mov ebx, edi
xor ebx, 1
imul ebx, edi
shr ebx, 8
xor dl, bl
mov byte [esp + 0x18], dl
mov dl, byte [esp + 0x19]
movzx edi, dl
xor edi, ecx
and edi, 0xff
shr ecx, 8
xor ecx, dword [edi*4 + 0x4e08b8]
mov ebp, esi
movzx edi, cl
add edi, eax
imul edi, edi, 0x8088405
inc edi
mov eax, edi
shr eax, 0x18
xor eax, esi
and eax, 0xff
and ebp, 0xfffd
or ebp, 2
shr esi, 8
xor esi, dword [eax*4 + 0x4e08b8]
mov eax, ebp
xor eax, 1
imul eax, ebp
shr eax, 8
xor dl, al
mov byte [esp + 0x19], dl
mov dl, byte [esp + 0x1a]
movzx ebx, dl
xor ebx, ecx
and ebx, 0xff
shr ecx, 8
xor ecx, dword [ebx*4 + 0x4e08b8]
mov eax, esi
movzx ebp, cl
add ebp, edi
imul ebp, ebp, 0x8088405
and eax, 0xfffd
or eax, 2
mov ebx, eax
xor ebx, 1
imul ebx, eax
inc ebp
mov edi, ebp
shr edi, 0x18
xor edi, esi
and edi, 0xff
shr esi, 8
xor esi, dword [edi*4 + 0x4e08b8]
shr ebx, 8
xor dl, bl
mov eax, esi
mov byte [esp + 0x1a], dl
and eax, 0xfffd
mov dl, byte [esp + 0x1b]
movzx edi, dl
xor edi, ecx
and edi, 0xff
shr ecx, 8
xor ecx, dword [edi*4 + 0x4e08b8]
or eax, 2
movzx edi, cl
add edi, ebp
imul edi, edi, 0x8088405
inc edi
mov ebx, edi
shr ebx, 0x18
xor ebx, esi
and ebx, 0xff
shr esi, 8
xor esi, dword [ebx*4 + 0x4e08b8]
mov ebx, eax
xor ebx, 1
imul ebx, eax
shr ebx, 8
xor dl, bl
mov byte [esp + 0x1b], dl
mov dl, byte [esp + 0x1c]
movzx ebx, dl
xor ebx, ecx
and ebx, 0xff
shr ecx, 8
xor ecx, dword [ebx*4 + 0x4e08b8]
mov eax, esi
and eax, 0xfffd
or eax, 2
movzx ebp, cl
add ebp, edi
mov ebx, eax
imul ebp, ebp, 0x8088405
xor ebx, 1
imul ebx, eax
shr ebx, 8
xor dl, bl
inc ebp
mov edi, ebp
shr edi, 0x18
xor edi, esi
and edi, 0xff
shr esi, 8
xor esi, dword [edi*4 + 0x4e08b8]
mov byte [esp + 0x1c], dl
mov dl, byte [esp + 0x1d]
movzx edi, dl
xor edi, ecx
and edi, 0xff
shr ecx, 8
xor ecx, dword [edi*4 + 0x4e08b8]
mov eax, esi
movzx edi, cl
add edi, ebp
imul edi, edi, 0x8088405
inc edi
mov ebx, edi
shr ebx, 0x18
xor ebx, esi
and ebx, 0xff
and eax, 0xfffd
or eax, 2
shr esi, 8
xor esi, dword [ebx*4 + 0x4e08b8]
mov ebx, eax
xor ebx, 1
imul ebx, eax
shr ebx, 8
xor dl, bl
mov byte [esp + 0x1d], dl
mov dl, byte [esp + 0x1e]
movzx ebx, dl
mov eax, esi
and eax, 0xfffd
xor ebx, ecx
or eax, 2
and ebx, 0xff
shr ecx, 8
xor ecx, dword [ebx*4 + 0x4e08b8]
mov ebx, eax
xor ebx, 1
imul ebx, eax
movzx ebp, cl
add ebp, edi
imul ebp, ebp, 0x8088405
shr ebx, 8
xor dl, bl
inc ebp
mov edi, ebp
shr edi, 0x18
xor edi, esi
and edi, 0xff
shr esi, 8
xor esi, dword [edi*4 + 0x4e08b8]
mov byte [esp + 0x1e], dl
mov dl, byte [esp + 0x1f]
movzx edi, dl
xor edi, ecx
and edi, 0xff
shr ecx, 8
xor ecx, dword [edi*4 + 0x4e08b8]
mov eax, esi
movzx edi, cl
add edi, ebp
imul edi, edi, 0x8088405
inc edi
mov ebx, edi
shr ebx, 0x18
xor ebx, esi
and ebx, 0xff
and eax, 0xfffd
or eax, 2
shr esi, 8
xor esi, dword [ebx*4 + 0x4e08b8]
mov ebx, eax
xor ebx, 1
imul ebx, eax
shr ebx, 8
xor dl, bl
mov byte [esp + 0x1f], dl
mov dl, byte [esp + 0x20]
movzx ebx, dl
xor ebx, ecx
and ebx, 0xff
shr ecx, 8
xor ecx, dword [ebx*4 + 0x4e08b8]
mov eax, esi
and eax, 0xfffd
movzx ebp, cl
add ebp, edi
or eax, 2
imul ebp, ebp, 0x8088405
mov ebx, eax
xor ebx, 1
imul ebx, eax
inc ebp
mov edi, ebp
shr edi, 0x18
xor edi, esi
and edi, 0xff
shr ebx, 8
xor dl, bl
shr esi, 8
xor esi, dword [edi*4 + 0x4e08b8]
mov byte [esp + 0x20], dl
mov dl, byte [esp + 0x21]
movzx edi, dl
xor edi, ecx
and edi, 0xff
shr ecx, 8
xor ecx, dword [edi*4 + 0x4e08b8]
mov eax, esi
movzx edi, cl
add edi, ebp
imul edi, edi, 0x8088405
and eax, 0xfffd
or eax, 2
inc edi
mov ebx, edi
shr ebx, 0x18
xor ebx, esi
and ebx, 0xff
shr esi, 8
xor esi, dword [ebx*4 + 0x4e08b8]
mov ebx, eax
xor ebx, 1
imul ebx, eax
shr ebx, 8
xor dl, bl
mov byte [esp + 0x21], dl
mov edx, dword [esp + 0x30]
shr edx, 0x10
mov ebx, edx
xor ebx, ecx
shr ecx, 8
mov eax, esi
and eax, 0xfffd
or eax, 2
and ebx, 0xff
xor ecx, dword [ebx*4 + 0x4e08b8]
mov ebx, eax
xor ebx, 1
imul ebx, eax
movzx ebp, cl
add ebp, edi
imul ebp, ebp, 0x8088405
shr ebx, 8
xor bl, dl
mov byte [esp + 0x22], bl
mov ebx, dword [esp + 0x30]
shr ebx, 0x18
inc ebp
mov eax, ebx
xor eax, ecx
and eax, 0xff
shr ecx, 8
xor ecx, dword [eax*4 + 0x4e08b8]
mov edi, ebp
shr edi, 0x18
xor edi, esi
movzx eax, cl
shr esi, 8
and edi, 0xff
xor esi, dword [edi*4 + 0x4e08b8]
add eax, ebp
mov edx, esi
imul eax, eax, 0x8088405
and edx, 0xfffd
mov dword [0x54968c], ecx
or edx, 2
mov ecx, edx
xor ecx, 1
imul ecx, edx
inc eax
mov dword [0x549690], eax
shr eax, 0x18
xor eax, esi
push 0
push 0xc
and eax, 0xff
shr esi, 8
xor esi, dword [eax*4 + 0x4e08b8]
shr ecx, 8
push 1
lea edx, [esp + 0x24]
xor cl, bl
push edx
mov dword [0x549694], esi
mov byte [esp + 0x33], cl
call fcn.00437c70
mov ecx, dword [esp + 0x24]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004af72c
add esp, 0x18
ret 8