Function at 0x57e580
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0x1c]
sub esp, 0xc
cmp dword [ebp + 0x20], 0
mov eax, dword [ebp + 0x10]
push ebx
push esi
mov esi, dword [ecx]
push edi
je 0x57e67f
test eax, eax
je 0x57e76a
mov edx, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
sub edx, ecx
mov dword [ebp - 4], edx
mov edx, dword [ebp + 0x18]
mov dword [ebp + 0x20], ecx
dec eax
mov dword [ebp + 0x10], eax
test esi, esi
jne 0x57e652
movzx eax, byte [edx]
lea ebx, [edx + 1]
movzx ecx, byte [ebx]
movzx edx, byte [ebx + 3]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebx + 1]
shl eax, 0x10
or ecx, eax
movzx eax, byte [ebx + 2]
shl eax, 0x18
or ecx, eax
movzx eax, byte [ebx + 4]
mov dword [ebp - 0xc], ecx
movzx ecx, byte [ebx + 6]
shl eax, 8
or edx, eax
shl ecx, 8
movzx eax, byte [ebx + 5]
or ecx, eax
lea eax, [ebp - 0xc]
push 1
push dword [ebp + 0x14]
shl ecx, 0x10
or ecx, edx
push eax
mov dword [ebp - 8], ecx
call fcn.0056cea0
mov ecx, dword [ebp - 0xc]
add esp, 0xc
mov edx, dword [ebp + 0x18]
mov eax, ecx
shr eax, 8
mov byte [edx], cl
mov byte [ebx], al
mov eax, ecx
shr eax, 0x10
mov byte [ebx + 1], al
shr ecx, 0x18
mov byte [ebx + 2], cl
mov ecx, dword [ebp - 8]
mov eax, ecx
mov byte [ebx + 3], cl
shr eax, 8
mov byte [ebx + 4], al
mov eax, ecx
shr eax, 0x10
shr ecx, 0x18
mov byte [ebx + 5], al
mov byte [ebx + 6], cl
mov ecx, dword [ebp + 0x20]
mov eax, dword [ebp - 4]
mov al, byte [eax + ecx]
xor al, byte [esi + edx]
mov byte [ecx], al
inc ecx
mov byte [esi + edx], al
inc esi
mov eax, dword [ebp + 0x10]
and esi, 7
mov dword [ebp + 0x20], ecx
test eax, eax
jne 0x57e5b4
mov eax, dword [ebp + 0x1c]
pop edi
mov dword [eax], esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test eax, eax
je 0x57e76a
mov edx, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
mov edi, dword [ebp + 0x18]
mov dword [ebp - 4], edx
mov dword [ebp + 0x20], ebx
dec eax
mov dword [ebp + 0x10], eax
test esi, esi
jne 0x57e73b
mov eax, dword [ebp + 0x18]
movzx ecx, byte [eax + 1]
lea ebx, [eax + 1]
movzx edx, byte [ebx + 3]
shl ecx, 8
movzx eax, byte [eax]
or ecx, eax
movzx eax, byte [ebx + 1]
shl eax, 0x10
or ecx, eax
movzx eax, byte [ebx + 2]
shl eax, 0x18
or ecx, eax
movzx eax, byte [ebx + 4]
mov dword [ebp - 0xc], ecx
movzx ecx, byte [ebx + 6]
shl eax, 8
or edx, eax
shl ecx, 8
movzx eax, byte [ebx + 5]
or ecx, eax
lea eax, [ebp - 0xc]
push 1
push dword [ebp + 0x14]
shl ecx, 0x10
or ecx, edx
push eax
mov dword [ebp - 8], ecx
call fcn.0056cea0
mov ecx, dword [ebp - 0xc]
add esp, 0xc
mov edi, dword [ebp + 0x18]
mov eax, ecx
mov edx, dword [ebp - 4]
shr eax, 8
mov byte [edi], cl
mov byte [ebx], al
mov eax, ecx
shr eax, 0x10
mov byte [ebx + 1], al
shr ecx, 0x18
mov byte [ebx + 2], cl
mov ecx, dword [ebp - 8]
mov eax, ecx
mov byte [ebx + 3], cl
shr eax, 8
mov byte [ebx + 4], al
mov eax, ecx
shr eax, 0x10
mov byte [ebx + 5], al
shr ecx, 0x18
mov byte [ebx + 6], cl
mov ebx, dword [ebp + 0x20]
mov al, byte [esi + edi]
mov cl, byte [ebx]
inc ebx
mov byte [esi + edi], cl
xor cl, al
mov eax, dword [ebp + 0x10]
inc esi
mov byte [edx], cl
and esi, 7
inc edx
mov dword [ebp + 0x20], ebx
mov dword [ebp - 4], edx
test eax, eax
jne 0x57e696
mov eax, dword [ebp + 0x1c]
pop edi
mov dword [eax], esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
mov dword [ecx], esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret