Function at 0x55d397
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
mov esi, edx
mov edx, dword [ebp + 0x20]
shr esi, 3
shr edi, 3
mov dword [ebp - 4], ecx
push 4
pop eax
cmp edx, 2
je 0x55d3c3
cmp edx, 3
je 0x55d3c3
mov ebx, dword [ebp + 8]
jmp 0x55d3e2
mov eax, esi
mov ebx, ecx
mov ecx, dword [ebp + 8]
mov esi, edi
mov edi, eax
mov dword [ebp - 4], ecx
xor eax, eax
inc eax
cmp edx, 2
push 4
pop edx
cmove eax, edx
push 4
mov edx, eax
pop eax
mov dword [ebp + 0x20], ebx
cmp edx, 1
je 0x55d56a
cmp edx, eax
je 0x55d56a
test edx, edx
je 0x55d403
cmp edx, 5
jne 0x55d6a2
neg edx
sbb edx, edx
and edx, 0xff
cmp dword [ebp + 0x1c], 0
je 0x55d6a2
mov eax, dword [ebp + 0x18]
add eax, 0xfffffffc
mov dword [ebp - 0x10], eax
mov eax, esi
mov esi, dword [ebp + 0x1c]
shl eax, 3
mov dword [ebp - 0x18], eax
mov eax, edi
shl eax, 3
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0x10]
add eax, 2
mov dword [ebp + 0xc], eax
dec esi
mov dword [ebp - 0x20], esi
xor esi, esi
cmp dword [ebp - 0x10], esi
jl 0x55d508
lea eax, [ecx + 0x18]
mov dword [ebp - 8], ecx
sub dword [ebp - 8], ebx
lea edi, [ebx + 8]
mov dword [ebp - 0xc], eax
movsd xmm0, qword [eax - 0x18]
ucomisd xmm0, qword [edi - 8]
lahf
test ah, 0x44
jp 0x55d46f
or ecx, 0xffffffff
jmp 0x55d471
xor ecx, ecx
mov eax, dword [ebp - 8]
xor ecx, edx
movsd xmm0, qword [eax + edi]
ucomisd xmm0, qword [edi]
lahf
test ah, 0x44
jp 0x55d48a
xor eax, eax
inc eax
jmp 0x55d48c
xor eax, eax
mov ebx, dword [ebp + 0xc]
neg al
xor al, dl
mov byte [ebx + esi - 2], cl
mov ecx, ebx
mov byte [ecx + esi - 1], al
mov ecx, dword [ebp - 0xc]
movsd xmm0, qword [ecx - 8]
ucomisd xmm0, qword [edi + 8]
lahf
test ah, 0x44
jp 0x55d4b5
or eax, 0xffffffff
jmp 0x55d4b7
xor eax, eax
movsd xmm0, qword [ecx]
xor eax, edx
ucomisd xmm0, qword [edi + 0x10]
mov dword [ebp - 0x14], eax
lahf
test ah, 0x44
jp 0x55d4d0
xor eax, eax
inc eax
jmp 0x55d4d2
xor eax, eax
mov ebx, dword [ebp + 0xc]
neg al
mov ecx, dword [ebp - 0x14]
xor al, dl
push 4
add edi, 0x20
mov byte [ebx + esi], cl
mov ecx, ebx
mov byte [ecx + esi + 1], al
pop eax
add esi, eax
mov eax, dword [ebp - 0xc]
add eax, 0x20
mov dword [ebp - 0xc], eax
cmp esi, dword [ebp - 0x10]
jle 0x55d45a
mov ebx, dword [ebp + 0x20]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp + 0xc]
cmp esi, dword [ebp + 0x18]
jge 0x55d548
mov dword [ebp - 0x14], ecx
lea edi, [ebx + esi*8]
sub ecx, ebx
mov ebx, dword [ebp + 0xc]
movsd xmm0, qword [ecx + edi]
ucomisd xmm0, qword [edi]
lahf
test ah, 0x44
jp 0x55d52c
xor eax, eax
inc eax
jmp 0x55d52e
xor eax, eax
neg al
add edi, 8
xor al, dl
mov byte [ebx + esi - 2], al
inc esi
cmp esi, dword [ebp + 0x18]
jl 0x55d518
mov ebx, dword [ebp + 0x20]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp + 0xc]
add ecx, dword [ebp - 0x18]
add ebx, dword [ebp - 0x1c]
add eax, dword [ebp + 0x14]
mov esi, dword [ebp - 0x20]
mov dword [ebp - 4], ecx
mov dword [ebp + 0x20], ebx
mov dword [ebp + 0xc], eax
test esi, esi
jne 0x55d43c
jmp 0x55d6a2
dec edx
neg edx
sbb edx, edx
and edx, 0xff
cmp dword [ebp + 0x1c], 0
je 0x55d6a2
mov eax, dword [ebp + 0x18]
add eax, 0xfffffffc
mov dword [ebp - 0x10], eax
mov eax, esi
shl eax, 3
mov dword [ebp - 0x18], eax
mov eax, edi
mov edi, dword [ebp + 0x1c]
shl eax, 3
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0x10]
add eax, 2
mov dword [ebp + 0xc], eax
xor esi, esi
dec edi
cmp dword [ebp - 0x10], esi
jl 0x55d646
lea eax, [ecx + 0x10]
sub ecx, ebx
mov dword [ebp - 8], eax
lea eax, [ebx + 8]
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x20], ecx
movsd xmm0, qword [ecx + eax]
xor ecx, ecx
comisd xmm0, xmmword [eax]
mov ebx, dword [ebp - 8]
push 4
movsd xmm0, qword [ebx - 0x10]
mov ebx, dword [ebp + 0xc]
setbe cl
dec ecx
xor ecx, edx
comisd xmm0, xmmword [eax - 8]
mov byte [ebx + esi - 1], cl
setbe al
xor ecx, ecx
dec al
xor al, dl
mov byte [ebx + esi - 2], al
mov eax, dword [ebp - 8]
mov ebx, dword [ebp - 8]
movsd xmm0, qword [eax + 8]
mov eax, dword [ebp - 0xc]
comisd xmm0, xmmword [eax + 0x10]
movsd xmm0, qword [ebx]
mov ebx, dword [ebp + 0xc]
setbe cl
dec ecx
xor ecx, edx
comisd xmm0, xmmword [eax + 8]
mov byte [ebx + esi + 1], cl
mov ecx, dword [ebp - 0x20]
setbe al
add dword [ebp - 8], 0x20
dec al
xor al, dl
mov byte [ebx + esi], al
pop eax
add esi, eax
mov eax, dword [ebp - 0xc]
add eax, 0x20
mov dword [ebp - 0xc], eax
cmp esi, dword [ebp - 0x10]
jle 0x55d5c1
mov ebx, dword [ebp + 0x20]
mov eax, dword [ebp + 0xc]
cmp esi, dword [ebp + 0x18]
jge 0x55d685
lea eax, [ebx + esi*8]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x20]
sub eax, ebx
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x1c], eax
movsd xmm0, qword [eax + ecx]
comisd xmm0, xmmword [ecx]
lea ecx, [ecx + 8]
setbe al
dec al
xor al, dl
mov byte [ebx + esi - 2], al
inc esi
mov eax, dword [ebp - 0x1c]
cmp esi, dword [ebp + 0x18]
jl 0x55d65f
mov ebx, dword [ebp + 0x20]
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 4]
add ecx, dword [ebp - 0x18]
add ebx, dword [ebp - 0x14]
add eax, dword [ebp + 0x14]
mov dword [ebp - 4], ecx
mov dword [ebp + 0x20], ebx
mov dword [ebp + 0xc], eax
test edi, edi
jne 0x55d5a4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret