Function at 0x4982b0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 0xc]
sub esp, 0x24
mov eax, edx
push ebx
mov ebx, dword [ebp + 8]
sub eax, ebx
and eax, 0xfffffff0
push esi
push edi
cmp eax, 0x200
jle 0x498562
mov eax, edx
sub eax, ebx
cmp dword [ebp + 0x10], 0
mov dword [ebp - 0x14], eax
jle 0x4985c0
push dword [ebp + 0x14]
sar eax, 5
add eax, eax
lea esi, [ebx + eax*8]
lea eax, [edx - 0x10]
push eax
push esi
push ebx
call fcn.00497eb0
add esp, 0x10
lea edi, [esi + 0x10]
cmp ebx, esi
jae 0x49832b
movsd xmm1, qword [esi]
nop word [eax + eax]
movsd xmm0, qword [esi - 0x10]
comisd xmm1, xmm0
ja 0x49832b
comisd xmm0, xmm1
ja 0x49832b
add esi, 0xfffffff0
movaps xmm1, xmm0
cmp ebx, esi
jb 0x498310
mov eax, dword [ebp + 0xc]
cmp edi, eax
jae 0x49834d
movsd xmm1, qword [esi]
movsd xmm0, qword [edi]
comisd xmm1, xmm0
ja 0x49834d
comisd xmm0, xmm1
ja 0x49834d
add edi, 0x10
cmp edi, eax
jb 0x498336
mov eax, edi
mov edx, esi
mov ecx, dword [ebp + 0xc]
cmp eax, ecx
jae 0x4983a5
nop dword [eax + eax]
movsd xmm0, qword [esi]
movsd xmm1, qword [eax]
comisd xmm1, xmm0
ja 0x49839e
comisd xmm0, xmm1
ja 0x4983a5
mov ecx, dword [ebp + 0xc]
cmp edi, eax
je 0x49839b
movsd xmm0, qword [edi]
movsd qword [edi], xmm1
movsd qword [eax], xmm0
movsd xmm0, qword [eax + 8]
movsd xmm1, qword [edi + 8]
movsd qword [edi + 8], xmm0
movsd qword [eax + 8], xmm1
add edi, 0x10
add eax, 0x10
cmp eax, ecx
jb 0x498360
cmp edx, ebx
jbe 0x4983fa
lea ecx, [edx - 0x10]
nop dword [eax]
movsd xmm1, qword [ecx]
movsd xmm0, qword [esi]
comisd xmm0, xmm1
ja 0x4983eb
comisd xmm1, xmm0
ja 0x4983f5
sub esi, 0x10
cmp esi, ecx
je 0x4983eb
movsd xmm0, qword [esi]
movsd qword [esi], xmm1
movsd qword [ecx], xmm0
movsd xmm0, qword [ecx + 8]
movsd xmm1, qword [esi + 8]
movsd qword [esi + 8], xmm0
movsd qword [ecx + 8], xmm1
sub edx, 0x10
sub ecx, 0x10
cmp ebx, edx
jb 0x4983b0
mov ecx, dword [ebp + 0xc]
cmp edx, ebx
jne 0x498466
cmp eax, ecx
je 0x498509
cmp edi, eax
je 0x498430
cmp esi, edi
je 0x498430
movsd xmm0, qword [edi]
movsd xmm1, qword [esi]
movsd qword [esi], xmm0
movsd xmm0, qword [edi + 8]
movsd qword [edi], xmm1
movsd xmm1, qword [esi + 8]
movsd qword [esi + 8], xmm0
movsd qword [edi + 8], xmm1
add edi, 0x10
cmp esi, eax
je 0x49845b
movsd xmm0, qword [eax]
movsd xmm1, qword [esi]
movsd qword [esi], xmm0
movsd xmm0, qword [eax + 8]
movsd qword [eax], xmm1
movsd xmm1, qword [esi + 8]
movsd qword [esi + 8], xmm0
movsd qword [eax + 8], xmm1
add esi, 0x10
add eax, 0x10
jmp 0x498354
add edx, 0xfffffff0
cmp eax, ecx
jne 0x4984d9
sub esi, 0x10
lea ecx, [esi + 8]
mov dword [ebp + 8], ecx
cmp edx, esi
je 0x49849e
movsd xmm0, qword [esi]
movsd xmm1, qword [edx]
movsd qword [edx], xmm0
movsd xmm0, qword [ecx]
movsd qword [esi], xmm1
movsd xmm1, qword [edx + 8]
movsd qword [edx + 8], xmm0
movsd qword [ecx], xmm1
jmp 0x4984a1
mov dword [ebp + 8], ecx
mov ecx, dword [ebp + 0xc]
sub edi, 0x10
cmp esi, edi
je 0x498354
movsd xmm0, qword [edi]
movsd xmm1, qword [esi]
mov ecx, dword [ebp + 8]
movsd qword [esi], xmm0
movsd xmm0, qword [edi + 8]
movsd qword [edi], xmm1
movsd xmm1, qword [ecx]
movsd qword [ecx], xmm0
movsd qword [edi + 8], xmm1
jmp 0x498351
cmp eax, edx
je 0x498501
movsd xmm0, qword [edx]
movsd xmm1, qword [eax]
movsd qword [eax], xmm0
movsd xmm0, qword [edx + 8]
movsd qword [edx], xmm1
movsd xmm1, qword [eax + 8]
movsd qword [eax + 8], xmm0
movsd qword [edx + 8], xmm1
add eax, 0x10
jmp 0x498354
mov ecx, dword [ebp + 0x10]
mov eax, ecx
mov edx, dword [ebp + 0xc]
push dword [ebp + 0x14]
sar eax, 2
sar ecx, 1
add ecx, eax
mov eax, esi
mov dword [ebp + 0x10], ecx
sub eax, ebx
push dword [ebp + 0x10]
mov ecx, edx
and eax, 0xfffffff0
sub ecx, edi
and ecx, 0xfffffff0
cmp eax, ecx
jge 0x498541
push esi
push ebx
call fcn.004982b0
mov edx, dword [ebp + 0xc]
mov ebx, edi
jmp 0x49854d
push edx
push edi
call fcn.004982b0
mov edx, esi
mov dword [ebp + 0xc], edx
mov eax, edx
add esp, 0x10
sub eax, ebx
and eax, 0xfffffff0
cmp eax, 0x200
jg 0x4982d1
cmp ebx, edx
je 0x498772
lea edi, [ebx + 0x10]
cmp edi, edx
je 0x498772
movsd xmm1, qword [edi]
lea ecx, [edi + 8]
movsd xmm0, qword [ebx]
mov esi, edi
comisd xmm0, xmm1
movsd xmm2, qword [ecx]
jbe 0x49872f
cmp edi, ebx
je 0x4985b2
movsd xmm0, qword [ecx - 0x18]
mov eax, ecx
sub ecx, 0x10
movsd qword [ecx + 8], xmm0
movsd xmm0, qword [ecx]
movsd qword [eax], xmm0
lea eax, [ecx - 8]
cmp eax, ebx
jne 0x498594
movsd qword [ebx], xmm1
movsd qword [ebx + 8], xmm2
jmp 0x498767
mov ecx, eax
sar ecx, 4
mov edi, ecx
mov dword [ebp - 4], ecx
sar edi, 1
test edi, edi
jle 0x4986d3
lea eax, [ecx - 1]
mov edx, eax
mov dword [ebp - 0xc], eax
mov eax, edi
sar edx, 1
shl eax, 4
mov dword [ebp + 8], edx
add eax, ebx
nop dword [eax + eax]
movsd xmm1, qword [eax - 0x10]
sub eax, 0x10
dec edi
mov dword [ebp - 0x10], eax
mov dword [ebp - 8], edi
mov esi, edi
mov ecx, edi
movsd xmm2, qword [eax + 8]
cmp edi, edx
jge 0x498658
mov edi, dword [ebp + 8]
nop
lea edx, [ecx + ecx]
xor eax, eax
mov ecx, edx
add ecx, ecx
movsd xmm0, qword [ebx + ecx*8 + 0x10]
comisd xmm0, xmmword [ebx + ecx*8 + 0x20]
seta al
add esi, esi
xor eax, 1
lea ecx, [eax + 1]
add ecx, edx
mov eax, ecx
add eax, eax
movsd xmm0, qword [ebx + eax*8]
movsd qword [ebx + esi*8], xmm0
movsd xmm0, qword [ebx + eax*8 + 8]
movsd qword [ebx + esi*8 + 8], xmm0
mov esi, ecx
cmp ecx, edi
jl 0x498610
mov edi, dword [ebp - 8]
mov edx, dword [ebp + 8]
cmp esi, edx
jne 0x498681
mov eax, dword [ebp - 4]
test al, 1
jne 0x498681
add eax, eax
add esi, esi
movsd xmm0, qword [ebx + eax*8 - 0x10]
movsd qword [ebx + esi*8], xmm0
movsd xmm0, qword [ebx + eax*8 - 8]
movsd qword [ebx + esi*8 + 8], xmm0
mov esi, dword [ebp - 0xc]
cmp edi, esi
jge 0x4986b2
lea eax, [esi - 1]
sar eax, 1
mov ecx, eax
add ecx, ecx
movsd xmm0, qword [ebx + ecx*8]
comisd xmm1, xmm0
jbe 0x4986b2
add esi, esi
movsd qword [ebx + esi*8], xmm0
movsd xmm0, qword [ebx + ecx*8 + 8]
movsd qword [ebx + esi*8 + 8], xmm0
mov esi, eax
cmp edi, eax
jl 0x498685
mov eax, dword [ebp - 0x10]
add esi, esi
movsd qword [ebx + esi*8], xmm1
movsd qword [ebx + esi*8 + 8], xmm2
test edi, edi
jg 0x4985f0
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 4]
cmp ecx, 2
jl 0x498772
add eax, 0xfffffff0
lea edi, [edx - 0x10]
mov dword [ebp + 0xc], eax
movups xmm0, xmmword [edi]
mov esi, eax
push dword [ebp + 0x14]
movups xmmword [ebp - 0x24], xmm0
sar esi, 4
movsd xmm0, qword [ebx]
movsd qword [edi], xmm0
movsd xmm0, qword [ebx + 8]
movsd qword [ebx + eax + 8], xmm0
lea eax, [ebp - 0x24]
push eax
push esi
push 0
push ebx
call fcn.004981c0
mov eax, dword [ebp + 0xc]
lea edi, [edi - 0x10]
sub eax, 0x10
add esp, 0x14
mov dword [ebp + 0xc], eax
cmp esi, 2
jge 0x4986e5
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
movsd xmm0, qword [edi - 0x10]
lea eax, [edi - 0x10]
comisd xmm0, xmm1
jbe 0x49875e
nop dword [eax]
movsd qword [esi], xmm0
movsd xmm0, qword [eax + 8]
movsd qword [esi + 8], xmm0
mov esi, eax
movsd xmm0, qword [eax - 0x10]
sub eax, 0x10
comisd xmm0, xmm1
ja 0x498740
movsd qword [esi], xmm1
movsd qword [esi + 8], xmm2
add edi, 0x10
cmp edi, edx
jne 0x498575
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret