Function at 0x582f50
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov eax, dword [0x6ba00c]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x20]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 0x18]
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x2c], esi
lea eax, [edi - 1]
cmp eax, 0x7f
ja 0x5831ef
movups xmm0, xmmword [esi]
push ecx
push esi
push esi
movups xmmword [ebp - 0x28], xmm0
call edx
lea eax, [edi + 7]
add esp, 0xc
cdq
and edx, 7
lea edi, [edx + eax]
sar edi, 3
cmp dword [ebp + 0x1c], 0
mov dword [ebp - 0x40], edi
je 0x582fe2
test edi, edi
jle 0x583130
mov edx, dword [ebp + 8]
lea eax, [ebp - 0x18]
sub eax, edx
sub esi, edx
mov dword [ebp - 0x30], eax
sub ebx, edx
movzx eax, byte [edx]
lea edx, [edx + 1]
movzx ecx, byte [esi + edx - 1]
xor ecx, eax
mov eax, dword [ebp - 0x30]
mov byte [ebx + edx - 1], cl
mov byte [eax + edx - 1], cl
sub edi, 1
jne 0x582fc0
jmp 0x58312d
xor esi, esi
test edi, edi
jle 0x58312d
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x2c]
cmp edi, 0x20
jb 0x5830f6
lea edx, [ebp + edi - 0x19]
mov dword [ebp - 0x34], edx
lea ebx, [ebp - 0x18]
lea edx, [ecx - 1]
add edx, edi
cmp ebx, edx
mov dword [ebp - 0x38], edx
mov ebx, dword [ebp - 0x30]
lea edx, [ebp + edi - 0x19]
ja 0x583020
cmp edx, ecx
jae 0x5830f6
lea edx, [ebx - 1]
lea ecx, [ebp - 0x18]
add edx, edi
cmp ecx, edx
mov ecx, dword [ebp - 0x2c]
ja 0x583038
cmp dword [ebp - 0x34], ebx
jae 0x5830f6
cmp ebx, dword [ebp - 0x38]
ja 0x583045
cmp edx, ecx
jae 0x5830f6
dec eax
add eax, edi
cmp ebx, eax
ja 0x583057
mov eax, dword [ebp + 8]
cmp edx, eax
jae 0x5830f6
mov eax, edi
and eax, 0x8000001f
jns 0x583065
dec eax
or eax, 0xffffffe0
inc eax
mov edx, edi
mov dword [ebp - 0x38], ecx
sub edx, eax
lea ebx, [ebp - 0x18]
mov eax, dword [ebp + 8]
mov edi, eax
sub dword [ebp - 0x38], ebx
sub edi, ebx
mov ebx, dword [ebp - 0x30]
sub eax, dword [ebp - 0x2c]
mov dword [ebp - 0x44], edx
lea edx, [ecx + 0x10]
mov dword [ebp - 0x34], ebx
lea ecx, [ebp - 0x18]
sub dword [ebp - 0x34], ecx
sub ebx, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x44]
mov dword [ebp - 0x3c], ebx
mov ebx, dword [ebp - 0x38]
mov dword [ebp - 0x48], eax
nop dword [eax]
lea eax, [edi + esi]
movups xmm1, xmmword [ebp + eax - 0x18]
lea eax, [ebx + esi]
movups xmm0, xmmword [ebp + eax - 0x18]
mov eax, dword [ebp - 0x34]
lea edx, [edx + 0x20]
add eax, esi
pxor xmm0, xmm1
movups xmmword [ebp + esi - 0x18], xmm1
movups xmmword [ebp + eax - 0x18], xmm0
mov eax, dword [ebp - 0x48]
movups xmm0, xmmword [edx - 0x20]
movups xmm1, xmmword [eax + edx - 0x20]
mov eax, dword [ebp - 0x3c]
movups xmmword [ebp + esi - 8], xmm1
add esi, 0x20
pxor xmm1, xmm0
movups xmmword [eax + edx - 0x20], xmm1
cmp esi, ecx
jl 0x5830a0
mov edi, dword [ebp - 0x40]
mov ebx, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ebp + 8]
cmp esi, edi
jge 0x58312d
lea edx, [ebp - 0x18]
sub ecx, edx
sub eax, edx
mov dword [ebp - 0x40], ecx
mov ecx, edx
mov dword [ebp - 0x3c], eax
sub ebx, ecx
nop dword [eax + eax]
lea edx, [ebp - 0x18]
add edx, esi
inc esi
mov cl, byte [eax + edx]
mov eax, dword [ebp - 0x40]
mov byte [edx], cl
mov al, byte [eax + edx]
xor al, cl
mov byte [ebx + edx], al
mov eax, dword [ebp - 0x3c]
cmp esi, edi
jl 0x583110
mov esi, dword [ebp - 0x2c]
mov eax, dword [ebp + 0x10]
mov edi, eax
and edi, reloc.OLEAUT32.dll_VariantInit
jns 0x583142
dec edi
or edi, 0xfffffff8
inc edi
cdq
and edx, 7
lea ecx, [edx + eax]
sar ecx, 3
test edi, edi
jne 0x583169
movups xmm0, xmmword [ebp + ecx - 0x28]
pop edi
movups xmmword [esi], xmm0
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0049ae07
mov esp, ebp
pop ebp
ret
mov eax, 8
mov dword [ebp - 0x34], 4
sub eax, edi
mov dword [ebp - 0x30], eax
lea eax, [esi + 1]
lea esi, [ebp - 0x27]
mov dword [ebp - 0x2c], eax
add esi, ecx
mov bl, byte [esi]
lea esi, [esi + 4]
movzx edx, byte [esi - 5]
mov ecx, edi
shl dl, cl
mov al, bl
movzx ecx, byte [ebp - 0x30]
shr al, cl
mov ecx, edi
or dl, al
shl bl, cl
mov eax, dword [ebp - 0x2c]
movzx ecx, byte [ebp - 0x30]
mov byte [eax - 1], dl
mov ah, byte [esi - 3]
mov dl, byte [esi - 2]
mov al, ah
shr al, cl
mov ecx, dword [ebp - 0x2c]
or bl, al
mov al, dl
mov byte [ecx], bl
mov ecx, edi
mov ebx, dword [ebp - 0x30]
shl ah, cl
mov cl, bl
shr al, cl
mov ecx, dword [ebp - 0x2c]
or ah, al
mov al, byte [esi - 1]
mov byte [ecx + 1], ah
mov cl, bl
shr al, cl
mov ecx, edi
shl dl, cl
mov ecx, dword [ebp - 0x2c]
or al, dl
mov byte [ecx + 2], al
add ecx, 4
sub dword [ebp - 0x34], 1
mov dword [ebp - 0x2c], ecx
jne 0x583185
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0049ae07
mov esp, ebp
pop ebp
ret