Function at 0x58c920
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x20
call fcn.005cf470
mov eax, dword [esp + 0x34]
movzx edx, byte [eax + 4]
push ebx
push ebp
push esi
lea esi, [eax + 1]
shl edx, 0x18
movzx eax, byte [eax]
shl eax, 8
cmp dword [esp + 0x44], 0
push edi
je 0x58cb6d
movzx ecx, byte [esi]
mov ebx, dword [esp + 0x3c]
or ecx, eax
movzx eax, byte [esi + 1]
mov edi, dword [esp + 0x34]
shl eax, 8
shl ecx, 0x10
lea ebp, [ebx - 8]
or ecx, eax
movzx eax, byte [esi + 2]
or ecx, eax
movzx eax, byte [esi + 4]
shl eax, 0x10
or edx, eax
mov dword [esp + 0x48], ecx
movzx eax, byte [esi + 5]
shl eax, 8
or edx, eax
lea eax, [esi + 6]
mov esi, dword [esp + 0x38]
mov dword [esp + 0x1c], eax
movzx eax, byte [eax]
or edx, eax
mov dword [esp + 0x10], edx
test ebp, ebp
js 0x58ca62
shr ebx, 3
mov eax, ebx
neg eax
lea ebp, [ebp + eax*8]
nop dword [eax]
movzx edx, byte [edi]
movzx eax, byte [edi + 1]
movzx ecx, byte [edi + 4]
shl eax, 0x10
push dword [esp + 0x40]
shl edx, 0x18
or edx, eax
shl ecx, 0x18
movzx eax, byte [edi + 2]
shl eax, 8
or edx, eax
movzx eax, byte [edi + 3]
or edx, eax
movzx eax, byte [edi + 5]
xor edx, dword [esp + 0x4c]
shl eax, 0x10
or ecx, eax
mov dword [esp + 0x2c], edx
movzx eax, byte [edi + 6]
shl eax, 8
or ecx, eax
movzx eax, byte [edi + 7]
or ecx, eax
add edi, 8
xor ecx, dword [esp + 0x14]
lea eax, [esp + 0x2c]
push eax
mov dword [esp + 0x34], ecx
call fcn.0058d210
mov ecx, dword [esp + 0x30]
add esp, 8
mov edx, dword [esp + 0x2c]
mov eax, ecx
shr eax, 0x18
mov byte [esi], al
mov eax, ecx
shr eax, 0x10
mov byte [esi + 1], al
mov eax, ecx
shr eax, 8
mov byte [esi + 2], al
mov eax, edx
shr eax, 0x18
mov byte [esi + 4], al
mov eax, edx
shr eax, 0x10
mov byte [esi + 5], al
mov eax, edx
shr eax, 8
mov byte [esi + 3], cl
mov byte [esi + 6], al
mov byte [esi + 7], dl
add esi, 8
mov dword [esp + 0x48], ecx
mov dword [esp + 0x10], edx
sub ebx, 1
jne 0x58c9b0
cmp ebp, 0xfffffff8
je 0x58cb24
lea ecx, [edi + 8]
xor ebx, ebx
add ecx, ebp
xor edi, edi
add ebp, 7
cmp ebp, 7
ja case.default.0x58ca7c
jmp dword [ebp*4 + 0x58ce00]
movzx edi, byte [ecx - 1]
dec ecx
movzx eax, byte [ecx - 1]
dec ecx
shl eax, 8
or edi, eax
movzx eax, byte [ecx - 1]
dec ecx
shl eax, 0x10
or edi, eax
movzx eax, byte [ecx - 1]
dec ecx
shl eax, 0x18
or edi, eax
movzx ebx, byte [ecx - 1]
dec ecx
movzx eax, byte [ecx - 1]
dec ecx
shl eax, 8
or ebx, eax
movzx eax, byte [ecx - 1]
dec ecx
shl eax, 0x10
or ebx, eax
movzx eax, byte [ecx - 1]
shl eax, 0x18
or ebx, eax
push dword [esp + 0x40]
xor ebx, dword [esp + 0x4c]
lea eax, [esp + 0x2c]
xor edi, edx
mov dword [esp + 0x2c], ebx
push eax
mov dword [esp + 0x34], edi
call fcn.0058d210
mov ecx, dword [esp + 0x30]
add esp, 8
mov edx, dword [esp + 0x2c]
mov eax, ecx
shr eax, 0x18
mov byte [esi], al
mov eax, ecx
shr eax, 0x10
mov byte [esi + 1], al
mov eax, ecx
shr eax, 8
mov byte [esi + 2], al
mov eax, edx
shr eax, 0x18
mov byte [esi + 4], al
mov eax, edx
shr eax, 0x10
mov byte [esi + 5], al
mov eax, edx
shr eax, 8
mov byte [esi + 3], cl
mov byte [esi + 6], al
mov byte [esi + 7], dl
mov ebp, dword [esp + 0x1c]
mov ebx, edx
mov esi, edx
shr ebx, 0x10
shr esi, 0x18
lea edi, [ebp - 6]
lea eax, [edi + 4]
mov dword [esp + 0x20], eax
mov eax, edx
shr eax, 8
mov dword [esp + 0x3c], eax
mov eax, ecx
shr eax, 8
mov dword [esp + 0x18], eax
mov eax, ecx
shr eax, 0x10
mov dword [esp + 0x1c], eax
mov eax, ecx
shr eax, 0x18
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x24], eax
jmp 0x58cdbd
movzx ebp, byte [esi]
or ebp, eax
movzx eax, byte [esi + 1]
shl eax, 8
shl ebp, 0x10
or ebp, eax
movzx eax, byte [esi + 2]
or ebp, eax
lea eax, [esi + 4]
mov ecx, eax
mov esi, dword [esp + 0x38]
mov dword [esp + 0x20], eax
mov ebx, ecx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x48], ebp
movzx eax, byte [ecx]
shl eax, 0x10
or edx, eax
movzx eax, byte [ecx + 1]
shl eax, 8
or edx, eax
lea eax, [ebx + 2]
mov ebx, dword [esp + 0x34]
mov dword [esp + 0x1c], eax
movzx eax, byte [eax]
or edx, eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x10], edx
lea ecx, [eax - 8]
mov dword [esp + 0x18], ecx
test ecx, ecx
js 0x58ccb7
shr eax, 3
mov dword [esp + 0x3c], eax
neg eax
mov dword [esp + 0x14], esi
lea ecx, [ecx + eax*8]
mov dword [esp + 0x18], ecx
jmp 0x58cbf4
mov ebp, dword [esp + 0x48]
movzx edi, byte [ebx]
movzx eax, byte [ebx + 1]
movzx esi, byte [ebx + 4]
shl eax, 0x10
push dword [esp + 0x40]
shl edi, 0x18
or edi, eax
shl esi, 0x18
movzx eax, byte [ebx + 2]
shl eax, 8
or edi, eax
movzx eax, byte [ebx + 3]
or edi, eax
movzx eax, byte [ebx + 5]
shl eax, 0x10
or esi, eax
mov dword [esp + 0x2c], edi
movzx eax, byte [ebx + 6]
shl eax, 8
or esi, eax
movzx eax, byte [ebx + 7]
or esi, eax
add ebx, 8
lea eax, [esp + 0x2c]
mov dword [esp + 0x30], esi
push eax
call fcn.0058ce40
mov ecx, dword [esp + 0x30]
add esp, 8
mov edx, dword [esp + 0x2c]
xor ecx, ebp
mov ebp, dword [esp + 0x14]
mov eax, ecx
xor edx, dword [esp + 0x10]
shr eax, 0x18
mov byte [ebp], al
mov eax, ecx
shr eax, 0x10
mov byte [ebp + 1], al
mov eax, ecx
shr eax, 8
mov byte [ebp + 2], al
mov eax, edx
shr eax, 0x18
mov byte [ebp + 4], al
mov eax, edx
shr eax, 0x10
mov byte [ebp + 5], al
mov eax, edx
shr eax, 8
mov byte [ebp + 3], cl
mov ecx, edi
mov byte [ebp + 7], dl
mov edx, esi
mov byte [ebp + 6], al
add ebp, 8
sub dword [esp + 0x3c], 1
mov dword [esp + 0x14], ebp
mov dword [esp + 0x48], ecx
mov dword [esp + 0x10], edx
jne 0x58cbf0
mov esi, ebp
jmp 0x58ccbb
mov ecx, dword [esp + 0x48]
cmp dword [esp + 0x18], 0xfffffff8
je 0x58cd84
movzx edi, byte [ebx]
movzx eax, byte [ebx + 1]
movzx edx, byte [ebx + 4]
movzx ecx, byte [ebx + 6]
push dword [esp + 0x40]
shl eax, 0x10
shl edi, 0x18
or edi, eax
shl edx, 0x18
movzx eax, byte [ebx + 2]
shl eax, 8
or edi, eax
shl ecx, 8
movzx eax, byte [ebx + 3]
or edi, eax
movzx eax, byte [ebx + 5]
shl eax, 0x10
or edx, eax
mov dword [esp + 0x2c], edi
movzx eax, byte [ebx + 7]
or ecx, eax
lea eax, [esp + 0x2c]
or edx, ecx
push eax
mov dword [esp + 0x44], edx
mov dword [esp + 0x34], edx
call fcn.0058ce40
mov eax, dword [esp + 0x20]
add esp, 8
mov edx, dword [esp + 0x28]
mov ebx, dword [esp + 0x2c]
xor edx, dword [esp + 0x48]
xor ebx, dword [esp + 0x10]
lea ecx, [eax + 8]
add eax, 7
add ecx, esi
cmp eax, 7
ja case.default.0x58cd41
jmp dword [eax*4 + 0x58ce20]
dec ecx
mov byte [ecx], bl
dec ecx
mov eax, ebx
shr eax, 8
mov byte [ecx], al
dec ecx
mov eax, ebx
shr eax, 0x10
mov byte [ecx], al
dec ecx
shr ebx, 0x18
mov byte [ecx], bl
dec ecx
mov byte [ecx], dl
dec ecx
mov eax, edx
shr eax, 8
mov byte [ecx], al
dec ecx
mov eax, edx
shr eax, 0x10
mov byte [ecx], al
shr edx, 0x18
mov byte [ecx - 1], dl
mov edx, dword [esp + 0x3c]
mov ecx, edi
mov dword [esp + 0x10], edx
mov ebp, dword [esp + 0x1c]
mov eax, edx
shr eax, 8
mov ebx, edx
mov dword [esp + 0x3c], eax
mov esi, edx
mov eax, ecx
shr ebx, 0x10
shr eax, 8
lea edi, [ebp - 6]
mov dword [esp + 0x18], eax
mov edx, ecx
mov eax, ecx
shr esi, 0x18
shr eax, 0x10
shr edx, 0x18
mov dword [esp + 0x48], edx
mov edx, dword [esp + 0x10]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x48]
mov byte [ebp - 7], al
mov eax, dword [esp + 0x1c]
mov byte [edi], al
mov eax, dword [esp + 0x18]
mov dword [esp + 0x14], esi
mov esi, edi
mov byte [edi + 1], al
mov eax, dword [esp + 0x20]
pop edi
mov byte [esi + 2], cl
mov ecx, dword [esp + 0x10]
mov byte [esi + 3], cl
mov ecx, dword [esp + 0x20]
mov byte [eax], bl
mov eax, dword [esp + 0x38]
pop esi
pop ebp
mov byte [ecx + 1], al
mov byte [ecx + 2], dl
pop ebx
add esp, 0x20
ret