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

Disassembly:
sub esp, 0x20
mov eax, dword [0x8a3940]
xor eax, esp
mov dword [esp + 0x1c], eax
push ebx
mov ebx, dword [esp + 0x30]
push ebp
mov ebp, dword [esp + 0x30]
push esi
mov esi, dword [esp + 0x30]
test esi, esi
je 0x5c60d3
mov eax, dword [esi + 0x60]
or eax, dword [esi + 0x64]
je 0x5c60d3
cmp dword [esi + 0xe0], 0
je 0x5c5cf3
push esi
call fcn.005c58c0
add esp, 4
lea eax, [esp + 0xc]
push eax
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x18]
push eax
push esi
call fcn.005c4970
add esp, 0x10
test eax, eax
je 0x5c5d26
pop esi
pop ebp
mov eax, 0xffffff99
pop ebx
mov ecx, dword [esp + 0x1c]
xor ecx, esp
call fcn.0059bb21
add esp, 0x20
ret
push edi
push 0xd0
call fcn.004a67c0
mov edi, eax
add esp, 4
test edi, edi
je 0x5c5d83
push 0x4000
call fcn.004a67c0
mov ecx, dword [esp + 0x1c]
add esp, 4
mov dword [edi + 0x50], ecx
mov ecx, dword [esp + 0x1c]
mov dword [edi + 0x54], ecx
mov ecx, dword [esp + 0x10]
mov dword [edi + 0x58], ecx
mov ecx, dword [esp + 0x40]
mov dword [edi], eax
mov dword [edi + 0x60], 0
mov dword [edi + 0x64], 0
mov dword [edi + 0xc8], ecx
test eax, eax
jne 0x5c5d9b
push edi
call fcn.004a6790
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 0xffffff98
pop ebx
mov ecx, dword [esp + 0x1c]
xor ecx, esp
call fcn.0059bb21
add esp, 0x20
ret
mov dword [edi + 0x48], 0
test ebp, ebp
je 0x5c5daf
mov eax, dword [esi + 0x8c]
mov dword [ebp], eax
test ebx, ebx
je 0x5c5de7
mov dword [ebx], 6
mov eax, dword [esi + 0x88]
and eax, 6
sub eax, 2
je 0x5c5de1
sub eax, 2
je 0x5c5dd9
sub eax, 2
jne 0x5c5de7
mov dword [ebx], 1
jmp 0x5c5de7
mov dword [ebx], 2
jmp 0x5c5de7
mov dword [ebx], 9
mov eax, dword [esi + 0x94]
mov dword [edi + 0x74], eax
mov dword [edi + 0x70], 0
mov dword [edi + 0x68], 0
mov dword [edi + 0x6c], 0
mov eax, dword [esi + 0x8c]
mov dword [edi + 0xb8], eax
mov eax, dword [esi + 0x30]
mov dword [edi + 0xb4], eax
movups xmm0, xmmword [esi]
movups xmmword [edi + 0x88], xmm0
movups xmm0, xmmword [esi + 0x10]
movups xmmword [edi + 0x98], xmm0
movq xmm0, qword [esi + 0x20]
movq qword [edi + 0xa8], xmm0
mov eax, dword [esi + 0x28]
mov dword [edi + 0xb0], eax
mov eax, dword [esi + 0x48]
mov dword [edi + 0xc0], eax
mov eax, dword [esi + 0x4c]
mov dword [edi + 0xc4], eax
mov dword [edi + 0x18], 0
mov eax, dword [esi + 0x8c]
cmp eax, 0xc
jne 0x5c606f
test ecx, ecx
jne 0x5c5e7b
mov dword [edi + 0xc8], 1
mov eax, dword [esi + 0x98]
xor ecx, ecx
mov dword [edi + 0x78], eax
mov eax, dword [esi + 0x9c]
mov dword [edi + 0x7c], eax
mov eax, dword [esi + 0xa0]
mov dword [edi + 0x80], eax
mov eax, dword [esi + 0xa4]
mov dword [edi + 0x84], eax
mov eax, dword [esp + 0x14]
add eax, dword [esi + 0xd8]
adc ecx, dword [esi + 0xdc]
add eax, 0x1e
mov dword [edi + 0x40], eax
adc ecx, 0
mov dword [edi + 8], 0
mov dword [edi + 0x44], ecx
mov dword [esi + 0xe0], edi
mov edi, dword [esp + 0x44]
mov dword [esi + 0xe4], 0
test edi, edi
je 0x5c605a
call fcn.005c75a0
mov dword [esi + 0xf8], eax
mov dword [esp + 0x10], eax
mov dword [esi + 0xec], 0x12345678
mov dword [esi + 0xf0], 0x23456789
mov dword [esi + 0xf4], 0x34567890
mov al, byte [edi]
test al, al
je 0x5c5f79
mov ebx, 0x12345678
mov ebp, 0x23456789
mov edx, 0x34567890
movsx eax, al
lea edi, [edi + 1]
xor eax, ebx
mov ecx, ebx
mov ebx, dword [esp + 0x10]
movzx eax, al
shr ecx, 8
mov ebx, dword [ebx + eax*4]
xor ebx, ecx
mov ecx, dword [esp + 0x10]
movzx eax, bl
add eax, ebp
mov dword [esi + 0xec], ebx
imul ebp, eax, 0x8088405
inc ebp
mov eax, ebp
mov dword [esi + 0xf0], ebp
shr eax, 0x18
xor eax, edx
shr edx, 8
movzx eax, al
xor edx, dword [ecx + eax*4]
mov dword [esi + 0xf4], edx
mov al, byte [edi]
test al, al
jne 0x5c5f28
mov ecx, dword [esi + 0xe0]
push 0
mov edx, dword [ecx + 0xc0]
add edx, dword [ecx + 0x40]
mov eax, dword [ecx + 0xc4]
adc eax, dword [ecx + 0x44]
push eax
push edx
push dword [esi + 0x30]
push esi
call fcn.005c6ae0
add esp, 0x14
test eax, eax
jne 0x5c5d83
push 0xc
lea eax, [esp + 0x24]
push eax
push dword [esi + 0x30]
mov eax, dword [esi + 4]
push dword [esi + 0x1c]
call eax
add esp, 0x10
cmp eax, 0xc
jb 0x5c5d83
mov edi, dword [esi + 0xf8]
xor edx, edx
nop
mov ecx, dword [esi + 0xf4]
and ecx, 0xfffd
or ecx, 2
mov eax, ecx
xor eax, 1
imul eax, ecx
mov ecx, dword [esi + 0xec]
shr eax, 8
xor byte [esp + edx + 0x20], al
movsx eax, byte [esp + edx + 0x20]
inc edx
xor eax, ecx
shr ecx, 8
movzx eax, al
mov eax, dword [edi + eax*4]
xor eax, ecx
mov ecx, dword [esi + 0xf4]
mov dword [esi + 0xec], eax
movzx eax, al
add eax, dword [esi + 0xf0]
imul eax, eax, 0x8088405
inc eax
mov dword [esi + 0xf0], eax
shr eax, 0x18
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [edi + eax*4]
mov dword [esi + 0xf4], ecx
cmp edx, 0xc
jl 0x5c5fd0
mov eax, dword [esi + 0xe0]
add dword [eax + 0x40], 0xc
adc dword [eax + 0x44], 0
mov dword [esi + 0xe4], 1
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x1c]
xor ecx, esp
call fcn.0059bb21
add esp, 0x20
ret
cmp eax, 8
jne 0x5c5e7b
test ecx, ecx
jne 0x5c5e7b
push 0x38
push 0x7aa580
lea eax, [edi + 4]
mov dword [edi + 0x24], ecx
push 0xfffffffffffffff1
push eax
mov dword [edi + 0x28], ecx
mov dword [edi + 0x2c], ecx
mov dword [eax], ecx
mov dword [edi + 8], ecx
call fcn.005cb2b0
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x5c60b5
mov dword [edi + 0x48], 8
jmp 0x5c5e7b
push edi
call fcn.004a6790
add esp, 4
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x1c]
xor ecx, esp
call fcn.0059bb21
add esp, 0x20
ret
mov ecx, dword [esp + 0x28]
mov eax, 0xffffff9a
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0059bb21
add esp, 0x20
ret