Function at 0x4023e0
Capabilities:
Encode data using xor

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
mov eax, 0x50c48
call fcn.00403c40
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
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 [0x4063c8], 5
jl 0x4025e7
movaps xmm7, xmmword [0x404690]
lea ecx, [eax + 4]
movaps xmm4, xmmword [0x4046a0]
xorps xmm1, xmm1
movaps xmm5, xmmword [0x4046b0]
movups xmm6, xmmword [0x404680]
nop word [eax + eax]
movaps xmm2, xmmword [0x4046e0]
movd xmm0, eax
add eax, 8
pshufd xmm3, xmm0, 0
paddd xmm3, xmm7
andps xmm2, xmm3
movaps xmm0, xmm3
pcmpeqd xmm2, xmm1
psrld xmm0, 0xe
movaps xmm1, xmmword [0x4046d0]
andnps xmm2, xmmword [0x404750]
xorps xmm1, xmm3
andps xmm0, xmm4
psrld xmm1, 0xa
paddd xmm0, xmmword [0x4046c0]
andps xmm1, xmm4
paddd xmm1, xmm5
pmulld xmm1, xmm0
pmulld xmm1, xmm3
movaps xmm0, xmm3
psrld xmm0, 8
andps xmm0, xmm4
vpsrlvd xmm1, xmm1, xmm0
movaps xmm0, xmm2
andps xmm2, xmm4
andnps xmm0, xmm5
orps xmm0, xmm2
vpsrlvd xmm0, xmm3, xmm0
pshufb xmm0, xmm6
pshufb xmm1, xmm6
orps xmm1, xmm0
movd xmm0, ecx
pshufd xmm3, xmm0, 0
xorps xmm0, xmm0
movd dword [ebp + ecx - 0x50c0c], xmm1
paddd xmm3, xmm7
movaps xmm2, xmm3
movaps xmm1, xmm3
xorps xmm1, xmmword [0x4046d0]
andps xmm2, xmmword [0x4046e0]
pcmpeqd xmm2, xmm0
psrld xmm1, 0xa
andnps xmm2, xmmword [0x404750]
movaps xmm0, xmm3
psrld xmm0, 0xe
andps xmm1, xmm4
paddd xmm1, xmm5
andps xmm0, xmm4
paddd xmm0, xmmword [0x4046c0]
pmulld xmm1, xmm0
movaps xmm0, xmm3
psrld xmm0, 8
pmulld xmm1, xmm3
andps xmm0, xmm4
vpsrlvd xmm1, xmm1, xmm0
movaps xmm0, xmm2
andps xmm2, xmm4
andnps xmm0, xmm5
orps xmm0, xmm2
vpsrlvd xmm0, xmm3, xmm0
pshufb xmm1, xmm6
pshufb xmm0, xmm6
orps xmm1, xmm0
movd dword [ebp + ecx - 0x50c08], xmm1
add ecx, 8
xorps xmm1, xmm1
cmp ecx, 0x50bfc
jb 0x4024b0
cmp eax, 0x50bfe
jae 0x402643
mov edx, eax
mov ecx, eax
shr ecx, 0xe
xor edx, 0x400
and ecx, 3
shr edx, 0xa
add ecx, 5
and edx, 3
add edx, 4
imul edx, ecx
mov ecx, eax
shr ecx, 8
and ecx, 3
imul edx, eax
shr edx, cl
mov ecx, eax
and ecx, 0x1000
mov dword [ebp - 0x50c24], edx
neg ecx
mov edx, eax
sbb ecx, ecx
add ecx, 4
shr edx, cl
mov ecx, dword [ebp - 0x50c24]
or cl, dl
mov byte [ebp + eax - 0x50c08], cl
inc eax
cmp eax, 0x50bfe
jb 0x4025e7
lea eax, [ebp - 0x50c08]
mov dword [ebp - 0x50c40], 0x50bfe
mov dword [ebp - 0x50c44], eax
lea eax, [ebp - 0x50c44]
push 0x20
push eax
push dword [ebp - 0x50c20]
mov dword [ebp - 0x50c3c], 0
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
call dword [sym.imp.WINMM.dll_waveOutPrepareHeader]
push 0x20
lea eax, [ebp - 0x50c44]
push eax
push dword [ebp - 0x50c20]
call dword [sym.imp.WINMM.dll_waveOutWrite]
push 0x20
lea eax, [ebp - 0x50c44]
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]
xor ecx, ebp
call fcn.00402e2f
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret