Function at 0x596e30
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x5c
cmp dword [esp + 0x70], 0
movups xmmword [esp + 0x1c], xmm0
mov dword [esp + 4], edx
je 0x597353
movups xmm1, xmmword [esp + 0x1c]
mov ebp, dword [esp + 0x74]
xorps xmm0, xmm0
mov dword [esp + 0xc], ecx
ucomiss xmm1, xmm0
jbe 0x59701a
mov esi, dword [esp + 4]
mov edi, dword [esp + 0xc]
test esi, esi
je 0x596f52
mov eax, esi
xorps xmm0, xmm0
mov ecx, edi
shl eax, 4
movsd xmm1, qword [eax + edi - 0x10]
nop word cs:[eax + eax]
nop
movsd xmm2, qword [ecx]
add ecx, 0x10
add eax, 0xfffffff0
movaps xmm3, xmm2
shufps xmm3, xmm2, 0xe1
mulps xmm3, xmm1
movaps xmm1, xmm3
shufps xmm1, xmm3, 0x55
subss xmm3, xmm1
xorps xmm1, xmm1
cvtss2sd xmm1, xmm3
addsd xmm0, xmm1
movaps xmm1, xmm2
jne 0x596e90
xorps xmm1, xmm1
ucomisd xmm1, xmm0
jbe 0x596f52
cmp esi, 2
jb 0x596f25
mov ecx, esi
mov eax, esi
mov edx, edi
shl ecx, 4
shr eax, 1
lea ecx, [ecx + edi - 0x10]
movsd xmm0, qword [edx]
movsd xmm1, qword [edx + 8]
movsd qword [esp + 0x54], xmm1
movsd qword [esp + 0x4c], xmm0
movsd xmm0, qword [ecx]
movsd xmm1, qword [ecx + 8]
movsd qword [edx + 8], xmm1
movsd qword [edx], xmm0
add edx, 0x10
movsd xmm0, qword [esp + 0x4c]
movsd xmm1, qword [esp + 0x54]
movsd qword [ecx + 8], xmm1
movsd qword [ecx], xmm0
add ecx, 0xfffffff0
dec eax
jne 0x596ee0
movaps xmm0, xmmword [0x725630]
mov ecx, esi
lea eax, [edi + 8]
shl ecx, 4
nop word cs:[eax + eax]
nop
movsd xmm1, qword [eax]
xorps xmm1, xmm0
movlps qword [eax], xmm1
add eax, 0x10
add ecx, 0xfffffff0
jne 0x596f40
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x18]
lea eax, [ebp + 0x10]
mov dword [esp], eax
lea eax, [esi + esi*8]
sub ecx, edx
cmp ecx, eax
jb 0x597117
mov edx, dword [ebp + 0x24]
mov edi, dword [ebp + 0x20]
lea eax, [esi + esi]
lea ecx, [ebp + 0x1c]
mov dword [esp + 0x14], ecx
sub edi, edx
mov dword [esp + 8], edx
cmp edi, eax
jb 0x597128
cmp esi, 3
jb 0x597149
mov eax, dword [esp + 8]
mov ecx, dword [esp + 4]
mov edx, dword [ebp + 0x18]
lea esi, [eax + 4]
lea ebx, [ecx - 2]
jmp 0x596fc7
mov eax, dword [ebp + 0x10]
mov dword [eax + edx*4], esi
add esi, 2
mov edx, dword [ebp + 0x18]
inc edx
dec ebx
mov dword [ebp + 0x18], edx
je 0x597149
cmp edx, dword [ebp + 0x14]
lea edi, [esi - 2]
jne 0x596fda
mov ecx, dword [esp]
call fcn.005a6860
mov edx, dword [ebp + 0x18]
mov eax, dword [ebp + 0x10]
mov dword [eax + edx*4], edi
mov edx, dword [ebp + 0x18]
inc edx
mov dword [ebp + 0x18], edx
cmp edx, dword [ebp + 0x14]
jne 0x596ff7
mov ecx, dword [esp]
call fcn.005a6860
mov edx, dword [ebp + 0x18]
mov eax, dword [ebp + 0x10]
mov ecx, dword [esp + 8]
mov dword [eax + edx*4], ecx
mov edx, dword [ebp + 0x18]
inc edx
mov dword [ebp + 0x18], edx
cmp edx, dword [ebp + 0x14]
jne 0x596fb0
mov ecx, dword [esp]
call fcn.005a6860
mov edx, dword [ebp + 0x18]
jmp 0x596fb0
mov esi, dword [esp + 4]
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x18]
mov edi, dword [esp + 0xc]
lea ebx, [ebp + 0x10]
lea eax, [esi + esi*2]
sub ecx, edx
cmp ecx, eax
jb 0x597326
mov ecx, dword [ebp + 0x24]
mov eax, dword [ebp + 0x20]
sub eax, ecx
mov dword [esp], ecx
cmp eax, esi
mov eax, ecx
jb 0x597336
test esi, esi
je 0x597350
lea edx, [eax + eax*4]
mov ecx, dword [ebp + 0x1c]
add eax, esi
xorps xmm0, xmm0
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x70]
lea ecx, [ecx + edx*4 + 0x10]
mov edx, esi
nop
movsd xmm1, qword [edi]
add edi, 0x10
movsd qword [ecx - 0x10], xmm1
movlps qword [ecx - 8], xmm0
mov dword [ecx], eax
add ecx, 0x14
dec edx
jne 0x597070
mov eax, dword [esp + 0x10]
cmp esi, 3
mov dword [ebp + 0x24], eax
jb 0x597353
mov eax, dword [esp]
mov edx, dword [ebp + 0x18]
add dword [esp + 4], 0xfffffffe
lea esi, [eax + 2]
jmp 0x5970c8
mov eax, dword [ebp + 0x10]
mov dword [eax + edx*4], esi
inc esi
mov edx, dword [ebp + 0x18]
inc edx
dec dword [esp + 4]
mov dword [ebp + 0x18], edx
je 0x597353
cmp edx, dword [ebp + 0x14]
jne 0x5970d7
mov ecx, ebx
call fcn.005a6860
mov edx, dword [ebp + 0x18]
mov eax, dword [ebp + 0x10]
mov ecx, dword [esp]
lea edi, [esi - 1]
mov dword [eax + edx*4], ecx
mov edx, dword [ebp + 0x18]
inc edx
mov dword [ebp + 0x18], edx
cmp edx, dword [ebp + 0x14]
jne 0x5970f9
mov ecx, ebx
call fcn.005a6860
mov edx, dword [ebp + 0x18]
mov eax, dword [ebp + 0x10]
mov dword [eax + edx*4], edi
mov edx, dword [ebp + 0x18]
inc edx
mov dword [ebp + 0x18], edx
cmp edx, dword [ebp + 0x14]
jne 0x5970b0
mov ecx, ebx
call fcn.005a6860
mov edx, dword [ebp + 0x18]
jmp 0x5970b0
mov ecx, dword [esp]
push eax
call fcn.0071bb70
add esp, 4
jmp 0x596f6b
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 8]
push eax
call fcn.0071bac0
add esp, 4
mov eax, dword [ebp + 0x24]
mov dword [esp + 8], eax
cmp esi, 3
jae 0x596f92
cmp dword [esp + 4], 0
mov ecx, dword [esp + 0xc]
je 0x597353
movups xmm0, xmmword [esp + 0x1c]
mov esi, dword [esp + 8]
mov edx, dword [esp + 4]
xor edi, edi
mulss xmm0, dword [0x725640]
lea eax, [esi + 1]
lea ebx, [edx - 1]
mov dword [esp + 0x18], eax
shufps xmm0, xmm0, 0
movups xmmword [esp + 0x1c], xmm0
jmp 0x5971b1
mov eax, dword [ebp + 0x10]
mov ecx, dword [esp + 0xc]
mov ebx, dword [esp + 0x10]
mov dword [eax + edx*4], esi
inc dword [ebp + 0x18]
add esi, 2
add ecx, 0x10
cmp dword [esp + 4], edi
je 0x597353
mov edx, dword [ebp + 0x24]
movsd xmm2, qword [ecx]
movsd xmm1, qword [ecx + 8]
mov dword [esp + 0x10], edi
mov edi, ecx
cmp edx, dword [ebp + 0x20]
jne 0x5971e8
mov ecx, dword [esp + 0x14]
movups xmmword [esp + 0x3c], xmm1
movups xmmword [esp + 0x2c], xmm2
call fcn.00486040
movups xmm2, xmmword [esp + 0x2c]
movups xmm1, xmmword [esp + 0x3c]
mov edx, dword [ebp + 0x24]
movups xmm0, xmmword [esp + 0x1c]
lea ecx, [edx + edx*4]
mov eax, dword [ebp + 0x1c]
mov edx, dword [esp + 0x70]
mulps xmm1, xmm0
xorps xmm0, xmm0
subps xmm2, xmm1
movlps qword [eax + ecx*4], xmm2
movlps qword [eax + ecx*4 + 8], xmm0
mov dword [eax + ecx*4 + 0x10], edx
mov edx, dword [ebp + 0x24]
inc edx
mov dword [ebp + 0x24], edx
movsd xmm0, qword [edi]
cmp edx, dword [ebp + 0x20]
jne 0x59723d
mov ecx, dword [esp + 0x14]
movups xmmword [esp + 0x3c], xmm1
movups xmmword [esp + 0x2c], xmm0
call fcn.00486040
movups xmm0, xmmword [esp + 0x2c]
movups xmm1, xmmword [esp + 0x3c]
mov edx, dword [ebp + 0x24]
mov eax, dword [ebp + 0x1c]
addps xmm1, xmm0
lea ecx, [edx + edx*4]
xorps xmm0, xmm0
movlps qword [eax + ecx*4], xmm1
movlps qword [eax + ecx*4 + 8], xmm0
mov dword [eax + ecx*4 + 0x10], 0
inc dword [ebp + 0x24]
mov edx, dword [ebp + 0x18]
cmp edx, dword [ebp + 0x14]
jne 0x597270
mov ecx, dword [esp]
call fcn.005a6860
mov edx, dword [ebp + 0x18]
mov eax, dword [ebp + 0x10]
mov dword [eax + edx*4], esi
mov edx, dword [ebp + 0x18]
inc edx
mov dword [ebp + 0x18], edx
cmp edx, dword [ebp + 0x14]
jne 0x59728d
mov ecx, dword [esp]
call fcn.005a6860
mov edx, dword [ebp + 0x18]
mov eax, dword [esp + 8]
mov ecx, dword [ebp + 0x10]
mov dword [esp + 0xc], edi
lea eax, [eax + ebx*2]
mov dword [ecx + edx*4], eax
mov edx, dword [ebp + 0x18]
inc edx
mov dword [ebp + 0x18], edx
cmp edx, dword [ebp + 0x14]
jne 0x5972b5
mov ecx, dword [esp]
call fcn.005a6860
mov edx, dword [ebp + 0x18]
mov eax, dword [esp + 0x18]
mov ecx, dword [ebp + 0x10]
lea edi, [eax + ebx*2]
mov dword [ecx + edx*4], edi
mov edx, dword [ebp + 0x18]
inc edx
mov dword [ebp + 0x18], edx
cmp edx, dword [ebp + 0x14]
jne 0x5972d9
mov ecx, dword [esp]
call fcn.005a6860
mov edx, dword [ebp + 0x18]
mov eax, dword [ebp + 0x10]
lea ebx, [esi + 1]
mov dword [eax + edx*4], edi
mov edx, dword [ebp + 0x18]
inc edx
mov dword [ebp + 0x18], edx
cmp edx, dword [ebp + 0x14]
jne 0x5972f9
mov ecx, dword [esp]
call fcn.005a6860
mov edx, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x10]
mov eax, dword [esp + 0x10]
mov dword [ecx + edx*4], ebx
lea edi, [eax + 1]
mov edx, dword [ebp + 0x18]
inc edx
mov dword [ebp + 0x18], edx
cmp edx, dword [ebp + 0x14]
jne 0x597190
mov ecx, dword [esp]
call fcn.005a6860
mov edx, dword [ebp + 0x18]
jmp 0x597190
mov ecx, ebx
push eax
call fcn.0071bb70
add esp, 4
jmp 0x597038
mov edx, dword [esp]
lea ecx, [ebp + 0x1c]
push esi
call fcn.0071bac0
add esp, 4
mov eax, dword [ebp + 0x24]
test esi, esi
jne 0x597055
mov dword [ebp + 0x24], eax
add esp, 0x5c
pop esi
pop edi
pop ebx
pop ebp
ret