Function at 0x5856b0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x6bc00c]
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 - 0x2c], esi
mov bl, byte [esi]
mov ecx, dword [esi + 0x28]
mov eax, dword [esi + 0x2c]
mov byte [ebp - 0x15], bl
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x24], eax
test bl, 0x40
jne 0x5856f0
push eax
lea eax, [esi + 0x10]
push eax
push esi
call ecx
add esp, 0xc
movzx eax, bl
mov edx, 0xf
and eax, 7
xor ecx, ecx
sub edx, eax
mov byte [esi], al
mov dword [ebp - 0x30], edx
cmp edx, 0xf
jae 0x585723
nop dword [eax]
movzx eax, byte [esi + edx]
or ecx, eax
mov byte [esi + edx], 0
inc edx
shl ecx, 8
cmp edx, 0xf
jb 0x585710
movzx eax, byte [esi + 0xf]
mov edi, dword [ebp + 0x14]
or ecx, eax
mov byte [esi + 0xf], 1
cmp ecx, edi
je 0x585748
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0049b637
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp + 0xc]
cmp edi, 0x10
jb 0x5857bb
mov eax, edi
shr eax, 4
mov dword [ebp - 0x28], eax
push dword [ebp - 0x24]
lea eax, [ebp - 0x14]
push eax
push esi
call dword [ebp - 0x20]
push esi
call fcn.005860d0
mov ecx, dword [ebx]
mov eax, dword [ebx + 4]
mov edx, dword [ebp - 0x1c]
xor eax, dword [ebp - 0x10]
xor ecx, dword [ebp - 0x14]
push dword [ebp - 0x24]
mov dword [edx + 4], eax
mov dword [edx], ecx
xor dword [esi + 0x14], eax
xor dword [esi + 0x10], ecx
mov ecx, dword [ebx + 8]
mov eax, dword [ebx + 0xc]
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 - 0x20]
add dword [ebp - 0x1c], 0x10
add esp, 0x1c
add ebx, 0x10
sub edi, 0x10
sub dword [ebp - 0x28], 1
jne 0x585758
mov dword [ebp + 0x14], edi
test edi, edi
je 0x585819
push dword [ebp - 0x24]
lea eax, [ebp - 0x14]
push eax
push esi
call dword [ebp - 0x20]
xor edi, edi
add esp, 0xc
cmp dword [ebp + 0x14], edi
jbe 0x585807
lea eax, [ebp - 0x14]
sub ebx, eax
sub dword [ebp - 0x1c], eax
lea eax, [esi + 0x10]
mov esi, dword [ebp + 0x14]
mov dword [ebp - 0x28], eax
lea ecx, [ebp - 0x14]
add ecx, edi
movzx edx, byte [ebx + ecx]
movzx eax, byte [ecx]
xor edx, eax
mov eax, dword [ebp - 0x1c]
mov byte [eax + ecx], dl
mov eax, dword [ebp - 0x28]
xor byte [eax + edi], dl
inc edi
cmp edi, esi
jb 0x5857e5
mov esi, dword [ebp - 0x2c]
push dword [ebp - 0x24]
mov ebx, dword [ebp - 0x20]
lea eax, [esi + 0x10]
push eax
push eax
call ebx
add esp, 0xc
jmp 0x58581c
mov ebx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x30]
cmp edx, 0x10
jae 0x58583e
mov ecx, 0x10
lea edi, [edx + esi]
sub ecx, edx
xor eax, eax
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
push dword [ebp - 0x24]
lea eax, [ebp - 0x14]
push eax
push esi
call ebx
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 ecx, dword [ebp - 4]
pop edi
mov byte [esi], al
xor ecx, ebp
pop esi
xor eax, eax
pop ebx
call fcn.0049b637
mov esp, ebp
pop ebp
ret