Function at 0x10013320
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 0xc]
sub esp, 0x18
shr edx, 3
push ebx
mov ebx, dword [ebp + 0x28]
push esi
mov esi, dword [ebp + 0x14]
shr esi, 3
push edi
cmp ebx, 2
je 0x1001334d
cmp ebx, 3
je 0x1001334d
mov ecx, dword [ebp + 0x10]
mov edi, dword [ebp + 8]
mov dword [ebp + 0x14], ecx
jmp 0x1001336e
mov eax, dword [ebp + 8]
cmp ebx, 2
mov edi, dword [ebp + 0x10]
mov ecx, 4
mov dword [ebp + 0x14], eax
mov eax, edx
mov edx, esi
mov esi, eax
mov eax, 1
cmove eax, ecx
mov ebx, eax
mov dword [ebp + 0xc], edi
cmp ebx, 1
je 0x10013503
cmp ebx, 4
je 0x10013503
test ebx, ebx
je 0x10013390
cmp ebx, 5
jne 0x1001362e
mov ecx, dword [ebp + 0x24]
neg ebx
sbb ebx, ebx
and ebx, 0xff
mov dword [ebp + 0x28], ebx
test ecx, ecx
je 0x1001362e
mov eax, dword [ebp + 0x20]
add eax, 0xfffffffc
mov dword [ebp - 8], eax
lea eax, [edx*8]
mov dword [ebp - 0x10], eax
lea eax, [esi*8]
mov esi, dword [ebp + 0x18]
add esi, 2
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 4], esi
dec ecx
mov dword [ebp - 0x18], ecx
xor ecx, ecx
cmp dword [ebp - 8], ecx
jl 0x1001349a
mov edx, dword [ebp + 0xc]
lea esi, [eax + 8]
add edi, 0x18
sub edx, eax
mov dword [ebp - 0xc], edx
mov edi, edi
movsd xmm0, qword [edi - 0x18]
ucomisd xmm0, qword [esi - 8]
lahf
test ah, 0x44
jp 0x10013407
mov edx, 1
jmp 0x10013409
xor edx, edx
mov eax, dword [ebp - 0xc]
neg edx
xor edx, ebx
movsd xmm0, qword [eax + esi]
ucomisd xmm0, qword [esi]
lahf
test ah, 0x44
jp 0x10013426
mov eax, 1
jmp 0x10013428
xor eax, eax
mov ebx, dword [ebp - 4]
neg al
mov byte [ebx + ecx - 2], dl
mov edx, dword [ebp - 4]
mov ebx, dword [ebp + 0x28]
xor al, bl
mov byte [edx + ecx - 1], al
movsd xmm0, qword [edi - 8]
ucomisd xmm0, qword [esi + 8]
lahf
test ah, 0x44
jp 0x10013454
mov edx, 1
jmp 0x10013456
xor edx, edx
movsd xmm0, qword [edi]
neg edx
xor edx, ebx
ucomisd xmm0, qword [esi + 0x10]
lahf
test ah, 0x44
jp 0x10013470
mov eax, 1
jmp 0x10013472
xor eax, eax
mov ebx, dword [ebp - 4]
neg al
add esi, 0x20
add edi, 0x20
mov byte [ebx + ecx], dl
mov edx, dword [ebp - 4]
mov ebx, dword [ebp + 0x28]
xor al, bl
mov byte [edx + ecx + 1], al
add ecx, 4
cmp ecx, dword [ebp - 8]
jle 0x100133f0
mov esi, edx
cmp ecx, dword [ebp + 0x20]
jge 0x100134d9
mov eax, dword [ebp + 0x14]
mov edi, dword [ebp + 0xc]
sub edi, eax
lea edx, [eax + ecx*8]
lea ebx, [ebx]
movsd xmm0, qword [edx + edi]
ucomisd xmm0, qword [edx]
lahf
test ah, 0x44
jp 0x100134c6
mov eax, 1
jmp 0x100134c8
xor eax, eax
neg al
add edx, 8
xor al, bl
mov byte [esi + ecx - 2], al
inc ecx
cmp ecx, dword [ebp + 0x20]
jl 0x100134b0
mov edi, dword [ebp + 0xc]
mov eax, dword [ebp + 0x14]
add edi, dword [ebp - 0x10]
add eax, dword [ebp - 0x14]
add esi, dword [ebp + 0x1c]
mov ecx, dword [ebp - 0x18]
mov dword [ebp + 0xc], edi
mov dword [ebp + 0x14], eax
mov dword [ebp - 4], esi
test ecx, ecx
jne 0x100133d1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0x24]
dec ebx
neg ebx
sbb ebx, ebx
and ebx, 0xff
test ecx, ecx
je 0x1001362e
mov edi, dword [ebp + 0x20]
lea eax, [edx*8]
mov dword [ebp - 0x14], eax
add edi, 0xfffffffc
lea eax, [esi*8]
mov dword [ebp - 4], edi
mov esi, dword [ebp + 0x18]
mov dword [ebp - 0x10], eax
add esi, 2
lea esp, [esp]
dec ecx
xor edx, edx
mov dword [ebp - 8], ecx
test edi, edi
js 0x100135d9
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 0x14]
add eax, 0x10
mov ecx, dword [ebp + 0xc]
add edi, 8
sub ecx, dword [ebp + 0x14]
mov dword [ebp + 0x28], eax
mov dword [ebp - 0x18], ecx
movsd xmm0, qword [ecx + edi]
lea edi, [edi + 0x20]
xor ecx, ecx
comisd xmm0, xmmword [edi - 0x20]
movsd xmm0, qword [eax - 0x10]
seta cl
neg ecx
xor ecx, ebx
comisd xmm0, xmmword [edi - 0x28]
mov byte [esi + edx - 1], cl
seta al
xor ecx, ecx
neg al
xor al, bl
mov byte [esi + edx - 2], al
mov eax, dword [ebp + 0x28]
movsd xmm0, qword [eax + 8]
comisd xmm0, xmmword [edi - 0x10]
movsd xmm0, qword [eax]
seta cl
neg ecx
xor ecx, ebx
comisd xmm0, xmmword [edi - 0x18]
mov byte [esi + edx + 1], cl
mov ecx, dword [ebp - 0x18]
seta al
neg al
xor al, bl
mov byte [esi + edx], al
add edx, 4
mov eax, dword [ebp + 0x28]
add eax, 0x20
mov dword [ebp + 0x28], eax
cmp edx, dword [ebp - 4]
jle 0x10013566
mov ecx, dword [ebp - 8]
cmp edx, dword [ebp + 0x20]
jge 0x10013611
mov eax, dword [ebp + 0x14]
mov edi, dword [ebp + 0xc]
sub edi, eax
lea ecx, [eax + edx*8]
lea esp, [esp]
movsd xmm0, qword [edi + ecx]
lea ecx, [ecx + 8]
comisd xmm0, xmmword [ecx - 8]
seta al
neg al
xor al, bl
mov byte [esi + edx - 2], al
inc edx
cmp edx, dword [ebp + 0x20]
jl 0x100135f0
mov ecx, dword [ebp - 8]
mov eax, dword [ebp + 0xc]
add eax, dword [ebp - 0x14]
add esi, dword [ebp + 0x1c]
mov edi, dword [ebp - 4]
mov dword [ebp + 0xc], eax
mov eax, dword [ebp - 0x10]
add dword [ebp + 0x14], eax
test ecx, ecx
jne 0x10013540
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret