Function at 0x58c3d0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x10
push ebx
mov ebx, dword [esp + 0x1c]
push ebp
mov ebp, dword [esp + 0x1c]
push edi
mov edi, ecx
mov dword [esp + 0xc], edi
test ebx, ebx
je 0x58c60f
test bl, 7
jne 0x58c60f
mov eax, dword [esp + 0x28]
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
push esi
cmp eax, 1
jne 0x58c4d8
mov eax, dword [edi + 8]
mov dword [esp + 0x2c], eax
mov eax, dword [edi + 0xc]
mov dword [esp + 0x28], eax
cmp ebx, 8
jb 0x58c603
lea eax, [ebp - 7]
shr ebx, 3
mov dword [esp + 0x24], eax
lea eax, [esp + 0x18]
push eax
push ebp
call fcn.0058bf90
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x20]
mov esi, dword [esp + 0x20]
add esp, 8
mov edi, dword [esp + 0x1c]
push eax
call fcn.0058c000
mov edx, dword [esp + 0x24]
add ebp, 8
mov eax, dword [esp + 0x28]
add edx, 8
xor eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x2c]
xor ecx, dword [esp + 0x18]
mov dword [esp + 0x28], eax
mov dword [esp + 0x1c], eax
mov byte [edx + 6], al
shr eax, 8
mov byte [edx + 5], al
mov eax, dword [esp + 0x28]
shr eax, 0x10
mov byte [edx + 4], al
mov eax, dword [esp + 0x28]
shr eax, 0x18
mov byte [edx + 3], al
mov eax, ecx
shr eax, 8
mov byte [edx + 1], al
mov eax, ecx
mov dword [esp + 0x18], ecx
mov byte [edx + 2], cl
shr eax, 0x10
shr ecx, 0x18
mov byte [edx], al
mov eax, edi
mov byte [edx - 1], cl
mov ecx, esi
mov dword [esp + 0x24], edx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x28], eax
sub ebx, 1
jne 0x58c434
pop esi
pop edi
pop ebp
mov al, 1
pop ebx
add esp, 0x10
ret 0xc
cmp eax, 2
jne 0x58c59a
mov eax, dword [edi + 8]
mov dword [esp + 0x10], eax
mov eax, dword [edi + 0xc]
mov dword [esp + 0x14], eax
cmp ebx, 8
jb 0x58c603
shr ebx, 3
lea eax, [ebp - 7]
mov dword [esp + 0x24], eax
mov esi, ebx
mov dword [esp + 0x28], ebx
lea eax, [esp + 0x18]
push eax
push ebp
call fcn.0058bf90
add esp, 8
lea eax, [esp + 0x10]
mov ecx, edi
push eax
call fcn.0058c620
mov ecx, dword [esp + 0x18]
add ebp, 8
mov ebx, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
xor ebx, ecx
mov edx, dword [esp + 0x14]
xor edx, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], ecx
mov eax, edx
mov ecx, dword [esp + 0x24]
add ecx, 8
shr eax, 8
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x24], ecx
mov byte [ecx + 5], al
mov eax, edx
shr eax, 0x10
mov byte [ecx + 4], al
mov eax, ebx
shr eax, 8
mov byte [ecx + 1], al
mov eax, ebx
mov byte [ecx + 6], dl
shr edx, 0x18
mov byte [ecx + 2], bl
shr eax, 0x10
shr ebx, 0x18
mov byte [ecx + 3], dl
mov byte [ecx], al
mov byte [ecx - 1], bl
sub esi, 1
jne 0x58c508
pop esi
pop edi
pop ebp
mov al, 1
pop ebx
add esp, 0x10
ret 0xc
cmp ebx, 8
jb 0x58c603
lea esi, [ebp - 7]
shr ebx, 3
lea eax, [esp + 0x18]
push eax
push ebp
call fcn.0058bf90
add esp, 8
lea eax, [esp + 0x18]
mov ecx, edi
push eax
call fcn.0058c000
mov ecx, dword [esp + 0x1c]
lea esi, [esi + 8]
mov eax, ecx
mov byte [esi + 6], cl
shr eax, 8
add ebp, 8
mov byte [esi + 5], al
mov eax, ecx
shr eax, 0x10
shr ecx, 0x18
mov byte [esi + 4], al
mov byte [esi + 3], cl
mov ecx, dword [esp + 0x18]
mov eax, ecx
shr eax, 8
mov byte [esi + 1], al
mov eax, ecx
mov byte [esi + 2], cl
shr eax, 0x10
shr ecx, 0x18
mov byte [esi], al
mov byte [esi - 1], cl
sub ebx, 1
jne 0x58c5a5
pop esi
pop edi
pop ebp
mov al, 1
pop ebx
add esp, 0x10
ret 0xc
pop edi
pop ebp
xor al, al
pop ebx
add esp, 0x10
ret 0xc