Function at 0x58e430
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x18
call fcn.005eb280
mov ecx, dword [esp + 0x28]
xor edx, edx
push ebx
push esi
mov esi, dword [esp + 0x24]
mov eax, dword [esi + 0x170]
mov ebx, dword [esi + 0x160]
mov dword [esp + 0x10], eax
mov eax, dword [esi + 0x174]
mov dword [esp + 0xc], eax
mov eax, dword [esi + 0x164]
mov dword [esp + 0x18], eax
mov eax, ecx
add eax, dword [esi + 0x38]
mov dword [esp + 0x14], ebx
adc edx, dword [esi + 0x3c]
cmp edx, 0xf
ja 0x58e6af
jb 0x58e48a
cmp eax, 0xffffffe0
ja 0x58e6af
cmp dword [esi + 0x16c], 0
mov dword [esi + 0x38], eax
mov dword [esi + 0x3c], edx
je 0x58e4b4
lea eax, [esi + 0x60]
push eax
lea eax, [esi + 0x40]
push eax
call ebx
mov ecx, dword [esp + 0x38]
add esp, 8
mov dword [esi + 0x16c], 0
mov eax, dword [esi + 0xc]
mov ebx, dword [esp + 0x2c]
push ebp
mov ebp, dword [esi + 0x168]
mov dword [esp + 0xc], ebp
bswap eax
mov dword [esp + 0x28], eax
push edi
mov edi, dword [esp + 0x30]
test ebp, ebp
je 0x58e50f
test ecx, ecx
je 0x58e4f8
mov al, byte [esi + ebp + 0x10]
dec ecx
xor al, byte [edi]
inc edi
mov byte [ebx], al
inc ebx
xor byte [esi + ebp + 0x40], al
inc ebp
and ebp, 0xf
mov dword [esp + 0x38], ecx
mov dword [esp + 0x10], ebp
jne 0x58e4d5
jmp 0x58e500
test ebp, ebp
jne 0x58e69f
lea eax, [esi + 0x60]
push eax
lea eax, [esi + 0x40]
push eax
call dword [esp + 0x24]
add esp, 8
mov ecx, dword [esp + 0x38]
cmp ecx, 0xc00
jb 0x58e5c1
mov ebp, dword [esp + 0x2c]
mov eax, 0xaaaaaaab
mul ecx
shr edx, 0xb
mov dword [esp + 0x1c], edx
mov dword [esp + 0x2c], 0xc0
lea esp, [esp]
push dword [esp + 0x14]
lea eax, [esi + 0x10]
push eax
push esi
call dword [esp + 0x24]
inc ebp
add esp, 0xc
mov eax, ebp
bswap eax
mov dword [esi + 0xc], eax
mov eax, dword [esi + 0x10]
xor eax, dword [edi]
mov dword [ebx], eax
mov eax, dword [edi + 4]
xor eax, dword [esi + 0x14]
mov dword [ebx + 4], eax
mov eax, dword [edi + 8]
xor eax, dword [esi + 0x18]
mov dword [ebx + 8], eax
mov eax, dword [edi + 0xc]
add edi, 0x10
xor eax, dword [esi + 0x1c]
mov dword [ebx + 0xc], eax
add ebx, 0x10
dec dword [esp + 0x2c]
jne 0x58e540
push 0xc00
lea eax, [ebx - 0xc00]
mov dword [esp + 0x30], ebp
push eax
lea eax, [esi + 0x60]
push eax
lea eax, [esi + 0x40]
push eax
call dword [esp + 0x30]
mov ecx, dword [esp + 0x48]
add esp, 0x10
sub ecx, 0xc00
dec dword [esp + 0x1c]
mov dword [esp + 0x38], ecx
jne 0x58e531
mov ebp, dword [esp + 0x10]
mov edx, ecx
and edx, 0xfffffff0
mov dword [esp + 0x24], edx
je 0x58e657
cmp ecx, 0x10
jb 0x58e63e
mov ebp, dword [esp + 0x38]
lea eax, [esi + 0x10]
shr ecx, 4
mov dword [esp + 0x1c], ecx
push dword [esp + 0x14]
push eax
push esi
call dword [esp + 0x24]
mov eax, dword [esp + 0x38]
add esp, 0xc
inc eax
sub ebp, 0x10
mov dword [esp + 0x2c], eax
bswap eax
mov dword [esi + 0xc], eax
mov eax, dword [esi + 0x10]
xor eax, dword [edi]
mov dword [ebx], eax
mov eax, dword [edi + 4]
xor eax, dword [esi + 0x14]
mov dword [ebx + 4], eax
mov eax, dword [edi + 8]
xor eax, dword [esi + 0x18]
mov dword [ebx + 8], eax
mov eax, dword [edi + 0xc]
add edi, 0x10
xor eax, dword [esi + 0x1c]
mov dword [ebx + 0xc], eax
add ebx, 0x10
dec dword [esp + 0x1c]
lea eax, [esi + 0x10]
jne 0x58e5e3
mov edx, dword [esp + 0x24]
mov dword [esp + 0x38], ebp
mov ebp, dword [esp + 0x10]
push edx
mov eax, ebx
sub eax, edx
push eax
lea eax, [esi + 0x60]
push eax
lea eax, [esi + 0x40]
push eax
call dword [esp + 0x30]
mov ecx, dword [esp + 0x48]
add esp, 0x10
test ecx, ecx
je 0x58e69f
push dword [esp + 0x14]
lea eax, [esi + 0x10]
push eax
push esi
call dword [esp + 0x24]
mov eax, dword [esp + 0x38]
add esp, 0xc
mov edx, dword [esp + 0x38]
inc eax
bswap eax
mov dword [esi + 0xc], eax
sub edi, ebx
lea eax, [ebx + ebp]
mov dword [esp + 0x2c], eax
mov ebx, eax
movzx eax, byte [edi + ebx]
lea ebx, [ebx + 1]
movzx ecx, byte [esi + ebp + 0x10]
xor ecx, eax
lea eax, [esi + ebp]
mov byte [ebx - 1], cl
inc ebp
xor byte [eax + 0x40], cl
dec edx
jne 0x58e684
pop edi
mov dword [esi + 0x168], ebp
xor eax, eax
pop ebp
pop esi
pop ebx
add esp, 0x18
ret
pop esi
or eax, 0xffffffff
pop ebx
add esp, 0x18
ret