Function at 0x407e40
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, 0xa1878
call fcn.0040acd0
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
xor eax, eax
mov dword [ebp - 0xa1820], 0
push eax
push eax
push eax
mov word [ebp - 0xa180c], ax
lea eax, [ebp - 0xa181c]
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0xa1820]
mov dword [ebp - 0xa181c], 0x10001
push eax
mov dword [ebp - 0xa1818], 0x5622
mov dword [ebp - 0xa1814], 0x5622
mov dword [ebp - 0xa1810], 0x80001
call dword [sym.imp.WINMM.dll_waveOutOpen]
push 0xa17fc
lea eax, [ebp - 0xa1808]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
xor eax, eax
cmp dword [0x40d3c8], 6
jl 0x408020
movaps xmm0, xmmword [0x40b7e0]
lea ecx, [eax + 4]
movaps xmm5, xmmword [0x40b700]
movups xmm4, xmmword [0x40b6e0]
movaps xmmword [ebp - 0xa1870], xmm0
movaps xmm0, xmmword [0x40b790]
mov edi, dword [ebp - 0xa1870]
movaps xmmword [ebp - 0xa1860], xmm0
movaps xmm0, xmmword [str._t_t_t_t_t_t_t_t_t_t_t_t_t_t_t_t_r_r_r_r_r_r_r_r_r_r_r_r_r_r_r_r________________]
mov esi, dword [ebp - 0xa1860]
movaps xmmword [ebp - 0xa1850], xmm0
mov edx, dword [ebp - 0xa1850]
movd xmm0, eax
add eax, 8
pshufd xmm3, xmm0, 0
paddd xmm3, xmm5
movd xmm0, edi
movaps xmm2, xmm3
movaps xmm1, xmm3
psrld xmm2, 0xc
psrld xmm1, 0xa
pshufb xmm2, xmm4
pshufb xmm1, xmm4
andps xmm2, xmm0
movd xmm0, esi
xorps xmm2, xmm0
movd xmm0, edx
andps xmm1, xmm0
orps xmm2, xmm1
pshufb xmm3, xmm4
vpmovzxbw ymm1, xmm2
vpmovzxbw ymm0, xmm3
vpmullw ymm0, ymm1, ymm0
vpmovzxwd zmm0, ymm0
vpmovdb xmm0, zmm0
movd dword [ebp + ecx - 0xa180c], xmm0
movd xmm0, ecx
pshufd xmm3, xmm0, 0
paddd xmm3, xmm5
movd xmm0, edi
movaps xmm2, xmm3
movaps xmm1, xmm3
psrld xmm2, 0xc
psrld xmm1, 0xa
pshufb xmm2, xmm4
pshufb xmm1, xmm4
andps xmm2, xmm0
movd xmm0, esi
xorps xmm2, xmm0
movd xmm0, edx
andps xmm1, xmm0
pshufb xmm3, xmm4
orps xmm2, xmm1
vpmovzxbw ymm0, xmm3
vpmovzxbw ymm1, xmm2
vpmullw ymm0, ymm1, ymm0
vpmovzxwd zmm0, ymm0
vpmovdb xmm0, zmm0
movd dword [ebp + ecx - 0xa1808], xmm0
add ecx, 8
cmp ecx, 0xa17fc
jb 0x407f32
cmp eax, 0xa17fc
jae 0x40804d
nop dword [eax]
mov edx, eax
mov ecx, eax
shr edx, 0xc
and dl, 0xd
shr ecx, 0xa
xor dl, 2
and cl, 9
or dl, cl
movsx ecx, al
movsx edx, dl
imul edx, ecx
mov byte [ebp + eax - 0xa1808], dl
inc eax
cmp eax, 0xa17fc
jb 0x408020
lea eax, [ebp - 0xa1808]
mov dword [ebp - 0xa183c], 0xa17fc
mov dword [ebp - 0xa1840], eax
lea eax, [ebp - 0xa1840]
push 0x20
push eax
push dword [ebp - 0xa1820]
mov dword [ebp - 0xa1838], 0
mov dword [ebp - 0xa1834], 0
mov dword [ebp - 0xa1830], 0
mov dword [ebp - 0xa182c], 0
mov dword [ebp - 0xa1828], 0
mov dword [ebp - 0xa1824], 0
call dword [sym.imp.WINMM.dll_waveOutPrepareHeader]
push 0x20
lea eax, [ebp - 0xa1840]
push eax
push dword [ebp - 0xa1820]
call dword [sym.imp.WINMM.dll_waveOutWrite]
push 0x20
lea eax, [ebp - 0xa1840]
push eax
push dword [ebp - 0xa1820]
call dword [sym.imp.WINMM.dll_waveOutUnprepareHeader]
push dword [ebp - 0xa1820]
call dword [sym.imp.WINMM.dll_waveOutClose]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.00409ec2
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret