Function at 0x5923a0
Capabilities:
Encode data using xor

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x38
mov eax, edx
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0xc], eax
cdq
and edx, 3
add eax, edx
sar eax, 2
push esi
push edi
mov dword [ebp - 0x14], eax
lea esi, [eax*4]
push esi
mov esi, dword [0x5a470c]
call esi
mov ecx, dword [ebp - 0x14]
mov edi, eax
add ecx, dword [ebp - 0xc]
shl ecx, 2
push ecx
mov dword [ebp - 0x1c], edi
call esi
mov esi, dword [ebp - 0xc]
mov dword [ebp - 4], eax
mov eax, esi
sar eax, 1
mov dword [ebp - 0x24], eax
movd xmm0, esi
cvtdq2ps xmm0, xmm0
movss dword [ebp - 8], xmm0
cvtps2pd xmm0, xmm0
call fcn.00580ebd
movsd qword [ebp - 0x38], xmm0
movsd xmm0, qword [0x5c71f8]
call fcn.00580ebd
movsd xmm1, qword [ebp - 0x38]
divsd xmm1, xmm0
addsd xmm1, qword [0x5c7198]
movsd qword [ebp - 0x38], xmm1
fld qword [ebp - 0x38]
fstp qword [esp]
call fcn.00580e87
add esp, 8
call fcn.005932b0
mov edx, dword [ebp - 0x20]
mov ecx, dword [ebp - 4]
movss xmm1, dword [0x5c7390]
mov dword [ebp - 0x34], eax
mov dword [edx], esi
xor esi, esi
mov dword [edx + 4], eax
mov dword [edx + 8], ecx
mov dword [edx + 0xc], edi
cmp dword [ebp - 0x14], esi
jle 0x592557
mov eax, dword [ebp - 0xc]
movaps xmm2, xmm1
divss xmm2, dword [ebp - 8]
add eax, eax
mov edx, dword [ebp - 0x24]
mov dword [ebp - 0x10], 1
lea edi, [ecx + edx*4]
movd xmm0, eax
xor eax, eax
cvtdq2ps xmm0, xmm0
mov dword [ebp - 0x18], eax
movss dword [ebp - 0x30], xmm2
divss xmm1, xmm0
movss dword [ebp - 0x2c], xmm1
nop word [eax + eax]
movd xmm0, eax
cvtdq2ps xmm0, xmm0
mulss xmm0, xmm2
cvtps2pd xmm0, xmm0
movsd qword [ebp - 0x28], xmm0
call fcn.00580eab
mov eax, dword [ebp - 4]
xorps xmm1, xmm1
cvtsd2ss xmm1, xmm0
movsd xmm0, qword [ebp - 0x28]
movss dword [eax + esi*8], xmm1
call fcn.00580ec3
xorps xmm0, xmmword [0x5c7700]
mov eax, dword [ebp - 4]
cvtsd2ss xmm0, xmm0
movss dword [eax + esi*8 + 4], xmm0
movd xmm0, dword [ebp - 0x10]
cvtdq2ps xmm0, xmm0
mulss xmm0, dword [ebp - 0x2c]
cvtps2pd xmm0, xmm0
movsd qword [ebp - 0x28], xmm0
call fcn.00580eab
xorps xmm1, xmm1
cvtsd2ss xmm1, xmm0
movsd xmm0, qword [ebp - 0x28]
movss dword [edi], xmm1
call fcn.00580ec3
mov eax, dword [ebp - 0x18]
lea edi, [edi + 8]
add dword [ebp - 0x10], 2
inc esi
movss xmm2, dword [ebp - 0x30]
add eax, 4
cvtsd2ss xmm0, xmm0
mov dword [ebp - 0x18], eax
movss dword [edi - 4], xmm0
cmp esi, dword [ebp - 0x14]
jl 0x5924b0
movss xmm1, dword [0x5c7390]
mov ecx, dword [ebp - 4]
mov esi, dword [ebp - 0xc]
mov eax, esi
cdq
and edx, 7
add eax, edx
sar eax, 3
mov dword [ebp - 0x2c], eax
test eax, eax
jle 0x592661
divss xmm1, dword [ebp - 8]
mov edi, 2
mov dword [ebp - 0x18], eax
lea esi, [ecx + esi*4]
movss dword [ebp - 0x30], xmm1
xorps xmm0, xmm0
cvtsi2ss xmm0, edi
mulss xmm0, xmm1
cvtps2pd xmm0, xmm0
movsd qword [ebp - 0x28], xmm0
call fcn.00580eab
mulsd xmm0, qword [0x5c7198]
xorps xmm1, xmm1
cvtsd2ss xmm1, xmm0
movsd xmm0, qword [ebp - 0x28]
movss dword [esi], xmm1
call fcn.00580ec3
xorps xmm0, xmmword [0x5c7700]
lea esi, [esi + 8]
mulsd xmm0, qword [0x5c7198]
add edi, 4
sub dword [ebp - 0x18], 1
movss xmm1, dword [ebp - 0x30]
cvtsd2ss xmm0, xmm0
movss dword [esi - 4], xmm0
jne 0x592585
mov eax, dword [ebp - 0x34]
mov edi, 1
mov esi, edi
mov dword [ebp - 0x14], 0
lea ecx, [eax - 2]
shl esi, cl
lea ecx, [eax - 1]
shl edi, cl
mov eax, esi
mov dword [ebp - 0x10], esi
dec edi
mov dword [ebp - 4], eax
xor ecx, ecx
xor edx, edx
mov dword [ebp - 0x18], ecx
test eax, eax
je 0x59263a
mov eax, esi
mov ecx, dword [ebp - 4]
mov dword [ebp - 4], ecx
mov ecx, dword [ebp - 0x18]
test dword [ebp - 0x14], eax
je 0x592625
bts edx, ecx
inc ecx
mov eax, esi
sar eax, cl
mov dword [ebp - 0x18], ecx
test eax, eax
jne 0x592614
mov eax, dword [ebp - 4]
mov dword [ebp - 4], eax
mov dword [ebp - 0x10], esi
mov ecx, dword [ebp - 0x14]
mov eax, edx
mov esi, dword [ebp - 0x1c]
not eax
and eax, edi
dec eax
mov dword [esi + ecx*8], eax
mov eax, esi
mov esi, dword [ebp - 0x10]
mov dword [eax + ecx*8 + 4], edx
inc ecx
mov eax, dword [ebp - 4]
mov dword [ebp - 0x14], ecx
cmp ecx, dword [ebp - 0x2c]
jl 0x592607
jmp 0x59266b
movss xmm0, dword [ebp - 8]
movss dword [ebp - 8], xmm0
movss xmm0, dword [0x5c7400]
divss xmm0, dword [ebp - 8]
mov ecx, dword [ebp - 0x20]
pop edi
pop esi
movss dword [ecx + 0x10], xmm0
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret