Function at 0x590ef0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 0x14]
sub esp, 0x18
shr edx, 2
mov dword [ebp + 0x14], edx
push ebx
mov ebx, dword [ebp + 0x28]
push esi
mov esi, dword [ebp + 0xc]
shr esi, 2
push edi
cmp ebx, 2
je 0x590f1d
cmp ebx, 3
je 0x590f1d
mov edi, dword [ebp + 0x10]
mov ecx, dword [ebp + 8]
jmp 0x590f3a
mov edi, dword [ebp + 8]
cmp ebx, 2
mov ecx, dword [ebp + 0x10]
mov eax, 1
mov dword [ebp + 0x14], esi
mov esi, edx
mov edx, 4
cmove eax, edx
mov ebx, eax
mov dword [ebp + 0xc], ecx
mov dword [ebp + 0x28], edi
cmp ebx, 1
je 0x591071
cmp ebx, 4
je 0x591071
test ebx, ebx
je 0x590f5f
cmp ebx, 5
jne 0x59118a
mov edx, dword [ebp + 0x24]
neg ebx
sbb ebx, ebx
and ebx, 0xff
test edx, edx
je 0x59118a
mov eax, dword [ebp + 0x20]
add eax, 0xfffffffc
mov dword [ebp - 4], eax
lea eax, [esi*4]
mov esi, dword [ebp + 0x18]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x14]
shl eax, 2
add esi, 2
mov dword [ebp - 0x14], eax
dec edx
mov dword [ebp - 0x18], edx
xor edx, edx
cmp dword [ebp - 4], edx
jl 0x59101b
lea eax, [ecx + 8]
mov dword [ebp + 0x14], eax
lea eax, [edi + 4]
mov dword [ebp - 8], eax
mov eax, ecx
sub eax, edi
mov edi, dword [ebp - 8]
mov dword [ebp - 0xc], eax
mov eax, dword [eax + edi]
lea edi, [edi + 0x10]
xor ecx, ecx
cmp eax, dword [edi - 0x10]
mov eax, dword [ebp + 0x14]
sete cl
neg ecx
xor ecx, ebx
mov eax, dword [eax - 8]
cmp eax, dword [edi - 0x14]
mov byte [esi + edx - 1], cl
sete al
xor ecx, ecx
neg al
xor al, bl
mov byte [esi + edx - 2], al
mov eax, dword [ebp + 0x14]
mov eax, dword [eax + 4]
cmp eax, dword [edi - 8]
mov eax, dword [ebp + 0x14]
sete cl
neg ecx
xor ecx, ebx
mov eax, dword [eax]
cmp eax, dword [edi - 0xc]
mov byte [esi + edx + 1], cl
sete al
add dword [ebp + 0x14], 0x10
neg al
xor al, bl
mov byte [esi + edx], al
add edx, 4
mov eax, dword [ebp - 0xc]
cmp edx, dword [ebp - 4]
jle 0x590fb7
mov edi, dword [ebp + 0x28]
cmp edx, dword [ebp + 0x20]
jge 0x59104d
mov eax, dword [ebp + 0xc]
lea ecx, [edi + edx*4]
sub eax, edi
mov dword [ebp + 0x14], eax
mov edi, eax
lea ecx, [ecx]
mov eax, dword [edi + ecx]
lea ecx, [ecx + 4]
cmp eax, dword [ecx - 4]
sete al
neg al
xor al, bl
mov byte [esi + edx - 2], al
inc edx
cmp edx, dword [ebp + 0x20]
jl 0x591030
mov edi, dword [ebp + 0x28]
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 0x10]
add edi, dword [ebp - 0x14]
add esi, dword [ebp + 0x1c]
mov edx, dword [ebp - 0x18]
mov dword [ebp + 0xc], ecx
mov dword [ebp + 0x28], edi
test edx, edx
jne 0x590f96
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 0x24]
dec ebx
neg ebx
sbb ebx, ebx
and ebx, 0xff
test edx, edx
je 0x59118a
mov eax, dword [ebp + 0x20]
add eax, 0xfffffffc
mov dword [ebp - 4], eax
lea eax, [esi*4]
mov esi, dword [ebp + 0x18]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x14]
shl eax, 2
add esi, 2
mov dword [ebp - 0xc], eax
lea esp, [esp]
dec edx
xor eax, eax
mov dword [ebp - 8], edx
cmp dword [ebp - 4], eax
jl 0x591139
add ecx, 8
mov dword [ebp + 0x14], ecx
lea ecx, [edi + 4]
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp + 0xc]
sub ecx, edi
mov edi, dword [ebp - 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ecx + edi]
lea edi, [edi + 0x10]
xor edx, edx
cmp ecx, dword [edi - 0x10]
mov ecx, dword [ebp + 0x14]
setg dl
neg edx
xor edx, ebx
mov ecx, dword [ecx - 8]
cmp ecx, dword [edi - 0x14]
mov byte [esi + eax - 1], dl
setg cl
xor edx, edx
neg cl
xor cl, bl
mov byte [esi + eax - 2], cl
mov ecx, dword [ebp + 0x14]
mov ecx, dword [ecx + 4]
cmp ecx, dword [edi - 8]
mov ecx, dword [ebp + 0x14]
setg dl
neg edx
xor edx, ebx
mov ecx, dword [ecx]
cmp ecx, dword [edi - 0xc]
mov byte [esi + eax + 1], dl
setg cl
add dword [ebp + 0x14], 0x10
neg cl
xor cl, bl
mov byte [esi + eax], cl
add eax, 4
mov ecx, dword [ebp - 0x14]
cmp eax, dword [ebp - 4]
jle 0x5910d2
mov edi, dword [ebp + 0x28]
mov edx, dword [ebp - 8]
cmp eax, dword [ebp + 0x20]
jge 0x591170
mov ecx, dword [ebp + 0xc]
lea edx, [edi + eax*4]
sub ecx, edi
mov dword [ebp + 0x14], ecx
mov edi, ecx
jmp 0x591150
mov ecx, dword [edx + edi]
lea edx, [edx + 4]
cmp ecx, dword [edx - 4]
setg cl
neg cl
xor cl, bl
mov byte [esi + eax - 2], cl
inc eax
cmp eax, dword [ebp + 0x20]
jl 0x591150
mov edi, dword [ebp + 0x28]
mov edx, dword [ebp - 8]
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 0x10]
add edi, dword [ebp - 0xc]
add esi, dword [ebp + 0x1c]
mov dword [ebp + 0xc], ecx
mov dword [ebp + 0x28], edi
test edx, edx
jne 0x5910b0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret