Function at 0x4595c0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x50
mov eax, ecx
mov dword [esp + 0x10], edx
mov edx, dword [ebp + 0x24]
mov ecx, dword [ebp + 0x18]
mov dword [esp + 0x1c], edx
mov edx, dword [eax]
push esi
mov esi, dword [ebp + 8]
mov dword [esp + 0x2c], edx
mov edx, dword [eax + 0x18]
push edi
mov edi, dword [ebp + 0xc]
mov dword [esp + 0x2c], ecx
mov ecx, dword [ebp + 0x20]
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0x18]
mov dword [esp + 0x10], eax
mov dword [esp + 0x28], ecx
cmp edi, 1
jne 0x459619
push ecx
push ecx
push esi
mov ecx, eax
call fcn.004589e0
add esp, 0xc
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0x28]
mov dword [esp + 0x14], ecx
lea ecx, [ebp + 0x28]
push ecx
mov ecx, dword [ebp + 0x14]
push 1
push dword [ebp + 0x1c]
push ecx
push ecx
lea ecx, [ebp + 0x10]
push ecx
push edi
push esi
push edx
lea edx, [esp + 0x64]
mov ecx, eax
call fcn.004580f0
movd xmm1, dword [esp + 0x68]
add esp, 0x24
cvtdq2ps xmm1, xmm1
mulss xmm1, dword [0x52d520]
movss dword [esp + 0x38], xmm1
movd xmm1, dword [esp + 0x48]
cvtdq2ps xmm1, xmm1
mulss xmm1, dword [0x52d520]
movss dword [esp + 0x34], xmm1
cmp edi, 2
jne 0x459813
mov eax, dword [esp + 0x50]
xor ecx, ecx
test eax, eax
je 0x459691
cmp eax, 0x4000
mov edx, 8
cmovne ecx, edx
mov eax, dword [ebp + 0x10]
mov edx, dword [esp + 0x10]
sub eax, ecx
mov edi, dword [esp + 0x18]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x54]
add eax, ecx
sub dword [edx + 0x1c], eax
mov edx, esi
cmp dword [esp + 0x50], 0x2000
cmovg edx, dword [esp + 0x18]
cmovg edi, esi
mov dword [esp + 0xc], edi
mov edi, dword [ebp + 0xc]
mov dword [esp + 0x3c], edx
test ecx, ecx
je 0x45971e
cmp dword [esp + 0x30], 0
mov ecx, dword [esp + 0x1c]
je 0x459712
mov eax, dword [esp + 0xc]
movss xmm1, dword [edx + 4]
push 1
movss xmm0, dword [eax + 4]
mulss xmm1, dword [eax]
xor eax, eax
mulss xmm0, dword [edx]
subss xmm1, xmm0
xorps xmm0, xmm0
comiss xmm0, xmm1
seta al
mov edx, eax
mov dword [esp + 0x24], eax
call fcn.004475c0
mov eax, dword [esp + 0x24]
add esp, 4
jmp 0x459720
mov edx, 1
call fcn.0044e660
jmp 0x459720
xor eax, eax
push dword [esp + 0x14]
mov edx, dword [ebp + 0x14]
add eax, eax
push dword [esp + 0x28]
mov ecx, 1
sub ecx, eax
push ecx
mov dword [esp], 0x3f800000
push dword [esp + 0x34]
mov dword [esp + 0x30], ecx
push dword [ebp + 0x1c]
mov ecx, dword [esp + 0x24]
push dword [esp + 0x40]
push edx
push dword [esp + 0x24]
mov edx, dword [esp + 0x2c]
push 2
call fcn.00459060
mov edx, dword [esp + 0x44]
add esp, 0x24
mov ecx, edx
mov dword [esp + 8], eax
mov eax, dword [esp + 0xc]
neg ecx
cmp dword [esp + 0x30], 0
movd xmm0, ecx
mov ecx, dword [esp + 0x3c]
cvtdq2ps xmm0, xmm0
mulss xmm0, dword [eax + 4]
movss dword [ecx], xmm0
movd xmm0, edx
cvtdq2ps xmm0, xmm0
mulss xmm0, dword [eax]
movss dword [ecx + 4], xmm0
jne 0x459a72
mov eax, dword [esp + 0x18]
movss xmm1, dword [esp + 0x38]
movaps xmm0, xmm1
mulss xmm0, dword [eax]
mulss xmm1, dword [eax + 4]
movss dword [eax], xmm0
movss xmm0, dword [esp + 0x34]
movss dword [eax + 4], xmm1
movaps xmm2, xmm0
mulss xmm0, dword [esi + 4]
mulss xmm2, dword [esi]
movss dword [esi + 4], xmm0
movss dword [esi], xmm2
movss xmm1, dword [eax]
movaps xmm0, xmm1
subss xmm0, xmm2
movss dword [eax], xmm0
addss xmm1, dword [esi]
movss dword [esi], xmm1
movss xmm1, dword [eax + 4]
movaps xmm0, xmm1
subss xmm0, dword [esi + 4]
movss dword [eax + 4], xmm0
addss xmm1, dword [esi + 4]
movss dword [esi + 4], xmm1
jmp 0x459989
mov eax, dword [ebp + 0x10]
sub eax, dword [esp + 0x4c]
cdq
sub eax, edx
mov edx, dword [ebp + 0x10]
sar eax, 1
cmp edx, eax
mov ecx, eax
cmovl ecx, edx
test ecx, ecx
jns 0x459831
xor eax, eax
jmp 0x459836
cmp edx, eax
cmovl eax, edx
mov ecx, dword [esp + 0x10]
sub edx, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], edx
mov edi, dword [ecx + 0x1c]
sub edi, dword [esp + 0x54]
mov dword [esp + 0x20], edi
mov dword [ecx + 0x1c], edi
mov edi, dword [ebp + 0xc]
cmp eax, edx
jl 0x4598e3
mov edx, dword [ebp + 0x28]
push edx
push dword [esp + 0x28]
mov dword [esp + 0x24], edx
mov edx, dword [ebp + 0x1c]
push ecx
mov dword [esp], 0x3f800000
push dword [esp + 0x34]
push edx
push dword [esp + 0x40]
mov edx, dword [ebp + 0x14]
push edx
mov edx, dword [esp + 0x34]
push eax
push edi
call fcn.00459060
mov ecx, dword [esp + 0x34]
add esp, 0x24
mov edx, dword [esp + 0xc]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x14]
sub eax, dword [esp + 0x20]
add eax, dword [ecx + 0x1c]
cmp eax, 0x18
jle 0x4598b7
cmp dword [esp + 0x50], 0
je 0x4598b7
add edx, 0xffffffe8
add edx, eax
mov eax, dword [ebp + 0x14]
mov ecx, eax
sar dword [esp + 0x1c], cl
push dword [esp + 0x1c]
movss xmm0, dword [esp + 0x38]
push 0
push ecx
mov ecx, dword [esp + 0x1c]
movss dword [esp], xmm0
push 0
push dword [ebp + 0x1c]
push 0
push eax
push edx
mov edx, esi
jmp 0x45995b
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp + 0x28]
sar eax, cl
push eax
push 0
push ecx
movss dword [esp], xmm1
push 0
push dword [ebp + 0x1c]
push 0
push ecx
mov ecx, dword [esp + 0x2c]
push edx
push edi
mov edx, esi
call fcn.00459060
mov ecx, dword [esp + 0x34]
add esp, 0x24
mov edx, dword [esp + 0xc]
sub edx, dword [esp + 0x20]
mov dword [esp + 8], eax
add edx, dword [ecx + 0x1c]
mov eax, dword [esp + 0x14]
cmp edx, 0x18
jle 0x459937
cmp dword [esp + 0x50], 0x4000
je 0x459937
add eax, 0xffffffe8
add eax, edx
push dword [ebp + 0x28]
mov edx, dword [ebp + 0x1c]
push dword [esp + 0x28]
push ecx
mov dword [esp], 0x3f800000
push dword [esp + 0x34]
push edx
push dword [esp + 0x40]
mov edx, dword [ebp + 0x14]
push edx
mov edx, dword [esp + 0x34]
push eax
push edi
call fcn.00459060
or dword [esp + 0x2c], eax
add esp, 0x24
cmp dword [esp + 0x30], 0
jne 0x459a72
movss xmm2, dword [esp + 0x38]
mov edx, esi
push ecx
mov ecx, dword [esp + 0x1c]
push edi
call fcn.004576c0
add esp, 8
cmp dword [esp + 0x40], 0
je 0x459a72
xor ecx, ecx
test edi, edi
jle 0x459a72
movaps xmm2, xmmword [0x52db30]
cmp edi, 2
jb 0x459a1b
cmp edi, 0x10
jb 0x4599fe
mov edx, edi
lea eax, [esi + 0x20]
and edx, 0xfffffff0
nop word [eax + eax]
movups xmm0, xmmword [eax - 0x20]
add ecx, 0x10
lea eax, [eax + 0x40]
xorps xmm0, xmm2
movups xmmword [eax - 0x60], xmm0
movups xmm0, xmmword [eax - 0x50]
xorps xmm0, xmm2
movups xmmword [eax - 0x50], xmm0
movups xmm0, xmmword [eax - 0x40]
xorps xmm0, xmm2
movups xmmword [eax - 0x40], xmm0
movups xmm0, xmmword [eax - 0x30]
xorps xmm0, xmm2
movups xmmword [eax - 0x30], xmm0
cmp ecx, edx
jl 0x4599c0
mov eax, edi
and al, 0xf
cmp al, 2
jb 0x459a17
mov eax, edi
and eax, 0xfffffffe
movsd xmm0, qword [esi + ecx*4]
xorps xmm0, xmm2
movsd qword [esi + ecx*4], xmm0
add ecx, 2
cmp ecx, eax
jl 0x459a03
cmp ecx, edi
jge 0x459a72
mov eax, edi
sub eax, ecx
cmp eax, 4
jl 0x459a60
mov edx, edi
lea eax, [esi + 8]
sub edx, ecx
lea eax, [eax + ecx*4]
sub edx, 4
shr edx, 2
inc edx
lea ecx, [ecx + edx*4]
nop dword [eax + eax]
lea eax, [eax + 0x10]
movups xmm0, xmmword [eax - 0x18]
xorps xmm0, xmm2
movups xmmword [eax - 0x18], xmm0
sub edx, 1
jne 0x459a40
cmp ecx, edi
jge 0x459a72
nop word [eax + eax]
movss xmm0, dword [esi + ecx*4]
xorps xmm0, xmm2
movss dword [esi + ecx*4], xmm0
inc ecx
cmp ecx, edi
jl 0x459a60
mov eax, dword [esp + 8]
pop edi
pop esi
mov esp, ebp
pop ebp
ret