Function at 0x559b49
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov dword [ebp - 0xc], ecx
and dword [ebp - 8], 0
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x6c], 0x106
jae 0x559b91
mov ecx, dword [ebp - 0xc]
call fcn.005574d9
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x6c], 0x106
jae 0x559b83
cmp dword [ebp + 8], 0
jne 0x559b83
xor eax, eax
jmp 0x559eec
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x6c], 0
jne 0x559b91
jmp 0x559e61
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x6c], 3
jb 0x559c0b
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
mov eax, dword [eax + 0x40]
mov ecx, dword [ecx + 0x50]
shl eax, cl
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 0x64]
mov edx, dword [ebp - 0xc]
mov edx, dword [edx + 0x28]
movzx ecx, byte [edx + ecx + 2]
xor eax, ecx
mov ecx, dword [ebp - 0xc]
and eax, dword [ecx + 0x4c]
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x40], eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x40]
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 0x38]
movzx eax, word [ecx + eax*2]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
mov eax, dword [eax + 0x64]
and eax, dword [ecx + 0x24]
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 0x30]
mov dx, word [ebp - 8]
mov word [ecx + eax*2], dx
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x40]
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 0x38]
mov edx, dword [ebp - 0xc]
mov dx, word [edx + 0x64]
mov word [ecx + eax*2], dx
cmp dword [ebp - 8], 0
je 0x559c47
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x64]
sub eax, dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 0x1c]
sub ecx, 0x106
cmp eax, ecx
ja 0x559c47
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x80], 2
je 0x559c47
push dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
call fcn.00559ef0
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x58], eax
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x58], 3
jb 0x559db9
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x58]
sub eax, 3
push eax
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
mov eax, dword [eax + 0x64]
sub eax, dword [ecx + 0x68]
push eax
mov ecx, dword [ebp - 0xc]
call fcn.0055a1d5
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
mov eax, dword [eax + 0x6c]
sub eax, dword [ecx + 0x58]
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x6c], eax
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
mov eax, dword [eax + 0x58]
cmp eax, dword [ecx + 0x78]
ja 0x559d5b
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x6c], 3
jb 0x559d5b
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x58]
dec eax
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x58], eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x64]
inc eax
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x64], eax
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
mov eax, dword [eax + 0x40]
mov ecx, dword [ecx + 0x50]
shl eax, cl
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 0x64]
mov edx, dword [ebp - 0xc]
mov edx, dword [edx + 0x28]
movzx ecx, byte [edx + ecx + 2]
xor eax, ecx
mov ecx, dword [ebp - 0xc]
and eax, dword [ecx + 0x4c]
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x40], eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x40]
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 0x38]
movzx eax, word [ecx + eax*2]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
mov eax, dword [eax + 0x64]
and eax, dword [ecx + 0x24]
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 0x30]
mov dx, word [ebp - 8]
mov word [ecx + eax*2], dx
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x40]
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 0x38]
mov edx, dword [ebp - 0xc]
mov dx, word [edx + 0x64]
mov word [ecx + eax*2], dx
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x58]
dec eax
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x58], eax
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x58], 0
jne 0x559cb4
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x64]
inc eax
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x64], eax
jmp 0x559db7
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x64]
mov ecx, dword [ebp - 0xc]
add eax, dword [ecx + 0x58]
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x64], eax
mov eax, dword [ebp - 0xc]
and dword [eax + 0x58], 0
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x28]
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 0x64]
movzx eax, byte [eax + ecx]
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x40], eax
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
mov eax, dword [eax + 0x40]
mov ecx, dword [ecx + 0x50]
shl eax, cl
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 0x64]
mov edx, dword [ebp - 0xc]
mov edx, dword [edx + 0x28]
movzx ecx, byte [edx + ecx + 1]
xor eax, ecx
mov ecx, dword [ebp - 0xc]
and eax, dword [ecx + 0x4c]
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x40], eax
jmp 0x559df1
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x28]
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 0x64]
movzx eax, byte [eax + ecx]
push eax
push 0
mov ecx, dword [ebp - 0xc]
call fcn.0055a1d5
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x6c]
dec eax
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x6c], eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x64]
inc eax
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x64], eax
cmp dword [ebp - 4], 0
je 0x559e5c
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x54], 0
jl 0x559e11
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x28]
mov ecx, dword [ebp - 0xc]
add eax, dword [ecx + 0x54]
mov dword [ebp - 0x10], eax
jmp 0x559e15
and dword [ebp - 0x10], 0
push 0
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
mov eax, dword [eax + 0x64]
sub eax, dword [ecx + 0x54]
push eax
push dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
call fcn.005576f3
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 0x64]
mov dword [eax + 0x54], ecx
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 4]
call fcn.005537c3
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 4]
call fcn.00553673
test eax, eax
jne 0x559e5c
xor eax, eax
jmp 0x559eec
jmp 0x559b56
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x54], 0
jl 0x559e7b
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x28]
mov ecx, dword [ebp - 0xc]
add eax, dword [ecx + 0x54]
mov dword [ebp - 0x14], eax
jmp 0x559e7f
and dword [ebp - 0x14], 0
xor eax, eax
cmp dword [ebp + 8], 4
sete al
push eax
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
mov eax, dword [eax + 0x64]
sub eax, dword [ecx + 0x54]
push eax
push dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
call fcn.005576f3
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 0x64]
mov dword [eax + 0x54], ecx
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 4]
call fcn.005537c3
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 4]
call fcn.00553673
test eax, eax
jne 0x559edf
cmp dword [ebp + 8], 4
jne 0x559ed6
mov dword [ebp - 0x18], 2
jmp 0x559eda
and dword [ebp - 0x18], 0
mov eax, dword [ebp - 0x18]
jmp 0x559eec
xor eax, eax
cmp dword [ebp + 8], 4
sete al
lea eax, [eax + eax + 1]
leave
ret 4