Function at 0x5869cc
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x8d5f40]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x1c], eax
push edi
mov dword [ebp - 0x34], esi
mov bl, byte [esi]
mov ecx, dword [esi + 0x28]
mov eax, dword [esi + 0x2c]
mov byte [ebp - 0x15], bl
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x28], eax
test bl, 0x40
jne 0x586a0c
push eax
lea eax, [esi + 0x10]
push eax
push esi
call ecx
add esp, 0xc
movzx eax, bl
xor ecx, ecx
push 0xf
and eax, 7
pop edx
sub edx, eax
mov byte [esi], al
mov dword [ebp - 0x3c], edx
jmp 0x586a2e
movzx eax, byte [esi + edx]
or ecx, eax
mov byte [esi + edx], 0
shl ecx, 8
inc edx
cmp edx, 0xf
jb 0x586a20
movzx eax, byte [esi + 0xf]
mov edi, dword [ebp + 0x14]
or ecx, eax
mov byte [esi + 0xf], 1
cmp ecx, edi
je 0x586a4c
or eax, 0xffffffff
jmp 0x586b91
push 0x10
pop ebx
cmp edi, ebx
jb 0x586af1
push 0xfffffffffffffff8
pop eax
sub eax, esi
mov dword [ebp - 0x38], eax
lea eax, [esi + 0x10]
mov dword [ebp - 0x2c], eax
mov eax, edi
shr eax, 4
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x20], eax
push dword [ebp - 0x28]
lea eax, [ebp - 0x14]
push eax
push esi
call dword [ebp - 0x24]
mov ecx, dword [ebp - 0x2c]
add esp, 0xc
mov esi, dword [ebp - 0x38]
dec ecx
add byte [ecx], 1
jne 0x586a94
lea eax, [esi + ecx]
test eax, eax
jne 0x586a87
mov edx, dword [ebp - 0x20]
mov esi, dword [ebp - 0x34]
push dword [ebp - 0x28]
mov ecx, dword [edx]
mov eax, dword [edx + 4]
xor eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0x1c]
xor ecx, dword [ebp - 0x14]
mov dword [edx + 4], eax
mov dword [edx], ecx
mov edx, dword [ebp - 0x2c]
xor dword [edx + 4], eax
xor dword [edx], ecx
mov edx, dword [ebp - 0x20]
mov ecx, dword [edx + 8]
mov eax, dword [edx + 0xc]
mov edx, dword [ebp - 0x1c]
xor eax, dword [ebp - 8]
xor ecx, dword [ebp - 0xc]
mov dword [edx + 0xc], eax
mov dword [edx + 8], ecx
xor dword [esi + 0x1c], eax
lea eax, [esi + 0x10]
xor dword [esi + 0x18], ecx
push eax
push eax
call dword [ebp - 0x24]
add dword [ebp - 0x20], ebx
add esp, 0xc
add dword [ebp - 0x1c], ebx
sub edi, ebx
sub dword [ebp - 0x30], 1
jne 0x586a73
jmp 0x586af7
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x20], eax
test edi, edi
je 0x586b4b
push dword [ebp - 0x28]
lea eax, [ebp - 0x14]
push eax
push esi
call dword [ebp - 0x24]
add esp, 0xc
xor edx, edx
test edi, edi
je 0x586b39
mov ebx, dword [ebp - 0x20]
lea eax, [ebp - 0x14]
sub ebx, eax
sub dword [ebp - 0x1c], eax
mov esi, dword [ebp - 0x1c]
lea eax, [ebp - 0x14]
add eax, edx
mov cl, byte [ebx + eax]
xor cl, byte [eax]
mov byte [esi + eax], cl
mov esi, dword [ebp - 0x34]
xor byte [esi + edx + 0x10], cl
inc edx
cmp edx, edi
jb 0x586b1a
push 0x10
pop ebx
push dword [ebp - 0x28]
mov edi, dword [ebp - 0x24]
lea eax, [esi + 0x10]
push eax
push eax
call edi
add esp, 0xc
jmp 0x586b4e
mov edi, dword [ebp - 0x24]
mov eax, dword [ebp - 0x3c]
cmp eax, ebx
jae 0x586b65
sub ebx, eax
add eax, esi
push ebx
push 0
push eax
call fcn.00718210
add esp, 0xc
push dword [ebp - 0x28]
lea eax, [ebp - 0x14]
push eax
push esi
call edi
mov eax, dword [ebp - 0x14]
add esp, 0xc
xor dword [esi + 0x10], eax
mov eax, dword [ebp - 0x10]
xor dword [esi + 0x14], eax
mov eax, dword [ebp - 0xc]
xor dword [esi + 0x18], eax
mov eax, dword [ebp - 8]
xor dword [esi + 0x1c], eax
mov al, byte [ebp - 0x15]
mov byte [esi], al
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.006fedff
leave
ret