Function at 0x5d2020
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x30
mov eax, dword [0x69cffc]
xor eax, esp
mov dword [esp + 0x2c], eax
movsd xmm2, qword [0x660bc8]
push ebx
push ebp
mov ebp, dword [esp + 0x3c]
push esi
push edi
mov dword [esp + 0x14], ebp
mov eax, dword [ebp]
mov ebx, dword [ebp + 0x18]
mov dword [esp + 0x10], ebx
cmp dword [eax + 0x50], 0
movd xmm1, dword [eax + 0x1c]
cvtdq2pd xmm1, xmm1
mulsd xmm1, xmm2
divsd xmm1, qword [0x674150]
mulsd xmm1, qword [0x660bc0]
movsd qword [esp + 0x24], xmm1
movss xmm1, dword [esp + 0x48]
cvtps2pd xmm1, xmm1
divsd xmm1, qword [0x674150]
je 0x5d20ce
movd xmm0, dword [ebp + 0xd3c]
cvtdq2pd xmm0, xmm0
divsd xmm0, qword [0x674160]
comisd xmm0, xmmword [0x674120]
jbe 0x5d20ae
movsd xmm2, qword [0x660170]
jmp 0x5d20fa
movsd xmm3, qword [0x6740f0]
comisd xmm3, xmm0
ja 0x5d20fa
subsd xmm0, xmm3
mulsd xmm0, qword [0x660bd0]
subsd xmm2, xmm0
jmp 0x5d20fa
movsd xmm0, qword [0x6352a0]
comisd xmm0, xmm1
jbe 0x5d20e6
mulsd xmm1, qword [0x635298]
jmp 0x5d20f2
addsd xmm1, xmm1
subsd xmm1, qword [0x674130]
movsd xmm2, qword [0x635330]
movaps xmm0, xmm1
movaps xmm1, xmm2
call fcn.00602370
movaps xmm1, xmm0
movsd qword [esp + 0x1c], xmm1
test ebx, ebx
jle 0x5d2180
lea esi, [ebp + 0x440]
mov edi, ebx
mov ebp, 0x7f
nop
movd xmm2, dword [esi - 8]
movaps xmm0, xmm1
movsd xmm1, qword [0x674130]
cvtdq2pd xmm2, xmm2
mulsd xmm2, qword [esp + 0x24]
subsd xmm1, xmm2
call fcn.00602370
movsd xmm1, qword [0x674130]
subsd xmm1, xmm0
mulsd xmm1, qword [0x660bd8]
cvttsd2si eax, xmm1
test eax, eax
jns 0x5d2163
xor eax, eax
jmp 0x5d2169
cmp eax, 0x7f
cmovg eax, ebp
movsd xmm1, qword [esp + 0x1c]
mov dword [esi], eax
add esi, 0x2e8
sub edi, 1
jne 0x5d2120
mov ebp, dword [esp + 0x14]
mov eax, dword [ebp + 0x440]
mov dword [ebp + 0xd38], eax
cmp ebx, 4
jge 0x5d21c7
imul ecx, ebx, 0x2e8
mov edx, 4
add ecx, 0x440
add ecx, ebp
sub edx, ebx
nop word [eax + eax]
mov eax, dword [ebp + 0xd38]
lea ecx, [ecx + 0x2e8]
mov dword [ecx - 0x2e8], eax
sub edx, 1
jne 0x5d21b0
mov eax, dword [ebp + 0xd40]
mov edi, dword [ebp]
sub eax, 0x40
mov esi, dword [edi + 0x1c]
lea ecx, [eax + eax*4]
add ecx, ecx
mov eax, 0xea0ea0eb
imul ecx
mov eax, 0x51eb851f
add edx, ecx
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
imul ecx, esi
imul ecx
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
cmp ecx, 0xfffffffc
jge 0x5d220e
mov ecx, 0xfffffffc
jmp 0x5d2218
mov edx, 6
cmp ecx, edx
cmovg ecx, edx
neg esi
mov eax, 0x51eb851f
shl esi, 2
imul esi
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 0xfffffff1
jge 0x5d223a
mov eax, 0xfffffff1
jmp 0x5d2244
mov edx, 0xf
cmp eax, edx
cmovg eax, edx
mov dword [ebp + 0xd50], eax
lea esi, [ebp + 0x43c]
mov dword [ebp + 0xd44], 0
mov dword [ebp + 0xd48], 0
mov dword [ebp + 0xd4c], 0
mov dword [ebp + 0xd54], ecx
mov eax, dword [edi + 0x20]
mov edi, 4
lea eax, [eax + eax*4]
mov dword [esp + 0x1c], eax
mov ebx, eax
mov eax, dword [esi + 4]
test eax, eax
jns 0x5d2290
xor eax, eax
jmp 0x5d229b
cmp eax, 0x7f
mov ecx, 0x7f
cmovg eax, ecx
movzx eax, word [eax*2 + 0x660958]
shr eax, 2
push eax
push dword [ebp + 0x10]
call fcn.005d2710
mov ecx, dword [esi]
add esp, 8
imul eax, ebx
add ecx, 0x100
cdq
idiv ecx
cmp eax, 2
jge 0x5d22c9
xor eax, eax
jmp 0x5d22d4
cmp eax, 0x3f
mov ecx, 0x3f
cmovg eax, ecx
mov dword [esi + 8], eax
add esi, 0x2e8
sub edi, 1
jne 0x5d2285
mov ecx, dword [ebp]
lea eax, [ebp + 0x444]
mov dword [esp + 0x24], eax
mov eax, dword [eax]
mov dword [ebp + 0xc], eax
xor eax, eax
cmp dword [ecx + 0x28], eax
sete al
cmp dword [esp + 0x10], 1
mov dword [ebp + 8], eax
mov eax, dword [ecx + 0x24]
mov dword [ebp + 0x10], eax
jle 0x5d2449
mov eax, dword [ebp + 0x18]
movaps xmm0, xmmword [0x660be0]
mov dword [esp + 0x10], eax
movups xmmword [esp + 0x2c], xmm0
cmp eax, 4
jge 0x5d2333
cmp eax, 1
jle 0x5d2449
jmp 0x5d233b
mov dword [esp + 0x10], 4
mov ebx, 1
lea eax, [ebp + 0x480]
mov esi, ebx
mov dword [esp + 0x18], eax
add ebp, 0x72c
mov dword [esp + 0x1c], esi
xor edx, edx
test ebx, ebx
jle 0x5d238a
mov edi, dword [ebp - 4]
mov ecx, dword [esp + 0x24]
cmp edi, dword [ecx - 4]
jne 0x5d236f
mov eax, dword [ebp]
cmp eax, dword [ecx]
je 0x5d2380
inc edx
add ecx, 0x2e8
cmp edx, ebx
jl 0x5d2363
mov eax, dword [esp + 0x18]
jmp 0x5d238c
mov eax, dword [esp + 0x18]
mov dword [esp + esi*4 + 0x2c], edx
jmp 0x5d23b1
xor edx, edx
mov dword [esp + esi*4 + 0x2c], edx
cmp ebx, esi
je 0x5d23a7
lea esi, [ebp - 0x2ac]
mov ecx, 0xba
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x1c]
inc ebx
add eax, 0x2e8
mov dword [esp + 0x18], eax
mov edx, dword [esp + 0x10]
inc esi
add ebp, 0x2e8
mov dword [esp + 0x1c], esi
cmp esi, edx
jl 0x5d2356
mov ebp, dword [esp + 0x14]
cmp ebx, edx
jge 0x5d2449
mov esi, dword [ebp + 0x2c]
imul esi, dword [ebp + 0x28]
test esi, esi
jle 0x5d240b
nop word [eax + eax]
mov edx, dword [ebp + 0x588c]
dec esi
mov ecx, dword [edx + esi*8]
mov eax, ecx
shr eax, 5
and eax, 3
mov eax, dword [esp + eax*4 + 0x2c]
shl eax, 5
xor eax, ecx
and eax, 0x60
xor eax, ecx
mov dword [edx + esi*8], eax
test esi, esi
jg 0x5d23e0
mov edx, dword [esp + 0x10]
imul eax, ebx, 0x2e8
lea ecx, [ebp - 0x150]
mov dword [ebp + 0x18], ebx
add ebp, 0x198
add ecx, eax
add eax, ebp
mov dword [esp + 0x24], ecx
sub edx, ebx
mov ebp, ecx
nop dword [eax]
mov edi, eax
mov ecx, 0xba
mov esi, ebp
add eax, 0x2e8
rep movsd dword es:[edi], dword [esi]
sub edx, 1
jne 0x5d2430
mov ebp, dword [esp + 0x14]
push ebp
call fcn.005d1500
mov ecx, dword [esp + 0x40]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0058f0d5
add esp, 0x30
ret