Function at 0x5b4ec0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], 0
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x6c], 0x106
jae 0x5b4f0b
mov ecx, dword [ebp - 0xc]
call fcn.005b2690
mov ecx, dword [ebp - 0xc]
cmp dword [ecx + 0x6c], 0x106
jae 0x5b4efd
cmp dword [ebp + 8], 0
jne 0x5b4efd
xor eax, eax
jmp 0x5b5270
mov edx, dword [ebp - 0xc]
cmp dword [edx + 0x6c], 0
jne 0x5b4f0b
jmp 0x5b51eb
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x6c], 3
jb 0x5b4f85
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0xc]
mov eax, dword [ecx + 0x40]
mov ecx, dword [edx + 0x50]
shl eax, cl
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x64]
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 0x28]
movzx edx, byte [ecx + edx + 2]
xor eax, edx
mov ecx, dword [ebp - 0xc]
and eax, dword [ecx + 0x4c]
mov edx, dword [ebp - 0xc]
mov dword [edx + 0x40], eax
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x40]
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x38]
movzx ecx, word [eax + ecx*2]
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0xc]
mov ecx, dword [edx + 0x64]
and ecx, dword [eax + 0x24]
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x30]
mov dx, word [ebp - 8]
mov word [eax + ecx*2], dx
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x40]
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x38]
mov edx, dword [ebp - 0xc]
mov dx, word [edx + 0x64]
mov word [eax + ecx*2], dx
cmp dword [ebp - 8], 0
je 0x5b4fc1
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x64]
sub ecx, dword [ebp - 8]
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x1c]
sub eax, 0x106
cmp ecx, eax
ja 0x5b4fc1
mov ecx, dword [ebp - 0xc]
cmp dword [ecx + 0x80], 2
je 0x5b4fc1
mov edx, dword [ebp - 8]
push edx
mov ecx, dword [ebp - 0xc]
call fcn.005b5280
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x58], eax
mov edx, dword [ebp - 0xc]
cmp dword [edx + 0x58], 3
jb 0x5b513e
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x58]
sub ecx, 3
push ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0xc]
mov ecx, dword [edx + 0x64]
sub ecx, dword [eax + 0x68]
push ecx
mov ecx, dword [ebp - 0xc]
call fcn.005b5a40
mov dword [ebp - 4], eax
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0xc]
mov ecx, dword [edx + 0x6c]
sub ecx, dword [eax + 0x58]
mov edx, dword [ebp - 0xc]
mov dword [edx + 0x6c], ecx
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
mov edx, dword [eax + 0x58]
cmp edx, dword [ecx + 0x78]
ja 0x5b50dd
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x6c], 3
jb 0x5b50dd
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x58]
sub edx, 1
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x58], edx
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x64]
add edx, 1
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x64], edx
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0xc]
mov eax, dword [ecx + 0x40]
mov ecx, dword [edx + 0x50]
shl eax, cl
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x64]
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 0x28]
movzx edx, byte [ecx + edx + 2]
xor eax, edx
mov ecx, dword [ebp - 0xc]
and eax, dword [ecx + 0x4c]
mov edx, dword [ebp - 0xc]
mov dword [edx + 0x40], eax
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x40]
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x38]
movzx ecx, word [eax + ecx*2]
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0xc]
mov ecx, dword [edx + 0x64]
and ecx, dword [eax + 0x24]
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x30]
mov dx, word [ebp - 8]
mov word [eax + ecx*2], dx
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x40]
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x38]
mov edx, dword [ebp - 0xc]
mov dx, word [edx + 0x64]
mov word [eax + ecx*2], dx
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x58]
sub ecx, 1
mov edx, dword [ebp - 0xc]
mov dword [edx + 0x58], ecx
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x58], 0
jne 0x5b5030
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x64]
add edx, 1
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x64], edx
jmp 0x5b513c
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x64]
mov eax, dword [ebp - 0xc]
add edx, dword [eax + 0x58]
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x64], edx
mov edx, dword [ebp - 0xc]
mov dword [edx + 0x58], 0
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x28]
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x64]
movzx ecx, byte [ecx + eax]
mov edx, dword [ebp - 0xc]
mov dword [edx + 0x40], ecx
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
mov edx, dword [eax + 0x40]
mov ecx, dword [ecx + 0x50]
shl edx, cl
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x64]
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x28]
movzx ecx, byte [eax + ecx + 1]
xor edx, ecx
mov eax, dword [ebp - 0xc]
and edx, dword [eax + 0x4c]
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x40], edx
jmp 0x5b517a
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x28]
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x64]
movzx eax, byte [eax + edx]
push eax
push 0
mov ecx, dword [ebp - 0xc]
call fcn.005b5a40
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x6c]
sub edx, 1
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x6c], edx
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x64]
add edx, 1
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x64], edx
cmp dword [ebp - 4], 0
je 0x5b51e6
mov ecx, dword [ebp - 0xc]
cmp dword [ecx + 0x54], 0
jl 0x5b519a
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x28]
mov ecx, dword [ebp - 0xc]
add eax, dword [ecx + 0x54]
mov dword [ebp - 0x10], eax
jmp 0x5b51a1
mov dword [ebp - 0x10], 0
push 0
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0xc]
mov ecx, dword [edx + 0x64]
sub ecx, dword [eax + 0x54]
push ecx
mov edx, dword [ebp - 0x10]
push edx
mov ecx, dword [ebp - 0xc]
call fcn.005b28b0
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x64]
mov dword [eax + 0x54], edx
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 4]
call fcn.005a9ae0
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 4]
cmp dword [edx + 0x24], 0
jne 0x5b51e6
xor eax, eax
jmp 0x5b5270
jmp 0x5b4ed0
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x54], 0
jl 0x5b5205
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x28]
mov eax, dword [ebp - 0xc]
add edx, dword [eax + 0x54]
mov dword [ebp - 0x14], edx
jmp 0x5b520c
mov dword [ebp - 0x14], 0
xor ecx, ecx
cmp dword [ebp + 8], 4
sete cl
push ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0xc]
mov ecx, dword [edx + 0x64]
sub ecx, dword [eax + 0x54]
push ecx
mov edx, dword [ebp - 0x14]
push edx
mov ecx, dword [ebp - 0xc]
call fcn.005b28b0
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x64]
mov dword [eax + 0x54], edx
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 4]
call fcn.005a9ae0
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 4]
cmp dword [edx + 0x24], 0
jne 0x5b5263
xor eax, eax
cmp dword [ebp + 8], 4
setne al
sub eax, 1
and eax, 2
jmp 0x5b5270
xor eax, eax
cmp dword [ebp + 8], 4
sete al
lea eax, [eax + eax + 1]
mov esp, ebp
pop ebp
ret 4