Function at 0x4074f0
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, 0x50c58
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 - 0x50c20], 0
push eax
push eax
push eax
mov word [ebp - 0x50c0c], ax
lea eax, [ebp - 0x50c1c]
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x50c20]
mov dword [ebp - 0x50c1c], 0x10001
push eax
mov dword [ebp - 0x50c18], 0x2b11
mov dword [ebp - 0x50c14], 0x2b11
mov dword [ebp - 0x50c10], 0x80001
call dword [sym.imp.WINMM.dll_waveOutOpen]
push 0x50bfe
lea eax, [ebp - 0x50c08]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
xor eax, eax
cmp dword [0x40d3c8], 6
jl 0x407730
movaps xmm0, xmmword [0x40b7c0]
lea esi, [eax + 4]
movaps xmm3, xmmword [0x40b700]
lea edi, [ebp - 0x50c00]
movups xmm2, xmmword [0x40b6e0]
movaps xmmword [ebp - 0x50c50], xmm0
mov edx, dword [ebp - 0x50c50]
movd xmm0, eax
lea ecx, [eax + 8]
pshufd xmm1, xmm0, 0
paddd xmm1, xmm3
movaps xmm0, xmm1
psrld xmm1, 7
pshufb xmm0, xmm2
pshufb xmm1, xmm2
xorps xmm1, xmm0
paddb xmm1, xmm0
movd xmm0, edx
xorps xmm1, xmm0
movd xmm0, edx
vpmovzxbw ymm0, xmm0
vpmovzxbw ymm1, xmm1
vpmullw ymm0, ymm1, ymm0
vpmovzxwd zmm0, ymm0
vpmovdb xmm0, zmm0
movd dword [ebp + esi - 0x50c0c], xmm0
movd xmm0, esi
pshufd xmm1, xmm0, 0
paddd xmm1, xmm3
movaps xmm0, xmm1
psrld xmm1, 7
pshufb xmm0, xmm2
pshufb xmm1, xmm2
xorps xmm1, xmm0
paddb xmm1, xmm0
movd xmm0, edx
xorps xmm1, xmm0
movd xmm0, edx
vpmovzxbw ymm0, xmm0
vpmovzxbw ymm1, xmm1
vpmullw ymm0, ymm1, ymm0
vpmovzxwd zmm0, ymm0
vpmovdb xmm0, zmm0
movd dword [ebp + esi - 0x50c08], xmm0
add esi, 0x10
movd xmm0, ecx
lea ecx, [eax + 0xc]
pshufd xmm1, xmm0, 0
paddd xmm1, xmm3
movaps xmm0, xmm1
psrld xmm1, 7
pshufb xmm0, xmm2
pshufb xmm1, xmm2
xorps xmm1, xmm0
paddb xmm1, xmm0
movd xmm0, edx
xorps xmm1, xmm0
movd xmm0, edx
vpmovzxbw ymm0, xmm0
vpmovzxbw ymm1, xmm1
vpmullw ymm0, ymm1, ymm0
vpmovzxwd zmm0, ymm0
vpmovdb xmm0, zmm0
movd dword [edi + eax], xmm0
movd xmm0, ecx
lea ecx, [ebp - 0x50bfc]
pshufd xmm1, xmm0, 0
paddd xmm1, xmm3
movaps xmm0, xmm1
psrld xmm1, 7
pshufb xmm0, xmm2
pshufb xmm1, xmm2
xorps xmm1, xmm0
paddb xmm1, xmm0
movd xmm0, edx
xorps xmm1, xmm0
movd xmm0, edx
vpmovzxbw ymm0, xmm0
vpmovzxbw ymm1, xmm1
vpmullw ymm0, ymm1, ymm0
vpmovzxwd zmm0, ymm0
vpmovdb xmm0, zmm0
movd dword [ecx + eax], xmm0
add eax, 0x10
cmp esi, 0x50bf4
jb 0x4075c0
cmp eax, 0x50bfe
jae 0x407752
nop dword [eax]
mov edx, eax
shr edx, 7
xor dl, al
add dl, al
xor dl, 5
mov cl, dl
shl dl, 2
add cl, dl
mov byte [ebp + eax - 0x50c08], cl
inc eax
cmp eax, 0x50bfe
jb 0x407730
lea eax, [ebp - 0x50c08]
mov dword [ebp - 0x50c3c], 0x50bfe
mov dword [ebp - 0x50c40], eax
lea eax, [ebp - 0x50c40]
push 0x20
push eax
push dword [ebp - 0x50c20]
mov dword [ebp - 0x50c38], 0
mov dword [ebp - 0x50c34], 0
mov dword [ebp - 0x50c30], 0
mov dword [ebp - 0x50c2c], 0
mov dword [ebp - 0x50c28], 0
mov dword [ebp - 0x50c24], 0
call dword [sym.imp.WINMM.dll_waveOutPrepareHeader]
push 0x20
lea eax, [ebp - 0x50c40]
push eax
push dword [ebp - 0x50c20]
call dword [sym.imp.WINMM.dll_waveOutWrite]
push 0x20
lea eax, [ebp - 0x50c40]
push eax
push dword [ebp - 0x50c20]
call dword [sym.imp.WINMM.dll_waveOutUnprepareHeader]
push dword [ebp - 0x50c20]
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