Function at 0x585590
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x24
call fcn.005bc520
cmp dword [esp + 0x2c], 0
push esi
mov dword [esp + 8], 0
jle 0x585994
mov esi, dword [esp + 0x38]
test esi, esi
jle 0x585994
push ebp
mov ebp, dword [esp + 0x40]
cmp esi, ebp
jg 0x585976
cmp ebp, 0xb
jl 0x585976
push ebx
push 0x7f
push 0x6484e0
push ebp
call fcn.00536f80
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x585609
push 0x81
push 0x6484e0
push 0x41
push 0x72
push 4
call fcn.00530c60
add esp, 0x14
or eax, 0xffffffff
pop ebx
pop ebp
pop esi
add esp, 0x24
ret
mov edx, dword [esp + 0x3c]
add ebx, ebp
add edx, esi
mov dword [esp + 0x1c], ebx
push edi
test ebp, ebp
jle 0x585647
mov edi, ebp
lea esp, [esp]
mov eax, esi
lea ecx, [esi - 1]
not eax
shr ecx, 0x1f
shr eax, 0x1f
dec ebx
and ecx, eax
dec ecx
mov eax, ecx
and eax, 1
sub edx, eax
sub esi, eax
mov al, byte [edx]
and al, cl
mov byte [ebx], al
dec edi
jne 0x585620
mov dword [esp + 0x20], ebx
movzx eax, byte [ebx + 1]
xor esi, esi
movzx ecx, byte [ebx]
xor eax, 2
mov edi, 2
lea edx, [eax - 1]
not eax
shr eax, 0x1f
shr edx, 0x1f
and edx, eax
lea eax, [ecx - 1]
shr eax, 0x1f
not ecx
shr ecx, 0x1f
neg edx
and eax, ecx
neg eax
and edx, eax
mov dword [esp + 0x1c], edx
mov eax, edx
not eax
mov dword [esp + 0x10], edx
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x1c]
mov eax, dword [esp + 0x24]
and eax, 0x6b
mov dword [esp + 0x1c], esi
mov dword [esp + 0x30], eax
xor eax, eax
mov dword [esp + 0x18], eax
cmp ebp, edi
jle 0x585725
or esi, 0xffffffff
lea esp, [esp]
movzx eax, byte [edi + ebx]
lea edx, [eax - 1]
not eax
shr eax, 0x1f
shr edx, 0x1f
and edx, eax
neg edx
and esi, edx
mov dword [esp + 0x28], esi
not esi
mov dword [esp + 0x2c], esi
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x2c]
and ecx, edi
and eax, dword [esp + 0x14]
or ecx, eax
movzx eax, byte [edi + ebx]
mov dword [esp + 0x14], ecx
xor eax, 3
mov ecx, dword [esp + 0x18]
inc edi
or ecx, edx
mov esi, ecx
mov dword [esp + 0x18], ecx
lea ecx, [eax - 1]
not esi
not eax
shr ecx, 0x1f
shr eax, 0x1f
and ecx, eax
mov eax, esi
neg ecx
and eax, 1
add eax, dword [esp + 0x1c]
or ecx, dword [esp + 0x18]
and ecx, eax
mov dword [esp + 0x1c], ecx
cmp edi, ebp
jl 0x5856b0
mov edx, dword [esp + 0x10]
mov esi, ecx
mov ecx, dword [esp + 0x14]
lea eax, [ecx - 0xa]
or eax, ecx
xor eax, ecx
shr eax, 0x1f
dec eax
and edx, eax
mov dword [esp + 0x10], edx
or edx, dword [esp + 0x24]
mov dword [esp + 0x2c], edx
not edx
mov dword [esp + 0x28], edx
mov edx, dword [esp + 0x2c]
and edx, dword [esp + 0x30]
mov eax, dword [esp + 0x28]
mov edi, dword [esp + 0x10]
and eax, 0x71
or edx, eax
mov ecx, edi
lea eax, [esi - 8]
not ecx
or eax, esi
xor eax, esi
shr eax, 0x1f
dec eax
and edi, eax
mov eax, edi
mov dword [esp + 0x10], edi
or eax, ecx
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x30], eax
not eax
mov dword [esp + 0x2c], eax
mov esi, dword [esp + 0x30]
mov eax, dword [esp + 0x2c]
and esi, edx
and eax, 0x73
mov edx, edi
or esi, eax
mov edi, ebp
sub edi, dword [esp + 0x14]
not edx
dec edi
sub ecx, edi
mov dword [esp + 0x24], edi
xor ecx, edi
mov eax, edi
xor eax, dword [esp + 0x3c]
or ecx, eax
mov eax, dword [esp + 0x10]
xor ecx, dword [esp + 0x3c]
shr ecx, 0x1f
dec ecx
and eax, ecx
mov dword [esp + 0x10], eax
or eax, edx
mov dword [esp + 0x30], eax
not eax
mov dword [esp + 0x2c], eax
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x2c]
and ecx, esi
mov esi, dword [esp + 0x3c]
and eax, 0x6d
or ecx, eax
mov dword [esp + 0x1c], ecx
lea ecx, [ebp - 0xb]
mov edx, ecx
mov eax, ecx
sub edx, esi
xor eax, esi
xor edx, esi
or edx, eax
xor edx, ecx
lea ecx, [ebp - 0xb]
shr edx, 0x1f
neg edx
mov dword [esp + 0x3c], edx
not edx
mov dword [esp + 0x30], edx
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x30]
and edx, ecx
and eax, esi
mov esi, 1
or edx, eax
mov dword [esp + 0x3c], edx
cmp ecx, esi
jle 0x5858a1
mov eax, ebp
sub eax, edi
add eax, 0xfffffff5
mov dword [esp + 0x28], eax
and eax, esi
mov edi, ebp
sub edi, esi
lea ecx, [eax - 1]
not eax
shr ecx, 0x1f
shr eax, 0x1f
and ecx, eax
dec ecx
cmp edi, 0xb
jle 0x58588c
movzx ebp, cl
lea eax, [ebx + 0xb]
mov dword [esp + 0x30], ebp
add edi, 0xfffffff5
mov ebx, dword [esp + 0x30]
not ebp
lea esp, [esp]
mov dword [esp + 0x30], ebx
lea eax, [eax + 1]
mov dword [esp + 0x2c], ebp
mov ecx, dword [esp + 0x30]
mov dl, byte [eax + esi - 1]
and dl, cl
mov ecx, dword [esp + 0x2c]
and cl, byte [eax - 1]
or cl, dl
mov byte [eax - 1], cl
dec edi
jne 0x585860
mov ebx, dword [esp + 0x20]
mov ebp, dword [esp + 0x48]
lea eax, [ebp - 0xb]
add esi, esi
cmp esi, eax
mov eax, dword [esp + 0x28]
jl 0x585830
mov edi, dword [esp + 0x24]
mov edx, dword [esp + 0x3c]
xor esi, esi
test edx, edx
jle 0x585922
mov eax, edi
shr eax, 0x1f
neg edi
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x10]
movzx eax, al
mov dword [esp + 0x2c], eax
lea eax, [ebx + 0xb]
mov ebx, dword [esp + 0x30]
mov ebp, dword [esp + 0x2c]
mov dword [esp + 0x28], eax
mov ecx, esi
mov edx, edi
shr ecx, 0x1f
inc edi
shr edx, 0x1f
mov al, cl
xor al, bl
xor dl, bl
or dl, al
xor dl, cl
mov ecx, dword [esp + 0x28]
neg dl
movzx eax, dl
mov edx, dword [esp + 0x38]
and eax, ebp
mov dword [esp + 0x30], eax
not eax
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x30]
mov cl, byte [ecx + esi]
and cl, al
mov eax, dword [esp + 0x2c]
and al, byte [esi + edx]
or al, cl
mov byte [esi + edx], al
inc esi
cmp esi, dword [esp + 0x3c]
jl 0x5858d0
mov ebx, dword [esp + 0x20]
mov ebp, dword [esp + 0x48]
push ebp
push ebx
call fcn.00401360
push ebx
call fcn.00536f00
push 0xd8
push 0x6484e0
push dword [esp + 0x30]
push 0x72
push 4
call fcn.00530c60
mov ebx, dword [esp + 0x30]
mov eax, ebx
and eax, 1
push eax
call fcn.00530fe0
add esp, 0x24
mov dword [esp + 0x3c], ebx
not ebx
mov dword [esp + 0x30], ebx
mov eax, dword [esp + 0x3c]
and eax, dword [esp + 0x24]
or eax, dword [esp + 0x30]
pop edi
pop ebx
pop ebp
pop esi
add esp, 0x24
ret
push 0x7b
push 0x6484e0
push 0x6f
push 0x72
push 4
call fcn.00530c60
add esp, 0x14
or eax, 0xffffffff
pop ebp
pop esi
add esp, 0x24
ret
or eax, 0xffffffff
pop esi
add esp, 0x24
ret