Function at 0x405f30
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, 0x3a9e8
call fcn.00408d90
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 ecx, ecx
cmp dword [0x40b3c4], 2
jl 0x40638c
movaps xmm0, xmmword [str.________________]
lea eax, [ecx + 4]
movaps xmm7, xmmword [0x409b40]
movaps xmm2, xmmword [0x409bf0]
movaps xmm6, xmmword [0x409be0]
movaps xmmword [ebp - 0x3a9e0], xmm0
mov edx, dword [ebp - 0x3a9e0]
movd xmm0, ecx
pshufd xmm3, xmm0, 0
paddd xmm3, xmmword [0x409b30]
movaps xmm1, xmm3
movaps xmm0, xmm3
psrld xmm0, 0x10
psrld xmm1, 0xe
andps xmm0, xmmword [0x409b20]
andps xmm1, xmm7
psubd xmm1, xmm0
movaps xmm0, xmm3
psrld xmm0, 0xb
paddd xmm1, xmm7
movaps xmm4, xmm1
pshuflw xmm0, xmm0, 0xd8
pshufhw xmm0, xmm0, 0xd8
pshufd xmm0, xmm0, 0xd8
andps xmm0, xmmword [0x409b90]
packuswb xmm0, xmm0
pmovsxbd xmm5, xmm0
punpckldq xmm4, xmm1
movaps xmm0, xmm3
psrld xmm0, 0xa
punpckhdq xmm1, xmm1
pshuflw xmm0, xmm0, 0xd8
pshufhw xmm0, xmm0, 0xd8
pshufd xmm0, xmm0, 0xd8
andps xmm0, xmmword [0x409b90]
pmuludq xmm1, xmm2
packuswb xmm0, xmm0
pmovsxbd xmm0, xmm0
xorps xmm5, xmm0
pmuludq xmm4, xmm2
movaps xmm2, xmm5
movaps xmm0, xmm5
punpckhdq xmm0, xmm5
pmuldq xmm0, xmmword [0x409bd0]
punpckldq xmm2, xmm5
pmuldq xmm2, xmmword [0x409bd0]
shufps xmm4, xmm1, 0xdd
movaps xmm1, xmm3
shufps xmm2, xmm0, 0xdd
psrld xmm1, 1
psrad xmm2, 1
andps xmm1, xmmword [0x409b80]
xorps xmm1, xmm3
psrld xmm4, 1
psrld xmm1, 0xe
movaps xmm0, xmm2
psrld xmm0, 0x1f
andps xmm1, xmm7
paddd xmm1, xmmword [0x409b20]
paddd xmm0, xmm2
pmulld xmm0, xmmword [0x409b50]
psubd xmm5, xmm0
pmulld xmm5, xmm1
pmulld xmm4, xmm3
movaps xmm1, xmm4
movaps xmm0, xmm4
punpckldq xmm1, xmm4
punpckhdq xmm0, xmm4
pmuludq xmm0, xmm6
pmuludq xmm1, xmm6
pmulld xmm5, xmm3
shufps xmm1, xmm0, 0xdd
psrld xmm1, 6
pmulld xmm1, xmmword [0x409b70]
psubd xmm4, xmm1
movaps xmm1, xmm5
pshuflw xmm0, xmm4, 0xd8
pshufhw xmm0, xmm0, 0xd8
pshufd xmm2, xmm0, 0xd8
andps xmm2, xmmword [0x409b90]
movd xmm0, edx
packuswb xmm2, xmm2
andps xmm2, xmm0
punpckldq xmm1, xmm5
movaps xmm0, xmm5
pmuludq xmm1, xmm6
punpckhdq xmm0, xmm5
pmuludq xmm0, xmm6
shufps xmm1, xmm0, 0xdd
psrld xmm1, 6
pmulld xmm1, xmmword [0x409b70]
psubd xmm5, xmm1
pshuflw xmm0, xmm5, 0xd8
pshufhw xmm0, xmm0, 0xd8
pshufd xmm0, xmm0, 0xd8
andps xmm0, xmmword [0x409b90]
packuswb xmm0, xmm0
paddb xmm2, xmm0
movd xmm0, eax
pshufd xmm3, xmm0, 0
paddd xmm3, xmmword [0x409b30]
movaps xmm1, xmm3
movd dword [ebp + eax - 0x3a98c], xmm2
psrld xmm1, 0xe
movaps xmm0, xmm3
psrld xmm0, 0x10
andps xmm1, xmm7
andps xmm0, xmmword [0x409b20]
psubd xmm1, xmm0
movaps xmm0, xmm3
psrld xmm0, 0xb
paddd xmm1, xmm7
movaps xmm4, xmm1
pshuflw xmm0, xmm0, 0xd8
pshufhw xmm0, xmm0, 0xd8
pshufd xmm0, xmm0, 0xd8
andps xmm0, xmmword [0x409b90]
packuswb xmm0, xmm0
pmovsxbd xmm5, xmm0
punpckldq xmm4, xmm1
movaps xmm0, xmm3
pmuludq xmm4, xmmword [0x409bf0]
psrld xmm0, 0xa
punpckhdq xmm1, xmm1
pmuludq xmm1, xmmword [0x409bf0]
pshuflw xmm0, xmm0, 0xd8
pshufhw xmm0, xmm0, 0xd8
pshufd xmm0, xmm0, 0xd8
andps xmm0, xmmword [0x409b90]
packuswb xmm0, xmm0
pmovsxbd xmm0, xmm0
xorps xmm5, xmm0
shufps xmm4, xmm1, 0xdd
movaps xmm2, xmm5
psrld xmm4, 1
punpckldq xmm2, xmm5
movaps xmm0, xmm5
pmuldq xmm2, xmmword [0x409bd0]
punpckhdq xmm0, xmm5
movaps xmm1, xmm3
pmuldq xmm0, xmmword [0x409bd0]
shufps xmm2, xmm0, 0xdd
psrld xmm1, 1
psrad xmm2, 1
andps xmm1, xmmword [0x409b80]
xorps xmm1, xmm3
movaps xmm0, xmm2
psrld xmm0, 0x1f
psrld xmm1, 0xe
paddd xmm0, xmm2
pmulld xmm0, xmmword [0x409b50]
andps xmm1, xmm7
psubd xmm5, xmm0
paddd xmm1, xmmword [0x409b20]
pmulld xmm5, xmm1
pmulld xmm4, xmm3
movaps xmm1, xmm4
movaps xmm0, xmm4
punpckldq xmm1, xmm4
punpckhdq xmm0, xmm4
pmuludq xmm1, xmm6
pmuludq xmm0, xmm6
pmulld xmm5, xmm3
shufps xmm1, xmm0, 0xdd
psrld xmm1, 6
pmulld xmm1, xmmword [0x409b70]
psubd xmm4, xmm1
pshuflw xmm0, xmm4, 0xd8
pshufhw xmm0, xmm0, 0xd8
pshufd xmm2, xmm0, 0xd8
movaps xmm1, xmm5
andps xmm2, xmmword [0x409b90]
add ecx, 8
packuswb xmm2, xmm2
movd xmm0, edx
andps xmm2, xmm0
punpckldq xmm1, xmm5
movaps xmm0, xmm5
pmuludq xmm1, xmm6
punpckhdq xmm0, xmm5
pmuludq xmm0, xmm6
shufps xmm1, xmm0, 0xdd
psrld xmm1, 6
pmulld xmm1, xmmword [0x409b70]
psubd xmm5, xmm1
pshuflw xmm0, xmm5, 0xd8
pshufhw xmm0, xmm0, 0xd8
pshufd xmm0, xmm0, 0xd8
andps xmm0, xmmword [0x409b90]
packuswb xmm0, xmm0
paddb xmm2, xmm0
movd dword [ebp + eax - 0x3a988], xmm2
add eax, 8
movaps xmm2, xmmword [0x409bf0]
cmp eax, 0x3a984
jb 0x406001
jmp 0x406412
mov esi, 5
lea edi, [esi + 0x5e]
mov eax, ecx
mov edx, ecx
shr eax, 0xb
movsx eax, al
shr edx, 0xa
movsx edx, dl
xor eax, edx
cdq
idiv esi
mov eax, ecx
mov esi, ecx
shr eax, 1
and eax, 0x4000
shr esi, 0xe
xor eax, ecx
and esi, 3
shr eax, 0xe
and eax, 3
inc eax
imul eax, edx
xor edx, edx
imul eax, ecx
div edi
mov eax, ecx
shr eax, 0x10
and eax, 1
mov dword [ebp - 0x3a9a4], edx
sub esi, eax
mov eax, 0xaaaaaaab
add esi, 3
mul esi
mov esi, 5
shr edx, 1
imul edx, ecx
mov eax, edx
xor edx, edx
div edi
mov eax, dword [ebp - 0x3a9a4]
and dl, 0x40
add al, dl
mov byte [ebp + ecx - 0x3a988], al
inc ecx
cmp ecx, 0x3a980
jb 0x406394
lea eax, [ebp - 0x3a988]
mov dword [ebp - 0x3a9c0], 0x3a980
mov dword [ebp - 0x3a9c4], eax
lea eax, [ebp - 0x3a9c4]
push 0x20
push eax
push dword [ebp - 0x3a9a0]
mov dword [ebp - 0x3a9bc], 0
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
call dword [sym.imp.WINMM.dll_waveOutPrepareHeader]
push 0x20
lea eax, [ebp - 0x3a9c4]
push eax
push dword [ebp - 0x3a9a0]
call dword [sym.imp.WINMM.dll_waveOutWrite]
push 0x20
lea eax, [ebp - 0x3a9c4]
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.004080e4
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret