Function at 0x4106f0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea edx, [ebp - 0x6c]
push ebx
sub esp, 0x70
mov dword [esp + 4], edx
mov dword [esp + 8], 0
mov dword [esp], eax
call sub.dsound.dll_DirectSoundCreate
sub esp, 0xc
mov ebx, eax
call fcn.004256b0
mov dword [eax], 0x42fbd1
mov dword [eax + 4], 0x652
test ebx, ebx
je 0x410760
cmp ebx, 0x88780078
je 0x410760
cmp ebx, 0x8878000a
je 0x410ca8
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x42fc90
mov dword [esp], 0
call fcn.00410020
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x42fc90
mov dword [esp], 1
call fcn.00410020
test ebx, ebx
jne 0x410757
mov eax, dword [ebp - 0x6c]
mov eax, dword [eax]
mov ebx, dword [eax + 0x18]
call fcn.00405740
mov dword [esp + 8], 2
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x6c]
mov dword [esp], eax
call ebx
sub esp, 0xc
mov ebx, eax
call fcn.004256b0
mov dword [eax], 0x42fbd1
mov dword [eax + 4], 0x658
xor eax, eax
test ebx, ebx
sete al
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x42fcb4
mov dword [esp], eax
call fcn.00410020
test ebx, ebx
jne 0x410c8c
xor ecx, ecx
mov dword [ebp - 0x44], 0x10001
xor edx, edx
xor eax, eax
mov dword [ebp - 0x40], 0xac44
mov dword [ebp - 0x38], 0x100002
mov dword [ebp - 0x3c], 0x15888
mov word [ebp - 0x34], cx
mov dword [ebp + eax - 0x24], edx
add eax, 4
cmp eax, 0x18
jb 0x4107fd
lea eax, [ebp - 0x44]
mov dword [ebp - 0x30], 0x24
lea ecx, [ebp - 0x68]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x6c]
mov dword [ebp - 0x2c], 0x10000
mov dword [ebp - 0x28], 0xac44
mov edx, dword [eax]
mov dword [esp + 8], ecx
lea ecx, [ebp - 0x30]
mov dword [esp + 4], ecx
mov dword [esp + 0xc], 0
mov dword [esp], eax
call dword [edx + 0xc]
sub esp, 0x10
mov esi, eax
call fcn.004256b0
mov dword [eax], 0x42fbd1
mov dword [eax + 4], 0x66c
xor eax, eax
test esi, esi
jne 0x41086c
mov edx, dword [ebp - 0x68]
xor eax, eax
test edx, edx
setne al
mov dword [esp + 8], esi
lea esi, [ebp - 0x64]
mov dword [esp], eax
mov dword [esp + 4], str.IDirectSound_CreateSoundBuffer___failed_to_create_a_buffer__08lx_n
call fcn.00410020
mov eax, dword [ebp - 0x68]
mov edx, dword [eax]
mov dword [esp + 8], esi
mov dword [esp + 4], 0x42bd80
mov dword [esp], eax
call dword [edx]
sub esp, 0xc
mov edi, eax
call fcn.004256b0
mov dword [eax], 0x42fbd1
mov dword [eax + 4], 0x670
xor eax, eax
cmp edi, 0x80004002
sete al
mov dword [esp + 8], edi
mov dword [esp], eax
mov dword [esp + 4], str.QueryInterface_IID_IDirectSoundNotify_:__08lx_n
call fcn.00410020
mov eax, dword [ebp - 0x68]
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
xor edx, edx
xor eax, eax
sub esp, 4
mov dword [ebp + eax - 0x24], edx
add eax, 4
cmp eax, 0x18
jb 0x4108e1
movzx eax, word [ebp - 0x38]
imul eax, dword [ebp - 0x40]
mov dword [ebp - 0x30], 0x24
lea ecx, [ebp - 0x68]
mov dword [ebp - 0x2c], 0x100
shr eax, 1
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x44]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x6c]
mov edx, dword [eax]
mov dword [esp + 8], ecx
lea ecx, [ebp - 0x30]
mov dword [esp + 4], ecx
mov dword [esp + 0xc], 0
mov dword [esp], eax
call dword [edx + 0xc]
sub esp, 0x10
mov edi, eax
call fcn.004256b0
mov dword [eax], 0x42fbd1
mov dword [eax + 4], 0x679
test edi, edi
jne 0x410954
mov eax, dword [ebp - 0x68]
xor ebx, ebx
test eax, eax
setne bl
mov dword [esp], ebx
mov dword [esp + 8], edi
mov dword [esp + 4], str.IDirectSound_CreateSoundBuffer___failed_to_create_a_buffer__08lx_n
call fcn.00410020
mov eax, dword [ebp - 0x68]
mov edx, dword [eax]
mov dword [esp + 8], esi
mov esi, 6
mov dword [esp + 4], 0x42bd80
mov dword [esp], eax
call dword [edx]
sub esp, 0xc
mov ebx, eax
call fcn.004256b0
mov dword [eax], 0x42fbd1
mov dword [eax + 4], 0x67d
xor eax, eax
test ebx, ebx
sete al
mov dword [esp + 8], ebx
mov dword [esp + 4], str.QueryInterface_IID_IDirectSoundNotify_:__08lx_n
mov dword [esp], eax
call fcn.00410020
mov dword [ebp - 0x54], 0
mov ebx, dword [sym.imp.kernel32.dll_CreateEventW]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0
call ebx
mov dword [ebp - 0x50], eax
sub esp, 0x10
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x28]
shr eax, 1
mov dword [ebp - 0x4c], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0
call ebx
lea ecx, [ebp - 0x54]
mov dword [ebp - 0x48], eax
sub esp, 0x10
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x64]
mov edx, dword [eax]
mov dword [esp + 8], ecx
mov dword [esp + 4], 2
mov dword [esp], eax
call dword [edx + 0xc]
sub esp, 0xc
mov ebx, eax
call fcn.004256b0
mov dword [eax], 0x42fbd1
mov dword [eax + 4], 0x685
xor eax, eax
test ebx, ebx
sete al
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], str.SetNotificationPositions:__08lx_n
call fcn.00410020
mov eax, dword [ebp - 0x64]
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
mov eax, dword [ebp - 0x68]
sub esp, 4
mov edx, dword [eax]
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [edx + 0x30]
sub esp, 0x10
mov ebx, eax
call fcn.004256b0
mov dword [eax], 0x42fbd1
mov dword [eax + 4], 0x68a
xor eax, eax
test ebx, ebx
sete al
mov dword [esp + 8], ebx
xor ebx, ebx
mov dword [esp + 4], str.Play:__08lx_n
mov dword [esp], eax
call fcn.00410020
nop
lea eax, [ebp - 0x5c]
mov dword [esp + 0xc], 0x3e8
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], 2
call dword [sym.imp.kernel32.dll_WaitForMultipleObjects]
sub esp, 0x10
mov edi, eax
call fcn.004256b0
cmp edi, 1
mov dword [eax], 0x42fbd1
setbe dl
mov dword [eax + 4], 0x691
xor eax, eax
cmp edi, ebx
sete al
mov dword [esp + 8], edi
and eax, edx
mov dword [esp + 4], str.Got_unexpected_notification_order_or_timeout:__lu_n
mov dword [esp], eax
call fcn.00410020
mov eax, dword [ebp - 0x68]
lea ecx, [ebp - 0x60]
mov edx, dword [eax]
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [edx + 0x24]
sub esp, 8
mov edi, eax
call fcn.004256b0
mov dword [eax], 0x42fbd1
mov dword [eax + 4], 0x695
xor eax, eax
test edi, edi
sete al
mov dword [esp + 8], edi
mov dword [esp], eax
mov dword [esp + 4], str.Failed__08lx_n
call fcn.00410020
call fcn.004256b0
mov dword [eax], 0x42fbd1
mov dword [eax + 4], 0x696
mov eax, dword [ebp - 0x60]
mov dword [esp + 4], 0x42fc44
cmp eax, 5
mov dword [esp + 8], eax
sete al
xor ebx, 1
movzx eax, al
mov dword [esp], eax
call fcn.00410020
sub esi, 1
jne 0x410ad0
mov eax, dword [ebp - 0x68]
lea esi, [ebp - 0x60]
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 0x48]
sub esp, 4
mov ebx, eax
call fcn.004256b0
mov dword [eax], 0x42fbd1
mov dword [eax + 4], 0x69c
xor eax, eax
test ebx, ebx
sete al
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], str.Stop:__08lx_n
call fcn.00410020
mov eax, dword [ebp - 0x68]
mov edx, dword [eax]
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [edx + 0x24]
sub esp, 8
mov ebx, eax
call fcn.004256b0
mov dword [eax], 0x42fbd1
mov dword [eax + 4], 0x69f
xor eax, eax
test ebx, ebx
sete al
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], str.Failed__08lx_n
call fcn.00410020
call fcn.004256b0
mov dword [eax], 0x42fbd1
mov dword [eax + 4], 0x6a0
mov eax, dword [ebp - 0x60]
mov dword [esp + 4], 0x42fc44
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00410020
mov eax, dword [ebp - 0x50]
mov ebx, dword [sym.imp.kernel32.dll_CloseHandle]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x48]
sub esp, 4
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x68]
sub esp, 4
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
mov eax, dword [ebp - 0x6c]
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], 0x8878000a
mov dword [esp + 4], 0x42fc90
mov dword [esp], 1
call fcn.00410020
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret