Function at 0x568ec0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push esi
mov esi, dword [esp + 0xc]
xor ebp, ebp
push edi
mov edi, 2
cmp dword [esi + 0xd88], 3
jg 0x568ee4
push esi
call fcn.00568cc0
add esp, 4
pop edi
pop esi
pop ebp
ret
mov eax, dword [esi + 0x76]
test eax, eax
je 0x569116
push ebx
cmp dword [esi], 0
jne 0x5690f9
mov edx, dword [esi + 0x6a]
mov eax, dword [esi + 0x4a]
xor ecx, ecx
mov ebx, dword [esi + 0x52]
mov cl, byte [edx + eax + 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 [ebx + 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 bx, word [esi + 0x6a]
mov word [eax + edx*2], bx
mov ebx, dword [esi + 0x6e]
mov dword [esi + 0x66], edi
mov edi, 2
je 0x568f95
mov edx, dword [esi + 0x66]
mov eax, dword [esi + 0x7e]
cmp edx, eax
jae 0x568f95
mov eax, dword [esi + 0x6a]
sub eax, ecx
cmp eax, 0x7efa
ja 0x568f95
push esi
push ecx
call fcn.00568a60
mov edi, eax
mov eax, dword [esi + 0x76]
add esp, 8
cmp edi, eax
jbe 0x568f7b
mov edi, eax
cmp edi, 3
jne 0x568f95
mov ecx, dword [esi + 0x6a]
mov edx, dword [esi + 0x6e]
sub ecx, edx
cmp ecx, 0x1000
jbe 0x568f95
mov edi, 2
mov eax, dword [esi + 0x66]
cmp eax, 3
jb 0x56906c
cmp edi, eax
ja 0x56906c
mov edx, dword [esi + 0x6a]
add eax, 0xfffffffd
sub edx, ebx
push esi
dec edx
push eax
push edx
call fcn.0056a000
mov ecx, dword [esi + 0x66]
mov edi, dword [esi + 0x76]
mov edx, 1
add esp, 0xc
sub edx, ecx
add edi, edx
add ecx, 0xfffffffe
mov dword [esi + 0x76], edi
mov dword [esi + 0x66], ecx
mov ebx, dword [esi + 0x6a]
mov ecx, dword [esi + 0x4a]
mov edi, dword [esi + 0x62]
inc ebx
mov dword [esi + 0x6a], ebx
mov edx, ebx
xor ebx, ebx
and edi, 0x1ff
mov bl, byte [edx + ecx + 2]
and edx, 0x7fff
mov ecx, ebx
mov ebx, dword [esi + 0x4e]
and ecx, 0x3fff
shl edi, 5
xor ecx, edi
mov edi, dword [esi + 0x52]
mov dword [esi + 0x62], ecx
mov cx, word [edi + ecx*2]
mov word [ebx + edx*2], cx
mov edx, dword [esi + 0x62]
mov ecx, dword [esi + 0x52]
mov di, word [esi + 0x6a]
mov word [ecx + edx*2], di
mov ecx, dword [esi + 0x66]
dec ecx
mov dword [esi + 0x66], ecx
jne 0x568fd5
mov ebx, dword [esi + 0x6a]
xor ebp, ebp
inc ebx
mov edi, 2
test eax, eax
mov dword [esi + 0x6a], ebx
mov ecx, ebx
je 0x5690cb
mov edx, dword [esi + 0x5a]
test edx, edx
jl 0x569053
mov ebx, dword [esi + 0x4a]
mov eax, edx
add eax, ebx
jmp 0x569055
xor eax, eax
push esi
sub ecx, edx
push 0
push ecx
push eax
call fcn.00569d80
mov edx, dword [esi + 0x6a]
add esp, 0x10
mov dword [esi + 0x5a], edx
jmp 0x5690cb
test ebp, ebp
je 0x5690b8
mov eax, dword [esi + 0x6a]
mov ecx, dword [esi + 0x4a]
xor edx, edx
push esi
mov dl, byte [eax + ecx - 1]
push edx
push 0
call fcn.0056a000
add esp, 0xc
test eax, eax
je 0x5690bd
mov ecx, dword [esi + 0x5a]
test ecx, ecx
jl 0x56909c
mov edx, dword [esi + 0x4a]
mov eax, ecx
add eax, edx
jmp 0x56909e
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
jmp 0x5690bd
mov ebp, 1
mov ecx, dword [esi + 0x6a]
mov eax, dword [esi + 0x76]
inc ecx
dec eax
mov dword [esi + 0x6a], ecx
mov dword [esi + 0x76], eax
mov eax, dword [esi + 0x76]
mov ebx, 0x106
cmp eax, ebx
jae 0x5690ee
mov eax, dword [esi + 0x72]
test eax, eax
jne 0x5690ee
push esi
call fcn.00568bb0
mov eax, dword [esi + 0x76]
add esp, 4
cmp eax, ebx
jb 0x5690d7
mov eax, dword [esi + 0x76]
test eax, eax
jne 0x568ef0
test ebp, ebp
pop ebx
je 0x569116
mov ecx, dword [esi + 0x6a]
mov edx, dword [esi + 0x4a]
xor eax, eax
push esi
mov al, byte [ecx + edx - 1]
push eax
push 0
call fcn.0056a000
add esp, 0xc
mov ecx, dword [esi + 0x5a]
test ecx, ecx
jl 0x569124
mov eax, dword [esi + 0x4a]
add eax, ecx
jmp 0x569126
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
ret