Function at 0x5914b0
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 0x5914dd
cmp ebx, 3
je 0x5914dd
mov ecx, dword [ebp + 0x10]
mov edi, dword [ebp + 8]
mov dword [ebp + 0x14], ecx
jmp 0x5914fe
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 0x591693
cmp ebx, 4
je 0x591693
test ebx, ebx
je 0x591520
cmp ebx, 5
jne 0x5917be
mov ecx, dword [ebp + 0x24]
neg ebx
sbb ebx, ebx
and ebx, 0xff
mov dword [ebp + 0x28], ebx
test ecx, ecx
je 0x5917be
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 0x59162a
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 0x591597
mov edx, 1
jmp 0x591599
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 0x5915b6
mov eax, 1
jmp 0x5915b8
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 0x5915e4
mov edx, 1
jmp 0x5915e6
xor edx, edx
movsd xmm0, qword [edi]
neg edx
xor edx, ebx
ucomisd xmm0, qword [esi + 0x10]
lahf
test ah, 0x44
jp 0x591600
mov eax, 1
jmp 0x591602
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 0x591580
mov esi, edx
cmp ecx, dword [ebp + 0x20]
jge 0x591669
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 0x591656
mov eax, 1
jmp 0x591658
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 0x591640
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 0x591561
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 0x5917be
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 0x591769
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 0x5916f6
mov ecx, dword [ebp - 8]
cmp edx, dword [ebp + 0x20]
jge 0x5917a1
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 0x591780
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 0x5916d0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret