Function at 0x4027c0
Capabilities:
Encode data using xor

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff0
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
mov eax, 0x3a9f8
call fcn.00405c90
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
xor eax, eax
mov dword [ebp - 0x3a9a0], 0
push eax
push eax
push eax
mov word [ebp - 0x3a98c], ax
lea eax, [ebp - 0x3a99c]
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x3a9a0]
mov dword [ebp - 0x3a99c], 0x10001
push eax
mov dword [ebp - 0x3a998], 0x1f40
mov dword [ebp - 0x3a994], 0x1f40
mov dword [ebp - 0x3a990], 0x80001
call dword [sym.imp.WINMM.dll_waveOutOpen]
push 0x3a980
lea eax, [ebp - 0x3a988]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
xor eax, eax
cmp dword [0x4083c8], 6
jl 0x4029d5
movaps xmm0, xmmword [0x4063e0]
xor ecx, ecx
movaps xmm5, xmmword [0x406320]
movups xmm4, xmmword [0x406310]
movaps xmmword [ebp - 0x3a9f0], xmm0
lea eax, [ecx + 4]
movaps xmm0, xmmword [0x406400]
mov edi, dword [ebp - 0x3a9f0]
movaps xmmword [ebp - 0x3a9e0], xmm0
movaps xmm0, xmmword [0x4063d0]
mov esi, dword [ebp - 0x3a9e0]
movaps xmmword [ebp - 0x3a9d0], xmm0
mov edx, dword [ebp - 0x3a9d0]
movd xmm0, ecx
add ecx, 8
pshufd xmm3, xmm0, 0
paddd xmm3, xmm5
movaps xmm0, xmm3
movaps xmm2, xmm3
psrld xmm0, 0xa
movaps xmm1, xmm3
psrld xmm2, 0xf
pshufb xmm0, xmm4
psrld xmm1, 0xb
pshufb xmm2, xmm4
pshufb xmm1, xmm4
andps xmm2, xmm0
movd xmm0, edi
andps xmm2, xmm0
movd xmm0, esi
andps xmm1, xmm0
movd xmm0, edx
xorps xmm2, xmm1
movaps xmm1, xmm3
psrld xmm1, 9
pshufb xmm3, xmm4
pshufb xmm1, xmm4
andps xmm1, xmm0
orps xmm2, xmm1
vpmovzxbw ymm1, xmm2
vpmovzxbw ymm0, xmm3
vpmullw ymm0, ymm1, ymm0
vpmovzxwd zmm0, ymm0
vpmovdb xmm0, zmm0
movd dword [ebp + eax - 0x3a98c], xmm0
movd xmm0, eax
pshufd xmm3, xmm0, 0
paddd xmm3, xmm5
movaps xmm0, xmm3
movaps xmm2, xmm3
psrld xmm0, 0xa
movaps xmm1, xmm3
psrld xmm2, 0xf
pshufb xmm0, xmm4
pshufb xmm2, xmm4
psrld xmm1, 0xb
andps xmm2, xmm0
movd xmm0, edi
andps xmm2, xmm0
movd xmm0, esi
pshufb xmm1, xmm4
andps xmm1, xmm0
movd xmm0, edx
xorps xmm2, xmm1
movaps xmm1, xmm3
psrld xmm1, 9
pshufb xmm3, xmm4
pshufb xmm1, xmm4
andps xmm1, xmm0
orps xmm2, xmm1
vpmovzxbw ymm0, xmm3
vpmovzxbw ymm1, xmm2
vpmullw ymm0, ymm1, ymm0
vpmovzxwd zmm0, ymm0
vpmovdb xmm0, zmm0
movd dword [ebp + eax - 0x3a988], xmm0
add eax, 8
cmp eax, 0x3a984
jb 0x4028b4
jmp 0x402a10
mov edx, eax
mov ecx, eax
shr ecx, 0xa
shr edx, 0xf
and dl, cl
mov ecx, eax
shr ecx, 0xb
and dl, 0xf
and cl, 0x18
xor dl, cl
mov ecx, eax
shr ecx, 9
and cl, 0xa
or dl, cl
movsx ecx, al
movsx edx, dl
imul edx, ecx
mov byte [ebp + eax - 0x3a988], dl
inc eax
cmp eax, 0x3a980
jb 0x4029d5
lea eax, [ebp - 0x3a988]
mov dword [ebp - 0x3a9bc], 0x3a980
mov dword [ebp - 0x3a9c0], eax
lea eax, [ebp - 0x3a9c0]
push 0x20
push eax
push dword [ebp - 0x3a9a0]
mov dword [ebp - 0x3a9b8], 0
mov dword [ebp - 0x3a9b4], 0
mov dword [ebp - 0x3a9b0], 0
mov dword [ebp - 0x3a9ac], 0
mov dword [ebp - 0x3a9a8], 0
mov dword [ebp - 0x3a9a4], 0
call dword [sym.imp.WINMM.dll_waveOutPrepareHeader]
push 0x20
lea eax, [ebp - 0x3a9c0]
push eax
push dword [ebp - 0x3a9a0]
call dword [sym.imp.WINMM.dll_waveOutWrite]
push 0x20
lea eax, [ebp - 0x3a9c0]
push eax
push dword [ebp - 0x3a9a0]
call dword [sym.imp.WINMM.dll_waveOutUnprepareHeader]
push dword [ebp - 0x3a9a0]
call dword [sym.imp.WINMM.dll_waveOutClose]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.00404e83
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret