Function at 0x5b6390
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 0x5b63db
mov ecx, dword [ebp - 0xc]
call fcn.005b3b60
mov ecx, dword [ebp - 0xc]
cmp dword [ecx + 0x6c], 0x106
jae 0x5b63cd
cmp dword [ebp + 8], 0
jne 0x5b63cd
xor eax, eax
jmp 0x5b6740
mov edx, dword [ebp - 0xc]
cmp dword [edx + 0x6c], 0
jne 0x5b63db
jmp 0x5b66bb
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x6c], 3
jb 0x5b6455
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 0x5b6491
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 0x5b6491
mov ecx, dword [ebp - 0xc]
cmp dword [ecx + 0x80], 2
je 0x5b6491
mov edx, dword [ebp - 8]
push edx
mov ecx, dword [ebp - 0xc]
call fcn.005b6750
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x58], eax
mov edx, dword [ebp - 0xc]
cmp dword [edx + 0x58], 3
jb 0x5b660e
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.005b6f10
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 0x5b65ad
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x6c], 3
jb 0x5b65ad
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 0x5b6500
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x64]
add edx, 1
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x64], edx
jmp 0x5b660c
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 0x5b664a
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.005b6f10
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 0x5b66b6
mov ecx, dword [ebp - 0xc]
cmp dword [ecx + 0x54], 0
jl 0x5b666a
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 0x5b6671
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.005b3d80
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.005aaff0
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 4]
cmp dword [edx + 0x24], 0
jne 0x5b66b6
xor eax, eax
jmp 0x5b6740
jmp 0x5b63a0
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x54], 0
jl 0x5b66d5
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 0x5b66dc
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.005b3d80
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.005aaff0
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 4]
cmp dword [edx + 0x24], 0
jne 0x5b6733
xor eax, eax
cmp dword [ebp + 8], 4
setne al
sub eax, 1
and eax, 2
jmp 0x5b6740
xor eax, eax
cmp dword [ebp + 8], 4
sete al
lea eax, [eax + eax + 1]
mov esp, ebp
pop ebp
ret 4