Function at 0x10080820
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
push edi
lea eax, [ecx + 1]
cdq
sub eax, edx
cmp dword [ebp + 0x10], 4
jne 0x1008097b
mov edi, eax
mov edx, 1
sar edi, 1
mov dword [ebp + 0x10], edi
cmp edi, edx
jle 0x1008090f
movss xmm1, dword [0x101a2400]
lea ecx, [edi - 1]
cmp ecx, 4
jl 0x100808db
mov eax, dword [ebp + 0xc]
lea ecx, [esi + 0xc]
add eax, 0xfffffffe
lea edi, [esi + eax*8]
mov eax, dword [ebp + 0x10]
add eax, 0xfffffffb
shr eax, 2
inc eax
mov esi, eax
lea edx, [eax*4 + 1]
nop
mov eax, dword [ecx - 8]
lea ecx, [ecx + 0x20]
mov dword [edi + 8], eax
lea edi, [edi - 0x20]
movss xmm0, dword [ecx - 0x24]
xorps xmm0, xmm1
movss dword [edi + 0x2c], xmm0
mov eax, dword [ecx - 0x20]
mov dword [edi + 0x20], eax
movss xmm0, dword [ecx - 0x1c]
xorps xmm0, xmm1
movss dword [edi + 0x24], xmm0
mov eax, dword [ecx - 0x18]
mov dword [edi + 0x18], eax
movss xmm0, dword [ecx - 0x14]
xorps xmm0, xmm1
movss dword [edi + 0x1c], xmm0
mov eax, dword [ecx - 0x10]
mov dword [edi + 0x10], eax
movss xmm0, dword [ecx - 0xc]
xorps xmm0, xmm1
movss dword [edi + 0x14], xmm0
dec esi
jne 0x10080880
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0x10]
cmp edx, edi
jge 0x1008090c
mov eax, dword [ebp + 0xc]
sub eax, edx
lea ecx, [esi + eax*8]
jmp 0x100808f0
mov eax, dword [esi + edx*8 - 4]
lea ecx, [ecx - 8]
mov dword [ecx + 8], eax
movss xmm0, dword [esi + edx*8]
inc edx
xorps xmm0, xmm1
movss dword [ecx + 0xc], xmm0
cmp edx, edi
jl 0x100808f0
mov ecx, dword [ebp + 0xc]
test cl, 1
jne 0x10080924
mov eax, dword [esi + ecx*4 - 4]
mov dword [esi + ecx*4], eax
mov dword [esi + ecx*4 + 4], 0
dec ecx
lea edx, [ecx - 1]
cmp edx, 4
jl 0x1008095e
lea edi, [edx - 4]
shr edi, 2
lea ecx, [edx - 1]
inc edi
lea ecx, [esi + ecx*4]
mov eax, edi
neg eax
lea edx, [edx + eax*4]
mov eax, dword [ecx + 4]
lea ecx, [ecx - 0x10]
mov dword [ecx + 0x18], eax
mov eax, dword [ecx + 0x10]
mov dword [ecx + 0x14], eax
mov eax, dword [ecx + 0xc]
mov dword [ecx + 0x10], eax
mov eax, dword [ecx + 8]
mov dword [ecx + 0xc], eax
dec edi
jne 0x10080940
test edx, edx
jle 0x1008096e
mov eax, dword [esi + edx*4]
mov dword [esi + edx*4 + 4], eax
dec edx
test edx, edx
jg 0x10080962
pop edi
mov dword [esi + 4], 0
pop esi
mov esp, ebp
pop ebp
ret
mov edx, eax
mov eax, 1
sar edx, 1
mov dword [ebp + 0x10], eax
cmp edx, eax
jle 0x10080a83
movsd xmm1, qword [0x101a23f0]
lea ecx, [edx - 1]
mov edi, dword [ebp + 0xc]
cmp ecx, 4
jl 0x10080a3e
lea ecx, [esi + 0x18]
lea eax, [edi - 2]
shl eax, 4
add eax, esi
lea esi, [edx - 5]
shr esi, 2
inc esi
mov dword [ebp - 4], esi
lea esi, [esi*4 + 1]
mov dword [ebp + 0x10], esi
mov esi, dword [ebp + 8]
jmp 0x100809d0
dec dword [ebp - 4]
lea ecx, [ecx + 0x40]
movsd xmm0, qword [ecx - 0x50]
lea eax, [eax - 0x40]
movsd qword [eax + 0x50], xmm0
movsd xmm0, qword [ecx - 0x48]
xorpd xmm0, xmm1
movsd qword [eax + 0x58], xmm0
movsd xmm0, qword [ecx - 0x40]
movsd qword [eax + 0x40], xmm0
movsd xmm0, qword [ecx - 0x38]
xorpd xmm0, xmm1
movsd qword [eax + 0x48], xmm0
movsd xmm0, qword [ecx - 0x30]
movsd qword [eax + 0x30], xmm0
movsd xmm0, qword [ecx - 0x28]
xorpd xmm0, xmm1
movsd qword [eax + 0x38], xmm0
movsd xmm0, qword [ecx - 0x20]
movsd qword [eax + 0x20], xmm0
movsd xmm0, qword [ecx - 0x18]
xorpd xmm0, xmm1
movsd qword [eax + 0x28], xmm0
jne 0x100809d0
mov eax, dword [ebp + 0x10]
cmp eax, edx
jge 0x10080a80
mov ecx, eax
mov eax, edi
sub eax, dword [ebp + 0x10]
shl ecx, 4
shl eax, 4
add ecx, esi
add eax, esi
sub edx, dword [ebp + 0x10]
jmp 0x10080a60
movsd xmm0, qword [ecx - 8]
lea ecx, [ecx + 0x10]
movsd qword [eax], xmm0
lea eax, [eax - 0x10]
movsd xmm0, qword [ecx - 0x10]
xorpd xmm0, xmm1
movsd qword [eax + 0x18], xmm0
dec edx
jne 0x10080a60
mov ecx, dword [ebp + 0xc]
xorps xmm1, xmm1
test cl, 1
jne 0x10080a9d
movsd xmm0, qword [esi + ecx*8 - 8]
movsd qword [esi + ecx*8], xmm0
movsd qword [esi + ecx*8 + 8], xmm1
dec ecx
lea edx, [ecx - 1]
cmp edx, 4
jl 0x10080ad6
lea edi, [edx - 4]
shr edi, 2
lea ecx, [edx - 1]
inc edi
lea ecx, [esi + ecx*8]
mov eax, edi
neg eax
lea edx, [edx + eax*4]
lea esp, [esp]
lea ecx, [ecx - 0x20]
movups xmm0, xmmword [ecx + 0x20]
movups xmmword [ecx + 0x28], xmm0
movups xmm0, xmmword [ecx + 0x10]
movups xmmword [ecx + 0x18], xmm0
dec edi
jne 0x10080ac0
test edx, edx
jle 0x10080af0
lea ebx, [ebx]
movsd xmm0, qword [esi + edx*8]
movsd qword [esi + edx*8 + 8], xmm0
dec edx
test edx, edx
jg 0x10080ae0
pop edi
movsd qword [esi + 8], xmm1
pop esi
mov esp, ebp
pop ebp
ret