Function at 0x403f40
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, 0x3a9d0
call fcn.00407f30
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
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
movaps xmm0, xmmword [0x408400]
add esp, 0xc
movaps xmm6, xmmword [0x4084e0]
xor ecx, ecx
movaps xmm7, xmmword [0x4084d0]
movups xmm5, xmmword [0x4083d0]
movaps xmmword [ebp - 0x3a9d0], xmm0
lea eax, [ecx + 4]
mov edx, dword [ebp - 0x3a9d0]
movd xmm0, ecx
add ecx, 8
pshufd xmm4, xmm0, 0
paddd xmm4, xmmword [0x408360]
movaps xmm3, xmm4
movaps xmm1, xmm4
punpckhdq xmm1, xmm4
movaps xmm0, xmm1
punpckldq xmm3, xmm4
pmuludq xmm1, xmm7
movaps xmm2, xmm3
pmuludq xmm0, xmm6
pmuludq xmm2, xmm6
pmuludq xmm3, xmm7
shufps xmm2, xmm0, 0xdd
movaps xmm0, xmm4
shufps xmm3, xmm1, 0xdd
movaps xmm1, xmm4
psubd xmm1, xmm2
psubd xmm0, xmm3
psrld xmm1, 1
andps xmm4, xmm5
psrld xmm0, 1
paddd xmm1, xmm2
packuswb xmm4, xmm4
paddd xmm0, xmm3
psrld xmm1, 6
psrld xmm0, 6
andps xmm1, xmm5
packuswb xmm4, xmm4
packuswb xmm1, xmm1
andps xmm0, xmm5
packuswb xmm1, xmm1
packuswb xmm0, xmm0
packuswb xmm0, xmm0
xorps xmm1, xmm0
movd xmm0, edx
andps xmm1, xmm4
psubb xmm1, xmm0
movd xmm0, eax
movd dword [ebp + eax - 0x3a98c], xmm1
pshufd xmm4, xmm0, 0
paddd xmm4, xmmword [0x408360]
movaps xmm2, xmm4
movaps xmm1, xmm4
punpckhdq xmm1, xmm4
movaps xmm0, xmm1
punpckldq xmm2, xmm4
pmuludq xmm1, xmm7
movaps xmm3, xmm2
pmuludq xmm0, xmm6
pmuludq xmm3, xmm6
pmuludq xmm2, xmm7
shufps xmm3, xmm0, 0xdd
movaps xmm0, xmm4
shufps xmm2, xmm1, 0xdd
psubd xmm0, xmm3
movaps xmm1, xmm4
psrld xmm0, 1
psubd xmm1, xmm2
andps xmm4, xmm5
psrld xmm1, 1
paddd xmm0, xmm3
psrld xmm0, 6
paddd xmm1, xmm2
packuswb xmm4, xmm4
psrld xmm1, 6
andps xmm0, xmm5
packuswb xmm0, xmm0
andps xmm1, xmm5
packuswb xmm0, xmm0
packuswb xmm1, xmm1
packuswb xmm1, xmm1
xorps xmm1, xmm0
packuswb xmm4, xmm4
andps xmm1, xmm4
movd xmm0, edx
psubb xmm1, xmm0
movd dword [ebp + eax - 0x3a988], xmm1
add eax, 8
cmp eax, 0x3a984
jb 0x404002
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
call fcn.004070e1
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret