Function at 0x4017d0
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, 0x3a9fc
call fcn.0041a470
mov eax, dword [0x424040]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
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 [0x4246dc], 6
jl 0x401a58
movaps xmm0, xmmword [0x420350]
xor ecx, ecx
movaps xmm6, xmmword [0x4201c0]
movaps xmm7, xmmword [0x4201e0]
movups xmm5, xmmword [0x420190]
lea eax, [ecx + 4]
movaps xmmword [ebp - 0x3a9e0], xmm0
movaps xmm0, xmmword [0x420380]
mov esi, dword [ebp - 0x3a9e0]
movaps xmmword [ebp - 0x3a9f0], xmm0
mov edx, dword [ebp - 0x3a9f0]
nop word [eax + eax]
movd xmm0, ecx
pshufd xmm4, xmm0, 0
paddd xmm4, xmm6
movd xmm0, ecx
pshufd xmm0, xmm0, 0
movaps xmm1, xmm4
paddd xmm0, xmm6
psrld xmm1, 0xe
vpsravd xmm2, xmm7, xmm0
pshufb xmm1, xmm5
pshufb xmm2, xmm5
vpsrlvd xmm0, xmm4, xmm4
pshufb xmm0, xmm5
movaps xmm3, xmm4
andps xmm2, xmm0
psrld xmm3, 5
movd xmm0, esi
andps xmm2, xmm0
movaps xmm0, xmm4
pshufb xmm0, xmm5
pshufb xmm3, xmm5
orps xmm1, xmm3
orps xmm1, xmm0
movd xmm0, edx
paddb xmm2, xmm1
vpmovzxbw ymm0, xmm0
vpmovzxbw ymm1, xmm2
vpmullw ymm0, ymm1, ymm0
vpmovzxwd zmm0, ymm0
movaps xmm1, xmm4
psrld xmm4, 1
psrld xmm1, 4
vpmovdb xmm2, zmm0
pshufb xmm1, xmm5
pshufb xmm4, xmm5
orps xmm1, xmm3
movd xmm0, edx
orps xmm1, xmm4
vpmovzxbw ymm0, xmm0
vpmovzxbw ymm1, xmm1
vpmullw ymm0, ymm1, ymm0
vpmovzxwd zmm0, ymm0
vpmovdb xmm0, zmm0
xorps xmm2, xmm0
movd xmm0, eax
pshufd xmm4, xmm0, 0
paddd xmm4, xmm6
movd dword [ebp + eax - 0x3a98c], xmm2
vpsravd xmm0, xmm7, xmm4
pshufb xmm0, xmm5
vpsrlvd xmm2, xmm4, xmm4
pshufb xmm2, xmm5
movaps xmm1, xmm4
movaps xmm3, xmm4
andps xmm2, xmm0
psrld xmm1, 0xe
movd xmm0, esi
andps xmm2, xmm0
psrld xmm3, 5
pshufb xmm1, xmm5
movaps xmm0, xmm4
pshufb xmm0, xmm5
pshufb xmm3, xmm5
orps xmm1, xmm3
orps xmm1, xmm0
movd xmm0, edx
paddb xmm2, xmm1
vpmovzxbw ymm1, xmm2
vpmovzxbw ymm0, xmm0
vpmullw ymm0, ymm1, ymm0
movaps xmm1, xmm4
psrld xmm4, 1
psrld xmm1, 4
pshufb xmm4, xmm5
pshufb xmm1, xmm5
vpmovzxwd zmm0, ymm0
orps xmm1, xmm3
orps xmm1, xmm4
vpmovdb xmm2, zmm0
movd xmm0, edx
vpmovzxbw ymm1, xmm1
vpmovzxbw ymm0, xmm0
vpmullw ymm0, ymm1, ymm0
vpmovzxwd zmm0, ymm0
vpmovdb xmm0, zmm0
xorps xmm2, xmm0
add ecx, 8
movd dword [ebp + eax - 0x3a988], xmm2
add eax, 8
cmp eax, 0x3a984
jb 0x4018c0
jmp 0x401a9e
mov ecx, eax
mov edx, eax
shr ecx, 5
mov dword [ebp - 0x3a9c4], ecx
mov ecx, eax
shr ecx, 1
shr edx, 4
or dl, cl
or dl, byte [ebp - 0x3a9c4]
movsx ecx, dl
imul edx, ecx, 0x72
mov ecx, eax
shr ecx, 0xe
or cl, byte [ebp - 0x3a9c4]
or cl, al
movsx ecx, cl
imul ecx, ecx, 0x72
xor dl, cl
mov byte [ebp + eax - 0x3a988], dl
inc eax
cmp eax, 0x3a980
jb 0x401a58
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]
xor ecx, ebp
pop esi
call fcn.004194ef
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret