Function at 0x568cc0
Capabilities:
Encode data using xor

Disassembly:
push ebx
push ebp
push esi
mov esi, dword [esp + 0x10]
push edi
xor edi, edi
mov eax, dword [esi + 0x76]
mov dword [esi + 0x66], 2
test eax, eax
je 0x568e8e
mov ebx, 0x106
cmp dword [esi], 0
jne 0x568e8e
mov edx, dword [esi + 0x6a]
mov eax, dword [esi + 0x4a]
xor ecx, ecx
mov ebp, dword [esi + 0x52]
mov cl, byte [eax + edx + 2]
and edx, 0x7fff
mov eax, ecx
mov ecx, dword [esi + 0x62]
and ecx, 0x1ff
and eax, 0x3fff
shl ecx, 5
xor eax, ecx
xor ecx, ecx
mov dword [esi + 0x62], eax
mov cx, word [ebp + eax*2]
mov eax, dword [esi + 0x4e]
test ecx, ecx
mov word [eax + edx*2], cx
mov edx, dword [esi + 0x62]
mov eax, dword [esi + 0x52]
mov bp, word [esi + 0x6a]
mov word [eax + edx*2], bp
je 0x568d59
mov edx, dword [esi + 0x6a]
sub edx, ecx
cmp edx, 0x7efa
ja 0x568d59
push esi
push ecx
call fcn.00568a60
mov edi, eax
mov eax, dword [esi + 0x76]
add esp, 8
cmp edi, eax
jbe 0x568d59
mov edi, eax
cmp edi, 3
push esi
jb 0x568e15
mov ecx, dword [esi + 0x6a]
lea eax, [edi - 3]
push eax
mov eax, dword [esi + 0x6e]
sub ecx, eax
push ecx
call fcn.0056a000
mov ecx, dword [esi + 0x76]
mov ebp, eax
mov eax, dword [esi + 0x7e]
add esp, 0xc
sub ecx, edi
cmp edi, eax
mov dword [esi + 0x76], ecx
ja 0x568de5
dec edi
mov ecx, dword [esi + 0x6a]
mov eax, dword [esi + 0x4a]
inc ecx
mov ebx, dword [esi + 0x4e]
mov dword [esi + 0x6a], ecx
mov edx, ecx
xor ecx, ecx
mov cl, byte [eax + edx + 2]
mov eax, dword [esi + 0x62]
and eax, 0x1ff
and ecx, 0x3fff
shl eax, 5
xor ecx, eax
mov eax, dword [esi + 0x52]
mov dword [esi + 0x62], ecx
and edx, 0x7fff
mov cx, word [eax + ecx*2]
dec edi
mov word [ebx + edx*2], cx
mov edx, dword [esi + 0x62]
mov eax, dword [esi + 0x52]
mov cx, word [esi + 0x6a]
mov word [eax + edx*2], cx
jne 0x568d8a
mov eax, dword [esi + 0x6a]
mov ebx, 0x106
inc eax
mov dword [esi + 0x6a], eax
jmp 0x568e3b
mov eax, dword [esi + 0x6a]
mov edx, dword [esi + 0x4a]
add eax, edi
xor ecx, ecx
add edx, eax
mov dword [esi + 0x6a], eax
xor eax, eax
xor edi, edi
mov cl, byte [edx]
mov dword [esi + 0x62], ecx
mov al, byte [edx + 1]
and ecx, 0x1ff
and eax, 0x3fff
shl ecx, 5
xor eax, ecx
mov dword [esi + 0x62], eax
jmp 0x568e3b
mov ecx, dword [esi + 0x4a]
mov edx, dword [esi + 0x6a]
xor eax, eax
mov al, byte [ecx + edx]
push eax
push 0
call fcn.0056a000
mov ecx, dword [esi + 0x76]
mov ebp, eax
mov eax, dword [esi + 0x6a]
add esp, 0xc
dec ecx
inc eax
mov dword [esi + 0x76], ecx
mov dword [esi + 0x6a], eax
test ebp, ebp
je 0x568e67
mov ecx, dword [esi + 0x5a]
test ecx, ecx
jl 0x568e4d
mov eax, dword [esi + 0x4a]
add eax, ecx
jmp 0x568e4f
xor eax, eax
mov edx, dword [esi + 0x6a]
push esi
sub edx, ecx
push 0
push edx
push eax
call fcn.00569d80
mov eax, dword [esi + 0x6a]
add esp, 0x10
mov dword [esi + 0x5a], eax
cmp dword [esi + 0x76], ebx
jae 0x568e83
mov eax, dword [esi + 0x72]
test eax, eax
jne 0x568e83
push esi
call fcn.00568bb0
mov eax, dword [esi + 0x76]
add esp, 4
cmp eax, ebx
jb 0x568e6c
mov eax, dword [esi + 0x76]
test eax, eax
jne 0x568ce1
mov ecx, dword [esi + 0x5a]
test ecx, ecx
jl 0x568e9c
mov eax, dword [esi + 0x4a]
add eax, ecx
jmp 0x568e9e
xor eax, eax
mov edx, dword [esi + 0x6a]
push esi
sub edx, ecx
push 1
push edx
push eax
call fcn.00569d80
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
ret